@bhargavvc/sdd-cc 1.30.0 → 1.35.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.ja-JP.md +144 -110
- package/README.ko-KR.md +143 -107
- package/README.md +183 -112
- package/README.pt-BR.md +90 -52
- package/README.zh-CN.md +141 -101
- package/agents/sdd-advisor-researcher.md +23 -0
- package/agents/sdd-ai-researcher.md +133 -0
- package/agents/sdd-code-fixer.md +516 -0
- package/agents/sdd-code-reviewer.md +355 -0
- package/agents/sdd-codebase-mapper.md +3 -3
- package/agents/sdd-debugger.md +17 -5
- package/agents/sdd-doc-verifier.md +201 -0
- package/agents/sdd-doc-writer.md +602 -0
- package/agents/sdd-domain-researcher.md +153 -0
- package/agents/sdd-eval-auditor.md +164 -0
- package/agents/sdd-eval-planner.md +154 -0
- package/agents/sdd-executor.md +87 -4
- package/agents/sdd-framework-selector.md +160 -0
- package/agents/sdd-intel-updater.md +314 -0
- package/agents/sdd-nyquist-auditor.md +1 -1
- package/agents/sdd-phase-researcher.md +71 -4
- package/agents/sdd-plan-checker.md +100 -6
- package/agents/sdd-planner.md +145 -206
- package/agents/sdd-project-researcher.md +25 -2
- package/agents/sdd-research-synthesizer.md +3 -3
- package/agents/sdd-roadmapper.md +6 -6
- package/agents/sdd-security-auditor.md +128 -0
- package/agents/sdd-ui-auditor.md +43 -3
- package/agents/sdd-ui-checker.md +5 -5
- package/agents/sdd-ui-researcher.md +27 -4
- package/agents/sdd-user-profiler.md +2 -2
- package/agents/sdd-verifier.md +142 -22
- package/bin/install.js +2151 -551
- package/commands/sdd/add-backlog.md +5 -5
- package/commands/sdd/add-tests.md +2 -2
- package/commands/sdd/ai-integration-phase.md +36 -0
- package/commands/sdd/analyze-dependencies.md +34 -0
- package/commands/sdd/audit-fix.md +33 -0
- package/commands/sdd/autonomous.md +7 -2
- package/commands/sdd/cleanup.md +5 -0
- package/commands/sdd/code-review-fix.md +52 -0
- package/commands/sdd/code-review.md +55 -0
- package/commands/sdd/complete-milestone.md +6 -6
- package/commands/sdd/debug.md +22 -9
- package/commands/sdd/discuss-phase.md +7 -2
- package/commands/sdd/do.md +1 -1
- package/commands/sdd/docs-update.md +48 -0
- package/commands/sdd/eval-review.md +32 -0
- package/commands/sdd/execute-phase.md +4 -0
- package/commands/sdd/explore.md +27 -0
- package/commands/sdd/fast.md +2 -2
- package/commands/sdd/from-sdd2.md +45 -0
- package/commands/sdd/help.md +2 -0
- package/commands/sdd/import.md +36 -0
- package/commands/sdd/intel.md +179 -0
- package/commands/sdd/join-discord.md +2 -1
- package/commands/sdd/manager.md +1 -0
- package/commands/sdd/map-codebase.md +3 -3
- package/commands/sdd/new-milestone.md +1 -1
- package/commands/sdd/new-project.md +5 -1
- package/commands/sdd/new-workspace.md +1 -1
- package/commands/sdd/next.md +2 -0
- package/commands/sdd/plan-milestone-gaps.md +2 -2
- package/commands/sdd/plan-phase.md +6 -1
- package/commands/sdd/plant-seed.md +1 -1
- package/commands/sdd/profile-user.md +1 -1
- package/commands/sdd/quick.md +5 -3
- package/commands/sdd/reapply-patches.md +230 -42
- package/commands/sdd/research-phase.md +3 -3
- package/commands/sdd/review-backlog.md +1 -0
- package/commands/sdd/review.md +6 -3
- package/commands/sdd/scan.md +26 -0
- package/commands/sdd/secure-phase.md +35 -0
- package/commands/sdd/ship.md +1 -1
- package/commands/sdd/thread.md +5 -5
- package/commands/sdd/undo.md +34 -0
- package/commands/sdd/verify-work.md +1 -1
- package/commands/sdd/workstreams.md +17 -11
- package/hooks/dist/sdd-check-update.js +33 -8
- package/hooks/dist/sdd-context-monitor.js +17 -8
- package/hooks/dist/sdd-phase-boundary.sh +27 -0
- package/hooks/dist/sdd-prompt-guard.js +1 -0
- package/hooks/dist/sdd-read-guard.js +82 -0
- package/hooks/dist/sdd-session-state.sh +33 -0
- package/hooks/dist/sdd-statusline.js +137 -15
- package/hooks/dist/sdd-validate-commit.sh +47 -0
- package/hooks/dist/sdd-workflow-guard.js +4 -4
- package/hooks/sdd-check-update.js +139 -0
- package/hooks/sdd-context-monitor.js +165 -0
- package/hooks/sdd-phase-boundary.sh +27 -0
- package/hooks/sdd-prompt-guard.js +97 -0
- package/hooks/sdd-read-guard.js +82 -0
- package/hooks/sdd-session-state.sh +33 -0
- package/hooks/sdd-statusline.js +241 -0
- package/hooks/sdd-validate-commit.sh +47 -0
- package/hooks/sdd-workflow-guard.js +94 -0
- package/package.json +3 -3
- package/scripts/build-hooks.js +18 -7
- package/scripts/prompt-injection-scan.sh +1 -0
- package/scripts/rebrand-gsd-to-sdd.sh +221 -220
- package/scripts/run-tests.cjs +5 -1
- package/scripts/sync-upstream.sh +1 -1
- package/sdd/bin/lib/commands.cjs +79 -17
- package/sdd/bin/lib/config.cjs +90 -48
- package/sdd/bin/lib/core.cjs +452 -87
- package/sdd/bin/lib/docs.cjs +267 -0
- package/sdd/bin/lib/frontmatter.cjs +381 -336
- package/sdd/bin/lib/init.cjs +110 -16
- package/sdd/bin/lib/intel.cjs +660 -0
- package/sdd/bin/lib/learnings.cjs +378 -0
- package/sdd/bin/lib/milestone.cjs +42 -11
- package/sdd/bin/lib/model-profiles.cjs +17 -15
- package/sdd/bin/lib/phase.cjs +367 -288
- package/sdd/bin/lib/profile-output.cjs +106 -10
- package/sdd/bin/lib/roadmap.cjs +146 -115
- package/sdd/bin/lib/schema-detect.cjs +238 -0
- package/sdd/bin/lib/sdd2-import.cjs +511 -0
- package/sdd/bin/lib/security.cjs +124 -3
- package/sdd/bin/lib/state.cjs +648 -264
- package/sdd/bin/lib/template.cjs +8 -4
- package/sdd/bin/lib/verify.cjs +209 -28
- package/sdd/bin/lib/workstream.cjs +7 -3
- package/sdd/bin/sdd-tools.cjs +184 -12
- package/sdd/contexts/dev.md +21 -0
- package/sdd/contexts/research.md +22 -0
- package/sdd/contexts/review.md +22 -0
- package/sdd/references/agent-contracts.md +79 -0
- package/sdd/references/ai-evals.md +156 -0
- package/sdd/references/ai-frameworks.md +186 -0
- package/sdd/references/artifact-types.md +113 -0
- package/sdd/references/common-bug-patterns.md +114 -0
- package/sdd/references/context-budget.md +49 -0
- package/sdd/references/continuation-format.md +25 -25
- package/sdd/references/domain-probes.md +125 -0
- package/sdd/references/few-shot-examples/plan-checker.md +73 -0
- package/sdd/references/few-shot-examples/verifier.md +109 -0
- package/sdd/references/gate-prompts.md +100 -0
- package/sdd/references/gates.md +70 -0
- package/sdd/references/git-integration.md +1 -1
- package/sdd/references/ios-scaffold.md +123 -0
- package/sdd/references/model-profile-resolution.md +2 -0
- package/sdd/references/model-profiles.md +24 -18
- package/sdd/references/planner-gap-closure.md +62 -0
- package/sdd/references/planner-reviews.md +39 -0
- package/sdd/references/planner-revision.md +87 -0
- package/sdd/references/planning-config.md +252 -0
- package/sdd/references/revision-loop.md +97 -0
- package/sdd/references/thinking-models-debug.md +44 -0
- package/sdd/references/thinking-models-execution.md +50 -0
- package/sdd/references/thinking-models-planning.md +62 -0
- package/sdd/references/thinking-models-research.md +50 -0
- package/sdd/references/thinking-models-verification.md +55 -0
- package/sdd/references/thinking-partner.md +96 -0
- package/sdd/references/ui-brand.md +4 -4
- package/sdd/references/universal-anti-patterns.md +63 -0
- package/sdd/references/verification-overrides.md +227 -0
- package/sdd/references/workstream-flag.md +56 -3
- package/sdd/templates/AI-SPEC.md +246 -0
- package/sdd/templates/DEBUG.md +1 -1
- package/sdd/templates/SECURITY.md +61 -0
- package/sdd/templates/UAT.md +4 -4
- package/sdd/templates/VALIDATION.md +4 -4
- package/sdd/templates/claude-md.md +32 -9
- package/sdd/templates/config.json +4 -0
- package/sdd/templates/debug-subagent-prompt.md +1 -1
- package/sdd/templates/dev-preferences.md +1 -1
- package/sdd/templates/discovery.md +2 -2
- package/sdd/templates/phase-prompt.md +1 -1
- package/sdd/templates/planner-subagent-prompt.md +3 -3
- package/sdd/templates/project.md +1 -1
- package/sdd/templates/research.md +1 -1
- package/sdd/templates/state.md +2 -2
- package/sdd/workflows/add-phase.md +8 -8
- package/sdd/workflows/add-tests.md +12 -9
- package/sdd/workflows/add-todo.md +5 -3
- package/sdd/workflows/ai-integration-phase.md +284 -0
- package/sdd/workflows/analyze-dependencies.md +96 -0
- package/sdd/workflows/audit-fix.md +157 -0
- package/sdd/workflows/audit-milestone.md +11 -11
- package/sdd/workflows/audit-uat.md +2 -2
- package/sdd/workflows/autonomous.md +195 -27
- package/sdd/workflows/check-todos.md +12 -10
- package/sdd/workflows/cleanup.md +2 -0
- package/sdd/workflows/code-review-fix.md +497 -0
- package/sdd/workflows/code-review.md +515 -0
- package/sdd/workflows/complete-milestone.md +56 -22
- package/sdd/workflows/diagnose-issues.md +10 -3
- package/sdd/workflows/discovery-phase.md +5 -3
- package/sdd/workflows/discuss-phase-assumptions.md +24 -6
- package/sdd/workflows/discuss-phase-power.md +291 -0
- package/sdd/workflows/discuss-phase.md +173 -21
- package/sdd/workflows/do.md +23 -21
- package/sdd/workflows/docs-update.md +1155 -0
- package/sdd/workflows/eval-review.md +155 -0
- package/sdd/workflows/execute-phase.md +594 -38
- package/sdd/workflows/execute-plan.md +67 -96
- package/sdd/workflows/explore.md +139 -0
- package/sdd/workflows/fast.md +5 -5
- package/sdd/workflows/forensics.md +2 -2
- package/sdd/workflows/health.md +4 -4
- package/sdd/workflows/help.md +122 -119
- package/sdd/workflows/import.md +276 -0
- package/sdd/workflows/inbox.md +387 -0
- package/sdd/workflows/insert-phase.md +7 -7
- package/sdd/workflows/list-phase-assumptions.md +4 -4
- package/sdd/workflows/list-workspaces.md +2 -2
- package/sdd/workflows/manager.md +35 -32
- package/sdd/workflows/map-codebase.md +7 -5
- package/sdd/workflows/milestone-summary.md +2 -2
- package/sdd/workflows/new-milestone.md +17 -9
- package/sdd/workflows/new-project.md +50 -25
- package/sdd/workflows/new-workspace.md +7 -5
- package/sdd/workflows/next.md +67 -11
- package/sdd/workflows/note.md +9 -7
- package/sdd/workflows/pause-work.md +75 -12
- package/sdd/workflows/plan-milestone-gaps.md +8 -8
- package/sdd/workflows/plan-phase.md +294 -42
- package/sdd/workflows/plant-seed.md +6 -3
- package/sdd/workflows/pr-branch.md +42 -14
- package/sdd/workflows/profile-user.md +9 -7
- package/sdd/workflows/progress.md +45 -45
- package/sdd/workflows/quick.md +195 -47
- package/sdd/workflows/remove-phase.md +6 -6
- package/sdd/workflows/remove-workspace.md +3 -1
- package/sdd/workflows/research-phase.md +2 -2
- package/sdd/workflows/resume-project.md +12 -12
- package/sdd/workflows/review.md +109 -9
- package/sdd/workflows/scan.md +102 -0
- package/sdd/workflows/secure-phase.md +166 -0
- package/sdd/workflows/session-report.md +2 -2
- package/sdd/workflows/settings.md +38 -12
- package/sdd/workflows/ship.md +21 -9
- package/sdd/workflows/stats.md +1 -1
- package/sdd/workflows/transition.md +23 -23
- package/sdd/workflows/ui-phase.md +15 -7
- package/sdd/workflows/ui-review.md +29 -4
- package/sdd/workflows/undo.md +314 -0
- package/sdd/workflows/update.md +171 -20
- package/sdd/workflows/validate-phase.md +6 -4
- package/sdd/workflows/verify-phase.md +210 -6
- package/sdd/workflows/verify-work.md +83 -9
- package/sdd/commands/sdd/workstreams.md +0 -63
package/sdd/workflows/quick.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<purpose>
|
|
2
2
|
Execute small, ad-hoc tasks with SDD guarantees (atomic commits, STATE.md tracking). Quick mode spawns sdd-planner (quick mode) + sdd-executor(s), tracks tasks in `.planning/quick/`, and updates STATE.md's "Quick Tasks Completed" table.
|
|
3
3
|
|
|
4
|
-
With `--
|
|
4
|
+
With `--full` flag: enables the complete quality pipeline — discussion + research + plan-checking + verification. One flag for everything.
|
|
5
|
+
|
|
6
|
+
With `--validate` flag: enables plan-checking (max 2 iterations) and post-execution verification only. Use when you want quality guarantees without discussion or research.
|
|
5
7
|
|
|
6
|
-
With `--
|
|
8
|
+
With `--discuss` flag: lightweight discussion phase before planning. Surfaces assumptions, clarifies gray areas, captures decisions in CONTEXT.md so the planner treats them as locked.
|
|
7
9
|
|
|
8
10
|
With `--research` flag: spawns a focused research agent before planning. Investigates implementation approaches, library options, and pitfalls. Use when you're unsure how to approach a task.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
Granular flags are composable: `--discuss --research --validate` gives the same result as `--full`.
|
|
11
13
|
</purpose>
|
|
12
14
|
|
|
13
15
|
<required_reading>
|
|
@@ -21,19 +23,24 @@ Valid SDD subagent types (use exact names — do not fall back to 'general-purpo
|
|
|
21
23
|
- sdd-plan-checker — Reviews plan quality before execution
|
|
22
24
|
- sdd-executor — Executes plan tasks, commits, creates SUMMARY.md
|
|
23
25
|
- sdd-verifier — Verifies phase completion, checks quality gates
|
|
26
|
+
- sdd-code-reviewer — Reviews source files for bugs, security issues, and code quality
|
|
24
27
|
</available_agent_types>
|
|
25
28
|
|
|
26
29
|
<process>
|
|
27
30
|
**Step 1: Parse arguments and get task description**
|
|
28
31
|
|
|
29
32
|
Parse `$ARGUMENTS` for:
|
|
30
|
-
- `--full` flag → store
|
|
31
|
-
- `--
|
|
32
|
-
- `--
|
|
33
|
+
- `--full` flag → store `$FULL_MODE=true`, `$DISCUSS_MODE=true`, `$RESEARCH_MODE=true`, `$VALIDATE_MODE=true`
|
|
34
|
+
- `--validate` flag → store `$VALIDATE_MODE=true`
|
|
35
|
+
- `--discuss` flag → store `$DISCUSS_MODE=true`
|
|
36
|
+
- `--research` flag → store `$RESEARCH_MODE=true`
|
|
33
37
|
- Remaining text → use as `$DESCRIPTION` if non-empty
|
|
34
38
|
|
|
35
39
|
If `$DESCRIPTION` is empty after parsing, prompt user interactively:
|
|
36
40
|
|
|
41
|
+
|
|
42
|
+
**Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
43
|
+
|
|
37
44
|
```
|
|
38
45
|
AskUserQuestion(
|
|
39
46
|
header: "Quick Task",
|
|
@@ -48,25 +55,34 @@ If still empty, re-prompt: "Please provide a task description."
|
|
|
48
55
|
|
|
49
56
|
Display banner based on active flags:
|
|
50
57
|
|
|
51
|
-
If `$
|
|
58
|
+
If `$FULL_MODE` (all phases enabled — `--full` or all granular flags):
|
|
52
59
|
```
|
|
53
60
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
54
|
-
SDD ► QUICK TASK (
|
|
61
|
+
SDD ► QUICK TASK (FULL)
|
|
55
62
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
63
|
|
|
57
64
|
◆ Discussion + research + plan checking + verification enabled
|
|
58
65
|
```
|
|
59
66
|
|
|
60
|
-
If `$DISCUSS_MODE` and `$
|
|
67
|
+
If `$DISCUSS_MODE` and `$RESEARCH_MODE` and `$VALIDATE_MODE` (no `$FULL_MODE` — composed granularly):
|
|
61
68
|
```
|
|
62
69
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
-
SDD ► QUICK TASK (DISCUSS +
|
|
70
|
+
SDD ► QUICK TASK (DISCUSS + RESEARCH + VALIDATE)
|
|
71
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
|
+
|
|
73
|
+
◆ Discussion + research + plan checking + verification enabled
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If `$DISCUSS_MODE` and `$VALIDATE_MODE` (no research):
|
|
77
|
+
```
|
|
78
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
79
|
+
SDD ► QUICK TASK (DISCUSS + VALIDATE)
|
|
64
80
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
65
81
|
|
|
66
82
|
◆ Discussion + plan checking + verification enabled
|
|
67
83
|
```
|
|
68
84
|
|
|
69
|
-
If `$DISCUSS_MODE` and `$RESEARCH_MODE` (no
|
|
85
|
+
If `$DISCUSS_MODE` and `$RESEARCH_MODE` (no validate):
|
|
70
86
|
```
|
|
71
87
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
88
|
SDD ► QUICK TASK (DISCUSS + RESEARCH)
|
|
@@ -75,10 +91,10 @@ If `$DISCUSS_MODE` and `$RESEARCH_MODE` (no full):
|
|
|
75
91
|
◆ Discussion + research enabled
|
|
76
92
|
```
|
|
77
93
|
|
|
78
|
-
If `$RESEARCH_MODE` and `$
|
|
94
|
+
If `$RESEARCH_MODE` and `$VALIDATE_MODE` (no discuss):
|
|
79
95
|
```
|
|
80
96
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
-
SDD ► QUICK TASK (RESEARCH +
|
|
97
|
+
SDD ► QUICK TASK (RESEARCH + VALIDATE)
|
|
82
98
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
83
99
|
|
|
84
100
|
◆ Research + plan checking + verification enabled
|
|
@@ -102,10 +118,10 @@ If `$RESEARCH_MODE` only:
|
|
|
102
118
|
◆ Research phase enabled — investigating approaches before planning
|
|
103
119
|
```
|
|
104
120
|
|
|
105
|
-
If `$
|
|
121
|
+
If `$VALIDATE_MODE` only:
|
|
106
122
|
```
|
|
107
123
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
108
|
-
SDD ► QUICK TASK (
|
|
124
|
+
SDD ► QUICK TASK (VALIDATE)
|
|
109
125
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
110
126
|
|
|
111
127
|
◆ Plan checking + verification enabled
|
|
@@ -126,7 +142,11 @@ AGENT_SKILLS_VERIFIER=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" agent-skills
|
|
|
126
142
|
|
|
127
143
|
Parse JSON for: `planner_model`, `executor_model`, `checker_model`, `verifier_model`, `commit_docs`, `branch_name`, `quick_id`, `slug`, `date`, `timestamp`, `quick_dir`, `task_dir`, `roadmap_exists`, `planning_exists`.
|
|
128
144
|
|
|
129
|
-
|
|
145
|
+
```bash
|
|
146
|
+
USE_WORKTREES=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get workflow.use_worktrees 2>/dev/null || echo "true")
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**If `roadmap_exists` is false:** Error — Quick mode requires an active project with ROADMAP.md. Run `/sdd-new-project` first.
|
|
130
150
|
|
|
131
151
|
Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.
|
|
132
152
|
|
|
@@ -367,16 +387,16 @@ If research file not found, warn but continue: "Research agent did not produce o
|
|
|
367
387
|
|
|
368
388
|
**Step 5: Spawn planner (quick mode)**
|
|
369
389
|
|
|
370
|
-
**If `$
|
|
390
|
+
**If `$VALIDATE_MODE`:** Use `quick-full` mode with stricter constraints.
|
|
371
391
|
|
|
372
|
-
**If NOT `$
|
|
392
|
+
**If NOT `$VALIDATE_MODE`:** Use standard `quick` mode.
|
|
373
393
|
|
|
374
394
|
```
|
|
375
395
|
Task(
|
|
376
396
|
prompt="
|
|
377
397
|
<planning_context>
|
|
378
398
|
|
|
379
|
-
**Mode:** ${
|
|
399
|
+
**Mode:** ${VALIDATE_MODE ? 'quick-full' : 'quick'}
|
|
380
400
|
**Directory:** ${QUICK_DIR}
|
|
381
401
|
**Description:** ${DESCRIPTION}
|
|
382
402
|
|
|
@@ -397,9 +417,9 @@ ${AGENT_SKILLS_PLANNER}
|
|
|
397
417
|
- Create a SINGLE plan with 1-3 focused tasks
|
|
398
418
|
- Quick tasks should be atomic and self-contained
|
|
399
419
|
${RESEARCH_MODE ? '- Research findings are available — use them to inform library/pattern choices' : '- No research phase'}
|
|
400
|
-
${
|
|
401
|
-
${
|
|
402
|
-
${
|
|
420
|
+
${VALIDATE_MODE ? '- Target ~40% context usage (structured for verification)' : '- Target ~30% context usage (simple, focused)'}
|
|
421
|
+
${VALIDATE_MODE ? '- MUST generate `must_haves` in plan frontmatter (truths, artifacts, key_links)' : ''}
|
|
422
|
+
${VALIDATE_MODE ? '- Each task MUST have `files`, `action`, `verify`, `done` fields' : ''}
|
|
403
423
|
</constraints>
|
|
404
424
|
|
|
405
425
|
<output>
|
|
@@ -422,9 +442,9 @@ If plan not found, error: "Planner failed to create ${quick_id}-PLAN.md"
|
|
|
422
442
|
|
|
423
443
|
---
|
|
424
444
|
|
|
425
|
-
**Step 5.5: Plan-checker loop (only when `$
|
|
445
|
+
**Step 5.5: Plan-checker loop (only when `$VALIDATE_MODE`)**
|
|
426
446
|
|
|
427
|
-
Skip this step entirely if NOT `$
|
|
447
|
+
Skip this step entirely if NOT `$VALIDATE_MODE`.
|
|
428
448
|
|
|
429
449
|
Display banner:
|
|
430
450
|
```
|
|
@@ -534,6 +554,11 @@ Offer: 1) Force proceed, 2) Abort
|
|
|
534
554
|
|
|
535
555
|
**Step 6: Spawn executor**
|
|
536
556
|
|
|
557
|
+
Capture current HEAD before spawning (used for worktree branch check):
|
|
558
|
+
```bash
|
|
559
|
+
EXPECTED_BASE=$(git rev-parse HEAD)
|
|
560
|
+
```
|
|
561
|
+
|
|
537
562
|
Spawn sdd-executor with plan reference:
|
|
538
563
|
|
|
539
564
|
```
|
|
@@ -541,6 +566,17 @@ Task(
|
|
|
541
566
|
prompt="
|
|
542
567
|
Execute quick task ${quick_id}.
|
|
543
568
|
|
|
569
|
+
${USE_WORKTREES !== "false" ? `
|
|
570
|
+
<worktree_branch_check>
|
|
571
|
+
FIRST ACTION before any other work: verify this worktree branch is based on the correct commit.
|
|
572
|
+
Run: git merge-base HEAD ${EXPECTED_BASE}
|
|
573
|
+
If the result differs from ${EXPECTED_BASE}, hard-reset to the correct base (safe — runs before any agent work):
|
|
574
|
+
git reset --hard ${EXPECTED_BASE}
|
|
575
|
+
Then verify: if [ "$(git rev-parse HEAD)" != "${EXPECTED_BASE}" ]; then echo "ERROR: Could not correct worktree base"; exit 1; fi
|
|
576
|
+
This corrects a known issue where EnterWorktree creates branches from main instead of the feature branch HEAD (affects all platforms).
|
|
577
|
+
</worktree_branch_check>
|
|
578
|
+
` : ''}
|
|
579
|
+
|
|
544
580
|
<files_to_read>
|
|
545
581
|
- ${QUICK_DIR}/${quick_id}-PLAN.md (Plan)
|
|
546
582
|
- .planning/STATE.md (Project state)
|
|
@@ -552,22 +588,74 @@ ${AGENT_SKILLS_EXECUTOR}
|
|
|
552
588
|
|
|
553
589
|
<constraints>
|
|
554
590
|
- Execute all tasks in the plan
|
|
555
|
-
- Commit each task atomically
|
|
591
|
+
- Commit each task atomically (code changes only)
|
|
556
592
|
- Create summary at: ${QUICK_DIR}/${quick_id}-SUMMARY.md
|
|
593
|
+
- Do NOT commit docs artifacts (SUMMARY.md, STATE.md, PLAN.md) — the orchestrator handles the docs commit in Step 8
|
|
557
594
|
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
|
|
558
595
|
</constraints>
|
|
559
596
|
",
|
|
560
597
|
subagent_type="sdd-executor",
|
|
561
598
|
model="{executor_model}",
|
|
562
|
-
isolation="worktree",
|
|
599
|
+
${USE_WORKTREES !== "false" ? 'isolation="worktree",' : ''}
|
|
563
600
|
description="Execute: ${DESCRIPTION}"
|
|
564
601
|
)
|
|
565
602
|
```
|
|
566
603
|
|
|
567
604
|
After executor returns:
|
|
568
|
-
1.
|
|
569
|
-
|
|
570
|
-
|
|
605
|
+
1. **Worktree cleanup:** If the executor ran with `isolation="worktree"`, merge the worktree branch back and clean up:
|
|
606
|
+
```bash
|
|
607
|
+
# Find worktrees created by the executor
|
|
608
|
+
WORKTREES=$(git worktree list --porcelain | grep "^worktree " | grep -v "$(pwd)$" | sed 's/^worktree //')
|
|
609
|
+
for WT in $WORKTREES; do
|
|
610
|
+
WT_BRANCH=$(git -C "$WT" rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
611
|
+
if [ -n "$WT_BRANCH" ] && [ "$WT_BRANCH" != "HEAD" ]; then
|
|
612
|
+
# --- Orchestrator file protection (#1756) ---
|
|
613
|
+
# Backup STATE.md and ROADMAP.md before merge (main always wins)
|
|
614
|
+
STATE_BACKUP=$(mktemp)
|
|
615
|
+
ROADMAP_BACKUP=$(mktemp)
|
|
616
|
+
git show HEAD:.planning/STATE.md > "$STATE_BACKUP" 2>/dev/null || true
|
|
617
|
+
git show HEAD:.planning/ROADMAP.md > "$ROADMAP_BACKUP" 2>/dev/null || true
|
|
618
|
+
|
|
619
|
+
# Snapshot files on main to detect resurrections
|
|
620
|
+
PRE_MERGE_FILES=$(git ls-files .planning/)
|
|
621
|
+
|
|
622
|
+
git merge "$WT_BRANCH" --no-edit -m "chore: merge quick task worktree ($WT_BRANCH)" 2>&1 || {
|
|
623
|
+
echo "⚠ Merge conflict — resolve manually"
|
|
624
|
+
rm -f "$STATE_BACKUP" "$ROADMAP_BACKUP"
|
|
625
|
+
continue
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
# Restore orchestrator-owned files
|
|
629
|
+
if [ -s "$STATE_BACKUP" ]; then cp "$STATE_BACKUP" .planning/STATE.md; fi
|
|
630
|
+
if [ -s "$ROADMAP_BACKUP" ]; then cp "$ROADMAP_BACKUP" .planning/ROADMAP.md; fi
|
|
631
|
+
rm -f "$STATE_BACKUP" "$ROADMAP_BACKUP"
|
|
632
|
+
|
|
633
|
+
# Remove files deleted on main but re-added by worktree
|
|
634
|
+
DELETED_FILES=$(git diff --diff-filter=A --name-only HEAD~1 -- .planning/ 2>/dev/null || true)
|
|
635
|
+
for RESURRECTED in $DELETED_FILES; do
|
|
636
|
+
if ! echo "$PRE_MERGE_FILES" | grep -qxF "$RESURRECTED"; then
|
|
637
|
+
git rm -f "$RESURRECTED" 2>/dev/null || true
|
|
638
|
+
fi
|
|
639
|
+
done
|
|
640
|
+
|
|
641
|
+
if ! git diff --quiet .planning/STATE.md .planning/ROADMAP.md 2>/dev/null || \
|
|
642
|
+
[ -n "$DELETED_FILES" ]; then
|
|
643
|
+
COMMIT_DOCS=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get commit_docs 2>/dev/null || echo "true")
|
|
644
|
+
if [ "$COMMIT_DOCS" != "false" ]; then
|
|
645
|
+
git add .planning/STATE.md .planning/ROADMAP.md 2>/dev/null || true
|
|
646
|
+
git commit --amend --no-edit 2>/dev/null || true
|
|
647
|
+
fi
|
|
648
|
+
fi
|
|
649
|
+
|
|
650
|
+
git worktree remove "$WT" --force 2>/dev/null || true
|
|
651
|
+
git branch -D "$WT_BRANCH" 2>/dev/null || true
|
|
652
|
+
fi
|
|
653
|
+
done
|
|
654
|
+
```
|
|
655
|
+
If `workflow.use_worktrees` is `false`, skip this step.
|
|
656
|
+
2. Verify summary exists at `${QUICK_DIR}/${quick_id}-SUMMARY.md`
|
|
657
|
+
3. Extract commit hash from executor output
|
|
658
|
+
4. Report completion status
|
|
571
659
|
|
|
572
660
|
**Known Claude Code bug (classifyHandoffIfNeeded):** If executor reports "failed" with error `classifyHandoffIfNeeded is not defined`, this is a Claude Code runtime bug — not a real failure. Check if summary file exists and git log shows commits. If so, treat as successful.
|
|
573
661
|
|
|
@@ -577,9 +665,58 @@ Note: For quick tasks producing multiple plans (rare), spawn executors in parall
|
|
|
577
665
|
|
|
578
666
|
---
|
|
579
667
|
|
|
580
|
-
**Step 6.
|
|
668
|
+
**Step 6.25: Code review (auto)**
|
|
669
|
+
|
|
670
|
+
Skip this step entirely if `$FULL_MODE` is false.
|
|
671
|
+
|
|
672
|
+
**Config gate:**
|
|
673
|
+
```bash
|
|
674
|
+
CODE_REVIEW_ENABLED=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get workflow.code_review 2>/dev/null || echo "true")
|
|
675
|
+
```
|
|
676
|
+
If `"false"`, skip with message "Code review skipped (workflow.code_review=false)".
|
|
677
|
+
|
|
678
|
+
**Scope files from executor's commits:**
|
|
679
|
+
```bash
|
|
680
|
+
# Find the diff base: last commit before quick task started
|
|
681
|
+
# Use git log to find commits referencing the quick task id, then take the parent of the oldest
|
|
682
|
+
QUICK_COMMITS=$(git log --oneline --format="%H" --grep="${quick_id}" 2>/dev/null)
|
|
683
|
+
if [ -n "$QUICK_COMMITS" ]; then
|
|
684
|
+
DIFF_BASE=$(echo "$QUICK_COMMITS" | tail -1)^
|
|
685
|
+
# Verify parent exists (guard against first commit in repo)
|
|
686
|
+
git rev-parse "${DIFF_BASE}" >/dev/null 2>&1 || DIFF_BASE=$(echo "$QUICK_COMMITS" | tail -1)
|
|
687
|
+
else
|
|
688
|
+
# No commits found for this quick task — skip review
|
|
689
|
+
DIFF_BASE=""
|
|
690
|
+
fi
|
|
691
|
+
|
|
692
|
+
if [ -n "$DIFF_BASE" ]; then
|
|
693
|
+
CHANGED_FILES=$(git diff --name-only "${DIFF_BASE}..HEAD" -- . ':!.planning' 2>/dev/null | tr '\n' ' ')
|
|
694
|
+
else
|
|
695
|
+
CHANGED_FILES=""
|
|
696
|
+
fi
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
If `CHANGED_FILES` is empty, skip with "No source files changed — skipping code review."
|
|
700
|
+
|
|
701
|
+
**Invoke review:**
|
|
702
|
+
```
|
|
703
|
+
Task(
|
|
704
|
+
prompt="Review these files for bugs, security issues, and code quality.
|
|
705
|
+
Files: ${CHANGED_FILES}
|
|
706
|
+
Output: ${QUICK_DIR}/${quick_id}-REVIEW.md
|
|
707
|
+
Depth: quick",
|
|
708
|
+
subagent_type="sdd-code-reviewer",
|
|
709
|
+
model="{executor_model}"
|
|
710
|
+
)
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
If review produces findings, display advisory message. **Error handling:** Failures are non-blocking — catch and proceed.
|
|
714
|
+
|
|
715
|
+
---
|
|
716
|
+
|
|
717
|
+
**Step 6.5: Verification (only when `$VALIDATE_MODE`)**
|
|
581
718
|
|
|
582
|
-
Skip this step entirely if NOT `$
|
|
719
|
+
Skip this step entirely if NOT `$VALIDATE_MODE`.
|
|
583
720
|
|
|
584
721
|
Display banner:
|
|
585
722
|
```
|
|
@@ -636,7 +773,7 @@ Read STATE.md and check for `### Quick Tasks Completed` section.
|
|
|
636
773
|
|
|
637
774
|
Insert after `### Blockers/Concerns` section:
|
|
638
775
|
|
|
639
|
-
**If `$
|
|
776
|
+
**If `$VALIDATE_MODE`:**
|
|
640
777
|
```markdown
|
|
641
778
|
### Quick Tasks Completed
|
|
642
779
|
|
|
@@ -644,7 +781,7 @@ Insert after `### Blockers/Concerns` section:
|
|
|
644
781
|
|---|-------------|------|--------|--------|-----------|
|
|
645
782
|
```
|
|
646
783
|
|
|
647
|
-
**If NOT `$
|
|
784
|
+
**If NOT `$VALIDATE_MODE`:**
|
|
648
785
|
```markdown
|
|
649
786
|
### Quick Tasks Completed
|
|
650
787
|
|
|
@@ -652,18 +789,18 @@ Insert after `### Blockers/Concerns` section:
|
|
|
652
789
|
|---|-------------|------|--------|-----------|
|
|
653
790
|
```
|
|
654
791
|
|
|
655
|
-
**Note:** If the table already exists, match its existing column format. If adding `--full` to a project that already has quick tasks without a Status column, add the Status column to the header and separator rows, and leave Status empty for the new row's predecessors.
|
|
792
|
+
**Note:** If the table already exists, match its existing column format. If adding `--validate` (or `--full`) to a project that already has quick tasks without a Status column, add the Status column to the header and separator rows, and leave Status empty for the new row's predecessors.
|
|
656
793
|
|
|
657
794
|
**7c. Append new row to table:**
|
|
658
795
|
|
|
659
796
|
Use `date` from init:
|
|
660
797
|
|
|
661
|
-
**If `$
|
|
798
|
+
**If `$VALIDATE_MODE` (or table has Status column):**
|
|
662
799
|
```markdown
|
|
663
800
|
| ${quick_id} | ${DESCRIPTION} | ${date} | ${commit_hash} | ${VERIFICATION_STATUS} | [${quick_id}-${slug}](./quick/${quick_id}-${slug}/) |
|
|
664
801
|
```
|
|
665
802
|
|
|
666
|
-
**If NOT `$
|
|
803
|
+
**If NOT `$VALIDATE_MODE` (and table has no Status column):**
|
|
667
804
|
```markdown
|
|
668
805
|
| ${quick_id} | ${DESCRIPTION} | ${date} | ${commit_hash} | [${quick_id}-${slug}](./quick/${quick_id}-${slug}/) |
|
|
669
806
|
```
|
|
@@ -681,7 +818,7 @@ Use Edit tool to make these changes atomically
|
|
|
681
818
|
|
|
682
819
|
**Step 8: Final commit and completion**
|
|
683
820
|
|
|
684
|
-
Stage and commit quick task artifacts
|
|
821
|
+
Stage and commit quick task artifacts. This step MUST always run — even if the executor already committed some files (e.g. when running without worktree isolation). The `sdd-tools commit` command handles already-committed files gracefully.
|
|
685
822
|
|
|
686
823
|
Build file list:
|
|
687
824
|
- `${QUICK_DIR}/${quick_id}-PLAN.md`
|
|
@@ -689,9 +826,19 @@ Build file list:
|
|
|
689
826
|
- `.planning/STATE.md`
|
|
690
827
|
- If `$DISCUSS_MODE` and context file exists: `${QUICK_DIR}/${quick_id}-CONTEXT.md`
|
|
691
828
|
- If `$RESEARCH_MODE` and research file exists: `${QUICK_DIR}/${quick_id}-RESEARCH.md`
|
|
692
|
-
- If `$
|
|
829
|
+
- If `$VALIDATE_MODE` and verification file exists: `${QUICK_DIR}/${quick_id}-VERIFICATION.md`
|
|
693
830
|
|
|
694
831
|
```bash
|
|
832
|
+
# Explicitly stage all artifacts before commit — PLAN.md may be untracked
|
|
833
|
+
# if the executor ran without worktree isolation and committed docs early
|
|
834
|
+
# Filter .planning/ files from staging if commit_docs is disabled (#1783)
|
|
835
|
+
COMMIT_DOCS=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get commit_docs 2>/dev/null || echo "true")
|
|
836
|
+
if [ "$COMMIT_DOCS" = "false" ]; then
|
|
837
|
+
file_list_filtered=$(echo "${file_list}" | tr ' ' '\n' | grep -v '^\.planning/' | tr '\n' ' ')
|
|
838
|
+
git add ${file_list_filtered} 2>/dev/null
|
|
839
|
+
else
|
|
840
|
+
git add ${file_list} 2>/dev/null
|
|
841
|
+
fi
|
|
695
842
|
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs(quick-${quick_id}): ${DESCRIPTION}" --files ${file_list}
|
|
696
843
|
```
|
|
697
844
|
|
|
@@ -702,11 +849,11 @@ commit_hash=$(git rev-parse --short HEAD)
|
|
|
702
849
|
|
|
703
850
|
Display completion output:
|
|
704
851
|
|
|
705
|
-
**If `$
|
|
852
|
+
**If `$VALIDATE_MODE`:**
|
|
706
853
|
```
|
|
707
854
|
---
|
|
708
855
|
|
|
709
|
-
SDD > QUICK TASK COMPLETE (
|
|
856
|
+
SDD > QUICK TASK COMPLETE (VALIDATED)
|
|
710
857
|
|
|
711
858
|
Quick Task ${quick_id}: ${DESCRIPTION}
|
|
712
859
|
|
|
@@ -717,10 +864,10 @@ Commit: ${commit_hash}
|
|
|
717
864
|
|
|
718
865
|
---
|
|
719
866
|
|
|
720
|
-
Ready for next task: /sdd
|
|
867
|
+
Ready for next task: /sdd-quick ${SDD_WS}
|
|
721
868
|
```
|
|
722
869
|
|
|
723
|
-
**If NOT `$
|
|
870
|
+
**If NOT `$VALIDATE_MODE`:**
|
|
724
871
|
```
|
|
725
872
|
---
|
|
726
873
|
|
|
@@ -734,7 +881,7 @@ Commit: ${commit_hash}
|
|
|
734
881
|
|
|
735
882
|
---
|
|
736
883
|
|
|
737
|
-
Ready for next task: /sdd
|
|
884
|
+
Ready for next task: /sdd-quick ${SDD_WS}
|
|
738
885
|
```
|
|
739
886
|
|
|
740
887
|
</process>
|
|
@@ -742,16 +889,17 @@ Ready for next task: /sdd:quick ${SDD_WS}
|
|
|
742
889
|
<success_criteria>
|
|
743
890
|
- [ ] ROADMAP.md validation passes
|
|
744
891
|
- [ ] User provides task description
|
|
745
|
-
- [ ] `--full`, `--discuss`, and `--research` flags parsed from arguments when present
|
|
892
|
+
- [ ] `--full`, `--validate`, `--discuss`, and `--research` flags parsed from arguments when present
|
|
893
|
+
- [ ] `--full` sets all booleans (`$FULL_MODE`, `$DISCUSS_MODE`, `$RESEARCH_MODE`, `$VALIDATE_MODE`)
|
|
746
894
|
- [ ] Slug generated (lowercase, hyphens, max 40 chars)
|
|
747
895
|
- [ ] Quick ID generated (YYMMDD-xxx format, 2s Base36 precision)
|
|
748
896
|
- [ ] Directory created at `.planning/quick/YYMMDD-xxx-slug/`
|
|
749
897
|
- [ ] (--discuss) Gray areas identified and presented, decisions captured in `${quick_id}-CONTEXT.md`
|
|
750
898
|
- [ ] (--research) Research agent spawned, `${quick_id}-RESEARCH.md` created
|
|
751
899
|
- [ ] `${quick_id}-PLAN.md` created by planner (honors CONTEXT.md decisions when --discuss, uses RESEARCH.md findings when --research)
|
|
752
|
-
- [ ] (--
|
|
900
|
+
- [ ] (--validate) Plan checker validates plan, revision loop capped at 2
|
|
753
901
|
- [ ] `${quick_id}-SUMMARY.md` created by executor
|
|
754
|
-
- [ ] (--
|
|
755
|
-
- [ ] STATE.md updated with quick task row (Status column when --
|
|
902
|
+
- [ ] (--validate) `${quick_id}-VERIFICATION.md` created by verifier
|
|
903
|
+
- [ ] STATE.md updated with quick task row (Status column when --validate)
|
|
756
904
|
- [ ] Artifacts committed
|
|
757
905
|
</success_criteria>
|
|
@@ -11,15 +11,15 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
11
11
|
<step name="parse_arguments">
|
|
12
12
|
Parse the command arguments:
|
|
13
13
|
- Argument is the phase number to remove (integer or decimal)
|
|
14
|
-
- Example: `/sdd
|
|
15
|
-
- Example: `/sdd
|
|
14
|
+
- Example: `/sdd-remove-phase 17` → phase = 17
|
|
15
|
+
- Example: `/sdd-remove-phase 16.1` → phase = 16.1
|
|
16
16
|
|
|
17
17
|
If no argument provided:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
ERROR: Phase number required
|
|
21
|
-
Usage: /sdd
|
|
22
|
-
Example: /sdd
|
|
21
|
+
Usage: /sdd-remove-phase <phase-number>
|
|
22
|
+
Example: /sdd-remove-phase 17
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Exit.
|
|
@@ -53,7 +53,7 @@ Only future phases can be removed:
|
|
|
53
53
|
- Current phase: {current}
|
|
54
54
|
- Phase {target} is current or completed
|
|
55
55
|
|
|
56
|
-
To abandon current work, use /sdd
|
|
56
|
+
To abandon current work, use /sdd-pause-work instead.
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Exit.
|
|
@@ -126,7 +126,7 @@ Changes:
|
|
|
126
126
|
## What's Next
|
|
127
127
|
|
|
128
128
|
Would you like to:
|
|
129
|
-
- `/sdd
|
|
129
|
+
- `/sdd-progress` — see updated roadmap status
|
|
130
130
|
- Continue with current phase
|
|
131
131
|
- Review roadmap
|
|
132
132
|
|
|
@@ -21,8 +21,10 @@ Parse JSON for: `workspace_name`, `workspace_path`, `has_manifest`, `strategy`,
|
|
|
21
21
|
|
|
22
22
|
**If no workspace name provided:**
|
|
23
23
|
|
|
24
|
-
First run `/sdd
|
|
24
|
+
First run `/sdd-list-workspaces` to show available workspaces, then ask:
|
|
25
25
|
|
|
26
|
+
|
|
27
|
+
**Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
26
28
|
Use AskUserQuestion:
|
|
27
29
|
- header: "Remove Workspace"
|
|
28
30
|
- question: "Which workspace do you want to remove?"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<purpose>
|
|
2
2
|
Research how to implement a phase. Spawns sdd-phase-researcher with phase context.
|
|
3
3
|
|
|
4
|
-
Standalone research command. For most workflows, use `/sdd
|
|
4
|
+
Standalone research command. For most workflows, use `/sdd-plan-phase` which integrates research automatically.
|
|
5
5
|
</purpose>
|
|
6
6
|
|
|
7
7
|
<available_agent_types>
|
|
@@ -54,7 +54,7 @@ Research implementation approach for Phase {phase}: {name}
|
|
|
54
54
|
</objective>
|
|
55
55
|
|
|
56
56
|
<files_to_read>
|
|
57
|
-
- {context_path} (USER DECISIONS from /sdd
|
|
57
|
+
- {context_path} (USER DECISIONS from /sdd-discuss-phase)
|
|
58
58
|
- {requirements_path} (Project requirements)
|
|
59
59
|
- {state_path} (Project decisions and history)
|
|
60
60
|
</files_to_read>
|
|
@@ -28,7 +28,7 @@ Parse JSON for: `state_exists`, `roadmap_exists`, `project_exists`, `planning_ex
|
|
|
28
28
|
|
|
29
29
|
**If `state_exists` is true:** Proceed to load_state
|
|
30
30
|
**If `state_exists` is false but `roadmap_exists` or `project_exists` is true:** Offer to reconstruct STATE.md
|
|
31
|
-
**If `planning_exists` is false:** This is a new project - route to /sdd
|
|
31
|
+
**If `planning_exists` is false:** This is a new project - route to /sdd-new-project
|
|
32
32
|
</step>
|
|
33
33
|
|
|
34
34
|
<step name="load_state">
|
|
@@ -84,7 +84,7 @@ fi
|
|
|
84
84
|
|
|
85
85
|
**If HANDOFF.json exists:**
|
|
86
86
|
|
|
87
|
-
- This is the primary resumption source — structured data from `/sdd
|
|
87
|
+
- This is the primary resumption source — structured data from `/sdd-pause-work`
|
|
88
88
|
- Parse `status`, `phase`, `plan`, `task`, `total_tasks`, `next_action`
|
|
89
89
|
- Check `blockers` and `human_actions_pending` — surface these immediately
|
|
90
90
|
- Check `completed_tasks` for `in_progress` items — these need attention first
|
|
@@ -140,7 +140,7 @@ Present complete project status to user:
|
|
|
140
140
|
Resume with: Task tool (resume parameter with agent ID)
|
|
141
141
|
|
|
142
142
|
[If pending todos exist:]
|
|
143
|
-
📋 [N] pending todos — /sdd
|
|
143
|
+
📋 [N] pending todos — /sdd-check-todos to review
|
|
144
144
|
|
|
145
145
|
[If blockers exist:]
|
|
146
146
|
⚠️ Carried concerns:
|
|
@@ -200,11 +200,11 @@ What would you like to do?
|
|
|
200
200
|
[Primary action based on state - e.g.:]
|
|
201
201
|
1. Resume interrupted agent [if interrupted agent found]
|
|
202
202
|
OR
|
|
203
|
-
1. Execute phase (/sdd
|
|
203
|
+
1. Execute phase (/sdd-execute-phase {phase} ${SDD_WS})
|
|
204
204
|
OR
|
|
205
|
-
1. Discuss Phase 3 context (/sdd
|
|
205
|
+
1. Discuss Phase 3 context (/sdd-discuss-phase 3 ${SDD_WS}) [if CONTEXT.md missing]
|
|
206
206
|
OR
|
|
207
|
-
1. Plan Phase 3 (/sdd
|
|
207
|
+
1. Plan Phase 3 (/sdd-plan-phase 3 ${SDD_WS}) [if CONTEXT.md exists or discuss option declined]
|
|
208
208
|
|
|
209
209
|
[Secondary options:]
|
|
210
210
|
2. Review current phase status
|
|
@@ -235,9 +235,9 @@ Based on user selection, route to appropriate workflow:
|
|
|
235
235
|
|
|
236
236
|
**{phase}-{plan}: [Plan Name]** — [objective from PLAN.md]
|
|
237
237
|
|
|
238
|
-
`/
|
|
238
|
+
`/clear` then:
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
`/sdd-execute-phase {phase} ${SDD_WS}`
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
```
|
|
@@ -249,15 +249,15 @@ Based on user selection, route to appropriate workflow:
|
|
|
249
249
|
|
|
250
250
|
**Phase [N]: [Name]** — [Goal from ROADMAP.md]
|
|
251
251
|
|
|
252
|
-
`/
|
|
252
|
+
`/clear` then:
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
`/sdd-plan-phase [phase-number] ${SDD_WS}`
|
|
255
255
|
|
|
256
256
|
---
|
|
257
257
|
|
|
258
258
|
**Also available:**
|
|
259
|
-
- `/sdd
|
|
260
|
-
- `/sdd
|
|
259
|
+
- `/sdd-discuss-phase [N] ${SDD_WS}` — gather context first
|
|
260
|
+
- `/sdd-research-phase [N] ${SDD_WS}` — investigate unknowns
|
|
261
261
|
|
|
262
262
|
---
|
|
263
263
|
```
|