@thierrynakoa/fire-flow 10.0.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 (215) hide show
  1. package/.claude-plugin/plugin.json +64 -0
  2. package/ARCHITECTURE-DIAGRAM.md +440 -0
  3. package/COMMAND-REFERENCE.md +172 -0
  4. package/DOMINION-FLOW-OVERVIEW.md +421 -0
  5. package/LICENSE +21 -0
  6. package/QUICK-START.md +351 -0
  7. package/README.md +398 -0
  8. package/TROUBLESHOOTING.md +264 -0
  9. package/agents/fire-codebase-mapper.md +484 -0
  10. package/agents/fire-debugger.md +535 -0
  11. package/agents/fire-executor.md +949 -0
  12. package/agents/fire-fact-checker.md +276 -0
  13. package/agents/fire-learncoding-explainer.md +237 -0
  14. package/agents/fire-learncoding-walker.md +147 -0
  15. package/agents/fire-planner.md +675 -0
  16. package/agents/fire-project-researcher.md +155 -0
  17. package/agents/fire-research-synthesizer.md +166 -0
  18. package/agents/fire-researcher.md +723 -0
  19. package/agents/fire-reviewer.md +499 -0
  20. package/agents/fire-roadmapper.md +203 -0
  21. package/agents/fire-verifier.md +880 -0
  22. package/bin/cli.js +208 -0
  23. package/commands/fire-0-orient.md +476 -0
  24. package/commands/fire-1-new.md +281 -0
  25. package/commands/fire-1a-discuss.md +455 -0
  26. package/commands/fire-2-plan.md +527 -0
  27. package/commands/fire-3-execute.md +1303 -0
  28. package/commands/fire-4-verify.md +845 -0
  29. package/commands/fire-5-handoff.md +515 -0
  30. package/commands/fire-6-resume.md +501 -0
  31. package/commands/fire-7-review.md +409 -0
  32. package/commands/fire-add-new-skill.md +598 -0
  33. package/commands/fire-analytics.md +499 -0
  34. package/commands/fire-assumptions.md +78 -0
  35. package/commands/fire-autonomous.md +528 -0
  36. package/commands/fire-brainstorm.md +413 -0
  37. package/commands/fire-complete-milestone.md +270 -0
  38. package/commands/fire-dashboard.md +375 -0
  39. package/commands/fire-debug.md +663 -0
  40. package/commands/fire-discover.md +616 -0
  41. package/commands/fire-double-check.md +460 -0
  42. package/commands/fire-execute-plan.md +182 -0
  43. package/commands/fire-learncoding.md +242 -0
  44. package/commands/fire-loop-resume.md +272 -0
  45. package/commands/fire-loop-stop.md +198 -0
  46. package/commands/fire-loop.md +1168 -0
  47. package/commands/fire-map-codebase.md +313 -0
  48. package/commands/fire-new-milestone.md +356 -0
  49. package/commands/fire-reflect.md +235 -0
  50. package/commands/fire-research.md +246 -0
  51. package/commands/fire-search.md +330 -0
  52. package/commands/fire-security-audit-repo.md +293 -0
  53. package/commands/fire-security-scan.md +484 -0
  54. package/commands/fire-session-summary.md +252 -0
  55. package/commands/fire-skills-diff.md +506 -0
  56. package/commands/fire-skills-history.md +388 -0
  57. package/commands/fire-skills-rollback.md +408 -0
  58. package/commands/fire-skills-sync.md +470 -0
  59. package/commands/fire-test.md +520 -0
  60. package/commands/fire-todos.md +335 -0
  61. package/commands/fire-transition.md +186 -0
  62. package/commands/fire-update.md +312 -0
  63. package/commands/fire-verify-uat.md +146 -0
  64. package/commands/fire-vuln-scan.md +493 -0
  65. package/hooks/hooks.json +16 -0
  66. package/hooks/run-hook.cmd +69 -0
  67. package/hooks/run-hook.sh +8 -0
  68. package/hooks/run-session-end.cmd +49 -0
  69. package/hooks/run-session-end.sh +7 -0
  70. package/hooks/session-end.sh +90 -0
  71. package/hooks/session-start.sh +111 -0
  72. package/package.json +52 -0
  73. package/plugin.json +7 -0
  74. package/references/auto-skill-extraction.md +136 -0
  75. package/references/behavioral-directives.md +365 -0
  76. package/references/blocker-tracking.md +155 -0
  77. package/references/checkpoints.md +165 -0
  78. package/references/circuit-breaker.md +410 -0
  79. package/references/context-engineering.md +587 -0
  80. package/references/decision-time-guidance.md +289 -0
  81. package/references/error-classification.md +326 -0
  82. package/references/execution-mode-intelligence.md +242 -0
  83. package/references/git-integration.md +217 -0
  84. package/references/honesty-protocols.md +304 -0
  85. package/references/integration-architecture.md +470 -0
  86. package/references/issue-to-pr-pipeline.md +150 -0
  87. package/references/metrics-and-trends.md +234 -0
  88. package/references/playwright-e2e-testing.md +326 -0
  89. package/references/questioning.md +125 -0
  90. package/references/research-improvements.md +110 -0
  91. package/references/skills-usage-guide.md +429 -0
  92. package/references/tdd.md +131 -0
  93. package/references/testing-enforcement.md +192 -0
  94. package/references/ui-brand.md +383 -0
  95. package/references/validation-checklist.md +456 -0
  96. package/references/verification-patterns.md +187 -0
  97. package/references/warrior-principles.md +173 -0
  98. package/skills-library/SKILLS-INDEX.md +588 -0
  99. package/skills-library/_general/frontend/html-visual-reports.md +292 -0
  100. package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -0
  101. package/skills-library/_general/methodology/learncoding-agentic-pattern.md +114 -0
  102. package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +238 -0
  103. package/skills-library/basics/api-rest-basics.md +162 -0
  104. package/skills-library/basics/env-variables.md +96 -0
  105. package/skills-library/basics/error-handling-basics.md +125 -0
  106. package/skills-library/basics/git-commit-conventions.md +106 -0
  107. package/skills-library/basics/readme-template.md +108 -0
  108. package/skills-library/common-tasks/async-await-patterns.md +157 -0
  109. package/skills-library/common-tasks/auth-jwt-basics.md +164 -0
  110. package/skills-library/common-tasks/database-schema-design.md +166 -0
  111. package/skills-library/common-tasks/file-upload-basics.md +166 -0
  112. package/skills-library/common-tasks/form-validation.md +159 -0
  113. package/skills-library/debugging/FAILURE_TAXONOMY_CLASSIFICATION.md +117 -0
  114. package/skills-library/debugging/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +86 -0
  115. package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +678 -0
  116. package/skills-library/methodology/CONFIDENCE_GATED_EXECUTION.md +243 -0
  117. package/skills-library/methodology/EVIDENCE_BASED_VALIDATION.md +308 -0
  118. package/skills-library/methodology/MULTI_PERSPECTIVE_CODE_REVIEW.md +330 -0
  119. package/skills-library/methodology/PATH_VERIFICATION_GATE.md +211 -0
  120. package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +183 -0
  121. package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +263 -0
  122. package/skills-library/methodology/SABBATH_REST_PATTERN.md +267 -0
  123. package/skills-library/methodology/STONE_AND_SCAFFOLD.md +220 -0
  124. package/skills-library/performance/cache-augmented-generation.md +172 -0
  125. package/skills-library/quality-safety/debugging-steps.md +147 -0
  126. package/skills-library/quality-safety/deployment-checklist.md +155 -0
  127. package/skills-library/quality-safety/security-checklist.md +204 -0
  128. package/skills-library/quality-safety/testing-basics.md +180 -0
  129. package/skills-library/security/agent-security-scanner.md +445 -0
  130. package/skills-library/specialists/api-architecture/api-designer.md +49 -0
  131. package/skills-library/specialists/api-architecture/graphql-architect.md +49 -0
  132. package/skills-library/specialists/api-architecture/mcp-developer.md +51 -0
  133. package/skills-library/specialists/api-architecture/microservices-architect.md +50 -0
  134. package/skills-library/specialists/api-architecture/websocket-engineer.md +48 -0
  135. package/skills-library/specialists/backend/django-expert.md +52 -0
  136. package/skills-library/specialists/backend/fastapi-expert.md +52 -0
  137. package/skills-library/specialists/backend/laravel-specialist.md +52 -0
  138. package/skills-library/specialists/backend/nestjs-expert.md +51 -0
  139. package/skills-library/specialists/backend/rails-expert.md +53 -0
  140. package/skills-library/specialists/backend/spring-boot-engineer.md +56 -0
  141. package/skills-library/specialists/data-ml/fine-tuning-expert.md +48 -0
  142. package/skills-library/specialists/data-ml/ml-pipeline.md +47 -0
  143. package/skills-library/specialists/data-ml/pandas-pro.md +47 -0
  144. package/skills-library/specialists/data-ml/rag-architect.md +51 -0
  145. package/skills-library/specialists/data-ml/spark-engineer.md +47 -0
  146. package/skills-library/specialists/frontend/angular-architect.md +52 -0
  147. package/skills-library/specialists/frontend/flutter-expert.md +51 -0
  148. package/skills-library/specialists/frontend/nextjs-developer.md +54 -0
  149. package/skills-library/specialists/frontend/react-native-expert.md +50 -0
  150. package/skills-library/specialists/frontend/vue-expert.md +51 -0
  151. package/skills-library/specialists/infrastructure/chaos-engineer.md +74 -0
  152. package/skills-library/specialists/infrastructure/cloud-architect.md +70 -0
  153. package/skills-library/specialists/infrastructure/database-optimizer.md +64 -0
  154. package/skills-library/specialists/infrastructure/devops-engineer.md +70 -0
  155. package/skills-library/specialists/infrastructure/kubernetes-specialist.md +52 -0
  156. package/skills-library/specialists/infrastructure/monitoring-expert.md +70 -0
  157. package/skills-library/specialists/infrastructure/sre-engineer.md +70 -0
  158. package/skills-library/specialists/infrastructure/terraform-engineer.md +51 -0
  159. package/skills-library/specialists/languages/cpp-pro.md +74 -0
  160. package/skills-library/specialists/languages/csharp-developer.md +69 -0
  161. package/skills-library/specialists/languages/dotnet-core-expert.md +54 -0
  162. package/skills-library/specialists/languages/golang-pro.md +51 -0
  163. package/skills-library/specialists/languages/java-architect.md +49 -0
  164. package/skills-library/specialists/languages/javascript-pro.md +68 -0
  165. package/skills-library/specialists/languages/kotlin-specialist.md +68 -0
  166. package/skills-library/specialists/languages/php-pro.md +49 -0
  167. package/skills-library/specialists/languages/python-pro.md +52 -0
  168. package/skills-library/specialists/languages/react-expert.md +51 -0
  169. package/skills-library/specialists/languages/rust-engineer.md +50 -0
  170. package/skills-library/specialists/languages/sql-pro.md +56 -0
  171. package/skills-library/specialists/languages/swift-expert.md +69 -0
  172. package/skills-library/specialists/languages/typescript-pro.md +51 -0
  173. package/skills-library/specialists/platform/atlassian-mcp.md +52 -0
  174. package/skills-library/specialists/platform/embedded-systems.md +53 -0
  175. package/skills-library/specialists/platform/game-developer.md +53 -0
  176. package/skills-library/specialists/platform/salesforce-developer.md +53 -0
  177. package/skills-library/specialists/platform/shopify-expert.md +49 -0
  178. package/skills-library/specialists/platform/wordpress-pro.md +49 -0
  179. package/skills-library/specialists/quality/code-documenter.md +51 -0
  180. package/skills-library/specialists/quality/code-reviewer.md +67 -0
  181. package/skills-library/specialists/quality/debugging-wizard.md +51 -0
  182. package/skills-library/specialists/quality/fullstack-guardian.md +51 -0
  183. package/skills-library/specialists/quality/legacy-modernizer.md +50 -0
  184. package/skills-library/specialists/quality/playwright-expert.md +65 -0
  185. package/skills-library/specialists/quality/spec-miner.md +56 -0
  186. package/skills-library/specialists/quality/test-master.md +65 -0
  187. package/skills-library/specialists/security/secure-code-guardian.md +55 -0
  188. package/skills-library/specialists/security/security-reviewer.md +53 -0
  189. package/skills-library/specialists/workflow/architecture-designer.md +53 -0
  190. package/skills-library/specialists/workflow/cli-developer.md +70 -0
  191. package/skills-library/specialists/workflow/feature-forge.md +65 -0
  192. package/skills-library/specialists/workflow/prompt-engineer.md +54 -0
  193. package/skills-library/specialists/workflow/the-fool.md +62 -0
  194. package/templates/ASSUMPTIONS.md +125 -0
  195. package/templates/BLOCKERS.md +73 -0
  196. package/templates/DECISION_LOG.md +116 -0
  197. package/templates/UAT.md +96 -0
  198. package/templates/blueprint.md +94 -0
  199. package/templates/brainstorm.md +185 -0
  200. package/templates/conscience.md +92 -0
  201. package/templates/fire-handoff.md +159 -0
  202. package/templates/metrics.md +67 -0
  203. package/templates/phase-prompt.md +142 -0
  204. package/templates/record.md +131 -0
  205. package/templates/review-report.md +117 -0
  206. package/templates/skills-index.md +157 -0
  207. package/templates/verification.md +149 -0
  208. package/templates/vision.md +79 -0
  209. package/validation-config.yml +793 -0
  210. package/version.json +7 -0
  211. package/workflows/execute-phase.md +732 -0
  212. package/workflows/handoff-session.md +678 -0
  213. package/workflows/new-project.md +578 -0
  214. package/workflows/plan-phase.md +592 -0
  215. package/workflows/verify-phase.md +874 -0
@@ -0,0 +1,365 @@
1
+ # Behavioral Directives
2
+
3
+ > Self-modifying behavioral rules in predicate format that evolve based on experience. Inspired by CoALA's procedural memory, SICA's self-improving coding agent (ICLR 2025), and MPR's predicate-form memory (Sep 2025).
4
+
5
+ **How it works:** Rules progress through Proposed (confidence 1/5) → Active (confidence 3+/5). Each session confirmation increments confidence. Rules that prove wrong get Retired with a reason.
6
+
7
+ **Format (v7.0 — MPR):** Rules use predicate format (`IF condition THEN action BECAUSE justification`) for mechanical applicability. Anti-patterns use `IF condition DONT action BECAUSE justification`.
8
+
9
+ ---
10
+
11
+ ## Active Rules
12
+
13
+ <!-- Seed rules — proven patterns from Dominion Flow v1-v5, converted to predicate format in v7.0 -->
14
+
15
+ ### Rule 1
16
+ - **IF:** About to perform file operations (create, edit, delete)
17
+ - **THEN:** Verify working directory matches expected project path
18
+ - **BECAUSE:** Cross-project contamination destroys work in wrong repo
19
+ - **Source:** v5.0 | **Confidence:** 5/5 | **Last applied:** 2026-02-21
20
+
21
+ ### Rule 2
22
+ - **IF:** Writing SQL queries with user input
23
+ - **THEN:** Use parameterized queries, never string interpolation
24
+ - **BECAUSE:** SQL injection is OWASP #1 vulnerability
25
+ - **Source:** v5.0 | **Confidence:** 5/5 | **Last applied:** 2026-02-21
26
+
27
+ ### Rule 3
28
+ - **IF:** About to write a new function, component, or module
29
+ - **THEN:** Check for existing implementations before writing new code
30
+ - **BECAUSE:** Prevents duplication and leverages proven solutions
31
+ - **Source:** v5.0 | **Confidence:** 5/5 | **Last applied:** 2026-02-21
32
+
33
+ ### Rule 4
34
+ - **IF:** About to edit a file
35
+ - **THEN:** Read the file first — never edit blind
36
+ - **BECAUSE:** Files have complex structure; editing without context causes errors
37
+ - **Source:** v5.0 | **Confidence:** 5/5 | **Last applied:** 2026-02-21
38
+
39
+ ### Rule 5
40
+ - **IF:** Code change has been made
41
+ - **THEN:** Run tests after every code change, not just at the end
42
+ - **BECAUSE:** Early test failures catch bugs before they compound
43
+ - **Source:** v4.0 | **Confidence:** 4/5 | **Last applied:** 2026-02-21
44
+
45
+ ### Rule 6
46
+ - **IF:** A logical unit of work is complete
47
+ - **THEN:** Commit after each logical unit, not in bulk
48
+ - **BECAUSE:** Granular commits enable targeted rollback and clear history
49
+ - **Source:** v4.0 | **Confidence:** 4/5 | **Last applied:** 2026-02-17
50
+
51
+ ### Rule 7
52
+ - **IF:** Debugging a failing test or runtime error
53
+ - **THEN:** Eliminate hypotheses with evidence before proposing fixes
54
+ - **BECAUSE:** Premature fixes mask root causes and waste time
55
+ - **Source:** v5.0 | **Confidence:** 5/5 | **Last applied:** 2026-02-21
56
+
57
+ ### Rule 8
58
+ - **IF:** About to use a third-party package in code
59
+ - **THEN:** Check package.json first — never assume a dependency is installed
60
+ - **BECAUSE:** Missing dependencies cause cryptic runtime errors
61
+ - **Source:** v3.0 | **Confidence:** 4/5 | **Last applied:** 2026-02-17
62
+
63
+ ### Rule 9
64
+ - **IF:** Facing a non-trivial technical problem
65
+ - **THEN:** Search the skills library before solving from scratch
66
+ - **BECAUSE:** Someone may have already solved this — reuse > reinvent
67
+ - **Source:** v4.0 | **Confidence:** 4/5 | **Last applied:** 2026-02-21
68
+
69
+ ### Rule 10
70
+ - **IF:** Context compaction is about to trigger
71
+ - **THEN:** Preserve stop signals — errors and BLOCKED indicators must survive summarization
72
+ - **BECAUSE:** Compaction smooths over failure signals, extending stuck loops by ~15%
73
+ - **Source:** v6.0 (JetBrains Dec 2025) | **Confidence:** 3/5 | **Last applied:** 2026-02-21
74
+
75
+ ### Rule 11
76
+ - **IF:** Code review finds CRITICAL or 3+ HIGH findings
77
+ - **THEN:** Do NOT present work to human for testing
78
+ - **BECAUSE:** Shipping critical issues wastes human testing time and erodes trust
79
+ - **Source:** v8.0 | **Confidence:** 5/5 | **Last applied:** —
80
+
81
+ ### Rule 12
82
+ - **IF:** Writing a new helper, utility, or abstraction
83
+ - **THEN:** Verify it has 2+ callers; delete if only 1
84
+ - **BECAUSE:** Single-use abstractions add complexity without value. Three similar lines > premature abstraction.
85
+ - **Source:** v8.0 | **Confidence:** 4/5 | **Last applied:** —
86
+
87
+ ---
88
+
89
+ ## Anti-Patterns (v7.0 — What NOT to Do)
90
+
91
+ ### Anti-Pattern 1
92
+ - **IF:** Debugging a failing test
93
+ - **DONT:** Modify the test to make it pass without understanding the root cause
94
+ - **BECAUSE:** Masks the real bug, creates false confidence in passing tests
95
+ - **Source:** v5.0 | **Confidence:** 5/5
96
+
97
+ ### Anti-Pattern 2
98
+ - **IF:** An API call returns an error
99
+ - **DONT:** Wrap it in a try/catch that silently swallows the error
100
+ - **BECAUSE:** Silent failures are invisible; they compound into data corruption
101
+ - **Source:** v5.0 | **Confidence:** 5/5
102
+
103
+ ### Anti-Pattern 3
104
+ - **IF:** A loop iteration is stuck with the same error
105
+ - **DONT:** Retry the same approach more than 3 times
106
+ - **BECAUSE:** Repeating a failed approach wastes context and never produces different results
107
+ - **Source:** v4.0 | **Confidence:** 4/5
108
+
109
+ ### Anti-Pattern 4
110
+ - **IF:** Qdrant JS client throws an error
111
+ - **DONT:** Assume standard Error shape with `.message` property
112
+ - **BECAUSE:** Qdrant client throws ApiError with `.status` and `.data.status.error`, not `.message`
113
+ - **Source:** v6.0 | **Confidence:** 3/5
114
+
115
+ ### Anti-Pattern 5
116
+ - **IF:** Code works and passes tests
117
+ - **DONT:** Add extra error handling, feature flags, or backwards-compat for scenarios that can't happen
118
+ - **BECAUSE:** Defensive code for impossible scenarios is over-engineering, not safety
119
+ - **Source:** v8.0 | **Confidence:** 4/5
120
+
121
+ ---
122
+
123
+ ## Proposed Rules (Need 3 confirmations to activate)
124
+
125
+ <!-- Rules suggested by sessions but not yet confirmed -->
126
+ <!-- Format: predicate format with IF/THEN/BECAUSE, Source, Confidence, First proposed date -->
127
+
128
+ ---
129
+
130
+ ## Retired Rules (Superseded or wrong)
131
+
132
+ <!-- Rules that were deactivated with reason -->
133
+ <!-- Format: **Rule** — Retired: {date}, Reason: {why it was wrong or superseded} -->
134
+
135
+ ---
136
+
137
+ ## How Rules Evolve
138
+
139
+ ```
140
+ NEW INSIGHT discovered during task resolution
141
+
142
+ ├── Check: Does similar directive exist?
143
+ │ ├── YES (in Active) → Skip (already known)
144
+ │ ├── YES (in Proposed) → Increment confidence
145
+ │ │ └── If confidence reaches 3/5 → Promote to Active
146
+ │ └── NO → Add to Proposed with confidence 1/5
147
+
148
+ └── Check: Did an Active rule prove wrong?
149
+ └── YES → Move to Retired with reason
150
+ ```
151
+
152
+ ### Hard Admissibility Check (v7.0 — MPR)
153
+
154
+ > **Research basis:** MPR (Sep 2025) — Predicate-form rules with hard admissibility checks
155
+ > prevent known-bad actions before they execute, not after.
156
+
157
+ ```
158
+ Before executing any action, scan Active Rules + Anti-Patterns:
159
+
160
+ For each rule where IF condition matches current context:
161
+ IF rule is positive (THEN) → inject action into working instructions
162
+ IF rule is anti-pattern (DONT) → inject explicit warning
163
+
164
+ HAC (Hard Admissibility Check):
165
+ IF an Active Rule with confidence 5/5 explicitly prohibits the planned action:
166
+ → BLOCK execution
167
+ → Display: "HAC BLOCK: Rule {N} prohibits this action: {rule statement}"
168
+ → Require explicit user override to proceed
169
+
170
+ HAC applies to anti-patterns too:
171
+ IF an Anti-Pattern with confidence 5/5 matches the planned action:
172
+ → BLOCK execution
173
+ → Display: "HAC BLOCK: Anti-Pattern {N}: {DONT statement}"
174
+ ```
175
+
176
+ **Trigger points:**
177
+ - After task resolution in `/fire-loop` (Step 8.5)
178
+ - After debug resolution in `/fire-debug` (Step 7.75)
179
+ - After verification failures in `/fire-4-verify`
180
+ - During handoff creation in `/fire-5-handoff` (F section review)
181
+
182
+ ---
183
+
184
+ ## Version Performance Registry (v8.0)
185
+
186
+ > Track outcomes per version. When rules cause more harm than good, the data proves it.
187
+
188
+ ### How It Works
189
+
190
+ Every time the merge gate (Step 8.5) or post-loop review gate (Step 12.5) produces a verdict, record the outcome:
191
+
192
+ ```
193
+ After merge gate or review gate completes:
194
+
195
+ Append to .planning/version-performance.md:
196
+
197
+ | Date | Version | Gate | Verdict | Override? | Outcome | Notes |
198
+ |------|---------|------|---------|-----------|---------|-------|
199
+ | {date} | v8.0 | merge | BLOCK | yes/no | {correct/false-positive/false-negative} | {brief note} |
200
+
201
+ Override = user chose "B) Override with known issues"
202
+ Outcome = filled retroactively after human testing:
203
+ - correct: gate was right (issue was real)
204
+ - false-positive: gate blocked but code was fine
205
+ - false-negative: gate approved but issue was found later
206
+ ```
207
+
208
+ ### Degradation Signals
209
+
210
+ ```
211
+ AFTER accumulating 5+ gate outcomes for a version, compute:
212
+
213
+ override_rate = overrides / total_gates
214
+ false_positive_rate = false_positives / total_blocks
215
+ false_negative_rate = false_negatives / total_approves
216
+
217
+ DEGRADATION DETECTED when ANY of:
218
+ 1. override_rate > 40%
219
+ → Users are routinely bypassing the gate. Rules are too strict
220
+ or flagging wrong things.
221
+
222
+ 2. false_positive_rate > 30%
223
+ → Gate is crying wolf. Blocks are not backed by real issues.
224
+
225
+ 3. false_negative_rate > 20%
226
+ → Gate is missing real problems. Not strict enough or
227
+ wrong personas prioritized.
228
+
229
+ 4. Same rule triggers BLOCK 3+ times and gets overridden every time
230
+ → That specific rule is wrong. Retire it.
231
+
232
+ Display when degradation detected:
233
+ "+--------------------------------------------------------------+"
234
+ "| VERSION DEGRADATION DETECTED |"
235
+ "+--------------------------------------------------------------+"
236
+ "| |"
237
+ "| Version: v{X} |"
238
+ "| Signal: {which signal fired} |"
239
+ "| Data: {metric} = {value} (threshold: {threshold}) |"
240
+ "| |"
241
+ "| Options: |"
242
+ "| A) Rollback to v{X-1} rules |"
243
+ "| B) Retire specific rule: {rule that caused most overrides} |"
244
+ "| C) Adjust threshold and continue |"
245
+ "| |"
246
+ "+--------------------------------------------------------------+"
247
+ ```
248
+
249
+ ### Version Changelog
250
+
251
+ Track what each version introduced so rollback targets are clear:
252
+
253
+ | Version | Date | Rules Added | Rules Retired | Key Change |
254
+ |---------|------|-------------|---------------|------------|
255
+ | v5.0 | 2026-02-20 | Rules 1-4 (seed) | — | Path verification, confidence gates |
256
+ | v6.0 | 2026-02-21 | Rules 5-10, AP 1-4 | — | Predicate format, CoALA, ECHO |
257
+ | v7.0 | 2026-02-21 | (converted to predicate) | — | MPR predicates, HAC enforcement |
258
+ | v8.0 | 2026-02-21 | Rules 11-12, AP 5 | — | Review gate, simplicity enforcement |
259
+
260
+ ### Rollback Protocol
261
+
262
+ ```
263
+ TO ROLLBACK a version:
264
+
265
+ 1. Identify rules introduced in that version (from changelog above)
266
+ 2. Move those rules to Retired Rules section with reason:
267
+ "Retired: {date}, Reason: Version performance degradation —
268
+ {metric} = {value}, threshold = {threshold}"
269
+ 3. If rolling back the review gate entirely:
270
+ - Change --skip-review default to ON in fire-3-execute.md
271
+ - Remove Step 12.5 from fire-loop.md
272
+ - Add note: "Review gate disabled due to v{X} degradation"
273
+ 4. Record rollback in Version Changelog
274
+ 5. Performance registry resets for the reverted version
275
+
276
+ TO ROLLBACK a single rule:
277
+ 1. Move rule to Retired Rules with degradation data
278
+ 2. If rule was part of HAC (confidence 5/5), HAC stops blocking on it
279
+ 3. Keep the registry running — partial rollbacks need continued monitoring
280
+
281
+ RULE: Never delete performance data. Retired rules keep their history.
282
+ This prevents the same bad rule from being re-proposed later.
283
+ ```
284
+
285
+ ### Active Performance Data
286
+
287
+ <!-- Populated automatically by merge gate (Step 8.5) and review gate (Step 12.5) -->
288
+ <!-- Location: .planning/version-performance.md in each project -->
289
+
290
+ ```
291
+ No data yet — v8.0 just deployed. First 5 gate outcomes will establish baseline.
292
+ ```
293
+
294
+ ---
295
+
296
+ ---
297
+
298
+ ## Formal Constraints (v11.0 — AgentSpec-Style Enforcement)
299
+
300
+ > **Research basis (v11.0):** AgentSpec DSL (ICSE 2026) — machine-checkable ALWAYS/NEVER/WHEN-THEN
301
+ > constraints that are enforced at runtime, not just documented. Unlike predicate rules (which
302
+ > guide behavior), formal constraints BLOCK execution if violated.
303
+
304
+ ### ALWAYS Constraints (invariants — never false)
305
+
306
+ ```
307
+ ALWAYS: working_directory == project_path
308
+ Enforcement: Path Verification Gate (Step 3.5 in fire-executor)
309
+ On violation: HALT — do not proceed under any circumstances
310
+
311
+ ALWAYS: git_status_clean BEFORE phase_transition
312
+ Enforcement: fire-3-execute Step 7 checks for uncommitted changes
313
+ On violation: BLOCK — commit or stash before advancing
314
+
315
+ ALWAYS: tests_pass AFTER code_change
316
+ Enforcement: fire-executor Step 3 verification commands
317
+ On violation: WARNING — fix tests before marking task complete
318
+ ```
319
+
320
+ ### NEVER Constraints (prohibitions — always false)
321
+
322
+ ```
323
+ NEVER: commit_real_credentials_to_repo
324
+ Enforcement: credential-filter.sh hook + fire-add-new-skill Step 4.6
325
+ On violation: BLOCK — strip credentials, replace with placeholders
326
+
327
+ NEVER: delete_file_without_reading_first
328
+ Enforcement: Rule 4 (confidence 5/5) + HAC
329
+ On violation: BLOCK — read file to confirm contents before deletion
330
+
331
+ NEVER: skip_path_verification_in_autonomous_mode
332
+ Enforcement: fire-autonomous Step 0.5 — MANDATORY even in autonomous
333
+ On violation: HALT — this gate cannot be disabled
334
+ ```
335
+
336
+ ### WHEN-THEN Constraints (conditional enforcement)
337
+
338
+ ```
339
+ WHEN: confidence_score < 30
340
+ THEN: create_checkpoint AND search_skills_library
341
+ Enforcement: fire-executor Step 3 confidence computation
342
+ On violation: WARNING — low-confidence work without safety net
343
+
344
+ WHEN: circuit_breaker == TRIPPED
345
+ THEN: stop_execution AND save_state
346
+ Enforcement: circuit-breaker.md state machine
347
+ On violation: BLOCK — cannot continue past a tripped breaker
348
+
349
+ WHEN: reviewer_verdict == BLOCK
350
+ THEN: fix_findings BEFORE presenting_to_human
351
+ Enforcement: Rule 11 (confidence 5/5) + merge gate
352
+ On violation: BLOCK — critical issues must be resolved first
353
+ ```
354
+
355
+ **Enforcement levels:**
356
+ - **HALT:** Execution stops immediately. No override possible.
357
+ - **BLOCK:** Execution pauses. Must resolve the constraint violation to proceed.
358
+ - **WARNING:** Logged to handoff. Execution continues but violation is tracked.
359
+
360
+ ---
361
+
362
+ *Dominion Flow v11.0 — MPR predicate rules + HAC enforcement + review gate + simplicity + version tracking + formal constraints*
363
+ *v7.0: Predicate format + HAC enforcement (2026-02-21)*
364
+ *v8.0: Rules 11-12, Anti-Pattern 5, Version Performance Registry (2026-02-21)*
365
+ *v11.0: AgentSpec formal ALWAYS/NEVER/WHEN-THEN constraints (2026-03-01)*
@@ -0,0 +1,155 @@
1
+ # Dominion Flow Blocker Tracking Reference
2
+
3
+ > **Origin:** NEW for Dominion Flow v2.0 - Centralized blocker management system.
4
+
5
+ ## Overview
6
+
7
+ Centralized blocker tracking across all phases and plans. Blockers are obstacles that prevent task completion. They are tracked in a living document (`BLOCKERS.md`) that persists across sessions and phases.
8
+
9
+ ---
10
+
11
+ ## BLOCKERS.md Location
12
+
13
+ ```
14
+ .planning/BLOCKERS.md
15
+ ```
16
+
17
+ Created automatically by `/fire-1-new`. Updated by execution commands when blockers are encountered.
18
+
19
+ ---
20
+
21
+ ## Blocker Priority Levels
22
+
23
+ | Priority | Label | Impact | Response |
24
+ |----------|-------|--------|----------|
25
+ | **P0** | Critical | Blocks entire phase/milestone | Stop. Fix immediately. Escalate to user. |
26
+ | **P1** | High | Blocks 2+ tasks or downstream plans | Fix before continuing blocked tasks |
27
+ | **P2** | Medium | Blocks 1 task, workaround exists | Document workaround, continue |
28
+ | **P3** | Low | Quality concern, not blocking | Track for later improvement |
29
+
30
+ ---
31
+
32
+ ## Blocker Lifecycle
33
+
34
+ ```
35
+ OPEN -> IN_PROGRESS -> RESOLVED
36
+ -> WONTFIX (with justification)
37
+ -> DEFERRED (moved to future phase)
38
+ ```
39
+
40
+ ---
41
+
42
+ ## BLOCKERS.md Format
43
+
44
+ ```markdown
45
+ # Project Blockers
46
+
47
+ ## Summary
48
+ | Status | P0 | P1 | P2 | P3 | Total |
49
+ |--------|----|----|----|----|-------|
50
+ | Open | 0 | 1 | 2 | 0 | 3 |
51
+ | Resolved | 0 | 2 | 1 | 1 | 4 |
52
+
53
+ ## Open Blockers
54
+
55
+ ### BLOCKER-005 [P1] Stripe webhook signature verification fails in production
56
+ - **Phase:** 04-checkout
57
+ - **Plan:** 04-02
58
+ - **Task:** Task 3 - Webhook handler
59
+ - **Opened:** 2026-02-07
60
+ - **Blocks:** Tasks 04-02-T4, 04-02-T5, Plan 04-03
61
+ - **Description:** Webhook signature verification passes locally with Stripe CLI but fails when deployed. Raw body parsing differs between local and Vercel.
62
+ - **Root Cause:** (investigating)
63
+ - **Workaround:** None yet
64
+ - **Assigned:** Next execution session
65
+
66
+ ### BLOCKER-006 [P2] Image upload exceeds 4.5MB Vercel limit
67
+ - **Phase:** 05-media
68
+ - **Plan:** 05-01
69
+ - **Task:** Task 2 - Upload handler
70
+ - **Opened:** 2026-02-07
71
+ - **Blocks:** Task 05-01-T2
72
+ - **Description:** Users uploading high-res images hit Vercel's 4.5MB body size limit.
73
+ - **Root Cause:** Vercel serverless function body size limit
74
+ - **Workaround:** Client-side resize before upload (implemented as temporary fix)
75
+ - **Assigned:** Future optimization phase
76
+
77
+ ## Resolved Blockers
78
+
79
+ ### BLOCKER-001 [P1] Database connection pool exhaustion (RESOLVED)
80
+ - **Phase:** 02-auth
81
+ - **Plan:** 02-03
82
+ - **Resolved:** 2026-02-06
83
+ - **Resolution:** Switched to PgBouncer connection pooling via Supabase
84
+ - **Skill Created:** database-solutions/CONNECTION_POOL_EXHAUSTION_FIX.md
85
+ ```
86
+
87
+ ---
88
+
89
+ ## When to Create Blockers
90
+
91
+ | Trigger | Priority | Action |
92
+ |---------|----------|--------|
93
+ | Task cannot complete due to external dependency | P1 | Create blocker, skip task, continue |
94
+ | Task cannot complete due to missing prerequisite | P1 | Create blocker, check if prerequisite was missed |
95
+ | Test fails and cannot be fixed in 2 attempts | P1 | Create blocker, run `/fire-diagnose` |
96
+ | Performance issue discovered during execution | P2 | Create blocker, continue with current plan |
97
+ | Code smell or tech debt identified | P3 | Create blocker, continue |
98
+ | Architectural concern surfaces during execution | P0/P1 | Create blocker, STOP, present to user |
99
+
100
+ ---
101
+
102
+ ## Integration Points
103
+
104
+ ### During Plan Execution (`/fire-execute-plan`)
105
+
106
+ When a task encounters a blocker:
107
+ 1. Create entry in BLOCKERS.md with unique ID
108
+ 2. Record which tasks/plans it blocks
109
+ 3. If P0/P1: Present to user immediately
110
+ 4. If P2/P3: Log and continue
111
+
112
+ ### During Phase Transition (`/fire-transition`)
113
+
114
+ Before transitioning to next phase:
115
+ 1. Check BLOCKERS.md for open P0/P1 blockers
116
+ 2. If open P0: BLOCK transition, must resolve first
117
+ 3. If open P1: WARN, allow transition with acknowledgment
118
+ 4. Report blocker resolution rate in phase metrics
119
+
120
+ ### During Verification (`/fire-4-verify`)
121
+
122
+ Verification checks blocker status:
123
+ - All P0 blockers resolved? (required)
124
+ - All P1 blockers resolved or deferred? (required)
125
+ - P2/P3 tracked for future phases? (recommended)
126
+
127
+ ### In CONSCIENCE.md
128
+
129
+ ```markdown
130
+ ## Blocker Status
131
+ - Open: 3 (0 P0, 1 P1, 2 P2)
132
+ - Resolved this phase: 4
133
+ - Resolution rate: 57%
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Blocker-to-Skill Pipeline
139
+
140
+ When a blocker is resolved with a novel solution:
141
+ 1. Auto-skill extraction detects the pattern
142
+ 2. Prompts: "Blocker BLOCKER-001 resolved with novel approach. Save as skill?"
143
+ 3. If approved: Creates skill with Problem/Solution/Prevention sections
144
+ 4. Links skill back to blocker entry
145
+
146
+ ---
147
+
148
+ ## Commands
149
+
150
+ | Command | Action |
151
+ |---------|--------|
152
+ | Create blocker | Add entry during execution |
153
+ | Resolve blocker | Update status, add resolution |
154
+ | List blockers | Show open blockers by priority |
155
+ | Blocker report | Summary for phase transition |
@@ -0,0 +1,165 @@
1
+ # Dominion Flow Checkpoints Reference
2
+
3
+ > **Origin:** Ported from Dominion Flow `checkpoints.md` with Dominion Flow WARRIOR validation additions.
4
+
5
+ ## Overview
6
+
7
+ Plans execute autonomously. Checkpoints formalize the interaction points where human verification or decisions are needed.
8
+
9
+ **Core principle:** Claude automates everything with CLI/API. Checkpoints are for verification and decisions, not manual work.
10
+
11
+ ---
12
+
13
+ ## Checkpoint Types
14
+
15
+ ### checkpoint:human-verify (Most Common - 90%)
16
+
17
+ **When:** Claude completed automated work, human confirms it works correctly.
18
+
19
+ **Use for:** Visual UI checks, interactive flows, functional verification, audio/video playback, animation smoothness, accessibility testing.
20
+
21
+ ```xml
22
+ <task type="checkpoint:human-verify" gate="blocking">
23
+ <what-built>[What Claude automated and deployed/built]</what-built>
24
+ <how-to-verify>
25
+ [Exact steps to test - URLs, commands, expected behavior]
26
+ </how-to-verify>
27
+ <resume-signal>[How to continue - "approved", "yes", or describe issues]</resume-signal>
28
+ </task>
29
+ ```
30
+
31
+ ### checkpoint:decision (9%)
32
+
33
+ **When:** Human must make choice that affects implementation direction.
34
+
35
+ **Use for:** Technology selection, architecture decisions, design choices, feature prioritization, data model decisions.
36
+
37
+ ```xml
38
+ <task type="checkpoint:decision" gate="blocking">
39
+ <decision>[What's being decided]</decision>
40
+ <context>[Why this decision matters]</context>
41
+ <options>
42
+ <option id="option-a">
43
+ <name>[Option name]</name>
44
+ <pros>[Benefits]</pros>
45
+ <cons>[Tradeoffs]</cons>
46
+ </option>
47
+ </options>
48
+ <resume-signal>[How to indicate choice]</resume-signal>
49
+ </task>
50
+ ```
51
+
52
+ ### checkpoint:human-action (1% - Rare)
53
+
54
+ **When:** Action has NO CLI/API and requires human-only interaction, OR Claude hit an authentication gate.
55
+
56
+ **Use ONLY for:** Authentication gates, email verification links, SMS 2FA codes, manual account approvals, credit card 3D Secure flows, OAuth app approvals.
57
+
58
+ **Do NOT use for:** Deploying (use CLI), creating webhooks (use API), creating databases (use CLI), running builds/tests (use Bash), creating files (use Write tool).
59
+
60
+ ```xml
61
+ <task type="checkpoint:human-action" gate="blocking">
62
+ <action>[What human must do]</action>
63
+ <instructions>[What Claude already automated + the ONE manual step]</instructions>
64
+ <verification>[What Claude can check afterward]</verification>
65
+ <resume-signal>[How to continue]</resume-signal>
66
+ </task>
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Execution Protocol
72
+
73
+ When Claude encounters `type="checkpoint:*"`:
74
+
75
+ 1. **Stop immediately** - do not proceed to next task
76
+ 2. **Display checkpoint clearly** using branded format
77
+ 3. **Wait for user response** - do not hallucinate completion
78
+ 4. **Verify if possible** - check files, run tests
79
+ 5. **Resume execution** - continue only after confirmation
80
+
81
+ ### Display Format
82
+
83
+ ```
84
+ +---------------------------------------------------------------+
85
+ | CHECKPOINT: [Verification/Decision/Action] Required |
86
+ +---------------------------------------------------------------+
87
+ | |
88
+ | Progress: X/Y tasks complete |
89
+ | Task: [task name] |
90
+ | |
91
+ | [Type-specific content] |
92
+ | |
93
+ |-----------------------------------------------------------------|
94
+ | YOUR ACTION: [resume signal] |
95
+ +-----------------------------------------------------------------+
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Authentication Gates
101
+
102
+ **Pattern:** Claude tries automation -> auth error -> creates checkpoint -> you authenticate -> Claude retries -> continues
103
+
104
+ **Gate protocol:**
105
+ 1. Recognize it's not a failure - missing auth is expected
106
+ 2. Stop current task - don't retry repeatedly
107
+ 3. Create checkpoint:human-action dynamically
108
+ 4. Provide exact authentication steps
109
+ 5. Verify authentication works
110
+ 6. Retry the original task
111
+ 7. Continue normally
112
+
113
+ ---
114
+
115
+ ## Dominion Flow Additions
116
+
117
+ ### WARRIOR Quality Gate Checkpoint
118
+
119
+ After phase completion, Dominion Flow adds a WARRIOR validation checkpoint:
120
+
121
+ ```xml
122
+ <task type="checkpoint:human-verify" gate="blocking">
123
+ <what-built>Phase XX complete - WARRIOR validation results</what-built>
124
+ <how-to-verify>
125
+ Review validation report:
126
+ 1. Code quality: [pass/fail]
127
+ 2. Security checks: [pass/fail]
128
+ 3. Test coverage: [X%]
129
+ 4. All must-haves verified: [yes/no]
130
+ </how-to-verify>
131
+ <resume-signal>Type "approved" to proceed to next phase</resume-signal>
132
+ </task>
133
+ ```
134
+
135
+ ### Blocker-Aware Checkpoints
136
+
137
+ If open blockers exist when checkpoint is reached:
138
+
139
+ ```
140
+ +---------------------------------------------------------------+
141
+ | WARNING: Open Blockers Detected |
142
+ +---------------------------------------------------------------+
143
+ | P1: [blocker description] (blocks tasks 3, 4) |
144
+ | P2: [blocker description] (non-blocking, tracked) |
145
+ | |
146
+ | Options: |
147
+ | A) Fix P1 blockers before continuing |
148
+ | B) Skip blocked tasks, continue with unblocked work |
149
+ | C) Create workaround and document in BLOCKERS.md |
150
+ +-----------------------------------------------------------------+
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Anti-Patterns
156
+
157
+ - Asking human to do work Claude can automate
158
+ - Too many checkpoints (verification fatigue)
159
+ - Vague verification steps ("check it works")
160
+ - Checkpoint before automation (should automate first)
161
+ - Missing resume signal
162
+
163
+ ## The Golden Rule
164
+
165
+ If Claude CAN automate it, Claude MUST automate it.