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
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Create detailed, executable PLAN.md files for a single phase.
|
|
3
|
-
|
|
4
|
-
**Key principles:**
|
|
5
|
-
- Plans are prompts, not documents
|
|
6
|
-
- Each task references specific files with exact paths
|
|
7
|
-
- Include code patterns from codebase
|
|
8
|
-
- Verification is executable commands
|
|
9
|
-
- Tasks sized for ~15-60 min agent execution
|
|
10
|
-
|
|
11
|
-
**Output:** `plans/phase-{NN}/{NN}-PLAN.md` files for one specific phase
|
|
12
|
-
</purpose>
|
|
13
|
-
|
|
14
|
-
<philosophy>
|
|
15
|
-
|
|
16
|
-
## Plans Are Prompts
|
|
17
|
-
|
|
18
|
-
Each PLAN.md is literally what you'd send to an implementing agent. It must contain everything needed to implement without asking questions:
|
|
19
|
-
- What files to create/modify
|
|
20
|
-
- What patterns to follow (with code examples)
|
|
21
|
-
- How to verify success
|
|
22
|
-
- When the task is done
|
|
23
|
-
|
|
24
|
-
## Specificity Over Abstraction
|
|
25
|
-
|
|
26
|
-
**Bad:** "Create a component for displaying items"
|
|
27
|
-
**Good:** "Create `src/components/ItemList/index.tsx` following pattern from `src/components/UserList/index.tsx`. Must export `ItemList` component that accepts `items: Item[]` prop..."
|
|
28
|
-
|
|
29
|
-
## Task Sizing
|
|
30
|
-
|
|
31
|
-
Each plan should contain 2-3 tasks. Each task should be:
|
|
32
|
-
- Completable in 15-60 minutes of agent execution
|
|
33
|
-
- Independently verifiable
|
|
34
|
-
- Focused on related files
|
|
35
|
-
|
|
36
|
-
Too big = agent loses context. Too small = overhead exceeds value.
|
|
37
|
-
|
|
38
|
-
## Verification Is Executable
|
|
39
|
-
|
|
40
|
-
**Bad:** "Make sure it works"
|
|
41
|
-
**Good:** `npx tsc --noEmit && npm test -- --grep "ItemList"`
|
|
42
|
-
|
|
43
|
-
Every task has a verification step. If you can't verify it with a command, add a specific manual check.
|
|
44
|
-
|
|
45
|
-
## Just-in-Time Planning
|
|
46
|
-
|
|
47
|
-
Plans are created per-phase, not all at once. This means:
|
|
48
|
-
- Plans use the latest context (phase discussions, research)
|
|
49
|
-
- Earlier phases' implementations inform later plans
|
|
50
|
-
- Plans don't go stale waiting to be executed
|
|
51
|
-
|
|
52
|
-
</philosophy>
|
|
53
|
-
|
|
54
|
-
<process>
|
|
55
|
-
|
|
56
|
-
<step name="validate">
|
|
57
|
-
Validate feature exists and phase is eligible for planning.
|
|
58
|
-
|
|
59
|
-
**Parse arguments:**
|
|
60
|
-
Split $ARGUMENTS into feature-name and phase-number.
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Check feature exists
|
|
64
|
-
[ -d ".specd/features/$FEATURE_NAME" ] || { echo "Feature not found"; exit 1; }
|
|
65
|
-
|
|
66
|
-
# Check ROADMAP.md exists
|
|
67
|
-
[ -f ".specd/features/$FEATURE_NAME/ROADMAP.md" ] || { echo "No roadmap. Run /specd:feature:plan first."; exit 1; }
|
|
68
|
-
|
|
69
|
-
# Check phase directory exists
|
|
70
|
-
PHASE_DIR=".specd/features/$FEATURE_NAME/plans/phase-$(printf '%02d' $PHASE_NUMBER)"
|
|
71
|
-
[ -d "$PHASE_DIR" ] || { echo "Phase not found"; exit 1; }
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**Check phase not already executed:**
|
|
75
|
-
Read STATE.md — if this phase is marked as complete, warn user:
|
|
76
|
-
```
|
|
77
|
-
Phase {N} appears to be already executed.
|
|
78
|
-
|
|
79
|
-
Re-planning an executed phase will create new plans but existing implementation won't change.
|
|
80
|
-
|
|
81
|
-
Continue anyway?
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**If feature not found:**
|
|
85
|
-
```
|
|
86
|
-
Feature '{name}' not found.
|
|
87
|
-
|
|
88
|
-
Run /specd:feature:new {name} to create it.
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**If no roadmap:**
|
|
92
|
-
```
|
|
93
|
-
Feature '{name}' has no roadmap yet.
|
|
94
|
-
|
|
95
|
-
Run /specd:feature:plan {name} to create the roadmap.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Continue to load_context.
|
|
99
|
-
</step>
|
|
100
|
-
|
|
101
|
-
<step name="load_context">
|
|
102
|
-
Load ALL context for this phase.
|
|
103
|
-
|
|
104
|
-
**Read feature context:**
|
|
105
|
-
- `FEATURE.md` — Technical requirements
|
|
106
|
-
- `CONTEXT.md` — Feature-level resolutions
|
|
107
|
-
- `DECISIONS.md` — All active decisions
|
|
108
|
-
- `RESEARCH.md` — If exists, feature-level implementation patterns
|
|
109
|
-
- `ROADMAP.md` — Phase overview
|
|
110
|
-
|
|
111
|
-
**Read phase context:**
|
|
112
|
-
- `plans/phase-{NN}/CONTEXT.md` — If exists, phase-specific resolutions (from phase:prepare)
|
|
113
|
-
- `plans/phase-{NN}/RESEARCH.md` — If exists, phase-specific research (from phase:prepare or phase:research)
|
|
114
|
-
|
|
115
|
-
**Read codebase context (if available):**
|
|
116
|
-
- `PATTERNS.md` — Code patterns to follow
|
|
117
|
-
- `STRUCTURE.md` — Where files go
|
|
118
|
-
- `MAP.md` — System overview
|
|
119
|
-
|
|
120
|
-
**Extract key information:**
|
|
121
|
-
- Phase goal, deliverables, dependencies (from ROADMAP.md)
|
|
122
|
-
- Files to create/modify for this phase
|
|
123
|
-
- Patterns to follow (from codebase, research)
|
|
124
|
-
- Decisions affecting this phase
|
|
125
|
-
- Pitfalls to avoid (from research)
|
|
126
|
-
|
|
127
|
-
Continue to check_existing_plans.
|
|
128
|
-
</step>
|
|
129
|
-
|
|
130
|
-
<step name="check_existing_plans">
|
|
131
|
-
Check if plans already exist for this phase.
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
ls .specd/features/$FEATURE_NAME/plans/phase-$(printf '%02d' $PHASE_NUMBER)/*-PLAN.md 2>/dev/null
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**If plans exist:**
|
|
138
|
-
Show existing plans:
|
|
139
|
-
```
|
|
140
|
-
Existing plans for Phase {N}:
|
|
141
|
-
|
|
142
|
-
- {01-PLAN.md}: {objective summary}
|
|
143
|
-
- {02-PLAN.md}: {objective summary}
|
|
144
|
-
|
|
145
|
-
These will be replaced with new plans.
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Use AskUserQuestion:
|
|
149
|
-
- header: "Replace Plans"
|
|
150
|
-
- question: "Replace existing plans for this phase?"
|
|
151
|
-
- options:
|
|
152
|
-
- "Yes, replace" — Continue to break_into_tasks
|
|
153
|
-
- "Cancel" — Exit workflow
|
|
154
|
-
|
|
155
|
-
**If no plans exist:** Continue to break_into_tasks.
|
|
156
|
-
</step>
|
|
157
|
-
|
|
158
|
-
<step name="break_into_tasks">
|
|
159
|
-
Break the phase into tasks.
|
|
160
|
-
|
|
161
|
-
**From the phase's ROADMAP.md section, identify:**
|
|
162
|
-
1. Files to create (group related files into tasks)
|
|
163
|
-
2. Files to modify (group with their related new files)
|
|
164
|
-
3. Internal dependencies (order tasks)
|
|
165
|
-
|
|
166
|
-
**Task structure:**
|
|
167
|
-
- 2-3 tasks per phase
|
|
168
|
-
- Each task handles 1-3 related files
|
|
169
|
-
- Tasks ordered by internal dependencies
|
|
170
|
-
|
|
171
|
-
**Example task breakdown:**
|
|
172
|
-
|
|
173
|
-
Phase: Types & Schema
|
|
174
|
-
- Task 1: Create type definitions
|
|
175
|
-
- Task 2: Create database schema
|
|
176
|
-
|
|
177
|
-
Phase: API Layer
|
|
178
|
-
- Task 1: Create API route handlers
|
|
179
|
-
- Task 2: Create API client functions
|
|
180
|
-
|
|
181
|
-
Phase: UI Components
|
|
182
|
-
- Task 1: Create core component
|
|
183
|
-
- Task 2: Create supporting components
|
|
184
|
-
- Task 3: Create styles/tests
|
|
185
|
-
|
|
186
|
-
Continue to write_plans.
|
|
187
|
-
</step>
|
|
188
|
-
|
|
189
|
-
<step name="write_plans">
|
|
190
|
-
Write PLAN.md files for each task.
|
|
191
|
-
|
|
192
|
-
**For each plan, use template at `~/.claude/specdacular/templates/features/PLAN.md`**
|
|
193
|
-
|
|
194
|
-
**Fill in plan content:**
|
|
195
|
-
|
|
196
|
-
**Frontmatter:**
|
|
197
|
-
```yaml
|
|
198
|
-
---
|
|
199
|
-
feature: {feature-name}
|
|
200
|
-
phase: {N}
|
|
201
|
-
plan: {NN}
|
|
202
|
-
depends_on: [list of previous plan IDs]
|
|
203
|
-
creates:
|
|
204
|
-
- {exact/path/to/file.ts}
|
|
205
|
-
modifies:
|
|
206
|
-
- {exact/path/to/existing.ts}
|
|
207
|
-
---
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
**Objective:**
|
|
211
|
-
One sentence: what this accomplishes and why.
|
|
212
|
-
|
|
213
|
-
**Context:**
|
|
214
|
-
```markdown
|
|
215
|
-
**Reference these files:**
|
|
216
|
-
- `@.specd/codebase/PATTERNS.md` — Code patterns
|
|
217
|
-
- `@{path/to/pattern/file}` — Pattern to follow
|
|
218
|
-
|
|
219
|
-
**Relevant Decisions:**
|
|
220
|
-
- DEC-XXX: {Decision affecting this plan}
|
|
221
|
-
|
|
222
|
-
**From Research:** (if phase RESEARCH.md or feature RESEARCH.md exists)
|
|
223
|
-
- {Key finding}
|
|
224
|
-
- {Pitfall to avoid}
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Tasks:**
|
|
228
|
-
For each task:
|
|
229
|
-
```markdown
|
|
230
|
-
### Task N: {Title}
|
|
231
|
-
|
|
232
|
-
**Files:** `{path/to/file}`
|
|
233
|
-
|
|
234
|
-
**Action:**
|
|
235
|
-
{Clear description with enough detail to implement}
|
|
236
|
-
|
|
237
|
-
Follow pattern from `{path/to/example}`:
|
|
238
|
-
```{language}
|
|
239
|
-
// Pattern to follow
|
|
240
|
-
{actual code from codebase}
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Create:
|
|
244
|
-
```{language}
|
|
245
|
-
// What to create (scaffold or full example)
|
|
246
|
-
{code example}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
**Verify:**
|
|
250
|
-
```bash
|
|
251
|
-
{verification command}
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
**Done when:**
|
|
255
|
-
- [ ] {Specific criterion}
|
|
256
|
-
- [ ] {Specific criterion}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
**Verification section:**
|
|
260
|
-
```markdown
|
|
261
|
-
## Verification
|
|
262
|
-
|
|
263
|
-
After all tasks complete:
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
# Type check
|
|
267
|
-
npx tsc --noEmit
|
|
268
|
-
|
|
269
|
-
# Run tests
|
|
270
|
-
npm test -- --grep "{pattern}"
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**Plan complete when:**
|
|
274
|
-
- [ ] All tasks done
|
|
275
|
-
- [ ] All verifications pass
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Continue to update_roadmap.
|
|
279
|
-
</step>
|
|
280
|
-
|
|
281
|
-
<step name="update_roadmap">
|
|
282
|
-
Update ROADMAP.md to reflect that this phase is planned.
|
|
283
|
-
|
|
284
|
-
**In the phase's section of ROADMAP.md, add/update:**
|
|
285
|
-
- Plans list with summaries
|
|
286
|
-
- Mark as "Planned"
|
|
287
|
-
|
|
288
|
-
Continue to update_state.
|
|
289
|
-
</step>
|
|
290
|
-
|
|
291
|
-
<step name="update_state">
|
|
292
|
-
Update STATE.md with planning status for this phase.
|
|
293
|
-
|
|
294
|
-
**Add to STATE.md:**
|
|
295
|
-
- Planning session for phase {N} recorded
|
|
296
|
-
- Plans created count
|
|
297
|
-
|
|
298
|
-
Continue to commit.
|
|
299
|
-
</step>
|
|
300
|
-
|
|
301
|
-
<step name="commit">
|
|
302
|
-
Commit the plans.
|
|
303
|
-
|
|
304
|
-
@~/.claude/specdacular/references/commit-docs.md
|
|
305
|
-
|
|
306
|
-
- **$FILES:** `.specd/features/{feature-name}/plans/phase-{NN}/*-PLAN.md .specd/features/{feature-name}/ROADMAP.md .specd/features/{feature-name}/STATE.md`
|
|
307
|
-
- **$MESSAGE:** `docs({feature-name}): plan phase {N} - {phase title}` with plan count, task count, and plan structure
|
|
308
|
-
- **$LABEL:** `phase plans`
|
|
309
|
-
|
|
310
|
-
Continue to completion.
|
|
311
|
-
</step>
|
|
312
|
-
|
|
313
|
-
<step name="completion">
|
|
314
|
-
Present what was created and how to execute.
|
|
315
|
-
|
|
316
|
-
```
|
|
317
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
318
|
-
PHASE PLANS CREATED
|
|
319
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
320
|
-
|
|
321
|
-
**Feature:** {feature-name}
|
|
322
|
-
**Phase:** {N} — {Phase Title}
|
|
323
|
-
|
|
324
|
-
## Plans
|
|
325
|
-
|
|
326
|
-
- `plans/phase-{NN}/01-PLAN.md` — {Summary}
|
|
327
|
-
- `plans/phase-{NN}/02-PLAN.md` — {Summary}
|
|
328
|
-
|
|
329
|
-
## Tasks: {total count}
|
|
330
|
-
|
|
331
|
-
───────────────────────────────────────────────────────
|
|
332
|
-
|
|
333
|
-
## What's Next
|
|
334
|
-
|
|
335
|
-
/specd:phase:execute {feature} — Execute this phase
|
|
336
|
-
|
|
337
|
-
<sub>/clear first — fresh context window for execution</sub>
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
End workflow.
|
|
341
|
-
</step>
|
|
342
|
-
|
|
343
|
-
</process>
|
|
344
|
-
|
|
345
|
-
<success_criteria>
|
|
346
|
-
- Feature and phase validated
|
|
347
|
-
- Phase not already executed (or user confirmed re-plan)
|
|
348
|
-
- All context loaded (feature, phase, codebase)
|
|
349
|
-
- Tasks broken down from phase deliverables
|
|
350
|
-
- Each PLAN.md is self-contained agent prompt
|
|
351
|
-
- ROADMAP.md updated for this phase
|
|
352
|
-
- STATE.md updated
|
|
353
|
-
- Committed to git
|
|
354
|
-
- User knows next step is phase:execute
|
|
355
|
-
</success_criteria>
|