@thierrynakoa/fire-flow 12.2.1 → 13.0.1

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 (500) hide show
  1. package/CREDITS.md +25 -0
  2. package/DOMINION-FLOW-OVERVIEW.md +182 -38
  3. package/README.md +399 -455
  4. package/TROUBLESHOOTING.md +264 -264
  5. package/agents/fire-debugger.md +54 -0
  6. package/agents/fire-executor.md +1610 -1033
  7. package/agents/fire-fact-checker.md +1 -1
  8. package/agents/fire-planner.md +85 -17
  9. package/agents/fire-project-researcher.md +1 -1
  10. package/agents/fire-researcher.md +4 -22
  11. package/agents/{fire-phoenix-analyst.md → fire-resurrection-analyst.md} +394 -394
  12. package/agents/fire-reviewer.md +552 -499
  13. package/agents/fire-verifier.md +114 -19
  14. package/bin/cli.js +18 -101
  15. package/commands/fire-0-orient.md +2 -2
  16. package/commands/fire-1a-new.md +50 -15
  17. package/commands/fire-1c-setup.md +33 -5
  18. package/commands/fire-1d-discuss.md +87 -1
  19. package/commands/fire-2-plan.md +556 -527
  20. package/commands/fire-3-execute.md +2046 -1356
  21. package/commands/fire-4-verify.md +975 -906
  22. package/commands/fire-5-handoff.md +46 -5
  23. package/commands/fire-6-resume.md +2 -31
  24. package/commands/fire-add-new-skill.md +138 -19
  25. package/commands/fire-autonomous.md +14 -2
  26. package/commands/fire-complete-milestone.md +1 -1
  27. package/commands/fire-cost.md +179 -183
  28. package/commands/fire-debug.md +1 -6
  29. package/commands/fire-loop-resume.md +2 -2
  30. package/commands/fire-loop-stop.md +1 -1
  31. package/commands/fire-loop.md +2 -15
  32. package/commands/fire-map-codebase.md +1 -1
  33. package/commands/fire-migrate-database.md +548 -0
  34. package/commands/fire-new-milestone.md +1 -1
  35. package/commands/fire-reflect.md +1 -2
  36. package/commands/fire-research.md +142 -21
  37. package/commands/{fire-phoenix.md → fire-resurrect.md} +859 -603
  38. package/commands/fire-scaffold.md +297 -0
  39. package/commands/fire-search.md +1 -2
  40. package/commands/fire-security-scan.md +483 -484
  41. package/commands/fire-setup.md +359 -0
  42. package/commands/fire-skill.md +770 -0
  43. package/commands/fire-skills-diff.md +506 -506
  44. package/commands/fire-skills-history.md +388 -388
  45. package/commands/fire-skills-rollback.md +7 -7
  46. package/commands/fire-skills-sync.md +470 -470
  47. package/commands/fire-test.md +5 -5
  48. package/commands/fire-todos.md +1 -1
  49. package/commands/fire-update.md +5 -5
  50. package/commands/fire-validate-skills.md +282 -0
  51. package/commands/fire-vuln-scan.md +492 -493
  52. package/hooks/run-hook.sh +8 -8
  53. package/hooks/run-session-end.sh +7 -7
  54. package/hooks/session-end.sh +90 -90
  55. package/hooks/session-start.sh +1 -1
  56. package/package.json +4 -24
  57. package/plugin.json +7 -7
  58. package/references/autonomy-levels.md +235 -0
  59. package/references/behavioral-directives.md +95 -3
  60. package/references/blocker-tracking.md +1 -1
  61. package/references/circuit-breaker.md +93 -2
  62. package/references/context-engineering.md +227 -9
  63. package/references/honesty-protocols.md +70 -1
  64. package/references/issue-to-pr-pipeline.md +149 -150
  65. package/references/metrics-and-trends.md +1 -2
  66. package/references/research-improvements.md +4 -108
  67. package/references/sdlc-mapping.md +73 -0
  68. package/references/state-machine.md +151 -0
  69. package/skills-library/AVAILABLE_TOOLS_REFERENCE.md +333 -0
  70. package/skills-library/SKILLS-INDEX.md +57 -558
  71. package/skills-library/SKILLS_LIBRARY_INDEX.md +532 -0
  72. package/skills-library/_general/api-patterns/api-field-name-mismatch.md +107 -0
  73. package/skills-library/_general/api-patterns/streaming-command-timeout.md +122 -0
  74. package/skills-library/_general/api-patterns/streaming-proxy-cors-bypass.md +102 -0
  75. package/skills-library/_general/automation/settings-gui-generator.md +172 -0
  76. package/skills-library/_general/database-solutions/data-type-mapping-reference.md +181 -0
  77. package/skills-library/_general/database-solutions/mysql-limit-offset-string-coercion.md +102 -0
  78. package/skills-library/_general/database-solutions/mysql-to-pg-migration.md +195 -0
  79. package/skills-library/_general/database-solutions/orm-schema-portability.md +193 -0
  80. package/skills-library/_general/database-solutions/persistent-analysis-storage.md +207 -0
  81. package/skills-library/_general/database-solutions/pg-to-mysql-schema-migration-methodology.md +190 -0
  82. package/skills-library/_general/database-solutions/sql-dialect-compatibility-matrix.md +306 -0
  83. package/skills-library/_general/database-solutions/sqlite-to-pg-migration.md +219 -0
  84. package/skills-library/_general/frontend/canvas-bubble-animation-grouping.md +270 -0
  85. package/skills-library/_general/frontend/color-token-migration.md +112 -0
  86. package/skills-library/_general/frontend/framer-motion-layoutid-grouping.md +150 -0
  87. package/skills-library/_general/frontend/pyqt6-settings-dialog.md +191 -0
  88. package/skills-library/_general/frontend/react-flow-animated-layout-switching.md +101 -0
  89. package/skills-library/_general/frontend/react-hooks-order-debugging.md +141 -0
  90. package/skills-library/_general/frontend/redux-localstorage-auth-desync.md +126 -0
  91. package/skills-library/_general/frontend/safari-csp-theme-color-debugging.md +124 -0
  92. package/skills-library/_general/frontend/safari-sw-cache-poisoning.md +138 -0
  93. package/skills-library/_general/frontend/svg-sparkline-no-charting-library.md +131 -0
  94. package/skills-library/_general/growth-marketing/oss-daily-growth-intelligence.md +224 -0
  95. package/skills-library/_general/integrations/claude-code-local-mcp-integration.md +250 -0
  96. package/skills-library/_general/integrations/mcp-composite-tool-orchestration.md +200 -0
  97. package/skills-library/_general/methodology/AGENT_SDK_STANDALONE_TOOLING.md +181 -0
  98. package/skills-library/_general/methodology/AGENT_TEAMS_GUIDE.md +169 -0
  99. package/skills-library/_general/methodology/ALAS_STATEFUL_EXECUTION.md +207 -0
  100. package/skills-library/_general/methodology/AUTO_REVIEWER_SUBAGENT.md +211 -0
  101. package/skills-library/_general/methodology/CONSISTENCY_CHECK_AMBIGUITY_GATE.md +96 -0
  102. package/skills-library/_general/methodology/DEAD_ENDS_SHELF.md +4 -4
  103. package/skills-library/_general/methodology/DISTILL_NOT_DUMP.md +108 -0
  104. package/skills-library/_general/methodology/EXECUTION_PROGRESS_MONITOR.md +157 -0
  105. package/skills-library/_general/methodology/HIERARCHICAL_REVIEW_MARS.md +122 -0
  106. package/skills-library/_general/methodology/MCP_INTER_AGENT_BRIDGE.md +207 -0
  107. package/skills-library/_general/methodology/MERMAID_WIZARD_DIAGRAMS.md +77 -0
  108. package/skills-library/_general/methodology/MISSING_DIMENSION_DETECTOR.md +89 -0
  109. package/skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md +397 -0
  110. package/skills-library/_general/methodology/OBSERVATION_MASKING.md +100 -0
  111. package/skills-library/_general/methodology/PHOENIX_REBUILD_METHODOLOGY.md +82 -11
  112. package/skills-library/_general/methodology/REVIEW_BACKTRACK_PANEL.md +140 -0
  113. package/skills-library/_general/methodology/REVIEW_FIX_LOOP.md +117 -0
  114. package/skills-library/_general/methodology/VOTING_VERDICT_ARBITRATION.md +155 -0
  115. package/skills-library/_general/methodology/ZERO_FRICTION_CLI_SETUP.md +2 -2
  116. package/skills-library/_general/methodology/dead-code-activation.md +123 -0
  117. package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -240
  118. package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +1 -1
  119. package/skills-library/_general/patterns-standards/GOF_DESIGN_PATTERNS_FOR_AI_AGENTS.md +5 -5
  120. package/skills-library/_general/patterns-standards/cascading-failure-diagnosis.md +119 -0
  121. package/skills-library/_general/patterns-standards/domain-specific-layout-algorithms.md +209 -0
  122. package/skills-library/_general/patterns-standards/python-desktop-app-architecture.md +399 -0
  123. package/skills-library/_general/patterns-standards/realtime-monitoring-dashboard.md +457 -0
  124. package/skills-library/_general/patterns-standards/togglable-processing-pipeline.md +169 -0
  125. package/skills-library/_general/performance/liveclock-extraction.md +112 -0
  126. package/skills-library/_general/performance/ref-based-canvas-animation.md +117 -0
  127. package/skills-library/_general/performance/use-visible-interval.md +131 -0
  128. package/skills-library/_general/testing/playwright-firefox-withcredentials-auth-issue.md +104 -0
  129. package/skills-library/_quarantine/README.md +30 -0
  130. package/skills-library/api-patterns/BROADCAST_SCHEDULER_SHARED_EXECUTE_FUNCTION.md +150 -0
  131. package/skills-library/api-patterns/ERROR_RESPONSE_STANDARDS.md +145 -0
  132. package/skills-library/api-patterns/EXPRESS_ROUTE_ORDERING_MIDDLEWARE_INTERCEPTION.md +326 -0
  133. package/skills-library/api-patterns/PAGINATION_PATTERNS.md +137 -0
  134. package/skills-library/api-patterns/PODCAST_PROGRESS_TRACKING_THREE_ROOT_CAUSES.md +277 -0
  135. package/skills-library/api-patterns/RATE_LIMITING_TOGGLE.md +155 -0
  136. package/skills-library/api-patterns/graphql-content-queries.md +708 -0
  137. package/skills-library/appointment-scheduler-design.md +423 -0
  138. package/skills-library/automation/AUTO_POPULATE_COMPLETE_GUIDE.md +631 -0
  139. package/skills-library/automation/CC_WORKFLOW_STUDIO.md +83 -0
  140. package/skills-library/automation/CLAUDE_CODE_SWARM_MODE.md +95 -0
  141. package/skills-library/automation/DAEMON_TRIGGER_FILE_IPC.md +195 -0
  142. package/skills-library/automation/scheduled-content-publishing.md +608 -0
  143. package/skills-library/awesome-workflows/Blogging-Platform-Instructions/view_commands.md +25 -0
  144. package/skills-library/awesome-workflows/CREDENTIAL-SECURITY-WORKFLOW.md +109 -0
  145. package/skills-library/awesome-workflows/DEBUGGING-WORKFLOW.md +124 -0
  146. package/skills-library/awesome-workflows/Design-Review-Workflow/README.md +31 -0
  147. package/skills-library/awesome-workflows/Design-Review-Workflow/design-principles-example.md +129 -0
  148. package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-agent.md +107 -0
  149. package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-claude-md-snippet.md +24 -0
  150. package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-slash-command.md +38 -0
  151. package/skills-library/awesome-workflows/PARALLEL-RESEARCH-WORKFLOW.md +89 -0
  152. package/skills-library/awesome-workflows/PHASE-EXECUTION-WORKFLOW.md +97 -0
  153. package/skills-library/awesome-workflows/SESSION-HANDOFF-WORKFLOW.md +116 -0
  154. package/skills-library/cms-patterns/content-branch-preview.md +515 -0
  155. package/skills-library/cms-patterns/inline-visual-editing.md +666 -0
  156. package/skills-library/cms-patterns/mdx-component-content.md +649 -0
  157. package/skills-library/cms-patterns/media-manager-abstraction.md +827 -0
  158. package/skills-library/cms-patterns/schema-driven-form-generator.md +838 -0
  159. package/skills-library/complexity-metrics/complexity-divider.md +707 -0
  160. package/skills-library/complexity-metrics/work-with-complexity.md +193 -0
  161. package/skills-library/creative-multimedia/animation-stack-guide.md +577 -0
  162. package/skills-library/creative-multimedia/audio-enhancement-pipeline.md +625 -0
  163. package/skills-library/creative-multimedia/content-repurposing-pipeline.md +1146 -0
  164. package/skills-library/creative-multimedia/data-visualization-generator.md +862 -0
  165. package/skills-library/creative-multimedia/doc-to-podcast-pipeline.md +2184 -0
  166. package/skills-library/creative-multimedia/ffmpeg-command-generator.md +405 -0
  167. package/skills-library/creative-multimedia/image-optimization-pipeline.md +605 -0
  168. package/skills-library/creative-multimedia/multi-format-content-generator.md +1759 -0
  169. package/skills-library/creative-multimedia/og-image-generator.md +635 -0
  170. package/skills-library/creative-multimedia/podcast-audio-composition.md +1355 -0
  171. package/skills-library/creative-multimedia/podcast-quality-evaluation.md +1452 -0
  172. package/skills-library/creative-multimedia/podcast-script-generation.md +1841 -0
  173. package/skills-library/creative-multimedia/svg-generation.md +750 -0
  174. package/skills-library/creative-multimedia/text-to-speech-provider-selector.md +1414 -0
  175. package/skills-library/creative-multimedia/transcription-pipeline-selector.md +677 -0
  176. package/skills-library/creative-multimedia/video-streaming-setup.md +559 -0
  177. package/skills-library/database-solutions/AI_RESPONSE_DATABASE_CACHING.md +520 -0
  178. package/skills-library/database-solutions/CONDITIONAL_SQL_MIGRATION_PATTERN.md +119 -0
  179. package/skills-library/database-solutions/DATABASE_COLUMN_NAME_MISMATCH.md +393 -0
  180. package/skills-library/database-solutions/DATABASE_SCHEMA.md +394 -0
  181. package/skills-library/database-solutions/DATABASE_SCHEMA_VERIFICATION_GUIDE.md +348 -0
  182. package/skills-library/database-solutions/DATABASE_STRATEGY.md +71 -0
  183. package/skills-library/database-solutions/ES_MODULE_SEED_SCRIPT_PATTERN.md +52 -0
  184. package/skills-library/database-solutions/MIGRATION_GUIDE.md +3 -0
  185. package/skills-library/database-solutions/PLPGSQL_VARIABLE_CONFLICT_FIX.md +208 -0
  186. package/skills-library/database-solutions/POSTGRESQL_JSONB_DOUBLE_STRINGIFY_FIX.md +245 -0
  187. package/skills-library/database-solutions/POSTGRESQL_LICENSE_TABLE_DESIGN.md +393 -0
  188. package/skills-library/database-solutions/POSTGRESQL_UUID_DOCUMENT_RAG_DUAL_SCOPE.md +732 -0
  189. package/skills-library/database-solutions/POSTGRES_SQL_TEMPLATE_BINDING_ERROR.md +240 -0
  190. package/skills-library/database-solutions/PRISMA_DB_PUSH_DATA_LOSS_PREVENTION.md +141 -0
  191. package/skills-library/database-solutions/PRODUCTION_QUERY_OPTIMIZATION_RESTART_FIX.md +389 -0
  192. package/skills-library/database-solutions/RLS_SECURITY_GUIDE.md +107 -0
  193. package/skills-library/database-solutions/SCHEMA_ENHANCEMENTS_GUIDE.md +373 -0
  194. package/skills-library/database-solutions/SCHEMA_MIGRATION_GUIDE.md +368 -0
  195. package/skills-library/database-solutions/SCHEMA_VERIFICATION_QUICK_REFERENCE.md +104 -0
  196. package/skills-library/database-solutions/ai-erd-generator.md +1213 -0
  197. package/skills-library/database-solutions/content-publishing-states.md +631 -0
  198. package/skills-library/database-solutions/database-schema-designer.md +522 -0
  199. package/skills-library/database-solutions/er-diagram-components.md +569 -0
  200. package/skills-library/database-solutions/er-to-ddl-mapping.md +1405 -0
  201. package/skills-library/database-solutions/erd-creator-textbook-research.md +433 -0
  202. package/skills-library/database-solutions/erd-react-flow-architecture.md +1965 -0
  203. package/skills-library/database-solutions/mariadb-aggregate-function-replacement.md +145 -0
  204. package/skills-library/database-solutions/normalization-validator.md +778 -0
  205. package/skills-library/database-solutions/postgres-full-text-search-content.md +494 -0
  206. package/skills-library/database-solutions/postgresql-to-mysql-runtime-translation.md +286 -0
  207. package/skills-library/database-solutions/regex-alternation-ordering-sql-types.md +92 -0
  208. package/skills-library/database-solutions/reserved-word-context-aware-quoting.md +142 -0
  209. package/skills-library/database-solutions/sql-ddl-generator.md +756 -0
  210. package/skills-library/database-solutions/supabase-connection-pooler-fix.md +102 -0
  211. package/skills-library/deployment-security/CPANEL_NODE_DEPLOYMENT.md +166 -0
  212. package/skills-library/deployment-security/DEPLOYMENT.md +275 -0
  213. package/skills-library/deployment-security/DEPLOYMENT_CHECKLIST.md +363 -0
  214. package/skills-library/deployment-security/DEPLOYMENT_PLAN.md +669 -0
  215. package/skills-library/deployment-security/KNEX_DATABASE_ABSTRACTION.md +444 -0
  216. package/skills-library/deployment-security/LICENSE_KEY_SYSTEM.md +206 -0
  217. package/skills-library/deployment-security/NODE18_DEPENDENCY_COMPATIBILITY.md +284 -0
  218. package/skills-library/deployment-security/PHP_INSTALLER_WIZARD_GUIDE.md +315 -0
  219. package/skills-library/deployment-security/PM2_ENVIRONMENT_VARIABLE_CACHING.md +256 -0
  220. package/skills-library/deployment-security/PM2_MEMORY_EXHAUSTION_FIX.md +370 -0
  221. package/skills-library/deployment-security/PRODUCTION_DEPLOYMENT_GUIDE.md +592 -0
  222. package/skills-library/deployment-security/PRODUCTION_HARDENING_DOCUMENTATION.md +307 -0
  223. package/skills-library/deployment-security/PRODUCTION_RECOVERY_CHERRY_PICK_PATTERN.md +202 -0
  224. package/skills-library/deployment-security/PYINSTALLER_CUDA_WHISPER_BUNDLING.md +236 -0
  225. package/skills-library/deployment-security/SECURITY.md +41 -0
  226. package/skills-library/deployment-security/SMTP_SSL_HOSTNAME_MISMATCH_SHARED_HOSTING.md +220 -0
  227. package/skills-library/deployment-security/SPA_SEO_OPTIMIZATION_CPANEL.md +200 -0
  228. package/skills-library/deployment-security/SUPABASE_EDGE_FUNCTIONS.md +338 -0
  229. package/skills-library/deployment-security/VERCEL_GITHUB_DEPLOYMENT_GUIDE.md +858 -0
  230. package/skills-library/deployment-security/VPS_DEPLOYMENT_READINESS.md +356 -0
  231. package/skills-library/deployment-security/deployment-changes-not-applying.md +241 -0
  232. package/skills-library/deployment-security/env-file-management-production-local.md +203 -0
  233. package/skills-library/deployment-security/express-secure-file-downloads.md +413 -0
  234. package/skills-library/deployment-security/react-production-deployment-desktop-guide.md +2011 -0
  235. package/skills-library/deployment-security/self-hosted-supabase-coolify-guide.md +1684 -0
  236. package/skills-library/deployment-security/unique-features-ai-strategy-plaid-security.md +1613 -0
  237. package/skills-library/deployment-security/vps-deployment.md +135 -0
  238. package/skills-library/document-processing/WORD_EXPORT_MARKDOWN_FORMATTING.md +482 -0
  239. package/skills-library/document-processing/document-ai-landingai-integration.md +677 -0
  240. package/skills-library/document-processing/express-secure-file-downloads-mern.md +413 -0
  241. package/skills-library/document-processing/express-secure-file-downloads.md +413 -0
  242. package/skills-library/document-processing/md-to-word-converter.md +318 -0
  243. package/skills-library/document-processing/pdf-forms-integration/README.md +101 -0
  244. package/skills-library/document-processing/pdf-forms-integration/SKILL.md +662 -0
  245. package/skills-library/ecommerce/ADMIN_PRODUCTS_GUIDE.md +428 -0
  246. package/skills-library/ecommerce/ECOMMERCE_API_REFERENCE.md +776 -0
  247. package/skills-library/ecommerce/ECOMMERCE_COMPLETION_SUMMARY.md +673 -0
  248. package/skills-library/ecommerce/ECOMMERCE_IMPLEMENTATION_GUIDE.md +729 -0
  249. package/skills-library/ecommerce/ECOMMERCE_QUICK_REFERENCE.md +521 -0
  250. package/skills-library/ecommerce/ECOMMERCE_TESTING_CHECKLIST.md +565 -0
  251. package/skills-library/ecommerce/ECOMMERCE_WORKFLOW_GUIDE.md +1059 -0
  252. package/skills-library/ecommerce/PRODUCT_CREATION_EXPANDED.md +522 -0
  253. package/skills-library/ecommerce/agentic-commerce-protocol.md +203 -0
  254. package/skills-library/ecommerce/cart-abandonment-recovery.md +236 -0
  255. package/skills-library/ecommerce/cart-architecture-patterns.md +300 -0
  256. package/skills-library/ecommerce/cart-item-count-indicator.md +264 -0
  257. package/skills-library/ecommerce/checkout-ux-conversion.md +227 -0
  258. package/skills-library/ecommerce/composable-commerce-selection.md +166 -0
  259. package/skills-library/ecommerce/ecommerce-analytics-patterns.md +167 -0
  260. package/skills-library/ecommerce/fraud-detection-patterns.md +179 -0
  261. package/skills-library/ecommerce/inventory-stock-management.md +270 -0
  262. package/skills-library/ecommerce/order-saga-state-machine.md +336 -0
  263. package/skills-library/ecommerce/payment-provider-abstraction.md +245 -0
  264. package/skills-library/ecommerce/pci-compliance-checklist.md +192 -0
  265. package/skills-library/ecommerce/refund-chargeback-handling.md +177 -0
  266. package/skills-library/ecommerce/shipping-carrier-integration.md +218 -0
  267. package/skills-library/ecommerce/webhook-idempotency-patterns.md +253 -0
  268. package/skills-library/excalidraw-diagrams/.github/workflows/ci.yml +558 -0
  269. package/skills-library/excalidraw-diagrams/.github/workflows/prompt-gallery.yml +448 -0
  270. package/skills-library/excalidraw-diagrams/.github/workflows/release.yml +42 -0
  271. package/skills-library/excalidraw-diagrams/.github/workflows/test-reusable-ci.yml +25 -0
  272. package/skills-library/excalidraw-diagrams/CLAUDE.md +57 -0
  273. package/skills-library/excalidraw-diagrams/LICENSE +21 -0
  274. package/skills-library/excalidraw-diagrams/README.md +178 -0
  275. package/skills-library/excalidraw-diagrams/SKILL.md +715 -0
  276. package/skills-library/form-solutions/BUTTON_TYPE_FORM_SUBMISSION.md +336 -0
  277. package/skills-library/form-solutions/FILLABLE_PDF_IMPLEMENTATION.md +226 -0
  278. package/skills-library/form-solutions/SURVEYJS_QUESTIONNAIRE_SYSTEM.md +367 -0
  279. package/skills-library/form-solutions/tiptap-minimal-setup.md +690 -0
  280. package/skills-library/frontend/scholarly-classification-bubble-map.md +149 -0
  281. package/skills-library/infrastructure/ci-cd-pipeline-builder.md +517 -0
  282. package/skills-library/infrastructure/observability-designer.md +264 -0
  283. package/skills-library/infrastructure/performance-profiler.md +621 -0
  284. package/skills-library/installer-wizard-patterns.md +249 -0
  285. package/skills-library/integrations/CLAUDE_CODE_TOKEN_ANALYTICS.md +160 -0
  286. package/skills-library/integrations/CONFIGURABLE_AI_PROVIDER_SELECTION.md +728 -0
  287. package/skills-library/integrations/SOCKET_IO_BROADCAST_ALL_VS_ROOM.md +141 -0
  288. package/skills-library/integrations/VIRTUAL_MEETINGS_IMPLEMENTATION.md +374 -0
  289. package/skills-library/integrations/WORDPRESS_LEARNDASH_DATA_RECOVERY.md +53 -0
  290. package/skills-library/integrations/YOUTUBE_API_SETUP.md +141 -0
  291. package/skills-library/integrations/YOUTUBE_BOOKMARKING_EXPLANATION.md +252 -0
  292. package/skills-library/integrations/YOUTUBE_BOOKMARKING_SOLUTION.md +268 -0
  293. package/skills-library/integrations/YOUTUBE_OAUTH_SETUP_GUIDE.md +200 -0
  294. package/skills-library/integrations/YOUTUBE_VIDEO_FIX_COMPLETE.md +192 -0
  295. package/skills-library/integrations/ai-ml/GEMINI_AI_RAG_PIPELINE_COMPLETE_GUIDE.md +195 -0
  296. package/skills-library/integrations/ai-ml/GEMINI_IMAGE_GENERATION_SETUP.md +64 -0
  297. package/skills-library/integrations/cloudflare/cloudflare-turnstile-debugging.md +202 -0
  298. package/skills-library/integrations/cloudflare/cloudflare-turnstile-implementation.md +476 -0
  299. package/skills-library/integrations/cloudflare-turnstile-debugging.md +202 -0
  300. package/skills-library/integrations/cloudflare-turnstile-implementation.md +476 -0
  301. package/skills-library/integrations/ghost-creator-monetization-pattern.md +454 -0
  302. package/skills-library/integrations/headless-cms-architecture.md +484 -0
  303. package/skills-library/integrations/headless-cms-stack-selection.md +183 -0
  304. package/skills-library/integrations/payload-cms-patterns.md +674 -0
  305. package/skills-library/integrations/realtimestt-openwakeword-cuda-windows.md +229 -0
  306. package/skills-library/integrations/rss-podcast-integration.md +300 -0
  307. package/skills-library/integrations/wordpress/WORDPRESS_LEARNDASH_DATA_RECOVERY.md +53 -0
  308. package/skills-library/integrations/youtube/YOUTUBE_API_SETUP.md +141 -0
  309. package/skills-library/integrations/youtube/YOUTUBE_BOOKMARKING_EXPLANATION.md +252 -0
  310. package/skills-library/integrations/youtube/YOUTUBE_BOOKMARKING_SOLUTION.md +268 -0
  311. package/skills-library/integrations/youtube/YOUTUBE_OAUTH_SETUP_GUIDE.md +200 -0
  312. package/skills-library/integrations/youtube/YOUTUBE_VIDEO_FIX_COMPLETE.md +192 -0
  313. package/skills-library/marketing/campaign-analytics.md +97 -0
  314. package/skills-library/marketing/content-creator.md +105 -0
  315. package/skills-library/marketing/marketing-strategy-pmm.md +94 -0
  316. package/skills-library/marketing/social-media-analyzer.md +81 -0
  317. package/skills-library/methodology/ADVANCED_ORCHESTRATION_PATTERNS.md +401 -0
  318. package/skills-library/methodology/AGENT_SELF_IMPROVEMENT_LOOP.md +179 -0
  319. package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +1 -1
  320. package/skills-library/methodology/CLEANSING_CYCLE.md +358 -0
  321. package/skills-library/methodology/CONFIDENCE_ANNOTATION_PATTERN.md +143 -0
  322. package/skills-library/methodology/CRITICAL_PATTERNS_DOCUMENTATION_COMPLETE.md +204 -0
  323. package/skills-library/methodology/DELIVERABLES_SUMMARY.md +341 -0
  324. package/skills-library/methodology/DIFFICULTY_AWARE_AGENT_ROUTING.md +252 -0
  325. package/skills-library/methodology/EVOLUTIONARY_SKILL_SYNTHESIS.md +219 -0
  326. package/skills-library/methodology/GLOMERULUS_DECISION_GATE.md +223 -0
  327. package/skills-library/methodology/HIBERNATION_SYSTEM.md +231 -0
  328. package/skills-library/methodology/INSTRUMENTATION_OVER_RESTRICTION.md +192 -0
  329. package/skills-library/methodology/MASTER_COMPLETION_SUMMARY.md +444 -0
  330. package/skills-library/methodology/MASTER_SESSION_COMPLETION.md +743 -0
  331. package/skills-library/methodology/MERN_QUICK_REFERENCE.md +358 -0
  332. package/skills-library/methodology/ORGAN_AGENT_MAPPING.md +177 -0
  333. package/skills-library/methodology/PARALLEL_WAVE_BASED_REFACTORING.md +440 -0
  334. package/skills-library/methodology/QUICK_REFERENCE.md +358 -0
  335. package/skills-library/methodology/SDFT_ONPOLICY_SELF_DISTILLATION.md +186 -0
  336. package/skills-library/methodology/SELF_QUESTIONING_TASK_GENERATION.md +270 -0
  337. package/skills-library/methodology/SESSION_COMPLETION_SUMMARY.md +304 -0
  338. package/skills-library/methodology/SESSION_SUMMARY.md +432 -0
  339. package/skills-library/methodology/WARRIOR_WORKFLOW_DEBUGGING_PROTOCOL.md +252 -0
  340. package/skills-library/methodology/tech-debt-tracker.md +570 -0
  341. package/skills-library/parallel-debug/SKILL.md +60 -0
  342. package/skills-library/patterns-standards/API_PATTERN_FIX_SUMMARY.md +236 -0
  343. package/skills-library/patterns-standards/BATCH_OPERATIONS_WITH_PROGRESS_MODAL.md +362 -0
  344. package/skills-library/patterns-standards/CRITICAL_CODING_PATTERNS.md +639 -0
  345. package/skills-library/patterns-standards/DARK_MODE_MODAL_VISIBILITY.md +258 -0
  346. package/skills-library/patterns-standards/ERROR_RESILIENCE_IMPLEMENTATION.md +375 -0
  347. package/skills-library/patterns-standards/ES_MODULE_IMPORT_HOISTING_DOTENV.md +298 -0
  348. package/skills-library/patterns-standards/NESTED_BACKDROP_FILTER_CSS_ARTIFACT_FIX.md +76 -0
  349. package/skills-library/patterns-standards/ORDERED_DETECTOR_PIPELINE_GRACEFUL_FALLBACK.md +333 -0
  350. package/skills-library/patterns-standards/PHASE_IMPORT_ERROR_DEBUGGING.md +271 -0
  351. package/skills-library/patterns-standards/PYNPUT_GLOBAL_HOTKEY_VK_MATCHING.md +252 -0
  352. package/skills-library/patterns-standards/REACT_USEEFFECT_CASCADE_RESET_FIX.md +132 -0
  353. package/skills-library/patterns-standards/SUBMENU_HOVER_DROPDOWN_PATTERN.md +225 -0
  354. package/skills-library/patterns-standards/TAILWIND_TEXT_VISIBILITY_OVERRIDE.md +322 -0
  355. package/skills-library/patterns-standards/THEME_AWARE_CSS_VARIABLES_PATTERN.md +209 -0
  356. package/skills-library/patterns-standards/THEME_USER_OBJECT_PROPERTY_NAMING.md +194 -0
  357. package/skills-library/patterns-standards/TOOLTIP_BLOCKING_CLICKS_FIX.md +267 -0
  358. package/skills-library/patterns-standards/claude-code-plugin-structure.md +235 -0
  359. package/skills-library/patterns-standards/react-i18next-setup.md +429 -0
  360. package/skills-library/patterns-standards/thesys-c1-generative-ui-integration.md +967 -0
  361. package/skills-library/plugin-development/CLAUDE_CODE_COMMAND_REGISTRATION_SILENT_FAILURE.md +315 -0
  362. package/skills-library/plugin-development/plugin-command-namespace-vs-global.md +390 -0
  363. package/skills-library/plugin-development/plugin-doc-auto-generation.md +172 -0
  364. package/skills-library/security/GITHUB_REPO_SECURITY_AUDIT.md +115 -0
  365. package/skills-library/security/admin-deletion-safety.md +396 -0
  366. package/skills-library/security/application-vuln-patterns.md +477 -0
  367. package/skills-library/security/env-secrets-manager.md +686 -0
  368. package/skills-library/security/secure-ai-application-templates.md +347 -0
  369. package/skills-library/security/sql-injection-prevention-postgresjs.md +151 -0
  370. package/skills-library/supabase-connection-pooler-fix.md +102 -0
  371. package/skills-library/system-context/POWERSHELL_BASH_INTEROP.md +82 -0
  372. package/skills-library/system-context/SERVICE_LIFECYCLE_MANAGEMENT.md +119 -0
  373. package/skills-library/system-context/SKILL.md +40 -0
  374. package/skills-library/system-context/WINDOWS_DEV_ENVIRONMENT.md +73 -0
  375. package/skills-library/testing/E2E_PLAYWRIGHT_PATTERNS.md +99 -0
  376. package/skills-library/testing/INTEGRATION_TEST_STRATEGY.md +82 -0
  377. package/skills-library/testing/RED_GREEN_BUGFIX_GATE.md +203 -0
  378. package/skills-library/testing/TEST_DATA_MANAGEMENT.md +69 -0
  379. package/skills-library/testing/VITEST_UNIT_TEST_PATTERNS.md +75 -0
  380. package/skills-library/testing/playwright-api-security-tests.md +202 -0
  381. package/skills-library/toolbox/SKILL.md +84 -0
  382. package/skills-library/toolbox/code-graph-and-web-scraping-mcps.md +237 -0
  383. package/skills-library/ui-ux-pro-max/ACCESSIBILITY_ESSENTIALS.md +115 -0
  384. package/skills-library/ui-ux-pro-max/DESIGN_SYSTEM_SCAFFOLDING.md +133 -0
  385. package/skills-library/ui-ux-pro-max/RESPONSIVE_LAYOUT_PATTERNS.md +119 -0
  386. package/skills-library/ui-ux-pro-max/SKILL.md +386 -0
  387. package/skills-library/ui-ux-pro-max/data/charts.csv +26 -0
  388. package/skills-library/ui-ux-pro-max/data/colors.csv +97 -0
  389. package/skills-library/ui-ux-pro-max/data/icons.csv +101 -0
  390. package/skills-library/ui-ux-pro-max/data/landing.csv +31 -0
  391. package/skills-library/ui-ux-pro-max/data/products.csv +97 -0
  392. package/skills-library/ui-ux-pro-max/data/react-performance.csv +45 -0
  393. package/skills-library/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  394. package/skills-library/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  395. package/skills-library/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  396. package/skills-library/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  397. package/skills-library/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  398. package/skills-library/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  399. package/skills-library/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  400. package/skills-library/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  401. package/skills-library/ui-ux-pro-max/data/stacks/react.csv +54 -0
  402. package/skills-library/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  403. package/skills-library/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  404. package/skills-library/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  405. package/skills-library/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  406. package/skills-library/ui-ux-pro-max/data/styles.csv +68 -0
  407. package/skills-library/ui-ux-pro-max/data/typography.csv +58 -0
  408. package/skills-library/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  409. package/skills-library/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  410. package/skills-library/ui-ux-pro-max/data/web-interface.csv +31 -0
  411. package/skills-library/wordpress-style-theme-components.md +1526 -0
  412. package/templates/ASSUMPTIONS.md +1 -1
  413. package/templates/DECISION_LOG.md +0 -1
  414. package/templates/phase-prompt.md +1 -1
  415. package/templates/phoenix-comparison.md +6 -6
  416. package/templates/skill-api-integration.md +106 -0
  417. package/templates/skill-architecture-pattern.md +92 -0
  418. package/templates/skill-debug-pattern.md +98 -0
  419. package/templates/skill-devops-recipe.md +107 -0
  420. package/templates/skill-general.md +65 -0
  421. package/templates/skill-ui-component.md +113 -0
  422. package/tools/uat-runner.py +179 -0
  423. package/version.json +7 -3
  424. package/workflows/handoff-session.md +2 -2
  425. package/workflows/new-project.md +2 -2
  426. package/workflows/plan-phase.md +1 -1
  427. package/.claude-plugin/plugin.json +0 -64
  428. package/skills-library/_general/methodology/LIVE_BREADCRUMB_PROTOCOL.md +0 -242
  429. package/skills-library/_general/methodology/llm-judge-memory-crud.md +0 -241
  430. package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +0 -183
  431. package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +0 -263
  432. package/skills-library/methodology/SABBATH_REST_PATTERN.md +0 -267
  433. package/skills-library/methodology/STONE_AND_SCAFFOLD.md +0 -220
  434. package/skills-library/specialists/api-architecture/api-designer.md +0 -49
  435. package/skills-library/specialists/api-architecture/graphql-architect.md +0 -49
  436. package/skills-library/specialists/api-architecture/mcp-developer.md +0 -51
  437. package/skills-library/specialists/api-architecture/microservices-architect.md +0 -50
  438. package/skills-library/specialists/api-architecture/websocket-engineer.md +0 -48
  439. package/skills-library/specialists/backend/django-expert.md +0 -52
  440. package/skills-library/specialists/backend/fastapi-expert.md +0 -52
  441. package/skills-library/specialists/backend/laravel-specialist.md +0 -52
  442. package/skills-library/specialists/backend/nestjs-expert.md +0 -51
  443. package/skills-library/specialists/backend/rails-expert.md +0 -53
  444. package/skills-library/specialists/backend/spring-boot-engineer.md +0 -56
  445. package/skills-library/specialists/data-ml/fine-tuning-expert.md +0 -48
  446. package/skills-library/specialists/data-ml/ml-pipeline.md +0 -47
  447. package/skills-library/specialists/data-ml/pandas-pro.md +0 -47
  448. package/skills-library/specialists/data-ml/rag-architect.md +0 -51
  449. package/skills-library/specialists/data-ml/spark-engineer.md +0 -47
  450. package/skills-library/specialists/frontend/angular-architect.md +0 -52
  451. package/skills-library/specialists/frontend/flutter-expert.md +0 -51
  452. package/skills-library/specialists/frontend/nextjs-developer.md +0 -54
  453. package/skills-library/specialists/frontend/react-native-expert.md +0 -50
  454. package/skills-library/specialists/frontend/vue-expert.md +0 -51
  455. package/skills-library/specialists/infrastructure/chaos-engineer.md +0 -74
  456. package/skills-library/specialists/infrastructure/cloud-architect.md +0 -70
  457. package/skills-library/specialists/infrastructure/database-optimizer.md +0 -64
  458. package/skills-library/specialists/infrastructure/devops-engineer.md +0 -70
  459. package/skills-library/specialists/infrastructure/kubernetes-specialist.md +0 -52
  460. package/skills-library/specialists/infrastructure/monitoring-expert.md +0 -70
  461. package/skills-library/specialists/infrastructure/sre-engineer.md +0 -70
  462. package/skills-library/specialists/infrastructure/terraform-engineer.md +0 -51
  463. package/skills-library/specialists/languages/cpp-pro.md +0 -74
  464. package/skills-library/specialists/languages/csharp-developer.md +0 -69
  465. package/skills-library/specialists/languages/dotnet-core-expert.md +0 -54
  466. package/skills-library/specialists/languages/golang-pro.md +0 -51
  467. package/skills-library/specialists/languages/java-architect.md +0 -49
  468. package/skills-library/specialists/languages/javascript-pro.md +0 -68
  469. package/skills-library/specialists/languages/kotlin-specialist.md +0 -68
  470. package/skills-library/specialists/languages/php-pro.md +0 -49
  471. package/skills-library/specialists/languages/python-pro.md +0 -52
  472. package/skills-library/specialists/languages/react-expert.md +0 -51
  473. package/skills-library/specialists/languages/rust-engineer.md +0 -50
  474. package/skills-library/specialists/languages/sql-pro.md +0 -56
  475. package/skills-library/specialists/languages/swift-expert.md +0 -69
  476. package/skills-library/specialists/languages/typescript-pro.md +0 -51
  477. package/skills-library/specialists/platform/atlassian-mcp.md +0 -52
  478. package/skills-library/specialists/platform/embedded-systems.md +0 -53
  479. package/skills-library/specialists/platform/game-developer.md +0 -53
  480. package/skills-library/specialists/platform/salesforce-developer.md +0 -53
  481. package/skills-library/specialists/platform/shopify-expert.md +0 -49
  482. package/skills-library/specialists/platform/wordpress-pro.md +0 -49
  483. package/skills-library/specialists/quality/code-documenter.md +0 -51
  484. package/skills-library/specialists/quality/code-reviewer.md +0 -67
  485. package/skills-library/specialists/quality/debugging-wizard.md +0 -51
  486. package/skills-library/specialists/quality/fullstack-guardian.md +0 -51
  487. package/skills-library/specialists/quality/legacy-modernizer.md +0 -50
  488. package/skills-library/specialists/quality/playwright-expert.md +0 -65
  489. package/skills-library/specialists/quality/spec-miner.md +0 -56
  490. package/skills-library/specialists/quality/test-master.md +0 -65
  491. package/skills-library/specialists/security/secure-code-guardian.md +0 -55
  492. package/skills-library/specialists/security/security-reviewer.md +0 -53
  493. package/skills-library/specialists/workflow/architecture-designer.md +0 -53
  494. package/skills-library/specialists/workflow/cli-developer.md +0 -70
  495. package/skills-library/specialists/workflow/feature-forge.md +0 -65
  496. package/skills-library/specialists/workflow/prompt-engineer.md +0 -54
  497. package/skills-library/specialists/workflow/the-fool.md +0 -62
  498. /package/skills-library/{performance → _general/performance}/cache-augmented-generation.md +0 -0
  499. /package/skills-library/{debugging → parallel-debug}/FAILURE_TAXONOMY_CLASSIFICATION.md +0 -0
  500. /package/skills-library/{debugging → parallel-debug}/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +0 -0
@@ -1,1356 +1,2046 @@
1
- ---
2
- description: Execute a phase with breath-based parallelism and honesty protocols
3
- ---
4
-
5
- # /fire-3-execute
6
-
7
- > Execute phase N with breath-based parallelization and honesty protocols
8
-
9
- ---
10
-
11
- ## Purpose
12
-
13
- Execute all plans in a specified phase using breath-based parallel execution. Each plan is handled by a fire-executor agent that applies honesty protocols, references skills, and creates unified handoff documents. After execution completes, a fire-verifier validates the work.
14
-
15
- ---
16
-
17
- ## Arguments
18
-
19
- ```yaml
20
- arguments:
21
- phase_number:
22
- required: true
23
- type: integer
24
- description: "Phase number to execute (e.g., 1, 2, 3)"
25
- example: "/fire-3-execute 3"
26
-
27
- optional_flags:
28
- --breath: "Execute only a specific breath (e.g., --breath 2)"
29
- --plan: "Execute only a specific plan (e.g., --plan 03-02)"
30
- --skip-verify: "Skip verification after execution (not recommended)"
31
- --continue: "Continue from last checkpoint (for interrupted execution)"
32
- --auto-continue: "Enable Double-Shot Latte pattern - no 'continue?' interrupts"
33
- --skip-review: "Skip the parallel code review (not recommended)"
34
- --autonomous: "Auto-route merge gate verdicts without human checkpoints (DEFAULT in v10.0, used by /fire-autonomous)"
35
- --manual: "Opt-in to human checkpoints at merge gate (v9.0 behavior)"
36
- --worktree: "Use git worktree isolation for parallel breath execution (v10.0)"
37
- --model-split: "Force architect/editor model split for all tasks (v10.0)"
38
- ```
39
-
40
- ---
41
-
42
- ## Auto-Continuation Mode (Double-Shot Latte Pattern)
43
-
44
- When `--auto-continue` is enabled, execution proceeds without "continue?" interrupts:
45
-
46
- ```
47
- ┌─────────────────────────────────────────────────────────────────────────────┐
48
- │ AUTO-CONTINUATION ACTIVE │
49
- ├─────────────────────────────────────────────────────────────────────────────┤
50
- │ │
51
- │ Breath completion → Automatic checkpoint → Next breath starts immediately │
52
- │ │
53
- │ Benefits: │
54
- │ • Uninterrupted execution flow │
55
- │ • Faster phase completion │
56
- │ • Progress saved at each breath checkpoint │
57
- │ │
58
- │ Safety: │
59
- │ • Checkpoints created between breaths │
60
- │ • Can resume from any breath if interrupted │
61
- │ • Blocking errors still pause execution │
62
- │ │
63
- └─────────────────────────────────────────────────────────────────────────────┘
64
- ```
65
-
66
- **Usage:**
67
- ```bash
68
- # Full auto-execution (review is on by default in v8.0)
69
- /fire-3-execute 2 --auto-continue
70
- ```
71
-
72
- ---
73
-
74
- ## Process
75
-
76
- ### Step 1: Load Context (Dominion Flow Standard)
77
-
78
- ```
79
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
80
- DOMINION FLOW > PHASE {N} EXECUTION
81
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
82
- ```
83
-
84
- **Load CONSCIENCE.md:**
85
- ```markdown
86
- @.planning/CONSCIENCE.md
87
- ```
88
-
89
- **Extract:**
90
- - Current phase and status
91
- - Completed plans (if resuming)
92
- - Session context
93
-
94
- ### Step 2: Discover Plans (Dominion Flow Standard)
95
-
96
- **Scan for plans:**
97
- ```bash
98
- .planning/phases/{N}-{name}/{N}-*-BLUEPRINT.md
99
- ```
100
-
101
- **Build execution manifest:**
102
- ```markdown
103
- ## Phase {N} Execution Manifest
104
-
105
- ### Plans Discovered
106
- | Plan | Name | Breath | Dependencies | Status |
107
- |------|------|------|--------------|--------|
108
- | {N}-01 | {name} | 1 | none | pending |
109
- | {N}-02 | {name} | 1 | none | pending |
110
- | {N}-03 | {name} | 2 | {N}-01 | pending |
111
- ```
112
-
113
- ### Step 3: Group by Breath (Dominion Flow Standard)
114
-
115
- **Breath Grouping Rules:**
116
- - Plans in same breath execute in parallel
117
- - Breath N+1 waits for Breath N to complete
118
- - Dependencies must be in earlier breaths
119
-
120
- **Display:**
121
- ```
122
- â—† Execution Plan
123
- Breath 1: 2 plans (parallel)
124
- ├─ {N}-01: {name}
125
- └─ {N}-02: {name}
126
- Breath 2: 1 plan
127
- └─ {N}-03: {name} (depends on {N}-01)
128
- ```
129
-
130
- ### Step 3.5: Path Verification Gate (MANDATORY — v5.0)
131
-
132
- **Research basis:** SDFT (MIT, 2026) — recovery from own errors > memorizing expert paths.
133
- **Trigger:** The wrong-repo incident (subagent explored `my-other-project` instead of `MY-PROJECT`).
134
-
135
- **Before ANY file operation, verify these HARD GATES (no confidence override):**
136
-
137
- ```
138
- PATH VERIFICATION — ALWAYS RUN (not confidence-gated)
139
-
140
- 1. WORKING DIRECTORY CHECK
141
- expected_project = extract from CONSCIENCE.md or VISION.md
142
- actual_cwd = pwd
143
- IF actual_cwd does NOT contain expected_project path:
144
- → HARD STOP. Display:
145
- "WRONG DIRECTORY: Expected {expected}, got {actual_cwd}"
146
- "Aborting to prevent cross-project contamination."
147
-
148
- 2. SUBAGENT PATH INJECTION
149
- When spawning ANY subagent (Task tool), ALWAYS include:
150
- <path_constraint>
151
- MANDATORY: All file operations MUST be within:
152
- {project_root_path}
153
-
154
- VERIFY before every Read/Write/Edit/Bash:
155
- - File path starts with {project_root_path}
156
- - No ../../ escapes above project root
157
- - Bash commands operate on correct directory
158
-
159
- If you find yourself in the wrong directory: STOP immediately.
160
- Do NOT read, edit, or delete files outside the project.
161
- </path_constraint>
162
-
163
- 3. DELETION SAFETY
164
- Before deleting files, verify:
165
- - File path is within project root (absolute path check)
166
- - File is not in the "keep" list (shared services, core files)
167
- - Count matches: planned deletions == actual files found
168
- - If count mismatch: STOP and report discrepancy
169
- (e.g., "Plan says 28, found 27 — investigate missing file")
170
-
171
- 4. CROSS-PROJECT CONTAMINATION CHECK
172
- If multiple working directories exist in session:
173
- - Explicitly name the TARGET project in every tool call
174
- - Never use relative paths that could resolve to wrong project
175
- - Log which project each operation targets
176
- ```
177
-
178
- **Why this is mandatory (not confidence-gated):**
179
- Confidence gates allow override at HIGH confidence. Path verification does NOT.
180
- A subagent editing the wrong repo at 95% confidence is still catastrophic.
181
- This gate is a circuit breaker, not a confidence check.
182
-
183
- ### Step 3.6: Select Execution Mode (Automatic)
184
-
185
- **For each breath, automatically determine execution strategy.**
186
-
187
- See `@references/execution-mode-intelligence.md` for full algorithm.
188
-
189
- ```
190
- FOR each breath:
191
- plans_in_wave = plans with matching breath number
192
- file_sets = [plan.files_modified for each plan]
193
-
194
- IF plans_in_wave.count == 1:
195
- MODE = SEQUENTIAL
196
-
197
- ELIF plans_in_wave.count >= 3 AND no file overlap between plans:
198
- MODE = SWARM
199
- Compose team: Backend/Frontend/Test specialists based on file patterns
200
-
201
- ELIF plans_in_wave.count >= 2 AND no file overlap:
202
- MODE = SUBAGENT (Task tool parallelism)
203
-
204
- ELIF plans_in_wave.count >= 2 AND file overlap detected:
205
- MODE = SEQUENTIAL (serialize to avoid conflicts)
206
-
207
- ELSE:
208
- MODE = SEQUENTIAL (safe default)
209
- ```
210
-
211
- **Display mode decision:**
212
- ```
213
- +---------------------------------------------------------------+
214
- | EXECUTION MODE: [SWARM/SUBAGENT/SEQUENTIAL] |
215
- +---------------------------------------------------------------+
216
- | Breath {W}: {N} plans |
217
- | File overlap: [None/Detected] |
218
- | Rationale: [why this mode was selected] |
219
- | |
220
- | [If SWARM:] |
221
- | Team composition: |
222
- | Backend Agent: Plan {N}-01 (API work) |
223
- | Frontend Agent: Plan {N}-02 (UI work) |
224
- | Test Agent: Plan {N}-03 (test work) |
225
- +-----------------------------------------------------------------+
226
- ```
227
-
228
- **Override flags:** `--swarm`, `--sequential`, or `--subagent` force a specific mode.
229
-
230
- **Fallback chain:** SWARM -> SUBAGENT -> SEQUENTIAL (if higher mode unavailable or fails).
231
-
232
- ### Step 3.7: Git Worktree Isolation (v10.0 Optional)
233
-
234
- > **Research basis (v10.0):** Cursor's worktree isolation pattern (2025-2026) — parallel agents
235
- > working in isolated git worktrees prevent file conflicts without coordination overhead.
236
- > Google/MIT Scaling Laws (Dec 2025) confirm: isolation removes the 39-70% degradation from
237
- > shared-state contention in parallelizable tasks.
238
-
239
- **When `--worktree` flag is set OR execution mode is SWARM/SUBAGENT:**
240
-
241
- ```
242
- FOR each parallel agent in breath:
243
- # Create isolated worktree
244
- branch_name = "fire-execute/{plan_id}"
245
- worktree_path = ".claude/worktrees/{plan_id}"
246
-
247
- git worktree add -b {branch_name} {worktree_path} HEAD
248
-
249
- # Agent works in isolated copy
250
- agent.working_directory = {worktree_path}
251
- agent.path_constraint = {worktree_path}
252
-
253
- AFTER all agents in breath complete:
254
- # Merge worktree branches back to main
255
- FOR each completed worktree:
256
- git merge --no-ff {branch_name}
257
-
258
- IF merge conflict:
259
- Log conflict files
260
- Attempt auto-resolution (accept both sides for additive changes)
261
- → If unresolvable: flag for human review
262
-
263
- # Clean up
264
- git worktree remove {worktree_path}
265
- git branch -d {branch_name}
266
- ```
267
-
268
- **Benefits over shared-state coordination:**
269
- - Zero file conflicts between parallel agents (each has own copy)
270
- - No `.shared-state.json` needed — git merge handles integration
271
- - Atomic: if one agent fails, its worktree is discarded without affecting others
272
- - Rollback: `git worktree remove` cleanly reverts any agent's work
273
-
274
- **When NOT to use worktrees:**
275
- - SEQUENTIAL mode (no parallelism needed)
276
- - Single-plan breaths (no contention possible)
277
- - Tasks that need to see each other's changes in real-time
278
-
279
- ### Inter-Agent Coordination (SWARM mode)
280
-
281
- When running in SWARM mode, agents coordinate via `.planning/.shared-state.json`:
282
-
283
- - **Before creating new types/interfaces/exports,** check if another agent already created it by reading `.planning/.shared-state.json`. Duplicate type definitions across agents cause merge conflicts.
284
- - **Append discoveries** to the shared state file using atomic writes. Each agent writes its own key (e.g., `"backend": { "exports": [...] }`).
285
- - **If a file conflict is detected** (two agents modified the same file), PAUSE and log a coordination request in the shared state: `"conflicts": [{ "file": "...", "agents": ["backend", "frontend"] }]`.
286
- - **The Team Lead periodically checks** shared state and resolves conflicts by assigning the contested file to a single agent.
287
-
288
- ```json
289
- // .planning/.shared-state.json example
290
- {
291
- "backend": {
292
- "exports": ["UserService", "AuthMiddleware"],
293
- "files_modified": ["src/services/user.ts", "src/middleware/auth.ts"]
294
- },
295
- "frontend": {
296
- "exports": ["UserContext", "LoginForm"],
297
- "files_modified": ["src/contexts/user.tsx", "src/components/LoginForm.tsx"]
298
- },
299
- "conflicts": []
300
- }
301
- ```
302
-
303
- ### Reasoning Trace Sharing (MAKER v9.1)
304
-
305
- > **Research basis:** MAKER (2025) — Multi-Agent Knowledge Exchange and Reasoning.
306
- > Agents sharing intermediate reasoning (not just outputs) produce better coordinated results.
307
-
308
- In SWARM mode, agents write reasoning traces to shared state so other agents can build on their decisions.
309
-
310
- **Extended shared-state.json structure:**
311
-
312
- ```json
313
- {
314
- "backend": {
315
- "exports": ["UserService", "AuthMiddleware"],
316
- "files_modified": ["src/services/user.ts"],
317
- "reasoning": [
318
- { "step": "Chose connection pooling over per-request", "why": "10+ concurrent queries expected", "confidence": 85 },
319
- { "step": "Added index on user_id", "why": "JOIN was full table scan", "confidence": 95 }
320
- ]
321
- },
322
- "frontend": {
323
- "exports": ["UserContext"],
324
- "files_modified": ["src/contexts/user.tsx"],
325
- "reasoning": [
326
- { "step": "Used React Query over useState+useEffect", "why": "Backend noted 10+ concurrent queries — caching prevents redundant fetches", "confidence": 90 }
327
- ]
328
- }
329
- }
330
- ```
331
-
332
- **Add to SWARM executor prompt:**
333
-
334
- ```
335
- <shared_reasoning>
336
- Before making architectural decisions, READ .planning/.shared-state.json for reasoning
337
- from other agents. Your decisions should be informed by their context.
338
-
339
- After each significant decision, APPEND to your reasoning array:
340
- { "step": "what you decided", "why": "rationale", "confidence": N }
341
-
342
- Focus on decisions that OTHER agents would benefit from knowing about —
343
- API contracts, data shapes, library choices, performance trade-offs.
344
- </shared_reasoning>
345
- ```
346
-
347
- ### Architect/Editor Model Split (v10.0)
348
-
349
- > **Research basis (v10.0):** Aider's dual-model architecture (2025-2026) strong model
350
- > plans changes as a structured diff spec, fast model applies them. Achieves 85% on
351
- > SWE-bench by separating reasoning from execution. Anthropic's own model tiering
352
- > (Opus/Sonnet/Haiku) makes this practical without additional API setup.
353
-
354
- **When `--model-split` flag is set OR task difficulty is COMPLEX:**
355
-
356
- ```
357
- ARCHITECT PHASE (Opus — strong reasoning):
358
- Input: BLUEPRINT.md task description + relevant source files
359
- Output: Structured change specification:
360
-
361
- ## Change Spec for Task {N}
362
- ### File: {path}
363
- - Action: CREATE | MODIFY | DELETE
364
- - Location: line {N} (for MODIFY)
365
- - Change: {description of what to change and why}
366
- - New code sketch: {pseudocode or key logic}
367
- ### Dependencies: {files that must exist first}
368
- ### Verification: {how to confirm the change works}
369
-
370
- EDITOR PHASE (Haiku — fast execution):
371
- Input: Change spec from Architect + source files
372
- Output: Actual file edits using Edit/Write tools
373
-
374
- Rules for Editor:
375
- - Follow change spec EXACTLY — do not deviate
376
- - If spec is ambiguous: ask Architect (not user)
377
- - If spec is impossible: report back with reason
378
- - Apply code comments standard v3.2 to all changes
379
- ```
380
-
381
- **Model routing by difficulty (automatic):**
382
-
383
- | Difficulty | Architect | Editor | Rationale |
384
- |-----------|-----------|--------|-----------|
385
- | SIMPLE | skip | Haiku | No planning needed, direct edit |
386
- | MODERATE | Sonnet | Haiku | Balance of reasoning + speed |
387
- | COMPLEX | Opus | Sonnet | Maximum reasoning + reliable execution |
388
-
389
- **Cost savings:** ~60% of tasks are SIMPLE (Haiku only). MODERATE tasks use Sonnet+Haiku
390
- instead of Opus for everything. Only COMPLEX tasks use full Opus reasoning.
391
-
392
- **Override:** `--model-split` forces architect/editor for all tasks regardless of difficulty.
393
-
394
- ### Task-Level Resume
395
-
396
- When resuming with `--continue`, read RECORD.md for the current plan:
397
-
398
- - **Skip tasks already marked as completed** -- verify artifacts still exist via `git log` and file existence checks before skipping.
399
- - **Start execution from the first incomplete task** in the current breath.
400
- - **Do NOT re-execute completed tasks** to avoid duplicate commits, redundant file modifications, and wasted context.
401
-
402
- ```
403
- IF --continue flag is set:
404
- 1. Read .planning/phases/{N}-{name}/{N}-{NN}-RECORD.md for each plan
405
- 2. For each plan with existing RECORD.md:
406
- - Parse completed tasks from the "Accomplishments" section
407
- - Verify key_files.created still exist on disk
408
- - Verify commits exist in git log
409
- - IF all verified → mark plan as COMPLETE, skip execution
410
- - IF artifacts missing mark plan as INCOMPLETE, re-execute
411
- 3. For plans without RECORD.md execute normally
412
- 4. Resume from the first incomplete breath
413
- ```
414
-
415
- ### Step 4: Execute Breath (Enhanced with WARRIOR + Mode Intelligence)
416
-
417
- For each breath, execute using the selected mode:
418
-
419
- ```
420
- ━━━ DOMINION FLOW ► BREATH {W} EXECUTION ({MODE}) ━━━
421
- ```
422
-
423
- **MODE = SWARM:**
424
- ```
425
- Team Lead delegates to specialist teammates:
426
- "Execute Breath {W} as a team.
427
- - Backend Agent: Plan {N}-01 (@BLUEPRINT.md)
428
- - Frontend Agent: Plan {N}-02 (@BLUEPRINT.md)
429
- - Test Agent: Plan {N}-03 (@BLUEPRINT.md)
430
- Each agent: atomic commits per task, create RECORD.md"
431
- ```
432
-
433
- **MODE = SUBAGENT:**
434
- ```
435
- â—† Spawning executors for Breath {W}...
436
- âš¡ fire-executor: Plan {N}-01 - {description}
437
- âš¡ fire-executor: Plan {N}-02 - {description}
438
- ```
439
-
440
- **MODE = SEQUENTIAL:**
441
- ```
442
- â—† Executing Breath {W} sequentially...
443
- → Plan {N}-01: {description} (executing...)
444
- [complete]
445
- → Plan {N}-02: {description} (executing...)
446
- ```
447
-
448
- **Spawn fire-executor per plan (parallel for SUBAGENT/SWARM):**
449
-
450
- ```
451
- â—† Spawning executors for Breath {W}...
452
- âš¡ fire-executor: Plan {N}-01 - {description}
453
- âš¡ fire-executor: Plan {N}-02 - {description}
454
- ```
455
-
456
- ### Step 5: fire-executor Agent Behavior
457
-
458
- Each fire-executor receives:
459
-
460
- **Context Injection:**
461
- ```markdown
462
- <plan_context>
463
- @.planning/phases/{N}-{name}/{N}-{NN}-BLUEPRINT.md
464
- </plan_context>
465
-
466
- <skills_context>
467
- Skills to apply for this plan:
468
- @skills-library/{category}/{skill-1}.md
469
- @skills-library/{category}/{skill-2}.md
470
-
471
- Apply these patterns during implementation.
472
- Document which skills you actually used.
473
- </skills_context>
474
-
475
- <honesty_protocol>
476
- While executing tasks:
477
-
478
- **If uncertain:**
479
- 1. Document the uncertainty
480
- 2. Search skills library for guidance
481
- 3. Research if needed
482
- 4. Proceed with transparency
483
-
484
- **If blocked:**
485
- 1. Admit the blocker explicitly
486
- 2. Document what's blocking
487
- 3. Request help or create .continue-here.md
488
- 4. Don't fake progress
489
-
490
- **If assuming:**
491
- 1. Document the assumption
492
- 2. Mark as assumption in code comments
493
- 3. Add to handoff Issues section
494
- </honesty_protocol>
495
-
496
- <kv_cache_strategy>
497
- <!-- v10.0: KV-Cache-Aware Context Management -->
498
- <!-- Research basis: Production patterns from Manus AI, Cursor, Devin -->
499
- <!-- Key insight: KV-cache hit rates collapse when context prefix changes -->
500
-
501
- **Context Ordering Rule:** Place STABLE context first, DYNAMIC context last.
502
- The KV-cache reuses computation for unchanged prefix tokens.
503
-
504
- 1. System prompt + project rules (STABLE — never changes mid-execution)
505
- 2. Plan context + skills loaded (SEMI-STABLEchanges between plans only)
506
- 3. Episodic recall + confidence (DYNAMIC — changes per task)
507
- 4. Current task instructions (DYNAMIC — changes every call)
508
-
509
- **Re-injection Strategy:**
510
- - When switching between plans in SWARM mode, re-inject stable prefix unchanged
511
- - Only append/replace the dynamic tail — this preserves KV-cache across tasks
512
- - Avoid re-ordering context blocks between executor calls
513
- - If context exceeds 80% of window, compress episodic recall first (it has lowest reuse value)
514
- </kv_cache_strategy>
515
-
516
- <episodic_recall>
517
- <!-- v6.0: CoALA Per-Turn Episodic Auto-Injection -->
518
- <!-- Past experiences relevant to this plan's tasks -->
519
- <!-- Retrieved via: npm run search -- "{plan keywords}" --limit 3 --two-phase -->
520
-
521
- {For each relevant memory with score > 0.7:}
522
- **[{sourceType}] {title}** (score: {score}, utility: {utilityScore})
523
- {text excerpt — first 300 chars}
524
- Source: {sourceFile} | Date: {date}
525
-
526
- <!-- If no relevant memories found, this block is omitted -->
527
- </episodic_recall>
528
-
529
- <confidence_gates>
530
- <!-- v5.0: Confidence-Gated Execution (SAUP-inspired) -->
531
-
532
- Before each plan task, estimate confidence:
533
-
534
- **Confidence Signals:**
535
- + Matching skill found in library: +20
536
- + Similar reflection exists: +15
537
- + Tests available to verify: +25
538
- + Familiar technology/framework: +15
539
- + Clear, unambiguous requirements: +15
540
- - Unfamiliar framework/library: -20
541
- - No tests available: -15
542
- - Ambiguous/incomplete requirements: -20
543
- - Security-sensitive change: -10
544
- - Destructive operation (delete, drop, overwrite): -15
545
-
546
- **Confidence Levels:**
547
-
548
- HIGH (>80%): Proceed autonomously
549
- Execute task directly
550
- Run Self-Judge after
551
-
552
- MEDIUM (50-80%): Proceed with extra validation
553
- Search reflections: /fire-remember "{task description}" --type reflection
554
- Search skills: /fire-search "{technology}"
555
- Run Self-Judge before AND after
556
- Log uncertainty reason in RECORD.md
557
-
558
- LOW (<50%): Research first, then proceed
559
- Search Context7 for current library docs
560
- → Search skills library: /fire-search "{gap}"
561
- Check if this is outside trained domain
562
- → IF < 30%: Spawn fire-researcher with the specific gap — get alternatives
563
- Only escalate to user if research returns no actionable path
564
- Create checkpoint before attempting
565
-
566
- **Log confidence in RECORD.md:**
567
- ```yaml
568
- confidence_log:
569
- - task: 1
570
- score: 85
571
- level: HIGH
572
- signals: [skill_match, tests_available, familiar_tech]
573
- - task: 3
574
- score: 45
575
- level: LOW
576
- signals: [unfamiliar_framework, no_tests, ambiguous_requirements]
577
- action: "Asked user for clarification on WebSocket auth approach"
578
- ```
579
- </confidence_gates>
580
- ```
581
-
582
- ### Step 5.1: Populate Episodic Recall (v6.0 — CoALA)
583
-
584
- > **Research basis:** CoALA (Berkeley 2024) Every decision cycle requires episodic memory injection.
585
-
586
- Before spawning executors, the orchestrator populates the `<episodic_recall>` block:
587
-
588
- ```
589
- # 1. Extract keywords from plan tasks
590
- plan_keywords = extract_keywords(BLUEPRINT.md task descriptions)
591
-
592
- # 2. Search vector memory with two-phase retrieval
593
- cd ~/.claude/memory
594
- results = npm run search -- "{plan_keywords}" --limit 3 --two-phase
595
-
596
- # 3. Fill <episodic_recall> block in executor prompt
597
- IF results exist AND top_result.score > 0.7:
598
- Fill block with top 3 results (title, score, utility, text excerpt)
599
- ELSE:
600
- Remove <episodic_recall> block entirely (no noise for novel tasks)
601
- ```
602
-
603
- **Cost control:** Only inject memories with score > 0.7. Cap at 3 results (~500 tokens).
604
-
605
- ---
606
-
607
- **Executor Creates:**
608
- 1. Implements all tasks from BLUEPRINT.md
609
- 2. **Runs Quick Self-Judge after each task** (v5.0 — Agent-as-Judge)
610
- 3. Runs verification commands for each task
611
- 4. Creates `{N}-{NN}-RECORD.md` (fire-handoff.md format)
612
- 5. Updates SKILLS-INDEX.md with skills applied
613
-
614
- ### Step 5.5: Quick Self-Judge (v5.0 Agent-as-Judge)
615
-
616
- **Research basis:** Agent-as-Judge (2025) 95% error recovery when self-evaluation present
617
-
618
- After completing each task in a plan, pause for 30 seconds of self-critique:
619
-
620
- ```markdown
621
- ## Quick Self-Judge (before marking task complete)
622
- 1. Does this change do what the plan asked? [Y/N]
623
- 2. Could this break something that was working? [Y/N — if Y, what?]
624
- 3. Am I confident this is correct, or am I guessing? [confident/uncertain]
625
- 4. Did I check for the obvious: imports, types, null cases? [Y/N]
626
- 5. Would I approve this in a code review? [Y/N]
627
-
628
- IF any N or "uncertain":
629
- → STOP. Re-examine before proceeding.
630
- → Document what triggered the pause.
631
-
632
- IF "uncertain":
633
- → Log to ~/.claude/reflections/{date}_uncertain-{task-slug}.md
634
- Include: what made you uncertain, what you checked, what you decided
635
- → trigger: "self-judge-uncertain"
636
- ```
637
-
638
- **This is NOT a full verification.** It's a 30-second gut check that catches:
639
- - Wrong file edited
640
- - Missing import after refactor
641
- - Accidentally deleted working code
642
- - Copying a pattern that doesn't apply here
643
-
644
- **When to skip:** Trivial changes (typo fix, comment update, config value change)
645
-
646
- ### Step 5.6: Call-Path Verification — Dead Code Prevention (v11.0)
647
-
648
- > **Research basis (v11.0):** Failure pattern mining (6+ instances across v10-v12)
649
- > features declared, committed, and documented but never wired. Examples: findSimilar()
650
- > declared but never called, parentId field added but never populated. The fix: verify
651
- > every new function/export has at least one call site before marking task complete.
652
-
653
- After each task that creates new functions, exports, or API endpoints:
654
-
655
- ```
656
- FOR each new_symbol created in this task:
657
- call_sites = grep -r "{symbol_name}" src/ --include="*.ts" --include="*.tsx" | grep -v "export\|function\|const.*="
658
-
659
- IF call_sites == 0:
660
- FLAG: "DEAD CODE: {symbol_name} declared in {file} but never called"
661
- ACTION: Wire it into the appropriate caller before proceeding
662
-
663
- IF call_sites == 1 AND call_site is only the test file:
664
- NOTE: "Only called from tests — verify production code path exists"
665
- ```
666
-
667
- **Skip condition:** Pure type definitions, interfaces, and configuration constants
668
- (these are consumed implicitly by the type system, not called directly).
669
-
670
- ### Step 6: Create fire-handoff.md (Unified Format)
671
-
672
- Each executor creates a summary using the unified format:
673
-
674
- ```markdown
675
- ---
676
- # Dominion Flow Frontmatter
677
- phase: {N}-{name}
678
- plan: NN
679
- subsystem: {category}
680
- duration: "{X} min"
681
- start_time: "{ISO timestamp}"
682
- end_time: "{ISO timestamp}"
683
-
684
- # Skills & Quality (WARRIOR)
685
- skills_applied:
686
- - "{category}/{skill}"
687
- honesty_checkpoints:
688
- - task: {N}
689
- gap: "{what was uncertain}"
690
- action: "{how it was resolved}"
691
- validation_score: {X}/70
692
-
693
- # Dominion Flow Execution Metadata
694
- requires: [dependencies]
695
- provides: [what this creates]
696
- key_files:
697
- created: [list]
698
- modified: [list]
699
- key_decisions:
700
- - "{decision made during execution}"
701
- ---
702
-
703
- # Power Handoff: Plan {N}-{NN}
704
-
705
- ## Quick Summary
706
- {One paragraph of what was accomplished}
707
-
708
- ## Dominion Flow Accomplishments
709
- {Task commits, files created/modified, decisions}
710
-
711
- ## Skills Applied (WARRIOR)
712
- {Which skills were used and how}
713
-
714
- ## WARRIOR 7-Step Handoff
715
- {W-A-R-R-I-O-R sections}
716
- ```
717
-
718
- ### Step 7: Wait for Breath Completion (Dominion Flow Standard)
719
-
720
- ```
721
- â—† Breath {W} in progress...
722
- ├─ ⚡ Plan {N}-01: Running (backend)
723
- └─ ⚡ Plan {N}-02: Running (frontend)
724
-
725
- [After completion]
726
-
727
- ✓ Breath {W} complete
728
- ├─ ✓ Plan {N}-01: Complete (12 min)
729
- └─ ✓ Plan {N}-02: Complete (8 min)
730
- ```
731
-
732
- **Breath Completion Checks:**
733
- - All executors finished
734
- - All RECORD.md files created
735
- - No blocking errors
736
-
737
- **If Blocking Error:**
738
- - Create `.continue-here.md` with context
739
- - Pause execution
740
- - Display error and recovery instructions
741
-
742
- ### Step 7.1: Error Classification Health Check (v10.1)
743
-
744
- > **Research basis (v10.1):** Microsoft "AutoGen StateFlow" (ICML 2024) — formal error
745
- > classification at execution boundaries reduces repeat failures by 28%. This integrates
746
- > the existing `references/error-classification.md` into breath-level execution flow.
747
- > Previously, error classification existed as a reference but was not wired into
748
- > the execution pipeline.
749
-
750
- **After each breath completes (success OR failure), classify execution health:**
751
-
752
- ```
753
- INPUTS for classification:
754
- - files_changed: count of files in breath RECORD.md key_files
755
- - error_hash: normalized hash of any error message from breath
756
- - previous_errors: error hashes from previous breaths in this phase
757
- - output_volume: total lines of code produced vs. baseline
758
- - error_type: classification of error (if any)
759
-
760
- CLASSIFY using references/error-classification.md algorithm:
761
-
762
- 1. BLOCKED? → External dependency, permission, or service error
763
- Action: Stop execution. Create BLOCKERS.md entry. Save state.
764
- Display: EXECUTION BLOCKED banner (see error-classification.md)
765
-
766
- 2. SPINNING? Same error hash seen in 3+ breaths
767
- Action: Force approach rotation. Inject anti-patterns list.
768
- Display: "Same error for {N} breaths. You MUST try a different approach."
769
-
770
- 3. DEGRADED? Output volume declined 50%+ from first breath
771
- Action: Trigger /fire-cost context check. If ORANGE+, compact.
772
- Display: "Output quality declining. Consider /fire-5-handoff."
773
-
774
- 4. STALLED? → No file changes AND no new errors
775
- Action: Inject urgency. Search skills for alternative approach.
776
- Display: "No progress detected. Pick ONE concrete change."
777
-
778
- 5. PROGRESS → Files changed, errors are new/different
779
- Action: Continue to next breath normally.
780
-
781
- RECORD health state in CONSCIENCE.md:
782
- | Breath | Health | Trigger | Action |
783
- | {W} | {state} | {trigger} | {action_taken} |
784
- ```
785
-
786
- **Circuit breaker integration:**
787
- - If health is SPINNING for 2 consecutive breaths → trigger circuit breaker
788
- - If health is DEGRADED → check `/fire-cost` context tier. If RED+, force handoff.
789
- - If health is BLOCKED → do NOT retry. Save state and surface blocker to user.
790
-
791
- **Skip condition:** If breath completed successfully with no errors, mark PROGRESS and continue.
792
-
793
- ### Step 7.4: Post-Feature Config Sync (v10.0)
794
-
795
- After breath completion, check if new features need config file updates.
796
-
797
- **Trigger conditions:**
798
- - Breath created new feature with `enabled` toggle
799
- - Breath added new config keys referenced in DEFAULT_CONFIG but not in user config
800
- - Breath created settings UI that references config paths
801
-
802
- **Actions:**
803
- 1. Detect config files in project (*.yaml, *.json, *.toml)
804
- 2. If deep_merge/defaults pattern detected:
805
- - Load config through app's config loader
806
- - Save back to disk (writes merged defaults)
807
- - Log: `"Config synced: {file} now includes {N} new feature sections"`
808
- 3. If settings dialog exists:
809
- - Verify all new features appear in GUI widget list
810
- - Log: `"Settings dialog covers {N}/{M} features"`
811
-
812
- **If no config pattern detected:** Skip silently.
813
-
814
- ### Step 7.5: Versioned Context Checkpoint (v6.0 — GCC)
815
-
816
- > **Research basis:** GCC (Jul 2025) — Git-style versioned context management.
817
- > Achieved 48% on SWE-Bench-Lite. Agents spontaneously adopted disciplined behaviors
818
- > when they knew they could checkpoint and rollback.
819
-
820
- After each breath completes successfully, create a checkpoint commit:
821
-
822
- ```
823
- IF breath completed without blocking errors:
824
-
825
- # 1. Stage all modified files from this breath
826
- git add {files from breath RECORD.md frontmatter: key_files.created + key_files.modified}
827
-
828
- # 2. Create checkpoint commit
829
- git commit -m "checkpoint: phase {N} breath {W} complete — {summary}
830
-
831
- Files: {count} modified, {count} created
832
- Plans: {list of plan IDs completed in this breath}
833
- Dominion Flow v6.0 checkpoint"
834
-
835
- # 3. Record checkpoint hash
836
- checkpoint_hash = git rev-parse HEAD
837
-
838
- # 4. Update CONSCIENCE.md with checkpoint
839
- Append to CONSCIENCE.md under ## Checkpoints:
840
- | Breath | Commit | Date | Plans | Status |
841
- | {W} | {checkpoint_hash:7} | {date} | {plan IDs} | Complete |
842
-
843
- Display:
844
- "Checkpoint: {checkpoint_hash:7} — Breath {W} complete ({plans count} plans)"
845
-
846
- IF breath FAILED and checkpoint exists:
847
- # Offer rollback option
848
- Display:
849
- "Breath {W} failed. Last checkpoint: {last_checkpoint_hash:7}
850
- To rollback: git reset --hard {last_checkpoint_hash}
851
- To continue: fix blocking error and re-run"
852
- ```
853
-
854
- **Note:** Only commit files tracked by the plan. Never auto-commit .env, credentials, or
855
- files not in the BLUEPRINT.md scope. This is a lightweight GCC adaptation, not full branching.
856
-
857
- ---
858
-
859
- ### Step 7.6: Classify Review Depth (v8.0)
860
-
861
- Determine review depth from phase scope:
862
-
863
- ```
864
- total_files = count of all key_files.created + key_files.modified across SUMMARYs
865
- has_security = any file in auth/, security/, middleware/, crypto/
866
- has_cross_cutting = files span 3+ top-level directories
867
-
868
- IF total_files <= 3 AND NOT has_security:
869
- review_depth = "shallow" → 5 personas (Simplicity + Security + Perf + Test + Pattern)
870
- ELIF total_files >= 10 OR has_security OR has_cross_cutting:
871
- review_depth = "deep" → 16 personas + cross-file analysis
872
- ELSE:
873
- review_depth = "normal" → 16 personas
874
- ```
875
-
876
- ---
877
-
878
- ### Step 7.7: Mandatory Skill Extraction (v10.0)
879
-
880
- After each phase completes, automatically evaluate whether the build produced
881
- reusable patterns worth capturing as skills.
882
-
883
- **This step is MANDATORY after every build phase.** It runs the skill creation
884
- wizard in auto-detection mode with duplicate checking.
885
-
886
- ```
887
- # 1. Analyze what was built in this phase
888
- built_files = all key_files.created from phase SUMMARYs
889
- built_patterns = extract_patterns(built_files)
890
- Patterns to detect:
891
- - Config-driven feature toggles (togglable pipeline)
892
- - Settings dialogs generated from config
893
- - Thread-safety patterns (cross-thread marshaling)
894
- - API route patterns (CRUD, auth, middleware)
895
- - Component hierarchies (parent→child wiring)
896
- - Build/deploy configurations
897
- - Error handling strategies
898
- - Data migration patterns
899
-
900
- # 2. Check for duplicates against existing skills
901
- FOR each detected pattern:
902
- /fire-search "{pattern keywords}" --scope general
903
- IF similarity > 80%:
904
- Log: "Skill already exists: {existing_skill_name} (skip)"
905
- CONTINUE
906
- ELIF similarity > 50%:
907
- Log: "Similar skill found: {existing_skill_name} consider updating"
908
- # Offer to update existing skill with new insights
909
- ELSE:
910
- # New pattern queue for skill creation
911
-
912
- # 3. Create skills for novel patterns
913
- IF new_patterns.length > 0:
914
- Display:
915
- "◆ Skill extraction found {N} new patterns:
916
- ├─ {pattern_1_name} (no existing match)
917
- ├─ {pattern_2_name} (partial match — update candidate)
918
- └─ ...
919
-
920
- Auto-create skills? [Yes / No / Review each]"
921
-
922
- IF Yes (default in autonomous mode):
923
- FOR each new_pattern:
924
- /fire-add-new-skill --from session --quick
925
- # Uses --quick flag for minimal prompts
926
- # Security scan + credential filter still run (Steps 4.5, 4.6)
927
-
928
- IF No:
929
- Log: "Skill extraction skipped by user. Patterns noted in autonomous-log.md"
930
-
931
- # 4. Log results
932
- Append to .planning/autonomous-log.md:
933
- ## Skill Extraction Phase {N}
934
- Patterns detected: {count}
935
- New skills created: {count}
936
- Duplicates skipped: {count}
937
- Updates suggested: {count}
938
- ```
939
-
940
- **In autonomous mode:** Skills are auto-created (Yes is default). The security
941
- scan and credential filter gates in `/fire-add-new-skill` (Steps 4.5, 4.6)
942
- still run to prevent malicious or leaked content.
943
-
944
- **In manual mode:** User is prompted for each pattern.
945
-
946
- ---
947
-
948
- ### Step 8: Spawn Parallel Verification + Review (v8.0)
949
-
950
- After all breaths complete, spawn BOTH agents simultaneously:
951
-
952
- ```
953
- IF --skip-review NOT set:
954
-
955
- â—† Spawning parallel verification + review for Phase {N}...
956
- â"œâ"€ fire-verifier: 70-point WARRIOR validation
957
- â""â"€ fire-reviewer: {review_depth} review (Simplicity + 15 personas)
958
-
959
- # Spawn fire-verifier (existing â€" unchanged)
960
- Task(subagent_type="fire-verifier", prompt="""
961
- Phase: {N}, Plans: {list}, Must-Haves: {count}
962
- @references/validation-checklist.md
963
- """)
964
-
965
- # Spawn fire-reviewer (NEW â€" v8.0)
966
- Task(subagent_type="fire-reviewer", prompt="""
967
- <review_scope>
968
- Phase: {N} - {name}
969
- Review Depth: {review_depth}
970
- </review_scope>
971
-
972
- <files_to_review>
973
- {all key_files.created + key_files.modified from RECORD.md files}
974
- </files_to_review>
975
-
976
- <plan_intent>
977
- {Quick Summary from each RECORD.md â€" what was INTENDED vs what was built}
978
- </plan_intent>
979
-
980
- <simplicity_mandate>
981
- STRICT: Flag over-engineering as HIGH.
982
- Three similar lines > premature abstraction.
983
- Direct approach > clever approach.
984
- If a junior dev can't read it in 30 seconds â†' too complex.
985
- </simplicity_mandate>
986
-
987
- Output to: .planning/phases/{N}-{name}/{N}-REVIEW.md
988
- """)
989
-
990
- ELSE:
991
- # Only verifier (legacy behavior â€" --skip-review was passed)
992
- â—† Spawning fire-verifier for Phase {N}... (review skipped)
993
- Task(subagent_type="fire-verifier", prompt="""
994
- Phase: {N}, Plans: {list}, Must-Haves: {count}
995
- @references/validation-checklist.md
996
- """)
997
- ```
998
-
999
- **Route based on verifier result (when review skipped):**
1000
- - **PASS:** Proceed to Step 9
1001
- - **FAIL with gaps:** Create gap closure plan, route to `/fire-2-plan {N} --gaps`
1002
-
1003
- ### Step 8.5: Merge Gate â€" Combined Quality Decision (v8.0)
1004
-
1005
- Wait for BOTH agents to complete, then evaluate combined verdict.
1006
-
1007
- **Autonomous Mode Routing (v9.0):**
1008
-
1009
- ```
1010
- IF --autonomous flag is set:
1011
-
1012
- IF combined_verdict == "READY FOR HUMAN":
1013
- Log to autonomous-log: "Merge gate: READY FOR HUMAN (auto-proceeding)"
1014
- Skip display, continue to Step 9 (CONSCIENCE.md update)
1015
-
1016
- IF combined_verdict contains "FIX":
1017
- Log to autonomous-log: "Merge gate: FIX required (auto-routing to fix cycle)"
1018
- Route to gap closure automatically (no Options display)
1019
-
1020
- // Non-autonomous mode: fall through to standard display below
1021
- ```
1022
-
1023
- **COMBINED VERDICT MATRIX:**
1024
-
1025
- | Verifier â†" / Reviewer â†' | APPROVE | APPROVE W/ FIXES | BLOCK |
1026
- |--------------------------|---------|------------------|-------|
1027
- | APPROVED | READY FOR HUMAN | FIX REVIEW FINDINGS | FIX BLOCKERS |
1028
- | CONDITIONAL | FIX VERIFIER GAPS | FIX BOTH | FIX BOTH |
1029
- | REJECTED | FIX VERIFIER | FIX BOTH | FIX BOTH (critical) |
1030
-
1031
- **RULE:** The stricter verdict ALWAYS wins.
1032
-
1033
- **DISAGREEMENT HANDLING:**
1034
-
1035
- ```
1036
- Verifier APPROVED + Reviewer BLOCK:
1037
- "Code passes tests but has quality/simplicity issues.
1038
- FIX BEFORE HUMAN TESTING."
1039
- (This is the MOST VALUABLE case â€" why redundancy exists)
1040
-
1041
- Verifier REJECTED + Reviewer APPROVE:
1042
- "Code is clean but doesn't work. Fix functional failures first."
1043
- ```
1044
-
1045
- **Display combined result:**
1046
-
1047
- ```
1048
- â•"â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
1049
- â•' MERGE GATE â€" Phase {N} â•'
1050
- â• â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•£
1051
- â•' â•'
1052
- â•' Verifier: {X}/70 â€" {APPROVED/CONDITIONAL/REJECTED} â•'
1053
- â•' Reviewer: {verdict} â€" {critical}C / {high}H / {medium}M / {low}L â•'
1054
- â•' Simplicity: {N} over-engineering flags â•'
1055
- â•' â•'
1056
- â•' Combined Verdict: {READY FOR HUMAN / FIX REVIEW FINDINGS / FIX BOTH} â•'
1057
- â•' â•'
1058
- â•' {If FIX needed:} â•'
1059
- â•' Issues to resolve: â•'
1060
- â•' ✗ {file:line â€" description} â•'
1061
- â•' ✗ {file:line â€" description} â•'
1062
- â•' â•'
1063
- â•' Options: â•'
1064
- â•' A) Fix issues â•'
1065
- â•' B) Override with known issues â•'
1066
- â•' C) Gap closure plan â•'
1067
- â•' â•'
1068
- ╚â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
1069
- ```
1070
-
1071
- **FEEDBACK LOOP (Behavioral Directive Proposals):**
1072
-
1073
- ```
1074
- IF reviewer found CRITICAL or HIGH findings:
1075
- For each finding with severity >= HIGH:
1076
- Add proposed behavioral directive:
1077
- IF: {condition from finding}
1078
- DONT: {the anti-pattern or over-engineering found}
1079
- BECAUSE: {reviewer explanation}
1080
- Source: fire-reviewer Phase {N} | Confidence: 1/5
1081
- ```
1082
-
1083
- **VERSION PERFORMANCE TRACKING (v8.0):**
1084
-
1085
- ```
1086
- After gate verdict is displayed and user responds:
1087
-
1088
- Record outcome to .planning/version-performance.md:
1089
-
1090
- | Date | Version | Gate | Verdict | Override? | Outcome | Notes |
1091
- | {now} | v8.0 | merge | {verdict} | {A=no, B=yes} | pending | Phase {N} |
1092
-
1093
- "Override?" = yes if user chose option B (override with known issues)
1094
- "Outcome" = filled retroactively after human testing (correct/false-positive/false-negative)
1095
-
1096
- AFTER 5+ records exist, check degradation signals:
1097
- - override_rate > 40% → rules too strict, suggest rollback
1098
- - false_positive_rate > 30% → gate crying wolf, retire offending rule
1099
- - Same rule overridden 3+ times → retire that specific rule
1100
- See: references/behavioral-directives.md § Version Performance Registry
1101
- ```
1102
-
1103
- ### Step 8.75: Auto-Route Merge Gate (v10.0 — Default Autonomous)
1104
-
1105
- By default (v10.0), execution auto-routes based on combined_verdict without human pause:
1106
-
1107
- ```
1108
- IF combined_verdict in ["APPROVED", "APPROVE"]:
1109
- Auto-advance to next breath. No human pause.
1110
- → Log: "Auto-routed: {verdict} (score {N}/70)"
1111
-
1112
- IF combined_verdict in ["CONDITIONAL", "APPROVE WITH FIXES"]:
1113
- Auto-advance but log gaps to .planning/autonomous-notes.md
1114
- → Log: "Auto-routed with notes: {N} non-critical gaps"
1115
-
1116
- IF combined_verdict in ["REJECTED", "BLOCK"]:
1117
- STOP. Display blocker. Request human intervention.
1118
- This is the ONLY case where execution pauses.
1119
-
1120
- IF --manual flag is set:
1121
- → Revert to v9.0 behavior: display all checkpoints, wait for human.
1122
- ```
1123
-
1124
- **Safety gates ALWAYS active regardless of mode:**
1125
- - Path verification (MANDATORY — cannot disable)
1126
- - HAC enforcement (confidence 5/5 rules)
1127
- - Circuit breaker (stall/spin/degrade detect)
1128
- - Power-verifier (70-point WARRIOR validation)
1129
- - Power-reviewer (16-persona code review)
1130
-
1131
- ### Step 9: Update CONSCIENCE.md and SKILLS-INDEX.md
1132
-
1133
- **CONSCIENCE.md Updates:**
1134
- ```markdown
1135
- ## Current Position
1136
- - Phase: {N} of {total}
1137
- - Status: Complete (or Verified with gaps)
1138
- - Last activity: {timestamp} - Phase {N} execution complete
1139
-
1140
- ## WARRIOR Integration
1141
- - Skills Applied: {new_total} total
1142
- - {skill-1} (Phase {N}, Plan {NN})
1143
- - {skill-2} (Phase {N}, Plan {NN})
1144
- - Honesty Checkpoints: {count}
1145
- - Validation Status: Phase {N} passed {X}/70 checks
1146
- - Code Review: Phase {N} {reviewer_verdict} ({critical}/{high}/{medium}/{low})
1147
- - Combined Gate: {combined_verdict}
1148
- - Simplicity Findings: {count of Simplicity Guardian findings}
1149
- ```
1150
-
1151
- **SKILLS-INDEX.md Updates:**
1152
- ```markdown
1153
- ## By Phase
1154
-
1155
- ### Phase {N}: {name}
1156
- **Plan {N}-01:**
1157
- - {category}/{skill-1}
1158
- - {category}/{skill-2}
1159
-
1160
- **Plan {N}-02:**
1161
- - {category}/{skill-3}
1162
- ```
1163
-
1164
- ---
1165
-
1166
- ## Agent Spawning Instructions
1167
-
1168
- ### fire-executor (Parallel per Plan)
1169
-
1170
- **Agent File:** `@agents/fire-executor.md`
1171
-
1172
- **Spawn Pattern:**
1173
- ```
1174
- For each plan in breath:
1175
- Spawn fire-executor with:
1176
- - Plan file context
1177
- - Skills library context
1178
- - Honesty protocol reminder
1179
- ```
1180
-
1181
- **Executor Outputs:**
1182
- - Task implementations
1183
- - `{N}-{NN}-RECORD.md` (fire-handoff format)
1184
- - SKILLS-INDEX.md updates
1185
-
1186
- ### fire-verifier (After All Breaths)
1187
-
1188
- **Agent File:** `@agents/fire-verifier.md`
1189
-
1190
- **Context:**
1191
- ```markdown
1192
- Phase: {N} - {name}
1193
- Plans Executed: {list}
1194
- Must-Haves: {aggregated from all plans}
1195
- WARRIOR Validation: {checklist}
1196
- ```
1197
-
1198
- **Verifier Outputs:**
1199
- - `{N}-VERIFICATION.md`
1200
- - Gap analysis (if any)
1201
-
1202
- ### fire-reviewer (Parallel with Verifier v8.0)
1203
-
1204
- **Agent File:** `@agents/fire-reviewer.md`
1205
-
1206
- **Context:**
1207
- ```markdown
1208
- <review_scope>
1209
- Phase: {N} - {name}
1210
- Review Depth: {shallow|normal|deep} (from Step 7.6)
1211
- </review_scope>
1212
-
1213
- <files_to_review>
1214
- {All key_files.created + key_files.modified from RECORD.md files}
1215
- </files_to_review>
1216
-
1217
- <plan_intent>
1218
- {Quick Summary from each RECORD.md}
1219
- </plan_intent>
1220
-
1221
- <simplicity_mandate>STRICT</simplicity_mandate>
1222
- ```
1223
-
1224
- **Reviewer Outputs:**
1225
- - `{N}-REVIEW.md`
1226
- - Severity table (CRITICAL/HIGH/MEDIUM/LOW)
1227
- - Proposed behavioral directives for HIGH+ findings
1228
-
1229
- ---
1230
-
1231
- ## Success Criteria
1232
-
1233
- ### Required Outputs
1234
- - [ ] All plans in phase executed
1235
- - [ ] Quick Self-Judge run after each task (v5.0)
1236
- - [ ] All RECORD.md files created (fire-handoff format)
1237
- - [ ] All verification commands passed
1238
- - [ ] SKILLS-INDEX.md updated
1239
- - [ ] CONSCIENCE.md updated
1240
- - [ ] VERIFICATION.md created
1241
- - [ ] Must-haves verified
1242
- - [ ] Code review run in parallel with verification (v8.0)
1243
- - [ ] {N}-REVIEW.md created alongside {N}-VERIFICATION.md
1244
- - [ ] Combined quality gate evaluated both must agree
1245
- - [ ] CRITICAL/HIGH findings fed into behavioral directives
1246
- - [ ] Simplicity Guardian findings surfaced in report
1247
-
1248
- ### Completion Display
1249
-
1250
- ```
1251
- ╔══════════════════════════════════════════════════════════════════════════════╗
1252
- ║ ✓ PHASE {N} EXECUTION COMPLETE ║
1253
- ╠══════════════════════════════════════════════════════════════════════════════╣
1254
- â•‘ â•‘
1255
- â•‘ Phase: {N} - {name} â•‘
1256
- â•‘ Plans Executed: {count} â•‘
1257
- â•‘ Breaths: {wave_count} â•‘
1258
- â•‘ Total Time: {duration} â•‘
1259
- â•‘ â•‘
1260
- â•‘ Execution Summary: â•‘
1261
- â•‘ Breath 1: â•‘
1262
- ║ ✓ {N}-01 - {description} (12 min) ║
1263
- ║ ✓ {N}-02 - {description} (8 min) ║
1264
- â•‘ Breath 2: â•‘
1265
- ║ ✓ {N}-03 - {description} (15 min) ║
1266
- â•‘ â•‘
1267
- â•‘ Skills Applied: {count} â•‘
1268
- â•‘ Honesty Checkpoints: {count} â•‘
1269
- â•‘ Validation: {X}/70 checks passed â•‘
1270
- â•‘ â•‘
1271
- ╠══════════════════════════════════════════════════════════════════════════════╣
1272
- â•‘ NEXT UP â•‘
1273
- ├──────────────────────────────────────────────────────────────────────────────┤
1274
- â•‘ â•‘
1275
- ║ → Run `/fire-4-verify {N}` for detailed validation report ║
1276
- ║ → Or run `/fire-2-plan {N+1}` to plan next phase ║
1277
- ║ → Or run `/fire-5-handoff` to create session handoff ║
1278
- â•‘ â•‘
1279
- ╚══════════════════════════════════════════════════════════════════════════════╝
1280
- ```
1281
-
1282
- ---
1283
-
1284
- ## Error Handling
1285
-
1286
- ### Executor Blocked
1287
-
1288
- ```
1289
- ╔══════════════════════════════════════════════════════════════════════════════╗
1290
- â•‘ âš  EXECUTION BLOCKED â•‘
1291
- ╠══════════════════════════════════════════════════════════════════════════════╣
1292
- â•‘ â•‘
1293
- â•‘ Plan {N}-{NN} encountered a blocking issue: â•‘
1294
- â•‘ â•‘
1295
- â•‘ Issue: {description} â•‘
1296
- â•‘ Task: {task number and description} â•‘
1297
- â•‘ â•‘
1298
- â•‘ Created: .planning/phases/{N}-{name}/.continue-here.md â•‘
1299
- â•‘ â•‘
1300
- â•‘ Options: â•‘
1301
- â•‘ A) Resolve issue and run `/fire-3-execute {N} --continue` â•‘
1302
- â•‘ B) Skip this plan: `/fire-3-execute {N} --skip {N}-{NN}` â•‘
1303
- â•‘ C) Create handoff: `/fire-5-handoff` â•‘
1304
- â•‘ â•‘
1305
- ╚══════════════════════════════════════════════════════════════════════════════╝
1306
- ```
1307
-
1308
- ### Verification Failed
1309
-
1310
- ```
1311
- ╔══════════════════════════════════════════════════════════════════════════════╗
1312
- â•‘ âš  VERIFICATION GAPS DETECTED â•‘
1313
- ╠══════════════════════════════════════════════════════════════════════════════╣
1314
- â•‘ â•‘
1315
- â•‘ Phase {N} execution complete but verification found gaps: â•‘
1316
- â•‘ â•‘
1317
- â•‘ Gaps: â•‘
1318
- ║ ✗ Must-have: "User can paginate results" - Not verified ║
1319
- ║ ✗ WARRIOR: Test coverage 65% (required 80%) ║
1320
- â•‘ â•‘
1321
- â•‘ Options: â•‘
1322
- â•‘ A) Run `/fire-2-plan {N} --gaps` to plan gap closure â•‘
1323
- â•‘ B) Run `/fire-4-verify {N}` for detailed report â•‘
1324
- â•‘ C) Accept gaps and proceed: `/fire-2-plan {N+1}` â•‘
1325
- â•‘ â•‘
1326
- ╚══════════════════════════════════════════════════════════════════════════════╝
1327
- ```
1328
-
1329
- ### Breath Timeout
1330
-
1331
- ```
1332
- ┌─────────────────────────────────────────────────────────────────────────────┐
1333
- │ ⚠ WARNING: Breath Timeout │
1334
- ├─────────────────────────────────────────────────────────────────────────────┤
1335
- │ │
1336
- │ Breath {W} exceeded expected duration. │
1337
- │ │
1338
- │ Status: │
1339
- │ ✓ Plan {N}-01: Complete │
1340
- │ ◆ Plan {N}-02: Still running (45 min) │
1341
- │ │
1342
- │ Action: Continuing to wait... (use Ctrl+C to interrupt) │
1343
- │ │
1344
- └─────────────────────────────────────────────────────────────────────────────┘
1345
- ```
1346
-
1347
- ---
1348
-
1349
- ## References
1350
-
1351
- - **Agent:** `@agents/fire-executor.md` - Execution agent with honesty protocols
1352
- - **Agent:** `@agents/fire-verifier.md` - Verification agent with combined checks
1353
- - **Template:** `@templates/fire-handoff.md` - Unified summary format
1354
- - **Protocol:** `@references/honesty-protocols.md` - Execution honesty guidance
1355
- - **Protocol:** `@references/validation-checklist.md` - 70-point validation
1356
- - **Brand:** `@references/ui-brand.md` - Visual output standards
1
+ ---
2
+ description: Execute a phase with breath-based parallelism and honesty protocols
3
+ ---
4
+
5
+ # /fire-3-execute
6
+
7
+ > Execute phase N with breath-based parallelization and honesty protocols
8
+
9
+ ---
10
+
11
+ ## Purpose
12
+
13
+ Execute all plans in a specified phase using breath-based parallel execution. Each plan is handled by a fire-executor agent that applies honesty protocols, references skills, and creates unified handoff documents. After execution completes, a fire-verifier validates the work.
14
+
15
+ ---
16
+
17
+ ## Arguments
18
+
19
+ ```yaml
20
+ arguments:
21
+ phase_number:
22
+ required: true
23
+ type: integer
24
+ description: "Phase number to execute (e.g., 1, 2, 3)"
25
+ example: "/fire-3-execute 3"
26
+
27
+ optional_flags:
28
+ --breath: "Execute only a specific breath (e.g., --breath 2)"
29
+ --plan: "Execute only a specific plan (e.g., --plan 03-02)"
30
+ --skip-verify: "Skip verification after execution (not recommended)"
31
+ --continue: "Continue from last checkpoint (for interrupted execution)"
32
+ --auto-continue: "Enable Double-Shot Latte pattern - no 'continue?' interrupts"
33
+ --skip-review: "Skip the parallel code review (not recommended)"
34
+ --autonomous: "Auto-route merge gate verdicts without human checkpoints (DEFAULT in v10.0, used by /fire-autonomous)"
35
+ --manual: "Opt-in to human checkpoints at merge gate (v9.0 behavior)"
36
+ --worktree: "Use git worktree isolation for parallel breath execution (v10.0)"
37
+ --model-split: "Force architect/editor model split for all tasks (v10.0)"
38
+ --token-efficient: "Enable ALAS context slicing for reduced token usage (~60% reduction). Default: OFF (full context for best quality). Toggle ON for budget-conscious runs or large phase counts."
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Auto-Continuation Mode (Double-Shot Latte Pattern)
44
+
45
+ When `--auto-continue` is enabled, execution proceeds without "continue?" interrupts:
46
+
47
+ ```
48
+ ┌─────────────────────────────────────────────────────────────────────────────┐
49
+ │ AUTO-CONTINUATION ACTIVE │
50
+ ├─────────────────────────────────────────────────────────────────────────────┤
51
+ │ │
52
+ │ Breath completion → Automatic checkpoint → Next breath starts immediately │
53
+ │ │
54
+ │ Benefits: │
55
+ │ • Uninterrupted execution flow │
56
+ │ • Faster phase completion │
57
+ │ • Progress saved at each breath checkpoint │
58
+ │ │
59
+ │ Safety: │
60
+ │ • Checkpoints created between breaths │
61
+ │ • Can resume from any breath if interrupted │
62
+ │ • Blocking errors still pause execution │
63
+ │ │
64
+ └─────────────────────────────────────────────────────────────────────────────┘
65
+ ```
66
+
67
+ **Usage:**
68
+ ```bash
69
+ # Full auto-execution (review is on by default in v8.0)
70
+ /fire-3-execute 2 --auto-continue
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Process
76
+
77
+ ### Step 1: Load Context (Dominion Flow Standard)
78
+
79
+ ```
80
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
81
+ DOMINION FLOW > PHASE {N} EXECUTION
82
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
+ ```
84
+
85
+ **Load CONSCIENCE.md:**
86
+ ```markdown
87
+ @.planning/CONSCIENCE.md
88
+ ```
89
+
90
+ **Extract:**
91
+ - Current phase and status
92
+ - Completed plans (if resuming)
93
+ - Session context
94
+
95
+ ### Step 2: Discover Plans (Dominion Flow Standard)
96
+
97
+ **Scan for plans:**
98
+ ```bash
99
+ .planning/phases/{N}-{name}/{N}-*-BLUEPRINT.md
100
+ ```
101
+
102
+ **Build execution manifest:**
103
+ ```markdown
104
+ ## Phase {N} Execution Manifest
105
+
106
+ ### Plans Discovered
107
+ | Plan | Name | Breath | Dependencies | Status |
108
+ |------|------|------|--------------|--------|
109
+ | {N}-01 | {name} | 1 | none | pending |
110
+ | {N}-02 | {name} | 1 | none | pending |
111
+ | {N}-03 | {name} | 2 | {N}-01 | pending |
112
+ ```
113
+
114
+ ### Step 3: Group by Breath (Dominion Flow Standard)
115
+
116
+ **Breath Grouping Rules:**
117
+ - Plans in same breath execute in parallel
118
+ - Breath N+1 waits for Breath N to complete
119
+ - Dependencies must be in earlier breaths
120
+
121
+ **Display:**
122
+ ```
123
+ â—† Execution Plan
124
+ Breath 1: 2 plans (parallel)
125
+ ├─ {N}-01: {name}
126
+ └─ {N}-02: {name}
127
+ Breath 2: 1 plan
128
+ └─ {N}-03: {name} (depends on {N}-01)
129
+ ```
130
+
131
+ ### Step 3.5: Path Verification Gate (MANDATORY — v5.0)
132
+
133
+ **Trigger:** The wrong-repo incident (subagent explored `my-other-project` instead of `MY-PROJECT`).
134
+
135
+ **Before ANY file operation, verify these HARD GATES (no confidence override):**
136
+
137
+ ```
138
+ PATH VERIFICATION — ALWAYS RUN (not confidence-gated)
139
+
140
+ 1. WORKING DIRECTORY CHECK
141
+ expected_project = extract from CONSCIENCE.md or VISION.md
142
+ actual_cwd = pwd
143
+ IF actual_cwd does NOT contain expected_project path:
144
+ → HARD STOP. Display:
145
+ "WRONG DIRECTORY: Expected {expected}, got {actual_cwd}"
146
+ "Aborting to prevent cross-project contamination."
147
+
148
+ 2. SUBAGENT PATH INJECTION
149
+ When spawning ANY subagent (Task tool), ALWAYS include:
150
+ <path_constraint>
151
+ MANDATORY: All file operations MUST be within:
152
+ {project_root_path}
153
+
154
+ VERIFY before every Read/Write/Edit/Bash:
155
+ - File path starts with {project_root_path}
156
+ - No ../../ escapes above project root
157
+ - Bash commands operate on correct directory
158
+
159
+ If you find yourself in the wrong directory: STOP immediately.
160
+ Do NOT read, edit, or delete files outside the project.
161
+ </path_constraint>
162
+
163
+ 3. DELETION SAFETY
164
+ Before deleting files, verify:
165
+ - File path is within project root (absolute path check)
166
+ - File is not in the "keep" list (shared services, core files)
167
+ - Count matches: planned deletions == actual files found
168
+ - If count mismatch: STOP and report discrepancy
169
+ (e.g., "Plan says 28, found 27 — investigate missing file")
170
+
171
+ 4. CROSS-PROJECT CONTAMINATION CHECK
172
+ If multiple working directories exist in session:
173
+ - Explicitly name the TARGET project in every tool call
174
+ - Never use relative paths that could resolve to wrong project
175
+ - Log which project each operation targets
176
+ ```
177
+
178
+ **Why this is mandatory (not confidence-gated):**
179
+ Confidence gates allow override at HIGH confidence. Path verification does NOT.
180
+ A subagent editing the wrong repo at 95% confidence is still catastrophic.
181
+ This gate is a circuit breaker, not a confidence check.
182
+
183
+ ### Step 3.55: Cross-Phase DAG Validation (v13.0)
184
+
185
+ > **Source:** turborepo `lib.rs` validate_graph (Tarjan SCC), oxc `no_cycle.rs`.
186
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Cross-Phase DAG Validation
187
+
188
+ **Before executing any phase, validate the phase dependency chain:**
189
+
190
+ ```
191
+ 1. BUILD PHASE GRAPH:
192
+ nodes = all phases from VISION.md
193
+ edges = phase dependencies (phase N depends on phase N-1's outputs)
194
+
195
+ 2. CHECK FOR CYCLES (Tarjan's SCC from turborepo):
196
+ FOR each pair of phases with cross-references:
197
+ IF Phase A depends on Phase B AND Phase B depends on Phase A:
198
+ Report cycle: "Phase {A} → Phase {B} → Phase {A} creates a cycle."
199
+ Suggest cut points: "Break by removing one dependency direction."
200
+ → STOP — do not execute with circular dependencies
201
+
202
+ 3. CHECK DEPENDENCY AVAILABILITY:
203
+ FOR current phase's dependencies:
204
+ IF dependency phase status != "complete" in CONSCIENCE.md:
205
+ FLAG: "Phase {N} depends on Phase {M} which is not complete"
206
+ → IF dependency is NOT in execution range: BLOCK with explanation
207
+ → IF dependency IS in execution range: move dependency to earlier breath,
208
+ rebuild breath groupings from Step 3, display revised manifest
209
+
210
+ 4. VALIDATE CONTRACTS (provides/requires matching):
211
+ IF current phase BLUEPRINT has "requires" in frontmatter:
212
+ FOR each required item:
213
+ Check that a previous phase's BLUEPRINT "provides" it
214
+ IF missing:
215
+ → FLAG: "Phase {N} requires '{item}' but no previous phase provides it"
216
+ This is a PLANNING gap — route back to /fire-2-plan
217
+ ```
218
+
219
+ **Skip condition:** Phase 1 (no dependencies possible). Single-phase execution.
220
+
221
+ ### Step 3.6: Select Execution Mode (Automatic) + Delegation Bounding (v13.0)
222
+
223
+ **For each breath, automatically determine execution strategy.**
224
+
225
+ See `@references/execution-mode-intelligence.md` for full algorithm.
226
+
227
+ > **v13.0 — Semaphore Delegation Bounding:** From turborepo `execute.rs` + mise `task_scheduler.rs`.
228
+ > Permit pool limits concurrent agent spawning to prevent depth explosion.
229
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Semaphore Delegation Bounding
230
+
231
+ ```
232
+ # ─── v13.0: Delegation bounding (semaphore pattern) ───
233
+ max_concurrent_agents = 4 (default, configurable)
234
+
235
+ # Mode determines the semaphore limit:
236
+ # SWARM mode: max_concurrent_agents = min(plan_count, 4)
237
+ # SUBAGENT mode: max_concurrent_agents = min(plan_count, 3)
238
+ # SEQUENTIAL mode: max_concurrent_agents = 1
239
+ #
240
+ # CRITICAL: Sub-agents spawned BY agents do NOT get separate permits.
241
+ # They share their parent's permit — this prevents depth explosion.
242
+ # An executor agent that spawns a researcher sub-agent does NOT consume
243
+ # a new permit — both run under the original executor's permit.
244
+
245
+ FOR each breath:
246
+ plans_in_wave = plans with matching breath number
247
+ file_sets = [plan.files_modified for each plan]
248
+
249
+ IF plans_in_wave.count == 1:
250
+ MODE = SEQUENTIAL
251
+
252
+ ELIF plans_in_wave.count >= 3 AND no file overlap between plans:
253
+ MODE = SWARM
254
+ Compose team: Backend/Frontend/Test specialists based on file patterns
255
+
256
+ ELIF plans_in_wave.count >= 2 AND no file overlap:
257
+ MODE = SUBAGENT (Task tool parallelism)
258
+
259
+ ELIF plans_in_wave.count >= 2 AND file overlap detected:
260
+ MODE = SEQUENTIAL (serialize to avoid conflicts)
261
+
262
+ ELSE:
263
+ MODE = SEQUENTIAL (safe default)
264
+ ```
265
+
266
+ **Display mode decision:**
267
+ ```
268
+ +---------------------------------------------------------------+
269
+ | EXECUTION MODE: [SWARM/SUBAGENT/SEQUENTIAL] |
270
+ +---------------------------------------------------------------+
271
+ | Breath {W}: {N} plans |
272
+ | File overlap: [None/Detected] |
273
+ | Rationale: [why this mode was selected] |
274
+ | |
275
+ | [If SWARM:] |
276
+ | Team composition: |
277
+ | Backend Agent: Plan {N}-01 (API work) |
278
+ | Frontend Agent: Plan {N}-02 (UI work) |
279
+ | Test Agent: Plan {N}-03 (test work) |
280
+ +-----------------------------------------------------------------+
281
+ ```
282
+
283
+ **Override flags:** `--swarm`, `--sequential`, or `--subagent` force a specific mode.
284
+
285
+ **Fallback chain:** SWARM -> SUBAGENT -> SEQUENTIAL (if higher mode unavailable or fails).
286
+
287
+ ### Step 3.7: Git Worktree Isolation (v10.0 — Optional)
288
+
289
+ > working in isolated git worktrees prevent file conflicts without coordination overhead.
290
+ > Google/MIT Scaling Laws (Dec 2025) confirm: isolation removes the 39-70% degradation from
291
+ > shared-state contention in parallelizable tasks.
292
+
293
+ **When `--worktree` flag is set OR execution mode is SWARM/SUBAGENT:**
294
+
295
+ ```
296
+ FOR each parallel agent in breath:
297
+ # Create isolated worktree
298
+ branch_name = "fire-execute/{plan_id}"
299
+ worktree_path = ".claude/worktrees/{plan_id}"
300
+
301
+ git worktree add -b {branch_name} {worktree_path} HEAD
302
+
303
+ # Agent works in isolated copy
304
+ agent.working_directory = {worktree_path}
305
+ agent.path_constraint = {worktree_path}
306
+
307
+ AFTER all agents in breath complete:
308
+ # Merge worktree branches back to main
309
+ FOR each completed worktree:
310
+ git merge --no-ff {branch_name}
311
+
312
+ IF merge conflict:
313
+ → Log conflict files
314
+ Attempt auto-resolution (accept both sides for additive changes)
315
+ → If unresolvable: flag for human review
316
+
317
+ # Clean up
318
+ git worktree remove {worktree_path}
319
+ git branch -d {branch_name}
320
+ ```
321
+
322
+ **Benefits over shared-state coordination:**
323
+ - Zero file conflicts between parallel agents (each has own copy)
324
+ - Atomic: if one agent fails, its worktree is discarded without affecting others
325
+ - Rollback: `git worktree remove` cleanly reverts any agent's work
326
+
327
+ **Worktree + SWARM arbitration rule (v13.0):**
328
+ When `--worktree` is active AND SWARM mode is selected:
329
+ - File conflict coordination is handled by git merge (no `.shared-state.json` for file tracking)
330
+ - BUT `.agent-messages.jsonl` is STILL used for CLAIM/BLOCKED/DISCOVERY messages (append-only = safe across worktrees)
331
+ - Task ownership in `.shared-state.json` is STILL used (lives in `.planning/` which is shared, not per-worktree)
332
+ - Reasoning traces in `.shared-state.json` are STILL used (same reason)
333
+ - Only file_modified tracking moves to git merge
334
+
335
+ **When NOT to use worktrees:**
336
+ - SEQUENTIAL mode (no parallelism needed)
337
+ - Single-plan breaths (no contention possible)
338
+ - Tasks that need to see each other's changes in real-time
339
+
340
+ ### Inter-Agent Coordination (SWARM mode) v13.0 Enhanced
341
+
342
+ > **v13.0:** Enhanced with Task Ownership Protocol, Shared-State Conflict Prevention,
343
+ > Agent Communication Protocol, and Cascade Prevention from MULTI_AGENT_COORDINATION skill.
344
+ > Sources: turborepo Walker+Mutex, mise task_scheduler, lazygit AsyncHandler, biome catch_unwind, bun BundleThread+Waker.
345
+
346
+ When running in SWARM mode, agents coordinate via `.planning/.shared-state.json`:
347
+
348
+ - **Before creating new types/interfaces/exports,** check if another agent already created it by reading `.planning/.shared-state.json`. Duplicate type definitions across agents cause merge conflicts.
349
+ - **Append discoveries** to the shared state file using atomic writes. Each agent writes its own key (e.g., `"backend": { "exports": [...] }`).
350
+ - **If a file conflict is detected** (two agents modified the same file), PAUSE and log a coordination request in the shared state: `"conflicts": [{ "file": "...", "agents": ["backend", "frontend"] }]`.
351
+ - **The Team Lead periodically checks** shared state and resolves conflicts by assigning the contested file to a single agent.
352
+
353
+ #### Shared-State with Version Counter (v13.0 — Conflict Prevention)
354
+
355
+ > **Source:** turborepo Walker+Mutex, lazygit AsyncHandler ID ordering.
356
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Shared-State Conflict Prevention
357
+
358
+ ```json
359
+ // .planning/.shared-state.json enhanced with version counter
360
+ {
361
+ "version": 1,
362
+ "last_writer": null,
363
+ "last_write_at": null,
364
+ "tasks": {},
365
+ "backend": {
366
+ "exports": ["UserService", "AuthMiddleware"],
367
+ "files_modified": ["src/services/user.ts", "src/middleware/auth.ts"]
368
+ },
369
+ "frontend": {
370
+ "exports": ["UserContext", "LoginForm"],
371
+ "files_modified": ["src/contexts/user.tsx", "src/components/LoginForm.tsx"]
372
+ },
373
+ "conflicts": []
374
+ }
375
+ ```
376
+
377
+ ```
378
+
379
+ **Write Protocol (compare-and-swap — prevents "last writer wins" data loss):**
380
+ ```
381
+ 1. Read .shared-state.json note version (e.g., 1)
382
+ 2. Make changes in memory
383
+ 3. Before writing: re-read file, check version still matches
384
+ IF version changed (another agent wrote):
385
+ MERGE: combine your changes with theirs
386
+ Write with version = max(yours, theirs) + 1
387
+ IF version same:
388
+ → Write with version = version + 1
389
+ Set last_writer = {agent_name}, last_write_at = now()
390
+ ```
391
+
392
+ #### Task Ownership Protocol (v13.0)
393
+
394
+ > **Source:** mise `task_scheduler.rs`, turborepo `visitor/mod.rs`.
395
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Task Ownership Protocol
396
+
397
+ ```
398
+ TASK OWNERSHIP (in .shared-state.json "tasks" key):
399
+
400
+ "tasks": {
401
+ "03-01-task-1": {
402
+ "owner": "backend-agent",
403
+ "status": "in_progress",
404
+ "claimed_at": "2026-03-08T10:30:00Z",
405
+ "transfer_count": 0
406
+ }
407
+ }
408
+
409
+ CLAIM PROTOCOL:
410
+ 1. Agent reads .shared-state.json (note version)
411
+ 2. Finds task with owner=null and status=pending
412
+ 3. Writes owner={agent_name}, status=in_progress, claimed_at=now()
413
+ 4. Uses compare-and-swap write protocol above
414
+ 5. Proceeds with task
415
+
416
+ TRANSFER RULES:
417
+ - transfer_count tracks how many times a task changed hands
418
+ - IF transfer_count >= 2: escalate to orchestrator (task is toxic)
419
+ - On transfer: previous owner writes failure summary to task entry
420
+ - Source: 17x error amplification in unstructured networks
421
+
422
+ COMPLETION:
423
+ - Agent writes status=completed, adds summary
424
+ - Checks for next unclaimed task
425
+ - IF no unclaimed tasks: agent signals idle
426
+ ```
427
+
428
+ #### Cascade Prevention (v13.0 catch_unwind pattern)
429
+
430
+ > **Source:** biome `handler.rs` catch_unwind isolation.
431
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Error Classification
432
+
433
+ ```
434
+ FOR each agent spawned in parallel (SWARM or SUBAGENT mode):
435
+ result = catch_agent_execution(agent, task)
436
+
437
+ MATCH result:
438
+ OK(completed) → record success, continue
439
+ OK(failed) → record failure as diagnostic, continue OTHER agents
440
+ PANIC(error) → record panic as diagnostic, continue OTHER agents
441
+ Log: "Agent {name} panicked on task {N}: {error}"
442
+ The PANIC is captured, NOT propagated.
443
+
444
+ CRITICAL: One agent's failure NEVER stops sibling agents.
445
+ Each agent runs in isolation. Failures are collected and reported
446
+ after ALL agents in the breath complete.
447
+ ```
448
+
449
+ #### Agent Communication Protocol (v13.0 — JSONL Message Queue)
450
+
451
+ > **Source:** bun BundleThread+Waker, mise channel-based dispatch.
452
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Agent Communication Protocol
453
+
454
+ ```
455
+ AGENT MESSAGE TYPES:
456
+ CLAIM: "I am taking ownership of task {id}"
457
+ COMPLETE: "Task {id} is done. Summary: {text}"
458
+ BLOCKED: "I cannot proceed. Reason: {text}. Need: {what}"
459
+ DISCOVERY: "Found something other agents should know: {text}"
460
+ CONFLICT: "I need to modify {file} but {other_agent} owns it"
461
+ HANDOFF: "Transferring task {id} to {target_agent}. Reason: {text}"
462
+
463
+ MESSAGE QUEUE (append-only file):
464
+ .planning/.agent-messages.jsonl
465
+
466
+ Each line is a JSON message:
467
+ {"type":"CLAIM","agent":"backend","task":"03-01-task-1","timestamp":"..."}
468
+ {"type":"DISCOVERY","agent":"backend","data":"API uses camelCase not snake_case","timestamp":"..."}
469
+ {"type":"COMPLETE","agent":"backend","task":"03-01-task-1","summary":"Added auth middleware","timestamp":"..."}
470
+
471
+ WHY JSONL (not JSON):
472
+ - Append-only = no write conflicts (multiple agents can append simultaneously)
473
+ - Line-based = easy to read incrementally (tail -n +{offset})
474
+ - No parse failures from concurrent writes (each line is independent)
475
+
476
+ READING PROTOCOL:
477
+ - Agents read new messages since their last read (track line offset)
478
+ - DISCOVERY messages inform all agents' playbooks
479
+ - CONFLICT messages trigger orchestrator intervention
480
+ - BLOCKED messages may unblock when another agent COMPLETEs a dependency
481
+ ```
482
+
483
+ ### Reasoning Trace Sharing (MAKER v9.1)
484
+
485
+ > Agents sharing intermediate reasoning (not just outputs) produce better coordinated results.
486
+
487
+ In SWARM mode, agents write reasoning traces to shared state so other agents can build on their decisions.
488
+
489
+ **Extended shared-state.json structure:**
490
+
491
+ ```json
492
+ {
493
+ "backend": {
494
+ "exports": ["UserService", "AuthMiddleware"],
495
+ "files_modified": ["src/services/user.ts"],
496
+ "reasoning": [
497
+ { "step": "Chose connection pooling over per-request", "why": "10+ concurrent queries expected", "confidence": 85 },
498
+ { "step": "Added index on user_id", "why": "JOIN was full table scan", "confidence": 95 }
499
+ ]
500
+ },
501
+ "frontend": {
502
+ "exports": ["UserContext"],
503
+ "files_modified": ["src/contexts/user.tsx"],
504
+ "reasoning": [
505
+ { "step": "Used React Query over useState+useEffect", "why": "Backend noted 10+ concurrent queries caching prevents redundant fetches", "confidence": 90 }
506
+ ]
507
+ }
508
+ }
509
+ ```
510
+
511
+ **Add to SWARM executor prompt:**
512
+
513
+ ```
514
+ <shared_reasoning>
515
+ Before making architectural decisions, READ .planning/.shared-state.json for reasoning
516
+ from other agents. Your decisions should be informed by their context.
517
+
518
+ After each significant decision, APPEND to your reasoning array:
519
+ { "step": "what you decided", "why": "rationale", "confidence": N }
520
+
521
+ Focus on decisions that OTHER agents would benefit from knowing about —
522
+ API contracts, data shapes, library choices, performance trade-offs.
523
+ </shared_reasoning>
524
+ ```
525
+
526
+ ### Architect/Editor Model Split (v10.0)
527
+
528
+ > plans changes as a structured diff spec, fast model applies them. Achieves 85% on
529
+ > SWE-bench by separating reasoning from execution. Anthropic's own model tiering
530
+ > (Opus/Sonnet/Haiku) makes this practical without additional API setup.
531
+
532
+ **When `--model-split` flag is set OR task difficulty is COMPLEX:**
533
+
534
+ ```
535
+ ARCHITECT PHASE (Opus strong reasoning):
536
+ Input: BLUEPRINT.md task description + relevant source files
537
+ Output: Structured change specification:
538
+
539
+ ## Change Spec for Task {N}
540
+ ### File: {path}
541
+ - Action: CREATE | MODIFY | DELETE
542
+ - Location: line {N} (for MODIFY)
543
+ - Change: {description of what to change and why}
544
+ - New code sketch: {pseudocode or key logic}
545
+ ### Dependencies: {files that must exist first}
546
+ ### Verification: {how to confirm the change works}
547
+
548
+ EDITOR PHASE (Haiku — fast execution):
549
+ Input: Change spec from Architect + source files
550
+ Output: Actual file edits using Edit/Write tools
551
+
552
+ Rules for Editor:
553
+ - Follow change spec EXACTLY do not deviate
554
+ - If spec is ambiguous: ask Architect (not user)
555
+ - If spec is impossible: report back with reason
556
+ - Apply code comments standard v3.2 to all changes
557
+ ```
558
+
559
+ **Model routing by difficulty (automatic):**
560
+
561
+ | Difficulty | Architect | Editor | Rationale |
562
+ |-----------|-----------|--------|-----------|
563
+ | SIMPLE | skip | Haiku | No planning needed, direct edit |
564
+ | MODERATE | Sonnet | Haiku | Balance of reasoning + speed |
565
+ | COMPLEX | Opus | Sonnet | Maximum reasoning + reliable execution |
566
+
567
+ **Cost savings:** ~60% of tasks are SIMPLE (Haiku only). MODERATE tasks use Sonnet+Haiku
568
+ instead of Opus for everything. Only COMPLEX tasks use full Opus reasoning.
569
+
570
+ **Override:** `--model-split` forces architect/editor for all tasks regardless of difficulty.
571
+
572
+ ### Task-Level Resume
573
+
574
+ When resuming with `--continue`, read RECORD.md for the current plan:
575
+
576
+ - **Skip tasks already marked as completed** -- verify artifacts still exist via `git log` and file existence checks before skipping.
577
+ - **Start execution from the first incomplete task** in the current breath.
578
+ - **Do NOT re-execute completed tasks** to avoid duplicate commits, redundant file modifications, and wasted context.
579
+
580
+ ```
581
+ IF --continue flag is set:
582
+ 1. Read .planning/phases/{N}-{name}/{N}-{NN}-RECORD.md for each plan
583
+ 2. For each plan with existing RECORD.md:
584
+ - Parse completed tasks from the "Accomplishments" section
585
+ - Verify key_files.created still exist on disk
586
+ - Verify commits exist in git log
587
+ - IF all verified → mark plan as COMPLETE, skip execution
588
+ - IF artifacts missing → mark plan as INCOMPLETE, re-execute
589
+ 3. For plans without RECORD.md → execute normally
590
+ 4. Resume from the first incomplete breath
591
+ ```
592
+
593
+ ### Step 3.8: Monitor Agent — Planner-Executor Bridge (v12.9)
594
+
595
+ > Oct 2025, rev Jan 2026) — semantically equivalent planner outputs cause 7.9%-83.3% performance drops
596
+ > in executor agents. A lightweight monitor that checks executor alignment with planner intent fixes
597
+ > 40-88% of these failures. Cost: one verification prompt per breath, not a full agent spawn.
598
+
599
+ **BEFORE spawning executors for each breath, run the Monitor Check:**
600
+
601
+ ```
602
+ FOR each plan in current breath:
603
+ monitor_check = {
604
+ plan_requirements: extract all must-haves + task done criteria from BLUEPRINT.md,
605
+ executor_context: the context slice being injected into executor (from Step 5),
606
+ skill_alignment: do loaded skills match the task requirements?
607
+ }
608
+
609
+ VERIFY:
610
+ 1. Every must-have from BLUEPRINT is represented in executor context
611
+ IF missing: inject the missing requirement before spawning
612
+ LOG: "Monitor: injected missing requirement '{req}' into executor context"
613
+
614
+ 2. Task dependencies are resolvable from executor's available context
615
+ → IF dependency references a file/export from another plan not yet complete:
616
+ FLAG: "Monitor: Task {N} depends on {file} from Plan {M} — not yet available"
617
+ → Move task to next breath OR mark as BLOCKED
618
+
619
+ 3. No semantic drift between plan language and executor instructions
620
+ → IF plan says "create REST endpoint" but task says "add function":
621
+ CLARIFY in executor context: "This function serves as a REST endpoint"
622
+
623
+ REPORT:
624
+ monitor_injections: {count of items added/clarified}
625
+ monitor_flags: {count of dependency issues found}
626
+
627
+ IF monitor_injections > 0:
628
+ LOG: "Monitor bridge: {N} context injections, {M} dependency flags"
629
+ ```
630
+
631
+ **Skip condition:** SEQUENTIAL mode with single plan (no cross-agent coordination needed).
632
+ **Cost:** ~200 tokens per breath. Prevents failures that cost 5,000+ tokens to debug.
633
+
634
+ ### Step 4: Execute Breath (Enhanced with WARRIOR + Mode Intelligence)
635
+
636
+ For each breath, execute using the selected mode:
637
+
638
+ ```
639
+ ━━━ DOMINION FLOW ► BREATH {W} EXECUTION ({MODE}) ━━━
640
+ ```
641
+
642
+ **MODE = SWARM:**
643
+ ```
644
+ Team Lead delegates to specialist teammates:
645
+ "Execute Breath {W} as a team.
646
+ - Backend Agent: Plan {N}-01 (@BLUEPRINT.md)
647
+ - Frontend Agent: Plan {N}-02 (@BLUEPRINT.md)
648
+ - Test Agent: Plan {N}-03 (@BLUEPRINT.md)
649
+ Each agent: atomic commits per task, create RECORD.md"
650
+ ```
651
+
652
+ **MODE = SUBAGENT:**
653
+ ```
654
+ â—† Spawning executors for Breath {W}...
655
+ âš¡ fire-executor: Plan {N}-01 - {description}
656
+ âš¡ fire-executor: Plan {N}-02 - {description}
657
+ ```
658
+
659
+ **MODE = SEQUENTIAL:**
660
+ ```
661
+ â—† Executing Breath {W} sequentially...
662
+ → Plan {N}-01: {description} (executing...)
663
+ [complete]
664
+ → Plan {N}-02: {description} (executing...)
665
+ ```
666
+
667
+ **Task Queue Initialization (v12.9 SWARM/SUBAGENT only):**
668
+
669
+ ```
670
+ IF mode in [SWARM, SUBAGENT]:
671
+ Initialize task_queue in .planning/.shared-state.json:
672
+
673
+ FOR each plan in current breath:
674
+ FOR each task in plan's BLUEPRINT:
675
+ task_queue["{plan_id}-{task_id}"] = {
676
+ "owner": null,
677
+ "status": "pending",
678
+ "claimed_at": null,
679
+ "completed_at": null,
680
+ "transfer_count": 0,
681
+ "failure_summary": null
682
+ }
683
+
684
+ Write shared-state.json with CAS (version + 1)
685
+ Log: "Task queue initialized: {N} tasks across {M} plans"
686
+ ```
687
+
688
+ > Orchestrator pre-populates the queue; executors claim/release via Step 1.55.
689
+
690
+ **Spawn fire-executor per plan (parallel for SUBAGENT/SWARM):**
691
+
692
+ ```
693
+ â—† Spawning executors for Breath {W}...
694
+ âš¡ fire-executor: Plan {N}-01 - {description}
695
+ âš¡ fire-executor: Plan {N}-02 - {description}
696
+ ```
697
+
698
+ ### Step 5: fire-executor Agent Behavior (v13.0)
699
+
700
+ > **v13.0:** Context injection mode depends on the `--token-efficient` flag.
701
+ > Default = full context (best quality). Token-efficient = ALAS context slicing (~60% reduction).
702
+
703
+ **DEFAULT MODE Full Context Injection:**
704
+
705
+ Each fire-executor receives the complete plan context:
706
+ ```markdown
707
+ Inject into executor spawn:
708
+ - Full BLUEPRINT.md for this plan
709
+ - All skills_to_apply (full documents)
710
+ - CONSCIENCE.md project context
711
+ - Episodic recall (if available)
712
+ - Rolling playbook (if available)
713
+ - Checkpoint context (if resuming)
714
+ - Filtered shared state view (v12.9 — see below)
715
+ ```
716
+
717
+ **Filtered State Views (v12.9 — SWARM/SUBAGENT only):**
718
+
719
+ > share by communicating, not by sharing memory." Each agent sees only what it needs.
720
+ > Reduces context noise and prevents agents from being confused by sibling state.
721
+
722
+ ```
723
+ IF mode in [SWARM, SUBAGENT]:
724
+ FOR each executor being spawned:
725
+ filtered_state = {
726
+ "my_tasks": [tasks from task_queue where owner=null OR owner={this_agent}],
727
+ "decisions": [all decisions — these are shared knowledge],
728
+ "sibling_status": [
729
+ { "agent": "{name}", "tasks_completed": N, "status": "active|idle|blocked" }
730
+ // Summary only — no full state from siblings
731
+ ]
732
+ }
733
+
734
+ Inject as <shared_context> block in executor prompt.
735
+
736
+ DO NOT inject:
737
+ - Full .shared-state.json (too much irrelevant context)
738
+ - Other agents' detailed error logs
739
+ - Other agents' playbook entries
740
+ - Raw .agent-messages.jsonl (agents read this themselves when needed)
741
+ ```
742
+
743
+ **Scope-Isolated Tool Allowlists (v12.9 — SWARM/SUBAGENT only):**
744
+
745
+ > contributed to 90% autonomous task completion. Agents with unrestricted tool access
746
+ > make more out-of-scope changes. Scope isolation constrains blast radius.
747
+
748
+ ```
749
+ IF mode in [SWARM, SUBAGENT]:
750
+ FOR each executor being spawned:
751
+ DERIVE tool_allowlist from BLUEPRINT scope manifest:
752
+
753
+ backend_executor:
754
+ allowed_files: "server/**", "shared/**"
755
+ blocked_files: "client/**", "*.config.*"
756
+ allowed_tools: [Read, Write, Edit, Bash, Grep, Glob]
757
+
758
+ frontend_executor:
759
+ allowed_files: "client/**", "shared/**"
760
+ blocked_files: "server/**", "migrations/**"
761
+ allowed_tools: [Read, Write, Edit, Bash, Grep, Glob]
762
+
763
+ test_executor:
764
+ allowed_files: "**/*.test.*", "**/*.spec.*", "e2e/**"
765
+ blocked_files: [] (tests may read anything)
766
+ allowed_tools: [Read, Write, Edit, Bash, Grep, Glob]
767
+
768
+ INJECT as <scope_constraints> in executor prompt:
769
+ <scope_constraints>
770
+ You may ONLY modify files matching: {allowed_files}
771
+ You may NOT modify files matching: {blocked_files}
772
+ If you need changes outside your scope, write a CONFLICT message
773
+ to .agent-messages.jsonl instead of making the change directly.
774
+ </scope_constraints>
775
+
776
+ NOTE: This is ADVISORY Claude Code doesn't enforce file-level permissions.
777
+ The executor's honesty protocol (Step 3) catches scope violations via
778
+ self-assessment. The verifier (Step 1.9) validates no out-of-scope changes.
779
+
780
+ IF mode == SEQUENTIAL:
781
+ Skip single agent has full scope access.
782
+ ```
783
+
784
+ **TOKEN-EFFICIENT MODE (`--token-efficient`) — ALAS Context Slicing:**
785
+
786
+ > See: `@skills-library/_general/methodology/ALAS_STATEFUL_EXECUTION.md`
787
+
788
+ Each fire-executor receives a **context slice** (600-1000 tokens instead of 8-10K):
789
+ ```markdown
790
+ <plan_slice>
791
+ Plan: {N}-{NN} {plan name}
792
+ Must-haves: {extracted list from BLUEPRINT frontmatter}
793
+ Tasks: {numbered task list with done criteria — extracted, not full BLUEPRINT}
794
+ Skills to apply: {skill names only — agent reads full skill on demand}
795
+ Scope: {allowed_files glob from scope manifest}
796
+ </plan_slice>
797
+
798
+ <checkpoint_context>
799
+ <!-- Only present when resuming or after task 1 -->
800
+ Last checkpoint: {cp-id} {summary}
801
+ Playbook: {rolling 5 entries}
802
+ Execution log: .planning/phases/{N}-{name}/execution-log.json
803
+ </checkpoint_context>
804
+ ```
805
+
806
+ **Full documents available ON DEMAND agent reads only when needed:**
807
+ - `@.planning/phases/{N}-{name}/{N}-{NN}-BLUEPRINT.md` read specific sections
808
+ - `@skills-library/{category}/{skill}.md` read when confidence < 50
809
+ - `@.planning/CONSCIENCE.md` read for phase status only
810
+
811
+ <honesty_protocol>
812
+ While executing tasks:
813
+
814
+ **If uncertain:**
815
+ 1. Document the uncertainty
816
+ 2. Search skills library for guidance
817
+ 3. Research if needed
818
+ 4. Proceed with transparency
819
+
820
+ **If blocked:**
821
+ 1. Admit the blocker explicitly
822
+ 2. Document what's blocking
823
+ 3. Request help or create .continue-here.md
824
+ 4. Don't fake progress
825
+
826
+ **If assuming:**
827
+ 1. Document the assumption
828
+ 2. Mark as assumption in code comments
829
+ 3. Add to handoff Issues section
830
+ </honesty_protocol>
831
+
832
+ <kv_cache_strategy>
833
+ <!-- v10.0: KV-Cache-Aware Context Management -->
834
+ <!-- Key insight: KV-cache hit rates collapse when context prefix changes -->
835
+
836
+ **Context Ordering Rule:** Place STABLE context first, DYNAMIC context last.
837
+ The KV-cache reuses computation for unchanged prefix tokens.
838
+
839
+ 1. System prompt + project rules (STABLE — never changes mid-execution)
840
+ 2. Plan context + skills loaded (SEMI-STABLE changes between plans only)
841
+ 3. Episodic recall + confidence (DYNAMIC changes per task)
842
+ 4. Current task instructions (DYNAMIC — changes every call)
843
+
844
+ **Re-injection Strategy:**
845
+ - When switching between plans in SWARM mode, re-inject stable prefix unchanged
846
+ - Only append/replace the dynamic tail — this preserves KV-cache across tasks
847
+ - Avoid re-ordering context blocks between executor calls
848
+ - If context exceeds 80% of window, compress episodic recall first (it has lowest reuse value)
849
+ </kv_cache_strategy>
850
+
851
+ <episodic_recall>
852
+ <!-- v6.0: CoALA Per-Turn Episodic Auto-Injection -->
853
+ <!-- Past experiences relevant to this plan's tasks -->
854
+ <!-- Retrieved via: npm run search -- "{plan keywords}" --limit 3 --two-phase -->
855
+
856
+ {For each relevant memory with score > 0.7:}
857
+ **[{sourceType}] {title}** (score: {score}, utility: {utilityScore})
858
+ {text excerpt — first 300 chars}
859
+ Source: {sourceFile} | Date: {date}
860
+
861
+ <!-- If no relevant memories found, this block is omitted -->
862
+ </episodic_recall>
863
+
864
+ <confidence_gates>
865
+ <!-- v5.0: Confidence-Gated Execution (SAUP-inspired) -->
866
+
867
+ Before each plan task, estimate confidence:
868
+
869
+ **Confidence Signals:**
870
+ + Matching skill found in library: +20
871
+ + Similar reflection exists: +15
872
+ + Tests available to verify: +25
873
+ + Familiar technology/framework: +15
874
+ + Clear, unambiguous requirements: +15
875
+ - Unfamiliar framework/library: -20
876
+ - No tests available: -15
877
+ - Ambiguous/incomplete requirements: -20
878
+ - Security-sensitive change: -10
879
+ - Destructive operation (delete, drop, overwrite): -15
880
+
881
+ **Confidence Levels:**
882
+
883
+ HIGH (>80%): Proceed autonomously
884
+ Execute task directly
885
+ → Run Self-Judge after
886
+
887
+ MEDIUM (50-80%): Proceed with extra validation
888
+ Search reflections: /fire-remember "{task description}" --type reflection
889
+ Search skills: /fire-search "{technology}"
890
+ Run Self-Judge before AND after
891
+ Log uncertainty reason in RECORD.md
892
+
893
+ LOW (<50%): Research first, then proceed
894
+ Search Context7 for current library docs
895
+ Search skills library: /fire-search "{gap}"
896
+ Check if this is outside trained domain
897
+ → IF < 30%: Spawn fire-researcher with the specific gap — get alternatives
898
+ Only escalate to user if research returns no actionable path
899
+ → Create checkpoint before attempting
900
+
901
+ CRITICAL (<20%): Magentic-UI Escalation (v13.0)
902
+ > escalation when agent confidence is critically low. Instead of guessing or
903
+ > spinning, the agent asks the human for the SPECIFIC information it needs.
904
+ DO NOT attempt implementation
905
+ → Compose targeted question: "I need to know X to proceed. Options: A, B, C."
906
+ Include: what you tried, what you learned, what specific gap remains
907
+ IF in autonomous mode (--autonomous): treat as BLOCKED, log to autonomous-log.md
908
+ IF in manual mode: surface question to user via AskUserQuestion
909
+ → AFTER answer received: re-score confidence (should rise to LOW/MEDIUM)
910
+ This prevents the "confident but wrong" failure mode where agents produce
911
+ plausible-looking but fundamentally incorrect implementations
912
+
913
+ **Log confidence in RECORD.md:**
914
+ ```yaml
915
+ confidence_log:
916
+ - task: 1
917
+ score: 85
918
+ level: HIGH
919
+ signals: [skill_match, tests_available, familiar_tech]
920
+ - task: 3
921
+ score: 45
922
+ level: LOW
923
+ signals: [unfamiliar_framework, no_tests, ambiguous_requirements]
924
+ action: "Asked user for clarification on WebSocket auth approach"
925
+ ```
926
+ </confidence_gates>
927
+ ```
928
+
929
+ ### Step 5.1: Populate Episodic Recall (v6.0 CoALA)
930
+ Before spawning executors, the orchestrator populates the `<episodic_recall>` block:
931
+
932
+ ```
933
+ # 1. Extract keywords from plan tasks
934
+ plan_keywords = extract_keywords(BLUEPRINT.md task descriptions)
935
+
936
+ # 2. Search vector memory with two-phase retrieval
937
+ cd ~/.claude/memory
938
+ results = npm run search -- "{plan_keywords}" --limit 3 --two-phase
939
+
940
+ # 3. Fill <episodic_recall> block in executor prompt
941
+ IF results exist AND top_result.score > 0.7:
942
+ Fill block with top 3 results (title, score, utility, text excerpt)
943
+ ELSE:
944
+ Remove <episodic_recall> block entirely (no noise for novel tasks)
945
+ ```
946
+
947
+ **Cost control:** Only inject memories with score > 0.7. Cap at 3 results (~500 tokens).
948
+
949
+ ---
950
+
951
+ **Executor Creates:**
952
+ 1. Implements all tasks from BLUEPRINT.md
953
+ 2. **Runs Quick Self-Judge after each task** (v5.0 — Agent-as-Judge)
954
+ 3. Runs verification commands for each task
955
+ 4. Creates `{N}-{NN}-RECORD.md` (fire-handoff.md format)
956
+ 5. Writes checkpoint to `execution-log.json` after each task (v13.0 — ALAS)
957
+ 6. Updates SKILLS-INDEX.md with skills applied
958
+
959
+ **Agent Return Protocol (v13.0 Structured Envelope):**
960
+
961
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Structured Agent Return Envelope
962
+ > Orchestrator reads structured envelope to decide next steps. Full transcript in execution log if needed.
963
+
964
+ ```
965
+ When sub-agent completes, it returns a STRUCTURED ENVELOPE:
966
+ {
967
+ "agent": "{agent_name}",
968
+ "plan": "{N}-{NN}",
969
+ "status": "completed | failed | blocked | partial",
970
+ "summary": "1-2 sentences of what was done" (MAX 200 tokens),
971
+ "tasks": {
972
+ "completed": ["task-1", "task-2"],
973
+ "failed": ["task-3"],
974
+ "skipped": []
975
+ },
976
+ "files_changed": ["path/to/file.ts"],
977
+ "errors": [
978
+ {
979
+ "task": "task-3",
980
+ "category": "INTERMITTENT | LOGIC | ARCHITECTURE | ENVIRONMENT",
981
+ "message": "What went wrong",
982
+ "severity": "ERROR | WARNING | PANIC",
983
+ "retry_eligible": true
984
+ }
985
+ ],
986
+ "warnings_count": 0,
987
+ "confidence": 85,
988
+ "checkpoint_id": "cp-003",
989
+ "next_needs": "Brief note for downstream agent" (MAX 100 tokens)
990
+ }
991
+
992
+ ORCHESTRATOR PARSING RULES:
993
+ status=completed → proceed to next breath
994
+ status=partial → check tasks.failed for retry routing by error category
995
+ status=failed → route by errors[].category:
996
+ INTERMITTENT → retry up to 2x
997
+ LOGIC → re-read requirements, different approach
998
+ ARCHITECTURE → escalate to planner (do NOT retry)
999
+ ENVIRONMENT fix env, then retry
1000
+ status=blocked → read errors[0].message for blocker description
1001
+ warnings_count > 10 treat as soft failure (oxc cumulative threshold)
1002
+
1003
+ Token savings: ~70% per agent return vs full transcript.
1004
+
1005
+ NOTE: The executor MUST set `warnings_count` in the envelope to the
1006
+ `warning_count` accumulated across all tasks from Step 3.5 circuit breaker.
1007
+ These are the SAME value — the field name uses plural in the envelope
1008
+ for JSON convention but maps directly from the circuit breaker counter.
1009
+ ```
1010
+
1011
+ ### Step 5.5: Quick Self-Judge (v5.0 — Agent-as-Judge)
1012
+
1013
+
1014
+ After completing each task in a plan, pause for 30 seconds of self-critique:
1015
+
1016
+ ```markdown
1017
+ ## Quick Self-Judge (before marking task complete)
1018
+ 1. Does this change do what the plan asked? [Y/N]
1019
+ 2. Could this break something that was working? [Y/N — if Y, what?]
1020
+ 3. Am I confident this is correct, or am I guessing? [confident/uncertain]
1021
+ 4. Did I check for the obvious: imports, types, null cases? [Y/N]
1022
+ 5. Would I approve this in a code review? [Y/N]
1023
+
1024
+ IF any N or "uncertain":
1025
+ STOP. Re-examine before proceeding.
1026
+ → Document what triggered the pause.
1027
+
1028
+ IF "uncertain":
1029
+ Log to ~/.claude/reflections/{date}_uncertain-{task-slug}.md
1030
+ → Include: what made you uncertain, what you checked, what you decided
1031
+ trigger: "self-judge-uncertain"
1032
+ ```
1033
+
1034
+ **This is NOT a full verification.** It's a 30-second gut check that catches:
1035
+ - Wrong file edited
1036
+ - Missing import after refactor
1037
+ - Accidentally deleted working code
1038
+ - Copying a pattern that doesn't apply here
1039
+
1040
+ **When to skip:** Trivial changes (typo fix, comment update, config value change)
1041
+
1042
+ ### Step 5.6: Call-Path Verification Dead Code Prevention (v11.0)
1043
+
1044
+ > features declared, committed, and documented but never wired. Examples: findSimilar()
1045
+ > declared but never called, parentId field added but never populated. The fix: verify
1046
+ > every new function/export has at least one call site before marking task complete.
1047
+
1048
+ After each task that creates new functions, exports, or API endpoints:
1049
+
1050
+ ```
1051
+ FOR each new_symbol created in this task:
1052
+ call_sites = grep -r "{symbol_name}" src/ --include="*.ts" --include="*.tsx" | grep -v "export\|function\|const.*="
1053
+
1054
+ IF call_sites == 0:
1055
+ FLAG: "DEAD CODE: {symbol_name} declared in {file} but never called"
1056
+ ACTION: Wire it into the appropriate caller before proceeding
1057
+
1058
+ IF call_sites == 1 AND call_site is only the test file:
1059
+ NOTE: "Only called from tests — verify production code path exists"
1060
+ ```
1061
+
1062
+ **Skip condition:** Pure type definitions, interfaces, and configuration constants
1063
+ (these are consumed implicitly by the type system, not called directly).
1064
+
1065
+ ### Step 6: Create fire-handoff.md (Unified Format)
1066
+
1067
+ Each executor creates a summary using the unified format:
1068
+
1069
+ ```markdown
1070
+ ---
1071
+ # Dominion Flow Frontmatter
1072
+ phase: {N}-{name}
1073
+ plan: NN
1074
+ subsystem: {category}
1075
+ duration: "{X} min"
1076
+ start_time: "{ISO timestamp}"
1077
+ end_time: "{ISO timestamp}"
1078
+
1079
+ # Skills & Quality (WARRIOR)
1080
+ skills_applied:
1081
+ - "{category}/{skill}"
1082
+ honesty_checkpoints:
1083
+ - task: {N}
1084
+ gap: "{what was uncertain}"
1085
+ action: "{how it was resolved}"
1086
+ validation_score: {X}/70
1087
+
1088
+ # Dominion Flow Execution Metadata
1089
+ requires: [dependencies]
1090
+ provides: [what this creates]
1091
+ key_files:
1092
+ created: [list]
1093
+ modified: [list]
1094
+ key_decisions:
1095
+ - "{decision made during execution}"
1096
+ ---
1097
+
1098
+ # Power Handoff: Plan {N}-{NN}
1099
+
1100
+ ## Quick Summary
1101
+ {One paragraph of what was accomplished}
1102
+
1103
+ ## Dominion Flow Accomplishments
1104
+ {Task commits, files created/modified, decisions}
1105
+
1106
+ ## Skills Applied (WARRIOR)
1107
+ {Which skills were used and how}
1108
+
1109
+ ## WARRIOR 7-Step Handoff
1110
+ {W-A-R-R-I-O-R sections}
1111
+ ```
1112
+
1113
+ ### Step 7: Wait for Breath Completion (Dominion Flow Standard)
1114
+
1115
+ ```
1116
+ â—† Breath {W} in progress...
1117
+ ├─ ⚡ Plan {N}-01: Running (backend)
1118
+ └─ ⚡ Plan {N}-02: Running (frontend)
1119
+
1120
+ [After completion]
1121
+
1122
+ ✓ Breath {W} complete
1123
+ ├─ ✓ Plan {N}-01: Complete (12 min)
1124
+ └─ ✓ Plan {N}-02: Complete (8 min)
1125
+ ```
1126
+
1127
+ **Breath Completion Checks:**
1128
+ - All executors finished
1129
+ - All RECORD.md files created
1130
+ - No blocking errors
1131
+
1132
+ ### Step 7.05: Merge Only Successes (v12.9)
1133
+
1134
+ > to up to 10 workers, merges ONLY successful results. Failed workers are discarded without blocking.
1135
+
1136
+ ```
1137
+ IF mode == SWARM or mode == SUBAGENT:
1138
+ successful_agents = [agent for agent in breath_agents IF agent.status == "completed"]
1139
+ failed_agents = [agent for agent in breath_agents IF agent.status in ["failed", "blocked"]]
1140
+
1141
+ FOR each successful_agent:
1142
+ Merge RECORD.md into phase results
1143
+ Include files_changed in commit
1144
+
1145
+ FOR each failed_agent:
1146
+ Log failure to autonomous-log.md: "Agent {name} failed: {error_summary}"
1147
+ Discard output (do NOT merge failed work)
1148
+ IF agent used git worktree: git worktree remove {path} (clean discard)
1149
+ → Add failed tasks back to "unclaimed" pool for next breath or retry
1150
+
1151
+ IF successful_agents.length == 0:
1152
+ → ALL agents failed — this is a blocking error
1153
+ GOTO "If Blocking Error" below
1154
+
1155
+ IF failed_agents.length > 0 AND successful_agents.length > 0:
1156
+ LOG: "Breath {W}: {len(successful)} succeeded, {len(failed)} failed — merging successes only"
1157
+ Continue to next breath (failed tasks will be retried or escalated)
1158
+ ```
1159
+
1160
+ **Why:** Blocking the entire breath on one agent's failure wastes the work of successful agents. Merge successes, retry failures separately.
1161
+
1162
+ ### Step 7.06: Dead Task Detection (v12.9)
1163
+
1164
+ > by any agent are silently dropped. Without detection, the verifier can PASS a phase that
1165
+ > has unexecuted tasks (if they're not in must-haves).
1166
+
1167
+ ```
1168
+ AFTER breath completes, check task completeness:
1169
+
1170
+ blueprint_tasks = all tasks defined in BLUEPRINT.md for plans in this breath
1171
+ completed_tasks = tasks marked completed in RECORD.md files
1172
+ skipped_tasks = tasks marked skipped in RECORD.md files
1173
+ all_accounted = completed_tasks + skipped_tasks
1174
+
1175
+ missing_tasks = blueprint_tasks - all_accounted
1176
+
1177
+ IF missing_tasks is not empty:
1178
+ FOR each missing task:
1179
+ LOG: "DEAD TASK: '{task_name}' (Plan {N}-{NN}) was defined but never executed"
1180
+
1181
+ completeness = len(all_accounted) / len(blueprint_tasks) * 100
1182
+
1183
+ IF completeness < 80%:
1184
+ FLAG: "Only {completeness}% of planned tasks accounted for — investigate"
1185
+ → Add missing tasks to next breath's plan OR escalate to planner
1186
+
1187
+ IF completeness >= 80% AND completeness < 99%:
1188
+ NOTE: "{N} tasks unaccounted — logging for verifier review"
1189
+ → Write missing tasks to phase CONSCIENCE.md entry
1190
+
1191
+ IF completeness >= 99% AND completeness < 100%:
1192
+ → WARN: "Near-complete — {N} task(s) missing. Likely skipped intentionally."
1193
+ Log to verifier context for final judgment
1194
+
1195
+ ELSE:
1196
+ → LOG: "Task completeness: 100% ({len(blueprint_tasks)} tasks accounted for)"
1197
+ ```
1198
+
1199
+ **If Blocking Error:**
1200
+ - Create `.continue-here.md` with context
1201
+ - Pause execution
1202
+ - Display error and recovery instructions
1203
+
1204
+ ### Step 7.1: Error Classification Health Check (v10.1)
1205
+
1206
+ > classification at execution boundaries reduces repeat failures by 28%. This integrates
1207
+ > the existing `references/error-classification.md` into breath-level execution flow.
1208
+ > Previously, error classification existed as a reference but was not wired into
1209
+ > the execution pipeline.
1210
+
1211
+ **After each breath completes (success OR failure), classify execution health:**
1212
+
1213
+ ```
1214
+ INPUTS for classification:
1215
+ - files_changed: count of files in breath RECORD.md key_files
1216
+ - error_hash: normalized hash of any error message from breath
1217
+ - previous_errors: error hashes from previous breaths in this phase
1218
+ - output_volume: total lines of code produced vs. baseline
1219
+ - error_type: classification of error (if any)
1220
+
1221
+ CLASSIFY using references/error-classification.md algorithm:
1222
+
1223
+ 1. BLOCKED? → External dependency, permission, or service error
1224
+ Action: Stop execution. Create BLOCKERS.md entry. Save state.
1225
+ Display: EXECUTION BLOCKED banner (see error-classification.md)
1226
+
1227
+ 2. SPINNING? Same error hash seen in 3+ breaths
1228
+ Action: Force approach rotation. Inject anti-patterns list.
1229
+ Display: "Same error for {N} breaths. You MUST try a different approach."
1230
+
1231
+ 3. DEGRADED? → Output volume declined 50%+ from first breath
1232
+ Action: Trigger /fire-cost context check. If ORANGE+, compact.
1233
+ Display: "Output quality declining. Consider /fire-5-handoff."
1234
+
1235
+ 4. STALLED? → No file changes AND no new errors
1236
+ Action: Inject urgency. Search skills for alternative approach.
1237
+ Display: "No progress detected. Pick ONE concrete change."
1238
+
1239
+ 5. PROGRESS → Files changed, errors are new/different
1240
+ Action: Continue to next breath normally.
1241
+
1242
+ RECORD health state in CONSCIENCE.md:
1243
+ | Breath | Health | Trigger | Action |
1244
+ | {W} | {state} | {trigger} | {action_taken} |
1245
+ ```
1246
+
1247
+ **Circuit breaker integration:**
1248
+ - If health is SPINNING for 2 consecutive breaths → trigger circuit breaker
1249
+ - If health is DEGRADED → check `/fire-cost` context tier. If RED+, force handoff.
1250
+ - If health is BLOCKED → do NOT retry. Save state and surface blocker to user.
1251
+
1252
+ **Skip condition:** If breath completed successfully with no errors, mark PROGRESS and continue.
1253
+
1254
+ ### Step 7.4: Post-Feature Config Sync (v10.0)
1255
+
1256
+ After breath completion, check if new features need config file updates.
1257
+
1258
+ **Trigger conditions:**
1259
+ - Breath created new feature with `enabled` toggle
1260
+ - Breath added new config keys referenced in DEFAULT_CONFIG but not in user config
1261
+ - Breath created settings UI that references config paths
1262
+
1263
+ **Actions:**
1264
+ 1. Detect config files in project (*.yaml, *.json, *.toml)
1265
+ 2. If deep_merge/defaults pattern detected:
1266
+ - Load config through app's config loader
1267
+ - Save back to disk (writes merged defaults)
1268
+ - Log: `"Config synced: {file} now includes {N} new feature sections"`
1269
+ 3. If settings dialog exists:
1270
+ - Verify all new features appear in GUI widget list
1271
+ - Log: `"Settings dialog covers {N}/{M} features"`
1272
+
1273
+ **If no config pattern detected:** Skip silently.
1274
+
1275
+ ### Step 7.5: Versioned Context Checkpoint (v6.0 — GCC)
1276
+
1277
+ > Achieved 48% on SWE-Bench-Lite. Agents spontaneously adopted disciplined behaviors
1278
+ > when they knew they could checkpoint and rollback.
1279
+
1280
+ After each breath completes successfully, create a checkpoint commit:
1281
+
1282
+ ```
1283
+ IF breath completed without blocking errors:
1284
+
1285
+ # 1. Stage all modified files from this breath
1286
+ git add {files from breath RECORD.md frontmatter: key_files.created + key_files.modified}
1287
+
1288
+ # 2. Create checkpoint commit
1289
+ git commit -m "checkpoint: phase {N} breath {W} complete — {summary}
1290
+
1291
+ Files: {count} modified, {count} created
1292
+ Plans: {list of plan IDs completed in this breath}
1293
+ Dominion Flow v6.0 checkpoint"
1294
+
1295
+ # 3. Record checkpoint hash
1296
+ checkpoint_hash = git rev-parse HEAD
1297
+
1298
+ # 4. Update CONSCIENCE.md with checkpoint
1299
+ Append to CONSCIENCE.md under ## Checkpoints:
1300
+ | Breath | Commit | Date | Plans | Status |
1301
+ | {W} | {checkpoint_hash:7} | {date} | {plan IDs} | Complete |
1302
+
1303
+ Display:
1304
+ "Checkpoint: {checkpoint_hash:7} — Breath {W} complete ({plans count} plans)"
1305
+
1306
+ IF breath FAILED and checkpoint exists:
1307
+ # Offer rollback option
1308
+ Display:
1309
+ "Breath {W} failed. Last checkpoint: {last_checkpoint_hash:7}
1310
+ To rollback: git reset --hard {last_checkpoint_hash}
1311
+ To continue: fix blocking error and re-run"
1312
+ ```
1313
+
1314
+ **Note:** Only commit files tracked by the plan. Never auto-commit .env, credentials, or
1315
+ files not in the BLUEPRINT.md scope. This is a lightweight GCC adaptation, not full branching.
1316
+
1317
+ ---
1318
+
1319
+ ### Step 7.6: Classify Review Depth (v8.0)
1320
+
1321
+ Determine review depth from phase scope:
1322
+
1323
+ ```
1324
+ total_files = count of all key_files.created + key_files.modified across SUMMARYs
1325
+ has_security = any file in auth/, security/, middleware/, crypto/
1326
+ has_cross_cutting = files span 3+ top-level directories
1327
+
1328
+ IF total_files <= 3 AND NOT has_security:
1329
+ review_depth = "shallow" → 5 personas (Simplicity + Security + Perf + Test + Pattern)
1330
+ ELIF total_files >= 10 OR has_security OR has_cross_cutting:
1331
+ review_depth = "deep" → 16 personas + cross-file analysis
1332
+ ELSE:
1333
+ review_depth = "normal" → 16 personas
1334
+ ```
1335
+
1336
+ ---
1337
+
1338
+ ### Step 7.7: Mandatory Skill Extraction (v10.0)
1339
+
1340
+ After each phase completes, automatically evaluate whether the build produced
1341
+ reusable patterns worth capturing as skills.
1342
+
1343
+ **This step is MANDATORY after every build phase.** It runs the skill creation
1344
+ wizard in auto-detection mode with duplicate checking.
1345
+
1346
+ ```
1347
+ # 1. Analyze what was built in this phase
1348
+ built_files = all key_files.created from phase SUMMARYs
1349
+ built_patterns = extract_patterns(built_files)
1350
+ Patterns to detect:
1351
+ - Config-driven feature toggles (togglable pipeline)
1352
+ - Settings dialogs generated from config
1353
+ - Thread-safety patterns (cross-thread marshaling)
1354
+ - API route patterns (CRUD, auth, middleware)
1355
+ - Component hierarchies (parent→child wiring)
1356
+ - Build/deploy configurations
1357
+ - Error handling strategies
1358
+ - Data migration patterns
1359
+
1360
+ # 2. Check for duplicates against existing skills
1361
+ FOR each detected pattern:
1362
+ /fire-search "{pattern keywords}" --scope general
1363
+ IF similarity > 80%:
1364
+ Log: "Skill already exists: {existing_skill_name} (skip)"
1365
+ CONTINUE
1366
+ ELIF similarity > 50%:
1367
+ Log: "Similar skill found: {existing_skill_name} — consider updating"
1368
+ # Offer to update existing skill with new insights
1369
+ ELSE:
1370
+ # New pattern — queue for skill creation
1371
+
1372
+ # 3. Create skills for novel patterns
1373
+ IF new_patterns.length > 0:
1374
+ Display:
1375
+ "◆ Skill extraction found {N} new patterns:
1376
+ ├─ {pattern_1_name} (no existing match)
1377
+ ├─ {pattern_2_name} (partial match — update candidate)
1378
+ └─ ...
1379
+
1380
+ Auto-create skills? [Yes / No / Review each]"
1381
+
1382
+ IF Yes (default in autonomous mode):
1383
+ FOR each new_pattern:
1384
+ /fire-add-new-skill --from session --quick
1385
+ # Uses --quick flag for minimal prompts
1386
+ # Security scan + credential filter still run (Steps 4.5, 4.6)
1387
+
1388
+ IF No:
1389
+ Log: "Skill extraction skipped by user. Patterns noted in autonomous-log.md"
1390
+
1391
+ # 4. Log results
1392
+ Append to .planning/autonomous-log.md:
1393
+ ## Skill Extraction — Phase {N}
1394
+ Patterns detected: {count}
1395
+ New skills created: {count}
1396
+ Duplicates skipped: {count}
1397
+ Updates suggested: {count}
1398
+ ```
1399
+
1400
+ **In autonomous mode:** Skills are auto-created (Yes is default). The security
1401
+ scan and credential filter gates in `/fire-add-new-skill` (Steps 4.5, 4.6)
1402
+ still run to prevent malicious or leaked content.
1403
+
1404
+ **In manual mode:** User is prompted for each pattern.
1405
+
1406
+ ---
1407
+
1408
+ ### Step 7.85: Execution Insights Aggregation — Executor→Verifier Bridge (v12.9)
1409
+
1410
+ > Executor outputs (honesty checkpoints, playbook entries) contain high-signal information
1411
+ > that the verifier needs but currently doesn't receive. Aggregation bridges this gap
1412
+ > without dumping raw executor context.
1413
+
1414
+ ```
1415
+ AFTER all breaths complete, BEFORE spawning verifier:
1416
+
1417
+ AGGREGATE from executor outputs:
1418
+ 1. honesty_checkpoints: Extract from RECORD.md → "confidence_trail" array
1419
+ → [{task, confidence, note}] for each task where confidence < 80
1420
+ → Verifier uses these to focus inspection on low-confidence work
1421
+
1422
+ 2. decisions: Extract from .agent-messages.jsonl type=DECISION
1423
+ → Verifier checks: do decisions align with BLUEPRINT intent?
1424
+
1425
+ 3. discoveries: Extract from .agent-messages.jsonl type=DISCOVERY
1426
+ → Verifier checks: were discoveries acted on or ignored?
1427
+
1428
+ COMPILE into <executor_insights> block:
1429
+ <executor_insights>
1430
+ Low-confidence tasks: {list with reasons}
1431
+ Key decisions: {list}
1432
+ Discoveries: {list}
1433
+ </executor_insights>
1434
+
1435
+ INJECT into verifier spawn prompt (Step 8).
1436
+
1437
+ COST: ~150 tokens aggregation. Saves verifier from re-discovering known issues.
1438
+ SKIP: If no RECORD.md files exist (execution failed before any output).
1439
+ ```
1440
+
1441
+ ### Step 7.9: Hierarchical Review — Author Self-Check (v12.9)
1442
+
1443
+ > (arXiv 2509.20502, Sep 2025 — hierarchical review cuts verification tokens ~50%)
1444
+
1445
+ Before spawning expensive external verification, run a lightweight self-check:
1446
+
1447
+ ```
1448
+ AUTHOR SELF-CHECK (from executor RECORD.md files):
1449
+
1450
+ FOR each RECORD.md produced by executors:
1451
+ EXTRACT:
1452
+ - files_changed list
1453
+ - must_haves_addressed (from BLUEPRINT cross-reference)
1454
+ - known_gaps (executor's own honesty declarations)
1455
+ - test_results (if any tests were run)
1456
+
1457
+ QUICK VALIDATION:
1458
+ 1. Every must-have from BLUEPRINT has at least one file addressing it
1459
+ 2. No must-have is marked "skipped" without documented reason
1460
+ 3. Executor's own confidence >= 60 (from return envelope)
1461
+
1462
+ IF self_check fails:
1463
+ → Route BACK to executor for fix BEFORE spawning verifier/reviewer
1464
+ → Log: "Author self-check failed: {reason} — re-executing before review"
1465
+ → This saves ~2,000 tokens vs. full verifier discovering the same gap
1466
+
1467
+ IF self_check passes:
1468
+ → Proceed to Step 8 (full verification)
1469
+ → Pass self_check summary to verifier as context (reduces redundant checks)
1470
+
1471
+ SKIP CONDITION: --skip-self-check flag OR single-task phases (overhead > benefit)
1472
+ COST: ~100 tokens. Catches 60-70% of obvious gaps before expensive review.
1473
+ ```
1474
+
1475
+ ### Step 7.95: Background Agent Execution (v13.0 — Async Subagents)
1476
+
1477
+ > support. NOW UNBLOCKED: Claude Code shipped async subagents (`run_in_background: true`)
1478
+ > enabling fire-and-forget execution with notification on completion.
1479
+
1480
+ **Use background agents for independent, non-blocking work during phase execution:**
1481
+
1482
+ ```
1483
+ ELIGIBLE for background execution:
1484
+ - Skill extraction (Step 7.7) — doesn't block next breath
1485
+ - fire-researcher spawns from STUCK REPORT (Step 3.5.6) — research while continuing
1486
+ - Episodic memory indexing after phase completion
1487
+ - Test suite runs that don't gate the next task
1488
+
1489
+ NOT eligible (must be foreground):
1490
+ - fire-executor (needs results for breath completion)
1491
+ - fire-verifier (gates phase advancement)
1492
+ - fire-reviewer (gates merge decision)
1493
+ - Any agent whose output determines the next step
1494
+
1495
+ SPAWN PATTERN:
1496
+ Agent(
1497
+ subagent_type="fire-researcher",
1498
+ prompt="Research: {stuck_report.research_query}",
1499
+ run_in_background=true
1500
+ )
1501
+ → Continue with current work
1502
+ → When agent completes, notification arrives
1503
+ → Integrate results into playbook if still relevant
1504
+
1505
+ Agent(
1506
+ subagent_type="general-purpose",
1507
+ prompt="Extract skills from phase {N} RECORD files",
1508
+ run_in_background=true
1509
+ )
1510
+ → Skill creation happens asynchronously
1511
+ → Does not block breath execution
1512
+
1513
+ SAFETY:
1514
+ - Background agents inherit path constraints from parent
1515
+ - Background agents do NOT write to shared-state.json (race condition)
1516
+ - Background agents use read-only access to codebase
1517
+ - Maximum 2 background agents at a time (prevent resource exhaustion)
1518
+ ```
1519
+
1520
+ **Why this matters:** Skill extraction (Step 7.7) previously blocked execution for 30-60 seconds. Research spawns from STUCK REPORT blocked the stuck agent from trying alternatives. Background execution eliminates both bottlenecks.
1521
+
1522
+ ---
1523
+
1524
+ ### Step 8: Spawn Parallel Verification + Review (v8.0)
1525
+
1526
+ After all breaths complete, spawn BOTH agents simultaneously:
1527
+
1528
+ ```
1529
+ IF --skip-review NOT set:
1530
+
1531
+ â—† Spawning parallel verification + review for Phase {N}...
1532
+ â"œâ"€ fire-verifier: 70-point WARRIOR validation
1533
+ â""â"€ fire-reviewer: {review_depth} review (Simplicity + 15 personas)
1534
+
1535
+ # Spawn fire-verifier (existing â€" unchanged)
1536
+ Task(subagent_type="fire-verifier", prompt="""
1537
+ Phase: {N}, Plans: {list}, Must-Haves: {count}
1538
+ @references/validation-checklist.md
1539
+ """)
1540
+
1541
+ # Spawn fire-reviewer (NEW â€" v8.0)
1542
+ Task(subagent_type="fire-reviewer", prompt="""
1543
+ <review_scope>
1544
+ Phase: {N} - {name}
1545
+ Review Depth: {review_depth}
1546
+ </review_scope>
1547
+
1548
+ <files_to_review>
1549
+ {all key_files.created + key_files.modified from RECORD.md files}
1550
+ </files_to_review>
1551
+
1552
+ <plan_intent>
1553
+ {Quick Summary from each RECORD.md â€" what was INTENDED vs what was built}
1554
+ </plan_intent>
1555
+
1556
+ <simplicity_mandate>
1557
+ STRICT: Flag over-engineering as HIGH.
1558
+ Three similar lines > premature abstraction.
1559
+ Direct approach > clever approach.
1560
+ If a junior dev can't read it in 30 seconds â†' too complex.
1561
+ </simplicity_mandate>
1562
+
1563
+ Output to: .planning/phases/{N}-{name}/{N}-REVIEW.md
1564
+ """)
1565
+
1566
+ ELSE:
1567
+ # Only verifier (legacy behavior â€" --skip-review was passed)
1568
+ â—† Spawning fire-verifier for Phase {N}... (review skipped)
1569
+ Task(subagent_type="fire-verifier", prompt="""
1570
+ Phase: {N}, Plans: {list}, Must-Haves: {count}
1571
+ @references/validation-checklist.md
1572
+ """)
1573
+ ```
1574
+
1575
+ **Route based on verifier result (when review skipped):**
1576
+ - **PASS:** Proceed to Step 9
1577
+ - **FAIL with gaps:** Create gap closure plan, route to `/fire-2-plan {N} --gaps`
1578
+
1579
+ ### Step 8.4: Structured Verdict Extraction (v12.5)
1580
+ When both agents return, extract structured verdicts:
1581
+
1582
+ ```
1583
+ # Extract verifier verdict
1584
+ verifier_output = agent_result.text
1585
+ verifier_json = extract_between(verifier_output, "VERIFIER_VERDICT_START", "VERIFIER_VERDICT_END")
1586
+ IF verifier_json:
1587
+ verifier_verdict = JSON.parse(verifier_json)
1588
+ warrior_score = verifier_verdict.warrior_score
1589
+ verifier_status = verifier_verdict.verdict # APPROVED | CONDITIONAL | REJECTED
1590
+ ELSE:
1591
+ # Fallback: parse prose verdict from VERIFICATION.md (legacy behavior)
1592
+ verifier_status = parse_prose_verdict(verification_file)
1593
+
1594
+ # Extract reviewer verdict
1595
+ reviewer_output = agent_result.text
1596
+ reviewer_json = extract_between(reviewer_output, "REVIEWER_VERDICT_START", "REVIEWER_VERDICT_END")
1597
+ IF reviewer_json:
1598
+ reviewer_verdict = JSON.parse(reviewer_json)
1599
+ reviewer_status = reviewer_verdict.verdict # APPROVE | APPROVE_WITH_FIXES | BLOCK
1600
+ blocking_count = reviewer_verdict.counts.blocking_issues
1601
+ ELSE:
1602
+ # Fallback: parse prose verdict from REVIEW.md (legacy behavior)
1603
+ reviewer_status = parse_prose_verdict(review_file)
1604
+ ```
1605
+
1606
+ ### Step 8.5: Merge Gate — Combined Quality Decision (v8.0)
1607
+
1608
+ Wait for BOTH agents to complete, then evaluate combined verdict.
1609
+
1610
+ **Autonomous Mode Routing (v9.0):**
1611
+
1612
+ ```
1613
+ IF --autonomous flag is set:
1614
+
1615
+ IF combined_verdict == "READY FOR HUMAN":
1616
+ Log to autonomous-log: "Merge gate: READY FOR HUMAN (auto-proceeding)"
1617
+ → Skip display, continue to Step 9 (CONSCIENCE.md update)
1618
+
1619
+ IF combined_verdict contains "FIX":
1620
+ Log to autonomous-log: "Merge gate: FIX required (auto-routing to fix cycle)"
1621
+ → Route to gap closure automatically (no Options display)
1622
+
1623
+ // Non-autonomous mode: fall through to standard display below
1624
+ ```
1625
+
1626
+ **COMBINED VERDICT MATRIX:**
1627
+
1628
+ | Verifier â†" / Reviewer â†' | APPROVE | APPROVE W/ FIXES | BLOCK |
1629
+ |--------------------------|---------|------------------|-------|
1630
+ | APPROVED | READY FOR HUMAN | FIX REVIEW FINDINGS | FIX BLOCKERS |
1631
+ | CONDITIONAL | FIX VERIFIER GAPS | FIX BOTH | FIX BOTH |
1632
+ | REJECTED | FIX VERIFIER | FIX BOTH | FIX BOTH (critical) |
1633
+
1634
+ **RULE:** The stricter verdict ALWAYS wins.
1635
+
1636
+ **DISAGREEMENT HANDLING (v13.0 — Verdict Arbitration Protocol):**
1637
+
1638
+ > **Source:** uv PubGrub `priority.rs` weighted scoring + fork strategy.
1639
+ > See: `@skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md` § Verdict Arbitration Protocol
1640
+
1641
+ ```
1642
+ TRIGGER: Only invoke Verdict Arbitration when verifier and reviewer
1643
+ produce CONTRADICTORY verdicts (not just different severity levels).
1644
+ If the COMBINED VERDICT MATRIX above resolves cleanly, use that result directly.
1645
+
1646
+ WHEN verifier and reviewer produce contradictory verdicts:
1647
+
1648
+ 1. CLASSIFY CONFLICT TYPE:
1649
+ - SCOPE: Verifier checks functionality, reviewer checks quality
1650
+ → Both can be right. Apply BOTH sets of fixes.
1651
+ → Set combined_verdict = "FIX BOTH"
1652
+ - SEVERITY: Verifier says PASS, reviewer says BLOCK
1653
+ → Weighted resolution (see below)
1654
+ - CONTRADICTION: Verifier says "add X", reviewer says "remove X"
1655
+ → Fork resolution
1656
+
1657
+ 2. WEIGHTED RESOLUTION (from uv conflict prioritization):
1658
+ verifier_weight = 0.6 (functional correctness is primary)
1659
+ reviewer_weight = 0.4 (code quality is secondary)
1660
+
1661
+ FOR each conflicting item:
1662
+ IF verifier says PASS and reviewer says BLOCK:
1663
+ combined_score = (verifier_confidence * 0.6) + (reviewer_confidence * 0.4)
1664
+ IF combined_score > 70: PASS with reviewer's suggestions as TODOs
1665
+ → Set combined_verdict = "READY FOR HUMAN"
1666
+ IF combined_score <= 70: FAIL — fix required
1667
+ → Set combined_verdict = "FIX REVIEW FINDINGS"
1668
+
1669
+ IF verifier says FAIL: always FAIL (functional correctness is non-negotiable)
1670
+ → Set combined_verdict = "FIX VERIFIER"
1671
+
1672
+ 3. FORK RESOLUTION (from uv fork-based resolver):
1673
+ When verdicts are genuinely contradictory:
1674
+ Fork A: Apply verifier's recommendation
1675
+ Fork B: Apply reviewer's recommendation
1676
+ Run verification on BOTH forks
1677
+ Accept the fork that passes verification
1678
+ If BOTH pass: accept verifier's (functional correctness wins)
1679
+ → Set combined_verdict = "READY FOR HUMAN"
1680
+ If NEITHER passes: escalate to human
1681
+ → Set combined_verdict = "FIX BOTH (critical)"
1682
+
1683
+ 4. CONFLICT HISTORY TRACKING (from uv incompatibility store):
1684
+ Track which reviewer personas frequently conflict with verifier
1685
+ After 3+ conflicts from same persona IN CURRENT PHASE:
1686
+ → Deprioritize that persona's BLOCK votes to weight 0.2
1687
+ Deprioritization resets at the start of each new phase.
1688
+ (A persona wrong in Phase 2 may be right in Phase 5.)
1689
+
1690
+ 5. VOTING FOR VERDICTS (v12.9 — replaces pure weighted scoring for SEVERITY conflicts):
1691
+
1692
+ > (ACL 2025 — voting improves reasoning tasks by 13.2%, consensus improves knowledge by 2.8%)
1693
+
1694
+ WHEN conflict type is SEVERITY (verifier PASS vs reviewer BLOCK):
1695
+
1696
+ a. COLLECT INDEPENDENT VOTES from each reviewer persona that participated:
1697
+ Each persona casts: PASS | SOFT_BLOCK | HARD_BLOCK
1698
+ (Personas already produced findings — extract vote from severity of their findings)
1699
+
1700
+ b. TALLY:
1701
+ pass_votes = count(PASS)
1702
+ soft_block_votes = count(SOFT_BLOCK)
1703
+ hard_block_votes = count(HARD_BLOCK)
1704
+ total_votes = pass_votes + soft_block_votes + hard_block_votes
1705
+
1706
+ c. RESOLVE:
1707
+ IF hard_block_votes >= 2:
1708
+ → combined_verdict = "FIX BLOCKERS" (multiple personas see critical issues)
1709
+ ELIF pass_votes > (soft_block_votes + hard_block_votes):
1710
+ → combined_verdict = "READY FOR HUMAN" (majority pass)
1711
+ → Log soft_block findings as non-critical TODOs
1712
+ ELSE:
1713
+ → combined_verdict = "FIX REVIEW FINDINGS" (no clear majority)
1714
+
1715
+ d. LOG vote breakdown to .planning/version-performance.md:
1716
+ "Personas: {pass_votes}P / {soft_block_votes}S / {hard_block_votes}H"
1717
+
1718
+ FALLBACK: If reviewer ran with fewer than 3 personas, use weighted resolution (step 2) instead.
1719
+ Voting requires sufficient independent perspectives to be meaningful.
1720
+
1721
+ OUTPUT: After resolving, the combined_verdict is set above.
1722
+ Return to Autonomous Mode Routing / Display with this value.
1723
+
1724
+ STANDARD QUICK PATH (no arbitration needed):
1725
+
1726
+ Verifier APPROVED + Reviewer BLOCK:
1727
+ "Code passes tests but has quality/simplicity issues.
1728
+ FIX BEFORE HUMAN TESTING."
1729
+ (This is the MOST VALUABLE case â€" why redundancy exists)
1730
+
1731
+ Verifier REJECTED + Reviewer APPROVE:
1732
+ "Code is clean but doesn't work. Fix functional failures first."
1733
+ ```
1734
+
1735
+ **Display combined result:**
1736
+
1737
+ ```
1738
+ â•"â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
1739
+ â•' MERGE GATE â€" Phase {N} â•'
1740
+ â• â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•£
1741
+ â•' â•'
1742
+ â•' Verifier: {X}/70 â€" {APPROVED/CONDITIONAL/REJECTED} â•'
1743
+ â•' Reviewer: {verdict} â€" {critical}C / {high}H / {medium}M / {low}L â•'
1744
+ â•' Simplicity: {N} over-engineering flags â•'
1745
+ â•' â•'
1746
+ â•' Combined Verdict: {READY FOR HUMAN / FIX REVIEW FINDINGS / FIX BOTH} â•'
1747
+ â•' â•'
1748
+ â•' {If FIX needed:} â•'
1749
+ â•' Issues to resolve: â•'
1750
+ â•' ✗ {file:line â€" description} â•'
1751
+ â•' ✗ {file:line â€" description} â•'
1752
+ â•' â•'
1753
+ â•' Options: â•'
1754
+ â•' A) Fix issues â•'
1755
+ â•' B) Override with known issues â•'
1756
+ â•' C) Gap closure plan â•'
1757
+ â•' â•'
1758
+ ╚â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
1759
+ ```
1760
+
1761
+ **FEEDBACK LOOP (Behavioral Directive Proposals):**
1762
+
1763
+ ```
1764
+ IF reviewer found CRITICAL or HIGH findings:
1765
+ For each finding with severity >= HIGH:
1766
+ Add proposed behavioral directive:
1767
+ IF: {condition from finding}
1768
+ DONT: {the anti-pattern or over-engineering found}
1769
+ BECAUSE: {reviewer explanation}
1770
+ Source: fire-reviewer Phase {N} | Confidence: 1/5
1771
+ ```
1772
+
1773
+ **VERSION PERFORMANCE TRACKING (v8.0):**
1774
+
1775
+ ```
1776
+ After gate verdict is displayed and user responds:
1777
+
1778
+ Record outcome to .planning/version-performance.md:
1779
+
1780
+ | Date | Version | Gate | Verdict | Override? | Outcome | Notes |
1781
+ | {now} | v8.0 | merge | {verdict} | {A=no, B=yes} | pending | Phase {N} |
1782
+
1783
+ "Override?" = yes if user chose option B (override with known issues)
1784
+ "Outcome" = filled retroactively after human testing (correct/false-positive/false-negative)
1785
+
1786
+ AFTER 5+ records exist, check degradation signals:
1787
+ - override_rate > 40% → rules too strict, suggest rollback
1788
+ - false_positive_rate > 30% → gate crying wolf, retire offending rule
1789
+ - Same rule overridden 3+ times → retire that specific rule
1790
+ See: references/behavioral-directives.md § Version Performance Registry
1791
+ ```
1792
+
1793
+ ### Step 8.75: Auto-Route Merge Gate (v10.0 — Default Autonomous)
1794
+
1795
+ By default (v10.0), execution auto-routes based on combined_verdict without human pause:
1796
+
1797
+ ```
1798
+ IF combined_verdict in ["APPROVED", "APPROVE"]:
1799
+ → Auto-advance to next breath. No human pause.
1800
+ → Log: "Auto-routed: {verdict} (score {N}/70)"
1801
+
1802
+ IF combined_verdict in ["CONDITIONAL", "APPROVE WITH FIXES"]:
1803
+ → Auto-advance but log gaps to .planning/autonomous-notes.md
1804
+ → Log: "Auto-routed with notes: {N} non-critical gaps"
1805
+
1806
+ IF combined_verdict in ["REJECTED", "BLOCK"]:
1807
+ → STOP. Display blocker. Request human intervention.
1808
+ → This is the ONLY case where execution pauses.
1809
+
1810
+ IF --manual flag is set:
1811
+ → Revert to v9.0 behavior: display all checkpoints, wait for human.
1812
+ ```
1813
+
1814
+ **Safety gates ALWAYS active regardless of mode:**
1815
+ - Path verification (MANDATORY — cannot disable)
1816
+ - HAC enforcement (confidence 5/5 rules)
1817
+ - Circuit breaker (stall/spin/degrade detect)
1818
+ - Power-verifier (70-point WARRIOR validation)
1819
+ - Power-reviewer (16-persona code review)
1820
+
1821
+ ### Step 9: Update CONSCIENCE.md and SKILLS-INDEX.md
1822
+
1823
+ **CONSCIENCE.md Updates:**
1824
+ ```markdown
1825
+ ## Current Position
1826
+ - Phase: {N} of {total}
1827
+ - Status: Complete (or Verified with gaps)
1828
+ - Last activity: {timestamp} - Phase {N} execution complete
1829
+
1830
+ ## WARRIOR Integration
1831
+ - Skills Applied: {new_total} total
1832
+ - {skill-1} (Phase {N}, Plan {NN})
1833
+ - {skill-2} (Phase {N}, Plan {NN})
1834
+ - Honesty Checkpoints: {count}
1835
+ - Validation Status: Phase {N} passed {X}/70 checks
1836
+ - Code Review: Phase {N} {reviewer_verdict} ({critical}/{high}/{medium}/{low})
1837
+ - Combined Gate: {combined_verdict}
1838
+ - Simplicity Findings: {count of Simplicity Guardian findings}
1839
+ ```
1840
+
1841
+ **SKILLS-INDEX.md Updates:**
1842
+ ```markdown
1843
+ ## By Phase
1844
+
1845
+ ### Phase {N}: {name}
1846
+ **Plan {N}-01:**
1847
+ - {category}/{skill-1}
1848
+ - {category}/{skill-2}
1849
+
1850
+ **Plan {N}-02:**
1851
+ - {category}/{skill-3}
1852
+ ```
1853
+
1854
+ ---
1855
+
1856
+ ## Agent Spawning Instructions
1857
+
1858
+ ### fire-executor (Parallel per Plan)
1859
+
1860
+ **Agent File:** `@agents/fire-executor.md`
1861
+
1862
+ **Spawn Pattern:**
1863
+ ```
1864
+ For each plan in breath:
1865
+ Spawn fire-executor with:
1866
+ - Plan file context
1867
+ - Skills library context
1868
+ - Honesty protocol reminder
1869
+ ```
1870
+
1871
+ **Executor Outputs:**
1872
+ - Task implementations
1873
+ - `{N}-{NN}-RECORD.md` (fire-handoff format)
1874
+ - SKILLS-INDEX.md updates
1875
+
1876
+ ### fire-verifier (After All Breaths)
1877
+
1878
+ **Agent File:** `@agents/fire-verifier.md`
1879
+
1880
+ **Context:**
1881
+ ```markdown
1882
+ Phase: {N} - {name}
1883
+ Plans Executed: {list}
1884
+ Must-Haves: {aggregated from all plans}
1885
+ WARRIOR Validation: {checklist}
1886
+ ```
1887
+
1888
+ **Verifier Outputs:**
1889
+ - `{N}-VERIFICATION.md`
1890
+ - Gap analysis (if any)
1891
+
1892
+ ### fire-reviewer (Parallel with Verifier — v8.0)
1893
+
1894
+ **Agent File:** `@agents/fire-reviewer.md`
1895
+
1896
+ **Context:**
1897
+ ```markdown
1898
+ <review_scope>
1899
+ Phase: {N} - {name}
1900
+ Review Depth: {shallow|normal|deep} (from Step 7.6)
1901
+ </review_scope>
1902
+
1903
+ <files_to_review>
1904
+ {All key_files.created + key_files.modified from RECORD.md files}
1905
+ </files_to_review>
1906
+
1907
+ <plan_intent>
1908
+ {Quick Summary from each RECORD.md}
1909
+ </plan_intent>
1910
+
1911
+ <simplicity_mandate>STRICT</simplicity_mandate>
1912
+ ```
1913
+
1914
+ **Reviewer Outputs:**
1915
+ - `{N}-REVIEW.md`
1916
+ - Severity table (CRITICAL/HIGH/MEDIUM/LOW)
1917
+ - Proposed behavioral directives for HIGH+ findings
1918
+
1919
+ ---
1920
+
1921
+ ## Success Criteria
1922
+
1923
+ ### Required Outputs
1924
+ - [ ] All plans in phase executed
1925
+ - [ ] Quick Self-Judge run after each task (v5.0)
1926
+ - [ ] All RECORD.md files created (fire-handoff format)
1927
+ - [ ] All verification commands passed
1928
+ - [ ] SKILLS-INDEX.md updated
1929
+ - [ ] CONSCIENCE.md updated
1930
+ - [ ] VERIFICATION.md created
1931
+ - [ ] Must-haves verified
1932
+ - [ ] Code review run in parallel with verification (v8.0)
1933
+ - [ ] {N}-REVIEW.md created alongside {N}-VERIFICATION.md
1934
+ - [ ] Combined quality gate evaluated — both must agree
1935
+ - [ ] CRITICAL/HIGH findings fed into behavioral directives
1936
+ - [ ] Simplicity Guardian findings surfaced in report
1937
+
1938
+ ### Completion Display
1939
+
1940
+ ```
1941
+ ╔══════════════════════════════════════════════════════════════════════════════╗
1942
+ ║ ✓ PHASE {N} EXECUTION COMPLETE ║
1943
+ ╠══════════════════════════════════════════════════════════════════════════════╣
1944
+ â•‘ â•‘
1945
+ â•‘ Phase: {N} - {name} â•‘
1946
+ â•‘ Plans Executed: {count} â•‘
1947
+ â•‘ Breaths: {wave_count} â•‘
1948
+ â•‘ Total Time: {duration} â•‘
1949
+ â•‘ â•‘
1950
+ â•‘ Execution Summary: â•‘
1951
+ â•‘ Breath 1: â•‘
1952
+ ║ ✓ {N}-01 - {description} (12 min) ║
1953
+ ║ ✓ {N}-02 - {description} (8 min) ║
1954
+ â•‘ Breath 2: â•‘
1955
+ ║ ✓ {N}-03 - {description} (15 min) ║
1956
+ â•‘ â•‘
1957
+ â•‘ Skills Applied: {count} â•‘
1958
+ â•‘ Honesty Checkpoints: {count} â•‘
1959
+ â•‘ Validation: {X}/70 checks passed â•‘
1960
+ â•‘ â•‘
1961
+ ╠══════════════════════════════════════════════════════════════════════════════╣
1962
+ â•‘ NEXT UP â•‘
1963
+ ├──────────────────────────────────────────────────────────────────────────────┤
1964
+ â•‘ â•‘
1965
+ ║ → Run `/fire-4-verify {N}` for detailed validation report ║
1966
+ ║ → Or run `/fire-2-plan {N+1}` to plan next phase ║
1967
+ ║ → Or run `/fire-5-handoff` to create session handoff ║
1968
+ â•‘ â•‘
1969
+ ╚══════════════════════════════════════════════════════════════════════════════╝
1970
+ ```
1971
+
1972
+ ---
1973
+
1974
+ ## Error Handling
1975
+
1976
+ ### Executor Blocked
1977
+
1978
+ ```
1979
+ ╔══════════════════════════════════════════════════════════════════════════════╗
1980
+ â•‘ âš  EXECUTION BLOCKED â•‘
1981
+ ╠══════════════════════════════════════════════════════════════════════════════╣
1982
+ â•‘ â•‘
1983
+ â•‘ Plan {N}-{NN} encountered a blocking issue: â•‘
1984
+ â•‘ â•‘
1985
+ â•‘ Issue: {description} â•‘
1986
+ â•‘ Task: {task number and description} â•‘
1987
+ â•‘ â•‘
1988
+ â•‘ Created: .planning/phases/{N}-{name}/.continue-here.md â•‘
1989
+ â•‘ â•‘
1990
+ â•‘ Options: â•‘
1991
+ â•‘ A) Resolve issue and run `/fire-3-execute {N} --continue` â•‘
1992
+ â•‘ B) Skip this plan: `/fire-3-execute {N} --skip {N}-{NN}` â•‘
1993
+ â•‘ C) Create handoff: `/fire-5-handoff` â•‘
1994
+ â•‘ â•‘
1995
+ ╚══════════════════════════════════════════════════════════════════════════════╝
1996
+ ```
1997
+
1998
+ ### Verification Failed
1999
+
2000
+ ```
2001
+ ╔══════════════════════════════════════════════════════════════════════════════╗
2002
+ â•‘ âš  VERIFICATION GAPS DETECTED â•‘
2003
+ ╠══════════════════════════════════════════════════════════════════════════════╣
2004
+ â•‘ â•‘
2005
+ â•‘ Phase {N} execution complete but verification found gaps: â•‘
2006
+ â•‘ â•‘
2007
+ â•‘ Gaps: â•‘
2008
+ ║ ✗ Must-have: "User can paginate results" - Not verified ║
2009
+ ║ ✗ WARRIOR: Test coverage 65% (required 80%) ║
2010
+ â•‘ â•‘
2011
+ â•‘ Options: â•‘
2012
+ â•‘ A) Run `/fire-2-plan {N} --gaps` to plan gap closure â•‘
2013
+ â•‘ B) Run `/fire-4-verify {N}` for detailed report â•‘
2014
+ â•‘ C) Accept gaps and proceed: `/fire-2-plan {N+1}` â•‘
2015
+ â•‘ â•‘
2016
+ ╚══════════════════════════════════════════════════════════════════════════════╝
2017
+ ```
2018
+
2019
+ ### Breath Timeout
2020
+
2021
+ ```
2022
+ ┌─────────────────────────────────────────────────────────────────────────────┐
2023
+ │ ⚠ WARNING: Breath Timeout │
2024
+ ├─────────────────────────────────────────────────────────────────────────────┤
2025
+ │ │
2026
+ │ Breath {W} exceeded expected duration. │
2027
+ │ │
2028
+ │ Status: │
2029
+ │ ✓ Plan {N}-01: Complete │
2030
+ │ ◆ Plan {N}-02: Still running (45 min) │
2031
+ │ │
2032
+ │ Action: Continuing to wait... (use Ctrl+C to interrupt) │
2033
+ │ │
2034
+ └─────────────────────────────────────────────────────────────────────────────┘
2035
+ ```
2036
+
2037
+ ---
2038
+
2039
+ ## References
2040
+
2041
+ - **Agent:** `@agents/fire-executor.md` - Execution agent with honesty protocols
2042
+ - **Agent:** `@agents/fire-verifier.md` - Verification agent with combined checks
2043
+ - **Template:** `@templates/fire-handoff.md` - Unified summary format
2044
+ - **Protocol:** `@references/honesty-protocols.md` - Execution honesty guidance
2045
+ - **Protocol:** `@references/validation-checklist.md` - 70-point validation
2046
+ - **Brand:** `@references/ui-brand.md` - Visual output standards