@bhargavvc/sdd-cc 1.30.1 → 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 +2145 -545
- 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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Analyze ROADMAP.md phases for dependency relationships before execution. Detect file overlap between phases, semantic API/data-flow dependencies, and suggest `Depends on` entries to prevent merge conflicts during parallel execution by `/sdd-manager`.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
## 1. Load ROADMAP.md
|
|
8
|
+
|
|
9
|
+
Read `.planning/ROADMAP.md`. If it does not exist, error: "No ROADMAP.md found — run `/sdd-new-project` first."
|
|
10
|
+
|
|
11
|
+
Extract all phases. For each phase capture:
|
|
12
|
+
- Phase number and name
|
|
13
|
+
- Scope/Goal description
|
|
14
|
+
- Files listed in `Files` or `files_modified` fields (if present)
|
|
15
|
+
- Existing `Depends on` field value
|
|
16
|
+
|
|
17
|
+
## 2. Infer Likely File Modifications
|
|
18
|
+
|
|
19
|
+
For each phase without explicit `files_modified`, analyze the scope/goal description to infer which files will likely be modified. Use these heuristics:
|
|
20
|
+
|
|
21
|
+
- **Database/schema phases** → migration files, schema definitions, model files
|
|
22
|
+
- **API/backend phases** → route files, controller files, service files, handler files
|
|
23
|
+
- **Frontend/UI phases** → component files, page files, style files
|
|
24
|
+
- **Auth phases** → middleware files, auth route files, session/token files
|
|
25
|
+
- **Config/infra phases** → config files, environment files, CI/CD files
|
|
26
|
+
- **Test phases** → test files, spec files, fixture files
|
|
27
|
+
- **Shared utility phases** → lib/utils files, shared type definitions
|
|
28
|
+
|
|
29
|
+
Group phases by their inferred file domain (database, API, frontend, auth, config, shared).
|
|
30
|
+
|
|
31
|
+
## 3. Detect Dependency Relationships
|
|
32
|
+
|
|
33
|
+
For each pair of phases (A, B), check for dependency signals:
|
|
34
|
+
|
|
35
|
+
### File Overlap Detection
|
|
36
|
+
If phases A and B will both modify files in the same domain or the same specific files, one must run before the other. The phase that *provides* the foundation runs first.
|
|
37
|
+
|
|
38
|
+
### Semantic Dependency Detection
|
|
39
|
+
Read each phase's scope/goal for these patterns:
|
|
40
|
+
- Phase B mentions consuming, using, or calling something that Phase A creates/implements
|
|
41
|
+
- Phase B references an "API", "schema", "model", "endpoint", or "interface" that Phase A builds
|
|
42
|
+
- Phase B says "after X is complete", "once X is built", "using the X from Phase N"
|
|
43
|
+
- Phase B extends or modifies code that Phase A establishes
|
|
44
|
+
|
|
45
|
+
### Data Flow Detection
|
|
46
|
+
- Phase A creates data structures, schemas, or types → Phase B consumes or transforms them
|
|
47
|
+
- Phase A seeds/migrates the database → Phase B reads from that database
|
|
48
|
+
- Phase A exposes an API contract → Phase B implements the client for that contract
|
|
49
|
+
|
|
50
|
+
## 4. Build Dependency Table
|
|
51
|
+
|
|
52
|
+
Output a dependency suggestion table:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Phase Dependency Analysis
|
|
56
|
+
=========================
|
|
57
|
+
|
|
58
|
+
Phase N: <name>
|
|
59
|
+
Scope: <brief scope>
|
|
60
|
+
Likely touches: <inferred file domains>
|
|
61
|
+
|
|
62
|
+
Suggested dependencies:
|
|
63
|
+
→ Depends on: <Phase M> — reason: <overlap/semantic/data-flow explanation>
|
|
64
|
+
|
|
65
|
+
Current "Depends on": <existing value or "(none)">
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For phase pairs with no detected dependency, state: "No dependency detected between Phase X and Phase Y."
|
|
69
|
+
|
|
70
|
+
## 5. Summarize Suggested Changes
|
|
71
|
+
|
|
72
|
+
Show a consolidated diff of proposed ROADMAP.md `Depends on` changes:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Suggested ROADMAP.md updates:
|
|
76
|
+
Phase 3: add "Depends on: 1, 2" (file overlap: database schema)
|
|
77
|
+
Phase 5: add "Depends on: 3" (semantic: uses auth API from Phase 3)
|
|
78
|
+
Phase 4: no change needed (independent scope)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 6. Confirm and Apply
|
|
82
|
+
|
|
83
|
+
Ask the user: "Apply these `Depends on` suggestions to ROADMAP.md? (yes / no / edit)"
|
|
84
|
+
|
|
85
|
+
- **yes** — Write all suggested `Depends on` entries to ROADMAP.md. Confirm each write.
|
|
86
|
+
- **no** — Print the suggestions as text only. User updates manually.
|
|
87
|
+
- **edit** — Present each suggestion individually with yes/no/skip per suggestion.
|
|
88
|
+
|
|
89
|
+
When writing to ROADMAP.md:
|
|
90
|
+
- Locate the phase entry and add or update the `Depends on:` field
|
|
91
|
+
- Preserve all other phase content unchanged
|
|
92
|
+
- Do not reorder phases
|
|
93
|
+
|
|
94
|
+
After applying: "ROADMAP.md updated. Run `/sdd-manager` to execute phases in the correct order."
|
|
95
|
+
|
|
96
|
+
</process>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Autonomous audit-to-fix pipeline. Runs an audit, parses findings, classifies each as
|
|
3
|
+
auto-fixable vs manual-only, spawns executor agents for fixable issues, runs tests
|
|
4
|
+
after each fix, and commits atomically with finding IDs for traceability.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<available_agent_types>
|
|
8
|
+
- sdd-executor — executes a specific, scoped code change
|
|
9
|
+
</available_agent_types>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="parse-arguments">
|
|
14
|
+
Extract flags from the user's invocation:
|
|
15
|
+
|
|
16
|
+
- `--max N` — maximum findings to fix (default: **5**)
|
|
17
|
+
- `--severity high|medium|all` — minimum severity to process (default: **medium**)
|
|
18
|
+
- `--dry-run` — classify findings without fixing (shows classification table only)
|
|
19
|
+
- `--source <audit>` — which audit to run (default: **audit-uat**)
|
|
20
|
+
|
|
21
|
+
Validate `--source` is a supported audit. Currently supported:
|
|
22
|
+
- `audit-uat`
|
|
23
|
+
|
|
24
|
+
If `--source` is not supported, stop with an error:
|
|
25
|
+
```
|
|
26
|
+
Error: Unsupported audit source "{source}". Supported sources: audit-uat
|
|
27
|
+
```
|
|
28
|
+
</step>
|
|
29
|
+
|
|
30
|
+
<step name="run-audit">
|
|
31
|
+
Invoke the source audit command and capture output.
|
|
32
|
+
|
|
33
|
+
For `audit-uat` source:
|
|
34
|
+
```bash
|
|
35
|
+
INIT=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" init audit-uat 2>/dev/null || echo "{}")
|
|
36
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Read existing UAT and verification files to extract findings:
|
|
40
|
+
- Glob: `.planning/phases/*/*-UAT.md`
|
|
41
|
+
- Glob: `.planning/phases/*/*-VERIFICATION.md`
|
|
42
|
+
|
|
43
|
+
Parse each finding into a structured record:
|
|
44
|
+
- **ID** — sequential identifier (F-01, F-02, ...)
|
|
45
|
+
- **description** — concise summary of the issue
|
|
46
|
+
- **severity** — high, medium, or low
|
|
47
|
+
- **file_refs** — specific file paths referenced in the finding
|
|
48
|
+
</step>
|
|
49
|
+
|
|
50
|
+
<step name="classify-findings">
|
|
51
|
+
For each finding, classify as one of:
|
|
52
|
+
|
|
53
|
+
- **auto-fixable** — clear code change, specific file referenced, testable fix
|
|
54
|
+
- **manual-only** — requires design decisions, ambiguous scope, architectural changes, user input needed
|
|
55
|
+
- **skip** — severity below the `--severity` threshold
|
|
56
|
+
|
|
57
|
+
**Classification heuristics** (err on manual-only when uncertain):
|
|
58
|
+
|
|
59
|
+
Auto-fixable signals:
|
|
60
|
+
- References a specific file path + line number
|
|
61
|
+
- Describes a missing test or assertion
|
|
62
|
+
- Missing export, wrong import path, typo in identifier
|
|
63
|
+
- Clear single-file change with obvious expected behavior
|
|
64
|
+
|
|
65
|
+
Manual-only signals:
|
|
66
|
+
- Uses words like "consider", "evaluate", "design", "rethink"
|
|
67
|
+
- Requires new architecture or API changes
|
|
68
|
+
- Ambiguous scope or multiple valid approaches
|
|
69
|
+
- Requires user input or design decisions
|
|
70
|
+
- Cross-cutting concerns affecting multiple subsystems
|
|
71
|
+
- Performance or scalability issues without clear fix
|
|
72
|
+
|
|
73
|
+
**When uncertain, always classify as manual-only.**
|
|
74
|
+
</step>
|
|
75
|
+
|
|
76
|
+
<step name="present-classification">
|
|
77
|
+
Display the classification table:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
## Audit-Fix Classification
|
|
81
|
+
|
|
82
|
+
| # | Finding | Severity | Classification | Reason |
|
|
83
|
+
|---|---------|----------|---------------|--------|
|
|
84
|
+
| F-01 | Missing export in index.ts | high | auto-fixable | Specific file, clear fix |
|
|
85
|
+
| F-02 | No error handling in payment flow | high | manual-only | Requires design decisions |
|
|
86
|
+
| F-03 | Test stub with 0 assertions | medium | auto-fixable | Clear test gap |
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If `--dry-run` was specified, **stop here and exit**. The classification table is the
|
|
90
|
+
final output — do not proceed to fixing.
|
|
91
|
+
</step>
|
|
92
|
+
|
|
93
|
+
<step name="fix-loop">
|
|
94
|
+
For each **auto-fixable** finding (up to `--max`, ordered by severity desc):
|
|
95
|
+
|
|
96
|
+
**a. Spawn executor agent:**
|
|
97
|
+
```
|
|
98
|
+
Task(
|
|
99
|
+
prompt="Fix finding {ID}: {description}. Files: {file_refs}. Make the minimal change to resolve this specific finding. Do not refactor surrounding code.",
|
|
100
|
+
subagent_type="sdd-executor"
|
|
101
|
+
)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**b. Run tests:**
|
|
105
|
+
```bash
|
|
106
|
+
npm test 2>&1 | tail -20
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**c. If tests pass** — commit atomically:
|
|
110
|
+
```bash
|
|
111
|
+
git add {changed_files}
|
|
112
|
+
git commit -m "fix({scope}): resolve {ID} — {description}"
|
|
113
|
+
```
|
|
114
|
+
The commit message **must** include the finding ID (e.g., F-01) for traceability.
|
|
115
|
+
|
|
116
|
+
**d. If tests fail** — revert changes, mark finding as `fix-failed`, and **stop the pipeline**:
|
|
117
|
+
```bash
|
|
118
|
+
git checkout -- {changed_files} 2>/dev/null
|
|
119
|
+
```
|
|
120
|
+
Log the failure reason and stop processing — do not continue to the next finding.
|
|
121
|
+
A test failure indicates the codebase may be in an unexpected state, so the pipeline
|
|
122
|
+
must halt to avoid cascading issues. Remaining auto-fixable findings will appear in the
|
|
123
|
+
report as `not-attempted`.
|
|
124
|
+
</step>
|
|
125
|
+
|
|
126
|
+
<step name="report">
|
|
127
|
+
Present the final summary:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
## Audit-Fix Complete
|
|
131
|
+
|
|
132
|
+
**Source:** {audit_command}
|
|
133
|
+
**Findings:** {total} total, {auto} auto-fixable, {manual} manual-only
|
|
134
|
+
**Fixed:** {fixed_count}/{auto} auto-fixable findings
|
|
135
|
+
**Failed:** {failed_count} (reverted)
|
|
136
|
+
|
|
137
|
+
| # | Finding | Status | Commit |
|
|
138
|
+
|---|---------|--------|--------|
|
|
139
|
+
| F-01 | Missing export | Fixed | abc1234 |
|
|
140
|
+
| F-03 | Test stub | Fix failed | (reverted) |
|
|
141
|
+
|
|
142
|
+
### Manual-only findings (require developer attention):
|
|
143
|
+
- F-02: No error handling in payment flow — requires design decisions
|
|
144
|
+
```
|
|
145
|
+
</step>
|
|
146
|
+
|
|
147
|
+
</process>
|
|
148
|
+
|
|
149
|
+
<success_criteria>
|
|
150
|
+
- Auto-fixable findings processed sequentially until --max reached or a test failure stops the pipeline
|
|
151
|
+
- Tests pass after each committed fix (no broken commits)
|
|
152
|
+
- Failed fixes are reverted cleanly (no partial changes left)
|
|
153
|
+
- Pipeline stops after the first test failure (no cascading fixes)
|
|
154
|
+
- Every commit message contains the finding ID
|
|
155
|
+
- Manual-only findings are surfaced for developer attention
|
|
156
|
+
- --dry-run produces a useful standalone classification table
|
|
157
|
+
</success_criteria>
|
|
@@ -158,7 +158,7 @@ Classify per phase:
|
|
|
158
158
|
|
|
159
159
|
Add to audit YAML: `nyquist: { compliant_phases, partial_phases, missing_phases, overall }`
|
|
160
160
|
|
|
161
|
-
Discovery only — never auto-calls `/sdd
|
|
161
|
+
Discovery only — never auto-calls `/sdd-validate-phase`.
|
|
162
162
|
|
|
163
163
|
## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
|
|
164
164
|
|
|
@@ -229,9 +229,9 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
|
229
229
|
|
|
230
230
|
**Complete milestone** — archive and tag
|
|
231
231
|
|
|
232
|
-
/
|
|
232
|
+
/clear then:
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
/sdd-complete-milestone {version}
|
|
235
235
|
|
|
236
236
|
───────────────────────────────────────────────────────────────
|
|
237
237
|
|
|
@@ -264,9 +264,9 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
|
264
264
|
|
|
265
265
|
| Phase | VALIDATION.md | Compliant | Action |
|
|
266
266
|
|-------|---------------|-----------|--------|
|
|
267
|
-
| {phase} | exists/missing | true/false/partial | `/sdd
|
|
267
|
+
| {phase} | exists/missing | true/false/partial | `/sdd-validate-phase {N}` |
|
|
268
268
|
|
|
269
|
-
Phases needing validation: run `/sdd
|
|
269
|
+
Phases needing validation: run `/sdd-validate-phase {N}` for each flagged phase.
|
|
270
270
|
|
|
271
271
|
───────────────────────────────────────────────────────────────
|
|
272
272
|
|
|
@@ -274,15 +274,15 @@ Phases needing validation: run `/sdd:validate-phase {N}` for each flagged phase.
|
|
|
274
274
|
|
|
275
275
|
**Plan gap closure** — create phases to complete milestone
|
|
276
276
|
|
|
277
|
-
/
|
|
277
|
+
/clear then:
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
/sdd-plan-milestone-gaps
|
|
280
280
|
|
|
281
281
|
───────────────────────────────────────────────────────────────
|
|
282
282
|
|
|
283
283
|
**Also available:**
|
|
284
284
|
- cat .planning/v{version}-MILESTONE-AUDIT.md — see full report
|
|
285
|
-
- /sdd
|
|
285
|
+
- /sdd-complete-milestone {version} — proceed anyway (accept tech debt)
|
|
286
286
|
|
|
287
287
|
───────────────────────────────────────────────────────────────
|
|
288
288
|
|
|
@@ -312,13 +312,13 @@ All requirements met. No critical blockers. Accumulated tech debt needs review.
|
|
|
312
312
|
|
|
313
313
|
**A. Complete milestone** — accept debt, track in backlog
|
|
314
314
|
|
|
315
|
-
/sdd
|
|
315
|
+
/sdd-complete-milestone {version}
|
|
316
316
|
|
|
317
317
|
**B. Plan cleanup phase** — address debt before completing
|
|
318
318
|
|
|
319
|
-
/
|
|
319
|
+
/clear then:
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
/sdd-plan-milestone-gaps
|
|
322
322
|
|
|
323
323
|
───────────────────────────────────────────────────────────────
|
|
324
324
|
</offer_next>
|
|
@@ -76,9 +76,9 @@ Present the audit report:
|
|
|
76
76
|
|
|
77
77
|
## Recommended Actions
|
|
78
78
|
|
|
79
|
-
1. **Close stale items:** `/sdd
|
|
79
|
+
1. **Close stale items:** `/sdd-verify-work {phase}` — mark stale tests as resolved
|
|
80
80
|
2. **Run active tests:** Human UAT test plan below
|
|
81
|
-
3. **When prerequisites met:** Retest blocked items with `/sdd
|
|
81
|
+
3. **When prerequisites met:** Retest blocked items with `/sdd-verify-work {phase}`
|
|
82
82
|
```
|
|
83
83
|
</step>
|
|
84
84
|
|