@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,874 @@
1
+ # Workflow: Phase Verification Orchestration
2
+
3
+ <purpose>
4
+ Perform comprehensive verification of completed phase work through a dual-layer system: Must-Haves (goal-backward verification) combined with WARRIOR's 70-point validation checklist. This workflow ensures work meets both functional requirements and quality standards, generates detailed reports, and routes to gap closure when needed.
5
+ </purpose>
6
+
7
+ ---
8
+
9
+ <core_principle>
10
+ **Verification must be ruthlessly honest.** No rubber-stamping. Every PASS needs evidence. Every FAIL needs specifics. The verification report should tell the truth about the state of the work, not what we hope it to be.
11
+ </core_principle>
12
+
13
+ ---
14
+
15
+ <required_reading>
16
+ Before executing this workflow, load:
17
+ ```markdown
18
+ @.planning/CONSCIENCE.md # Current project position
19
+ @.planning/phases/{N}-{name}/*-BLUEPRINT.md # All plans with must-haves
20
+ @.planning/phases/{N}-{name}/*-RECORD.md # Execution summaries
21
+ @agents/fire-verifier.md # Verifier agent configuration
22
+ @references/validation-checklist.md # 70-point WARRIOR checklist
23
+ @templates/verification.md # Report template
24
+ ```
25
+ </required_reading>
26
+
27
+ ---
28
+
29
+ <process>
30
+
31
+ ## Step 1: Load Verification Context
32
+
33
+ **Purpose:** Gather all requirements and execution artifacts for verification.
34
+
35
+ ```
36
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
37
+ DOMINION FLOW > PHASE {N} VERIFICATION
38
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
39
+ ```
40
+
41
+ **Parse Arguments:**
42
+ ```yaml
43
+ required:
44
+ phase_number: integer
45
+
46
+ optional:
47
+ --detailed: "Include verbose output for all checks"
48
+ --quick: "Run only critical checks (must-haves + security)"
49
+ --report-only: "Generate report without routing to gap closure"
50
+ ```
51
+
52
+ **Load All Plan Must-Haves:**
53
+ ```bash
54
+ # Find all plans for this phase
55
+ for plan in .planning/phases/{N}-{name}/{N}-*-BLUEPRINT.md; do
56
+ # Extract must_haves from frontmatter
57
+ extract: must_haves.truths
58
+ extract: must_haves.artifacts
59
+ extract: must_haves.key_links
60
+ extract: must_haves.warrior_validation
61
+ done
62
+ ```
63
+
64
+ **Aggregate Must-Haves:**
65
+ ```markdown
66
+ ## Phase {N} Verification Scope
67
+
68
+ ### Truths to Verify: {count}
69
+ 1. {truth from plan 01}
70
+ 2. {truth from plan 01}
71
+ 3. {truth from plan 02}
72
+ ...
73
+
74
+ ### Artifacts to Verify: {count}
75
+ 1. {artifact from plan 01}
76
+ 2. {artifact from plan 02}
77
+ ...
78
+
79
+ ### Key Links to Verify: {count}
80
+ 1. {link from plan 01}
81
+ 2. {link from plan 02}
82
+ ...
83
+
84
+ ### WARRIOR Validation Items: {count}
85
+ {custom items from plans, plus standard 70-point checklist}
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Step 2: Spawn fire-verifier Agent
91
+
92
+ **Purpose:** Execute verification with complete honesty and evidence.
93
+
94
+ ```
95
+ Spawning fire-verifier for Phase {N}...
96
+ ```
97
+
98
+ **Agent Context Injection:**
99
+ ```markdown
100
+ <verification_scope>
101
+ Phase: {N} - {name}
102
+ Plans to Verify: {list}
103
+ Total Must-Haves: {count}
104
+ WARRIOR Checks: 60 items across 6 categories
105
+ Mode: {detailed | quick | standard}
106
+ </verification_scope>
107
+
108
+ <must_haves>
109
+ {Complete aggregated must-haves from Step 1}
110
+ </must_haves>
111
+
112
+ <warrior_checklist>
113
+ @references/validation-checklist.md
114
+ </warrior_checklist>
115
+
116
+ <honesty_protocol>
117
+ ## Verifier Honesty Declaration
118
+
119
+ Before starting, confirm:
120
+ - [ ] I will run ALL verification commands, not skip any
121
+ - [ ] I will report ACTUAL results, not expected results
122
+ - [ ] I will fail checks that don't pass, even if "close enough"
123
+ - [ ] I will document gaps honestly, not minimize them
124
+ - [ ] I will not mark PASS without evidence
125
+
126
+ **Evidence Requirements:**
127
+ - Command output must be included
128
+ - "Assumed to pass" is NOT acceptable
129
+ - Manual verification must describe exact steps taken
130
+ - Screenshots/logs required for UI verification
131
+ </honesty_protocol>
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Step 3: Must-Haves Verification
137
+
138
+ **Purpose:** Verify goal-backward requirements are met.
139
+
140
+ ### 3.1 Verify Truths
141
+
142
+ **Definition:** Observable behaviors that prove the work is complete.
143
+
144
+ ```markdown
145
+ ## Truths Verification
146
+
147
+ ### Truth 1: "{Observable behavior statement}"
148
+
149
+ **Verification Method:** {Manual | Automated | API Test}
150
+
151
+ **Command/Steps:**
152
+ ```bash
153
+ {Actual command run}
154
+ ```
155
+
156
+ **Expected Result:**
157
+ {What should happen}
158
+
159
+ **Actual Result:**
160
+ ```
161
+ {Actual output captured - MUST be real output}
162
+ ```
163
+
164
+ **Status:** PASS | FAIL
165
+ **Evidence:** {Screenshot/log reference if applicable}
166
+ **Notes:** {Any observations}
167
+ ```
168
+
169
+ **For each truth:**
170
+ 1. Run the verification command
171
+ 2. Capture actual output
172
+ 3. Compare to expected
173
+ 4. Mark PASS only if criteria met exactly
174
+ 5. Include evidence
175
+
176
+ ### 3.2 Verify Artifacts
177
+
178
+ **Definition:** Files must exist with specific exports and contents.
179
+
180
+ ```markdown
181
+ ## Artifacts Verification
182
+
183
+ ### Artifact: {path/to/file.ts}
184
+
185
+ **Existence Check:**
186
+ ```bash
187
+ ls -la {path/to/file.ts}
188
+ ```
189
+ **Result:** EXISTS | MISSING
190
+
191
+ **Exports Check:**
192
+ ```bash
193
+ grep -n "export.*{functionName}" {path/to/file.ts}
194
+ ```
195
+ **Expected:** {functionName} exported
196
+ **Actual:**
197
+ ```
198
+ {actual grep output}
199
+ ```
200
+ **Result:** PASS | FAIL
201
+
202
+ **Contains Check:**
203
+ ```bash
204
+ grep -n "{pattern}" {path/to/file.ts}
205
+ ```
206
+ **Expected:** File contains {pattern}
207
+ **Actual:**
208
+ ```
209
+ {actual grep output with line numbers}
210
+ ```
211
+ **Result:** PASS | FAIL
212
+
213
+ **Overall Artifact Status:** PASS | FAIL
214
+ ```
215
+
216
+ ### 3.3 Verify Key Links
217
+
218
+ **Definition:** Components are properly wired together.
219
+
220
+ ```markdown
221
+ ## Key Links Verification
222
+
223
+ ### Link: {component-a} -> {component-b} via {integration-point}
224
+
225
+ **Import Verification:**
226
+ ```bash
227
+ grep -n "import.*{component-b}" {component-a-file}
228
+ ```
229
+ **Result:**
230
+ ```
231
+ {actual output}
232
+ ```
233
+
234
+ **Usage Verification:**
235
+ ```bash
236
+ grep -n "{integration-point}" {component-a-file}
237
+ ```
238
+ **Result:**
239
+ ```
240
+ {actual output}
241
+ ```
242
+
243
+ **Expected:**
244
+ - {component-a} imports {component-b}
245
+ - {component-a} calls {integration-point}
246
+
247
+ **Status:** PASS | FAIL
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Step 4: WARRIOR 60-Point Validation
253
+
254
+ **Purpose:** Comprehensive quality validation across 6 categories.
255
+
256
+ ### 4.1 Code Quality (10 points)
257
+
258
+ ```markdown
259
+ ## Code Quality Validation: X/10
260
+
261
+ ### CQ-1: Project Builds Without Errors
262
+ ```bash
263
+ npm run build
264
+ ```
265
+ **Expected:** Exit code 0, no errors
266
+ **Actual:**
267
+ ```
268
+ {build output}
269
+ ```
270
+ **Status:** PASS (1pt) | FAIL (0pt)
271
+
272
+ ### CQ-2: No TypeScript Errors
273
+ ```bash
274
+ npx tsc --noEmit
275
+ ```
276
+ **Expected:** No errors
277
+ **Actual:** {X errors | No errors}
278
+ **Status:** PASS (1pt) | FAIL (0pt)
279
+
280
+ ### CQ-3: ESLint Compliance
281
+ ```bash
282
+ npm run lint
283
+ ```
284
+ **Expected:** No errors (warnings acceptable)
285
+ **Actual:** {X errors, Y warnings}
286
+ **Status:** PASS (1pt) | FAIL (0pt)
287
+
288
+ ### CQ-4: No Console.logs in Production Code
289
+ ```bash
290
+ grep -rn "console.log" src/ --include="*.ts" --include="*.tsx" | grep -v "test" | grep -v "spec" | wc -l
291
+ ```
292
+ **Expected:** 0 (or only intentional logging)
293
+ **Actual:** {count}
294
+ **Status:** PASS (1pt) | FAIL (0pt)
295
+
296
+ ### CQ-5: Code Comments Present (Why, Not What)
297
+ **Manual Check:** Review new files for explanatory comments
298
+ **Files Reviewed:** {list}
299
+ **Finding:** {adequate comments explaining rationale | missing comments on complex logic}
300
+ **Status:** PASS (1pt) | FAIL (0pt)
301
+
302
+ ### CQ-6: Functions Have JSDoc/TSDoc
303
+ ```bash
304
+ grep -c "@param\|@returns\|@description" {new-files}
305
+ ```
306
+ **Expected:** Public functions documented
307
+ **Actual:** {count} documented functions
308
+ **Status:** PASS (1pt) | FAIL (0pt)
309
+
310
+ ### CQ-7: No Magic Numbers
311
+ ```bash
312
+ grep -rn "[^0-9][0-9][0-9][0-9][^0-9]" src/ --include="*.ts" | grep -v "const\|enum\|type\|test" | head -5
313
+ ```
314
+ **Expected:** Numbers are named constants
315
+ **Actual:** {findings}
316
+ **Status:** PASS (1pt) | FAIL (0pt)
317
+
318
+ ### CQ-8: Consistent Naming Conventions
319
+ **Manual Check:** camelCase functions, PascalCase components, UPPER_SNAKE constants
320
+ **Status:** PASS (1pt) | FAIL (0pt)
321
+
322
+ ### CQ-9: No Dead Code
323
+ ```bash
324
+ npx ts-prune 2>/dev/null | grep -v "test\|spec" | head -10
325
+ ```
326
+ **Expected:** No unused exports in new code
327
+ **Actual:** {findings}
328
+ **Status:** PASS (1pt) | FAIL (0pt)
329
+
330
+ ### CQ-10: Error Handling Present
331
+ **Manual Check:** try/catch blocks, error boundaries, error responses
332
+ **Status:** PASS (1pt) | FAIL (0pt)
333
+
334
+ **Code Quality Score:** X/10
335
+ ```
336
+
337
+ ### 4.2 Testing (10 points)
338
+
339
+ ```markdown
340
+ ## Testing Validation: X/10
341
+
342
+ ### T-1: Unit Tests Exist
343
+ ```bash
344
+ find . -name "*.test.ts" -o -name "*.spec.ts" | wc -l
345
+ ```
346
+ **Expected:** Tests exist for new code
347
+ **Actual:** {count} test files
348
+ **Status:** PASS (1pt) | FAIL (0pt)
349
+
350
+ ### T-2: Unit Tests Pass
351
+ ```bash
352
+ npm run test
353
+ ```
354
+ **Expected:** All tests pass
355
+ **Actual:** {X passed, Y failed, Z skipped}
356
+ **Status:** PASS (1pt) | FAIL (0pt)
357
+
358
+ ### T-3: Test Coverage > Threshold
359
+ ```bash
360
+ npm run test:coverage
361
+ ```
362
+ **Expected:** > 80% (or project threshold)
363
+ **Actual:** {X}%
364
+ **Status:** PASS (1pt) | FAIL (0pt)
365
+
366
+ ### T-4: Integration Tests Exist
367
+ **Check:** Integration test files present
368
+ **Actual:** {list or "none"}
369
+ **Status:** PASS (1pt) | FAIL (0pt)
370
+
371
+ ### T-5: Integration Tests Pass
372
+ ```bash
373
+ npm run test:integration
374
+ ```
375
+ **Actual:** {results}
376
+ **Status:** PASS (1pt) | FAIL (0pt)
377
+
378
+ ### T-6: Edge Cases Tested
379
+ **Manual Check:** Boundary conditions, empty inputs, max values
380
+ **Status:** PASS (1pt) | FAIL (0pt)
381
+
382
+ ### T-7: Error Paths Tested
383
+ **Manual Check:** Error scenarios have test coverage
384
+ **Status:** PASS (1pt) | FAIL (0pt)
385
+
386
+ ### T-8: No Skipped Tests
387
+ ```bash
388
+ grep -rn "\.skip\|xit\|xdescribe" . --include="*.test.ts" --include="*.spec.ts" | wc -l
389
+ ```
390
+ **Expected:** 0 skipped tests in new code
391
+ **Actual:** {count}
392
+ **Status:** PASS (1pt) | FAIL (0pt)
393
+
394
+ ### T-9: Test Isolation (No Shared State)
395
+ **Manual Check:** Tests don't depend on execution order
396
+ **Status:** PASS (1pt) | FAIL (0pt)
397
+
398
+ ### T-10: Manual Testing Complete
399
+ **Checklist:**
400
+ - [ ] Feature works as expected
401
+ - [ ] UI renders correctly (if applicable)
402
+ - [ ] Error states handled gracefully
403
+ **Status:** PASS (1pt) | FAIL (0pt)
404
+
405
+ **Testing Score:** X/10
406
+ ```
407
+
408
+ ### 4.3 Security (10 points)
409
+
410
+ ```markdown
411
+ ## Security Validation: X/10
412
+
413
+ ### S-1: No Hardcoded Credentials
414
+ ```bash
415
+ grep -rn "password.*=.*['\"]" . --include="*.ts" | grep -v ".env\|test\|mock\|example" | wc -l
416
+ grep -rn "apiKey.*=.*['\"]" . --include="*.ts" | grep -v ".env\|test\|mock\|example" | wc -l
417
+ grep -rn "secret.*=.*['\"]" . --include="*.ts" | grep -v ".env\|test\|mock\|example" | wc -l
418
+ ```
419
+ **Expected:** 0 matches
420
+ **Actual:** {count}
421
+ **Status:** PASS (1pt) | FAIL (0pt)
422
+
423
+ ### S-2: Input Validation Implemented
424
+ **Check:** All user inputs validated (forms, API params)
425
+ **Files Checked:** {list}
426
+ **Status:** PASS (1pt) | FAIL (0pt)
427
+
428
+ ### S-3: SQL Injection Prevention
429
+ ```bash
430
+ grep -rn "raw\|execute\|\$queryRaw" . --include="*.ts" | grep -v test | head -5
431
+ ```
432
+ **Check:** Raw queries use parameterization
433
+ **Status:** PASS (1pt) | FAIL (0pt)
434
+
435
+ ### S-4: XSS Prevention
436
+ **Check:** User content escaped, dangerouslySetInnerHTML avoided or sanitized
437
+ **Status:** PASS (1pt) | FAIL (0pt)
438
+
439
+ ### S-5: HTTPS Enforced
440
+ ```bash
441
+ grep -rn "http://" . --include="*.ts" | grep -v test | grep -v localhost | wc -l
442
+ ```
443
+ **Expected:** 0 non-localhost HTTP URLs
444
+ **Status:** PASS (1pt) | FAIL (0pt)
445
+
446
+ ### S-6: CORS Configured Properly
447
+ **Check:** Only necessary origins allowed
448
+ **Config Location:** {file}
449
+ **Status:** PASS (1pt) | FAIL (0pt)
450
+
451
+ ### S-7: Rate Limiting Active
452
+ **Check:** API endpoints have rate limiting
453
+ **Status:** PASS (1pt) | FAIL (0pt)
454
+
455
+ ### S-8: Auth Tokens Secure
456
+ **Check:** Tokens in httpOnly cookies, appropriate expiry
457
+ **Status:** PASS (1pt) | FAIL (0pt)
458
+
459
+ ### S-9: Dependency Audit Clean
460
+ ```bash
461
+ npm audit --audit-level=high
462
+ ```
463
+ **Expected:** No high/critical vulnerabilities
464
+ **Actual:** {count} high, {count} critical
465
+ **Status:** PASS (1pt) | FAIL (0pt)
466
+
467
+ ### S-10: Secrets in Environment Variables
468
+ **Check:** All secrets from process.env, not hardcoded
469
+ **Status:** PASS (1pt) | FAIL (0pt)
470
+
471
+ **Security Score:** X/10
472
+ ```
473
+
474
+ ### 4.4 Performance (10 points)
475
+
476
+ ```markdown
477
+ ## Performance Validation: X/10
478
+
479
+ ### P-1: Page Load Time < 2s
480
+ **Method:** {Lighthouse | manual timing}
481
+ **Actual:** {X}s
482
+ **Status:** PASS (1pt) | FAIL (0pt)
483
+
484
+ ### P-2: API Response Time < 200ms
485
+ ```bash
486
+ curl -w "%{time_total}" -o /dev/null -s {endpoint}
487
+ ```
488
+ **Actual:** {X}s
489
+ **Status:** PASS (1pt) | FAIL (0pt)
490
+
491
+ ### P-3: Database Queries Optimized
492
+ **Check:** EXPLAIN ANALYZE on new queries shows efficient plans
493
+ **Status:** PASS (1pt) | FAIL (0pt)
494
+
495
+ ### P-4: No N+1 Queries
496
+ **Check:** Query logs show efficient loading (eager loading where needed)
497
+ **Status:** PASS (1pt) | FAIL (0pt)
498
+
499
+ ### P-5: Indexes Present
500
+ **Check:** Indexes on frequently queried columns
501
+ **Status:** PASS (1pt) | FAIL (0pt)
502
+
503
+ ### P-6: No Memory Leaks
504
+ **Check:** Memory usage stable over repeated operations
505
+ **Status:** PASS (1pt) | FAIL (0pt)
506
+
507
+ ### P-7: Bundle Size Acceptable
508
+ **Check:** No unexpectedly large bundles
509
+ **Status:** PASS (1pt) | FAIL (0pt)
510
+
511
+ ### P-8: Images Optimized
512
+ **Check:** Appropriate formats, lazy loading
513
+ **Status:** PASS (1pt) | FAIL (0pt)
514
+
515
+ ### P-9: Caching Implemented
516
+ **Check:** Appropriate cache headers, application caching
517
+ **Status:** PASS (1pt) | FAIL (0pt)
518
+
519
+ ### P-10: No Render Blocking
520
+ **Check:** Critical resources prioritized, scripts deferred
521
+ **Status:** PASS (1pt) | FAIL (0pt)
522
+
523
+ **Performance Score:** X/10
524
+ ```
525
+
526
+ ### 4.5 Documentation (10 points)
527
+
528
+ ```markdown
529
+ ## Documentation Validation: X/10
530
+
531
+ ### D-1: Code Comments Explain Why
532
+ **Manual Check:** Comments explain rationale, not syntax
533
+ **Status:** PASS (1pt) | FAIL (0pt)
534
+
535
+ ### D-2: README Updated
536
+ **Check:** New features documented
537
+ **Status:** PASS (1pt) | FAIL (0pt)
538
+
539
+ ### D-3: API Documentation Complete
540
+ **Check:** Swagger/OpenAPI updated for new endpoints
541
+ **Status:** PASS (1pt) | FAIL (0pt)
542
+
543
+ ### D-4: Environment Variables Documented
544
+ **Check:** .env.example has new variables
545
+ **Status:** PASS (1pt) | FAIL (0pt)
546
+
547
+ ### D-5: Setup Instructions Current
548
+ **Check:** README install steps work
549
+ **Status:** PASS (1pt) | FAIL (0pt)
550
+
551
+ ### D-6: Architecture Decisions Recorded
552
+ **Check:** Significant decisions documented
553
+ **Status:** PASS (1pt) | FAIL (0pt)
554
+
555
+ ### D-7: Breaking Changes Noted
556
+ **Check:** CHANGELOG updated if breaking changes
557
+ **Status:** PASS (1pt) | FAIL (0pt)
558
+
559
+ ### D-8: Inline Examples Present
560
+ **Check:** Complex functions have usage examples
561
+ **Status:** PASS (1pt) | FAIL (0pt)
562
+
563
+ ### D-9: Error Messages Helpful
564
+ **Check:** Errors guide user to resolution
565
+ **Status:** PASS (1pt) | FAIL (0pt)
566
+
567
+ ### D-10: Dependencies Justified
568
+ **Check:** New deps have documented rationale
569
+ **Status:** PASS (1pt) | FAIL (0pt)
570
+
571
+ **Documentation Score:** X/10
572
+ ```
573
+
574
+ ### 4.6 Infrastructure (10 points)
575
+
576
+ ```markdown
577
+ ## Infrastructure Validation: X/10
578
+
579
+ ### I-1: Environment Parity
580
+ **Check:** Dev/staging/prod configs consistent
581
+ **Status:** PASS (1pt) | FAIL (0pt)
582
+
583
+ ### I-2: Health Checks Present
584
+ ```bash
585
+ curl -s {health-endpoint}
586
+ ```
587
+ **Status:** PASS (1pt) | FAIL (0pt)
588
+
589
+ ### I-3: Logging Structured
590
+ **Check:** JSON logging with context
591
+ **Status:** PASS (1pt) | FAIL (0pt)
592
+
593
+ ### I-4: Error Monitoring Connected
594
+ **Check:** Errors captured (Sentry, etc.)
595
+ **Status:** PASS (1pt) | FAIL (0pt)
596
+
597
+ ### I-5: Graceful Shutdown
598
+ **Check:** SIGTERM handled, connections drained
599
+ **Status:** PASS (1pt) | FAIL (0pt)
600
+
601
+ ### I-6: Database Migrations Safe
602
+ **Check:** Migrations reversible, no data loss
603
+ **Status:** PASS (1pt) | FAIL (0pt)
604
+
605
+ ### I-7: Secrets Management
606
+ **Check:** No secrets in repo
607
+ **Status:** PASS (1pt) | FAIL (0pt)
608
+
609
+ ### I-8: Backup Strategy
610
+ **Check:** Database backups configured
611
+ **Status:** PASS (1pt) | FAIL (0pt)
612
+
613
+ ### I-9: CI/CD Pipeline Works
614
+ **Check:** Pipeline runs successfully
615
+ **Status:** PASS (1pt) | FAIL (0pt)
616
+
617
+ ### I-10: Rollback Possible
618
+ **Check:** Can revert to previous version
619
+ **Status:** PASS (1pt) | FAIL (0pt)
620
+
621
+ **Infrastructure Score:** X/10
622
+ ```
623
+
624
+ ---
625
+
626
+ ## Step 5: Generate VERIFICATION.md Report
627
+
628
+ **Purpose:** Create comprehensive, honest verification report.
629
+
630
+ **Output:** `.planning/phases/{N}-{name}/{N}-VERIFICATION.md`
631
+
632
+ ```markdown
633
+ ---
634
+ phase: {N}-{name}
635
+ verified_at: "{ISO timestamp}"
636
+ verified_by: fire-verifier
637
+ musthave_score: "{X}/{Y}"
638
+ warrior_score: "{XX}/70"
639
+ overall_status: "{APPROVED | CONDITIONAL | REJECTED}"
640
+ ---
641
+
642
+ # Verification Report: Phase {N} - {name}
643
+
644
+ ## Executive Summary
645
+
646
+ | Category | Score | Status |
647
+ |----------|-------|--------|
648
+ | **Must-Haves** | {X}/{Y} | {PASS/FAIL} |
649
+ | **Code Quality** | {X}/10 | {PASS/FAIL} |
650
+ | **Testing** | {X}/10 | {PASS/FAIL} |
651
+ | **Security** | {X}/10 | {PASS/FAIL} |
652
+ | **Performance** | {X}/10 | {PASS/FAIL} |
653
+ | **Documentation** | {X}/10 | {PASS/FAIL} |
654
+ | **Infrastructure** | {X}/10 | {PASS/FAIL} |
655
+ | **WARRIOR Total** | {XX}/70 | |
656
+
657
+ **Overall Status:** {APPROVED | CONDITIONAL | REJECTED}
658
+
659
+ ---
660
+
661
+ ## Must-Haves: {X}/{Y} {STATUS}
662
+
663
+ {Detailed truths, artifacts, key_links verification from Step 3}
664
+
665
+ ---
666
+
667
+ ## WARRIOR Validation: {XX}/70
668
+
669
+ {Detailed 6-category results from Step 4}
670
+
671
+ ---
672
+
673
+ ## Gaps Identified
674
+
675
+ ### Critical Gaps (Must Fix Before Proceeding)
676
+ | Gap | Category | Impact | Remediation |
677
+ |-----|----------|--------|-------------|
678
+ | {gap} | {category} | {High} | {specific fix} |
679
+
680
+ ### Minor Gaps (Should Fix)
681
+ | Gap | Category | Impact | Recommendation |
682
+ |-----|----------|--------|----------------|
683
+ | {gap} | {category} | {Low/Med} | {suggestion} |
684
+
685
+ ### Deferred Items (Acknowledged)
686
+ | Item | Reason | Planned Resolution |
687
+ |------|--------|-------------------|
688
+ | {item} | {reason} | {when/how} |
689
+
690
+ ---
691
+
692
+ ## Recommendations
693
+
694
+ ### Immediate Actions Required
695
+ 1. {Specific action with steps}
696
+ 2. {Specific action with steps}
697
+
698
+ ### Suggested Improvements
699
+ 1. {Improvement}
700
+ 2. {Improvement}
701
+
702
+ ---
703
+
704
+ ## Verification Decision
705
+
706
+ **Decision:** {APPROVED | CONDITIONAL | REJECTED}
707
+
708
+ **Rationale:**
709
+ {Explanation of decision based on scores and gaps}
710
+
711
+ **Conditions (if CONDITIONAL):**
712
+ - [ ] {Condition 1 must be met}
713
+ - [ ] {Condition 2 must be met}
714
+
715
+ **Next Steps:**
716
+ {Based on decision: proceed, fix gaps, or re-plan}
717
+
718
+ ---
719
+
720
+ *Verified: {timestamp}*
721
+ *Verifier: fire-verifier*
722
+ ```
723
+
724
+ ---
725
+
726
+ ## Step 6: Route Based on Results
727
+
728
+ **Purpose:** Direct user to appropriate next action.
729
+
730
+ ### Decision Matrix
731
+
732
+ | Must-Have Score | WARRIOR Score | Decision |
733
+ |-----------|---------------|----------|
734
+ | All pass | >= 54 (90%) | APPROVED |
735
+ | All pass | 48-53 (80-89%) | APPROVED with notes |
736
+ | All pass | 42-47 (70-79%) | CONDITIONAL |
737
+ | All pass | < 42 | CONDITIONAL with critical fixes |
738
+ | Any fail | Any | REJECTED |
739
+
740
+ ### APPROVED
741
+
742
+ ```
743
+ ╔══════════════════════════════════════════════════════════════════════════════╗
744
+ ║ VERIFICATION PASSED ║
745
+ ╠══════════════════════════════════════════════════════════════════════════════╣
746
+ ║ ║
747
+ ║ Phase {N} - {name} ║
748
+ ║ ║
749
+ ║ Must-Haves: {X}/{X} ║
750
+ ║ WARRIOR Validation: {XX}/70 ║
751
+ ║ ║
752
+ ║ Phase {N} is COMPLETE ║
753
+ ║ ║
754
+ ║ Options: ║
755
+ ║ Run `/fire-2-plan {N+1}` to plan next phase ║
756
+ ║ Run `/fire-5-handoff` to create session handoff ║
757
+ ║ ║
758
+ ╚══════════════════════════════════════════════════════════════════════════════╝
759
+ ```
760
+
761
+ ### CONDITIONAL
762
+
763
+ ```
764
+ ╔══════════════════════════════════════════════════════════════════════════════╗
765
+ ║ VERIFICATION PASSED WITH GAPS ║
766
+ ╠══════════════════════════════════════════════════════════════════════════════╣
767
+ ║ ║
768
+ ║ Phase {N} - {name} ║
769
+ ║ ║
770
+ ║ Must-Haves: {X}/{Y} ({count} gaps) ║
771
+ ║ WARRIOR Validation: {XX}/70 ({count} gaps) ║
772
+ ║ ║
773
+ ║ Gaps: ║
774
+ ║ - {Gap 1 description} ║
775
+ ║ - {Gap 2 description} ║
776
+ ║ ║
777
+ ║ Options: ║
778
+ ║ A) Accept gaps, proceed: `/fire-2-plan {N+1}` ║
779
+ ║ B) Close gaps: `/fire-2-plan {N} --gaps` ║
780
+ ║ C) Create handoff with gaps noted: `/fire-5-handoff` ║
781
+ ║ ║
782
+ ╚══════════════════════════════════════════════════════════════════════════════╝
783
+ ```
784
+
785
+ ### REJECTED
786
+
787
+ ```
788
+ ╔══════════════════════════════════════════════════════════════════════════════╗
789
+ ║ VERIFICATION FAILED ║
790
+ ╠══════════════════════════════════════════════════════════════════════════════╣
791
+ ║ ║
792
+ ║ Phase {N} - {name} ║
793
+ ║ ║
794
+ ║ Must-Haves: {X}/{Y} FAILED ║
795
+ ║ WARRIOR Validation: {XX}/70 FAILED ║
796
+ ║ ║
797
+ ║ Critical Failures: ║
798
+ ║ - {Critical failure 1} ║
799
+ ║ - {Critical failure 2} ║
800
+ ║ ║
801
+ ║ Action Required: ║
802
+ ║ Run `/fire-2-plan {N} --gaps` to create gap closure plan ║
803
+ ║ ║
804
+ ╚══════════════════════════════════════════════════════════════════════════════╝
805
+ ```
806
+
807
+ ---
808
+
809
+ ## Step 7: Update CONSCIENCE.md
810
+
811
+ **Purpose:** Reflect verification results in project state.
812
+
813
+ ```markdown
814
+ ## WARRIOR Integration
815
+ - **Validation Status:** Phase {N} {APPROVED|CONDITIONAL|REJECTED} {XX}/70 checks
816
+ - **Gaps:** {list or "None"}
817
+ - **Last verified:** {timestamp}
818
+
819
+ ## Dominion Flow Progress Tracking
820
+ ### Phase Status
821
+ | Phase | Name | Status | Plans | Verification |
822
+ |-------|------|--------|-------|--------------|
823
+ | {N} | {name} | {Verified} | {X} | {XX}/70 |
824
+ ```
825
+
826
+ </process>
827
+
828
+ ---
829
+
830
+ ## Agent Spawning
831
+
832
+ | Agent | When | Purpose |
833
+ |-------|------|---------|
834
+ | **fire-verifier** | Always | Execute all verification checks with evidence |
835
+
836
+ ---
837
+
838
+ ## Success Criteria
839
+
840
+ ### Required Outputs
841
+ - [ ] All Must-Haves verified (truths, artifacts, key_links)
842
+ - [ ] All 60 WARRIOR checks executed
843
+ - [ ] `{N}-VERIFICATION.md` created with evidence
844
+ - [ ] CONSCIENCE.md updated with verification status
845
+ - [ ] Clear routing based on results
846
+
847
+ ### Quality Checks
848
+ - [ ] Every PASS has evidence (command output or manual check description)
849
+ - [ ] Every FAIL has specific details
850
+ - [ ] Gaps categorized by severity
851
+ - [ ] Recommendations are actionable
852
+
853
+ ---
854
+
855
+ ## Scoring Thresholds
856
+
857
+ | Threshold | WARRIOR Score | Action |
858
+ |-----------|---------------|--------|
859
+ | **Excellent** | 54-60 (90%+) | APPROVED |
860
+ | **Good** | 48-53 (80-89%) | APPROVED with notes |
861
+ | **Acceptable** | 42-47 (70-79%) | CONDITIONAL |
862
+ | **Needs Work** | 36-41 (60-69%) | CONDITIONAL with critical fixes |
863
+ | **Insufficient** | <36 (<60%) | REJECTED |
864
+
865
+ **Override:** Critical security or must-have failures override score thresholds.
866
+
867
+ ---
868
+
869
+ ## References
870
+
871
+ - **Agent:** `@agents/fire-verifier.md` - Verification agent
872
+ - **Template:** `@templates/verification.md` - Report template
873
+ - **Checklist:** `@references/validation-checklist.md` - 70-point checklist
874
+ - **Brand:** `@references/ui-brand.md` - Visual output standards