@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
|
@@ -4,20 +4,20 @@ Model profiles control which Claude model each SDD agent uses. This allows balan
|
|
|
4
4
|
|
|
5
5
|
## Profile Definitions
|
|
6
6
|
|
|
7
|
-
| Agent | `quality` | `balanced` | `budget` | `inherit` |
|
|
8
|
-
|
|
9
|
-
| sdd-planner | opus | opus | sonnet | inherit |
|
|
10
|
-
| sdd-roadmapper | opus | sonnet | sonnet | inherit |
|
|
11
|
-
| sdd-executor | opus | sonnet | sonnet | inherit |
|
|
12
|
-
| sdd-phase-researcher | opus | sonnet | haiku | inherit |
|
|
13
|
-
| sdd-project-researcher | opus | sonnet | haiku | inherit |
|
|
14
|
-
| sdd-research-synthesizer | sonnet | sonnet | haiku | inherit |
|
|
15
|
-
| sdd-debugger | opus | sonnet | sonnet | inherit |
|
|
16
|
-
| sdd-codebase-mapper | sonnet | haiku | haiku | inherit |
|
|
17
|
-
| sdd-verifier | sonnet | sonnet | haiku | inherit |
|
|
18
|
-
| sdd-plan-checker | sonnet | sonnet | haiku | inherit |
|
|
19
|
-
| sdd-integration-checker | sonnet | sonnet | haiku | inherit |
|
|
20
|
-
| sdd-nyquist-auditor | sonnet | sonnet | haiku | inherit |
|
|
7
|
+
| Agent | `quality` | `balanced` | `budget` | `adaptive` | `inherit` |
|
|
8
|
+
|-------|-----------|------------|----------|------------|-----------|
|
|
9
|
+
| sdd-planner | opus | opus | sonnet | opus | inherit |
|
|
10
|
+
| sdd-roadmapper | opus | sonnet | sonnet | sonnet | inherit |
|
|
11
|
+
| sdd-executor | opus | sonnet | sonnet | sonnet | inherit |
|
|
12
|
+
| sdd-phase-researcher | opus | sonnet | haiku | sonnet | inherit |
|
|
13
|
+
| sdd-project-researcher | opus | sonnet | haiku | sonnet | inherit |
|
|
14
|
+
| sdd-research-synthesizer | sonnet | sonnet | haiku | haiku | inherit |
|
|
15
|
+
| sdd-debugger | opus | sonnet | sonnet | opus | inherit |
|
|
16
|
+
| sdd-codebase-mapper | sonnet | haiku | haiku | haiku | inherit |
|
|
17
|
+
| sdd-verifier | sonnet | sonnet | haiku | sonnet | inherit |
|
|
18
|
+
| sdd-plan-checker | sonnet | sonnet | haiku | haiku | inherit |
|
|
19
|
+
| sdd-integration-checker | sonnet | sonnet | haiku | haiku | inherit |
|
|
20
|
+
| sdd-nyquist-auditor | sonnet | sonnet | haiku | haiku | inherit |
|
|
21
21
|
|
|
22
22
|
## Profile Philosophy
|
|
23
23
|
|
|
@@ -37,13 +37,19 @@ Model profiles control which Claude model each SDD agent uses. This allows balan
|
|
|
37
37
|
- Haiku for research and verification
|
|
38
38
|
- Use when: conserving quota, high-volume work, less critical phases
|
|
39
39
|
|
|
40
|
+
**adaptive** — Role-based cost optimization
|
|
41
|
+
- Opus for planning and debugging (where reasoning quality has highest impact)
|
|
42
|
+
- Sonnet for execution, research, and verification (follows explicit instructions)
|
|
43
|
+
- Haiku for mapping, checking, and auditing (high volume, structured output)
|
|
44
|
+
- Use when: optimizing cost without sacrificing plan quality, solo development on paid API tiers
|
|
45
|
+
|
|
40
46
|
**inherit** - Follow the current session model
|
|
41
47
|
- All agents resolve to `inherit`
|
|
42
|
-
- Best when you switch models interactively (for example OpenCode `/model`)
|
|
48
|
+
- Best when you switch models interactively (for example OpenCode or Kilo `/model`)
|
|
43
49
|
- **Required when using non-Anthropic providers** (OpenRouter, local models, etc.) — otherwise SDD may call Anthropic models directly, incurring unexpected costs
|
|
44
50
|
- Use when: you want SDD to follow your currently selected runtime model
|
|
45
51
|
|
|
46
|
-
## Using Non-Claude Runtimes (Codex, OpenCode, Gemini CLI)
|
|
52
|
+
## Using Non-Claude Runtimes (Codex, OpenCode, Gemini CLI, Kilo)
|
|
47
53
|
|
|
48
54
|
When installed for a non-Claude runtime, the SDD installer sets `resolve_model_ids: "omit"` in `~/.sdd/defaults.json`. This returns an empty model parameter for all agents, so each agent uses the runtime's default model. No manual setup is needed.
|
|
49
55
|
|
|
@@ -69,7 +75,7 @@ If you're using Claude Code with OpenRouter, a local model, or any non-Anthropic
|
|
|
69
75
|
|
|
70
76
|
```bash
|
|
71
77
|
# Via settings command
|
|
72
|
-
/sdd
|
|
78
|
+
/sdd-settings
|
|
73
79
|
# → Select "Inherit" for model profile
|
|
74
80
|
|
|
75
81
|
# Or manually in .planning/config.json
|
|
@@ -109,7 +115,7 @@ Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `hai
|
|
|
109
115
|
|
|
110
116
|
## Switching Profiles
|
|
111
117
|
|
|
112
|
-
Runtime: `/sdd
|
|
118
|
+
Runtime: `/sdd-set-profile <profile>`
|
|
113
119
|
|
|
114
120
|
Per-project default: Set in `.planning/config.json`:
|
|
115
121
|
```json
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Gap Closure Mode — Planner Reference
|
|
2
|
+
|
|
3
|
+
Triggered by `--gaps` flag. Creates plans to address verification or UAT failures.
|
|
4
|
+
|
|
5
|
+
**Important: Skip deferred items.** When reading VERIFICATION.md, only the `gaps:` section contains actionable items that need closure plans. The `deferred:` section (if present) lists items explicitly addressed in later milestone phases — these are NOT gaps and must be ignored during gap closure planning. Creating plans for deferred items wastes effort on work already scheduled for future phases.
|
|
6
|
+
|
|
7
|
+
**1. Find gap sources:**
|
|
8
|
+
|
|
9
|
+
Use init context (from load_project_state) which provides `phase_dir`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Check for VERIFICATION.md (code verification gaps)
|
|
13
|
+
ls "$phase_dir"/*-VERIFICATION.md 2>/dev/null
|
|
14
|
+
|
|
15
|
+
# Check for UAT.md with diagnosed status (user testing gaps)
|
|
16
|
+
grep -l "status: diagnosed" "$phase_dir"/*-UAT.md 2>/dev/null
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**2. Parse gaps:** Each gap has: truth (failed behavior), reason, artifacts (files with issues), missing (things to add/fix).
|
|
20
|
+
|
|
21
|
+
**3. Load existing SUMMARYs** to understand what's already built.
|
|
22
|
+
|
|
23
|
+
**4. Find next plan number:** If plans 01-03 exist, next is 04.
|
|
24
|
+
|
|
25
|
+
**5. Group gaps into plans** by: same artifact, same concern, dependency order (can't wire if artifact is stub → fix stub first).
|
|
26
|
+
|
|
27
|
+
**6. Create gap closure tasks:**
|
|
28
|
+
|
|
29
|
+
```xml
|
|
30
|
+
<task name="{fix_description}" type="auto">
|
|
31
|
+
<files>{artifact.path}</files>
|
|
32
|
+
<action>
|
|
33
|
+
{For each item in gap.missing:}
|
|
34
|
+
- {missing item}
|
|
35
|
+
|
|
36
|
+
Reference existing code: {from SUMMARYs}
|
|
37
|
+
Gap reason: {gap.reason}
|
|
38
|
+
</action>
|
|
39
|
+
<verify>{How to confirm gap is closed}</verify>
|
|
40
|
+
<done>{Observable truth now achievable}</done>
|
|
41
|
+
</task>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**7. Assign waves using standard dependency analysis** (same as `assign_waves` step):
|
|
45
|
+
- Plans with no dependencies → wave 1
|
|
46
|
+
- Plans that depend on other gap closure plans → max(dependency waves) + 1
|
|
47
|
+
- Also consider dependencies on existing (non-gap) plans in the phase
|
|
48
|
+
|
|
49
|
+
**8. Write PLAN.md files:**
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
---
|
|
53
|
+
phase: XX-name
|
|
54
|
+
plan: NN # Sequential after existing
|
|
55
|
+
type: execute
|
|
56
|
+
wave: N # Computed from depends_on (see assign_waves)
|
|
57
|
+
depends_on: [...] # Other plans this depends on (gap or existing)
|
|
58
|
+
files_modified: [...]
|
|
59
|
+
autonomous: true
|
|
60
|
+
gap_closure: true # Flag for tracking
|
|
61
|
+
---
|
|
62
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Reviews Mode — Planner Reference
|
|
2
|
+
|
|
3
|
+
Triggered when orchestrator sets Mode to `reviews`. Replanning from scratch with REVIEWS.md feedback as additional context.
|
|
4
|
+
|
|
5
|
+
**Mindset:** Fresh planner with review insights — not a surgeon making patches, but an architect who has read peer critiques.
|
|
6
|
+
|
|
7
|
+
### Step 1: Load REVIEWS.md
|
|
8
|
+
Read the reviews file from `<files_to_read>`. Parse:
|
|
9
|
+
- Per-reviewer feedback (strengths, concerns, suggestions)
|
|
10
|
+
- Consensus Summary (agreed concerns = highest priority to address)
|
|
11
|
+
- Divergent Views (investigate, make a judgment call)
|
|
12
|
+
|
|
13
|
+
### Step 2: Categorize Feedback
|
|
14
|
+
Group review feedback into:
|
|
15
|
+
- **Must address**: HIGH severity consensus concerns
|
|
16
|
+
- **Should address**: MEDIUM severity concerns from 2+ reviewers
|
|
17
|
+
- **Consider**: Individual reviewer suggestions, LOW severity items
|
|
18
|
+
|
|
19
|
+
### Step 3: Plan Fresh with Review Context
|
|
20
|
+
Create new plans following the standard planning process, but with review feedback as additional constraints:
|
|
21
|
+
- Each HIGH severity consensus concern MUST have a task that addresses it
|
|
22
|
+
- MEDIUM concerns should be addressed where feasible without over-engineering
|
|
23
|
+
- Note in task actions: "Addresses review concern: {concern}" for traceability
|
|
24
|
+
|
|
25
|
+
### Step 4: Return
|
|
26
|
+
Use standard PLANNING COMPLETE return format, adding a reviews section:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
### Review Feedback Addressed
|
|
30
|
+
|
|
31
|
+
| Concern | Severity | How Addressed |
|
|
32
|
+
|---------|----------|---------------|
|
|
33
|
+
| {concern} | HIGH | Plan {N}, Task {M}: {how} |
|
|
34
|
+
|
|
35
|
+
### Review Feedback Deferred
|
|
36
|
+
| Concern | Reason |
|
|
37
|
+
|---------|--------|
|
|
38
|
+
| {concern} | {why — out of scope, disagree, etc.} |
|
|
39
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Revision Mode — Planner Reference
|
|
2
|
+
|
|
3
|
+
Triggered when orchestrator provides `<revision_context>` with checker issues. NOT starting fresh — making targeted updates to existing plans.
|
|
4
|
+
|
|
5
|
+
**Mindset:** Surgeon, not architect. Minimal changes for specific issues.
|
|
6
|
+
|
|
7
|
+
### Step 1: Load Existing Plans
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cat .planning/phases/$PHASE-*/$PHASE-*-PLAN.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Build mental model of current plan structure, existing tasks, must_haves.
|
|
14
|
+
|
|
15
|
+
### Step 2: Parse Checker Issues
|
|
16
|
+
|
|
17
|
+
Issues come in structured format:
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
issues:
|
|
21
|
+
- plan: "16-01"
|
|
22
|
+
dimension: "task_completeness"
|
|
23
|
+
severity: "blocker"
|
|
24
|
+
description: "Task 2 missing <verify> element"
|
|
25
|
+
fix_hint: "Add verification command for build output"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Group by plan, dimension, severity.
|
|
29
|
+
|
|
30
|
+
### Step 3: Revision Strategy
|
|
31
|
+
|
|
32
|
+
| Dimension | Strategy |
|
|
33
|
+
|-----------|----------|
|
|
34
|
+
| requirement_coverage | Add task(s) for missing requirement |
|
|
35
|
+
| task_completeness | Add missing elements to existing task |
|
|
36
|
+
| dependency_correctness | Fix depends_on, recompute waves |
|
|
37
|
+
| key_links_planned | Add wiring task or update action |
|
|
38
|
+
| scope_sanity | Split into multiple plans |
|
|
39
|
+
| must_haves_derivation | Derive and add must_haves to frontmatter |
|
|
40
|
+
|
|
41
|
+
### Step 4: Make Targeted Updates
|
|
42
|
+
|
|
43
|
+
**DO:** Edit specific flagged sections, preserve working parts, update waves if dependencies change.
|
|
44
|
+
|
|
45
|
+
**DO NOT:** Rewrite entire plans for minor issues, add unnecessary tasks, break existing working plans.
|
|
46
|
+
|
|
47
|
+
### Step 5: Validate Changes
|
|
48
|
+
|
|
49
|
+
- [ ] All flagged issues addressed
|
|
50
|
+
- [ ] No new issues introduced
|
|
51
|
+
- [ ] Wave numbers still valid
|
|
52
|
+
- [ ] Dependencies still correct
|
|
53
|
+
- [ ] Files on disk updated
|
|
54
|
+
|
|
55
|
+
### Step 6: Commit
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "fix($PHASE): revise plans based on checker feedback" --files .planning/phases/$PHASE-*/$PHASE-*-PLAN.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 7: Return Revision Summary
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
## REVISION COMPLETE
|
|
65
|
+
|
|
66
|
+
**Issues addressed:** {N}/{M}
|
|
67
|
+
|
|
68
|
+
### Changes Made
|
|
69
|
+
|
|
70
|
+
| Plan | Change | Issue Addressed |
|
|
71
|
+
|------|--------|-----------------|
|
|
72
|
+
| 16-01 | Added <verify> to Task 2 | task_completeness |
|
|
73
|
+
| 16-02 | Added logout task | requirement_coverage (AUTH-02) |
|
|
74
|
+
|
|
75
|
+
### Files Updated
|
|
76
|
+
|
|
77
|
+
- .planning/phases/16-xxx/16-01-PLAN.md
|
|
78
|
+
- .planning/phases/16-xxx/16-02-PLAN.md
|
|
79
|
+
|
|
80
|
+
{If any issues NOT addressed:}
|
|
81
|
+
|
|
82
|
+
### Unaddressed Issues
|
|
83
|
+
|
|
84
|
+
| Issue | Reason |
|
|
85
|
+
|-------|--------|
|
|
86
|
+
| {issue} | {why - needs user input, architectural change, etc.} |
|
|
87
|
+
```
|
|
@@ -10,9 +10,17 @@ Configuration options for `.planning/` directory behavior.
|
|
|
10
10
|
},
|
|
11
11
|
"git": {
|
|
12
12
|
"branching_strategy": "none",
|
|
13
|
+
"base_branch": null,
|
|
13
14
|
"phase_branch_template": "sdd/phase-{phase}-{slug}",
|
|
14
15
|
"milestone_branch_template": "sdd/{milestone}-{slug}",
|
|
15
16
|
"quick_branch_template": null
|
|
17
|
+
},
|
|
18
|
+
"manager": {
|
|
19
|
+
"flags": {
|
|
20
|
+
"discuss": "",
|
|
21
|
+
"plan": "",
|
|
22
|
+
"execute": ""
|
|
23
|
+
}
|
|
16
24
|
}
|
|
17
25
|
```
|
|
18
26
|
|
|
@@ -21,9 +29,16 @@ Configuration options for `.planning/` directory behavior.
|
|
|
21
29
|
| `commit_docs` | `true` | Whether to commit planning artifacts to git |
|
|
22
30
|
| `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
|
|
23
31
|
| `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
|
|
32
|
+
| `git.base_branch` | `null` (auto-detect) | Target branch for PRs and merges (e.g. `"master"`, `"develop"`). When `null`, auto-detects from `git symbolic-ref refs/remotes/origin/HEAD`, falling back to `"main"`. |
|
|
24
33
|
| `git.phase_branch_template` | `"sdd/phase-{phase}-{slug}"` | Branch template for phase strategy |
|
|
25
34
|
| `git.milestone_branch_template` | `"sdd/{milestone}-{slug}"` | Branch template for milestone strategy |
|
|
26
35
|
| `git.quick_branch_template` | `null` | Optional branch template for quick-task runs |
|
|
36
|
+
| `workflow.use_worktrees` | `true` | Whether executor agents run in isolated git worktrees. Set to `false` to disable worktrees — agents execute sequentially on the main working tree instead. Recommended for solo developers or when worktree merges cause issues. |
|
|
37
|
+
| `workflow.subagent_timeout` | `300000` | Timeout in milliseconds for parallel subagent tasks (e.g. codebase mapping). Increase for large codebases or slower models. Default: 300000 (5 minutes). |
|
|
38
|
+
| `manager.flags.discuss` | `""` | Flags passed to `/sdd-discuss-phase` when dispatched from manager (e.g. `"--auto --analyze"`) |
|
|
39
|
+
| `manager.flags.plan` | `""` | Flags passed to plan workflow when dispatched from manager |
|
|
40
|
+
| `manager.flags.execute` | `""` | Flags passed to execute workflow when dispatched from manager |
|
|
41
|
+
| `response_language` | `null` | Language for user-facing questions and prompts across all phases/subagents (e.g. `"Portuguese"`, `"Japanese"`, `"Spanish"`). When set, all spawned agents include a directive to respond in this language. |
|
|
27
42
|
</config_schema>
|
|
28
43
|
|
|
29
44
|
<commit_docs_behavior>
|
|
@@ -199,4 +214,241 @@ Squash merge is recommended — keeps main branch history clean while preserving
|
|
|
199
214
|
|
|
200
215
|
</branching_strategy_behavior>
|
|
201
216
|
|
|
217
|
+
<complete_field_reference>
|
|
218
|
+
|
|
219
|
+
## Complete Field Reference
|
|
220
|
+
|
|
221
|
+
Generated from `CONFIG_DEFAULTS` (core.cjs) and `VALID_CONFIG_KEYS` (config.cjs).
|
|
222
|
+
|
|
223
|
+
### Core Fields
|
|
224
|
+
|
|
225
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
226
|
+
|-----|------|---------|----------------|-------------|
|
|
227
|
+
| `model_profile` | string | `"balanced"` | `"quality"`, `"balanced"`, `"budget"`, `"inherit"` | Model selection preset for subagents |
|
|
228
|
+
| `mode` | string | `"interactive"` | `"interactive"`, `"yolo"` | Operation mode: `"interactive"` shows gates and confirmations; `"yolo"` runs autonomously without prompts |
|
|
229
|
+
| `granularity` | string | (none) | `"coarse"`, `"standard"`, `"fine"` | Planning depth for phase plans (migrated from deprecated `depth`) |
|
|
230
|
+
| `commit_docs` | boolean | `true` | `true`, `false` | Commit .planning/ artifacts to git (auto-false if .planning/ is gitignored) |
|
|
231
|
+
| `search_gitignored` | boolean | `false` | `true`, `false` | Include gitignored paths in broad rg searches via `--no-ignore` |
|
|
232
|
+
| `phase_naming` | string | `"sequential"` | `"sequential"`, `"custom"` | Phase numbering: auto-increment or arbitrary string IDs |
|
|
233
|
+
| `project_code` | string\|null | `null` | Any short string | Prefix for phase dirs (e.g., `"CK"` produces `CK-01-foundation`) |
|
|
234
|
+
| `response_language` | string\|null | `null` | Any language name | Language for user-facing prompts (e.g., `"Portuguese"`, `"Japanese"`) |
|
|
235
|
+
| `context_window` | number | `200000` | `200000`, `1000000` | Context window size; set `1000000` for 1M-context models |
|
|
236
|
+
| `resolve_model_ids` | boolean\|string | `false` | `false`, `true`, `"omit"` | Map model aliases to full Claude IDs; `"omit"` returns empty string |
|
|
237
|
+
| `context` | string\|null | `null` | `"dev"`, `"research"`, `"review"` | Execution context profile that adjusts agent behavior: `"dev"` for development tasks, `"research"` for investigation/exploration, `"review"` for code review workflows |
|
|
238
|
+
| `review.models.<cli>` | string\|null | `null` | Any model ID string | Per-CLI model override for /sdd-review (e.g., `review.models.gemini`). Falls back to CLI default when null. |
|
|
239
|
+
|
|
240
|
+
### Workflow Fields
|
|
241
|
+
|
|
242
|
+
Set via `workflow.*` namespace in config.json (e.g., `"workflow": { "research": true }`).
|
|
243
|
+
|
|
244
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
245
|
+
|-----|------|---------|----------------|-------------|
|
|
246
|
+
| `workflow.research` | boolean | `true` | `true`, `false` | Run research agent before planning |
|
|
247
|
+
| `workflow.plan_check` | boolean | `true` | `true`, `false` | Run plan-checker agent to validate plans. _Alias:_ `plan_checker` is the flat-key form used in `CONFIG_DEFAULTS`; `workflow.plan_check` is the canonical namespaced form. |
|
|
248
|
+
| `workflow.verifier` | boolean | `true` | `true`, `false` | Run verifier agent after execution |
|
|
249
|
+
| `workflow.nyquist_validation` | boolean | `true` | `true`, `false` | Enable Nyquist-inspired validation gates |
|
|
250
|
+
| `workflow.auto_advance` | boolean | `false` | `true`, `false` | Auto-advance to next phase after completion |
|
|
251
|
+
| `workflow.node_repair` | boolean | `true` | `true`, `false` | Attempt automatic repair of failed plan nodes |
|
|
252
|
+
| `workflow.node_repair_budget` | number | `2` | Any positive integer | Max repair retries per failed node |
|
|
253
|
+
| `workflow.ai_integration_phase` | boolean | `true` | `true`, `false` | Run /sdd-ai-integration-phase before planning AI system phases |
|
|
254
|
+
| `workflow.ui_phase` | boolean | `true` | `true`, `false` | Generate UI-SPEC.md for frontend phases |
|
|
255
|
+
| `workflow.ui_safety_gate` | boolean | `true` | `true`, `false` | Require safety gate approval for UI changes |
|
|
256
|
+
| `workflow.text_mode` | boolean | `false` | `true`, `false` | Use plain-text numbered lists instead of AskUserQuestion menus |
|
|
257
|
+
| `workflow.research_before_questions` | boolean | `false` | `true`, `false` | Run research before interactive questions in discuss phase |
|
|
258
|
+
| `workflow.discuss_mode` | string | `"discuss"` | `"discuss"`, `"assumptions"` | Default mode for discuss-phase: `"discuss"` runs interactive questioning; `"assumptions"` analyzes codebase and surfaces assumptions instead |
|
|
259
|
+
| `workflow.skip_discuss` | boolean | `false` | `true`, `false` | Skip discuss phase entirely |
|
|
260
|
+
| `workflow.use_worktrees` | boolean | `true` | `true`, `false` | Run executor agents in isolated git worktrees |
|
|
261
|
+
| `workflow.subagent_timeout` | number | `300000` | Any positive integer (ms) | Timeout for parallel subagent tasks (default: 5 minutes) |
|
|
262
|
+
| `workflow.code_review` | boolean | `true` | `true`, `false` | Enable built-in code review step in the ship workflow |
|
|
263
|
+
| `workflow.code_review_depth` | string | `"standard"` | `"light"`, `"standard"`, `"deep"` | Depth level for code review analysis in the ship workflow |
|
|
264
|
+
| `workflow._auto_chain_active` | boolean | `false` | `true`, `false` | Internal: tracks whether autonomous chaining is active |
|
|
265
|
+
|
|
266
|
+
### Git Fields
|
|
267
|
+
|
|
268
|
+
Set via `git.*` namespace (e.g., `"git": { "branching_strategy": "phase" }`).
|
|
269
|
+
|
|
270
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
271
|
+
|-----|------|---------|----------------|-------------|
|
|
272
|
+
| `git.branching_strategy` | string | `"none"` | `"none"`, `"phase"`, `"milestone"` | Git branching approach for phase/milestone isolation |
|
|
273
|
+
| `git.base_branch` | string\|null | `null` (auto-detect) | Any branch name | Target branch for PRs and merges; auto-detects from `origin/HEAD` when `null` |
|
|
274
|
+
| `git.phase_branch_template` | string | `"sdd/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy |
|
|
275
|
+
| `git.milestone_branch_template` | string | `"sdd/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy |
|
|
276
|
+
| `git.quick_branch_template` | string\|null | `null` | Template with `{slug}` | Optional branch template for quick-task runs |
|
|
277
|
+
|
|
278
|
+
### Search & API Fields
|
|
279
|
+
|
|
280
|
+
These toggle external search integrations. Auto-detected at project creation when API keys are present.
|
|
281
|
+
|
|
282
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
283
|
+
|-----|------|---------|----------------|-------------|
|
|
284
|
+
| `brave_search` | boolean | `false` | `true`, `false` | Enable Brave web search for research agent (requires `BRAVE_API_KEY`) |
|
|
285
|
+
| `firecrawl` | boolean | `false` | `true`, `false` | Enable Firecrawl page scraping (requires `FIRECRAWL_API_KEY`) |
|
|
286
|
+
| `exa_search` | boolean | `false` | `true`, `false` | Enable Exa semantic search (requires `EXA_API_KEY`) |
|
|
287
|
+
|
|
288
|
+
### Features Fields
|
|
289
|
+
|
|
290
|
+
Set via `features.*` namespace (e.g., `"features": { "thinking_partner": true }`).
|
|
291
|
+
|
|
292
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
293
|
+
|-----|------|---------|----------------|-------------|
|
|
294
|
+
| `features.thinking_partner` | boolean | `false` | `true`, `false` | Enable conditional extended thinking at workflow decision points (used by discuss-phase and plan-phase for architectural tradeoff analysis) |
|
|
295
|
+
| `features.global_learnings` | boolean | `false` | `true`, `false` | Enable injection of global learnings from `~/.sdd/learnings/` into agent prompts |
|
|
296
|
+
|
|
297
|
+
### Hook Fields
|
|
298
|
+
|
|
299
|
+
Set via `hooks.*` namespace (e.g., `"hooks": { "context_warnings": true }`).
|
|
300
|
+
|
|
301
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
302
|
+
|-----|------|---------|----------------|-------------|
|
|
303
|
+
| `hooks.context_warnings` | boolean | `true` | `true`, `false` | Show warnings when context budget is exceeded |
|
|
304
|
+
|
|
305
|
+
### Learnings Fields
|
|
306
|
+
|
|
307
|
+
Set via `learnings.*` namespace (e.g., `"learnings": { "max_inject": 5 }`). Used together with `features.global_learnings`.
|
|
308
|
+
|
|
309
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
310
|
+
|-----|------|---------|----------------|-------------|
|
|
311
|
+
| `learnings.max_inject` | number | `10` | Any positive integer | Maximum number of global learning entries to inject into agent prompts per session |
|
|
312
|
+
|
|
313
|
+
### Intel Fields
|
|
314
|
+
|
|
315
|
+
Set via `intel.*` namespace (e.g., `"intel": { "enabled": true }`). Controls the queryable codebase intelligence system consumed by `/sdd-intel`.
|
|
316
|
+
|
|
317
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
318
|
+
|-----|------|---------|----------------|-------------|
|
|
319
|
+
| `intel.enabled` | boolean | `false` | `true`, `false` | Enable queryable codebase intelligence system. When `true`, `/sdd-intel` commands build and query a JSON index in `.planning/intel/`. |
|
|
320
|
+
|
|
321
|
+
### Manager Fields
|
|
322
|
+
|
|
323
|
+
Set via `manager.*` namespace (e.g., `"manager": { "flags": { "discuss": "--auto" } }`).
|
|
324
|
+
|
|
325
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
326
|
+
|-----|------|---------|----------------|-------------|
|
|
327
|
+
| `manager.flags.discuss` | string | `""` | Any CLI flags string | Flags passed to `/sdd-discuss-phase` from manager (e.g., `"--auto --analyze"`) |
|
|
328
|
+
| `manager.flags.plan` | string | `""` | Any CLI flags string | Flags passed to plan workflow from manager |
|
|
329
|
+
| `manager.flags.execute` | string | `""` | Any CLI flags string | Flags passed to execute workflow from manager |
|
|
330
|
+
|
|
331
|
+
### Advanced Fields
|
|
332
|
+
|
|
333
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
334
|
+
|-----|------|---------|----------------|-------------|
|
|
335
|
+
| `parallelization` | boolean\|object | `true` | `true`, `false`, `{ "enabled": true }` | Enable parallel wave execution; object form allows additional sub-keys |
|
|
336
|
+
| `model_overrides` | object\|null | `null` | `{ "<agent-type>": "<model-id>" }` | Override model selection per agent type |
|
|
337
|
+
| `agent_skills` | object | `{}` | `{ "<agent-type>": "<skill-set>" }` | Assign skill sets to specific agent types |
|
|
338
|
+
| `sub_repos` | array | `[]` | Array of relative path strings | Child directories with independent `.git` repos (auto-detected) |
|
|
339
|
+
|
|
340
|
+
### Planning Fields
|
|
341
|
+
|
|
342
|
+
These can be set at top level or nested under `planning.*` (e.g., `"planning": { "commit_docs": false }`). Both forms are equivalent; top-level takes precedence if both exist.
|
|
343
|
+
|
|
344
|
+
| Key | Type | Default | Allowed Values | Description |
|
|
345
|
+
|-----|------|---------|----------------|-------------|
|
|
346
|
+
| `planning.commit_docs` | boolean | `true` | `true`, `false` | Alias for top-level `commit_docs` |
|
|
347
|
+
| `planning.search_gitignored` | boolean | `false` | `true`, `false` | Alias for top-level `search_gitignored` |
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Field Interactions
|
|
352
|
+
|
|
353
|
+
Several config fields affect each other or trigger special behavior:
|
|
354
|
+
|
|
355
|
+
1. **`commit_docs` auto-detection** -- When no explicit value is set in config.json and `.planning/` is in `.gitignore`, `commit_docs` automatically resolves to `false`. An explicit `true` or `false` in config always overrides auto-detection.
|
|
356
|
+
|
|
357
|
+
2. **`branching_strategy` controls branch templates** -- The `phase_branch_template` and `milestone_branch_template` fields are only used when `branching_strategy` is set to `"phase"` or `"milestone"` respectively. When `branching_strategy` is `"none"`, all template fields are ignored.
|
|
358
|
+
|
|
359
|
+
3. **`context_window` threshold triggers** -- When `context_window >= 500000`, workflows enable adaptive context enrichment: full-body reads of prior phase SUMMARYs, cross-phase context injection in plan-phase, and deeper read depth for anti-pattern references. Below 500000, only frontmatter and summaries are read.
|
|
360
|
+
|
|
361
|
+
4. **`parallelization` polymorphism** -- Accepts both a simple boolean and an object with an `enabled` field. `loadConfig()` normalizes either form to a boolean. `{ "enabled": true }` is equivalent to `true`.
|
|
362
|
+
|
|
363
|
+
5. **Search API keys and flags** -- `brave_search`, `firecrawl`, and `exa_search` are auto-set to `true` during project creation if the corresponding API key is detected (environment variable or `~/.sdd/<name>_api_key` file). Setting them to `true` without the API key has no effect.
|
|
364
|
+
|
|
365
|
+
6. **`planning.*` and top-level equivalence** -- `planning.commit_docs` and `commit_docs` are equivalent; `planning.search_gitignored` and `search_gitignored` are equivalent. If both are set, the top-level value takes precedence.
|
|
366
|
+
|
|
367
|
+
7. **`depth` to `granularity` migration** -- The deprecated `depth` key (`quick`/`standard`/`comprehensive`) is automatically migrated to `granularity` (`coarse`/`standard`/`fine`) on config load and persisted back to disk.
|
|
368
|
+
|
|
369
|
+
8. **`sub_repos` auto-sync** -- On every config load, SDD scans for child directories with `.git` and updates the `sub_repos` array if the filesystem has changed. Legacy `multiRepo: true` is automatically migrated to a detected `sub_repos` array.
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Example Configurations
|
|
374
|
+
|
|
375
|
+
### Minimal -- Solo Developer
|
|
376
|
+
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"model_profile": "balanced",
|
|
380
|
+
"commit_docs": true,
|
|
381
|
+
"workflow": {
|
|
382
|
+
"research": true,
|
|
383
|
+
"plan_check": true,
|
|
384
|
+
"verifier": true,
|
|
385
|
+
"use_worktrees": false
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Team Project with Branching
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"model_profile": "quality",
|
|
395
|
+
"commit_docs": true,
|
|
396
|
+
"project_code": "APP",
|
|
397
|
+
"git": {
|
|
398
|
+
"branching_strategy": "phase",
|
|
399
|
+
"base_branch": "develop",
|
|
400
|
+
"phase_branch_template": "sdd/phase-{phase}-{slug}"
|
|
401
|
+
},
|
|
402
|
+
"workflow": {
|
|
403
|
+
"research": true,
|
|
404
|
+
"plan_check": true,
|
|
405
|
+
"verifier": true,
|
|
406
|
+
"nyquist_validation": true,
|
|
407
|
+
"use_worktrees": true,
|
|
408
|
+
"discuss_mode": "discuss"
|
|
409
|
+
},
|
|
410
|
+
"manager": {
|
|
411
|
+
"flags": {
|
|
412
|
+
"discuss": "",
|
|
413
|
+
"plan": "",
|
|
414
|
+
"execute": ""
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"response_language": "English"
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Large Codebase -- 1M Context with Extended Timeouts
|
|
422
|
+
|
|
423
|
+
```json
|
|
424
|
+
{
|
|
425
|
+
"model_profile": "quality",
|
|
426
|
+
"context_window": 1000000,
|
|
427
|
+
"commit_docs": true,
|
|
428
|
+
"project_code": "MEGA",
|
|
429
|
+
"phase_naming": "sequential",
|
|
430
|
+
"git": {
|
|
431
|
+
"branching_strategy": "milestone",
|
|
432
|
+
"milestone_branch_template": "sdd/{milestone}-{slug}"
|
|
433
|
+
},
|
|
434
|
+
"workflow": {
|
|
435
|
+
"research": true,
|
|
436
|
+
"plan_check": true,
|
|
437
|
+
"verifier": true,
|
|
438
|
+
"nyquist_validation": true,
|
|
439
|
+
"subagent_timeout": 600000,
|
|
440
|
+
"use_worktrees": true,
|
|
441
|
+
"node_repair": true,
|
|
442
|
+
"node_repair_budget": 3,
|
|
443
|
+
"auto_advance": true
|
|
444
|
+
},
|
|
445
|
+
"brave_search": true,
|
|
446
|
+
"hooks": {
|
|
447
|
+
"context_warnings": true
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
</complete_field_reference>
|
|
453
|
+
|
|
202
454
|
</planning_config>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Revision Loop Pattern
|
|
2
|
+
|
|
3
|
+
Standard pattern for iterative agent revision with feedback. Used when a checker/validator finds issues and the producing agent needs to revise its output.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pattern: Check-Revise-Escalate (max 3 iterations)
|
|
8
|
+
|
|
9
|
+
This pattern applies whenever:
|
|
10
|
+
1. An agent produces output (plans, imports, gap-closure plans)
|
|
11
|
+
2. A checker/validator evaluates that output
|
|
12
|
+
3. Issues are found that need revision
|
|
13
|
+
|
|
14
|
+
### Flow
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
prev_issue_count = Infinity
|
|
18
|
+
iteration = 0
|
|
19
|
+
|
|
20
|
+
LOOP:
|
|
21
|
+
1. Run checker/validator on current output
|
|
22
|
+
2. Read checker results
|
|
23
|
+
3. If PASSED or only INFO-level issues:
|
|
24
|
+
-> Accept output, exit loop
|
|
25
|
+
4. If BLOCKER or WARNING issues found:
|
|
26
|
+
a. iteration += 1
|
|
27
|
+
b. If iteration > 3:
|
|
28
|
+
-> Escalate to user (see "After 3 Iterations" below)
|
|
29
|
+
c. Parse issue count from checker output
|
|
30
|
+
d. If issue_count >= prev_issue_count:
|
|
31
|
+
-> Escalate to user: "Revision loop stalled (issue count not decreasing)"
|
|
32
|
+
e. prev_issue_count = issue_count
|
|
33
|
+
f. Re-spawn the producing agent with checker feedback appended
|
|
34
|
+
g. After revision completes, go to LOOP
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Issue Count Tracking
|
|
38
|
+
|
|
39
|
+
Track the number of BLOCKER + WARNING issues returned by the checker on each iteration. If the count does not decrease between consecutive iterations, the producing agent is stuck and further iterations will not help. Break early and escalate to the user.
|
|
40
|
+
|
|
41
|
+
Display iteration progress before each revision spawn:
|
|
42
|
+
`Revision iteration {N}/3 -- {blocker_count} blockers, {warning_count} warnings`
|
|
43
|
+
|
|
44
|
+
### Re-spawn Prompt Structure
|
|
45
|
+
|
|
46
|
+
When re-spawning the producing agent for revision, pass the checker's YAML-formatted issues. The checker's output contains a `## Issues` heading followed by a YAML block. Parse this block and pass it verbatim to the revision agent.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
<checker_issues>
|
|
50
|
+
The issues below are in YAML format. Each has: dimension, severity, finding,
|
|
51
|
+
affected_field, suggested_fix. Address ALL BLOCKER issues. Address WARNING
|
|
52
|
+
issues where feasible.
|
|
53
|
+
|
|
54
|
+
{YAML issues block from checker output -- passed verbatim}
|
|
55
|
+
</checker_issues>
|
|
56
|
+
|
|
57
|
+
<revision_instructions>
|
|
58
|
+
Address ALL BLOCKER and WARNING issues identified above.
|
|
59
|
+
- For each BLOCKER: make the required change
|
|
60
|
+
- For each WARNING: address or explain why it's acceptable
|
|
61
|
+
- Do NOT introduce new issues while fixing existing ones
|
|
62
|
+
- Preserve all content not flagged by the checker
|
|
63
|
+
This is revision iteration {N} of max 3. Previous iteration had {prev_count}
|
|
64
|
+
issues. You must reduce the count or the loop will terminate.
|
|
65
|
+
</revision_instructions>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### After 3 Iterations
|
|
69
|
+
|
|
70
|
+
If issues persist after 3 revision cycles:
|
|
71
|
+
|
|
72
|
+
1. Present remaining issues to the user
|
|
73
|
+
2. Use gate prompt (pattern: yes-no from `references/gate-prompts.md`):
|
|
74
|
+
question: "Issues remain after 3 revision attempts. Proceed with current output?"
|
|
75
|
+
header: "Proceed?"
|
|
76
|
+
options:
|
|
77
|
+
- label: "Proceed anyway" description: "Accept output with remaining issues"
|
|
78
|
+
- label: "Adjust approach" description: "Discuss a different approach"
|
|
79
|
+
3. If "Proceed anyway": accept current output and continue
|
|
80
|
+
4. If "Adjust approach" or "Other": discuss with user, then re-enter the producing step with updated context
|
|
81
|
+
|
|
82
|
+
### Workflow-Specific Variations
|
|
83
|
+
|
|
84
|
+
| Workflow | Producer Agent | Checker Agent | Notes |
|
|
85
|
+
|----------|---------------|---------------|-------|
|
|
86
|
+
| plan-phase | sdd-planner | sdd-plan-checker | Revision prompt via planner-revision.md |
|
|
87
|
+
| execute-phase | sdd-executor | sdd-verifier | Post-execution verification |
|
|
88
|
+
| discuss-phase | orchestrator | sdd-plan-checker | Inline revision by orchestrator |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Important Notes
|
|
93
|
+
|
|
94
|
+
- **INFO-level issues are always acceptable** -- they don't trigger revision
|
|
95
|
+
- **Each iteration gets a fresh agent spawn** -- don't try to continue in the same context
|
|
96
|
+
- **Checker feedback must be inlined** -- the revision agent needs to see exactly what failed
|
|
97
|
+
- **Don't silently swallow issues** -- always present the final state to the user after exiting the loop
|