@neikyun/ciel 6.11.3 → 6.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/assets/.claude/agents/ciel-critic.md +71 -12
  2. package/assets/.claude/agents/ciel-explorer.md +59 -18
  3. package/assets/.claude/agents/ciel-improver.md +6 -3
  4. package/assets/.claude/agents/ciel-researcher.md +85 -25
  5. package/assets/.claude/hooks/block-destructive.sh +2 -2
  6. package/assets/.claude/hooks/check-test-first.sh +2 -2
  7. package/assets/.claude/hooks/memory-bootstrap.sh +0 -0
  8. package/assets/.claude/hooks/memory-engine.py +82 -15
  9. package/assets/.claude/hooks/post-tool-write.sh +32 -0
  10. package/assets/.claude/hooks/pre-agent-gate.sh +11 -6
  11. package/assets/.claude/hooks/pre-compact.sh +18 -0
  12. package/assets/.claude/hooks/pre-tool-write.sh +56 -31
  13. package/assets/.claude/hooks/session-start.sh +22 -1
  14. package/assets/.claude/hooks/session-version-check.sh +1 -1
  15. package/assets/.claude/hooks/stop.sh +104 -0
  16. package/assets/.claude/hooks/subagent-stop.sh +54 -0
  17. package/assets/.claude/hooks/track-file.sh +2 -2
  18. package/assets/.claude/hooks/user-prompt-submit.sh +11 -15
  19. package/assets/.claude/settings.json +18 -4
  20. package/assets/AGENTS.md +1 -1
  21. package/assets/CLAUDE.md +103 -175
  22. package/assets/commands/ciel-audit.md +58 -399
  23. package/assets/commands/ciel-create-skill.md +24 -38
  24. package/assets/commands/ciel-eval.md +25 -37
  25. package/assets/commands/ciel-init.md +36 -126
  26. package/assets/commands/ciel-status.md +22 -19
  27. package/assets/commands/ciel-update.md +20 -39
  28. package/assets/platforms/opencode/.opencode/agents/ciel-researcher.md +71 -895
  29. package/assets/platforms/opencode/.opencode/commands/ciel-audit.md +58 -296
  30. package/assets/platforms/opencode/.opencode/commands/ciel-create-skill.md +24 -46
  31. package/assets/platforms/opencode/.opencode/commands/ciel-eval.md +25 -45
  32. package/assets/platforms/opencode/.opencode/commands/ciel-init.md +36 -131
  33. package/assets/platforms/opencode/.opencode/commands/ciel-status.md +22 -24
  34. package/assets/platforms/opencode/.opencode/commands/ciel-update.md +20 -40
  35. package/assets/platforms/opencode/AGENTS.md +4 -4
  36. package/assets/rules/security.md +30 -0
  37. package/assets/rules/testing.md +23 -0
  38. package/assets/skills/agile/SKILL.md +42 -0
  39. package/assets/skills/alerting/SKILL.md +55 -0
  40. package/assets/skills/api-design/SKILL.md +46 -0
  41. package/assets/skills/appsec/SKILL.md +43 -0
  42. package/assets/skills/architecture/SKILL.md +74 -0
  43. package/assets/skills/backend/SKILL.md +41 -0
  44. package/assets/skills/backup-recovery/SKILL.md +42 -0
  45. package/assets/skills/caching/SKILL.md +44 -0
  46. package/assets/skills/cdn/SKILL.md +42 -0
  47. package/assets/skills/chaos/SKILL.md +41 -0
  48. package/assets/skills/cicd-pipeline/SKILL.md +56 -0
  49. package/assets/skills/cloud/SKILL.md +42 -0
  50. package/assets/skills/code-quality/SKILL.md +42 -0
  51. package/assets/skills/code-review/SKILL.md +41 -0
  52. package/assets/skills/communication/SKILL.md +42 -0
  53. package/assets/skills/containers/SKILL.md +42 -0
  54. package/assets/skills/cqrs/SKILL.md +41 -0
  55. package/assets/skills/crypto/SKILL.md +46 -0
  56. package/assets/skills/data-engineering/SKILL.md +42 -0
  57. package/assets/skills/database-design/SKILL.md +46 -0
  58. package/assets/skills/ddd/SKILL.md +45 -0
  59. package/assets/skills/deployment-strategies/SKILL.md +51 -0
  60. package/assets/skills/desktop/SKILL.md +42 -0
  61. package/assets/skills/devsecops/SKILL.md +43 -0
  62. package/assets/skills/event-driven/SKILL.md +46 -0
  63. package/assets/skills/frontend/SKILL.md +41 -0
  64. package/assets/skills/functional/SKILL.md +42 -0
  65. package/assets/skills/high-availability/SKILL.md +42 -0
  66. package/assets/skills/iac/SKILL.md +46 -0
  67. package/assets/skills/logging/SKILL.md +46 -0
  68. package/assets/skills/meta/ciel-improve/SKILL.md +127 -0
  69. package/assets/skills/meta/learnings-capture/SKILL.md +105 -0
  70. package/assets/skills/meta/patch-spec/patch-spec.md +50 -0
  71. package/assets/skills/meta/skill-creator/SKILL.md +115 -0
  72. package/assets/skills/meta/skill-freshness-auditor/SKILL.md +164 -0
  73. package/assets/skills/meta/skill-variant-evaluator/SKILL.md +100 -0
  74. package/assets/skills/meta/skills-first-design-auditor/SKILL.md +192 -0
  75. package/assets/skills/ml-engineering/SKILL.md +42 -0
  76. package/assets/skills/mobile/SKILL.md +42 -0
  77. package/assets/skills/monitoring/SKILL.md +54 -0
  78. package/assets/skills/networking/SKILL.md +42 -0
  79. package/assets/skills/nosql/SKILL.md +41 -0
  80. package/assets/skills/oop-solid/SKILL.md +42 -0
  81. package/assets/skills/performance/SKILL.md +41 -0
  82. package/assets/skills/reactive/SKILL.md +42 -0
  83. package/assets/skills/release-management/SKILL.md +51 -0
  84. package/assets/skills/research/fact-check-claims/SKILL.md +98 -0
  85. package/assets/skills/research/research-forums/SKILL.md +103 -0
  86. package/assets/skills/research/research-github-issues/SKILL.md +103 -0
  87. package/assets/skills/research/research-web-sources/SKILL.md +108 -0
  88. package/assets/skills/research/synthesize-findings/SKILL.md +112 -0
  89. package/assets/skills/research/validate-source-credibility/SKILL.md +103 -0
  90. package/assets/skills/resilience/SKILL.md +41 -0
  91. package/assets/skills/serverless/SKILL.md +42 -0
  92. package/assets/skills/servers/SKILL.md +41 -0
  93. package/assets/skills/sql/SKILL.md +45 -0
  94. package/assets/skills/supply-chain/SKILL.md +41 -0
  95. package/assets/skills/system-design/SKILL.md +91 -0
  96. package/assets/skills/tech-leadership/SKILL.md +46 -0
  97. package/assets/skills/testing/SKILL.md +41 -0
  98. package/assets/skills/tracing/SKILL.md +36 -0
  99. package/assets/skills/utility/branch-cleaner/SKILL.md +195 -0
  100. package/assets/skills/utility/branch-setup/SKILL.md +144 -0
  101. package/assets/skills/utility/changelog-updater/SKILL.md +125 -0
  102. package/assets/skills/utility/commit-writer/SKILL.md +154 -0
  103. package/assets/skills/utility/issue-closer/SKILL.md +106 -0
  104. package/assets/skills/utility/issue-creator/SKILL.md +200 -0
  105. package/assets/skills/utility/pr-merger/SKILL.md +189 -0
  106. package/assets/skills/utility/pr-opener/SKILL.md +180 -0
  107. package/assets/skills/utility/release-publisher/SKILL.md +224 -0
  108. package/assets/skills/workflow/ciel-dev-process/SKILL.md +94 -0
  109. package/assets/skills/workflow/faire-gatekeeper/SKILL.md +3 -1
  110. package/assets/skills/workflow/prouver-verifier/SKILL.md +11 -2
  111. package/dist/cli/check.d.ts.map +1 -1
  112. package/dist/cli/check.js +11 -2
  113. package/dist/cli/check.js.map +1 -1
  114. package/dist/cli/claude.d.ts.map +1 -1
  115. package/dist/cli/claude.js +0 -2
  116. package/dist/cli/claude.js.map +1 -1
  117. package/dist/cli/init.d.ts.map +1 -1
  118. package/dist/cli/init.js +11 -2
  119. package/dist/cli/init.js.map +1 -1
  120. package/dist/cli/opencode.d.ts.map +1 -1
  121. package/dist/cli/opencode.js +2 -1
  122. package/dist/cli/opencode.js.map +1 -1
  123. package/package.json +1 -1
  124. package/assets/commands/ciel-migrate.md +0 -35
  125. package/assets/commands/ciel-refresh.md +0 -91
package/assets/CLAUDE.md CHANGED
@@ -1,197 +1,125 @@
1
- # CLAUDE.md — Ciel v6 (IMPERATIVE — FOLLOW ALL RULES)
2
-
3
- This file is Claude Code's project-level instruction. **It is not advisory — these rules are mandatory.**
1
+ # CLAUDE.md — Ciel v8
4
2
 
5
3
  **Core principle:** *"Understand before generating. Verify before claiming done."*
6
4
 
7
5
  ---
8
6
 
9
- ## Visibilite regle dure (VIOLATION = CRITICAL)
7
+ ## Regles dures (violation = CRITICAL)
8
+
9
+ 1. **Ne jamais inventer** — verifier API, package, version avant usage. Pas de citation = tu ne sais pas.
10
+ 2. **Test d'abord** — RED (test echoue) → GREEN (passe) → REFACTOR. Jamais de code sans test.
11
+ 3. **Zero secret** — pas de cle, token, ou mot de passe dans le code. Variables d'environnement uniquement.
12
+ 4. **Pas de placeholder** — pas de `// TODO`, pas de `// ...rest of code`. Tout code est complet ou absent.
13
+ 5. **Pipeline complet** — 17 etapes dans l'ordre. Ne saute jamais TESTER, RELIRE, ni PROUVER.
14
+ 6. **Pipeline invisible** — jamais de tableaux d'etapes, de "DOCS termine", de "Passons a QUOI", ni de comptes-rendus META dans la sortie visible. L'utilisateur voit les resultats, jamais la machinerie.
15
+ 7. **Skills obligatoires** — a chaque etape du pipeline, charger le skill workflow correspondant avec l'outil `Skill` (colonne "Skill a charger" dans le tableau). Ne jamais sauter un skill: son contenu n'est pas dans ta memoire d'entrainement, il est dans le fichier SKILL.md.
16
+
17
+ ---
18
+
19
+ ## Pipeline (17 etapes — a tracker en interne, jamais affiche)
20
+
21
+ Chaque etape a un skill workflow dedie a charger via `Skill` avant de l'executer.
22
+
23
+ | Step | Depth | Skill a charger | Action |
24
+ |------|-------|-----------------|--------|
25
+ | **DOCS** | All | `depth-classifier` | Lire AGENTS.md, CLAUDE.md, ciel-overlay.md, .ciel/map.json. Classifier la profondeur et ecrire le resultat (Trivial/Standard/Critical) dans `.ciel/last-depth`. Charger les skills domaine pertinents via `Skill`. |
26
+ | **QUOI** | All | `quoi-framer` | Objectif (1 phrase) + NOT-X + Definition of Done |
27
+ | **ASK** | Std/Crit | `ask-window` | `AskUserQuestion` si ambigu. Sinon DECIDE. |
28
+ | **AVEC QUOI** | Std/Crit | `avec-quoi-versioner` | Lire les versions installees (package.json) — pas la memoire |
29
+ | **DIVERGE** | Std/Crit | `diverge` | 2-3 approches differentes AVANT de choisir |
30
+ | **RECHERCHE** | Std/Crit | — | Dispatch `ciel-researcher` avec les skills domaine: docs officielles + anti-patterns + changelog |
31
+ | **SECURITE** | Critical | `stride-analyzer` | STRIDE 6 categories → `ciel-critic` MODE=CRITIQUER |
32
+ | **CODEBASE** | Std/Crit | — | Dispatch `ciel-explorer` avec les skills domaine: pattern fitness + data flow + git history |
33
+ | **EVALUER** | Std/Crit | `evaluer-sizer` | Sizing + 2 modes d'echec + contrefactuel |
34
+ | **ASK2** | Std/Crit | — | Valider le plan avec l'utilisateur avant de coder |
35
+ | **FAIRE** | All | `faire-gatekeeper` | 6 gates: test-first RED, alternatives, idiomatique, qualite, removal safety, boy-scout |
36
+ | **TESTER** | Std/Crit | — | Executer la suite de tests. RED? → FAIRE. GREEN? → continuer. Max 3 boucles. Commande: .ciel/map.json → package.json → Makefile |
37
+ | **ADR** | Decision | `adr-auto` | Si decision architecturale → `docs/adrs/` |
38
+ | **RELIRE** | Std/Crit | `relire-critic` | Dispatch `ciel-critic` MODE=RELIRE: 4 RISQUES + FIX/ACCEPT/DEFER |
39
+ | **PROUVER** | Std/Crit | `prouver-verifier` | Evidence AVANT/APRES + CI gate + issue comment gate |
40
+ | **MEMOIRE** | All | `memoire` | Capturer bugs decouverts, patterns appris, decisions utilisateur, anti-patterns detectes → `python3 .claude/hooks/memory-engine.py capture` |
41
+ | **META** | All | `meta-critiquer` | Reflection (10 items ci-dessous). Jamais dans la sortie visible. |
42
+
43
+ ---
44
+
45
+ ## Depth Gauge
46
+
47
+ | Level | Example | Pipeline |
48
+ |-------|---------|----------|
49
+ | **Trivial** | rename, typo, 1-liner | DOCS → QUOI → FAIRE → META |
50
+ | **Standard** | hook, route, component, service | 17 etapes completes |
51
+ | **Critical** | auth, DB schema, security, payment | 17 + STRIDE + `ciel-critic` obligatoire |
52
+ | **Spike** | POC, draft, experimental | QUOI → ASK → AVEC QUOI → DIVERGE → FAIRE (relaxe) → META |
53
+
54
+ Doute → Standard. Touche aux donnees utilisateur ou auth → Critical.
55
+
56
+ ---
10
57
 
11
- **Le pipeline est ta checklist mentale, pas un journal public.**
58
+ ## Subagent Dispatch (Standard/Critical avant tout Edit/Write)
12
59
 
13
- | Dans le THINKING (interne) | Dans la SORTIE VISIBLE |
14
- |---------------------------|----------------------|
15
- | Classification de profondeur | Resultat final |
16
- | Etapes du pipeline (DOCS, QUOI, DIVERGE...) | Informations pertinentes pour l'utilisateur |
17
- | Transitions d'etapes (in_progress > completed) | Diffs, preuves, erreurs, reponses |
18
- | TaskCreate/TaskUpdate | Jamais — c'est ta machinerie interne |
60
+ Ne jamais faire d'Edit/Write sur du code source avant d'avoir dispatche `ciel-researcher` + `ciel-explorer` en parallele. Le hook `pre-tool-write.sh` bloque les ecritures sur `.ts/.tsx/.js/.py/.go/.rs` (etc.) tant que le dispatch n'a pas eu lieu.
19
61
 
20
- **INTERDIT en sortie visible** :
21
- - Tableaux d'etapes de pipeline ("| Etape | Statut |")
22
- - Annonces de progression ("DOCS termine", "Passons a QUOI", "Maintenant FAIRE")
23
- - Listes numerotees des etapes completees
24
- - "Pipeline X/Y etapes complete"
25
- - "GATE DISPATCH effectue"
26
- - "[CIEL]" ou "[CIEL Depth:]" dans le texte visible
27
- - Comptes-rendus META visibles (les 10 items restent en thinking)
62
+ Si la tache est Trivial (rename, typo), utiliser `[CIEL_GATE_BYPASS]` dans l'input du tool pour passer le gate.
28
63
 
29
- **PERMIS en sortie visible** :
30
- - Resultats, reponses, diffs, logs
31
- - "PR mergee", "Workflow declenche", "VERSION mis a jour"
32
- - Questions a l'utilisateur (AskUserQuestion)
64
+ | Agent | Quand | Dispatch |
65
+ |-------|-------|----------|
66
+ | `ciel-researcher` | RECHERCHE | `Agent` subagent_type=`ciel-researcher` |
67
+ | `ciel-explorer` | CODEBASE | `Agent` subagent_type=`ciel-explorer` (en parallele avec researcher) |
68
+ | `ciel-critic` | RELIRE (Std/Crit), SECURITE (Crit) | `Agent` subagent_type=`ciel-critic` |
69
+ | `ciel-improver` | UNIQUEMENT /ciel-improve, /ciel-eval | `Agent` subagent_type=`ciel-improver` |
33
70
 
34
- **TaskCreate/TaskUpdate** : cree-les pour ton tracking interne, sans les narrer. L'utilisateur ne voit pas tes transitions de taches.
71
+ Prompt chercheur: `"Research: [topic]. Apply domain skills: [skill1], [skill2]. Installed: [version]. Goal: [quoi]."`
72
+ Prompt explorateur: `"Explore: [intention]. Apply domain skills: [skill1], [skill2]. Goal: [quoi]. NOT-X: [constraints]."`
73
+ Prompt critique: `"MODE: RELIRE. CHANGED_FILES: [list]. QUOI_GOAL: [quoi]. Apply domain skills: [skill1], [skill2]."`
35
74
 
36
75
  ---
37
76
 
38
- ## MANDATORY: How to start every task
77
+ ## Top 10 Guards
39
78
 
40
- 1. **Classify depth** using the Depth Gauge below
41
- 2. **Create TODO list** with `TaskCreate` one entry per pipeline step
42
- 3. **Mark current step `in_progress`** as you work
43
- 4. **Standard/Critical only: dispatch `ciel-researcher` + `ciel-explorer` in parallel BEFORE any Edit/Write** this is a hard gate, not a suggestion
44
- 5. **Complete all steps** for the classified depth before declaring done
45
- 6. **End with META** always, 10 items, non-negotiable
79
+ 1. **"I already know this" = red flag** → RESEARCH. Fais-le.
80
+ 2. **Pas de citation = tu ne sais pas** verifie avant d'affirmer.
81
+ 3. **Colonnes DB** verifier le vrai schema avant de query (fichier migration, pas memoire).
82
+ 4. **Pattern copie aveuglement** fitness check echoue. Verifie avant de copier.
83
+ 5. **Auto-critique dans le meme contexte** = memes angles morts dispatch `ciel-critic`.
84
+ 6. **Aucune alternative consideree** retour a EVALUER. Trouve 2-3 approches.
85
+ 7. **Scope drift a 3+ fichiers** → relire QUOI. Recentre-toi.
86
+ 8. **Test d'abord (RED)**, jamais apres. Toujours.
87
+ 9. **"No error in logs" ≠ preuve** → declenche le scenario, vois un signal positif.
88
+ 10. **Test suite doit passer** — execute la commande de test apres FAIRE. RED → corrige → re-run. Max 3 boucles puis escalade.
46
89
 
47
90
  ---
48
91
 
49
- ## Rules (immutable — do NOT skip)
50
-
51
- 0. **Visibilite** — pipeline 100% dans le thinking. Sortie visible = resultats uniquement. Pas de tableaux, pas d'annonces d'etapes, pas de "DOCS termine". L'utilisateur voit les resultats, jamais la machinerie.
52
- 1. **Pipeline interne** — classify depth and track step internally. Concise output.
53
- 2. **Pipeline** — follow the 16-step table below. Complete ALL steps for your depth. No shortcuts.
54
- 3. **TODO list** — use `TaskCreate` at the start of each task (one task per pipeline step). Mark each step `in_progress` before starting it, `completed` when done.
55
- 4. **ASK** — use AskUserQuestion tool ONLY if ambiguous. If context is sufficient, DECIDE and move on.
56
- 5. **Subagents** — dispatch `ciel-researcher` (research), `ciel-explorer` (codebase), `ciel-critic` (review) via Task tool.
57
- 6. **TEST-FIRST (RED)** — write tests BEFORE source code. Never the reverse.
58
- 7. **SELF-CHECK** — after each step, verify: did I do DOCS? QUOI? ASK? DIVERGE? RECHERCHE?
59
- 8. **META** — post-task reflection always, non-negotiable. 10 items.
60
-
61
- ## Pipeline (16 steps)
62
-
63
- | Step | Depth | Action |
64
- |------|-------|--------|
65
- | **DOCS** | All | Read AGENTS.md, CLAUDE.md, ciel-overlay.md, .ciel/map.json, .ciel/memory.json |
66
- | **QUOI** | All | Goal (1 sentence) + NOT-X + Definition of Done |
67
- | **ASK** | Std/Crit | `AskUserQuestion` if ambiguous. Otherwise DECIDE. |
68
- | **AVEC QUOI** | Std/Crit | Read installed versions (package.json) — not memory |
69
- | **DIVERGE** | Std/Crit | 2-3 different approaches BEFORE choosing |
70
- | **RECHERCHE** | Std/Crit | Dispatch `ciel-researcher`: official docs + anti-patterns + changelog |
71
- | **SECURITE** | Critical | STRIDE 6 categories → `ciel-critic` MODE=CRITIQUER |
72
- | **CODEBASE** | Std/Crit | Dispatch `ciel-explorer`: pattern fitness + data flow + git history |
73
- | **EVALUER** | Std/Crit | Sizing + 2 failure modes + counterfactual |
74
- | **ASK2** | Std/Crit | Validate plan with user before coding |
75
- | **FAIRE** | All | Test-first RED + alternatives + idiomatic |
76
- | **ADR** | Decision | If architectural decision → `docs/adrs/` |
77
- | **RELIRE** | Std/Crit | Dispatch `ciel-critic` MODE=RELIRE: 3 RISKS + FIX/ACCEPT/DEFER |
78
- | **PROUVER** | Std/Crit | BEFORE/AFTER evidence + CI gate |
79
- | **MEMOIRE** | All | Cued-recall: capture interventions/decisions to .ciel/memory/episodes/ + update index.json (see skill `memoire`, ADR-0001) |
80
- | **META** | All | Post-task reflection (10 items) |
92
+ ## Cued-recall memory
81
93
 
82
- ## Depth Gauge
94
+ Ecrire dans `.ciel/memory/episodes/` via `memory-engine.py capture`. Ne jamais ecrire dans le Claude Code auto-memory (`MEMORY.md`). Confirmer avec `AskUserQuestion` avant chaque capture.
83
95
 
84
- | Level | Example | Pipeline |
85
- |-------|---------|----------|
86
- | **Trivial** | rename, typo, 1-liner | QUOI → FAIRE → META |
87
- | **Standard** | hook, route, component, service | Full 16 steps |
88
- | **Critical** | auth, DB schema, security, payment | Full + STRIDE + `ciel-critic` mandatory |
89
- | **Spike** | POC, draft, experimental | QUOI → ASK → AVEC QUOI → DIVERGE → FAIRE (relaxed) → META |
96
+ ---
90
97
 
91
- Unsure Standard. Touching user data or auth Critical.
98
+ ## META 10 items de reflexion (interne, jamais visible)
92
99
 
93
- ## Top 10 Guards
100
+ A la fin de chaque tache, charger `meta-critiquer` et repondre a ces 10 questions DANS LE THINKING:
101
+
102
+ 1. Depth match — la classification etait-elle correcte ? Sinon, quel indice a ete manque ?
103
+ 2. Pipeline — etape sautee ou baclee ? Laquelle ?
104
+ 3. Skill manquant — un skill domaine aurait-il du etre charge et ne l'a pas ete ?
105
+ 4. Subagent — un dispatch a-t-il ete oublie ? (researcher/explorer en parallele)
106
+ 5. RELIRE — le critique a-t-il trouve quelque chose que je n'avais pas vu ?
107
+ 6. PROUVER — l'evidence est-elle concrete (log/curl/screenshot) ou juste "no error" ?
108
+ 7. MEMOIRE — y a-t-il une intervention, decision, ou decouverte a capturer ?
109
+ 8. Contrefactuel — qu'aurais-je fait differemment avec 2x plus de temps ?
110
+ 9. Angle mort — qu'ai-je omis que l'utilisateur va probablement me demander ensuite ?
111
+ 10. Lecon — 1 phrase a memoriser pour la prochaine tache similaire
112
+
113
+ ---
94
114
 
95
- 1. **"I already know this" = red flag** → need RESEARCH. Do it.
96
- 2. **Verify before asserting** — no citation = you don't know. Don't guess.
97
- 3. **DB columns** verify real schema before query (migration file, not memory).
98
- 4. **Test URL host:port** must match handler host:port. Verify.
99
- 5. **Pattern copied blindly** → fitness check fails. Verify before copying.
100
- 6. **Self-critique in same context** = same blind spots dispatch `ciel-critic`.
101
- 7. **No alternative considered** → back to EVALUER. Find 2-3 approaches.
102
- 8. **Scope drift at 3+ files** → re-read QUOI. Re-center.
103
- 9. **Write test FIRST (RED)**, not after. Always.
104
- 10. **"No error in logs" ≠ proof** → trigger scenario, see positive signal.
105
-
106
- ## Subagent Dispatch (MANDATORY for Standard/Critical)
107
-
108
- **Rule**: Dispatch BOTH `ciel-researcher` + `ciel-explorer` **IN PARALLEL** before writing any code on Standard/Critical tasks.
109
-
110
- | Agent | When | Via | In parallel with |
111
- |-------|------|-----|-----------------|
112
- | `ciel-researcher` | RECHERCHE (Std/Crit) | `task` subagent_type=`ciel-researcher` | `ciel-explorer` |
113
- | `ciel-explorer` | CODEBASE (Std/Crit) | `task` subagent_type=`ciel-explorer` | `ciel-researcher` |
114
- | `ciel-critic` (RELIRE) | RELIRE after FAIRE (Std/Crit) | `task` subagent_type=`ciel-critic` | — |
115
- | `ciel-critic` (CRITIQUER) | SECURITE (Critical only) | `task` subagent_type=`ciel-critic` | — |
116
- | `ciel-improver` | ONLY on /ciel-improve, /ciel-eval | `task` subagent_type=`ciel-improver` | — |
117
-
118
- **IMPORTANT**: If a subagent dispatch fails (`ProviderModelNotFoundError`), fall back to inline research/exploration. Do NOT skip the step.
119
-
120
- ## Skills reference
121
-
122
- - **Workflow**: `depth-classifier`, `quoi-framer`, `avec-quoi-versioner`, `diverge`, `evaluer-sizer`, `faire-gatekeeper`, `prouver-verifier`, `memoire`, `memoire-consolidator`, `meta-critiquer`
123
- - **Security**: `stride-analyzer`, `security-hardening`, `security-regression-check` (Critical only)
124
- - **Domain**: `frontend-mastery`, `backend-mastery`, `database-mastery`, `api-architecture`, `performance-engineering`
125
- - **Utility**: `pr-opener`, `commit-writer`, `branch-setup`, `issue-creator`, `issue-closer`
126
-
127
- ## Hooks (automatic — configured in .claude/settings.json)
128
-
129
- | Hook | Trigger | Action |
130
- |------|---------|--------|
131
- | `check-test-first.sh` | Before Edit/Write | Warns if source file has no test |
132
- | `block-destructive.sh` | Before `rm *` | Blocks destructive commands |
133
- | `track-file.sh` | After Edit/Write | Tracks changed files for RELIRE |
134
- | `meta-critiquer.sh` | SubagentStop | Triggers post-task reflection |
135
- | `user-prompt-submit.sh` | UserPromptSubmit | Depth hint + intervention pattern detection (proposes capture to cued-recall memory) |
136
- | `session-start.sh` | SessionStart | Loads overlay + lists active cued-recall memories from `.ciel/memory/index.json` |
137
- | `memory-bootstrap.sh` | Manual (via `/ciel-memory-bootstrap`) | Scans project for ingestable tribal docs (lessons.md, ciel-overlay.md, .claude/rules/, etc.) |
138
-
139
- ## Cued-recall memory (`.ciel/memory/`)
140
-
141
- The MEMOIRE step writes to a structured corpus that auto-replays when context cues match. See `docs/adrs/0001-cued-recall-memory.md` for the full design.
142
-
143
- | Concept | Where |
144
- |---------|-------|
145
- | Capture flow (intervention → episode) | `hooks/user-prompt-submit.sh` + skill `memoire` |
146
- | Recall flow (cue → memory injection) | `hooks/session-start.sh` |
147
- | Bootstrap from existing tribal docs | `/ciel-memory-bootstrap` slash command |
148
- | Periodic maintenance (promote/merge/decay) | skill `memoire-consolidator` |
149
-
150
- **Token budget by depth**: Trivial 1K / Standard 3K / Critical 5K injected memory tokens. Index is small; content is read on-demand by the model when a cue fires.
151
-
152
- **Capture is never auto-silent** — the model surfaces a confirmation question to the user before writing a memory.
153
-
154
- ### Ciel memory ≠ Claude Code auto-memory (HARD ROUTING RULE)
155
-
156
- Claude Code ships an independent **auto-memory** system (`~/.claude/projects/<slug>/memory/MEMORY.md`) that is **NOT** the Ciel cued-recall corpus. They are different stores with different scopes, formats, and consumers.
157
-
158
- | | Ciel cued-recall | Claude Code auto-memory |
159
- |--|--|--|
160
- | Location | `.ciel/memory/episodes/` (in repo) | `~/.claude/projects/<slug>/memory/MEMORY.md` (per machine, outside repo) |
161
- | Portable | ✅ ships with the project | ❌ machine-local, lost on `git clone` |
162
- | Seen by `/ciel-audit` | ✅ Dim 9 reads `index.json` | ❌ invisible |
163
- | Cued retrieval | ✅ auto-replays on path/symbol/intent match | ❌ broad context injection only |
164
- | Write API | `python3 hooks/memory-engine.py capture …` | Internal Claude Code tool |
165
-
166
- **Routing rule (mandatory)**: when the user says "save to memory", "remember this", "put it in memory", "mémoire", "retiens", "enregistre", "garde en mémoire", or any synonym in any language:
167
-
168
- 1. The target is **always** `.ciel/memory/episodes/` via `memory-engine.py capture` — never the Claude Code auto-memory.
169
- 2. Confirm with `AskUserQuestion` first (capture is never silent — see ADR-0001).
170
- 3. The `UserPromptSubmit` hook surfaces `CAPTURE GATE: …` when the phrasing matches — follow it.
171
- 4. If `autoMemoryEnabled` is `true` in `.claude/settings.json` and you find yourself tempted to write to `MEMORY.md`, **STOP**. That setting is opt-in and not used by Ciel. The Ciel template ships with it disabled.
172
-
173
- ## Common failures to avoid
174
-
175
- These are the most frequently skipped pipeline steps. Do NOT fall into these traps:
176
-
177
- | Failure | When it happens | Fix |
178
- |---------|----------------|------|
179
- | **No DOCS** | Starting a task without reading project state | Always read `.ciel/map.json` + `ciel-overlay.md` first |
180
- | **No QUOI** | Coding without defining the goal + constraints | State "Goal (1 sentence) + NOT-X + DoD" before touching code |
181
- | **No DIVERGE** | Using the first approach that comes to mind | Generate 2-3 alternatives before picking one |
182
- | **No subagents** | Doing research/exploration inline instead of dispatching | Dispatch `ciel-researcher` + `ciel-explorer` in parallel — **before any Edit/Write on Standard/Critical** |
183
- | **No RELIRE** | Merging without a hostile code review | Always dispatch `ciel-critic` MODE=RELIRE before merge |
184
- | **RELIRE skipped on multi-file edit** | ≥2 Edit calls made without ciel-critic | Any session touching ≥2 files at Standard depth requires ciel-critic dispatch |
185
- | **No PROUVER** | Claiming done without evidence | Show BEFORE/AFTER evidence (logs, curl, screenshot) |
186
- | **No MEMOIRE** | Losing state between sessions | Save `.ciel/map.json` + `.ciel/memory.json` at task end |
187
- | **No META** | Skipping reflection | Always run META (10 items) — it closes the feedback loop |
188
- | **Pipeline visible** | Displaying pipeline steps, tables, or progress to the user | Pipeline lives in thinking ONLY. User sees results, never the machinery. |
189
-
190
- **Self-check**: After each step, ask yourself: "Did I just skip a pipeline step?" If yes, go back and do it.
191
-
192
- ## MCP integration (opt-in)
193
-
194
- Ciel supports Playwright (visual critique) and Context7 (live docs) via MCP. Register:
195
- ```bash
196
- bash install.sh --with-mcp=playwright,context7
197
- ```
115
+ ## Echecs frequents
116
+
117
+ - **Pas de DOCS** toujours lire `.ciel/map.json` + `ciel-overlay.md` en premier
118
+ - **Pas de QUOI** definir objectif + NOT-X + DoD avant de toucher au code
119
+ - **Pas de DIVERGE** → generer 2-3 alternatives avant d'en choisir une
120
+ - **Pas de subagents** dispatcher researcher + explorer en parallele avant tout Edit/Write
121
+ - **Pas de RELIRE** → toujours dispatcher `ciel-critic` MODE=RELIRE avant merge
122
+ - **Pas de PROUVER** → montrer evidence AVANT/APRES (logs, curl, screenshot)
123
+ - **Pas de MEMOIRE** sauver `.ciel/map.json` et capturer a `.ciel/memory/` en fin de tache
124
+ - **Pas de META** → toujours executer la reflection (10 items)
125
+ - **Pipeline visible** → le pipeline est dans le thinking UNIQUEMENT