---
name: sequentialthinking-logic
description: Expert en raisonnement décomposé. Force l'usage de sequentialthinking_tools pour valider la logique Flask, les orchestrateurs et les flux asynchrones Redis/Celery.
title: sequentialthinking-logic
canonical_url: https://skilld.dev/gh/ki2pixel/render_signal_server/sequentialthinking-logic
last_updated: 2026-10-08T16:19:03.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ki2pixel/render_signal_server/sequentialthinking-logic`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/sequentialthinking-logic`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ki2pixel/render_signal_server/sequentialthinking-logic) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/sequentialthinking-logic`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/sequentialthinking-logic --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/sequentialthinking-logic --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Sequential Thinking Logic

> **Expertise** : Raisonnement décomposé, validation logique, analyse étape par étape, pensée structurée pour architectures complexes backend.

## Quick Start

### Mental Model

Sequential Thinking Logic décompose les problèmes complexes en séquences logiques validées :
- Analyse des Routes Flask vs Background Tasks
- Validation des flux de données via Redis (Config Store / Cache)
- Identification des points de défaillance (IngressService, Webhook Orchestrator)
- Construction de chaînes de raisonnement robustes

### Workflow obligatoire

1. **Décomposition** : Identifier les composants logiques principaux (API, Ingress, Async Task)
2. **Validation** : Utiliser `sequentialthinking_tools` (en passant l'action en paramètre) pour chaque étape
3. **Chaînage** : Connecter les étapes en une séquence cohérente
4. **Test logique** : Valider les hypothèses et points de rupture

### Patterns d'utilisation

#### Pour architecture Flask / Background

```bash
# Décomposer l'architecture
sequentialthinking_tools decompose "Ingestion Email: API <-> IngressService <-> Redis Deduplication"

# Valider chaque composant
sequentialthinking_tools validate "Flask route payload validation"
sequentialthinking_tools validate "IngressService singleton logic"
sequentialthinking_tools validate "Redis TTL hash deduplication"

# Tester la séquence complète
sequentialthinking_tools test-sequence "POST /api/ingress -> IngressService -> DeduplicationService -> Webhook"
```

#### Pour logique métier (Orchestrator)

```bash
# Analyser le flux métier
sequentialthinking_tools decompose "Webhook delivery flow"

# Valider chaque étape
sequentialthinking_tools validate "Load processing_prefs"
sequentialthinking_tools validate "Pattern matching (DESABO / Media Solution)"
sequentialthinking_tools validate "RateLimit & R2 offload"
sequentialthinking_tools validate "Error handling / Fallbacks"

# Identifier les points de rupture
sequentialthinking_tools find-breakpoints "webhook_flow"
```

## Production-safe patterns

### Validation systématique

Pour chaque composant logique :

```bash
# 1. Décomposition
sequentialthinking_tools decompose "[composant]"

# 2. Validation logique
sequentialthinking_tools validate "[sous-composant_1]"
sequentialthinking_tools validate "[sous-composant_2]"

# 3. Test de séquence
sequentialthinking_tools test-sequence "[flux_complet]"
```

### Route Handler vs Async Background

Pattern spécifique pour l'architecture serveur :

```bash
# Flask Route Logic
sequentialthinking_tools validate-route "payload_sanitization"
sequentialthinking_tools validate-route "auth_verification"
sequentialthinking_tools validate-route "response_formatting"

# Background / Orchestrator Logic
sequentialthinking_tools validate-async "redis_lock_acquisition"
sequentialthinking_tools validate-async "r2_transfer_resilience"
sequentialthinking_tools validate-async "webhook_retries"

# Route to Async communication
sequentialthinking_tools test-communication "Flask API <-> Background Service"
```

### Gestion des erreurs logiques

```bash
# Identifier les points de défaillance
sequentialthinking_tools find-breakpoints "[flux]"

# Analyser les cas limites
sequentialthinking_tools edge-cases "[composant]"

# Valider la gestion d'erreurs
sequentialthinking_tools validate-error-handling "[flux]"
```

## Common gotchas

### Séquences incomplètes

- Toujours valider le début ET la fin de chaque séquence
- Les points de décision doivent avoir tous les cas couverts (ex: HTTP 200 vs 400/409/500)
- Les processus idempotents doivent bien vérifier l'état avant d'agir

### Dépendances circulaires / Locks

```bash
# Détecter les circularités
sequentialthinking_tools detect-cycles "[services_singletons]"

# Résoudre les deadlocks
sequentialthinking_tools detect-deadlocks "[redis_locks]"
```

### Route/Async contamination

- Éviter de bloquer le thread principal Flask avec des appels distants lents (utiliser l'asynchronisme ou des timeouts courts)
- Isoler les communications réseau dans des try/except robustes
- Valider les contextes d'exécution séparément

## API Reference

> **ATTENTION** : Le seul outil disponible est `sequentialthinking_tools`. Les actions (`decompose`, `validate`, etc.) doivent être passées en paramètres de l'outil et non invoquées comme des outils distincts.

### Outil principal

- `sequentialthinking_tools` : Accepte des paramètres comme `action` et `target`.

### Actions disponibles (à passer en paramètre)

- `decompose` : Décompose en composants logiques
- `validate` : Valide la logique d'un composant
- `test-sequence` : Teste une séquence complète
- `find-breakpoints` : Identifie les points de rupture
- `edge-cases` : Analyse les cas limites
- `validate-route` : Validation des handlers Flask
- `validate-async` : Validation des tâches asynchrones / services
- `test-communication` : Test communication inter-couches
- `detect-cycles` : Détection dépendances circulaires
- `detect-deadlocks` : Détection des problèmes de locks

### Options avancées (paramètres supplémentaires)

- `depth` : Profondeur d'analyse (1-5)
- `verbose` : Sortie détaillée du raisonnement
- `export_logic` : Exporte le modèle logique
- `test_cases` : Génère cas de test automatiquement

## Debugging checklist

- Confirmer que chaque étape a une entrée ET une sortie
- Vérifier que les points de décision sont complets
- Tester les cas limites et erreurs
- Valider la gestion des timeouts et locks (Redis)
- Contrôler l'absence de dépendances circulaires entre Singletons

## When to use this skill

- **Architecture Backend** : Flask Routes, Singletons, Webhook Orchestrators
- **Logique métier complexe** : Flux multi-étapes avec validations (Deduplication, Rate Limit)
- **Systèmes distribués** : Communication API -> Redis -> R2
- **Validation de design** : Revue logique d'architectures asynchrones
- **Debugging logique** : Analyse de raisonnement défaillant

## Integration patterns

### Avec Shrimp Task Manager

Utilise après `analyze_task` pour valider la décomposition logique des tâches.

### Avec Redis Config Guardian

Utilise pour valider le flux de mise à jour des configs en cache avant persistance.