@dv.nghiem/flowdeck 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +136 -0
  3. package/bin/flowdeck.js +108 -0
  4. package/dist/agents/architect.d.ts +3 -0
  5. package/dist/agents/architect.d.ts.map +1 -0
  6. package/dist/agents/code-explorer.d.ts +3 -0
  7. package/dist/agents/code-explorer.d.ts.map +1 -0
  8. package/dist/agents/coder.d.ts +3 -0
  9. package/dist/agents/coder.d.ts.map +1 -0
  10. package/dist/agents/debug.d.ts +4 -0
  11. package/dist/agents/debug.d.ts.map +1 -0
  12. package/dist/agents/doc-updater.d.ts +3 -0
  13. package/dist/agents/doc-updater.d.ts.map +1 -0
  14. package/dist/agents/flowdeck.d.ts +5 -0
  15. package/dist/agents/flowdeck.d.ts.map +1 -0
  16. package/dist/agents/index.d.ts +38 -0
  17. package/dist/agents/index.d.ts.map +1 -0
  18. package/dist/agents/mapper.d.ts +3 -0
  19. package/dist/agents/mapper.d.ts.map +1 -0
  20. package/dist/agents/orchestrator.d.ts +10 -0
  21. package/dist/agents/orchestrator.d.ts.map +1 -0
  22. package/dist/agents/performance.d.ts +4 -0
  23. package/dist/agents/performance.d.ts.map +1 -0
  24. package/dist/agents/planner.d.ts +3 -0
  25. package/dist/agents/planner.d.ts.map +1 -0
  26. package/dist/agents/policy-enforcer.d.ts +3 -0
  27. package/dist/agents/policy-enforcer.d.ts.map +1 -0
  28. package/dist/agents/researcher.d.ts +3 -0
  29. package/dist/agents/researcher.d.ts.map +1 -0
  30. package/dist/agents/reviewer.d.ts +3 -0
  31. package/dist/agents/reviewer.d.ts.map +1 -0
  32. package/dist/agents/risk-analyst.d.ts +3 -0
  33. package/dist/agents/risk-analyst.d.ts.map +1 -0
  34. package/dist/agents/security-auditor.d.ts +3 -0
  35. package/dist/agents/security-auditor.d.ts.map +1 -0
  36. package/dist/agents/specialist.d.ts +5 -0
  37. package/dist/agents/specialist.d.ts.map +1 -0
  38. package/dist/agents/tester.d.ts +3 -0
  39. package/dist/agents/tester.d.ts.map +1 -0
  40. package/dist/agents/types.d.ts +20 -0
  41. package/dist/agents/types.d.ts.map +1 -0
  42. package/dist/agents/writer.d.ts +3 -0
  43. package/dist/agents/writer.d.ts.map +1 -0
  44. package/dist/commands/analysis/analysis.test.d.ts +2 -0
  45. package/dist/commands/analysis/analysis.test.d.ts.map +1 -0
  46. package/dist/commands/analysis/analyze-change.d.ts +148 -0
  47. package/dist/commands/analysis/analyze-change.d.ts.map +1 -0
  48. package/dist/commands/analysis/evaluate-risk.d.ts +77 -0
  49. package/dist/commands/analysis/evaluate-risk.d.ts.map +1 -0
  50. package/dist/commands/analysis/guarded-edit.d.ts +72 -0
  51. package/dist/commands/analysis/guarded-edit.d.ts.map +1 -0
  52. package/dist/commands/execution/deploy-check.d.ts +91 -0
  53. package/dist/commands/execution/deploy-check.d.ts.map +1 -0
  54. package/dist/commands/execution/fix-bug.d.ts +187 -0
  55. package/dist/commands/execution/fix-bug.d.ts.map +1 -0
  56. package/dist/commands/execution/new-feature.d.ts +171 -0
  57. package/dist/commands/execution/new-feature.d.ts.map +1 -0
  58. package/dist/commands/execution/review-code.d.ts +130 -0
  59. package/dist/commands/execution/review-code.d.ts.map +1 -0
  60. package/dist/commands/execution/write-docs.d.ts +94 -0
  61. package/dist/commands/execution/write-docs.d.ts.map +1 -0
  62. package/dist/commands/governance/approve.d.ts +80 -0
  63. package/dist/commands/governance/approve.d.ts.map +1 -0
  64. package/dist/commands/intelligence/blast-radius.d.ts +67 -0
  65. package/dist/commands/intelligence/blast-radius.d.ts.map +1 -0
  66. package/dist/commands/intelligence/impact-radar.d.ts +71 -0
  67. package/dist/commands/intelligence/impact-radar.d.ts.map +1 -0
  68. package/dist/commands/intelligence/intelligence.test.d.ts +2 -0
  69. package/dist/commands/intelligence/intelligence.test.d.ts.map +1 -0
  70. package/dist/commands/intelligence/regression-predict.d.ts +75 -0
  71. package/dist/commands/intelligence/regression-predict.d.ts.map +1 -0
  72. package/dist/commands/intelligence/review-route.d.ts +65 -0
  73. package/dist/commands/intelligence/review-route.d.ts.map +1 -0
  74. package/dist/commands/intelligence/test-gap.d.ts +73 -0
  75. package/dist/commands/intelligence/test-gap.d.ts.map +1 -0
  76. package/dist/commands/intelligence/translate-intent.d.ts +87 -0
  77. package/dist/commands/intelligence/translate-intent.d.ts.map +1 -0
  78. package/dist/commands/intelligence/volatility-map-cmd.d.ts +68 -0
  79. package/dist/commands/intelligence/volatility-map-cmd.d.ts.map +1 -0
  80. package/dist/commands/planning/ask.d.ts +62 -0
  81. package/dist/commands/planning/ask.d.ts.map +1 -0
  82. package/dist/commands/planning/ask.test.d.ts +2 -0
  83. package/dist/commands/planning/ask.test.d.ts.map +1 -0
  84. package/dist/commands/planning/dashboard.d.ts +30 -0
  85. package/dist/commands/planning/dashboard.d.ts.map +1 -0
  86. package/dist/commands/planning/discuss.d.ts +39 -0
  87. package/dist/commands/planning/discuss.d.ts.map +1 -0
  88. package/dist/commands/planning/plan.d.ts +67 -0
  89. package/dist/commands/planning/plan.d.ts.map +1 -0
  90. package/dist/commands/planning/roadmap.d.ts +105 -0
  91. package/dist/commands/planning/roadmap.d.ts.map +1 -0
  92. package/dist/commands/setup/doctor.d.ts +10 -0
  93. package/dist/commands/setup/doctor.d.ts.map +1 -0
  94. package/dist/commands/setup/map-codebase.d.ts +62 -0
  95. package/dist/commands/setup/map-codebase.d.ts.map +1 -0
  96. package/dist/commands/setup/new-project.d.ts +19 -0
  97. package/dist/commands/setup/new-project.d.ts.map +1 -0
  98. package/dist/commands/setup/settings.d.ts +57 -0
  99. package/dist/commands/setup/settings.d.ts.map +1 -0
  100. package/dist/commands/state/checkpoint.d.ts +27 -0
  101. package/dist/commands/state/checkpoint.d.ts.map +1 -0
  102. package/dist/commands/state/multi-repo.d.ts +63 -0
  103. package/dist/commands/state/multi-repo.d.ts.map +1 -0
  104. package/dist/commands/state/progress.d.ts +57 -0
  105. package/dist/commands/state/progress.d.ts.map +1 -0
  106. package/dist/commands/state/resume.d.ts +11 -0
  107. package/dist/commands/state/resume.d.ts.map +1 -0
  108. package/dist/commands/state/workspace-commands.d.ts +207 -0
  109. package/dist/commands/state/workspace-commands.d.ts.map +1 -0
  110. package/dist/dashboard/lib/port-finder.d.ts +10 -0
  111. package/dist/dashboard/lib/port-finder.d.ts.map +1 -0
  112. package/dist/dashboard/lib/port-finder.test.d.ts +2 -0
  113. package/dist/dashboard/lib/port-finder.test.d.ts.map +1 -0
  114. package/dist/dashboard/lib/state-reader.d.ts +3 -0
  115. package/dist/dashboard/lib/state-reader.d.ts.map +1 -0
  116. package/dist/dashboard/server.d.ts +2 -0
  117. package/dist/dashboard/server.d.ts.map +1 -0
  118. package/dist/dashboard/server.mjs +13649 -0
  119. package/dist/dashboard/types.d.ts +72 -0
  120. package/dist/dashboard/types.d.ts.map +1 -0
  121. package/dist/dashboard/views/index.ejs +391 -0
  122. package/dist/dashboard/views/partials/blockers.ejs +10 -0
  123. package/dist/dashboard/views/partials/header.ejs +20 -0
  124. package/dist/dashboard/views/partials/phase-timeline.ejs +40 -0
  125. package/dist/dashboard/views/partials/progress.ejs +12 -0
  126. package/dist/hooks/approval-hook.d.ts +13 -0
  127. package/dist/hooks/approval-hook.d.ts.map +1 -0
  128. package/dist/hooks/compaction-hook.d.ts +23 -0
  129. package/dist/hooks/compaction-hook.d.ts.map +1 -0
  130. package/dist/hooks/context-window-monitor.d.ts +21 -0
  131. package/dist/hooks/context-window-monitor.d.ts.map +1 -0
  132. package/dist/hooks/decision-trace-hook.d.ts +13 -0
  133. package/dist/hooks/decision-trace-hook.d.ts.map +1 -0
  134. package/dist/hooks/file-tracker.d.ts +29 -0
  135. package/dist/hooks/file-tracker.d.ts.map +1 -0
  136. package/dist/hooks/guard-rails.d.ts +33 -0
  137. package/dist/hooks/guard-rails.d.ts.map +1 -0
  138. package/dist/hooks/index.d.ts +5 -0
  139. package/dist/hooks/index.d.ts.map +1 -0
  140. package/dist/hooks/notifications.d.ts +21 -0
  141. package/dist/hooks/notifications.d.ts.map +1 -0
  142. package/dist/hooks/patch-trust.d.ts +27 -0
  143. package/dist/hooks/patch-trust.d.ts.map +1 -0
  144. package/dist/hooks/patch-trust.test.d.ts +2 -0
  145. package/dist/hooks/patch-trust.test.d.ts.map +1 -0
  146. package/dist/hooks/session-events.d.ts +8 -0
  147. package/dist/hooks/session-events.d.ts.map +1 -0
  148. package/dist/hooks/session-idle-hook.d.ts +21 -0
  149. package/dist/hooks/session-idle-hook.d.ts.map +1 -0
  150. package/dist/hooks/session-start.d.ts +10 -0
  151. package/dist/hooks/session-start.d.ts.map +1 -0
  152. package/dist/hooks/shell-env-hook.d.ts +21 -0
  153. package/dist/hooks/shell-env-hook.d.ts.map +1 -0
  154. package/dist/hooks/telemetry-hook.d.ts +25 -0
  155. package/dist/hooks/telemetry-hook.d.ts.map +1 -0
  156. package/dist/hooks/todo-hook.d.ts +25 -0
  157. package/dist/hooks/todo-hook.d.ts.map +1 -0
  158. package/dist/hooks/tool-guard.d.ts +41 -0
  159. package/dist/hooks/tool-guard.d.ts.map +1 -0
  160. package/dist/hooks/tool-guard.test.d.ts +2 -0
  161. package/dist/hooks/tool-guard.test.d.ts.map +1 -0
  162. package/dist/index.d.ts +4 -0
  163. package/dist/index.d.ts.map +1 -0
  164. package/dist/index.js +6639 -0
  165. package/dist/lib/confirmation.d.ts +20 -0
  166. package/dist/lib/confirmation.d.ts.map +1 -0
  167. package/dist/lib/impact-radar.d.ts +35 -0
  168. package/dist/lib/impact-radar.d.ts.map +1 -0
  169. package/dist/lib/signatures.d.ts +12 -0
  170. package/dist/lib/signatures.d.ts.map +1 -0
  171. package/dist/lib/timestamps.d.ts +23 -0
  172. package/dist/lib/timestamps.d.ts.map +1 -0
  173. package/dist/mcp/index.d.ts +20 -0
  174. package/dist/mcp/index.d.ts.map +1 -0
  175. package/dist/services/agent-performance.d.ts +29 -0
  176. package/dist/services/agent-performance.d.ts.map +1 -0
  177. package/dist/services/approval-manager.d.ts +30 -0
  178. package/dist/services/approval-manager.d.ts.map +1 -0
  179. package/dist/services/index.d.ts +7 -0
  180. package/dist/services/index.d.ts.map +1 -0
  181. package/dist/services/model-router.d.ts +35 -0
  182. package/dist/services/model-router.d.ts.map +1 -0
  183. package/dist/services/policy-compiler.d.ts +27 -0
  184. package/dist/services/policy-compiler.d.ts.map +1 -0
  185. package/dist/services/run-trace.d.ts +34 -0
  186. package/dist/services/run-trace.d.ts.map +1 -0
  187. package/dist/services/services.test.d.ts +2 -0
  188. package/dist/services/services.test.d.ts.map +1 -0
  189. package/dist/services/telemetry.d.ts +34 -0
  190. package/dist/services/telemetry.d.ts.map +1 -0
  191. package/dist/tools/agent-dispatch.test.d.ts +2 -0
  192. package/dist/tools/agent-dispatch.test.d.ts.map +1 -0
  193. package/dist/tools/codebase-state.d.ts +4 -0
  194. package/dist/tools/codebase-state.d.ts.map +1 -0
  195. package/dist/tools/context-generator.d.ts +3 -0
  196. package/dist/tools/context-generator.d.ts.map +1 -0
  197. package/dist/tools/council.d.ts +4 -0
  198. package/dist/tools/council.d.ts.map +1 -0
  199. package/dist/tools/decision-trace.d.ts +16 -0
  200. package/dist/tools/decision-trace.d.ts.map +1 -0
  201. package/dist/tools/delegate.d.ts +4 -0
  202. package/dist/tools/delegate.d.ts.map +1 -0
  203. package/dist/tools/failure-replay.d.ts +19 -0
  204. package/dist/tools/failure-replay.d.ts.map +1 -0
  205. package/dist/tools/failure-replay.test.d.ts +2 -0
  206. package/dist/tools/failure-replay.test.d.ts.map +1 -0
  207. package/dist/tools/hash-edit.d.ts +3 -0
  208. package/dist/tools/hash-edit.d.ts.map +1 -0
  209. package/dist/tools/planning-state-lib.d.ts +65 -0
  210. package/dist/tools/planning-state-lib.d.ts.map +1 -0
  211. package/dist/tools/planning-state.d.ts +3 -0
  212. package/dist/tools/planning-state.d.ts.map +1 -0
  213. package/dist/tools/policy-engine.d.ts +19 -0
  214. package/dist/tools/policy-engine.d.ts.map +1 -0
  215. package/dist/tools/repo-memory.d.ts +20 -0
  216. package/dist/tools/repo-memory.d.ts.map +1 -0
  217. package/dist/tools/repo-memory.test.d.ts +2 -0
  218. package/dist/tools/repo-memory.test.d.ts.map +1 -0
  219. package/dist/tools/run-parallel.d.ts +4 -0
  220. package/dist/tools/run-parallel.d.ts.map +1 -0
  221. package/dist/tools/run-pipeline.d.ts +4 -0
  222. package/dist/tools/run-pipeline.d.ts.map +1 -0
  223. package/dist/tools/volatility-map.d.ts +18 -0
  224. package/dist/tools/volatility-map.d.ts.map +1 -0
  225. package/dist/tools/volatility-map.test.d.ts +2 -0
  226. package/dist/tools/volatility-map.test.d.ts.map +1 -0
  227. package/dist/tools/workspace-state.d.ts +3 -0
  228. package/dist/tools/workspace-state.d.ts.map +1 -0
  229. package/docs/USER_GUIDE.md +20 -0
  230. package/docs/agents.md +562 -0
  231. package/docs/best-practices.md +47 -0
  232. package/docs/command-migration.md +175 -0
  233. package/docs/commands/fd-analyze-change.md +107 -0
  234. package/docs/commands/fd-ask.md +51 -0
  235. package/docs/commands/fd-checkpoint.md +10 -0
  236. package/docs/commands/fd-dashboard.md +11 -0
  237. package/docs/commands/fd-deploy-check.md +11 -0
  238. package/docs/commands/fd-discuss.md +28 -0
  239. package/docs/commands/fd-evaluate-risk.md +134 -0
  240. package/docs/commands/fd-fix-bug.md +24 -0
  241. package/docs/commands/fd-guarded-edit.md +105 -0
  242. package/docs/commands/fd-map-codebase.md +27 -0
  243. package/docs/commands/fd-multi-repo.md +63 -0
  244. package/docs/commands/fd-new-feature.md +25 -0
  245. package/docs/commands/fd-new-project.md +24 -0
  246. package/docs/commands/fd-plan.md +33 -0
  247. package/docs/commands/fd-progress.md +11 -0
  248. package/docs/commands/fd-resume.md +10 -0
  249. package/docs/commands/fd-review-code.md +29 -0
  250. package/docs/commands/fd-roadmap.md +10 -0
  251. package/docs/commands/fd-settings.md +10 -0
  252. package/docs/commands/fd-write-docs.md +10 -0
  253. package/docs/commands.md +476 -0
  254. package/docs/configuration.md +211 -0
  255. package/docs/feature-integration-architecture.md +255 -0
  256. package/docs/index.md +75 -0
  257. package/docs/installation.md +134 -0
  258. package/docs/intelligence.md +294 -0
  259. package/docs/multi-repo.md +201 -0
  260. package/docs/notifications.md +170 -0
  261. package/docs/parallel-execution.md +227 -0
  262. package/docs/quick-start.md +174 -0
  263. package/docs/rules.md +459 -0
  264. package/docs/skills.md +408 -0
  265. package/docs/workflows.md +376 -0
  266. package/package.json +58 -0
  267. package/postinstall.mjs +102 -0
  268. package/src/rules/README.md +37 -0
  269. package/src/rules/common/agent-orchestration.md +86 -0
  270. package/src/rules/common/coding-style.md +120 -0
  271. package/src/rules/common/git-workflow.md +77 -0
  272. package/src/rules/common/security.md +94 -0
  273. package/src/rules/common/testing.md +105 -0
  274. package/src/rules/golang/patterns.md +187 -0
  275. package/src/rules/java/patterns.md +204 -0
  276. package/src/rules/python/patterns.md +141 -0
  277. package/src/rules/rust/patterns.md +210 -0
  278. package/src/rules/typescript/patterns.md +168 -0
  279. package/src/skills/api-design/SKILL.md +143 -0
  280. package/src/skills/arch-constraint-guard/SKILL.md +61 -0
  281. package/src/skills/blast-radius-preview/SKILL.md +65 -0
  282. package/src/skills/change-impact-radar/SKILL.md +63 -0
  283. package/src/skills/code-review/SKILL.md +108 -0
  284. package/src/skills/code-tour/SKILL.md +101 -0
  285. package/src/skills/codebase-mapping/SKILL.md +87 -0
  286. package/src/skills/codebase-onboarding/SKILL.md +133 -0
  287. package/src/skills/confidence-aware-planning/SKILL.md +67 -0
  288. package/src/skills/context-load/SKILL.md +63 -0
  289. package/src/skills/debug-flow/SKILL.md +75 -0
  290. package/src/skills/decision-trace/SKILL.md +72 -0
  291. package/src/skills/dependency-audit/SKILL.md +126 -0
  292. package/src/skills/deploy-check/SKILL.md +87 -0
  293. package/src/skills/documentation-writer/SKILL.md +154 -0
  294. package/src/skills/failure-replay-engine/SKILL.md +59 -0
  295. package/src/skills/git-release/SKILL.md +94 -0
  296. package/src/skills/git-workflow/SKILL.md +177 -0
  297. package/src/skills/golang-patterns/SKILL.md +511 -0
  298. package/src/skills/human-review-routing/SKILL.md +65 -0
  299. package/src/skills/intent-translator/SKILL.md +57 -0
  300. package/src/skills/java-patterns/SKILL.md +479 -0
  301. package/src/skills/multi-repo/SKILL.md +187 -0
  302. package/src/skills/parallel-execute/SKILL.md +92 -0
  303. package/src/skills/patch-trust-score/SKILL.md +44 -0
  304. package/src/skills/performance-profiling/SKILL.md +153 -0
  305. package/src/skills/plan-task/SKILL.md +101 -0
  306. package/src/skills/python-patterns/SKILL.md +529 -0
  307. package/src/skills/refactor-guide/SKILL.md +117 -0
  308. package/src/skills/regression-prediction/SKILL.md +57 -0
  309. package/src/skills/repo-memory-graph/SKILL.md +49 -0
  310. package/src/skills/rust-patterns/SKILL.md +492 -0
  311. package/src/skills/security-scan/SKILL.md +91 -0
  312. package/src/skills/self-healing-policies/SKILL.md +76 -0
  313. package/src/skills/tdd-workflow/SKILL.md +126 -0
  314. package/src/skills/test-coverage/SKILL.md +94 -0
  315. package/src/skills/test-gap-detector/SKILL.md +58 -0
  316. package/src/skills/volatility-map/SKILL.md +52 -0
  317. package/src/workflows/debug-flow.md +119 -0
  318. package/src/workflows/deploy-check-flow.md +98 -0
  319. package/src/workflows/discuss-flow.md +97 -0
  320. package/src/workflows/execute-flow.md +233 -0
  321. package/src/workflows/execute-phase.md +142 -0
  322. package/src/workflows/fix-bug-flow.md +210 -0
  323. package/src/workflows/map-codebase-flow.md +92 -0
  324. package/src/workflows/multi-repo-flow.md +226 -0
  325. package/src/workflows/parallel-execution-flow.md +236 -0
  326. package/src/workflows/plan-flow.md +126 -0
  327. package/src/workflows/plan-phase.md +101 -0
  328. package/src/workflows/refactor-flow.md +122 -0
  329. package/src/workflows/review-code-flow.md +105 -0
  330. package/src/workflows/spec-driven-flow.md +43 -0
  331. package/src/workflows/write-docs-flow.md +95 -0
@@ -0,0 +1,47 @@
1
+ # FlowDeck Best Practices
2
+
3
+ Maximize the efficiency and safety of your AI-driven development by following these best practices.
4
+
5
+ ---
6
+
7
+ ## 1. Spec-Driven Discipline
8
+
9
+ **Don't skip the planning phase.** FlowDeck strictly enforces phase gating to prevent agents from writing code before requirements are finalized.
10
+ - Use `/fd-discuss` to capture edge cases and constraints early.
11
+ - Use `/fd-plan` to break complex features into manageable waves.
12
+ - **Tip**: If you must make an emergency edit, run `/fd-settings` to temporarily advance the phase to `execute`, but remember to return to `plan` if you are still designing.
13
+
14
+ ## 2. The Power of the Council
15
+
16
+ When faced with ambiguity, don't rely on a single agent.
17
+ - Use `/fd-council` for high-level design choices.
18
+ - The synthesis provided by the council often catches security or performance risks that a single "coder" agent might miss.
19
+
20
+ ## 3. Grounding with Hierarchical Context
21
+
22
+ AI agents perform better when they have clear, localized context.
23
+ - Keep an `AGENTS.md` file in each major directory.
24
+ - Use `context-generator` to keep these files up to date with your current `ROADMAP.md` and `STATE.md`.
25
+ - Include "Forbidden Paths" and "Tech Stack" details to prevent agents from using incompatible libraries.
26
+
27
+ ## 4. Reliable Edits
28
+
29
+ In multi-agent sessions, files can change rapidly.
30
+ - Encourage your agents to use `fd-hash-edit`.
31
+ - By anchoring edits to specific content hashes, you eliminate the "stale line" problem where an agent overwrites a change made by another agent seconds earlier.
32
+
33
+ ## 5. Failure Replay as a Learning Loop
34
+
35
+ When a bug is fixed, use the failure replay engine.
36
+ - FlowDeck records failure patterns to suggest new policies.
37
+ - **Tip**: Regularly review `/fd-dashboard` to see recurring failure zones and add them to `.codebase/CONSTRAINTS.md` to prevent future regressions.
38
+
39
+ ## 6. Infrastructure & Environment Health
40
+
41
+ Before running a heavy implementation wave (e.g., `/fd-new-feature`):
42
+ - Run `/fd-doctor` to ensure all plugins and MCPs are active.
43
+ - Check the **Context Window Monitor** in your session logs. If you are above 80% usage, run a checkpoint and start a fresh session to avoid context truncation.
44
+
45
+ ---
46
+
47
+ ← [Back to Index](index.md)
@@ -0,0 +1,175 @@
1
+ # Command Architecture & Migration Guide
2
+
3
+ FlowDeck v2 consolidates seven individual analysis commands into four umbrella commands, reducing the top-level command surface while keeping all capabilities. The 15 workflow commands remain as separate top-level slash commands.
4
+
5
+ ---
6
+
7
+ ## Command Map
8
+
9
+ ### Workflow commands (unchanged — 15 total)
10
+
11
+ These remain as separate top-level commands:
12
+
13
+ | Command | Purpose |
14
+ |---------|---------|
15
+ | `/fd-new-project` | Bootstrap a new project |
16
+ | `/fd-map-codebase` | Analyse and index the codebase |
17
+ | `/fd-settings` | Configure FlowDeck settings |
18
+ | `/fd-discuss` | Pre-planning discussion with impact radar |
19
+ | `/fd-plan` | Generate a phase plan |
20
+ | `/fd-roadmap` | View / update project roadmap |
21
+ | `/fd-dashboard` | Visual progress dashboard |
22
+ | `/fd-ask` | Smart agent dispatch |
23
+ | `/fd-new-feature` | Implement a new feature |
24
+ | `/fd-fix-bug` | Fix a bug with failure replay |
25
+ | `/fd-review-code` | Code review with impact radar |
26
+ | `/fd-write-docs` | Generate documentation |
27
+ | `/fd-deploy-check` | Pre-deploy safety check |
28
+ | `/fd-progress` | View project progress |
29
+ | `/fd-checkpoint` | Save a session checkpoint |
30
+ | `/fd-resume` | Resume from checkpoint |
31
+ | `/fd-multi-repo` | Multi-repo management |
32
+
33
+ ### Analysis commands — old → new mapping
34
+
35
+ | Old command | New umbrella command | Flag |
36
+ |-------------|---------------------|------|
37
+ | `/fd-impact-radar` | `/fd-analyze-change` | `--impact` |
38
+ | `/fd-blast-radius` | `/fd-analyze-change` | `--blast-radius` |
39
+ | `/fd-regression-predict` | `/fd-analyze-change` | `--regression` |
40
+ | `/fd-test-gap` | `/fd-analyze-change` | `--test-gap` |
41
+ | `/fd-volatility-map` | `/fd-analyze-change` | `--volatility` |
42
+ | `/fd-review-route` | `/fd-analyze-change` | `--review-route` |
43
+ | `/fd-translate-intent` | `/fd-translate-intent` | *(enhanced, kept as-is)* |
44
+ | *(new)* | `/fd-guarded-edit` | — |
45
+ | *(new)* | `/fd-evaluate-risk` | — |
46
+
47
+ ### New umbrella commands (4 total)
48
+
49
+ | Command | Replaces / Adds |
50
+ |---------|----------------|
51
+ | `/fd-analyze-change` | Combines 6 analysis commands; `--all` runs all modules |
52
+ | `/fd-guarded-edit` | New — edit gate decision (auto/confirm/review/block) |
53
+ | `/fd-evaluate-risk` | New — standalone risk + regression assessment |
54
+ | `/fd-translate-intent` | Enhanced — adds `assumptions`, `recommended_option`, `clarifying_questions` |
55
+
56
+ ---
57
+
58
+ ## Architecture
59
+
60
+ ### Command layer
61
+
62
+ Commands are thin entry points that dispatch to agent pipelines or shared utilities. No analysis logic lives inside command files.
63
+
64
+ ```
65
+ User runs: /fd-analyze-change --change "..." --impact --regression
66
+
67
+ analyzeChangeCommand.execute()
68
+
69
+ reads: VOLATILITY.json, FAILURES.json, MEMORY.json via shared libs
70
+ calls: runImpactRadar(), scorePatch()
71
+
72
+ returns: unified config object with agent pipeline + aggregated data
73
+ ```
74
+
75
+ ### Agent layer
76
+
77
+ Agents are modular and reusable across commands:
78
+
79
+ | Agent | Used by |
80
+ |-------|---------|
81
+ | `architect` | `/fd-analyze-change`, `/fd-translate-intent`, `/fd-plan` |
82
+ | `researcher` | `/fd-analyze-change`, `/fd-evaluate-risk`, `/fd-discuss` |
83
+ | `tester` | `/fd-analyze-change` |
84
+ | `reviewer` | `/fd-analyze-change`, `/fd-evaluate-risk`, `/fd-review-code` |
85
+ | `security-auditor` | `/fd-evaluate-risk` (high/critical risk), `/fd-review-code` |
86
+ | `risk-analyst` | `/fd-evaluate-risk`, `/fd-guarded-edit` |
87
+ | `policy-enforcer` | `/fd-guarded-edit` |
88
+
89
+ ### Plugin hooks
90
+
91
+ Hooks intercept tool execution and enforce safety policies at the infrastructure layer:
92
+
93
+ | Hook | Function |
94
+ |------|---------|
95
+ | `tool.execute.before` | `toolGuardHook` — blocks dangerous read/write/bash/edit |
96
+ | `tool.execute.before` | `guardRailsHook` — enforces execution mode (auto/guarded/review-only) |
97
+ | `tool.execute.before` | `patchTrustHook` — scores writes/edits; blocks high-risk without approval |
98
+ | `tool.execute.before` | `decisionTraceHook` — records every edit to DECISIONS.jsonl |
99
+ | `session.started` | `sessionStartHook` — announces FlowDeck, loads context |
100
+ | `command.execute.before` | Command routing — dispatches slash commands |
101
+
102
+ ### Shared libraries
103
+
104
+ Reusable utilities consumed by multiple commands:
105
+
106
+ | Module | Exports |
107
+ |--------|---------|
108
+ | `src/lib/impact-radar.ts` | `runImpactRadar()`, `impactRadarSummaryLines()`, `lookupPriorFailures()` |
109
+ | `src/hooks/patch-trust.ts` | `scorePatch()` |
110
+ | `src/hooks/guard-rails.ts` | `resolveExecutionMode()` |
111
+ | `src/hooks/tool-guard.ts` | `checkArchConstraint()`, `isBlocked()` |
112
+ | `src/tools/planning-state-lib.ts` | `statePath()`, `codebaseDir()`, `readPlanningState()`, `timestamp()` |
113
+
114
+ ### Data files (`.codebase/`)
115
+
116
+ | File | Purpose |
117
+ |------|---------|
118
+ | `MEMORY.json` | Architecture graph — modules, ownership, types |
119
+ | `FAILURES.json` | Failure history — root causes, tags, recurrence counts |
120
+ | `DECISIONS.jsonl` | Append-only edit audit log |
121
+ | `VOLATILITY.json` | Churn metrics — stability ratings per path |
122
+ | `POLICIES.json` | Self-healing policy rules |
123
+ | `CONSTRAINTS.md` | Forbidden paths and architectural boundaries |
124
+ | `ARCHITECTURE.md` | High-level architecture notes (written by `/fd-map-codebase`) |
125
+ | `STACK.md` | Technology stack reference |
126
+
127
+ ---
128
+
129
+ ## Migration Plan
130
+
131
+ ### For existing users
132
+
133
+ **All old commands still work.** No action required. Old commands were not removed.
134
+
135
+ **When to migrate:**
136
+
137
+ | If you used to run | Now prefer |
138
+ |-------------------|-----------|
139
+ | `/fd-impact-radar --change "..."` | `/fd-analyze-change --change "..." --impact` |
140
+ | Multiple analysis commands in sequence | `/fd-analyze-change --change "..." --all` |
141
+ | Manual pre-edit risk assessment | `/fd-evaluate-risk --change "..." --file "..."` |
142
+ | Manually deciding whether to apply a change | `/fd-guarded-edit --file "..." --change "..."` |
143
+ | `/fd-translate-intent --intent "..."` | Same — now returns `assumptions` and `recommended_option` |
144
+
145
+ ### Quick start for new workflows
146
+
147
+ **Before any significant edit:**
148
+ ```bash
149
+ # 1. Translate vague intent to concrete options
150
+ /fd-translate-intent --intent "make checkout faster"
151
+
152
+ # 2. Full pre-change analysis
153
+ /fd-analyze-change --change "add Redis cache for checkout queries"
154
+
155
+ # 3. Gate decision for the specific file
156
+ /fd-guarded-edit --file "src/checkout/query.ts" --change "add Redis cache layer"
157
+ ```
158
+
159
+ **In CI/CD pipelines:**
160
+ ```bash
161
+ # Risk gate — fail if approval required
162
+ /fd-evaluate-risk --change "<PR description>" --json | jq '.approval_needed'
163
+
164
+ # Edit gate — fail if block decision
165
+ /fd-guarded-edit --file "<changed file>" --json | jq '.decision == "block"'
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Backward compatibility notes
171
+
172
+ - All 7 original intelligence commands (`/fd-impact-radar`, `/fd-blast-radius`, `/fd-regression-predict`, `/fd-test-gap`, `/fd-volatility-map`, `/fd-review-route`, `/fd-translate-intent`) remain registered and functional.
173
+ - Their implementations were not modified (except `/fd-translate-intent` which gained `assumptions`, `recommended_option`, and `clarifying_questions` in its output spec).
174
+ - The new umbrella commands are registered alongside the old ones — no commands were removed.
175
+ - Existing scripts, keybindings, or workflows that call the old commands will continue to work without changes.
@@ -0,0 +1,107 @@
1
+ # /fd-analyze-change
2
+
3
+ **Umbrella analysis command** — runs up to 6 analysis modules in a single pass and produces a consolidated pre-change risk report.
4
+
5
+ Replaces individual calls to `/fd-impact-radar`, `/fd-blast-radius`, `/fd-regression-predict`, `/fd-test-gap`, `/fd-volatility-map`, and `/fd-review-route`.
6
+
7
+ ---
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /fd-analyze-change --change "<what's changing>" [flags]
13
+ ```
14
+
15
+ ## Arguments
16
+
17
+ | Flag | Type | Default | Description |
18
+ |------|------|---------|-------------|
19
+ | `--change` | string | — | Description of the proposed change |
20
+ | `--scope` | string | `"all"` | Module or file path scope |
21
+ | `--files` | string | — | Comma-separated file paths |
22
+ | `--depth` | number | `2` | Blast radius traversal depth |
23
+ | `--impact` | boolean | false | Run impact radar module |
24
+ | `--blast-radius` | boolean | false | Run blast radius module |
25
+ | `--regression` | boolean | false | Run regression prediction module |
26
+ | `--test-gap` | boolean | false | Run test gap detection module |
27
+ | `--volatility` | boolean | false | Run volatility map module |
28
+ | `--review-route` | boolean | false | Run reviewer routing module |
29
+ | `--all` | boolean | false | Force all modules (default when no module flags given) |
30
+ | `--json` | boolean | false | Return raw JSON instead of table |
31
+
32
+ **Default behaviour:** If no module flags are specified, all 6 modules run automatically.
33
+
34
+ ---
35
+
36
+ ## Output
37
+
38
+ ```
39
+ ════════════════════════════════════════════════════════════════
40
+ fd-analyze-change
41
+ ────────────────────────────────────────────────────────────────
42
+ Change: update JWT token expiry
43
+ Scope: all
44
+ Modules: impact-radar, blast-radius, regression-predict, test-gap, volatility-map, review-route
45
+ ────────────────────────────────────────────────────────────────
46
+ ⚠ Affected zones: src/auth/, src/session/, src/middleware/
47
+ ⚠ Known failures: F-023, F-031
48
+ ≈ Regression cats: auth, performance, async-flow...
49
+ ✗ Test gap types: 5 gap patterns checked
50
+ → Route to: security, backend
51
+ ────────────────────────────────────────────────────────────────
52
+ ⚠ HIGH RISK: 3 volatile zone(s), 2 known failure(s), 1 fragile pattern(s)
53
+ ════════════════════════════════════════════════════════════════
54
+ ```
55
+
56
+ ### Top-level fields returned
57
+
58
+ | Field | Description |
59
+ |-------|-------------|
60
+ | `modules_run` | Which analysis modules were executed |
61
+ | `affected_zones` | Volatile/critical file paths matching the change |
62
+ | `recommended_reviewers` | Reviewer types suggested (security, backend, infra, etc.) |
63
+ | `risk_summary` | Human-readable risk advisory |
64
+ | `risk_score` | Numeric score 0–100 (higher = lower risk) |
65
+ | `config` | Full agent pipeline config dispatched to agents |
66
+
67
+ ---
68
+
69
+ ## Examples
70
+
71
+ ```bash
72
+ # Full analysis before editing auth middleware
73
+ /fd-analyze-change --change "replace JWT with session tokens" --files "src/auth/token.ts"
74
+
75
+ # Impact + regression only (partial analysis)
76
+ /fd-analyze-change --change "refactor database connection pool" --impact --regression
77
+
78
+ # JSON output for scripting
79
+ /fd-analyze-change --change "update payment webhook handler" --json
80
+
81
+ # Deep blast radius (3 levels)
82
+ /fd-analyze-change --change "extract user service" --blast-radius --depth 3
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Old commands (still supported)
88
+
89
+ These individual commands remain available and still work. Use `/fd-analyze-change` for combined analysis:
90
+
91
+ | Old command | Equivalent flag |
92
+ |-------------|----------------|
93
+ | `/fd-impact-radar` | `--impact` |
94
+ | `/fd-blast-radius` | `--blast-radius` |
95
+ | `/fd-regression-predict` | `--regression` |
96
+ | `/fd-test-gap` | `--test-gap` |
97
+ | `/fd-volatility-map` | `--volatility` |
98
+ | `/fd-review-route` | `--review-route` |
99
+
100
+ ---
101
+
102
+ ## Agents dispatched
103
+
104
+ - `researcher` — traces dependency graph from changed paths
105
+ - `architect` — maps blast radius to configured depth, flags integration points
106
+ - `tester` — estimates coverage gaps per regression category and test gap types
107
+ - `reviewer` — ranks gaps by risk and confirms routing
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Smart dispatch — routes a free-form task to the appropriate specialized agent without requiring a workflow
3
+ argument-hint: "--task '<description>'"
4
+ ---
5
+
6
+ Route a free-form task to the best specialized agent automatically.
7
+
8
+ **What this does:**
9
+ 1. Parses your task description using keyword scoring
10
+ 2. Picks the best-fit agent from 12 specialists
11
+ 3. Runs the Impact Radar if the task involves change analysis
12
+ 4. Dispatches the task directly — no workflow, no STATE.md required
13
+
14
+ **Routing table:**
15
+
16
+ | Keywords | Agent |
17
+ |---|---|
18
+ | design, architecture, component | `@architect` |
19
+ | impact, blast radius, affected | `@researcher` + radar |
20
+ | security, vulnerability, CVE | `@security-auditor` |
21
+ | performance, bottleneck, slow | `@performance-optimizer` |
22
+ | debug, error, crash, exception | `@debug-specialist` |
23
+ | test, coverage, spec, TDD | `@tester` |
24
+ | refactor, cleanup, simplify | `@coder` |
25
+ | document, docs, README | `@writer` |
26
+ | explain, query, find, explore | `@code-explorer` |
27
+ | deploy, release, migration | `@reviewer` |
28
+ | plan, roadmap, breakdown | `@planner` |
29
+ | (anything else) | `@orchestrator` |
30
+
31
+ **Examples:**
32
+
33
+ ```
34
+ /fd-ask --task "system design for a real-time notification service"
35
+ /fd-ask --task "explain how the payment flow works"
36
+ /fd-ask --task "is there a security issue with the rate limiter"
37
+ /fd-ask --task "why is the login endpoint slow"
38
+ /fd-ask --task "what files are affected if I change the auth module"
39
+ /fd-ask --task "write tests for the checkout service"
40
+ /fd-ask --agent security-auditor --task "review the JWT implementation"
41
+ ```
42
+
43
+ **Override routing:** Use `--agent` to force a specific agent.
44
+
45
+ ## What Next?
46
+
47
+ After `/fd-ask` completes, you can go deeper:
48
+
49
+ 1. **Full workflow** → `/fd-fix-bug`, `/fd-new-feature`, `/fd-review-code`
50
+ 2. **Detailed planning** → `/fd-discuss`, `/fd-plan`
51
+ 3. **Another question** → `/fd-ask --task '...'`
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Save current state to STATE.md — safe to close session after this
3
+ ---
4
+ Run the FlowDeck checkpoint command to save the current project state.
5
+
6
+ ## What Next?
7
+
8
+ 1. **Continue working** → `/fd-new-feature [description]`
9
+ 2. **View progress** → `/fd-progress`
10
+ 3. **Check dashboard** → `/fd-dashboard`
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Open project dashboard — displays phase progress, milestones, and blockers
3
+ ---
4
+ Run the FlowDeck dashboard to view project progress.
5
+
6
+ ## What Next?
7
+
8
+ 1. **Start feature work** → `/fd-new-feature [description]`
9
+ 2. **Fix a bug** → `/fd-fix-bug [issue]`
10
+ 3. **View roadmap** → `/fd-roadmap`
11
+ 4. **Check progress** → `/fd-progress`
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Pre-deploy check — parallel tester + reviewer + CVE scan — orchestrator go/no-go decision
3
+ ---
4
+ Run the FlowDeck deploy-check workflow before deploying to production.
5
+
6
+ ## What Next?
7
+
8
+ 1. **Fix blocking issues** → `/fd-fix-bug [issue]`
9
+ 2. **Create deployment checkpoint** → `/fd-checkpoint`
10
+ 3. **Review code again** → `/fd-review-code`
11
+ 4. **View project roadmap** → `/fd-roadmap`
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Start a structured requirements discussion using FlowDeck. Extracts decisions and saves to .planning/phases/phase-N/DISCUSS.md
3
+ argument-hint: "[phase-number]"
4
+ ---
5
+
6
+ Load the FlowDeck discuss workflow for the current (or specified) phase.
7
+
8
+ **What this does:**
9
+ 1. Reads `.planning/STATE.md` to determine the current phase
10
+ 2. Scouts the codebase for relevant context (existing patterns, affected files)
11
+ 3. Surfaces key decisions that need to be made for this phase
12
+ 4. Guides you through answering them via conversation
13
+ 5. Saves decisions to `.planning/phases/phase-N/DISCUSS.md`
14
+
15
+ **Output:** A DISCUSS.md file with locked decisions that guide the planner and coder.
16
+
17
+ **Next step after this:** Run `/fd-plan` to create the implementation plan.
18
+
19
+ ## What Next?
20
+
21
+ After discussion completes, choose your next step:
22
+
23
+ 1. **Create implementation plan** → `/fd-plan [phase-number]`
24
+ 2. **Continue discussion** → `/fd-discuss [phase-number]`
25
+ 3. **Review existing work** → `/fd-review-code`
26
+ 4. **Check project dashboard** → `/fd-dashboard`
27
+
28
+ Type the number or the command to proceed.
@@ -0,0 +1,134 @@
1
+ # /fd-evaluate-risk
2
+
3
+ **Standalone risk assessment command** — estimates change risk, confidence, likely regression categories, and whether human approval is needed before proceeding.
4
+
5
+ Works with a change description alone (keyword-based) or with a specific file path (trust score + keyword combined).
6
+
7
+ ---
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /fd-evaluate-risk --change "<description>" [--file "<path>"] [flags]
13
+ ```
14
+
15
+ ## Arguments
16
+
17
+ | Flag | Type | Default | Description |
18
+ |------|------|---------|-------------|
19
+ | `--change` | string | — | Plain-language description of the proposed change |
20
+ | `--file` | string | — | Specific file being changed (enables patch trust scoring) |
21
+ | `--volatility` | boolean | true | Include volatile zone count in analysis |
22
+ | `--json` | boolean | false | Return raw JSON instead of table |
23
+
24
+ At least one of `--change` or `--file` is required.
25
+
26
+ ---
27
+
28
+ ## Risk levels
29
+
30
+ | Level | Score | Meaning |
31
+ |-------|-------|---------|
32
+ | `low` | 80–100 | Safe to proceed without approval |
33
+ | `medium` | 50–79 | Proceed with care; review recommended |
34
+ | `high` | 25–49 | Approval required; consider safer alternative |
35
+ | `critical` | 0–24 | Approval required; safer alternative strongly recommended |
36
+
37
+ **Approval is required when:** `risk_score < 60` OR `≥3 regression categories predicted`.
38
+
39
+ ---
40
+
41
+ ## Output
42
+
43
+ ```
44
+ ════════════════════════════════════════════════════════════
45
+ fd-evaluate-risk
46
+ ────────────────────────────────────────────────────────────
47
+ Change: replace JWT with session tokens
48
+ File: src/auth/token.ts
49
+ ────────────────────────────────────────────────────────────
50
+ ⚠ Risk level: HIGH (score: 38/100)
51
+ Confidence: 72/100 (codebase context coverage)
52
+ Approval: REQUIRED
53
+ Regressions: auth, security, async-flow
54
+ Hot zones: src/auth/
55
+ Signals: volatile path, auth keyword
56
+ ────────────────────────────────────────────────────────────
57
+ Safer alt: Consider a feature-flag rollout before swapping auth tokens
58
+ ────────────────────────────────────────────────────────────
59
+ researcher → map to affected paths
60
+ reviewer → validate risk + regressions
61
+ security → targeted review of high-risk areas
62
+ ════════════════════════════════════════════════════════════
63
+ ```
64
+
65
+ ### Fields returned
66
+
67
+ | Field | Description |
68
+ |-------|-------------|
69
+ | `risk_score` | 0–100 (higher = less risky) |
70
+ | `risk_level` | low / medium / high / critical |
71
+ | `confidence` | 0–100 (how much codebase context data exists) |
72
+ | `approval_needed` | boolean — whether human approval is required |
73
+ | `likely_regressions` | predicted regression categories from change keywords |
74
+ | `volatile_zones` | count of volatile/critical zones in the repo |
75
+ | `volatile_matches` | paths that match the change description |
76
+ | `safer_alternative` | suggested safer approach if risk is high/critical |
77
+ | `trust_signals` | risk signals from the patch trust scorer |
78
+
79
+ ---
80
+
81
+ ## Regression categories detected
82
+
83
+ | Category | Triggered by keywords |
84
+ |----------|----------------------|
85
+ | performance | slow, latency, cache, query, index, bulk, batch, load |
86
+ | auth | auth, token, session, jwt, oauth, permission, rbac, login |
87
+ | schema | schema, migration, column, table, foreign key, constraint |
88
+ | ui-state | state, redux, context, store, hook, render, component |
89
+ | async-flow | async, await, promise, callback, event, queue, worker |
90
+ | api-contract | api, endpoint, route, request, response, payload, version |
91
+ | data-integrity | transaction, rollback, constraint, unique, required, nullable |
92
+ | security | secret, password, encrypt, decrypt, hash, sanitize |
93
+ | config | env, config, setting, flag, feature flag, toggle |
94
+ | i18n | locale, translation, i18n, format, timezone, language |
95
+
96
+ ---
97
+
98
+ ## Confidence score
99
+
100
+ Confidence reflects how much codebase context data the system has:
101
+
102
+ | Data source | Points |
103
+ |-------------|--------|
104
+ | `.codebase/ARCHITECTURE.md` exists | +20 |
105
+ | `.codebase/STACK.md` exists | +10 |
106
+ | `.codebase/MEMORY.json` node count | up to +25 |
107
+ | `.codebase/VOLATILITY.json` entries | up to +15 |
108
+ | `.codebase/FAILURES.json` entries | up to +10 |
109
+ | Base | +20 |
110
+
111
+ Run `/fd-map-codebase` and let FlowDeck index the repo to increase confidence.
112
+
113
+ ---
114
+
115
+ ## Examples
116
+
117
+ ```bash
118
+ # Keyword-based risk estimate
119
+ /fd-evaluate-risk --change "refactor JWT auth to use session tokens"
120
+
121
+ # File + change (enables patch trust scoring)
122
+ /fd-evaluate-risk --change "update stripe webhook" --file "src/payment/webhook.ts"
123
+
124
+ # JSON output for CI decision gates
125
+ /fd-evaluate-risk --change "drop users table column" --json
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Agents dispatched
131
+
132
+ - `researcher` — maps change description to affected modules and paths
133
+ - `reviewer` — validates risk level and regression predictions
134
+ - `security-auditor` — targeted review (only when risk is high or critical)
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Debug and fix a bug — scope analysis, mini-plan, coder fix, regression test, reviewer confirmation
3
+ argument-hint: "[bug description or issue number]"
4
+ ---
5
+
6
+ Systematically debug and fix a bug using FlowDeck's structured approach.
7
+
8
+ **What this does:**
9
+ 1. Reads `.codebase/` for architecture context
10
+ 2. Delegates to `@debug-specialist` to locate the root cause
11
+ 3. Creates a mini-plan (fix + regression test)
12
+ 4. Delegates fix to `@coder`
13
+ 5. Delegates regression test writing to `@tester`
14
+ 6. Verifies the fix via `@reviewer`
15
+ 7. Writes a brief post-mortem to `.planning/bugs/`
16
+
17
+ **Root cause first:** Does not implement a fix until root cause is confirmed — no symptom masking.
18
+
19
+ ## What Next?
20
+
21
+ 1. **Run code review** → `/fd-review-code`
22
+ 2. **Check for more bugs** → `/fd-fix-bug [next-issue]`
23
+ 3. **Update documentation** → `/fd-write-docs`
24
+ 4. **Deploy check** → `/fd-deploy-check`