@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,23 +1,91 @@
1
- ---
2
- description: Post-session reflection and skill capture — analyse artifacts, propose improvements, capture session patterns
3
- argument-hint: [--mode=reflect,learn]
4
- ---
1
+ # /fd-reflect
5
2
 
6
- # Reflect
3
+ **Purpose:** Post-session reflection and skill capture — analyze session artifacts, propose improvements to FlowDeck's knowledge base, and optionally capture reusable skills from patterns discovered during the session.
7
4
 
8
- Post-session reflection to analyse artifacts and propose improvements, or capture learnings as reusable skills.
5
+ ## Usage
9
6
 
10
- ## Modes
7
+ /fd-reflect [--mode=reflect,learn]
11
8
 
12
- ### Reflect (default)
13
- Analyzes session artifacts, proposes skills/policies/workflow changes.
9
+ ## What Happens
14
10
 
15
- ### Learn (`--mode=learn`)
16
- Captures a repeatable pattern as a reusable FlowDeck skill.
11
+ ### Reflect Mode (default)
12
+
13
+ 1. **Gather artifacts.** Call the `reflect` tool to collect session artifacts and generate reflection context.
14
+
15
+ 2. **Analyze the session.**
16
+ - Which tools were called most often? Any redundant calls?
17
+ - Which decisions were made? Do they reveal a repeatable pattern?
18
+ - Were there failures? What caused them?
19
+ - What knowledge was absent and had to be worked out from scratch?
20
+
21
+ 3. **Produce improvement proposals.**
22
+ - **New skill** → call `create-skill` to capture it in `src/skills/`
23
+ - **Policy** → propose a new entry in `.codebase/POLICIES.json` for user review
24
+ - **Workflow change** → note it clearly for user to decide
25
+
26
+ 4. **Execute skill creation** for any new skills identified.
27
+
28
+ 5. **Final report.** Provide:
29
+ - What was captured (new skills created)
30
+ - What requires human review (policy proposals, workflow changes)
31
+ - 3-5 bullet summary of the session's most impactful learnings
32
+
33
+ ### Learn Mode (`--mode=learn`)
34
+
35
+ 1. **Identify worth capturing.** Look for:
36
+ - Novel problems requiring non-obvious solutions
37
+ - Patterns that needed human guidance to resolve
38
+ - Workflows or sequences that would save time if remembered
39
+ - Pitfalls that were hit and corrected
40
+
41
+ If nothing significant was found, reply: "No new patterns to capture from this session." and stop.
42
+
43
+ 2. **Draft the skill.** Structure as:
44
+ - `## When to Activate` — concrete triggers (e.g., "when X file pattern exists", "when user asks about Y")
45
+ - `## Steps` — ordered, concrete steps to apply the skill
46
+ - `## Examples` — at least one short concrete example
47
+ - `## Pitfalls` — common mistakes to avoid
48
+
49
+ 3. **Choose a name.** Use `$ARGUMENTS` if provided as skill name; otherwise derive a kebab-case name from the pattern.
50
+
51
+ 4. **Write the skill** using the `create-skill` tool with:
52
+ - `name`: kebab-case identifier
53
+ - `description`: one sentence summary
54
+ - `content`: full Markdown body
55
+ - `tags`: 2-4 relevant tags
56
+
57
+ 5. **Report** what was captured, why it is useful, and remind the user to restart OpenCode to activate it.
58
+
59
+ ## Output / State
60
+
61
+ Files created (Learn mode):
62
+ - `src/skills/<name>.md` — new skill file
63
+
64
+ Files modified (Reflect mode):
65
+ - `.codebase/POLICIES.json` — proposed policy entries (user review needed)
17
66
 
18
67
  ## Examples
19
68
 
20
69
  ```
21
70
  /fd-reflect
22
- /fd-reflect --mode=learn auth-pattern
23
- ```
71
+ ```
72
+
73
+ Run post-session reflection and produce improvement proposals.
74
+
75
+ ```
76
+ /fd-reflect --mode=learn
77
+ ```
78
+
79
+ Capture the most significant pattern from this session as a reusable skill.
80
+
81
+ ```
82
+ /fd-reflect --mode=learn api-error-handling
83
+ ```
84
+
85
+ Capture the session pattern as a skill named "api-error-handling".
86
+
87
+ ## Related Commands
88
+
89
+ - `/fd-map-codebase` — map the codebase before starting a feature
90
+ - `/fd-execute` — run implementation (reflection happens after)
91
+ - `/fd-checkpoint` — save state before ending a session
@@ -1,10 +1,67 @@
1
- ---
2
- description: Resume from last checkpoint — reloads STATE.md and PLAN.md context
3
- ---
4
- Run the FlowDeck resume workflow to reload project context and continue from where you stopped.
1
+ # /fd-resume
5
2
 
6
- ## What Next?
3
+ **Purpose:** Reload STATE.md, PLAN.md, and DISCUSS.md to continue an interrupted session — brief the user, PAUSE for confirmation, then resume from where work stopped.
7
4
 
8
- 1. **Continue feature work** → `/fd-new-feature [description]`
9
- 2. **View progress** → `/fd-progress`
10
- 3. **Check dashboard** → `/fd-dashboard`
5
+ ## Usage
6
+
7
+ /fd-resume [--yes]
8
+
9
+ ## What Happens
10
+
11
+ 1. **Pre-flight check.**
12
+ - Verify `.planning/STATE.md` exists — error if not ("No active feature. Run `/fd-map-codebase` then `/fd-new-feature` to start a feature.")
13
+
14
+ 2. **Read and parse STATE.md.** Extract phase, status, last_updated, plan_confirmed.
15
+
16
+ 3. **Read PLAN.md** (`.planning/phases/phase-<N>/PLAN.md`) if it exists — show preview (first 20 lines).
17
+
18
+ 4. **Read DISCUSS.md** (`.planning/phases/phase-<N>/DISCUSS.md`) if it exists — show decision count.
19
+
20
+ 5. **Present session summary:**
21
+
22
+ ```
23
+ ═══════════════════════════════════════════════
24
+ RESUMING SESSION
25
+ ═══════════════════════════════════════════════
26
+ Phase: <N> | Status: <status>
27
+ Last updated: <timestamp>
28
+ Plan confirmed: <yes/no>
29
+ Decisions: <X> from DISCUSS.md
30
+
31
+ Plan preview:
32
+ <first 10 lines of PLAN.md>
33
+ ───────────────────────────────────────────────
34
+ Type CONFIRM to resume execution from this point.
35
+ ═══════════════════════════════════════════════
36
+ ```
37
+
38
+ 6. **PAUSE for confirmation** (unless `--yes` is passed). Wait for user to type CONFIRM.
39
+
40
+ 7. **After confirmation:**
41
+ - If `plan_confirmed: true` and PLAN.md has uncompleted steps → proceed with implementation
42
+ - If no plan exists → suggest running `/fd-plan`
43
+ - Brief the user on what the next step is before starting
44
+
45
+ ## Output / State
46
+
47
+ No new files created. Resumes from existing STATE.md and PLAN.md.
48
+
49
+ ## Examples
50
+
51
+ ```
52
+ /fd-resume
53
+ ```
54
+
55
+ Show session summary and wait for CONFIRM before resuming.
56
+
57
+ ```
58
+ /fd-resume --yes
59
+ ```
60
+
61
+ Skip confirmation and immediately resume from the last checkpoint.
62
+
63
+ ## Related Commands
64
+
65
+ - `/fd-checkpoint` — save a checkpoint before closing a session
66
+ - `/fd-plan` — create a plan if no PLAN.md exists to resume
67
+ - `/fd-execute` — continue implementation (auto-triggered after CONFIRM)
@@ -1,31 +1,99 @@
1
- ---
2
- description: View project status — combined status, roadmap, workspace overview, and progress
3
- argument-hint: [--roadmap | --workspace | --phase=N]
4
- ---
1
+ # /fd-status
5
2
 
6
- # Status
3
+ **Purpose:** View project progress, roadmap phase statuses, and workspace overview — combined status display with optional detailed flags.
7
4
 
8
- View project status combining progress, roadmap, and workspace overview.
5
+ ## Usage
9
6
 
10
- ## Modes
7
+ /fd-status [--roadmap | --workspace | --phase=N]
8
+
9
+ ## What Happens
11
10
 
12
11
  ### Default (no flags)
13
- Show current phase status summary from STATE.md.
12
+
13
+ Reads `.planning/STATE.md` and displays:
14
+ ```
15
+ Phase: <N> | Status: <status> | Updated: <timestamp>
16
+ ────────────────────────────────────────────────────────────
17
+ Plan: <X> steps (<Y> complete)
18
+ Plan confirmed: <yes/no>
19
+ ```
14
20
 
15
21
  ### Roadmap (`--roadmap`)
16
- Display project roadmap with phase statuses.
22
+
23
+ Reads `.planning/ROADMAP.md` and `.planning/STATE.md` and displays:
24
+ ```
25
+ ═══════════════════════════════════════
26
+ PROJECT ROADMAP
27
+ ═══════════════════════════════════════
28
+ ✅ Phase 1: <name> — completed
29
+ 🔄 Phase 2: <name> — in progress ← current
30
+ ⏳ Phase 3: <name> — planned
31
+ ═══════════════════════════════════════
32
+ ```
17
33
 
18
34
  ### Workspace (`--workspace`)
19
- Display overview of all registered repositories.
35
+
36
+ Reads `.planning/config.json` for registered repositories and each repo's STATE.md, displaying:
37
+ ```
38
+ ════════════════════════════════════════════════════
39
+ WORKSPACE OVERVIEW
40
+ ════════════════════════════════════════════════════
41
+ frontend — Phase 2 | in_progress | Plan: ✅ | Updated: <time>
42
+ backend — Phase 3 | completed | Plan: ✅ | Updated: <time>
43
+ shared — Phase 1 | planned | Plan: ❌ | Updated: <time>
44
+ ────────────────────────────────────────────────────
45
+ Total: 3 repos | 1 in progress | 1 completed | 1 planned
46
+ ════════════════════════════════════════════════════
47
+ ```
20
48
 
21
49
  ### Phase Detail (`--phase=N`)
22
- Show detailed progress for a specific phase.
50
+
51
+ Reads the specific phase's STATE.md and PLAN.md (if exists) and displays:
52
+ ```
53
+ Phase <N> Detail
54
+ Status: <status>
55
+ Plan file: <path>
56
+ Plan confirmed: <yes/no>
57
+
58
+ Steps:
59
+ ✅ Step 1: <name> — completed
60
+ 🔄 Step 2: <name> — in progress
61
+ ⬜ Step 3: <name> — pending
62
+ ⬜ Step 4: <name> — pending
63
+ ```
64
+
65
+ ## Output / State
66
+
67
+ No files modified. Read-only display command.
23
68
 
24
69
  ## Examples
25
70
 
26
71
  ```
27
72
  /fd-status
73
+ ```
74
+
75
+ Show current phase summary.
76
+
77
+ ```
28
78
  /fd-status --roadmap
79
+ ```
80
+
81
+ Show full project roadmap with all phase statuses.
82
+
83
+ ```
29
84
  /fd-status --workspace
85
+ ```
86
+
87
+ Show overview of all registered repositories in the workspace.
88
+
89
+ ```
30
90
  /fd-status --phase=2
31
- ```
91
+ ```
92
+
93
+ Show detailed progress for phase 2.
94
+
95
+ ## Related Commands
96
+
97
+ - `/fd-map-codebase` — map the codebase (required before starting a feature)
98
+ - `/fd-execute` — advance phase status by implementing steps
99
+ - `/fd-verify` — update phase status to `verified` after full pipeline pass
@@ -0,0 +1,114 @@
1
+ # /fd-suggest
2
+
3
+ **Purpose:** Analyze the codebase and suggest high-value feature opportunities with implementation guidance.
4
+
5
+ ## Usage
6
+
7
+ /fd-suggest [--category=TYPE] [--limit=N]
8
+
9
+ ## Arguments
10
+
11
+ - `--category=TYPE` (optional) — focus on specific type: `tools`, `hooks`, `agents`, or `skills`
12
+ - `--limit=N` (optional) — number of suggestions to return (default: 5)
13
+
14
+ ## What Happens
15
+
16
+ ### Step 1: Detect Environment
17
+
18
+ Check if `.planning/` directory exists:
19
+ - If it exists: Use current project context, analyze within existing architecture
20
+ - If not: This is a standalone analysis, scan the codebase root
21
+
22
+ ### Step 2: Run Analysis Tools
23
+
24
+ Execute tools to gather insight data:
25
+
26
+ 1. **Volatility Map** — `volatility-map` tool to find high-change areas (instability signals)
27
+ 2. **Decision Trace** — `decision-trace` tool to find incomplete or TODO decisions
28
+ 3. **Failure Replay** — `failure-replay` tool to find recurring failure patterns
29
+ 4. **Codebase State** — `codebase-state` tool to get overall project structure
30
+
31
+ ### Step 3: Scan for Gaps
32
+
33
+ Analyze the codebase structure to identify gaps:
34
+
35
+ - **Tools** — Are all tool categories covered? (planning, state, execution, analysis)
36
+ - **Hooks** — Are lifecycle hooks comprehensive?
37
+ - **Agents** — Are agent types sufficient for common tasks?
38
+ - **Skills** — Are there skill coverage gaps for major frameworks?
39
+
40
+ ### Step 4: Generate Suggestions
41
+
42
+ For each valid suggestion (up to --limit), produce:
43
+ ```
44
+ ## Suggestion N: [Feature Name]
45
+
46
+ **Category:** tools|hooks|agents|skills
47
+ **Impact:** HIGH|MEDIUM|LOW
48
+ **Complexity:** HIGH|MEDIUM|LOW
49
+
50
+ ### Problem Statement
51
+ [What issue this solves, with evidence from analysis]
52
+
53
+ ### Proposed Solution
54
+ [Brief description of the approach]
55
+
56
+ ### Implementation Steps
57
+ 1. [Step with TDD approach - write test first]
58
+ 2. [Step referencing existing patterns]
59
+ 3. [Step with integration points]
60
+
61
+ ### Files Affected
62
+ - `src/tools/xxx.ts` or `src/hooks/xxx.ts` or `src/agents/xxx.ts`
63
+ - `src/skills/xxx/SKILL.md` (if applicable)
64
+ - `docs/xxx.md` (if applicable)
65
+
66
+ ### Integration
67
+ - How this connects to existing FlowDeck tools/agents
68
+ - Any new dependencies or configuration needed
69
+ ```
70
+
71
+ ### Step 5: Rank and Present
72
+
73
+ Sort suggestions by impact/complexity ratio (highest first).
74
+
75
+ ## Output / State
76
+
77
+ ```
78
+ # Feature Suggestions
79
+
80
+ Found N suggestions ranked by impact:
81
+
82
+ [Suggestions 1-N]
83
+
84
+ ---
85
+ Run /fd-discuss [topic] to start a discussion on any suggestion.
86
+ ```
87
+
88
+ ## Examples
89
+
90
+ **Get 5 feature suggestions (default):**
91
+ ```
92
+ /fd-suggest
93
+ ```
94
+
95
+ **Get 10 suggestions:**
96
+ ```
97
+ /fd-suggest --limit=10
98
+ ```
99
+
100
+ **Focus on tool gaps only:**
101
+ ```
102
+ /fd-suggest --category=tools
103
+ ```
104
+
105
+ **Find agent-related opportunities:**
106
+ ```
107
+ /fd-suggest --category=agents
108
+ ```
109
+
110
+ ## Related Commands
111
+
112
+ - `/fd-discuss` — explore any suggestion in depth
113
+ - `/fd-plan` — plan implementation of a selected suggestion
114
+ - `/fd-translate-intent` — convert a vague request into concrete options
@@ -1,17 +1,77 @@
1
- ---
2
- description: Intent-to-Change Translator — convert vague requests into 3–5 concrete, ranked implementation options with tradeoffs
3
- argument-hint: [vague intent, e.g. "make checkout faster"]
4
- ---
1
+ # /fd-translate-intent
5
2
 
6
- # Translate Intent
3
+ **Purpose:** Convert vague requests into ranked concrete implementation options with tradeoffs.
7
4
 
8
- Convert a vague or high-level request into concrete ranked implementation options with tradeoffs.
5
+ ## Usage
6
+
7
+ /fd-translate-intent [vague intent, e.g. "make checkout faster"]
8
+
9
+ ## What Happens
10
+
11
+ Run two agents in parallel:
12
+
13
+ - **@architect**: Decomposes the input into 3-5 concrete implementation options. For each option provides:
14
+ - **Name**: short label
15
+ - **Description**: what exactly would be changed
16
+ - **Files affected**: list of files/modules that would change
17
+ - **Effort**: S (hours) / M (days) / L (week+)
18
+ - **Risk**: low / medium / high
19
+ - **Tradeoffs**: pros and cons
20
+
21
+ - **@researcher**: For each option, fetches relevant codebase context — finds existing patterns, prior art, and constraints that apply
22
+
23
+ ## Output / State
24
+
25
+ Report format:
26
+ ```
27
+ ════════════════════════════════════════════
28
+ INTENT TRANSLATION: "$ARGUMENTS"
29
+ ════════════════════════════════════════════
30
+
31
+ Option 1 (Recommended): <name>
32
+ Description: <what changes>
33
+ Files: <list>
34
+ Effort: <S|M|L> | Risk: <low|med|high>
35
+ Pros: <pros>
36
+ Cons: <cons>
37
+
38
+ Option 2: <name>
39
+ ...
40
+
41
+ Option 3: <name>
42
+ ...
43
+
44
+ ────────────────────────────────────────────
45
+ Clarifying Questions:
46
+ 1. <question about unclear aspect>
47
+ 2. <question>
48
+
49
+ Assumptions Made:
50
+ - <assumption>
51
+ ════════════════════════════════════════════
52
+ ```
53
+
54
+ The command presents all options and asks: "Which option would you like to proceed with?"
9
55
 
10
56
  ## Examples
11
57
 
58
+ **Convert a vague request:**
59
+ ```
60
+ /fd-translate-intent "make checkout faster"
12
61
  ```
13
- /fd-translate-intent make checkout faster
14
- /fd-translate-intent improve auth security
62
+
63
+ **Translate a high-level request:**
15
64
  ```
65
+ /fd-translate-intent "improve auth security"
66
+ ```
67
+
68
+ **Clarify a feature direction:**
69
+ ```
70
+ /fd-translate-intent "add mobile support"
71
+ ```
72
+
73
+ ## Related Commands
16
74
 
17
- Returns 3-5 options with description, files affected, effort, risk, and tradeoffs.
75
+ - `/fd-discuss` explore the problem space before translating intent
76
+ - `/fd-plan` — plan the selected implementation option
77
+ - `/fd-execute` — execute the chosen implementation
@@ -1,18 +1,75 @@
1
- ---
2
- description: Review code quality, security, and conventions — runs parallel @reviewer + @security-auditor agents
3
- argument-hint: "[file-pattern|dir|stage number]"
4
- ---
1
+ # /fd-verify
5
2
 
6
- Run the FlowDeck code review workflow. Reviews can target:
7
- - **Specific files or directories** — `fd-verify src/services/`
8
- - **Git staged changes** — `fd-verify staged`
9
- - **Full project** — `fd-verify`
3
+ **Purpose:** Full verification pipeline after feature implementation — runs tests, code review, security scan, and deploy check; updates STATE.md to `verified` on full pass.
10
4
 
11
- ## What Next?
5
+ ## Usage
12
6
 
13
- 1. **Fix issues found** → `/fd-fix-bug [issue]`
14
- 2. **Create deployment checkpoint** → `/fd-checkpoint`
15
- 3. **Deploy to production** → `/fd-deploy-check`
16
- 4. **View project dashboard** → `/fd-dashboard`
7
+ /fd-verify [--phase=N] [--env=staging|production]
17
8
 
18
- Type the number or command to proceed.
9
+ ## What Happens
10
+
11
+ 1. **Pre-flight checks.**
12
+ - Verify `.planning/` and STATE.md exist
13
+ - Read current phase N from STATE.md
14
+ - Warn if `steps_complete` is empty (no steps executed yet)
15
+
16
+ 2. **Gather scope.**
17
+ - Collect changed files via `git diff --name-only HEAD`
18
+ - If no changes, use all files in the current phase directory
19
+ - Run `codegraph action=check` — if available, use `codegraph_impact` on changed files to surface dependent modules not caught by `git diff`
20
+
21
+ 3. **Run four checks in parallel:**
22
+
23
+ - **Tests (@tester):** `npm test` — all tests must pass, no failures or unexplained skips
24
+
25
+ - **Code Review (@reviewer):** Review all changed files — security (secrets, injection, auth gaps), quality (critical bugs, error handling, TDD discipline), conventions (naming, patterns, import style), >= 80% test coverage for changed files. If UI-heavy: design fidelity review against approved design artifact
26
+
27
+ - **UI Design Review (@design):** If UI-heavy — compare implemented UI to approved design artifact, report on hierarchy, spacing, CTA flow, responsiveness, accessibility, and missing state coverage. Fail verification on severe design fidelity mismatch
28
+
29
+ - **Security Scan (@security-auditor):** No hardcoded secrets, input validation at trust boundaries, auth/authz on all protected routes, no CRITICAL/HIGH vulnerabilities
30
+
31
+ - **Deploy Check:** `npm audit --audit-level=high` and `npm run build` — no HIGH/CRITICAL CVEs, build must succeed
32
+
33
+ 4. **Aggregate results.** Present consolidated table with pass/fail status for each check.
34
+
35
+ 5. **Go/No-Go decision.**
36
+
37
+ **VERIFIED (all checks pass):**
38
+ - Update STATE.md: `status: verified`, `last_action: "Phase N verified — all checks passed"`, `verified_at: <timestamp>`
39
+ - Report next steps (deploy, increment phase, etc.)
40
+
41
+ **NOT VERIFIED (one or more checks fail):**
42
+ - List required fixes
43
+ - Do NOT update STATE.md to verified status
44
+ - Report suggested next step (run `/fd-execute` for fixes, then `/fd-verify` again)
45
+
46
+ 6. **No-Go conditions (automatic NOT VERIFIED):** test failures, CRITICAL security vulnerability, unpatched HIGH/CRITICAL CVE, build error, CRITICAL code review finding.
47
+
48
+ ## Output / State
49
+
50
+ STATE.md on verified:
51
+ ```yaml
52
+ status: verified
53
+ last_action: "Phase N verified — all checks passed"
54
+ verified_at: "<timestamp>"
55
+ ```
56
+
57
+ ## Examples
58
+
59
+ ```
60
+ /fd-verify
61
+ ```
62
+
63
+ Run full verification pipeline for the current phase.
64
+
65
+ ```
66
+ /fd-verify --phase=2 --env=staging
67
+ ```
68
+
69
+ Verify phase 2 and run deploy check against staging environment.
70
+
71
+ ## Related Commands
72
+
73
+ - `/fd-execute` — implement the feature before verification
74
+ - `/fd-plan` — create the plan that was verified against
75
+ - `/fd-resume` — reload state after making fixes