specdacular 0.7.2 → 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 +71 -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 +17 -15
- 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,169 @@
|
|
|
1
|
+
# Workflow: Plan Task (Orchestrator Mode)
|
|
2
|
+
|
|
3
|
+
This workflow handles planning when the task's `config.json` has `"orchestrator": true`.
|
|
4
|
+
Called from the main `plan.md` workflow after orchestrator mode detection.
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
|
|
8
|
+
- `$TASK_NAME` — Validated task name
|
|
9
|
+
- Orchestrator config and context already loaded
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
<step name="load_cross_project_context">
|
|
14
|
+
Load system-level and sub-project context.
|
|
15
|
+
|
|
16
|
+
**System-level codebase docs:**
|
|
17
|
+
- `.specd/codebase/PROJECTS.md` — Project registry
|
|
18
|
+
- `.specd/codebase/TOPOLOGY.md` — Communication patterns
|
|
19
|
+
- `.specd/codebase/CONTRACTS.md` — Shared interfaces
|
|
20
|
+
|
|
21
|
+
**Sub-project context:**
|
|
22
|
+
From task config.json `"projects"` array, for each project:
|
|
23
|
+
- Read `{project-path}/.specd/tasks/{task-name}/FEATURE.md` — Project-specific requirements
|
|
24
|
+
- Read `{project-path}/.specd/codebase/MAP.md` — Project code overview (if exists)
|
|
25
|
+
- Read `{project-path}/.specd/codebase/PATTERNS.md` — Project patterns (if exists)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Orchestrator mode: {N} projects involved in this task.
|
|
29
|
+
Loading cross-project context for phase derivation.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Continue to derive_phases.
|
|
33
|
+
</step>
|
|
34
|
+
|
|
35
|
+
<step name="derive_phases">
|
|
36
|
+
Derive phases for all involved projects in a single orchestrator pass.
|
|
37
|
+
|
|
38
|
+
**For each project, analyze:**
|
|
39
|
+
- Project's FEATURE.md requirements
|
|
40
|
+
- Project's codebase patterns
|
|
41
|
+
- Cross-project dependencies (from CONTRACTS.md, TOPOLOGY.md)
|
|
42
|
+
|
|
43
|
+
**Derive per-project phases:**
|
|
44
|
+
Apply dependency-driven phasing for each project:
|
|
45
|
+
1. Types/interfaces needed
|
|
46
|
+
2. Data layer changes
|
|
47
|
+
3. Business logic
|
|
48
|
+
4. UI components (if applicable)
|
|
49
|
+
5. Integration/wiring
|
|
50
|
+
|
|
51
|
+
Adjust per project — not all projects need all phases.
|
|
52
|
+
|
|
53
|
+
**Present consolidated view:**
|
|
54
|
+
```
|
|
55
|
+
Here's the proposed phase structure across all projects:
|
|
56
|
+
|
|
57
|
+
**{project-1}** ({N} phases):
|
|
58
|
+
Phase 1: {Name} — {Goal}
|
|
59
|
+
Phase 2: {Name} — {Goal}
|
|
60
|
+
|
|
61
|
+
**{project-2}** ({N} phases):
|
|
62
|
+
Phase 1: {Name} — {Goal}
|
|
63
|
+
|
|
64
|
+
**Cross-project dependencies (preliminary):**
|
|
65
|
+
- {project-1}/phase-1 → no cross-project deps
|
|
66
|
+
- {project-2}/phase-2 → after {project-1}/phase-2
|
|
67
|
+
|
|
68
|
+
Does this phasing make sense? Any adjustments?
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use AskUserQuestion to confirm or adjust.
|
|
72
|
+
|
|
73
|
+
Continue to write_project_roadmaps.
|
|
74
|
+
</step>
|
|
75
|
+
|
|
76
|
+
<step name="write_project_roadmaps">
|
|
77
|
+
Write ROADMAP.md for each involved sub-project.
|
|
78
|
+
|
|
79
|
+
For each project, use template at `~/.claude/specdacular/templates/tasks/ROADMAP.md`.
|
|
80
|
+
|
|
81
|
+
**IMPORTANT:** Sub-project ROADMAP.md must be self-contained. Dependencies listed are intra-project only. No references to other projects.
|
|
82
|
+
|
|
83
|
+
**Create phase directories:**
|
|
84
|
+
```bash
|
|
85
|
+
mkdir -p {project-path}/.specd/tasks/{task-name}/phases/phase-01
|
|
86
|
+
# ... for each phase
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Update sub-project STATE.md and config.json** with planning status.
|
|
90
|
+
|
|
91
|
+
Continue to build_dependency_graph.
|
|
92
|
+
</step>
|
|
93
|
+
|
|
94
|
+
<step name="build_dependency_graph">
|
|
95
|
+
Build cross-project phase dependency graph.
|
|
96
|
+
|
|
97
|
+
**Analyze:** For each phase across all projects, determine cross-project dependencies using:
|
|
98
|
+
- CONTRACTS.md — Interface creation/consumption
|
|
99
|
+
- TOPOLOGY.md — Communication patterns
|
|
100
|
+
- Per-project FEATURE.md — Integration points
|
|
101
|
+
- Per-project ROADMAP.md — Phase goals
|
|
102
|
+
|
|
103
|
+
**Present dependency table and confirm with user.**
|
|
104
|
+
|
|
105
|
+
Continue to validate_dependencies.
|
|
106
|
+
</step>
|
|
107
|
+
|
|
108
|
+
<step name="validate_dependencies">
|
|
109
|
+
Validate the dependency graph has no cycles.
|
|
110
|
+
|
|
111
|
+
**Perform topological sort.** If cycle detected, present options to user to resolve.
|
|
112
|
+
|
|
113
|
+
Continue to write_dependencies.
|
|
114
|
+
</step>
|
|
115
|
+
|
|
116
|
+
<step name="write_dependencies">
|
|
117
|
+
Write DEPENDENCIES.md in orchestrator's task folder.
|
|
118
|
+
|
|
119
|
+
Contents:
|
|
120
|
+
- Project Involvement table
|
|
121
|
+
- Phase Dependencies table (all "pending" initially)
|
|
122
|
+
- Mermaid DAG visualization
|
|
123
|
+
- Scheduling Notes
|
|
124
|
+
|
|
125
|
+
**Update orchestrator STATE.md and config.json** to stage: planned.
|
|
126
|
+
|
|
127
|
+
Continue to commit.
|
|
128
|
+
</step>
|
|
129
|
+
|
|
130
|
+
<step name="commit">
|
|
131
|
+
Commit all roadmaps and dependency graph.
|
|
132
|
+
|
|
133
|
+
@~/.claude/specdacular/references/commit-docs.md
|
|
134
|
+
|
|
135
|
+
- **$FILES:** Orchestrator DEPENDENCIES.md, STATE.md, config.json + per-project ROADMAP.md, phases/, STATE.md, config.json
|
|
136
|
+
- **$MESSAGE:** `docs({task-name}): create multi-project roadmap`
|
|
137
|
+
- **$LABEL:** `multi-project roadmap creation`
|
|
138
|
+
|
|
139
|
+
Continue to completion.
|
|
140
|
+
</step>
|
|
141
|
+
|
|
142
|
+
<step name="completion">
|
|
143
|
+
Present multi-project roadmap summary.
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
147
|
+
MULTI-PROJECT ROADMAP CREATED
|
|
148
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
149
|
+
|
|
150
|
+
**Task:** {task-name}
|
|
151
|
+
|
|
152
|
+
## Per-Project Phases
|
|
153
|
+
|
|
154
|
+
{For each project:}
|
|
155
|
+
**{project-name}** ({N} phases):
|
|
156
|
+
Phase 1: {Name} — {Goal}
|
|
157
|
+
...
|
|
158
|
+
|
|
159
|
+
## Cross-Project Dependencies
|
|
160
|
+
|
|
161
|
+
{dependency summary}
|
|
162
|
+
|
|
163
|
+
## What's Next
|
|
164
|
+
|
|
165
|
+
/specd:continue {task-name} — Start executing phases
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
End workflow.
|
|
169
|
+
</step>
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Create execution phases from task context. Derives phases based on dependencies, creates one PLAN.md per phase, and writes ROADMAP.md.
|
|
3
|
+
|
|
4
|
+
**Output:** `phases/phase-NN/PLAN.md` files, ROADMAP.md, updated STATE.md
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<philosophy>
|
|
8
|
+
|
|
9
|
+
## Small Phases
|
|
10
|
+
|
|
11
|
+
Each phase should be small and focused. One PLAN.md per phase. If a phase feels too big, split it into two phases.
|
|
12
|
+
|
|
13
|
+
## Dependencies Drive Order
|
|
14
|
+
|
|
15
|
+
Phase order follows code dependencies: types before implementations, APIs before consumers, foundations before features.
|
|
16
|
+
|
|
17
|
+
## Plans Are Self-Contained
|
|
18
|
+
|
|
19
|
+
Each PLAN.md should have enough context that the executing agent doesn't need to ask questions. Reference decisions, research, and codebase patterns.
|
|
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 all task context including RESEARCH.md if available.
|
|
37
|
+
|
|
38
|
+
**Check for orchestrator mode:**
|
|
39
|
+
Read config.json. If `"orchestrator": true`:
|
|
40
|
+
Hand off to orchestrator workflow:
|
|
41
|
+
@~/.claude/specdacular/workflows/orchestrator/plan.md
|
|
42
|
+
End main workflow.
|
|
43
|
+
|
|
44
|
+
Continue to assess_readiness.
|
|
45
|
+
</step>
|
|
46
|
+
|
|
47
|
+
<step name="assess_readiness">
|
|
48
|
+
Check if there's enough context to plan.
|
|
49
|
+
|
|
50
|
+
**Required:**
|
|
51
|
+
- FEATURE.md has specific "Must Create" items
|
|
52
|
+
- At least some gray areas resolved in CONTEXT.md
|
|
53
|
+
|
|
54
|
+
**Recommended but not required:**
|
|
55
|
+
- RESEARCH.md exists (warn if missing)
|
|
56
|
+
- All gray areas resolved
|
|
57
|
+
|
|
58
|
+
**If not ready:**
|
|
59
|
+
```
|
|
60
|
+
Not enough context to create a plan yet.
|
|
61
|
+
|
|
62
|
+
Missing:
|
|
63
|
+
- {what's missing}
|
|
64
|
+
|
|
65
|
+
Recommended next:
|
|
66
|
+
- /specd:discuss {task-name} — Resolve gray areas
|
|
67
|
+
- /specd:research {task-name} — Research implementation patterns
|
|
68
|
+
```
|
|
69
|
+
End workflow.
|
|
70
|
+
|
|
71
|
+
**If ready but RESEARCH.md missing:**
|
|
72
|
+
```
|
|
73
|
+
Note: No research findings available. Plans will be based on discussion context only.
|
|
74
|
+
Consider running /specd:research {task-name} first for better plans.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Continue to derive_phases.
|
|
78
|
+
</step>
|
|
79
|
+
|
|
80
|
+
<step name="derive_phases">
|
|
81
|
+
Break the task into ordered phases based on dependencies.
|
|
82
|
+
|
|
83
|
+
**Dependency ordering principles:**
|
|
84
|
+
1. Types/interfaces before implementations
|
|
85
|
+
2. Data models before APIs
|
|
86
|
+
3. APIs before consumers (UI, CLI)
|
|
87
|
+
4. Core before extensions
|
|
88
|
+
5. Setup before usage
|
|
89
|
+
|
|
90
|
+
**For each phase, define:**
|
|
91
|
+
- Name and one-liner goal
|
|
92
|
+
- Files to create and modify
|
|
93
|
+
- Dependencies on other phases
|
|
94
|
+
- Success criteria
|
|
95
|
+
|
|
96
|
+
**Keep phases small:**
|
|
97
|
+
- 2-5 tasks per phase
|
|
98
|
+
- Each task creates or modifies 1-3 files
|
|
99
|
+
- If a phase has >5 tasks, split it
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
mkdir -p .specd/tasks/{task-name}/phases
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Continue to write_plans.
|
|
106
|
+
</step>
|
|
107
|
+
|
|
108
|
+
<step name="write_plans">
|
|
109
|
+
Write one PLAN.md for each phase.
|
|
110
|
+
|
|
111
|
+
For each phase:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
mkdir -p .specd/tasks/{task-name}/phases/phase-$(printf '%02d' $N)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Write `phases/phase-NN/PLAN.md` using template from:
|
|
118
|
+
`~/.claude/specdacular/templates/tasks/PLAN.md`
|
|
119
|
+
|
|
120
|
+
Fill in:
|
|
121
|
+
- YAML frontmatter: task name, phase number, dependencies, creates, modifies
|
|
122
|
+
- Objective: what the phase accomplishes
|
|
123
|
+
- Context: reference codebase patterns, relevant decisions, research findings
|
|
124
|
+
- Tasks: 2-5 tasks with clear actions, verification, and done-when criteria
|
|
125
|
+
|
|
126
|
+
**Each task should include:**
|
|
127
|
+
- Files affected
|
|
128
|
+
- Clear action description
|
|
129
|
+
- Verification command
|
|
130
|
+
- Done-when checklist
|
|
131
|
+
|
|
132
|
+
Continue to write_roadmap.
|
|
133
|
+
</step>
|
|
134
|
+
|
|
135
|
+
<step name="write_roadmap">
|
|
136
|
+
Write ROADMAP.md with phase overview.
|
|
137
|
+
|
|
138
|
+
Use template from: `~/.claude/specdacular/templates/tasks/ROADMAP.md`
|
|
139
|
+
|
|
140
|
+
Fill in all phase details, success criteria, and execution order diagram.
|
|
141
|
+
|
|
142
|
+
Continue to update_state.
|
|
143
|
+
</step>
|
|
144
|
+
|
|
145
|
+
<step name="update_state">
|
|
146
|
+
Update STATE.md and config.json.
|
|
147
|
+
|
|
148
|
+
**STATE.md:**
|
|
149
|
+
- Stage: planning (or execution if ready)
|
|
150
|
+
- Mark phases derived and plans created
|
|
151
|
+
- Update documents status
|
|
152
|
+
|
|
153
|
+
**config.json:**
|
|
154
|
+
- Set `stage` to `"planning"`
|
|
155
|
+
- Set `phases.total` to phase count
|
|
156
|
+
- Set `phases.current` to 1
|
|
157
|
+
|
|
158
|
+
Continue to commit.
|
|
159
|
+
</step>
|
|
160
|
+
|
|
161
|
+
<step name="commit">
|
|
162
|
+
@~/.claude/specdacular/references/commit-docs.md
|
|
163
|
+
|
|
164
|
+
- **$FILES:** `.specd/tasks/{task-name}/ROADMAP.md .specd/tasks/{task-name}/phases/ .specd/tasks/{task-name}/STATE.md .specd/tasks/{task-name}/config.json`
|
|
165
|
+
- **$MESSAGE:** `docs({task-name}): create roadmap and phase plans` with phase summary
|
|
166
|
+
- **$LABEL:** `planning complete`
|
|
167
|
+
|
|
168
|
+
Continue to completion.
|
|
169
|
+
</step>
|
|
170
|
+
|
|
171
|
+
<step name="completion">
|
|
172
|
+
Present the plan.
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
176
|
+
PLANNING COMPLETE
|
|
177
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
178
|
+
|
|
179
|
+
**Task:** {task-name}
|
|
180
|
+
**Phases:** {N}
|
|
181
|
+
|
|
182
|
+
{For each phase:}
|
|
183
|
+
Phase {N}: {Name} — {one-liner}
|
|
184
|
+
└── PLAN.md ({task count} tasks)
|
|
185
|
+
|
|
186
|
+
**Execution order:**
|
|
187
|
+
{dependency diagram}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
End workflow (caller handles continuation).
|
|
191
|
+
</step>
|
|
192
|
+
|
|
193
|
+
</process>
|
|
194
|
+
|
|
195
|
+
<success_criteria>
|
|
196
|
+
- Phases derived from task requirements and dependencies
|
|
197
|
+
- One PLAN.md per phase with clear tasks
|
|
198
|
+
- ROADMAP.md created with phase overview
|
|
199
|
+
- STATE.md updated to planning stage
|
|
200
|
+
- Changes committed
|
|
201
|
+
</success_criteria>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Research implementation patterns for a task. Spawns three parallel agents to investigate codebase integration, external patterns, and pitfalls. Synthesizes findings into RESEARCH.md.
|
|
3
|
+
|
|
4
|
+
**Output:** `.specd/tasks/{task-name}/RESEARCH.md`, updated DECISIONS.md
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<philosophy>
|
|
8
|
+
|
|
9
|
+
## Three Dimensions
|
|
10
|
+
|
|
11
|
+
Research covers three complementary angles:
|
|
12
|
+
1. **Codebase Integration** — How this fits with existing code
|
|
13
|
+
2. **Implementation Patterns** — Standard approaches and libraries
|
|
14
|
+
3. **Pitfalls** — What commonly goes wrong
|
|
15
|
+
|
|
16
|
+
## Confidence Over Quantity
|
|
17
|
+
|
|
18
|
+
Mark findings with confidence levels. A few HIGH-confidence findings are more valuable than many LOW-confidence ones.
|
|
19
|
+
|
|
20
|
+
## Decisions From Research
|
|
21
|
+
|
|
22
|
+
When research reveals clear choices (library X over Y, pattern A over B), record them as decisions immediately.
|
|
23
|
+
|
|
24
|
+
</philosophy>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
|
|
28
|
+
<step name="validate">
|
|
29
|
+
@~/.claude/specdacular/references/validate-task.md
|
|
30
|
+
|
|
31
|
+
Use basic validation with $TASK_NAME from $ARGUMENTS.
|
|
32
|
+
|
|
33
|
+
Continue to load_context.
|
|
34
|
+
</step>
|
|
35
|
+
|
|
36
|
+
<step name="load_context">
|
|
37
|
+
@~/.claude/specdacular/references/load-context.md
|
|
38
|
+
|
|
39
|
+
Load all task context. Extract:
|
|
40
|
+
- Task description and requirements (from FEATURE.md)
|
|
41
|
+
- Active decisions/constraints (from DECISIONS.md)
|
|
42
|
+
- Technology stack (from codebase docs if available)
|
|
43
|
+
- Files to create/modify (from FEATURE.md)
|
|
44
|
+
|
|
45
|
+
**Check if RESEARCH.md already exists:**
|
|
46
|
+
```bash
|
|
47
|
+
[ -f ".specd/tasks/$TASK_NAME/RESEARCH.md" ] && echo "existing"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**If exists:**
|
|
51
|
+
Use AskUserQuestion:
|
|
52
|
+
- header: "Research Exists"
|
|
53
|
+
- question: "Research already exists. What would you like to do?"
|
|
54
|
+
- options:
|
|
55
|
+
- "Re-run research" — Generate fresh findings
|
|
56
|
+
- "View existing" — Show current RESEARCH.md
|
|
57
|
+
- "Skip" — Use existing research
|
|
58
|
+
|
|
59
|
+
Continue to spawn_agents.
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step name="spawn_agents">
|
|
63
|
+
@~/.claude/specdacular/references/spawn-research-agents.md
|
|
64
|
+
|
|
65
|
+
Prepare variables:
|
|
66
|
+
- `$TASK_NAME` — from arguments
|
|
67
|
+
- `$TASK_CONTEXT` — summary from FEATURE.md
|
|
68
|
+
- `$CONSTRAINTS` — active decisions from DECISIONS.md
|
|
69
|
+
- `$TECH_STACK` — from codebase docs (or "unknown")
|
|
70
|
+
- `$FILES_TO_CREATE` — from FEATURE.md "Must Create"
|
|
71
|
+
- `$FILES_TO_MODIFY` — from FEATURE.md "Must Integrate With"
|
|
72
|
+
|
|
73
|
+
Spawn all three agents with `run_in_background: true`.
|
|
74
|
+
|
|
75
|
+
Continue to collect_results.
|
|
76
|
+
</step>
|
|
77
|
+
|
|
78
|
+
<step name="collect_results">
|
|
79
|
+
Wait for all three agents to complete.
|
|
80
|
+
|
|
81
|
+
Read each agent's output. If an agent failed, note it but continue with available results.
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Research agents complete:
|
|
85
|
+
- Codebase Integration: {✓ | ✗}
|
|
86
|
+
- Implementation Patterns: {✓ | ✗}
|
|
87
|
+
- Pitfalls: {✓ | ✗}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Continue to synthesize.
|
|
91
|
+
</step>
|
|
92
|
+
|
|
93
|
+
<step name="synthesize">
|
|
94
|
+
@~/.claude/specdacular/references/synthesize-research.md
|
|
95
|
+
|
|
96
|
+
Combine agent outputs into `.specd/tasks/$TASK_NAME/RESEARCH.md`.
|
|
97
|
+
|
|
98
|
+
Continue to record_decisions.
|
|
99
|
+
</step>
|
|
100
|
+
|
|
101
|
+
<step name="record_decisions">
|
|
102
|
+
@~/.claude/specdacular/references/record-decision.md
|
|
103
|
+
|
|
104
|
+
If research revealed clear technology/library/pattern choices, record them as decisions.
|
|
105
|
+
|
|
106
|
+
Continue to update_state.
|
|
107
|
+
</step>
|
|
108
|
+
|
|
109
|
+
<step name="update_state">
|
|
110
|
+
Update STATE.md and config.json.
|
|
111
|
+
|
|
112
|
+
**STATE.md:**
|
|
113
|
+
- Mark research as conducted
|
|
114
|
+
- Mark RESEARCH.md as created
|
|
115
|
+
- Update decisions count
|
|
116
|
+
|
|
117
|
+
**config.json:**
|
|
118
|
+
- Update `decisions_count`
|
|
119
|
+
|
|
120
|
+
Continue to commit.
|
|
121
|
+
</step>
|
|
122
|
+
|
|
123
|
+
<step name="commit">
|
|
124
|
+
@~/.claude/specdacular/references/commit-docs.md
|
|
125
|
+
|
|
126
|
+
- **$FILES:** `.specd/tasks/{task-name}/RESEARCH.md .specd/tasks/{task-name}/DECISIONS.md .specd/tasks/{task-name}/STATE.md .specd/tasks/{task-name}/config.json`
|
|
127
|
+
- **$MESSAGE:** `docs({task-name}): research complete` with key findings summary
|
|
128
|
+
- **$LABEL:** `research findings`
|
|
129
|
+
|
|
130
|
+
Continue to completion.
|
|
131
|
+
</step>
|
|
132
|
+
|
|
133
|
+
<step name="completion">
|
|
134
|
+
Present research summary.
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
138
|
+
RESEARCH COMPLETE
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
|
|
141
|
+
**Task:** {task-name}
|
|
142
|
+
|
|
143
|
+
**Key recommendation:** {one-liner from RESEARCH.md}
|
|
144
|
+
|
|
145
|
+
**Findings:**
|
|
146
|
+
- Codebase: {brief summary}
|
|
147
|
+
- Patterns: {brief summary}
|
|
148
|
+
- Pitfalls: {brief summary}
|
|
149
|
+
|
|
150
|
+
**Confidence:** {overall level}
|
|
151
|
+
**New decisions:** {count}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
End workflow (caller handles continuation).
|
|
155
|
+
</step>
|
|
156
|
+
|
|
157
|
+
</process>
|
|
158
|
+
|
|
159
|
+
<success_criteria>
|
|
160
|
+
- Three research agents spawned and completed
|
|
161
|
+
- RESEARCH.md synthesized from agent findings
|
|
162
|
+
- Confidence levels assigned
|
|
163
|
+
- Research-driven decisions recorded in DECISIONS.md
|
|
164
|
+
- STATE.md updated
|
|
165
|
+
- Changes committed
|
|
166
|
+
</success_criteria>
|