@dv.nghiem/flowdeck 0.3.8 → 0.4.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 (136) hide show
  1. package/README.md +13 -122
  2. package/dist/agents/code-explorer.d.ts.map +1 -1
  3. package/dist/agents/mapper.d.ts.map +1 -1
  4. package/dist/agents/orchestrator.d.ts.map +1 -1
  5. package/dist/agents/planner.d.ts.map +1 -1
  6. package/dist/agents/specialist.d.ts.map +1 -1
  7. package/dist/dashboard/server.mjs +12 -2
  8. package/dist/hooks/compaction-hook.d.ts.map +1 -1
  9. package/dist/hooks/file-tracker.d.ts +6 -0
  10. package/dist/hooks/file-tracker.d.ts.map +1 -1
  11. package/dist/hooks/notifications.d.ts.map +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +752 -785
  14. package/dist/lib/completion-validator.d.ts +51 -0
  15. package/dist/lib/completion-validator.d.ts.map +1 -0
  16. package/dist/lib/recommended-question.d.ts +24 -0
  17. package/dist/lib/recommended-question.d.ts.map +1 -0
  18. package/dist/lib/research-gate.d.ts +97 -0
  19. package/dist/lib/research-gate.d.ts.map +1 -0
  20. package/dist/lib/research-gate.test.d.ts +2 -0
  21. package/dist/lib/research-gate.test.d.ts.map +1 -0
  22. package/dist/mcp/index.d.ts +14 -3
  23. package/dist/mcp/index.d.ts.map +1 -1
  24. package/dist/services/codegraph.d.ts +36 -0
  25. package/dist/services/codegraph.d.ts.map +1 -0
  26. package/dist/services/codegraph.test.d.ts +2 -0
  27. package/dist/services/codegraph.test.d.ts.map +1 -0
  28. package/dist/services/command-validator.d.ts +11 -0
  29. package/dist/services/command-validator.d.ts.map +1 -1
  30. package/dist/services/preflight-explorer.d.ts +130 -0
  31. package/dist/services/preflight-explorer.d.ts.map +1 -0
  32. package/dist/services/preflight-explorer.test.d.ts +25 -0
  33. package/dist/services/preflight-explorer.test.d.ts.map +1 -0
  34. package/dist/services/question-guard.d.ts +96 -0
  35. package/dist/services/question-guard.d.ts.map +1 -0
  36. package/dist/services/quick-router.d.ts +40 -1
  37. package/dist/services/quick-router.d.ts.map +1 -1
  38. package/dist/services/recommended-question.test.d.ts +2 -0
  39. package/dist/services/recommended-question.test.d.ts.map +1 -0
  40. package/dist/services/supervisor-binding.d.ts +3 -1
  41. package/dist/services/supervisor-binding.d.ts.map +1 -1
  42. package/dist/tools/codebase-index.d.ts +30 -0
  43. package/dist/tools/codebase-index.d.ts.map +1 -0
  44. package/dist/tools/codebase-index.test.d.ts +2 -0
  45. package/dist/tools/codebase-index.test.d.ts.map +1 -0
  46. package/dist/tools/codegraph-tool.d.ts +3 -0
  47. package/dist/tools/codegraph-tool.d.ts.map +1 -0
  48. package/dist/tools/planning-state-lib.d.ts +23 -0
  49. package/dist/tools/planning-state-lib.d.ts.map +1 -1
  50. package/docs/agents/index.md +154 -0
  51. package/docs/commands/fd-ask.md +71 -39
  52. package/docs/commands/fd-checkpoint.md +63 -8
  53. package/docs/commands/fd-deploy-check.md +166 -9
  54. package/docs/commands/fd-design.md +101 -0
  55. package/docs/commands/fd-discuss.md +87 -20
  56. package/docs/commands/fd-doctor.md +100 -13
  57. package/docs/commands/fd-done.md +215 -0
  58. package/docs/commands/fd-execute.md +104 -0
  59. package/docs/commands/fd-fix-bug.md +144 -24
  60. package/docs/commands/fd-map-codebase.md +85 -21
  61. package/docs/commands/fd-multi-repo.md +155 -40
  62. package/docs/commands/fd-new-feature.md +63 -19
  63. package/docs/commands/fd-plan.md +80 -27
  64. package/docs/commands/fd-quick.md +143 -29
  65. package/docs/commands/fd-reflect.md +81 -13
  66. package/docs/commands/fd-resume.md +65 -8
  67. package/docs/commands/fd-status.md +80 -12
  68. package/docs/commands/fd-suggest.md +114 -0
  69. package/docs/commands/fd-translate-intent.md +69 -9
  70. package/docs/commands/fd-verify.md +71 -14
  71. package/docs/commands/fd-write-docs.md +121 -8
  72. package/docs/concepts/architecture.md +163 -0
  73. package/docs/concepts/governance.md +242 -0
  74. package/docs/concepts/intelligence.md +145 -0
  75. package/docs/concepts/multi-repo.md +227 -0
  76. package/docs/concepts/workflows.md +205 -0
  77. package/docs/configuration/index.md +208 -0
  78. package/docs/configuration/opencode-settings.md +98 -0
  79. package/docs/getting-started/first-project.md +126 -0
  80. package/docs/getting-started/installation.md +73 -0
  81. package/docs/getting-started/quick-start.md +74 -0
  82. package/docs/index.md +36 -72
  83. package/docs/reference/hooks.md +176 -0
  84. package/docs/reference/rules.md +109 -0
  85. package/docs/skills/code-review.md +47 -0
  86. package/docs/skills/index.md +148 -0
  87. package/docs/skills/planning.md +39 -0
  88. package/package.json +1 -1
  89. package/src/commands/fd-deploy-check.md +2 -2
  90. package/src/commands/fd-discuss.md +128 -7
  91. package/src/commands/fd-done.md +196 -0
  92. package/src/commands/fd-execute.md +43 -6
  93. package/src/commands/fd-fix-bug.md +43 -6
  94. package/src/commands/fd-map-codebase.md +100 -20
  95. package/src/commands/fd-multi-repo.md +1 -1
  96. package/src/commands/fd-new-feature.md +14 -5
  97. package/src/commands/fd-plan.md +38 -1
  98. package/src/commands/fd-quick.md +77 -14
  99. package/src/commands/fd-resume.md +1 -1
  100. package/src/commands/fd-status.md +1 -1
  101. package/src/commands/fd-verify.md +16 -2
  102. package/src/commands/fd-write-docs.md +30 -5
  103. package/src/rules/common/behavioral.md +63 -0
  104. package/src/skills/codebase-mapping/SKILL.md +1 -1
  105. package/src/skills/context-load/SKILL.md +1 -1
  106. package/src/skills/multi-repo/SKILL.md +1 -1
  107. package/src/skills/repo-memory-graph/SKILL.md +1 -1
  108. package/dist/hooks/memory-hook.d.ts +0 -28
  109. package/dist/hooks/memory-hook.d.ts.map +0 -1
  110. package/dist/services/memory-store.d.ts +0 -73
  111. package/dist/services/memory-store.d.ts.map +0 -1
  112. package/dist/services/memory-store.test.d.ts +0 -2
  113. package/dist/services/memory-store.test.d.ts.map +0 -1
  114. package/dist/tools/memory-search.d.ts +0 -3
  115. package/dist/tools/memory-search.d.ts.map +0 -1
  116. package/dist/tools/memory-status.d.ts +0 -3
  117. package/dist/tools/memory-status.d.ts.map +0 -1
  118. package/docs/USER_GUIDE.md +0 -20
  119. package/docs/agents.md +0 -544
  120. package/docs/best-practices.md +0 -47
  121. package/docs/commands/fd-new-project.md +0 -24
  122. package/docs/commands.md +0 -557
  123. package/docs/configuration.md +0 -325
  124. package/docs/design-first-workflow.md +0 -94
  125. package/docs/feature-integration-architecture.md +0 -227
  126. package/docs/installation.md +0 -123
  127. package/docs/intelligence.md +0 -370
  128. package/docs/memory.md +0 -69
  129. package/docs/multi-repo.md +0 -201
  130. package/docs/notifications.md +0 -170
  131. package/docs/optimization-baseline.md +0 -21
  132. package/docs/quick-start.md +0 -197
  133. package/docs/rules.md +0 -432
  134. package/docs/skills.md +0 -417
  135. package/docs/workflows.md +0 -134
  136. package/src/commands/fd-new-project.md +0 -114
@@ -1,11 +1,168 @@
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.
1
+ # /fd-deploy-check
5
2
 
6
- ## What Next?
3
+ **Purpose:** Pre-deploy safety check with test, security, and build verification.
7
4
 
8
- 1. **Fix blocking issues** → `/fd-fix-bug [issue]`
9
- 2. **Create deployment checkpoint** → `/fd-checkpoint`
10
- 3. **Review code again** → `/fd-verify`
11
- 4. **View project roadmap** → `/fd-roadmap`
5
+ ## Usage
6
+
7
+ /fd-deploy-check [--env=staging|production] [--check=deploy,review,analysis] [--scope=path]
8
+
9
+ ## Arguments
10
+
11
+ - `--env=staging|production` (optional) — target environment
12
+ - `--check=deploy|review|analysis` (optional) — type of check to run
13
+ - `deploy` (default): full pre-deployment suite
14
+ - `review`: parallel reviewer + researcher + tester on changed files
15
+ - `analysis`: comprehensive pre-change analysis
16
+ - `--scope=path` (optional) — limit scope to specific files or directories
17
+
18
+ ## What Happens
19
+
20
+ ### Deploy Check (`--check=deploy` or default)
21
+
22
+ **Step 1: Parallel Checks**
23
+
24
+ Launch four checks simultaneously:
25
+
26
+ - **Check A: Test Suite (@tester)** — runs `npm test`. All tests must pass.
27
+ - **Check B: Security Scan (@security-auditor)** — checks for hardcoded secrets, input validation at trust boundaries, auth/authz on protected routes, no CRITICAL/HIGH vulnerabilities.
28
+ - **Check C: Dependency CVE Audit** — runs `npm audit --audit-level=high`. No HIGH/CRITICAL CVEs unaddressed.
29
+ - **Check D: Build Verification** — runs `npm run build`. Build must succeed with zero errors.
30
+ - **Check E: Code Review (@reviewer)** (parallel) — security review, quality review, TDD discipline check.
31
+
32
+ **Step 2: Aggregate Results**
33
+
34
+ ```
35
+ ## Pre-Deployment Check
36
+
37
+ | Check | Status | Details |
38
+ |-------|--------|---------|
39
+ | Tests | ✅ PASS / ❌ FAIL | N/N passed |
40
+ | Security | ✅ PASS / ❌ FAIL | [findings] |
41
+ | CVE Audit | ✅ PASS / ❌ FAIL | [vulnerabilities] |
42
+ | Build | ✅ PASS / ❌ FAIL | [errors] |
43
+ ```
44
+
45
+ **Step 3: Go/No-Go Decision**
46
+
47
+ - **🚀 GO** — all checks pass, proceed with deployment.
48
+ - **🛑 NO-GO** — one or more checks failed. Report required fixes.
49
+
50
+ ### Code Review (`--check=review`)
51
+
52
+ **Step 4-5: Scope and Parallel Review**
53
+
54
+ Determine scope (files changed since last commit or provided scope). Spawn three agents in parallel:
55
+ - **@reviewer** — security, quality, conventions review
56
+ - **@researcher** — best practices lookup, vulnerability context
57
+ - **@tester** — coverage check, untested paths, run existing tests
58
+
59
+ **Step 6: Aggregate Review Results**
60
+
61
+ ```
62
+ ## Code Review: <scope>
63
+
64
+ ### 🔴 CRITICAL (block merge)
65
+ - [finding with file:line and fix]
66
+
67
+ ### 🟠 HIGH (strongly recommend fix)
68
+ - [finding]
69
+
70
+ ### 🟡 MEDIUM (consider fixing)
71
+ - [finding]
72
+
73
+ ### 🟢 LOW (optional)
74
+ - [finding]
75
+
76
+ ### Coverage
77
+ - Changed files: N%
78
+ - Untested paths: [list]
79
+
80
+ ### Verdict: PASS | FAIL | PASS_WITH_NOTES
81
+ ```
82
+
83
+ ### Pre-Change Analysis (`--check=analysis`)
84
+
85
+ **Step 7: Run All Analyses in Parallel**
86
+
87
+ 1. **Impact Radar** — which files/APIs/tests are affected
88
+ 2. **Blast Radius** — downstream consequences and hidden couplings
89
+ 3. **Regression Predict** — most likely regression categories
90
+ 4. **Test Gap** — coverage gaps to fill before implementing
91
+ 5. **Volatility** — check hotspot scores on affected files
92
+ 6. **Review Route** — who should review this change
93
+
94
+ ```
95
+ ════════════════════════════════════════════════════
96
+ PRE-CHANGE ANALYSIS: "$ARGUMENTS"
97
+ ════════════════════════════════════════════════════
98
+
99
+ IMPACT (<N> files affected)
100
+ - <top 5 affected files with reason>
101
+
102
+ BLAST RADIUS (risk: <low|medium|high>)
103
+ - <key downstream risks>
104
+
105
+ REGRESSIONS (top 3 risks)
106
+ 🔴 <category> — <reason>
107
+ 🟠 <category> — <reason>
108
+
109
+ TEST GAPS (<N> gaps found)
110
+ - CRITICAL: <gap>
111
+ - HIGH: <gap>
112
+
113
+ VOLATILITY
114
+ Hot zones touched: <list or "none">
115
+
116
+ REVIEW ROUTING
117
+ → <reviewer type> (<reason>)
118
+
119
+ ────────────────────────────────────────────────────
120
+ RECOMMENDATION: <proceed | add tests first | redesign | review required>
121
+
122
+ Next steps:
123
+ 1. <most important action>
124
+ 2. <second action>
125
+ ════════════════════════════════════════════════════
126
+ ```
127
+
128
+ ## No-Go Conditions
129
+
130
+ Automatic NO-GO if any of:
131
+ - Test failures
132
+ - CRITICAL security vulnerability
133
+ - HIGH/CRITICAL CVE unpatched
134
+ - Build error
135
+
136
+ ## Output / State
137
+
138
+ For deploy: aggregated check results with GO/NO-GO verdict.
139
+ For review: findings by severity with verdict.
140
+ For analysis: consolidated analysis report with recommendations.
141
+
142
+ ## Examples
143
+
144
+ **Full pre-deployment check:**
145
+ ```
146
+ /fd-deploy-check
147
+ ```
148
+
149
+ **Code review on specific scope:**
150
+ ```
151
+ /fd-deploy-check --check=review --scope=src/auth
152
+ ```
153
+
154
+ **Pre-change analysis:**
155
+ ```
156
+ /fd-deploy-check --check=analysis --scope=src/api
157
+ ```
158
+
159
+ **Target staging environment:**
160
+ ```
161
+ /fd-deploy-check --env=staging
162
+ ```
163
+
164
+ ## Related Commands
165
+
166
+ - `/fd-verify` — full verification suite
167
+ - `/fd-fix-bug` — fix issues found during check
168
+ - `/fd-status` — review current project state
@@ -0,0 +1,101 @@
1
+ # /fd-design
2
+
3
+ **Purpose:** Design-first workflow for UI-heavy features, including draft, review, and design system modes.
4
+
5
+ ## Usage
6
+
7
+ /fd-design [--mode=draft|review|system] [task-description] [--override]
8
+
9
+ ## Arguments
10
+
11
+ - `--mode=draft|review|system` (optional) — workflow mode, default: `draft`
12
+ - `task-description` — description of the design task
13
+ - `--override` (optional) — bypass design approval requirement (logged explicitly)
14
+
15
+ ## What Happens
16
+
17
+ ### Mode: draft
18
+
19
+ Use when creating or updating UI before implementation.
20
+
21
+ **Required Stages:**
22
+ 1. discovery
23
+ 2. UX planning
24
+ 3. wireframe/layout planning
25
+ 4. visual system definition
26
+ 5. design approval
27
+ 6. implementation handoff
28
+
29
+ **Process:**
30
+ 1. Classify task as UI-heavy (landing page, dashboard, admin panel, app screen, website/app UX)
31
+ 2. Delegate to `@design` agent for structured artifacts
32
+ 3. Persist outputs in planning state under `design_artifact`
33
+ 4. Mark:
34
+ - `requires_design_first: true`
35
+ - `design_stage: handoff_complete`
36
+ - `design_approved: true` only when approval criteria are met
37
+ 5. Record any bypass with explicit `design_override_reason`
38
+
39
+ ### Mode: review
40
+
41
+ Use to review implemented UI against approved design artifact.
42
+
43
+ **Process:**
44
+ 1. Load approved design artifact and changed UI files
45
+ 2. Delegate to `@design` with `design-audit` + `responsive-review`
46
+ 3. Report:
47
+ - design mismatches
48
+ - hierarchy/spacing issues
49
+ - CTA flow weaknesses
50
+ - responsive/accessibility concerns
51
+ - missing empty/error/loading/success states
52
+
53
+ ### Mode: system
54
+
55
+ Use to generate or update design tokens and component behavior rules.
56
+
57
+ **Process:**
58
+ 1. Delegate to `@design` with `design-system-definition`
59
+ 2. Generate/update token guidance and component rules
60
+ 3. Save summary in planning state `design_artifact.design_tokens_guidance`
61
+
62
+ ## Enforcement Notes
63
+
64
+ - UI-heavy tasks must complete design approval before `/fd-execute`, unless `--override` is explicitly provided and logged
65
+ - Backend-only/infrastructure-only tasks skip this command
66
+
67
+ ## Output / State
68
+
69
+ - `design_artifact` persisted in planning state
70
+ - `requires_design_first: true` set in STATE.md
71
+ - `design_stage: handoff_complete` when draft complete
72
+ - `design_approved: true` when approval criteria met
73
+
74
+ ## Examples
75
+
76
+ **Draft a new UI:**
77
+ ```
78
+ /fd-design "Create a user profile page with avatar upload and bio editing"
79
+ ```
80
+
81
+ **Review implemented UI against design:**
82
+ ```
83
+ /fd-design --mode=review
84
+ ```
85
+
86
+ **Generate design system tokens:**
87
+ ```
88
+ /fd-design --mode=system
89
+ ```
90
+
91
+ **Bypass design (with explicit logging):**
92
+ ```
93
+ /fd-design "Quick UI change" --override
94
+ ```
95
+
96
+ ## Related Commands
97
+
98
+ - `/fd-execute` — implementation (must wait for design approval for UI-heavy tasks)
99
+ - `/fd-discuss` — explore design requirements before starting
100
+ - `/fd-plan` — plan the implementation after design is approved
101
+ - `/fd-quick` — run full workflow including design for UI-heavy tasks
@@ -1,28 +1,95 @@
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
- ---
1
+ # /fd-discuss
5
2
 
6
- Load the FlowDeck discuss workflow for the current (or specified) phase.
3
+ **Purpose:** Structured pre-planning Q&A to capture decisions about scope, constraints, acceptance criteria, risks, and UI classification — saves decisions to DISCUSS.md with D-XX numbering.
7
4
 
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`
5
+ ## Usage
14
6
 
15
- **Output:** A DISCUSS.md file with locked decisions that guide the planner and coder.
7
+ /fd-discuss [topic]
16
8
 
17
- **Next step after this:** Run `/fd-plan` to create the implementation plan.
9
+ ## What Happens
18
10
 
19
- ## What Next?
11
+ 1. **Pre-flight checks.**
12
+ - Verify `.planning/STATE.md` exists (error: "No active feature. Run `/fd-map-codebase` then `/fd-new-feature` to start a feature.")
13
+ - Read current phase N from STATE.md
14
+ - Create `.planning/phases/phase-<N>/` directory if needed
20
15
 
21
- After discussion completes, choose your next step:
16
+ 2. **CodeGraph intelligence check.**
17
+ - Run `codegraph action=check`
18
+ - If indexed and fresh: use `codegraph_context`, `codegraph_search`, `codegraph_explore` for preflight exploration
19
+ - If stale or unavailable: fall back to `@code-explorer` for codebase exploration
20
+ - Log which mode is active
22
21
 
23
- 1. **Create implementation plan** `/fd-plan [phase-number]`
24
- 2. **Continue discussion** `/fd-discuss [phase-number]`
25
- 3. **Review existing work** `/fd-verify`
26
- 4. **Check project dashboard** `/fd-dashboard`
22
+ 3. **Autonomous codebase exploration (before any questions).**
23
+ - Inspect PROJECT.md, STATE.md, prior DISCUSS.md files, tech stack manifests, src/ structure, and AGENTS.md/rules
24
+ - Skip questions whose answers are already determinable from the codebase
25
+ - Apply question guard: suppress any question answered by existing evidence
27
26
 
28
- Type the number or the command to proceed.
27
+ 4. **Invoke @discusser agent.**
28
+ - Agent receives project context, current phase, and full preflight exploration findings
29
+ - Asks one question per turn using the RecommendedQuestion format
30
+ - Each question is validated with `parseQuestionBlocks()` and `validateRecommendedQuestion()` before presentation
31
+
32
+ 5. **Q&A loop.**
33
+ - Questions presented one at a time covering: Scope, Constraints, Acceptance Criteria, Risks, UI Classification
34
+ - Each answer is assigned a D-XX decision number and recorded with topic, choice, and rationale
35
+ - Conflicts with prior decisions are flagged
36
+ - Loop continues until all topics covered or user says to stop early
37
+
38
+ 6. **Write DISCUSS.md.**
39
+ - Saves to `.planning/phases/phase-<N>/DISCUSS.md`
40
+ - Includes D-XX numbered decisions, suppressed questions (with evidence source), open questions, and next steps
41
+ - If UI-heavy, suggests `/fd-design --mode=draft` before `/fd-execute`
42
+
43
+ ## Output / State
44
+
45
+ File created:
46
+ - `.planning/phases/phase-<N>/DISCUSS.md`
47
+
48
+ DISCUSS.md structure:
49
+ ```markdown
50
+ # Discussion: <topic>
51
+
52
+ **Phase:** <N>
53
+ **Date:** <timestamp>
54
+ **Topic:** <topic>
55
+
56
+ ## Preflight Evidence Used
57
+ - Tech stack: <detected>
58
+ - Questions suppressed by evidence: <N>
59
+
60
+ ## Decisions
61
+ D-01: [Topic] — [Decision] ([Rationale])
62
+ ...
63
+
64
+ ## Answered Recommendations
65
+ RQ-01: [question] | User choice: [answer] | Rationale: [why]
66
+
67
+ ## Suppressed Questions
68
+ "<question>" → answered by: <evidence source>
69
+
70
+ ## Open Questions
71
+ - <unresolved items>
72
+
73
+ ## Next Steps
74
+ - Run /fd-plan to create implementation plan
75
+ ```
76
+
77
+ ## Examples
78
+
79
+ ```
80
+ /fd-discuss user authentication
81
+ ```
82
+
83
+ Runs a structured discussion on "user authentication", exploring scope, constraints, acceptance criteria, risks, and UI classification.
84
+
85
+ ```
86
+ /fd-discuss
87
+ ```
88
+
89
+ Runs a discussion with no pre-selected topic.
90
+
91
+ ## Related Commands
92
+
93
+ - `/fd-new-feature` — define the feature before discussing
94
+ - `/fd-plan` — create implementation plan from DISCUSS.md decisions
95
+ - `/fd-design` — draft UI designs if the feature is UI-heavy
@@ -1,21 +1,108 @@
1
- ---
2
- description: Check FlowDeck installation and environment health
3
- ---
1
+ # /fd-doctor
4
2
 
5
- # Doctor
3
+ **Purpose:** Check FlowDeck installation and environment health across the system.
6
4
 
7
- Check FlowDeck installation and environment health.
5
+ ## Usage
8
6
 
9
- ## Checks
7
+ /fd-doctor
8
+
9
+ ## What Happens
10
+
11
+ The command runs a series of diagnostic checks and reports status for each:
12
+
13
+ 1. **OpenCode CLI** — runs `opencode --version`. Reports the version if found, warns if not found.
14
+
15
+ 2. **FlowDeck plugin registration** — reads `~/.config/opencode/opencode.json` (or `$OPENCODE_CONFIG_DIR/opencode.json`). Checks that `@dv.nghiem/flowdeck` is present in the `plugins` array.
16
+
17
+ 3. **Workspace state** — checks whether `.planning/STATE.md` exists in the current directory. Warns (non-fatal) if missing.
18
+
19
+ 4. **Codebase map** — checks whether `.codebase/ARCHITECTURE.md` exists. Notes if missing and suggests `/fd-map-codebase`.
20
+
21
+ 5. **Planning phases** — if STATE.md exists, parses the current phase and verifies that `.planning/phases/phase-N/` directory exists.
22
+
23
+ ## Notation Legend
24
+
25
+ The report uses check box notation:
10
26
 
11
- - OpenCode CLI version
12
- - FlowDeck plugin registration
13
- - Workspace state (STATE.md)
14
- - Codebase map (ARCHITECTURE.md)
15
- - Planning phases directory
27
+ | Notation | Meaning |
28
+ |----------|---------|
29
+ | `[x]` | Pass — check succeeded |
30
+ | `[ ]` | Failure — blocks healthy status |
31
+ | `[!]` | Warning — non-blocking issue |
16
32
 
17
- ## Example
33
+ The report closes with `✅ Environment looks healthy!` if no failures, otherwise `❌ Some issues found.`
18
34
 
35
+ ## Output / State
36
+
37
+ The command produces a formatted report using check box notation:
38
+
39
+ ```
40
+ # FlowDeck Doctor Report
41
+
42
+ - [x] OpenCode detected: <version>
43
+ - [x] FlowDeck registered in ~/.config/opencode/opencode.json
44
+ - [x] .planning/STATE.md exists in current workspace
45
+ - [!] No .codebase/ARCHITECTURE.md found (run /fd-map-codebase)
46
+ - [x] Phase directory .planning/phases/phase-1/ exists
47
+
48
+ ✅ Environment looks healthy!
49
+ ```
50
+
51
+ Notation:
52
+ - `[x]` — pass
53
+ - `[ ]` — failure (blocks healthy status)
54
+ - `[!]` — warning (non-blocking)
55
+
56
+ The report closes with `✅ Environment looks healthy!` if no failures, otherwise `❌ Some issues found.`
57
+
58
+ ## Output Example
59
+
60
+ When running `/fd-quick "implement user login"`, the autonomous execution begins with this classification announcement:
61
+
62
+ ```
63
+ Task classified as: feature
64
+ Stage sequence: discuss → plan → execute → verify
65
+ Requires design: no
66
+ Requires TDD: yes
67
+ Evidence used: 12 items from preflight exploration
68
+
69
+ Running /fd-quick autonomously. I will proceed through each stage and pause only
70
+ if I need approval, encounter a blocker, or complete the full sequence.
71
+ ```
72
+
73
+ ## Examples
74
+
75
+ **Run diagnostics:**
19
76
  ```
20
77
  /fd-doctor
21
- ```
78
+ ```
79
+
80
+ **Sample healthy output:**
81
+ ```
82
+ # FlowDeck Doctor Report
83
+
84
+ - [x] OpenCode detected: 1.2.3
85
+ - [x] FlowDeck registered in ~/.config/opencode/opencode.json
86
+ - [x] .planning/STATE.md exists in current workspace
87
+ - [x] .codebase/ARCHITECTURE.md found
88
+ - [x] Phase directory .planning/phases/phase-1/ exists
89
+
90
+ ✅ Environment looks healthy!
91
+ ```
92
+
93
+ **Sample output with issues:**
94
+ ```
95
+ # FlowDeck Doctor Report
96
+
97
+ - [x] OpenCode detected: 1.2.3
98
+ - [ ] FlowDeck NOT registered in ~/.config/opencode/opencode.json
99
+ - [x] .planning/STATE.md exists in current workspace
100
+ - [!] No .codebase/ARCHITECTURE.md found (run /fd-map-codebase)
101
+
102
+ ❌ Some issues found.
103
+ ```
104
+
105
+ ## Related Commands
106
+
107
+ - `/fd-map-codebase` — generate .codebase/ documentation if ARCHITECTURE.md is missing
108
+ - `/fd-status` — view current project state for more detail