@dv.nghiem/flowdeck 0.2.3 → 0.3.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 (100) hide show
  1. package/README.md +24 -41
  2. package/dist/hooks/memory-hook.d.ts +21 -0
  3. package/dist/hooks/memory-hook.d.ts.map +1 -0
  4. package/dist/hooks/orchestrator-guard-hook.d.ts +2 -1
  5. package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
  6. package/dist/hooks/todo-hook.d.ts +1 -7
  7. package/dist/hooks/todo-hook.d.ts.map +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +649 -310
  10. package/dist/services/memory-store.d.ts +40 -0
  11. package/dist/services/memory-store.d.ts.map +1 -0
  12. package/dist/services/telemetry.d.ts +1 -1
  13. package/dist/services/telemetry.d.ts.map +1 -1
  14. package/dist/tools/memory-search.d.ts +3 -0
  15. package/dist/tools/memory-search.d.ts.map +1 -0
  16. package/docs/commands/fd-doctor.md +21 -0
  17. package/docs/commands/fd-quick.md +33 -0
  18. package/docs/commands/fd-reflect.md +23 -0
  19. package/docs/commands/fd-status.md +31 -0
  20. package/docs/commands/fd-translate-intent.md +17 -0
  21. package/docs/commands.md +209 -271
  22. package/docs/configuration.md +2 -1
  23. package/docs/index.md +22 -28
  24. package/docs/memory.md +69 -0
  25. package/docs/quick-start.md +1 -1
  26. package/docs/workflows.md +72 -320
  27. package/package.json +1 -2
  28. package/src/commands/fd-deploy-check.md +189 -34
  29. package/src/commands/fd-discuss.md +44 -6
  30. package/src/commands/fd-fix-bug.md +47 -20
  31. package/src/commands/fd-map-codebase.md +66 -18
  32. package/src/commands/fd-multi-repo.md +130 -6
  33. package/src/commands/fd-new-feature.md +164 -21
  34. package/src/commands/fd-new-project.md +14 -1
  35. package/src/commands/fd-plan.md +66 -44
  36. package/src/commands/fd-quick.md +60 -0
  37. package/src/commands/fd-reflect.md +41 -2
  38. package/src/commands/fd-status.md +84 -0
  39. package/src/commands/fd-write-docs.md +55 -23
  40. package/src/rules/README.md +8 -7
  41. package/src/skills/agent-harness-construction/SKILL.md +227 -0
  42. package/src/skills/api-design/SKILL.md +5 -0
  43. package/src/skills/backend-patterns/SKILL.md +105 -0
  44. package/src/skills/clean-architecture/SKILL.md +85 -0
  45. package/src/skills/cqrs/SKILL.md +230 -0
  46. package/src/skills/ddd-architecture/SKILL.md +104 -0
  47. package/src/skills/django-patterns/SKILL.md +304 -0
  48. package/src/skills/django-tdd/SKILL.md +297 -0
  49. package/src/skills/event-driven-architecture/SKILL.md +152 -0
  50. package/src/skills/frontend-pattern/SKILL.md +159 -0
  51. package/src/skills/hexagonal-architecture/SKILL.md +80 -0
  52. package/src/skills/layered-architecture/SKILL.md +64 -0
  53. package/src/skills/postgres-patterns/SKILL.md +74 -0
  54. package/src/skills/python-patterns/SKILL.md +5 -0
  55. package/src/skills/saga-architecture/SKILL.md +113 -0
  56. package/dist/tools/run-parallel.d.ts +0 -4
  57. package/dist/tools/run-parallel.d.ts.map +0 -1
  58. package/docs/command-migration.md +0 -175
  59. package/docs/commands/fd-analyze-change.md +0 -107
  60. package/docs/commands/fd-dashboard.md +0 -11
  61. package/docs/commands/fd-evaluate-risk.md +0 -134
  62. package/docs/commands/fd-guarded-edit.md +0 -105
  63. package/docs/commands/fd-progress.md +0 -11
  64. package/docs/commands/fd-review-code.md +0 -29
  65. package/docs/commands/fd-roadmap.md +0 -10
  66. package/docs/commands/fd-settings.md +0 -10
  67. package/docs/parallel-execution.md +0 -227
  68. package/src/commands/fd-analyze-change.md +0 -57
  69. package/src/commands/fd-approve.md +0 -64
  70. package/src/commands/fd-blast-radius.md +0 -49
  71. package/src/commands/fd-dashboard.md +0 -57
  72. package/src/commands/fd-evaluate-risk.md +0 -62
  73. package/src/commands/fd-guarded-edit.md +0 -69
  74. package/src/commands/fd-impact-radar.md +0 -51
  75. package/src/commands/fd-learn.md +0 -36
  76. package/src/commands/fd-progress.md +0 -50
  77. package/src/commands/fd-regression-predict.md +0 -57
  78. package/src/commands/fd-review-code.md +0 -62
  79. package/src/commands/fd-review-route.md +0 -54
  80. package/src/commands/fd-roadmap.md +0 -46
  81. package/src/commands/fd-settings.md +0 -57
  82. package/src/commands/fd-test-gap.md +0 -54
  83. package/src/commands/fd-volatility-map.md +0 -64
  84. package/src/commands/fd-workspace-status.md +0 -34
  85. package/src/skills/parallel-execute/SKILL.md +0 -92
  86. package/src/workflows/debug-flow.md +0 -119
  87. package/src/workflows/deploy-check-flow.md +0 -98
  88. package/src/workflows/discuss-flow.md +0 -97
  89. package/src/workflows/execute-flow.md +0 -233
  90. package/src/workflows/execute-phase.md +0 -145
  91. package/src/workflows/fix-bug-flow.md +0 -210
  92. package/src/workflows/map-codebase-flow.md +0 -92
  93. package/src/workflows/multi-repo-flow.md +0 -226
  94. package/src/workflows/parallel-execution-flow.md +0 -236
  95. package/src/workflows/plan-flow.md +0 -126
  96. package/src/workflows/plan-phase.md +0 -101
  97. package/src/workflows/refactor-flow.md +0 -122
  98. package/src/workflows/review-code-flow.md +0 -105
  99. package/src/workflows/spec-driven-flow.md +0 -43
  100. package/src/workflows/write-docs-flow.md +0 -95
@@ -1,54 +0,0 @@
1
- ---
2
- description: Test Gap Detector — identify areas of a proposed change weakly covered by tests and suggest minimum high-value tests to add
3
- argument-hint: [change description or file paths]
4
- ---
5
-
6
- # Test Gap
7
-
8
- Identify test gaps in a proposed change and recommend the minimum high-value tests to add.
9
-
10
- **Input:** $ARGUMENTS — description of the change or specific file paths
11
-
12
- ## Steps
13
-
14
- Run two agents in parallel:
15
-
16
- - **@tester**: Find source files mentioned in `$ARGUMENTS` that have no corresponding test file; identify branches/edge cases in changed functions with no test coverage; look for missing error-path tests
17
-
18
- - **@researcher**: Check if the changed functions appear in any integration or end-to-end test; find prior test gaps in this area from git history (tests added reactively after bugs)
19
-
20
- ## Gap Scoring
21
-
22
- For each identified gap:
23
- - **CRITICAL**: public API with no test at all
24
- - **HIGH**: error handling path with no test
25
- - **MEDIUM**: business logic branch not covered
26
- - **LOW**: edge case (empty input, max values) not tested
27
-
28
- ## Report
29
-
30
- ```
31
- ════════════════════════════════════════════
32
- TEST GAP REPORT
33
- ════════════════════════════════════════════
34
- Change: <summary>
35
-
36
- Gaps Found (<N>):
37
-
38
- CRITICAL: <file> — no test file exists
39
- Suggest: <test file path> testing <what>
40
-
41
- HIGH: <function> in <file> — error path not tested
42
- Suggest: test case for <error condition>
43
-
44
- MEDIUM: <function> — branch "<condition>" not covered
45
- Suggest: test case where <condition is true>
46
-
47
- ────────────────────────────────────────────
48
- Minimum Tests to Add (prioritized):
49
- 1. <test description> — covers CRITICAL gap
50
- 2. <test description> — covers HIGH gap
51
- ════════════════════════════════════════════
52
- ```
53
-
54
- Ask: "Should I write these tests now?"
@@ -1,64 +0,0 @@
1
- ---
2
- description: Codebase Volatility Map — highlight unstable zones based on git churn, hotfix frequency, and TODO clusters. Updates .codebase/VOLATILITY.json
3
- ---
4
-
5
- # Volatility Map
6
-
7
- Generate a volatility map of the codebase to identify unstable, high-churn areas.
8
-
9
- ## Steps
10
-
11
- Run three analyses in parallel:
12
-
13
- ### 1. Git Churn (@researcher)
14
- ```bash
15
- git log --follow --format="%ad" --date=short -- <file> | wc -l
16
- ```
17
- Run for all source files (last 90 days). Identify files with the most commits.
18
-
19
- ### 2. TODO/FIXME Scan (@researcher)
20
- Scan all source files for `TODO`, `FIXME`, `HACK`, `XXX` comments. Count per file.
21
-
22
- ### 3. Hotfix Frequency (@researcher)
23
- Search git log for commit messages containing `fix`, `hotfix`, `patch`, `urgent`, `bug` (last 90 days). Count per file touched.
24
-
25
- ## Scoring
26
-
27
- For each file, compute a volatility score (0.0–1.0):
28
- - `churn_score` = commits / max_commits (normalized)
29
- - `todo_score` = todo_count / max_todos (normalized)
30
- - `hotfix_score` = hotfix_commits / max_hotfixes (normalized)
31
- - `volatility = (churn * 0.4) + (hotfix * 0.4) + (todo * 0.2)`
32
-
33
- ## Output
34
-
35
- Write results to `.codebase/VOLATILITY.json`:
36
- ```json
37
- {
38
- "generated_at": "<timestamp>",
39
- "hotspots": [
40
- { "path": "<file>", "score": 0.92, "commits": 47, "todos": 8, "hotfixes": 12 }
41
- ],
42
- "stable_zones": [
43
- { "path": "<file>", "score": 0.05 }
44
- ]
45
- }
46
- ```
47
-
48
- ## Report
49
-
50
- ```
51
- ════════════════════════════════
52
- VOLATILITY MAP
53
- ════════════════════════════════
54
- Top Hotspots:
55
- 🔴 <file> — score: 0.92 (47 commits, 12 hotfixes)
56
- 🟠 <file> — score: 0.71 (23 commits, 5 hotfixes)
57
- 🟡 <file> — score: 0.45 (15 commits, 8 TODOs)
58
-
59
- Stable Zones:
60
- 🟢 <file> — score: 0.05
61
-
62
- Saved: .codebase/VOLATILITY.json
63
- ════════════════════════════════
64
- ```
@@ -1,34 +0,0 @@
1
- ---
2
- description: Display workspace overview — all repos, their current phase, status, and progress
3
- ---
4
-
5
- # Workspace Status
6
-
7
- Display an overview of all repositories registered in the workspace.
8
-
9
- ## Steps
10
-
11
- 1. Read `.planning/config.json` for the list of registered repos.
12
- - If no repos registered, show status for the current directory only.
13
-
14
- 2. For each repo, read its `.planning/STATE.md`:
15
- - Current phase, status, last_updated
16
- - Plan confirmed flag
17
-
18
- 3. Display workspace overview:
19
-
20
- ```
21
- ════════════════════════════════════════════════════
22
- WORKSPACE OVERVIEW
23
- ════════════════════════════════════════════════════
24
- frontend — Phase 2 | in_progress | Plan: ✅ | Updated: <time>
25
- backend — Phase 3 | completed | Plan: ✅ | Updated: <time>
26
- shared — Phase 1 | planned | Plan: ❌ | Updated: <time>
27
- ────────────────────────────────────────────────────
28
- Total: 3 repos | 1 in progress | 1 completed | 1 planned
29
- ════════════════════════════════════════════════════
30
- ```
31
-
32
- 4. Highlight any repos with:
33
- - `status: blocked` → show with ⚠️
34
- - `plan_confirmed: false` + `status: in_progress` → note: "plan not confirmed"
@@ -1,92 +0,0 @@
1
- ---
2
- name: parallel-execute
3
- description: Coordinate parallel agent execution for independent workstreams. Assign tasks to specialist agents by wave, merge outputs, handle conflicts. Use when a plan has parallel tasks.
4
- origin: FlowDeck
5
- ---
6
-
7
- # Parallel Execute Skill
8
-
9
- Maximizes throughput by running independent work simultaneously. Manages waves, verifies independence, handles merge conflicts.
10
-
11
- ## When to Activate
12
-
13
- Activate when:
14
- - A plan has tasks that can run simultaneously
15
- - Multiple independent features need to be implemented
16
- - Research can happen in parallel with implementation
17
-
18
- ## Core Principles
19
-
20
- - Parallel = different files + no shared state + not dependent on each other
21
- - Always wait for an entire wave before starting the next
22
- - Conflicts mean the tasks weren't truly independent — reassign as sequential
23
- - Brief each agent completely — they are stateless
24
-
25
- ## Workflow
26
-
27
- 1. **Identify Wave 1** — tasks with no dependencies
28
- 2. **Verify independence** — confirm different files, no shared state
29
- 3. **Spawn Wave 1 simultaneously** — delegate all Wave 1 tasks at once
30
- 4. **Wait for all Wave 1** — do not start Wave 2 until all complete
31
- 5. **Check for conflicts** — compare files changed by each agent
32
- 6. **Spawn Wave 2** — tasks that depend on Wave 1 outputs
33
-
34
- ## Wave Structure Example
35
-
36
- ```
37
- Wave 1 (start simultaneously — ~2 hours):
38
- Track A: @coder implements UserModel in src/models/user.ts
39
- Track B: @researcher documents bcrypt API for password hashing
40
- Track C: @tester writes tests for UserService in src/user.test.ts
41
-
42
- [Wait for all three to complete]
43
-
44
- Wave 2 (sequential — ~2 hours):
45
- Task 2.A: @coder implements auth service using outputs from Track A + B
46
- Task 2.B: @writer documents the public API using outputs from Track A
47
-
48
- [Wait for 2.A and 2.B to complete]
49
-
50
- Wave 3 (review — 30 min):
51
- @reviewer reviews all changes together
52
- ```
53
-
54
- Timing example:
55
- - Sequential total: 6.5 hours
56
- - Parallel total: ~4.5 hours (30% faster)
57
-
58
- ## Independence Checklist
59
-
60
- Before marking tasks as parallel:
61
- - [ ] Task A and Task B touch different files
62
- - [ ] Neither task's output is needed as input by the other
63
- - [ ] Both tasks can be verified independently
64
- - [ ] If both complete correctly, integration will be straightforward
65
-
66
- ## Conflict Resolution
67
-
68
- If two agents modified the same file:
69
-
70
- ```
71
- CONFLICT: Track A and Track C both modified src/types/user.ts
72
- Resolution: Assigning @coder to reconcile both versions sequentially.
73
- Track A change: [description]
74
- Track C change: [description]
75
- ```
76
-
77
- ## Output Format
78
-
79
- ```markdown
80
- ## Parallel Execution Report
81
-
82
- ### Wave 1 Results (all must complete before Wave 2)
83
- - Track A (@coder): ✅ src/models/user.ts created
84
- - Track B (@researcher): ✅ bcrypt docs ready
85
- - Track C (@tester): ✅ 8 tests written, 8 passing
86
-
87
- ### Conflicts
88
- None detected.
89
-
90
- ### Wave 2 Starting
91
- Task 2.A: @coder building auth service with Wave 1 outputs
92
- ```
@@ -1,119 +0,0 @@
1
- ---
2
- name: debug-flow
3
- description: "Systematic debugging: reproduce → trace → write failing test → fix root cause → verify. Never suppress errors."
4
- triggers:
5
- - /debug
6
- steps:
7
- - name: reproduce
8
- agent: "@debug-specialist"
9
- action: Establish minimal reproduction case with expected vs actual behavior
10
- - name: trace
11
- agent: "@debug-specialist"
12
- action: Debug-specialist traces execution path and identifies root cause
13
- - name: write_test
14
- agent: "@tester"
15
- action: Tester writes failing regression test for the exact failure
16
- - name: fix
17
- agent: "@coder"
18
- action: Coder fixes root cause with minimal change
19
- - name: verify
20
- agent: "@tester"
21
- action: Run regression test + full suite to confirm fix
22
- ---
23
-
24
- # Debug Flow
25
-
26
- ## Purpose
27
-
28
- Diagnose and fix unexpected behavior systematically. Prevents symptom-fixing and ensures reproducibility.
29
-
30
- ## Rules
31
-
32
- - Never suppress an error to make a test pass
33
- - Fix the root cause, not the symptom
34
- - Always write a regression test before fixing
35
- - Read stack traces completely — never half-read
36
-
37
- ## Process
38
-
39
- ### Step 1: Reproduce
40
-
41
- Document the bug precisely:
42
- ```
43
- Bug: [one-line description]
44
- Steps to reproduce:
45
- 1. ...
46
- 2. ...
47
- Expected: [what should happen]
48
- Actual: [what does happen]
49
- Stack trace: [if available]
50
- ```
51
-
52
- Confirm you can reproduce it consistently before proceeding.
53
-
54
- ### Step 2: Trace
55
-
56
- Spawn `@debug-specialist` to:
57
-
58
- 1. Read the complete stack trace
59
- 2. Identify the failing function and line
60
- 3. Trace inputs backward to find where bad data enters
61
- 4. Check recent changes: `git log --oneline -10 -- <file>`
62
- 5. Identify root cause (not symptom)
63
-
64
- Common root causes:
65
- | Symptom | Look for |
66
- |---------|---------|
67
- | null/undefined error | Missing boundary check |
68
- | Wrong value | Type coercion, missing validation |
69
- | Race condition | Missing await, shared mutable state |
70
- | Auth failure | Missing middleware, wrong scope check |
71
- | Infinite loop | Missing base case, wrong termination |
72
-
73
- ### Step 3: Write Failing Test
74
-
75
- Spawn `@tester` to write a regression test:
76
- - Must FAIL on current code (RED)
77
- - Tests the exact scenario from Step 1
78
- - Isolated from other tests
79
-
80
- ```typescript
81
- test('should [expected] when [condition from bug report]', () => {
82
- // Arrange: set up the exact failing scenario
83
- // Act: call the failing code
84
- // Assert: verify expected behavior
85
- });
86
- ```
87
-
88
- ### Step 4: Fix
89
-
90
- Spawn `@coder` to:
91
- - Fix the root cause identified in Step 2
92
- - Minimum change to make the regression test pass
93
- - Do NOT touch unrelated code
94
-
95
- If the fix requires more than 20 lines: STOP, reassess scope.
96
-
97
- ### Step 5: Verify
98
-
99
- ```bash
100
- # Regression test must pass
101
- npm test -- --grep "regression test name"
102
-
103
- # Full suite must still pass
104
- npm test
105
- ```
106
-
107
- If any unrelated test breaks: the fix has unintended side effects. Investigate before proceeding.
108
-
109
- ## Output
110
-
111
- ```
112
- ## Debug Complete
113
-
114
- Bug: [description]
115
- Root cause: [specific cause]
116
- Fix: [what changed, file:line]
117
- Regression test: [test name] ✅ PASS
118
- Suite: ✅ N/N tests passing
119
- ```
@@ -1,98 +0,0 @@
1
- ---
2
- name: deploy-check-flow
3
- description: "Pre-deployment checks: parallel tests + security scan + CVE audit + build verification → go/no-go decision"
4
- triggers:
5
- - /deploy-check
6
- steps:
7
- - name: parallel_checks
8
- agent: "@parallel-coordinator"
9
- action: Run tests, security scan, CVE audit, and build in parallel
10
- - name: aggregate
11
- agent: "@orchestrator"
12
- action: Aggregate all results into a unified report
13
- - name: decision
14
- agent: "@orchestrator"
15
- action: Produce explicit go/no-go decision with required fixes if no-go
16
- ---
17
-
18
- # Deploy Check Flow
19
-
20
- ## Purpose
21
-
22
- Run a comprehensive pre-deployment check suite before releasing to production.
23
-
24
- ## Process
25
-
26
- ### Step 1: Parallel Checks
27
-
28
- Launch four checks simultaneously:
29
-
30
- **Check A: Test Suite**
31
- ```bash
32
- npm test
33
- ```
34
- All tests must pass. No failures, no skips without justification.
35
-
36
- **Check B: Security Scan**
37
-
38
- Spawn `@security-auditor` to check:
39
- - No hardcoded secrets in changed files
40
- - Input validation at trust boundaries
41
- - Auth/authz on all protected routes
42
- - No CRITICAL or HIGH vulnerabilities
43
-
44
- **Check C: Dependency CVE Audit**
45
- ```bash
46
- npm audit --audit-level=high
47
- ```
48
- No HIGH or CRITICAL CVEs unaddressed.
49
-
50
- **Check D: Build Verification**
51
- ```bash
52
- npm run build
53
- ```
54
- Build must succeed with zero errors.
55
-
56
- ### Step 2: Aggregate Results
57
-
58
- ```
59
- ## Pre-Deployment Check
60
-
61
- | Check | Status | Details |
62
- |-------|--------|---------|
63
- | Tests | ✅ PASS / ❌ FAIL | N/N passed |
64
- | Security | ✅ PASS / ❌ FAIL | [findings] |
65
- | CVE Audit | ✅ PASS / ❌ FAIL | [vulnerabilities] |
66
- | Build | ✅ PASS / ❌ FAIL | [errors] |
67
- ```
68
-
69
- ### Step 3: Decision
70
-
71
- **🚀 GO** — all checks pass, proceed with deployment.
72
-
73
- **🛑 NO-GO** — one or more checks failed:
74
- ```
75
- Verdict: NO-GO
76
-
77
- Required fixes before deploy:
78
- - [ ] [fix 1]
79
- - [ ] [fix 2]
80
-
81
- Run /deploy-check again after fixing.
82
- ```
83
-
84
- ## No-go conditions (automatic)
85
-
86
- Any of these → automatic NO-GO:
87
- - Test failures
88
- - CRITICAL security vulnerability
89
- - HIGH/CRITICAL CVE unpatched
90
- - Build error
91
-
92
- ## Agent configuration
93
-
94
- | Agent | Purpose |
95
- |-------|---------|
96
- | @tester | Run test suite |
97
- | @security-auditor | Security vulnerability scan |
98
- | @researcher | CVE research and context |
@@ -1,97 +0,0 @@
1
- ---
2
- name: discuss-flow
3
- description: "Orchestrates discuss phase (context load → @discusser Q&A → pause → decisions → save)"
4
- triggers:
5
- - /discuss
6
- steps:
7
- - name: load_context
8
- agent: "@orchestrator"
9
- priority: first
10
- action: Load PROJECT.md and current phase STATE.md
11
- - name: determine_phase
12
- agent: "@orchestrator"
13
- action: Extract current phase number from STATE.md
14
- - name: invoke_discusser
15
- agent: "@discusser"
16
- action: Spawn @discusser agent with project context
17
- - name: qa_loop
18
- agent: "@discusser"
19
- action: Discusser asks one question at a time; user responds; repeat until all topics covered
20
- - name: save_decisions
21
- agent: "@discusser"
22
- action: Write all decisions to .planning/phases/phase-N/DISCUSS.md with D-XX numbering
23
- - name: confirm_discuss
24
- agent: "@orchestrator"
25
- action: Present summary to user; require explicit confirmation before marking DISCUSS.md as confirmed
26
- ---
27
-
28
- # Discuss Flow
29
-
30
- ## Purpose
31
-
32
- Extract project requirements and decisions via structured Q&A with the @discusser agent.
33
-
34
- ## Process
35
-
36
- ### Step 1: Load Context
37
-
38
- Read `.planning/PROJECT.md` to understand the project vision and goals.
39
- Read `.planning/STATE.md` to determine the current phase and context.
40
-
41
- ### Step 2: Determine Phase
42
-
43
- Extract the current phase number from STATE.md.
44
- Decisions will be saved to `.planning/phases/phase-{N}/DISCUSS.md`.
45
-
46
- ### Step 3: Invoke Discusser
47
-
48
- Spawn @discusser agent with:
49
- - Project context (from PROJECT.md)
50
- - Current phase number
51
- - Instructions to ask ONE question per turn
52
-
53
- ### Step 4: Q&A Loop
54
-
55
- The @discusser agent asks one question at a time.
56
- After each user response:
57
- - Assign D-XX number to any new decision
58
- - Record: topic, choice, rationale
59
- - If response conflicts with previous decision, flag the conflict
60
-
61
- Continue until all required topics are covered or user says to stop early.
62
-
63
- ### Step 5: Save Decisions
64
-
65
- Save all decisions to `.planning/phases/phase-N/DISCUSS.md`:
66
- ```
67
- D-01: [Topic] — [Decision] ([Rationale])
68
- D-02: [Topic] — [Decision] ([Rationale])
69
- ...
70
- ```
71
-
72
- ### Step 6: Confirm Discuss
73
-
74
- Present summary of decisions to user.
75
- Ask for explicit confirmation: "CONFIRMED" to proceed or "REVISION NEEDED" to revisit.
76
-
77
- If user confirms:
78
- - Update STATE.md to mark DISCUSS.md as confirmed
79
- - Proceed to plan phase
80
-
81
- If user requests revision:
82
- - Return to Step 4 (Q&A loop) for the specified topics
83
-
84
- ## D-05 Compliance
85
-
86
- - Loads PROJECT.md + current phase STATE.md
87
- - Invokes @discusser agent
88
- - Saves decisions with D-XX numbering to DISCUSS.md
89
- - One question at a time (no compound questions)
90
-
91
- ## Error Handling
92
-
93
- D-03: Fail fast with clear error
94
- - If PROJECT.md not found: error with "Run /new-project first"
95
- - If STATE.md not found: error with "Project not initialized"
96
- - If @discusser fails: error with "Discusser agent unavailable"
97
- - No partial state saved on error