@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
|
@@ -72,7 +72,7 @@ grep -n "type=\"checkpoint" .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
|
72
72
|
| Verify-only | B (segmented) | Segments between checkpoints. After none/human-verify → SUBAGENT. After decision/human-action → MAIN |
|
|
73
73
|
| Decision | C (main) | Execute entirely in main context |
|
|
74
74
|
|
|
75
|
-
**Pattern A:** init_agent_tracking → spawn Task(subagent_type="sdd-executor", model=executor_model
|
|
75
|
+
**Pattern A:** init_agent_tracking → capture `EXPECTED_BASE=$(git rev-parse HEAD)` → spawn Task(subagent_type="sdd-executor", model=executor_model) with prompt: execute plan at [path], autonomous, all tasks + SUMMARY + commit, follow deviation/auth rules, report: plan name, tasks, SUMMARY path, commit hash → track agent_id → wait → update tracking → report. **Include `isolation="worktree"` only if `workflow.use_worktrees` is not `false`** (read via `config-get workflow.use_worktrees`). **When using `isolation="worktree"`, include a `<worktree_branch_check>` block in the prompt** instructing the executor to run `git merge-base HEAD {EXPECTED_BASE}` and, if the result differs from `{EXPECTED_BASE}`, hard-reset the branch with `git reset --hard {EXPECTED_BASE}` before starting work (safe — runs before any agent work), then verify with `[ "$(git rev-parse HEAD)" != "{EXPECTED_BASE}" ] && exit 1`. This corrects a known issue where `EnterWorktree` creates branches from `main` instead of the feature branch HEAD (affects all platforms).
|
|
76
76
|
|
|
77
77
|
**Pattern B:** Execute segment-by-segment. Autonomous segments: spawn subagent for assigned tasks only (no SUMMARY/commit). Checkpoints: main context. After all segments: aggregate, create SUMMARY, commit. See segment_execution.
|
|
78
78
|
|
|
@@ -110,6 +110,8 @@ Pattern B only (verify-only checkpoints). Skip for A/C.
|
|
|
110
110
|
3. After ALL segments: aggregate files/deviations/decisions → create SUMMARY.md → commit → self-check:
|
|
111
111
|
- Verify key-files.created exist on disk with `[ -f ]`
|
|
112
112
|
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
|
|
113
|
+
- Re-run ALL `<acceptance_criteria>` from every task — if any fail, fix before finalizing SUMMARY
|
|
114
|
+
- Re-run the plan-level `<verification>` commands — log results in SUMMARY
|
|
113
115
|
- Append `## Self-Check: PASSED` or `## Self-Check: FAILED` to SUMMARY
|
|
114
116
|
|
|
115
117
|
**Known Claude Code bug (classifyHandoffIfNeeded):** If any segment agent reports "failed" with `classifyHandoffIfNeeded is not defined`, this is a Claude Code runtime bug — not a real failure. Run spot-checks; if they pass, treat as successful.
|
|
@@ -133,6 +135,8 @@ This IS the execution instructions. Follow exactly. If plan references CONTEXT.m
|
|
|
133
135
|
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" phases list --type summaries --raw
|
|
134
136
|
# Extract the second-to-last summary from the JSON result
|
|
135
137
|
```
|
|
138
|
+
|
|
139
|
+
**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.
|
|
136
140
|
If previous SUMMARY has unresolved "Issues Encountered" or "Next Phase Readiness" blockers: AskUserQuestion(header="Previous Issues", options: "Proceed anyway" | "Address first" | "Review previous").
|
|
137
141
|
</step>
|
|
138
142
|
|
|
@@ -145,7 +149,13 @@ Deviations are normal — handle via rules below.
|
|
|
145
149
|
- **MANDATORY read_first gate:** If the task has a `<read_first>` field, you MUST read every listed file BEFORE making any edits. This is not optional. Do not skip files because you "already know" what's in them — read them. The read_first files establish ground truth for the task.
|
|
146
150
|
- `type="auto"`: if `tdd="true"` → TDD execution. Implement with deviation rules + auth gates. Verify done criteria. Commit (see task_commit). Track hash for Summary.
|
|
147
151
|
- `type="checkpoint:*"`: STOP → checkpoint_protocol → wait for user → continue only after confirmation.
|
|
148
|
-
- **
|
|
152
|
+
- **HARD GATE — acceptance_criteria verification:** After completing each task, if it has `<acceptance_criteria>`, you MUST run a verification loop before proceeding:
|
|
153
|
+
1. For each criterion: execute the grep, file check, or CLI command that proves it passes
|
|
154
|
+
2. Log each result as PASS or FAIL with the command output
|
|
155
|
+
3. If ANY criterion fails: fix the implementation immediately, then re-run ALL criteria
|
|
156
|
+
4. Repeat until all criteria pass — you are BLOCKED from starting the next task until this gate clears
|
|
157
|
+
5. If a criterion cannot be satisfied after 2 fix attempts, log it as a deviation with reason — do NOT silently skip it
|
|
158
|
+
This is not advisory. A task with failing acceptance criteria is an incomplete task.
|
|
149
159
|
3. Run `<verification>` checks
|
|
150
160
|
4. Confirm `<success_criteria>` met
|
|
151
161
|
5. Document deviations in Summary
|
|
@@ -178,32 +188,12 @@ Auth errors during execution are NOT failures — they're expected interaction p
|
|
|
178
188
|
|
|
179
189
|
## Deviation Rules
|
|
180
190
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
| **3: Blocking** | Prevents completion: missing deps, wrong types, broken imports, missing env/config/files, circular deps | Fix blocker → verify proceeds → track `[Rule 3 - Blocking]` | Auto |
|
|
188
|
-
| **4: Architectural** | Structural change: new DB table, schema change, new service, switching libs, breaking API, new infra | STOP → present decision (below) → track `[Rule 4 - Architectural]` | Ask user |
|
|
189
|
-
|
|
190
|
-
**Rule 4 format:**
|
|
191
|
-
```
|
|
192
|
-
⚠️ Architectural Decision Needed
|
|
193
|
-
|
|
194
|
-
Current task: [task name]
|
|
195
|
-
Discovery: [what prompted this]
|
|
196
|
-
Proposed change: [modification]
|
|
197
|
-
Why needed: [rationale]
|
|
198
|
-
Impact: [what this affects]
|
|
199
|
-
Alternatives: [other approaches]
|
|
200
|
-
|
|
201
|
-
Proceed with proposed change? (yes / different approach / defer)
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Priority:** Rule 4 (STOP) > Rules 1-3 (auto) > unsure → Rule 4
|
|
205
|
-
**Edge cases:** missing validation → R2 | null crash → R1 | new table → R4 | new column → R1/2
|
|
206
|
-
**Heuristic:** Affects correctness/security/completion? → R1-3. Maybe? → R4.
|
|
191
|
+
Apply deviation rules from the sdd-executor agent definition (single source of truth):
|
|
192
|
+
- **Rules 1-3** (bugs, missing critical, blockers): auto-fix, test, verify, track as deviations
|
|
193
|
+
- **Rule 4** (architectural changes): STOP, present decision to user, await approval
|
|
194
|
+
- **Scope boundary**: do not auto-fix pre-existing issues unrelated to current task
|
|
195
|
+
- **Fix attempt limit**: max 3 retries per deviation before escalating
|
|
196
|
+
- **Priority**: Rule 4 (STOP) > Rules 1-3 (auto) > unsure → Rule 4
|
|
207
197
|
|
|
208
198
|
</deviation_rules>
|
|
209
199
|
|
|
@@ -256,59 +246,13 @@ If a commit is BLOCKED by a hook:
|
|
|
256
246
|
<task_commit>
|
|
257
247
|
## Task Commit Protocol
|
|
258
248
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
git add src/types/user.ts
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
**3. Commit type:**
|
|
270
|
-
|
|
271
|
-
| Type | When | Example |
|
|
272
|
-
|------|------|---------|
|
|
273
|
-
| `feat` | New functionality | feat(08-02): create user registration endpoint |
|
|
274
|
-
| `fix` | Bug fix | fix(08-02): correct email validation regex |
|
|
275
|
-
| `test` | Test-only (TDD RED) | test(08-02): add failing test for password hashing |
|
|
276
|
-
| `refactor` | No behavior change (TDD REFACTOR) | refactor(08-02): extract validation to helper |
|
|
277
|
-
| `perf` | Performance | perf(08-02): add database index |
|
|
278
|
-
| `docs` | Documentation | docs(08-02): add API docs |
|
|
279
|
-
| `style` | Formatting | style(08-02): format auth module |
|
|
280
|
-
| `chore` | Config/deps | chore(08-02): add bcrypt dependency |
|
|
281
|
-
|
|
282
|
-
**4. Format:** `{type}({phase}-{plan}): {description}` with bullet points for key changes.
|
|
283
|
-
|
|
284
|
-
<sub_repos_commit_flow>
|
|
285
|
-
**Sub-repos mode:** If `sub_repos` is configured (non-empty array from init context), use `commit-to-subrepo` instead of standard git commit. This routes files to their correct sub-repo based on path prefix.
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
node ~/.claude/sdd/bin/sdd-tools.cjs commit-to-subrepo "{type}({phase}-{plan}): {description}" --files file1 file2 ...
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
The command groups files by sub-repo prefix and commits atomically to each. Returns JSON: `{ committed: true, repos: { "backend": { hash: "abc", files: [...] }, ... } }`.
|
|
292
|
-
|
|
293
|
-
Record hashes from each repo in the response for SUMMARY tracking.
|
|
294
|
-
|
|
295
|
-
**If `sub_repos` is empty or not set:** Use standard git commit flow below.
|
|
296
|
-
</sub_repos_commit_flow>
|
|
297
|
-
|
|
298
|
-
**5. Record hash:**
|
|
299
|
-
```bash
|
|
300
|
-
TASK_COMMIT=$(git rev-parse --short HEAD)
|
|
301
|
-
TASK_COMMITS+=("Task ${TASK_NUM}: ${TASK_COMMIT}")
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
**6. Check for untracked generated files:**
|
|
305
|
-
```bash
|
|
306
|
-
git status --short | grep '^??'
|
|
307
|
-
```
|
|
308
|
-
If new untracked files appeared after running scripts or tools, decide for each:
|
|
309
|
-
- **Commit it** — if it's a source file, config, or intentional artifact
|
|
310
|
-
- **Add to .gitignore** — if it's a generated/runtime output (build artifacts, `.env` files, cache files, compiled output)
|
|
311
|
-
- Do NOT leave generated files untracked
|
|
249
|
+
Follow the task commit protocol from the sdd-executor agent definition (single source of truth):
|
|
250
|
+
- Stage files individually (NEVER `git add .` or `git add -A`)
|
|
251
|
+
- Format: `{type}({phase}-{plan}): {concise description}` with bullet points for key changes
|
|
252
|
+
- Types: feat, fix, test, refactor, perf, docs, style, chore
|
|
253
|
+
- Sub-repos: use `commit-to-subrepo` when `sub_repos` is configured
|
|
254
|
+
- Record commit hash for SUMMARY tracking
|
|
255
|
+
- Check for untracked generated files after each commit
|
|
312
256
|
|
|
313
257
|
</task_commit>
|
|
314
258
|
|
|
@@ -396,19 +340,29 @@ Next: more plans → "Ready for {next-plan}" | last → "Phase complete, ready f
|
|
|
396
340
|
</step>
|
|
397
341
|
|
|
398
342
|
<step name="update_current_position">
|
|
343
|
+
**Skip this step if running in parallel mode** (the orchestrator in execute-phase.md
|
|
344
|
+
handles STATE.md/ROADMAP.md updates centrally after merging worktrees to avoid
|
|
345
|
+
merge conflicts).
|
|
346
|
+
|
|
399
347
|
Update STATE.md using sdd-tools:
|
|
400
348
|
|
|
401
349
|
```bash
|
|
402
|
-
#
|
|
403
|
-
|
|
350
|
+
# Auto-detect parallel mode: .git is a file in worktrees, a directory in main repo
|
|
351
|
+
IS_WORKTREE=$([ -f .git ] && echo "true" || echo "false")
|
|
352
|
+
|
|
353
|
+
# Skip in parallel mode — orchestrator handles STATE.md centrally
|
|
354
|
+
if [ "$IS_WORKTREE" != "true" ]; then
|
|
355
|
+
# Advance plan counter (handles last-plan edge case)
|
|
356
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" state advance-plan
|
|
404
357
|
|
|
405
|
-
# Recalculate progress bar from disk state
|
|
406
|
-
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" state update-progress
|
|
358
|
+
# Recalculate progress bar from disk state
|
|
359
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" state update-progress
|
|
407
360
|
|
|
408
|
-
# Record execution metrics
|
|
409
|
-
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" state record-metric \
|
|
410
|
-
|
|
411
|
-
|
|
361
|
+
# Record execution metrics
|
|
362
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" state record-metric \
|
|
363
|
+
--phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
|
|
364
|
+
--tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
|
|
365
|
+
fi
|
|
412
366
|
```
|
|
413
367
|
</step>
|
|
414
368
|
|
|
@@ -443,8 +397,17 @@ If SUMMARY "Issues Encountered" ≠ "None": yolo → log and continue. Interacti
|
|
|
443
397
|
</step>
|
|
444
398
|
|
|
445
399
|
<step name="update_roadmap">
|
|
400
|
+
**Skip this step if running in parallel mode** (the orchestrator handles ROADMAP.md
|
|
401
|
+
updates centrally after merging worktrees).
|
|
402
|
+
|
|
446
403
|
```bash
|
|
447
|
-
|
|
404
|
+
# Auto-detect parallel mode: .git is a file in worktrees, a directory in main repo
|
|
405
|
+
IS_WORKTREE=$([ -f .git ] && echo "true" || echo "false")
|
|
406
|
+
|
|
407
|
+
# Skip in parallel mode — orchestrator handles ROADMAP.md centrally
|
|
408
|
+
if [ "$IS_WORKTREE" != "true" ]; then
|
|
409
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" roadmap update-plan-progress "${PHASE}"
|
|
410
|
+
fi
|
|
448
411
|
```
|
|
449
412
|
Counts PLAN vs SUMMARY files on disk. Updates progress table row with correct count and status (`In Progress` or `Complete` with date).
|
|
450
413
|
</step>
|
|
@@ -463,7 +426,15 @@ Extract requirement IDs from the plan's frontmatter (e.g., `requirements: [AUTH-
|
|
|
463
426
|
Task code already committed per-task. Commit plan metadata:
|
|
464
427
|
|
|
465
428
|
```bash
|
|
466
|
-
|
|
429
|
+
# Auto-detect parallel mode: .git is a file in worktrees, a directory in main repo
|
|
430
|
+
IS_WORKTREE=$([ -f .git ] && echo "true" || echo "false")
|
|
431
|
+
|
|
432
|
+
# In parallel mode: exclude STATE.md and ROADMAP.md (orchestrator commits these)
|
|
433
|
+
if [ "$IS_WORKTREE" = "true" ]; then
|
|
434
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/REQUIREMENTS.md
|
|
435
|
+
else
|
|
436
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
|
|
437
|
+
fi
|
|
467
438
|
```
|
|
468
439
|
</step>
|
|
469
440
|
|
|
@@ -492,9 +463,9 @@ If `USER_SETUP_CREATED=true`: display `⚠️ USER SETUP REQUIRED` with path + e
|
|
|
492
463
|
|
|
493
464
|
| Condition | Route | Action |
|
|
494
465
|
|-----------|-------|--------|
|
|
495
|
-
| summaries < plans | **A: More plans** | Find next PLAN without SUMMARY. Yolo: auto-continue. Interactive: show next plan, suggest `/sdd
|
|
496
|
-
| summaries = plans, current < highest phase | **B: Phase done** | Show completion, suggest `/sdd
|
|
497
|
-
| summaries = plans, current = highest phase | **C: Milestone done** | Show banner, suggest `/sdd
|
|
466
|
+
| summaries < plans | **A: More plans** | Find next PLAN without SUMMARY. Yolo: auto-continue. Interactive: show next plan, suggest `/sdd-execute-phase {phase}` + `/sdd-verify-work`. STOP here. |
|
|
467
|
+
| summaries = plans, current < highest phase | **B: Phase done** | Show completion, suggest `/sdd-plan-phase {Z+1}` + `/sdd-verify-work {Z}` + `/sdd-discuss-phase {Z+1}` |
|
|
468
|
+
| summaries = plans, current = highest phase | **C: Milestone done** | Show banner, suggest `/sdd-complete-milestone` + `/sdd-verify-work` + `/sdd-add-phase` |
|
|
498
469
|
|
|
499
470
|
All routes: `/clear` first for fresh context.
|
|
500
471
|
</step>
|
|
@@ -507,8 +478,8 @@ All routes: `/clear` first for fresh context.
|
|
|
507
478
|
- All verifications pass
|
|
508
479
|
- USER-SETUP.md generated if user_setup in frontmatter
|
|
509
480
|
- SUMMARY.md created with substantive content
|
|
510
|
-
- STATE.md updated (position, decisions, issues, session)
|
|
511
|
-
- ROADMAP.md updated
|
|
481
|
+
- STATE.md updated (position, decisions, issues, session) — unless parallel mode (orchestrator handles)
|
|
482
|
+
- ROADMAP.md updated — unless parallel mode (orchestrator handles)
|
|
512
483
|
- If codebase map exists: map updated with execution changes (or skipped if no significant changes)
|
|
513
484
|
- If USER-SETUP.md created: prominently surfaced in completion output
|
|
514
485
|
</success_criteria>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Socratic ideation workflow. Guides the developer through exploring an idea via probing questions,
|
|
3
|
+
offers mid-conversation research when useful, then routes crystallized outputs to SDD artifacts.
|
|
4
|
+
</purpose>
|
|
5
|
+
|
|
6
|
+
<required_reading>
|
|
7
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
8
|
+
|
|
9
|
+
@~/.claude/sdd/references/questioning.md
|
|
10
|
+
@~/.claude/sdd/references/domain-probes.md
|
|
11
|
+
</required_reading>
|
|
12
|
+
|
|
13
|
+
<available_agent_types>
|
|
14
|
+
Valid SDD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
15
|
+
- sdd-phase-researcher — Researches specific questions and returns concise findings
|
|
16
|
+
</available_agent_types>
|
|
17
|
+
|
|
18
|
+
<process>
|
|
19
|
+
|
|
20
|
+
## Step 1: Open the conversation
|
|
21
|
+
|
|
22
|
+
If a topic was provided, acknowledge it and begin exploring:
|
|
23
|
+
```
|
|
24
|
+
## Explore: {topic}
|
|
25
|
+
|
|
26
|
+
Let's think through this together. I'll ask questions to help clarify the idea
|
|
27
|
+
before we commit to any artifacts.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If no topic, ask:
|
|
31
|
+
```
|
|
32
|
+
## Explore
|
|
33
|
+
|
|
34
|
+
What's on your mind? This could be a feature idea, an architectural question,
|
|
35
|
+
a problem you're trying to solve, or something you're not sure about yet.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Step 2: Socratic conversation (2-5 exchanges)
|
|
39
|
+
|
|
40
|
+
Guide the conversation using principles from `questioning.md` and `domain-probes.md`:
|
|
41
|
+
|
|
42
|
+
- Ask **one question at a time** (never a list of questions)
|
|
43
|
+
- Questions should probe: constraints, tradeoffs, users, scope, dependencies, risks
|
|
44
|
+
- Use domain-specific probes contextually when the topic touches a known domain
|
|
45
|
+
- Listen for signals: "or" / "versus" / "tradeoff" indicate competing priorities worth exploring
|
|
46
|
+
- Reflect back what you hear to confirm understanding before moving forward
|
|
47
|
+
|
|
48
|
+
**Conversation should feel natural, not formulaic.** Avoid rigid sequences. Follow the developer's energy — if they're excited about one aspect, go deeper there.
|
|
49
|
+
|
|
50
|
+
## Step 3: Mid-conversation research offer (after 2-3 exchanges)
|
|
51
|
+
|
|
52
|
+
If the conversation surfaces factual questions, technology comparisons, or unknowns that research could resolve, offer:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
This touches on [specific question]. Want me to do a quick research pass before we continue?
|
|
56
|
+
This would take ~30 seconds and might surface useful context.
|
|
57
|
+
|
|
58
|
+
[Yes, research this] / [No, let's keep exploring]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If yes, spawn a research agent:
|
|
62
|
+
```
|
|
63
|
+
Task(
|
|
64
|
+
prompt="Quick research: {specific_question}. Return 3-5 key findings, no more than 200 words.",
|
|
65
|
+
subagent_type="sdd-phase-researcher"
|
|
66
|
+
)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Share findings and continue the conversation.
|
|
70
|
+
|
|
71
|
+
If the topic doesn't warrant research, skip this step entirely. **Don't force it.**
|
|
72
|
+
|
|
73
|
+
## Step 4: Crystallize outputs (after 3-6 exchanges)
|
|
74
|
+
|
|
75
|
+
When the conversation reaches natural conclusions or the developer signals readiness, propose outputs. Analyze the conversation to identify what was discussed and suggest **up to 4 outputs** from:
|
|
76
|
+
|
|
77
|
+
| Type | Destination | When to suggest |
|
|
78
|
+
|------|-------------|-----------------|
|
|
79
|
+
| Note | `.planning/notes/{slug}.md` | Observations, context, decisions worth remembering |
|
|
80
|
+
| Todo | `.planning/todos/pending/{slug}.md` | Concrete actionable tasks identified |
|
|
81
|
+
| Seed | `.planning/seeds/{slug}.md` | Forward-looking ideas with trigger conditions |
|
|
82
|
+
| Research question | `.planning/research/questions.md` (append) | Open questions that need deeper investigation |
|
|
83
|
+
| Requirement | `REQUIREMENTS.md` (append) | Clear requirements that emerged from discussion |
|
|
84
|
+
| New phase | `ROADMAP.md` (append) | Scope large enough to warrant its own phase |
|
|
85
|
+
|
|
86
|
+
Present suggestions:
|
|
87
|
+
```
|
|
88
|
+
Based on our conversation, I'd suggest capturing:
|
|
89
|
+
|
|
90
|
+
1. **Note:** "Authentication strategy decisions" — your reasoning about JWT vs sessions
|
|
91
|
+
2. **Todo:** "Evaluate Passport.js vs custom middleware" — the comparison you want to do
|
|
92
|
+
3. **Seed:** "OAuth2 provider support" — trigger: when user management phase starts
|
|
93
|
+
|
|
94
|
+
Create these? You can select specific ones or modify them.
|
|
95
|
+
|
|
96
|
+
[Create all] / [Let me pick] / [Skip — just exploring]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Never write artifacts without explicit user selection.**
|
|
100
|
+
|
|
101
|
+
## Step 5: Write selected outputs
|
|
102
|
+
|
|
103
|
+
For each selected output, write the file:
|
|
104
|
+
|
|
105
|
+
- **Notes:** Create `.planning/notes/{slug}.md` with frontmatter (title, date, context)
|
|
106
|
+
- **Todos:** Create `.planning/todos/pending/{slug}.md` with frontmatter (title, date, priority)
|
|
107
|
+
- **Seeds:** Create `.planning/seeds/{slug}.md` with frontmatter (title, trigger_condition, planted_date)
|
|
108
|
+
- **Research questions:** Append to `.planning/research/questions.md`
|
|
109
|
+
- **Requirements:** Append to `.planning/REQUIREMENTS.md` with next available REQ ID
|
|
110
|
+
- **Phases:** Use existing `/sdd-add-phase` command via SlashCommand
|
|
111
|
+
|
|
112
|
+
Commit if `commit_docs` is enabled:
|
|
113
|
+
```bash
|
|
114
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs: capture exploration — {topic_slug}" --files {file_list}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Step 6: Close
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
## Exploration Complete
|
|
121
|
+
|
|
122
|
+
**Topic:** {topic}
|
|
123
|
+
**Outputs:** {count} artifact(s) created
|
|
124
|
+
{list of created files}
|
|
125
|
+
|
|
126
|
+
Continue exploring with `/sdd-explore` or start working with `/sdd-next`.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</process>
|
|
130
|
+
|
|
131
|
+
<success_criteria>
|
|
132
|
+
- [ ] Socratic conversation follows questioning.md principles
|
|
133
|
+
- [ ] Questions asked one at a time, not in batches
|
|
134
|
+
- [ ] Research offered contextually (not forced)
|
|
135
|
+
- [ ] Up to 4 outputs proposed from conversation
|
|
136
|
+
- [ ] User explicitly selects which outputs to create
|
|
137
|
+
- [ ] Files written to correct destinations
|
|
138
|
+
- [ ] Commit respects commit_docs config
|
|
139
|
+
</success_criteria>
|
package/sdd/workflows/fast.md
CHANGED
|
@@ -5,7 +5,7 @@ no research, no plan checking. Just: understand → do → commit → log.
|
|
|
5
5
|
For tasks like: fix a typo, update a config value, add a missing import, rename a
|
|
6
6
|
variable, commit uncommitted work, add a .gitignore entry, bump a version number.
|
|
7
7
|
|
|
8
|
-
Use /sdd
|
|
8
|
+
Use /sdd-quick for anything that needs multi-step planning or research.
|
|
9
9
|
</purpose>
|
|
10
10
|
|
|
11
11
|
<process>
|
|
@@ -34,8 +34,8 @@ If the task seems non-trivial (multi-file refactor, new feature, needs research)
|
|
|
34
34
|
say:
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
-
This looks like it needs planning. Use /sdd
|
|
38
|
-
/sdd
|
|
37
|
+
This looks like it needs planning. Use /sdd-quick instead:
|
|
38
|
+
/sdd-quick "{task description}"
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
And stop.
|
|
@@ -93,8 +93,8 @@ No next-step suggestions. No workflow routing. Just done.
|
|
|
93
93
|
- NEVER spawn a Task/subagent — this runs inline
|
|
94
94
|
- NEVER create PLAN.md or SUMMARY.md files
|
|
95
95
|
- NEVER run research or plan-checking
|
|
96
|
-
- If the task takes more than 3 file edits, STOP and redirect to /sdd
|
|
97
|
-
- If you're unsure how to implement it, STOP and redirect to /sdd
|
|
96
|
+
- If the task takes more than 3 file edits, STOP and redirect to /sdd-quick
|
|
97
|
+
- If you're unsure how to implement it, STOP and redirect to /sdd-quick
|
|
98
98
|
</guardrails>
|
|
99
99
|
|
|
100
100
|
<success_criteria>
|
|
@@ -207,11 +207,11 @@ Based on the evidence above, the most likely explanation is:
|
|
|
207
207
|
|
|
208
208
|
1. {Specific, actionable remediation step}
|
|
209
209
|
2. {Another step if applicable}
|
|
210
|
-
3. {Recovery command if applicable — e.g., `/sdd
|
|
210
|
+
3. {Recovery command if applicable — e.g., `/sdd-resume-work`, `/sdd-execute-phase N`}
|
|
211
211
|
|
|
212
212
|
---
|
|
213
213
|
|
|
214
|
-
*Report generated by `/sdd
|
|
214
|
+
*Report generated by `/sdd-forensics`. All paths redacted for portability.*
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
**Redaction rules:**
|
package/sdd/workflows/health.md
CHANGED
|
@@ -62,10 +62,10 @@ Errors: N | Warnings: N | Info: N
|
|
|
62
62
|
## Errors
|
|
63
63
|
|
|
64
64
|
- [E001] config.json: JSON parse error at line 5
|
|
65
|
-
Fix: Run /sdd
|
|
65
|
+
Fix: Run /sdd-health --repair to reset to defaults
|
|
66
66
|
|
|
67
67
|
- [E002] PROJECT.md not found
|
|
68
|
-
Fix: Run /sdd
|
|
68
|
+
Fix: Run /sdd-new-project to create
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
**If warnings exist:**
|
|
@@ -90,7 +90,7 @@ Errors: N | Warnings: N | Info: N
|
|
|
90
90
|
**Footer (if repairable issues exist and --repair was NOT used):**
|
|
91
91
|
```
|
|
92
92
|
---
|
|
93
|
-
N issues can be auto-repaired. Run: /sdd
|
|
93
|
+
N issues can be auto-repaired. Run: /sdd-health --repair
|
|
94
94
|
```
|
|
95
95
|
</step>
|
|
96
96
|
|
|
@@ -100,7 +100,7 @@ N issues can be auto-repaired. Run: /sdd:health --repair
|
|
|
100
100
|
Ask user if they want to run repairs:
|
|
101
101
|
|
|
102
102
|
```
|
|
103
|
-
Would you like to run /sdd
|
|
103
|
+
Would you like to run /sdd-health --repair to fix N issues automatically?
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
If yes, re-run with --repair flag and display results.
|