specdacular 0.5.3 → 0.6.1
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 +85 -47
- package/package.json +4 -2
- package/specdacular/templates/features/DEPENDENCIES.md +47 -0
- package/specdacular/templates/orchestrator/CONCERNS.md +27 -0
- package/specdacular/templates/orchestrator/CONTRACTS.md +31 -0
- package/specdacular/templates/orchestrator/PROJECTS.md +39 -0
- package/specdacular/templates/orchestrator/TOPOLOGY.md +43 -0
- package/specdacular/templates/orchestrator/config.json +12 -0
- package/specdacular/workflows/execute-plan.md +165 -0
- package/specdacular/workflows/map-codebase.md +369 -4
- package/specdacular/workflows/new-feature.md +388 -1
- package/specdacular/workflows/next-feature.md +147 -0
- package/specdacular/workflows/plan-feature.md +369 -0
|
@@ -76,13 +76,38 @@ Continue to codebase_context.
|
|
|
76
76
|
</step>
|
|
77
77
|
|
|
78
78
|
<step name="codebase_context">
|
|
79
|
-
Look for codebase documentation.
|
|
79
|
+
Look for codebase documentation and detect orchestrator mode.
|
|
80
80
|
|
|
81
81
|
**Check for existing config:**
|
|
82
82
|
```bash
|
|
83
83
|
cat .specd/config.json 2>/dev/null
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
**Check for orchestrator mode (DEC-006):**
|
|
87
|
+
|
|
88
|
+
If config exists, read `"type"` field.
|
|
89
|
+
|
|
90
|
+
**If type = "orchestrator":**
|
|
91
|
+
Set mode = "orchestrator".
|
|
92
|
+
|
|
93
|
+
Read system-level codebase docs:
|
|
94
|
+
- `.specd/codebase/PROJECTS.md` — Project registry
|
|
95
|
+
- `.specd/codebase/TOPOLOGY.md` — Communication patterns
|
|
96
|
+
- `.specd/codebase/CONTRACTS.md` — Shared interfaces
|
|
97
|
+
- `.specd/codebase/CONCERNS.md` — System-level concerns
|
|
98
|
+
|
|
99
|
+
Read project list from config.json `"projects"` array.
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Orchestrator mode detected. {N} projects registered.
|
|
103
|
+
I'll use system-level docs to understand cross-project architecture.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Continue to orchestrator_discussion.
|
|
107
|
+
|
|
108
|
+
**If type = "project" or absent:**
|
|
109
|
+
Set mode = "project".
|
|
110
|
+
|
|
86
111
|
**If config exists with codebase_docs path:**
|
|
87
112
|
Use that path for codebase docs.
|
|
88
113
|
|
|
@@ -118,6 +143,351 @@ Ask for path, then save to `.specd/config.json`.
|
|
|
118
143
|
Continue to first_discussion.
|
|
119
144
|
</step>
|
|
120
145
|
|
|
146
|
+
<step name="orchestrator_discussion">
|
|
147
|
+
System-level feature discussion for orchestrator mode.
|
|
148
|
+
|
|
149
|
+
**Opening:**
|
|
150
|
+
```
|
|
151
|
+
Let's talk about what you're building across the system.
|
|
152
|
+
|
|
153
|
+
What's the {feature-name} feature? What system-level behavior does it add?
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Wait for response.
|
|
157
|
+
|
|
158
|
+
**Follow the thread:**
|
|
159
|
+
Based on their response, ask follow-up questions that:
|
|
160
|
+
- Identify which projects are affected ("Which parts of the system does this touch?")
|
|
161
|
+
- Explore cross-project behavior ("How would data flow between projects for this?")
|
|
162
|
+
- Identify contract implications ("Does this change how projects communicate?")
|
|
163
|
+
- Understand project responsibilities ("What does each project need to do?")
|
|
164
|
+
|
|
165
|
+
**System-level probes (follow the conversation, don't march through):**
|
|
166
|
+
- "Which projects does this involve?"
|
|
167
|
+
- "What crosses project boundaries here?"
|
|
168
|
+
- "Does this change any existing communication patterns?"
|
|
169
|
+
- "What's each project's responsibility for this feature?"
|
|
170
|
+
- "Are there shared data structures or APIs that need to align?"
|
|
171
|
+
- "What's the simplest cross-project version that would work?"
|
|
172
|
+
|
|
173
|
+
**Use system-level context from codebase docs:**
|
|
174
|
+
- Reference PROJECTS.md for project responsibilities
|
|
175
|
+
- Reference TOPOLOGY.md for existing communication patterns
|
|
176
|
+
- Reference CONTRACTS.md for existing shared interfaces
|
|
177
|
+
- Reference CONCERNS.md for system-level gotchas that might apply
|
|
178
|
+
|
|
179
|
+
**Check understanding:**
|
|
180
|
+
After 4-6 exchanges, summarize with project involvement:
|
|
181
|
+
```
|
|
182
|
+
So if I understand correctly:
|
|
183
|
+
- This feature [system-level behavior]
|
|
184
|
+
- It involves these projects:
|
|
185
|
+
- {project-1}: [responsibility]
|
|
186
|
+
- {project-2}: [responsibility]
|
|
187
|
+
- Cross-project interaction: [how projects coordinate]
|
|
188
|
+
- Key constraint: [constraint]
|
|
189
|
+
|
|
190
|
+
Does that capture it, or should we dig into anything more?
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**When to move on:**
|
|
194
|
+
- User confirms understanding is correct
|
|
195
|
+
- You have a clear project list with per-project responsibilities
|
|
196
|
+
- Cross-project behavior is understood
|
|
197
|
+
|
|
198
|
+
Continue to route_projects.
|
|
199
|
+
</step>
|
|
200
|
+
|
|
201
|
+
<step name="route_projects">
|
|
202
|
+
Confirm which projects are involved in this feature.
|
|
203
|
+
|
|
204
|
+
**Build project suggestion:**
|
|
205
|
+
From the discussion, identify involved projects. Cross-reference with:
|
|
206
|
+
- CONTRACTS.md — which projects have existing relationships relevant to this feature
|
|
207
|
+
- PROJECTS.md — project responsibilities that align with feature needs
|
|
208
|
+
|
|
209
|
+
**Present suggestion:**
|
|
210
|
+
```
|
|
211
|
+
Based on our discussion, these projects are involved:
|
|
212
|
+
|
|
213
|
+
{For each project:}
|
|
214
|
+
- **{project-name}** ({project-path}) — {responsibility for this feature}
|
|
215
|
+
|
|
216
|
+
{If any projects from config NOT included:}
|
|
217
|
+
Not involved: {project-name} — {brief reason}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Use AskUserQuestion:
|
|
221
|
+
- header: "Projects"
|
|
222
|
+
- question: "Are these the right projects for this feature?"
|
|
223
|
+
- options:
|
|
224
|
+
- "Yes, looks right" — Continue with these projects
|
|
225
|
+
- "I need to adjust" — Add or remove projects
|
|
226
|
+
|
|
227
|
+
**If "I need to adjust":**
|
|
228
|
+
Ask user which projects to add or remove. Update the list accordingly.
|
|
229
|
+
|
|
230
|
+
**Store project routing:**
|
|
231
|
+
Build routing data:
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"projects": [
|
|
235
|
+
{"name": "{project-name}", "path": "{project-path}", "responsibility": "{what this project does for the feature}"}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Continue to create_orchestrator_feature.
|
|
241
|
+
</step>
|
|
242
|
+
|
|
243
|
+
<step name="create_orchestrator_feature">
|
|
244
|
+
Create orchestrator-level feature folder with system-view documents.
|
|
245
|
+
|
|
246
|
+
**Create feature directory:**
|
|
247
|
+
```bash
|
|
248
|
+
mkdir -p .specd/features/{feature-name}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Write FEATURE.md (system view):**
|
|
252
|
+
Use template at `~/.claude/specdacular/templates/features/FEATURE.md` but adapt for system level:
|
|
253
|
+
|
|
254
|
+
- **What This Is:** System-level description from orchestrator discussion
|
|
255
|
+
- **Must Create:** List the involved projects and what each creates (high-level)
|
|
256
|
+
- **Must Integrate With:** Cross-project interactions, existing contracts affected
|
|
257
|
+
- **Constraints:** System-level constraints (cross-project coordination, contract alignment)
|
|
258
|
+
- **Success Criteria:** System-level observable behaviors (not project-level details)
|
|
259
|
+
- **Out of Scope:** Explicit exclusions from the discussion
|
|
260
|
+
- **Initial Context:**
|
|
261
|
+
- User Need: from discussion
|
|
262
|
+
- Projects Involved: list with responsibilities
|
|
263
|
+
- Cross-Project Contracts: what needs to align between projects
|
|
264
|
+
|
|
265
|
+
**Write CONTEXT.md:**
|
|
266
|
+
Use template at `~/.claude/specdacular/templates/features/CONTEXT.md`
|
|
267
|
+
|
|
268
|
+
Fill in:
|
|
269
|
+
- **Discussion Summary:** System-level discussion summary
|
|
270
|
+
- **Resolved Questions:** Questions answered during orchestrator discussion
|
|
271
|
+
- **Deferred Questions:** Things to resolve during planning
|
|
272
|
+
- **Gray Areas Remaining:** Open areas
|
|
273
|
+
|
|
274
|
+
**Write DECISIONS.md:**
|
|
275
|
+
Use template at `~/.claude/specdacular/templates/features/DECISIONS.md`
|
|
276
|
+
Record any decisions made during the system-level discussion.
|
|
277
|
+
|
|
278
|
+
**Write CHANGELOG.md:**
|
|
279
|
+
Use template at `~/.claude/specdacular/templates/features/CHANGELOG.md`
|
|
280
|
+
Initialize empty.
|
|
281
|
+
|
|
282
|
+
**Write STATE.md:**
|
|
283
|
+
Use template at `~/.claude/specdacular/templates/features/STATE.md`
|
|
284
|
+
|
|
285
|
+
Initialize with:
|
|
286
|
+
- Stage: discussion
|
|
287
|
+
- Initial discussion complete: yes
|
|
288
|
+
- Add "Sub-Project Features" section:
|
|
289
|
+
|
|
290
|
+
```markdown
|
|
291
|
+
## Sub-Project Features
|
|
292
|
+
|
|
293
|
+
| Project | Path | Feature Path | Status |
|
|
294
|
+
|---------|------|--------------|--------|
|
|
295
|
+
| {project-name} | {project-path} | {project-path}/.specd/features/{feature-name}/ | initialized |
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Write config.json:**
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"feature_name": "{name}",
|
|
302
|
+
"created": "{date}",
|
|
303
|
+
"stage": "discussion",
|
|
304
|
+
"discussion_sessions": 1,
|
|
305
|
+
"decisions_count": {N},
|
|
306
|
+
"orchestrator": true,
|
|
307
|
+
"projects": [
|
|
308
|
+
{"name": "{project-name}", "path": "{project-path}", "responsibility": "{responsibility}"}
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Continue to delegate_to_projects.
|
|
314
|
+
</step>
|
|
315
|
+
|
|
316
|
+
<step name="delegate_to_projects">
|
|
317
|
+
Create feature folders in each involved sub-project with translated requirements.
|
|
318
|
+
|
|
319
|
+
For each project in the routing data:
|
|
320
|
+
|
|
321
|
+
**Create feature directory:**
|
|
322
|
+
```bash
|
|
323
|
+
mkdir -p {project-path}/.specd/features/{feature-name}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Write FEATURE.md (project-specific):**
|
|
327
|
+
Use template at `~/.claude/specdacular/templates/features/FEATURE.md`
|
|
328
|
+
|
|
329
|
+
Translate the system-level requirements into project-specific requirements:
|
|
330
|
+
- **What This Is:** What this project specifically does for the feature (not the system-level description)
|
|
331
|
+
- **Must Create:** Specific files/components this project needs to create
|
|
332
|
+
- **Must Integrate With:** Existing code in THIS project + cross-project interfaces it must implement
|
|
333
|
+
- **Constraints:** Project-specific constraints + any contract requirements from the orchestrator
|
|
334
|
+
- **Success Criteria:** Project-specific observable behaviors
|
|
335
|
+
- **Out of Scope:** What this project does NOT handle (other projects' responsibilities)
|
|
336
|
+
- **Initial Context:**
|
|
337
|
+
- User Need: project-specific slice of the system need
|
|
338
|
+
- Integration Points: what this project exposes or consumes from other projects
|
|
339
|
+
|
|
340
|
+
**IMPORTANT (DEC-001):** The sub-project FEATURE.md must read like a normal, self-contained feature requirement. No references to "orchestrator," "multi-project," or other projects by name. Cross-project requirements should be phrased as external interface requirements:
|
|
341
|
+
- BAD: "API project must expose /auth/login for the UI project"
|
|
342
|
+
- GOOD: "Must expose /auth/login endpoint that returns JWT tokens"
|
|
343
|
+
|
|
344
|
+
**Write CONTEXT.md:**
|
|
345
|
+
Use template at `~/.claude/specdacular/templates/features/CONTEXT.md`
|
|
346
|
+
- Discussion Summary: "Requirements defined as part of system-level {feature-name} feature planning."
|
|
347
|
+
- Resolved Questions: Any project-specific questions resolved during orchestrator discussion
|
|
348
|
+
|
|
349
|
+
**Write DECISIONS.md:**
|
|
350
|
+
Use template at `~/.claude/specdacular/templates/features/DECISIONS.md`
|
|
351
|
+
Include any project-specific decisions from orchestrator discussion.
|
|
352
|
+
|
|
353
|
+
**Write CHANGELOG.md:**
|
|
354
|
+
Use template at `~/.claude/specdacular/templates/features/CHANGELOG.md`
|
|
355
|
+
Initialize empty.
|
|
356
|
+
|
|
357
|
+
**Write STATE.md:**
|
|
358
|
+
Use template at `~/.claude/specdacular/templates/features/STATE.md`
|
|
359
|
+
Initialize with stage: discussion, initial discussion complete: yes.
|
|
360
|
+
|
|
361
|
+
**Write config.json:**
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"feature_name": "{name}",
|
|
365
|
+
"created": "{date}",
|
|
366
|
+
"stage": "discussion",
|
|
367
|
+
"discussion_sessions": 0,
|
|
368
|
+
"decisions_count": {N}
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Note: `discussion_sessions: 0` because no per-project discussion happened — requirements came from orchestrator delegation.
|
|
373
|
+
|
|
374
|
+
After all projects processed, verify:
|
|
375
|
+
```bash
|
|
376
|
+
for project in {project-paths}; do
|
|
377
|
+
echo "Checking $project..."
|
|
378
|
+
ls "$project/.specd/features/{feature-name}/"
|
|
379
|
+
done
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Continue to orchestrator_feature_commit.
|
|
383
|
+
</step>
|
|
384
|
+
|
|
385
|
+
<step name="orchestrator_feature_commit">
|
|
386
|
+
Commit orchestrator and all sub-project feature files.
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
# Add orchestrator feature files
|
|
390
|
+
git add .specd/features/{feature-name}/
|
|
391
|
+
|
|
392
|
+
# Add per-project feature files
|
|
393
|
+
{For each project:}
|
|
394
|
+
git add {project-path}/.specd/features/{feature-name}/
|
|
395
|
+
|
|
396
|
+
git commit -m "docs({feature-name}): initialize multi-project feature
|
|
397
|
+
|
|
398
|
+
Orchestrator:
|
|
399
|
+
- FEATURE.md: System-level requirements
|
|
400
|
+
- CONTEXT.md: Cross-project discussion
|
|
401
|
+
- DECISIONS.md: {N} decisions
|
|
402
|
+
- STATE.md: Sub-project tracking
|
|
403
|
+
|
|
404
|
+
Projects:
|
|
405
|
+
{For each project:}
|
|
406
|
+
- {project-name}: Project-specific requirements
|
|
407
|
+
|
|
408
|
+
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Continue to orchestrator_feature_completion.
|
|
412
|
+
</step>
|
|
413
|
+
|
|
414
|
+
<step name="orchestrator_feature_completion">
|
|
415
|
+
Present multi-project feature creation summary.
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
419
|
+
MULTI-PROJECT FEATURE INITIALIZED
|
|
420
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
421
|
+
|
|
422
|
+
**Feature:** {feature-name}
|
|
423
|
+
|
|
424
|
+
## Orchestrator (.specd/features/{feature-name}/)
|
|
425
|
+
|
|
426
|
+
- FEATURE.md — System-level requirements
|
|
427
|
+
- CONTEXT.md — Cross-project discussion
|
|
428
|
+
- DECISIONS.md — {N} decisions recorded
|
|
429
|
+
- STATE.md — Sub-project tracking
|
|
430
|
+
|
|
431
|
+
## Projects
|
|
432
|
+
|
|
433
|
+
{For each project:}
|
|
434
|
+
**{project-name}** ({project-path}/.specd/features/{feature-name}/)
|
|
435
|
+
- FEATURE.md — {brief responsibility summary}
|
|
436
|
+
- Responsibility: {one-liner}
|
|
437
|
+
|
|
438
|
+
## Summary
|
|
439
|
+
|
|
440
|
+
{2-3 sentence system-level summary}
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Continue to orchestrator_continuation_offer.
|
|
444
|
+
</step>
|
|
445
|
+
|
|
446
|
+
<step name="orchestrator_continuation_offer">
|
|
447
|
+
Offer to continue or stop (same pattern as existing continuation_offer).
|
|
448
|
+
|
|
449
|
+
**If gray areas remain in orchestrator CONTEXT.md:**
|
|
450
|
+
|
|
451
|
+
Use AskUserQuestion:
|
|
452
|
+
- header: "Continue?"
|
|
453
|
+
- question: "Want to keep discussing the open areas, or come back later?"
|
|
454
|
+
- options:
|
|
455
|
+
- "Keep discussing" — Dive into the gray areas now
|
|
456
|
+
- "Stop for now" — Come back with /specd:feature:next {feature-name}
|
|
457
|
+
|
|
458
|
+
**If Keep discussing:**
|
|
459
|
+
Execute the discuss-feature workflow logic:
|
|
460
|
+
@~/.claude/specdacular/workflows/discuss-feature.md
|
|
461
|
+
|
|
462
|
+
After discussion completes, return to this step.
|
|
463
|
+
|
|
464
|
+
**If no gray areas remain:**
|
|
465
|
+
|
|
466
|
+
Use AskUserQuestion:
|
|
467
|
+
- header: "Continue?"
|
|
468
|
+
- question: "Discussion looks solid. Want to keep going or come back later?"
|
|
469
|
+
- options:
|
|
470
|
+
- "Continue" — Move to the next step (research or planning)
|
|
471
|
+
- "Stop for now" — Come back with /specd:feature:next {feature-name}
|
|
472
|
+
|
|
473
|
+
**If Continue:**
|
|
474
|
+
Hand off to next-feature workflow:
|
|
475
|
+
@~/.claude/specdacular/workflows/next-feature.md
|
|
476
|
+
|
|
477
|
+
Start from the read_state step with the current feature.
|
|
478
|
+
|
|
479
|
+
**If Stop for now:**
|
|
480
|
+
```
|
|
481
|
+
───────────────────────────────────────────────────────
|
|
482
|
+
|
|
483
|
+
Progress saved. Pick up where you left off anytime:
|
|
484
|
+
|
|
485
|
+
/specd:feature:next {feature-name}
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
End workflow.
|
|
489
|
+
</step>
|
|
490
|
+
|
|
121
491
|
<step name="first_discussion">
|
|
122
492
|
Start the conversation.
|
|
123
493
|
|
|
@@ -368,6 +738,8 @@ End workflow.
|
|
|
368
738
|
</process>
|
|
369
739
|
|
|
370
740
|
<success_criteria>
|
|
741
|
+
|
|
742
|
+
## Single-Project Mode
|
|
371
743
|
- Feature folder created at `.specd/features/{name}/`
|
|
372
744
|
- FEATURE.md has specific technical requirements (files to create, integrations)
|
|
373
745
|
- CONTEXT.md captures the discussion state
|
|
@@ -377,4 +749,19 @@ End workflow.
|
|
|
377
749
|
- config.json created
|
|
378
750
|
- Committed to git
|
|
379
751
|
- User presented with clear next options
|
|
752
|
+
|
|
753
|
+
## Multi-Project Mode (Orchestrator)
|
|
754
|
+
- Orchestrator mode detected from `.specd/config.json` type field
|
|
755
|
+
- System-level discussion focuses on cross-project behavior
|
|
756
|
+
- Project routing suggests involved projects from discussion + CONTRACTS.md
|
|
757
|
+
- User confirms or adjusts project selection
|
|
758
|
+
- Orchestrator feature folder created with system-level FEATURE.md, CONTEXT.md, DECISIONS.md, STATE.md
|
|
759
|
+
- Orchestrator STATE.md includes Sub-Project Features table
|
|
760
|
+
- Orchestrator config.json includes `orchestrator: true` and `projects` array
|
|
761
|
+
- Each sub-project gets feature folder with project-specific requirements
|
|
762
|
+
- Sub-project FEATURE.md reads as normal self-contained feature (DEC-001)
|
|
763
|
+
- All files committed (orchestrator + all sub-projects)
|
|
764
|
+
- Multi-project summary presented
|
|
765
|
+
- User presented with clear next options
|
|
766
|
+
|
|
380
767
|
</success_criteria>
|
|
@@ -3,6 +3,8 @@ Smart state machine that reads current feature state and drives the entire lifec
|
|
|
3
3
|
|
|
4
4
|
**One command for the entire lifecycle:** discussion, research, planning, phase preparation, phase planning, phase execution, phase review.
|
|
5
5
|
|
|
6
|
+
**Multi-project:** In orchestrator mode, aggregates state across all sub-projects and uses the dependency graph to schedule work. Users can also work directly in sub-projects for single-project changes (DEC-001).
|
|
7
|
+
|
|
6
8
|
**Core loop:**
|
|
7
9
|
```
|
|
8
10
|
read state → show status → determine next action → execute → loop
|
|
@@ -112,6 +114,40 @@ ls .specd/features/{name}/plans/phase-{NN}/*-PLAN.md 2>/dev/null | head -1
|
|
|
112
114
|
# Check STATE.md for completed plans in this phase
|
|
113
115
|
```
|
|
114
116
|
|
|
117
|
+
**Check for orchestrator mode:**
|
|
118
|
+
|
|
119
|
+
Read feature's `config.json`. If `"orchestrator": true`:
|
|
120
|
+
|
|
121
|
+
Set mode = "orchestrator".
|
|
122
|
+
|
|
123
|
+
**Aggregate cross-project state:**
|
|
124
|
+
1. Read orchestrator DEPENDENCIES.md — cross-project phase dependency graph
|
|
125
|
+
2. For each project in feature config.json `"projects"` array:
|
|
126
|
+
- Read `{project-path}/.specd/features/{feature-name}/config.json` — stage, phases
|
|
127
|
+
- Read `{project-path}/.specd/features/{feature-name}/STATE.md` — detailed progress
|
|
128
|
+
|
|
129
|
+
**Build combined state:**
|
|
130
|
+
For each project phase, determine status:
|
|
131
|
+
- **complete** — All plans executed for this phase
|
|
132
|
+
- **in_progress** — Some plans executed
|
|
133
|
+
- **ready** — All cross-project dependencies satisfied, phase can start
|
|
134
|
+
- **blocked** — Waiting on another project's phase to complete
|
|
135
|
+
- **not_started** — Phase exists but not yet prepared/planned
|
|
136
|
+
|
|
137
|
+
**Check for optional project argument:**
|
|
138
|
+
If arguments contain a second token after feature name (e.g., `/specd:feature:next feature-name project-name`):
|
|
139
|
+
- Set target_project = project name
|
|
140
|
+
- Validate project exists in feature config.json
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Orchestrator mode: aggregating state across {N} projects.
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Continue to show_status (orchestrator variant).
|
|
147
|
+
|
|
148
|
+
**If not orchestrator:**
|
|
149
|
+
Set mode = "project".
|
|
150
|
+
|
|
115
151
|
Continue to show_status.
|
|
116
152
|
</step>
|
|
117
153
|
|
|
@@ -154,7 +190,103 @@ Present a concise status summary.
|
|
|
154
190
|
**Phase status:** {prepared | planned | executing | executed}
|
|
155
191
|
```
|
|
156
192
|
|
|
193
|
+
**If mode = "project":**
|
|
157
194
|
Continue to determine_action.
|
|
195
|
+
|
|
196
|
+
**If mode = "orchestrator":**
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
## {feature-name} (Multi-Project)
|
|
200
|
+
|
|
201
|
+
**Stage:** {stage}
|
|
202
|
+
**Overall progress:** {total completed phases}/{total phases} across {N} projects
|
|
203
|
+
|
|
204
|
+
### Per-Project Status
|
|
205
|
+
|
|
206
|
+
{For each project:}
|
|
207
|
+
**{project-name}** — {completed}/{total} phases
|
|
208
|
+
{For each phase: status indicator + name}
|
|
209
|
+
✓ Phase 1: {name} — complete
|
|
210
|
+
▶ Phase 2: {name} — ready
|
|
211
|
+
○ Phase 3: {name} — blocked by {dep}
|
|
212
|
+
|
|
213
|
+
### Cross-Project Dependencies
|
|
214
|
+
|
|
215
|
+
{Summary of key dependencies and their status}
|
|
216
|
+
|
|
217
|
+
**Note:** One orchestrator session at a time (DEC-011). State re-read fresh each time.
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Continue to orchestrator_schedule.
|
|
221
|
+
</step>
|
|
222
|
+
|
|
223
|
+
<step name="orchestrator_schedule">
|
|
224
|
+
Determine next work based on cross-project dependencies.
|
|
225
|
+
|
|
226
|
+
**Compute unblocked work:**
|
|
227
|
+
From the combined state and dependency graph:
|
|
228
|
+
1. Find all phases with status "ready" (dependencies satisfied, not started/in-progress)
|
|
229
|
+
2. Among "ready" phases, prioritize by:
|
|
230
|
+
- Phases that unblock the most downstream work
|
|
231
|
+
- Earlier phases within a project
|
|
232
|
+
- Projects with less progress (balance workload)
|
|
233
|
+
|
|
234
|
+
**If target_project specified (from argument):**
|
|
235
|
+
Filter to only that project's unblocked work.
|
|
236
|
+
|
|
237
|
+
**If no unblocked work:**
|
|
238
|
+
```
|
|
239
|
+
All available phases are blocked or complete.
|
|
240
|
+
|
|
241
|
+
{If all complete:}
|
|
242
|
+
All phases across all projects are complete! Feature is implemented.
|
|
243
|
+
|
|
244
|
+
{If blocked:}
|
|
245
|
+
Waiting on:
|
|
246
|
+
{List blocked phases and what they're waiting on}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
→ Go to action_complete (if all done) or action_stop (if blocked).
|
|
250
|
+
|
|
251
|
+
**If one phase unblocked:**
|
|
252
|
+
Auto-suggest:
|
|
253
|
+
```
|
|
254
|
+
Next: {project-name}/Phase {N} — {phase-name}
|
|
255
|
+
{Brief description of what this phase does}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Use AskUserQuestion:
|
|
259
|
+
- header: "Next Step"
|
|
260
|
+
- question: "Execute {project-name} Phase {N}?"
|
|
261
|
+
- options:
|
|
262
|
+
- "Execute (Recommended)" — Run this phase
|
|
263
|
+
- "Stop for now" — Come back later
|
|
264
|
+
|
|
265
|
+
**If multiple phases unblocked:**
|
|
266
|
+
```
|
|
267
|
+
Multiple phases are ready:
|
|
268
|
+
|
|
269
|
+
{For each ready phase:}
|
|
270
|
+
- **{project-name}/Phase {N}** — {phase-name} ({brief description})
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Use AskUserQuestion:
|
|
274
|
+
- header: "Next Step"
|
|
275
|
+
- question: "Which phase should we work on next?"
|
|
276
|
+
- options: List each ready phase as an option + "Stop for now"
|
|
277
|
+
|
|
278
|
+
**After selection:**
|
|
279
|
+
Set the target project and phase.
|
|
280
|
+
|
|
281
|
+
**Determine phase readiness:**
|
|
282
|
+
Check if the target phase is prepared and planned:
|
|
283
|
+
- If not prepared: → delegate to prepare-phase workflow
|
|
284
|
+
- If prepared but not planned: → delegate to plan-phase workflow
|
|
285
|
+
- If planned: → delegate to execute-plan workflow
|
|
286
|
+
|
|
287
|
+
Pass feature name and project context to the delegated workflow.
|
|
288
|
+
|
|
289
|
+
After delegated workflow completes, loop back to read_state.
|
|
158
290
|
</step>
|
|
159
291
|
|
|
160
292
|
<step name="determine_action">
|
|
@@ -487,6 +619,8 @@ End workflow.
|
|
|
487
619
|
</process>
|
|
488
620
|
|
|
489
621
|
<success_criteria>
|
|
622
|
+
|
|
623
|
+
## Single-Project Mode
|
|
490
624
|
- Feature selected (from argument or picker)
|
|
491
625
|
- Current state accurately read and displayed
|
|
492
626
|
- Correct next action determined from state
|
|
@@ -494,4 +628,17 @@ End workflow.
|
|
|
494
628
|
- Looped back after action completion
|
|
495
629
|
- User could stop at any natural boundary
|
|
496
630
|
- Clean exit with resume instructions
|
|
631
|
+
|
|
632
|
+
## Multi-Project Mode (Orchestrator)
|
|
633
|
+
- Orchestrator mode detected from feature config.json
|
|
634
|
+
- Cross-project state aggregated from all sub-projects
|
|
635
|
+
- Dependency graph read from DEPENDENCIES.md
|
|
636
|
+
- Per-project progress dashboard displayed
|
|
637
|
+
- Unblocked work computed from dependency graph
|
|
638
|
+
- Auto-suggests when one phase ready, asks when multiple
|
|
639
|
+
- Optional project argument: /specd:feature:next feature project
|
|
640
|
+
- Delegates to prepare/plan/execute based on phase readiness
|
|
641
|
+
- One-session-at-a-time constraint documented (DEC-011)
|
|
642
|
+
- Direct sub-project access always works (DEC-001)
|
|
643
|
+
|
|
497
644
|
</success_criteria>
|