specdacular 0.7.1 → 0.8.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.
- package/README.md +72 -74
- package/commands/specd/continue.md +59 -0
- package/commands/specd/new.md +65 -0
- package/commands/specd/status.md +1 -1
- package/commands/specd/toolbox.md +59 -0
- package/package.json +1 -1
- package/specdacular/HELP.md +19 -16
- package/specdacular/agents/feature-researcher.md +4 -4
- package/specdacular/references/load-context.md +83 -0
- package/specdacular/references/record-decision.md +61 -0
- package/specdacular/references/select-feature.md +20 -20
- package/specdacular/references/select-phase.md +3 -3
- package/specdacular/references/spawn-research-agents.md +180 -0
- package/specdacular/references/synthesize-research.md +127 -0
- package/specdacular/references/validate-task.md +64 -0
- package/specdacular/templates/{features → tasks}/CHANGELOG.md +2 -8
- package/specdacular/templates/{features → tasks}/CONTEXT.md +6 -17
- package/specdacular/templates/tasks/DECISIONS.md +46 -0
- package/specdacular/templates/{features → tasks}/FEATURE.md +3 -3
- package/specdacular/templates/tasks/PLAN.md +91 -0
- package/specdacular/templates/tasks/RESEARCH.md +121 -0
- package/specdacular/templates/{features → tasks}/ROADMAP.md +6 -43
- package/specdacular/templates/tasks/STATE.md +93 -0
- package/specdacular/templates/tasks/config.json +15 -0
- package/specdacular/workflows/continue.md +275 -0
- package/specdacular/workflows/discuss.md +184 -0
- package/specdacular/workflows/execute.md +174 -0
- package/specdacular/workflows/new.md +299 -0
- package/specdacular/workflows/orchestrator/new.md +265 -0
- package/specdacular/workflows/orchestrator/plan.md +169 -0
- package/specdacular/workflows/plan.md +201 -0
- package/specdacular/workflows/research.md +166 -0
- package/specdacular/workflows/review.md +289 -0
- package/specdacular/workflows/status.md +17 -17
- package/commands/specd/blueprint.md +0 -64
- package/commands/specd/feature/continue.md +0 -84
- package/commands/specd/feature/new.md +0 -67
- package/commands/specd/feature/toolbox.md +0 -49
- package/specdacular/templates/blueprint/index.html +0 -110
- package/specdacular/templates/blueprint/scripts.js +0 -71
- package/specdacular/templates/blueprint/styles.css +0 -429
- package/specdacular/templates/features/DECISIONS.md +0 -109
- package/specdacular/templates/features/DEPENDENCIES.md +0 -47
- package/specdacular/templates/features/PLAN.md +0 -180
- package/specdacular/templates/features/RESEARCH.md +0 -183
- package/specdacular/templates/features/STATE.md +0 -110
- package/specdacular/templates/features/config.json +0 -20
- package/specdacular/workflows/blueprint-diagrams.md +0 -273
- package/specdacular/workflows/blueprint-wireframes.md +0 -312
- package/specdacular/workflows/blueprint.md +0 -372
- package/specdacular/workflows/continue-feature.md +0 -621
- package/specdacular/workflows/discuss-feature.md +0 -382
- package/specdacular/workflows/execute-plan.md +0 -636
- package/specdacular/workflows/insert-phase.md +0 -246
- package/specdacular/workflows/new-feature.md +0 -760
- package/specdacular/workflows/plan-feature.md +0 -691
- package/specdacular/workflows/plan-phase.md +0 -355
- package/specdacular/workflows/prepare-phase.md +0 -745
- package/specdacular/workflows/renumber-phases.md +0 -273
- package/specdacular/workflows/research-feature.md +0 -252
- package/specdacular/workflows/research-phase.md +0 -576
- package/specdacular/workflows/review-feature.md +0 -316
- package/specdacular/workflows/review-phase.md +0 -545
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Continue a task's lifecycle. Reads state, determines the next action, and either prompts (interactive), auto-advances (semi-auto), or runs everything (auto).
|
|
3
|
+
|
|
4
|
+
This is the main driver — it dispatches to discuss, research, plan, execute, and review workflows based on current state.
|
|
5
|
+
|
|
6
|
+
**Modes:**
|
|
7
|
+
- **Interactive (default):** Prompts at each stage transition
|
|
8
|
+
- **--semi-auto:** Auto-runs discuss→research→plan, pauses after each phase execution + review
|
|
9
|
+
- **--auto:** Runs everything, only stops on review issues or task completion
|
|
10
|
+
</purpose>
|
|
11
|
+
|
|
12
|
+
<process>
|
|
13
|
+
|
|
14
|
+
<step name="parse_args">
|
|
15
|
+
Parse arguments to extract task name and mode.
|
|
16
|
+
|
|
17
|
+
**Parse $ARGUMENTS:**
|
|
18
|
+
- Extract task name (first argument, or only argument without --)
|
|
19
|
+
- Check for `--semi-auto` flag
|
|
20
|
+
- Check for `--auto` flag
|
|
21
|
+
- Default mode: interactive
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Mode: {interactive | semi-auto | auto}
|
|
25
|
+
Task: {task-name}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Continue to validate.
|
|
29
|
+
</step>
|
|
30
|
+
|
|
31
|
+
<step name="validate">
|
|
32
|
+
@~/.claude/specdacular/references/validate-task.md
|
|
33
|
+
|
|
34
|
+
Use basic validation with $TASK_NAME.
|
|
35
|
+
|
|
36
|
+
Continue to load_state.
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
<step name="load_state">
|
|
40
|
+
Read current state to determine next action.
|
|
41
|
+
|
|
42
|
+
**Read:**
|
|
43
|
+
- `config.json` — stage, phases info
|
|
44
|
+
- `STATE.md` — progress checkboxes
|
|
45
|
+
- `CONTEXT.md` — gray areas remaining
|
|
46
|
+
|
|
47
|
+
**Determine current position:**
|
|
48
|
+
- stage from config.json: discussion, research, planning, execution
|
|
49
|
+
- phases.current_status: pending, executing, executed, completed
|
|
50
|
+
- Gray areas count from CONTEXT.md
|
|
51
|
+
|
|
52
|
+
Continue to determine_action.
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="determine_action">
|
|
56
|
+
Route to the appropriate action based on state.
|
|
57
|
+
|
|
58
|
+
**Routing logic:**
|
|
59
|
+
|
|
60
|
+
1. **Stage = discussion, gray areas remain:**
|
|
61
|
+
→ action_discuss
|
|
62
|
+
|
|
63
|
+
2. **Stage = discussion, no gray areas:**
|
|
64
|
+
→ action_research_or_plan
|
|
65
|
+
|
|
66
|
+
3. **Stage = research (RESEARCH.md missing):**
|
|
67
|
+
→ action_research
|
|
68
|
+
|
|
69
|
+
4. **Stage = planning (no phases exist):**
|
|
70
|
+
→ action_plan
|
|
71
|
+
|
|
72
|
+
5. **Stage = planning or execution, phases.current_status = "pending":**
|
|
73
|
+
→ action_execute
|
|
74
|
+
|
|
75
|
+
6. **Stage = execution, phases.current_status = "executing":**
|
|
76
|
+
→ action_resume_execute
|
|
77
|
+
|
|
78
|
+
7. **Stage = execution, phases.current_status = "executed":**
|
|
79
|
+
→ action_review
|
|
80
|
+
|
|
81
|
+
8. **Stage = execution, phases.current_status = "completed":**
|
|
82
|
+
Check if more phases remain:
|
|
83
|
+
- Yes → advance to next phase, → action_execute
|
|
84
|
+
- No → action_complete
|
|
85
|
+
|
|
86
|
+
Continue to the determined action step.
|
|
87
|
+
</step>
|
|
88
|
+
|
|
89
|
+
<step name="action_discuss">
|
|
90
|
+
Offer or auto-run discussion.
|
|
91
|
+
|
|
92
|
+
**Interactive mode:**
|
|
93
|
+
```
|
|
94
|
+
**Current state:** Discussion in progress
|
|
95
|
+
**Gray areas remaining:** {count}
|
|
96
|
+
|
|
97
|
+
{list gray areas}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use AskUserQuestion:
|
|
101
|
+
- header: "Next Step"
|
|
102
|
+
- question: "Want to discuss the remaining gray areas?"
|
|
103
|
+
- options:
|
|
104
|
+
- "Discuss" — Dive into gray areas (Recommended)
|
|
105
|
+
- "Skip to research" — Move on without resolving
|
|
106
|
+
- "Skip to planning" — Jump straight to planning
|
|
107
|
+
|
|
108
|
+
**Semi-auto / Auto mode:**
|
|
109
|
+
Auto-run discuss workflow.
|
|
110
|
+
|
|
111
|
+
Dispatch to: @~/.claude/specdacular/workflows/discuss.md
|
|
112
|
+
|
|
113
|
+
After completion, return to load_state (re-evaluate).
|
|
114
|
+
</step>
|
|
115
|
+
|
|
116
|
+
<step name="action_research_or_plan">
|
|
117
|
+
Offer or auto-run research (when discussion is complete but no research yet).
|
|
118
|
+
|
|
119
|
+
**Interactive mode:**
|
|
120
|
+
```
|
|
121
|
+
**Current state:** Discussion complete, no research yet
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Use AskUserQuestion:
|
|
125
|
+
- header: "Next Step"
|
|
126
|
+
- question: "Discussion looks solid. What's next?"
|
|
127
|
+
- options:
|
|
128
|
+
- "Research" — Investigate implementation patterns (Recommended)
|
|
129
|
+
- "Skip to planning" — Plan without research
|
|
130
|
+
- "Discuss more" — Continue discussion
|
|
131
|
+
|
|
132
|
+
**Semi-auto / Auto mode:**
|
|
133
|
+
Auto-run research workflow.
|
|
134
|
+
|
|
135
|
+
Dispatch to chosen workflow. After completion, return to load_state.
|
|
136
|
+
</step>
|
|
137
|
+
|
|
138
|
+
<step name="action_research">
|
|
139
|
+
Run research.
|
|
140
|
+
|
|
141
|
+
**Interactive mode:**
|
|
142
|
+
Use AskUserQuestion:
|
|
143
|
+
- header: "Next Step"
|
|
144
|
+
- question: "Ready to research implementation patterns?"
|
|
145
|
+
- options:
|
|
146
|
+
- "Research" — Run research agents (Recommended)
|
|
147
|
+
- "Skip" — Proceed without research
|
|
148
|
+
- "Discuss first" — Go back to discussion
|
|
149
|
+
|
|
150
|
+
**Semi-auto / Auto mode:**
|
|
151
|
+
Auto-run research.
|
|
152
|
+
|
|
153
|
+
Dispatch to: @~/.claude/specdacular/workflows/research.md
|
|
154
|
+
|
|
155
|
+
After completion, return to load_state.
|
|
156
|
+
</step>
|
|
157
|
+
|
|
158
|
+
<step name="action_plan">
|
|
159
|
+
Run planning.
|
|
160
|
+
|
|
161
|
+
**Interactive mode:**
|
|
162
|
+
```
|
|
163
|
+
**Current state:** Ready to plan
|
|
164
|
+
{If RESEARCH.md exists: "Research available — will inform planning"}
|
|
165
|
+
{If no RESEARCH.md: "Note: No research. Consider running /specd:research first"}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Use AskUserQuestion:
|
|
169
|
+
- header: "Next Step"
|
|
170
|
+
- question: "Ready to create execution phases?"
|
|
171
|
+
- options:
|
|
172
|
+
- "Plan" — Create phases and PLAN.md files (Recommended)
|
|
173
|
+
- "Research first" — Run research before planning
|
|
174
|
+
- "Discuss more" — Continue discussion
|
|
175
|
+
|
|
176
|
+
**Semi-auto / Auto mode:**
|
|
177
|
+
Auto-run planning.
|
|
178
|
+
|
|
179
|
+
Dispatch to: @~/.claude/specdacular/workflows/plan.md
|
|
180
|
+
|
|
181
|
+
After completion, return to load_state.
|
|
182
|
+
</step>
|
|
183
|
+
|
|
184
|
+
<step name="action_execute">
|
|
185
|
+
Execute next phase.
|
|
186
|
+
|
|
187
|
+
**Interactive mode:**
|
|
188
|
+
```
|
|
189
|
+
**Current state:** Phase {N} ready for execution
|
|
190
|
+
**Phase:** {name} — {goal}
|
|
191
|
+
**Tasks:** {count}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Use AskUserQuestion:
|
|
195
|
+
- header: "Next Step"
|
|
196
|
+
- question: "Ready to execute Phase {N}?"
|
|
197
|
+
- options:
|
|
198
|
+
- "Execute" — Start phase execution (Recommended)
|
|
199
|
+
- "Review plan" — Read the PLAN.md first
|
|
200
|
+
- "Stop for now" — Come back later
|
|
201
|
+
|
|
202
|
+
**Semi-auto mode:**
|
|
203
|
+
Auto-execute. Review will pause for user after execution.
|
|
204
|
+
|
|
205
|
+
**Auto mode:**
|
|
206
|
+
Auto-execute. Review auto-approves if clean, stops only on issues.
|
|
207
|
+
|
|
208
|
+
Dispatch to: @~/.claude/specdacular/workflows/execute.md
|
|
209
|
+
|
|
210
|
+
Execute workflow chains to review automatically. After review completes (phase approved or stopped), return to load_state.
|
|
211
|
+
</step>
|
|
212
|
+
|
|
213
|
+
<step name="action_resume_execute">
|
|
214
|
+
Resume interrupted execution.
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
**Resuming:** Phase {N} execution was interrupted
|
|
218
|
+
**Phase:** {name}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Dispatch to: @~/.claude/specdacular/workflows/execute.md
|
|
222
|
+
|
|
223
|
+
The execute workflow handles finding incomplete tasks within the phase.
|
|
224
|
+
|
|
225
|
+
After completion, return to load_state.
|
|
226
|
+
</step>
|
|
227
|
+
|
|
228
|
+
<step name="action_review">
|
|
229
|
+
Phase executed, needs review.
|
|
230
|
+
|
|
231
|
+
**Interactive mode:**
|
|
232
|
+
```
|
|
233
|
+
**Current state:** Phase {N} executed, pending review
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Dispatch to: @~/.claude/specdacular/workflows/review.md
|
|
237
|
+
|
|
238
|
+
After review completes, return to load_state.
|
|
239
|
+
|
|
240
|
+
**Semi-auto mode:**
|
|
241
|
+
Auto-trigger review. Review will prompt user for approval.
|
|
242
|
+
|
|
243
|
+
**Auto mode:**
|
|
244
|
+
Auto-trigger review. If clean, auto-approve. If issues found, stop for user.
|
|
245
|
+
</step>
|
|
246
|
+
|
|
247
|
+
<step name="action_complete">
|
|
248
|
+
All phases complete.
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
252
|
+
TASK COMPLETE
|
|
253
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
254
|
+
|
|
255
|
+
**Task:** {task-name}
|
|
256
|
+
**Phases completed:** {N}
|
|
257
|
+
**Decisions made:** {N}
|
|
258
|
+
|
|
259
|
+
All phases executed and reviewed. Task is done!
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
End workflow.
|
|
263
|
+
</step>
|
|
264
|
+
|
|
265
|
+
</process>
|
|
266
|
+
|
|
267
|
+
<success_criteria>
|
|
268
|
+
- Correctly reads state and determines next action
|
|
269
|
+
- Interactive mode prompts at each transition
|
|
270
|
+
- Semi-auto mode auto-advances through discuss→research→plan, pauses after phase execution + review
|
|
271
|
+
- Auto mode runs everything, stops only on review issues or completion
|
|
272
|
+
- Dispatches to correct workflow at each stage
|
|
273
|
+
- Loops back to state check after each workflow completes
|
|
274
|
+
- Handles all edge cases (interrupted execution, missing research, etc.)
|
|
275
|
+
</success_criteria>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Continue/deepen task discussion. Targets gray areas, records decisions, and builds understanding.
|
|
3
|
+
|
|
4
|
+
**Output:** Updated CONTEXT.md, DECISIONS.md, STATE.md
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<philosophy>
|
|
8
|
+
|
|
9
|
+
## Follow the Thread
|
|
10
|
+
|
|
11
|
+
Don't march through gray areas like a checklist. Pick the most important one, explore it, and let the conversation branch naturally.
|
|
12
|
+
|
|
13
|
+
## Four Questions Then Check
|
|
14
|
+
|
|
15
|
+
For each gray area: ask 4 focused questions, then summarize what was resolved. If clear, mark resolved. If not, continue probing.
|
|
16
|
+
|
|
17
|
+
## Decisions Get Recorded
|
|
18
|
+
|
|
19
|
+
Any decision made gets a DEC-{NNN} entry immediately — not at the end.
|
|
20
|
+
|
|
21
|
+
</philosophy>
|
|
22
|
+
|
|
23
|
+
<process>
|
|
24
|
+
|
|
25
|
+
<step name="validate">
|
|
26
|
+
@~/.claude/specdacular/references/validate-task.md
|
|
27
|
+
|
|
28
|
+
Use basic validation with $TASK_NAME from $ARGUMENTS.
|
|
29
|
+
|
|
30
|
+
Continue to load_context.
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="load_context">
|
|
34
|
+
@~/.claude/specdacular/references/load-context.md
|
|
35
|
+
|
|
36
|
+
Load required files + optional RESEARCH.md.
|
|
37
|
+
|
|
38
|
+
**Parse:**
|
|
39
|
+
- Extract gray areas remaining from CONTEXT.md
|
|
40
|
+
- Extract active decisions from DECISIONS.md
|
|
41
|
+
- Count discussion sessions from STATE.md
|
|
42
|
+
|
|
43
|
+
Continue to show_state.
|
|
44
|
+
</step>
|
|
45
|
+
|
|
46
|
+
<step name="show_state">
|
|
47
|
+
Display what's established and what needs discussion.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
51
|
+
DISCUSSION: {task-name}
|
|
52
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
53
|
+
|
|
54
|
+
**Session:** {N+1}
|
|
55
|
+
**Decisions so far:** {count}
|
|
56
|
+
|
|
57
|
+
**Gray areas to explore:**
|
|
58
|
+
{numbered list of gray areas from CONTEXT.md}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Continue to identify_focus.
|
|
62
|
+
</step>
|
|
63
|
+
|
|
64
|
+
<step name="identify_focus">
|
|
65
|
+
Pick the most impactful gray area to start with.
|
|
66
|
+
|
|
67
|
+
Choose based on:
|
|
68
|
+
1. Dependencies — does resolving this unblock other areas?
|
|
69
|
+
2. Risk — is this the area most likely to cause problems later?
|
|
70
|
+
3. User interest — did the user hint at wanting to discuss something specific?
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Let's start with: {gray area}
|
|
74
|
+
|
|
75
|
+
{Opening question that explores this area}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Continue to probe_area.
|
|
79
|
+
</step>
|
|
80
|
+
|
|
81
|
+
<step name="probe_area">
|
|
82
|
+
Explore the gray area through conversation.
|
|
83
|
+
|
|
84
|
+
**Question pattern (not rigid — follow the thread):**
|
|
85
|
+
1. Open-ended question to understand the space
|
|
86
|
+
2. Clarifying question based on response
|
|
87
|
+
3. Edge case or constraint question
|
|
88
|
+
4. Confirmation of understanding
|
|
89
|
+
|
|
90
|
+
**After 4 questions, check:**
|
|
91
|
+
```
|
|
92
|
+
So for {gray area}, it sounds like:
|
|
93
|
+
- {Summary point 1}
|
|
94
|
+
- {Summary point 2}
|
|
95
|
+
|
|
96
|
+
Is that right, or should we dig deeper?
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**If resolved:** Record any decisions, mark gray area as resolved. Move to next gray area or wrap up.
|
|
100
|
+
|
|
101
|
+
**If not resolved:** Continue probing, or defer with explicit reasoning.
|
|
102
|
+
|
|
103
|
+
Continue to record_decisions.
|
|
104
|
+
</step>
|
|
105
|
+
|
|
106
|
+
<step name="record_decisions">
|
|
107
|
+
Record any new decisions from this discussion.
|
|
108
|
+
|
|
109
|
+
@~/.claude/specdacular/references/record-decision.md
|
|
110
|
+
|
|
111
|
+
For each decision identified during the discussion, add to DECISIONS.md.
|
|
112
|
+
|
|
113
|
+
Continue to update_context.
|
|
114
|
+
</step>
|
|
115
|
+
|
|
116
|
+
<step name="update_context">
|
|
117
|
+
Update CONTEXT.md with session results.
|
|
118
|
+
|
|
119
|
+
**Add resolved questions:**
|
|
120
|
+
For each gray area that was resolved, add to the "Resolved Questions" section with question, resolution, and details.
|
|
121
|
+
|
|
122
|
+
**Update gray areas:**
|
|
123
|
+
Remove resolved items from "Gray Areas Remaining."
|
|
124
|
+
|
|
125
|
+
**Add discussion history entry:**
|
|
126
|
+
```markdown
|
|
127
|
+
| {today} | {topics covered} | {what was resolved} |
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Continue to update_state.
|
|
131
|
+
</step>
|
|
132
|
+
|
|
133
|
+
<step name="update_state">
|
|
134
|
+
Update STATE.md and config.json.
|
|
135
|
+
|
|
136
|
+
**STATE.md:**
|
|
137
|
+
- Increment discussion session in table
|
|
138
|
+
- Update gray areas checkboxes
|
|
139
|
+
- Update documents status
|
|
140
|
+
|
|
141
|
+
**config.json:**
|
|
142
|
+
- Increment `discussion_sessions`
|
|
143
|
+
- Update `decisions_count`
|
|
144
|
+
|
|
145
|
+
Continue to commit.
|
|
146
|
+
</step>
|
|
147
|
+
|
|
148
|
+
<step name="commit">
|
|
149
|
+
@~/.claude/specdacular/references/commit-docs.md
|
|
150
|
+
|
|
151
|
+
- **$FILES:** `.specd/tasks/{task-name}/CONTEXT.md .specd/tasks/{task-name}/DECISIONS.md .specd/tasks/{task-name}/STATE.md .specd/tasks/{task-name}/config.json`
|
|
152
|
+
- **$MESSAGE:** `docs({task-name}): discussion session {N}` with summary of resolved areas
|
|
153
|
+
- **$LABEL:** `discussion updates`
|
|
154
|
+
|
|
155
|
+
Continue to completion.
|
|
156
|
+
</step>
|
|
157
|
+
|
|
158
|
+
<step name="completion">
|
|
159
|
+
Present session summary.
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
163
|
+
DISCUSSION COMPLETE
|
|
164
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
165
|
+
|
|
166
|
+
**Session {N}:** {summary of what was discussed}
|
|
167
|
+
|
|
168
|
+
**Resolved:** {count} gray areas
|
|
169
|
+
**New decisions:** {count}
|
|
170
|
+
**Remaining gray areas:** {count}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
End workflow (caller handles continuation).
|
|
174
|
+
</step>
|
|
175
|
+
|
|
176
|
+
</process>
|
|
177
|
+
|
|
178
|
+
<success_criteria>
|
|
179
|
+
- Gray areas explored through conversation
|
|
180
|
+
- New decisions recorded in DECISIONS.md
|
|
181
|
+
- CONTEXT.md updated with resolutions
|
|
182
|
+
- STATE.md reflects updated progress
|
|
183
|
+
- Changes committed
|
|
184
|
+
</success_criteria>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Execute the next phase's PLAN.md. Runs tasks with verification, handles deviations, commits after each task, and automatically triggers review when the phase is complete.
|
|
3
|
+
|
|
4
|
+
**Output:** Implemented code, CHANGELOG.md entries, automatic review trigger
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<philosophy>
|
|
8
|
+
|
|
9
|
+
## One Phase at a Time
|
|
10
|
+
|
|
11
|
+
Execute one phase's PLAN.md, then review before moving on. Never skip review.
|
|
12
|
+
|
|
13
|
+
## Verify Each Task
|
|
14
|
+
|
|
15
|
+
After each task, run the verification command. If it fails, attempt to fix. If fix fails, stop and ask the user.
|
|
16
|
+
|
|
17
|
+
## Log Deviations
|
|
18
|
+
|
|
19
|
+
If implementation differs from plan, log it in CHANGELOG.md. Deviations are neutral — they might be improvements.
|
|
20
|
+
|
|
21
|
+
## Commit Granularly
|
|
22
|
+
|
|
23
|
+
Commit after each task (or logical group of closely related tasks). Small commits make review easier.
|
|
24
|
+
|
|
25
|
+
</philosophy>
|
|
26
|
+
|
|
27
|
+
<process>
|
|
28
|
+
|
|
29
|
+
<step name="validate">
|
|
30
|
+
@~/.claude/specdacular/references/validate-task.md
|
|
31
|
+
|
|
32
|
+
Use extended validation (check phases and ROADMAP exist).
|
|
33
|
+
|
|
34
|
+
Continue to load_context.
|
|
35
|
+
</step>
|
|
36
|
+
|
|
37
|
+
<step name="load_context">
|
|
38
|
+
@~/.claude/specdacular/references/load-context.md
|
|
39
|
+
|
|
40
|
+
Load all task context including phase-specific context.
|
|
41
|
+
|
|
42
|
+
**Read global config:**
|
|
43
|
+
```bash
|
|
44
|
+
cat .specd/config.json 2>/dev/null || echo '{}'
|
|
45
|
+
```
|
|
46
|
+
Check `auto_commit_code` and `auto_commit_docs` settings.
|
|
47
|
+
|
|
48
|
+
Continue to find_phase.
|
|
49
|
+
</step>
|
|
50
|
+
|
|
51
|
+
<step name="find_phase">
|
|
52
|
+
Find the next phase to execute.
|
|
53
|
+
|
|
54
|
+
**Read config.json:**
|
|
55
|
+
- `phases.current` — current phase number
|
|
56
|
+
- `phases.current_status` — pending, executing, executed, completed
|
|
57
|
+
|
|
58
|
+
**If current_status is "executed":**
|
|
59
|
+
Phase is done but not reviewed. Trigger review:
|
|
60
|
+
@~/.claude/specdacular/workflows/review.md
|
|
61
|
+
End this workflow.
|
|
62
|
+
|
|
63
|
+
**If current_status is "completed":**
|
|
64
|
+
Advance to next phase:
|
|
65
|
+
- Increment `phases.current`
|
|
66
|
+
- Set `phases.current_status` to "pending"
|
|
67
|
+
|
|
68
|
+
**Find PLAN.md:**
|
|
69
|
+
```bash
|
|
70
|
+
PHASE_DIR=".specd/tasks/$TASK_NAME/phases/phase-$(printf '%02d' $CURRENT_PHASE)"
|
|
71
|
+
[ -f "$PHASE_DIR/PLAN.md" ] || { echo "no plan"; exit 1; }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Also check for fix plans (decimal phases):**
|
|
75
|
+
```bash
|
|
76
|
+
ls -d .specd/tasks/$TASK_NAME/phases/phase-$CURRENT_PHASE.* 2>/dev/null
|
|
77
|
+
```
|
|
78
|
+
If fix plans exist and are incomplete, execute those first.
|
|
79
|
+
|
|
80
|
+
Read the PLAN.md. Parse tasks.
|
|
81
|
+
|
|
82
|
+
Continue to record_start.
|
|
83
|
+
</step>
|
|
84
|
+
|
|
85
|
+
<step name="record_start">
|
|
86
|
+
Record phase execution start.
|
|
87
|
+
|
|
88
|
+
**If status is "pending" (first time executing this phase):**
|
|
89
|
+
```bash
|
|
90
|
+
git rev-parse HEAD
|
|
91
|
+
```
|
|
92
|
+
Store as `phases.phase_start_commit` in config.json.
|
|
93
|
+
Set `phases.current_status` to "executing".
|
|
94
|
+
|
|
95
|
+
Commit config update:
|
|
96
|
+
```bash
|
|
97
|
+
git add .specd/tasks/{task-name}/config.json
|
|
98
|
+
git commit -m "docs({task-name}): start phase {N} execution"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**If status is already "executing":**
|
|
102
|
+
Resuming — phase_start_commit already recorded.
|
|
103
|
+
|
|
104
|
+
Continue to execute_tasks.
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
<step name="execute_tasks">
|
|
108
|
+
Execute each task from the PLAN.md.
|
|
109
|
+
|
|
110
|
+
**For each task:**
|
|
111
|
+
|
|
112
|
+
1. **Announce:** `Starting Task {N}: {title}`
|
|
113
|
+
|
|
114
|
+
2. **Implement:** Follow the action description. Reference codebase patterns from PATTERNS.md. Follow active decisions from DECISIONS.md.
|
|
115
|
+
|
|
116
|
+
3. **Verify:** Run the verification command from the plan.
|
|
117
|
+
- If passes: mark done, continue
|
|
118
|
+
- If fails: attempt to fix (max 2 attempts)
|
|
119
|
+
- If still fails: stop and ask user (retry/skip/stop)
|
|
120
|
+
|
|
121
|
+
4. **Log deviations:** If implementation differs from plan, add to CHANGELOG.md:
|
|
122
|
+
```markdown
|
|
123
|
+
### {date} - Phase {N} PLAN.md
|
|
124
|
+
|
|
125
|
+
**{Brief title}**
|
|
126
|
+
- **What:** {What was changed/decided}
|
|
127
|
+
- **Why:** {Reason for deviation}
|
|
128
|
+
- **Files:** `{affected files}`
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
5. **Commit:**
|
|
132
|
+
@~/.claude/specdacular/references/commit-code.md
|
|
133
|
+
- **$FILES:** files created/modified by this task
|
|
134
|
+
- **$MESSAGE:** `feat({task-name}): {task summary}`
|
|
135
|
+
|
|
136
|
+
Continue to phase_complete.
|
|
137
|
+
</step>
|
|
138
|
+
|
|
139
|
+
<step name="phase_complete">
|
|
140
|
+
Mark phase as executed and trigger review.
|
|
141
|
+
|
|
142
|
+
**Update config.json:**
|
|
143
|
+
- Set `phases.current_status` to "executed"
|
|
144
|
+
|
|
145
|
+
**Update STATE.md:**
|
|
146
|
+
- Add phase to Completed Phases table
|
|
147
|
+
- Update current phase info
|
|
148
|
+
|
|
149
|
+
**Commit state:**
|
|
150
|
+
@~/.claude/specdacular/references/commit-docs.md
|
|
151
|
+
- **$FILES:** `.specd/tasks/{task-name}/STATE.md .specd/tasks/{task-name}/config.json .specd/tasks/{task-name}/CHANGELOG.md`
|
|
152
|
+
- **$MESSAGE:** `docs({task-name}): phase {N} executed`
|
|
153
|
+
- **$LABEL:** `phase execution complete`
|
|
154
|
+
|
|
155
|
+
**Automatically trigger review:**
|
|
156
|
+
```
|
|
157
|
+
Phase {N} execution complete. Starting code review...
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
@~/.claude/specdacular/workflows/review.md
|
|
161
|
+
|
|
162
|
+
End workflow (review takes over).
|
|
163
|
+
</step>
|
|
164
|
+
|
|
165
|
+
</process>
|
|
166
|
+
|
|
167
|
+
<success_criteria>
|
|
168
|
+
- Phase PLAN.md tasks executed in order
|
|
169
|
+
- Each task verified after implementation
|
|
170
|
+
- Deviations logged in CHANGELOG.md
|
|
171
|
+
- Code committed after each task
|
|
172
|
+
- Phase marked as "executed" in config.json
|
|
173
|
+
- Review automatically triggered after completion
|
|
174
|
+
</success_criteria>
|