sdlc-framework 1.0.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/LICENSE +21 -0
- package/README.md +321 -0
- package/bin/install.js +193 -0
- package/package.json +39 -0
- package/src/commands/close.md +200 -0
- package/src/commands/debug.md +124 -0
- package/src/commands/fast.md +149 -0
- package/src/commands/fix.md +104 -0
- package/src/commands/help.md +144 -0
- package/src/commands/hotfix.md +99 -0
- package/src/commands/impl.md +142 -0
- package/src/commands/init.md +93 -0
- package/src/commands/milestone.md +136 -0
- package/src/commands/pause.md +115 -0
- package/src/commands/research.md +136 -0
- package/src/commands/resume.md +103 -0
- package/src/commands/review.md +195 -0
- package/src/commands/spec.md +164 -0
- package/src/commands/status.md +118 -0
- package/src/commands/verify.md +153 -0
- package/src/references/clarification-strategy.md +352 -0
- package/src/references/engineering-laws.md +374 -0
- package/src/references/loop-phases.md +331 -0
- package/src/references/playwright-testing.md +298 -0
- package/src/references/prompt-detection.md +264 -0
- package/src/references/sub-agent-strategy.md +260 -0
- package/src/rules/commands.md +180 -0
- package/src/rules/style.md +354 -0
- package/src/rules/templates.md +238 -0
- package/src/rules/workflows.md +314 -0
- package/src/templates/HANDOFF.md +121 -0
- package/src/templates/LAWS.md +521 -0
- package/src/templates/PROJECT.md +112 -0
- package/src/templates/REVIEW.md +145 -0
- package/src/templates/ROADMAP.md +101 -0
- package/src/templates/SPEC.md +231 -0
- package/src/templates/STATE.md +106 -0
- package/src/templates/SUMMARY.md +126 -0
- package/src/workflows/close-phase.md +189 -0
- package/src/workflows/debug-flow.md +302 -0
- package/src/workflows/fast-forward.md +340 -0
- package/src/workflows/fix-findings.md +235 -0
- package/src/workflows/hotfix-flow.md +190 -0
- package/src/workflows/impl-phase.md +229 -0
- package/src/workflows/init-project.md +249 -0
- package/src/workflows/milestone-management.md +169 -0
- package/src/workflows/pause-work.md +153 -0
- package/src/workflows/research.md +219 -0
- package/src/workflows/resume-project.md +159 -0
- package/src/workflows/review-phase.md +337 -0
- package/src/workflows/spec-phase.md +379 -0
- package/src/workflows/transition-phase.md +203 -0
- package/src/workflows/verify-phase.md +280 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdlc:close
|
|
3
|
+
description: Reconcile spec vs actual and close the loop
|
|
4
|
+
argument-hint: "[spec-path]"
|
|
5
|
+
allowed-tools: [Read, Write, Bash, Glob, Grep, Edit]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<objective>
|
|
9
|
+
Close the current SDLC loop by reconciling what was planned (SPEC.md) against what was built (IMPL.md, VERIFY.md, REVIEW.md). Record deviations, decisions, and lessons learned. Advance the state to the next plan or phase.
|
|
10
|
+
|
|
11
|
+
**When to use:** After /sdlc:review completes with no blockers. This is the CLOSE phase of the SDLC loop.
|
|
12
|
+
|
|
13
|
+
**What it does:**
|
|
14
|
+
1. Read all artifacts from the current loop: SPEC, IMPL, VERIFY, REVIEW.
|
|
15
|
+
2. Compare planned vs actual: tasks completed, ACs met, scope adhered to.
|
|
16
|
+
3. Record deviations with reasons (scope changes, discovered complexity, design pivots).
|
|
17
|
+
4. Create SUMMARY.md with deliverables, results, deviations, decisions, and lessons.
|
|
18
|
+
5. Update STATE.md to advance to the next plan or phase.
|
|
19
|
+
|
|
20
|
+
**What happens next:**
|
|
21
|
+
- More plans in the current phase: Framework directs you to /sdlc:spec for the next plan.
|
|
22
|
+
- Phase complete (all plans done): Framework directs you to the next milestone/phase.
|
|
23
|
+
- All milestones complete: Project is done.
|
|
24
|
+
|
|
25
|
+
**Critical rule:** No loop closes without reconciliation. Every deviation from the spec is documented with a reason. Lessons learned feed into the next loop.
|
|
26
|
+
</objective>
|
|
27
|
+
|
|
28
|
+
<execution_context>
|
|
29
|
+
@~/.claude/sdlc-framework/workflows/close-loop.md
|
|
30
|
+
@.sdlc/STATE.md
|
|
31
|
+
@.sdlc/ROADMAP.md
|
|
32
|
+
</execution_context>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
$ARGUMENTS — optional path to SPEC.md. If not provided, read from .sdlc/STATE.md spec_path field.
|
|
36
|
+
|
|
37
|
+
Read these files:
|
|
38
|
+
- .sdlc/STATE.md — current plan, all artifact paths.
|
|
39
|
+
- .sdlc/ROADMAP.md — milestones, phases, plans to determine next steps.
|
|
40
|
+
- .sdlc/specs/SPEC-<plan-id>.md — what was planned.
|
|
41
|
+
- .sdlc/impl/IMPL-<plan-id>.md — what was built.
|
|
42
|
+
- .sdlc/verify/VERIFY-<plan-id>.md — what was verified.
|
|
43
|
+
- .sdlc/review/REVIEW-<plan-id>.md — what was reviewed.
|
|
44
|
+
</context>
|
|
45
|
+
|
|
46
|
+
<process>
|
|
47
|
+
Follow workflow: @~/.claude/sdlc-framework/workflows/close-loop.md
|
|
48
|
+
|
|
49
|
+
Step-by-step:
|
|
50
|
+
|
|
51
|
+
1. **Load all loop artifacts**
|
|
52
|
+
- Read .sdlc/STATE.md. Confirm loop_position is REVIEW_COMPLETE. If not, warn: "Review not complete. Run /sdlc:review first."
|
|
53
|
+
- Read SPEC-<plan-id>.md — extract: objective, acceptance criteria, tasks, boundaries.
|
|
54
|
+
- Read IMPL-<plan-id>.md — extract: tasks completed, files modified, build status.
|
|
55
|
+
- Read VERIFY-<plan-id>.md — extract: AC results (pass/fail per criterion).
|
|
56
|
+
- Read REVIEW-<plan-id>.md — extract: findings summary, warnings count.
|
|
57
|
+
|
|
58
|
+
2. **Reconcile: Planned vs Actual**
|
|
59
|
+
|
|
60
|
+
**Tasks reconciliation:**
|
|
61
|
+
- List every task from SPEC.md.
|
|
62
|
+
- For each task, determine: completed, skipped, or modified.
|
|
63
|
+
- If a task was skipped: record why.
|
|
64
|
+
- If a task was modified from the original plan: record what changed and why.
|
|
65
|
+
- If additional tasks were added during implementation: record what and why.
|
|
66
|
+
|
|
67
|
+
**Acceptance criteria reconciliation:**
|
|
68
|
+
- List every AC from SPEC.md.
|
|
69
|
+
- Map each AC to its verification result (pass/fail).
|
|
70
|
+
- All ACs should pass (otherwise /sdlc:verify would not have advanced). Confirm this.
|
|
71
|
+
|
|
72
|
+
**Scope reconciliation:**
|
|
73
|
+
- Compare files modified against SPEC.md "Files to Modify" list.
|
|
74
|
+
- Identify files modified that were NOT in the original spec.
|
|
75
|
+
- Identify files in the spec that were NOT modified.
|
|
76
|
+
- Record each deviation with a reason.
|
|
77
|
+
|
|
78
|
+
**Boundary reconciliation:**
|
|
79
|
+
- Check if any out-of-scope work was performed.
|
|
80
|
+
- Check if any deferred items were pulled in.
|
|
81
|
+
- Record each boundary violation with a reason.
|
|
82
|
+
|
|
83
|
+
3. **Record deviations**
|
|
84
|
+
For each deviation from the original spec, document:
|
|
85
|
+
- What was planned.
|
|
86
|
+
- What actually happened.
|
|
87
|
+
- Why the deviation occurred (discovered complexity, user request, design pivot, bug found).
|
|
88
|
+
- Impact on future work (does this change subsequent plans?).
|
|
89
|
+
|
|
90
|
+
4. **Record decisions**
|
|
91
|
+
Compile all design decisions made during this loop:
|
|
92
|
+
- Decisions from /sdlc:spec (architectural choices).
|
|
93
|
+
- Decisions from /sdlc:impl (implementation choices).
|
|
94
|
+
- Decisions from /sdlc:review (remediation approaches).
|
|
95
|
+
Include the rationale for each decision.
|
|
96
|
+
|
|
97
|
+
5. **Extract lessons learned**
|
|
98
|
+
Analyze the loop for process improvements:
|
|
99
|
+
- What went well? (Patterns to repeat.)
|
|
100
|
+
- What went poorly? (Patterns to avoid.)
|
|
101
|
+
- What was surprising? (Unknown unknowns discovered.)
|
|
102
|
+
- Estimation accuracy: was task complexity estimated correctly?
|
|
103
|
+
- Spec quality: were acceptance criteria clear enough? Did implementation reveal gaps?
|
|
104
|
+
|
|
105
|
+
6. **Create SUMMARY.md**
|
|
106
|
+
Write .sdlc/summaries/SUMMARY-<plan-id>.md with:
|
|
107
|
+
```
|
|
108
|
+
# Loop Summary: <plan title>
|
|
109
|
+
|
|
110
|
+
## Objective
|
|
111
|
+
<from SPEC.md>
|
|
112
|
+
|
|
113
|
+
## Deliverables
|
|
114
|
+
- Files created: <list>
|
|
115
|
+
- Files modified: <list>
|
|
116
|
+
- Tests added: <list>
|
|
117
|
+
|
|
118
|
+
## Acceptance Criteria Results
|
|
119
|
+
| AC | Title | Status |
|
|
120
|
+
|----|-------|--------|
|
|
121
|
+
| AC-1 | <title> | PASS |
|
|
122
|
+
| AC-2 | <title> | PASS |
|
|
123
|
+
|
|
124
|
+
## Review Summary
|
|
125
|
+
- Blockers found and fixed: <count>
|
|
126
|
+
- Warnings: <count> (<count> addressed, <count> deferred)
|
|
127
|
+
- Info: <count>
|
|
128
|
+
|
|
129
|
+
## Deviations from Spec
|
|
130
|
+
### D-1: <title>
|
|
131
|
+
- Planned: <what was planned>
|
|
132
|
+
- Actual: <what happened>
|
|
133
|
+
- Reason: <why>
|
|
134
|
+
- Impact: <effect on future work>
|
|
135
|
+
|
|
136
|
+
## Key Decisions
|
|
137
|
+
### Decision 1: <title>
|
|
138
|
+
- Context: <why the decision was needed>
|
|
139
|
+
- Options considered: <list>
|
|
140
|
+
- Chosen: <which option>
|
|
141
|
+
- Rationale: <why>
|
|
142
|
+
|
|
143
|
+
## Lessons Learned
|
|
144
|
+
- <lesson 1>
|
|
145
|
+
- <lesson 2>
|
|
146
|
+
|
|
147
|
+
## Metrics
|
|
148
|
+
- Tasks planned: <count>
|
|
149
|
+
- Tasks completed: <count>
|
|
150
|
+
- Tasks skipped: <count>
|
|
151
|
+
- Execution waves: <count>
|
|
152
|
+
- ACs defined: <count>
|
|
153
|
+
- ACs passed: <count>
|
|
154
|
+
- Review findings: <blockers>/<warnings>/<info>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
7. **Update STATE.md**
|
|
158
|
+
- Set `loop_position: SPEC` (ready for next loop).
|
|
159
|
+
- Archive the current plan: move plan-id to `completed_plans` list.
|
|
160
|
+
- Determine next action:
|
|
161
|
+
- Read ROADMAP.md to find the next plan in the current phase.
|
|
162
|
+
- If more plans exist: set `current_plan: <next-plan-id>`.
|
|
163
|
+
- If no more plans in this phase: mark the phase as complete, advance to the next phase.
|
|
164
|
+
- If no more phases in this milestone: mark the milestone as complete.
|
|
165
|
+
|
|
166
|
+
8. **Update ROADMAP.md**
|
|
167
|
+
- Mark the completed plan as done.
|
|
168
|
+
- If phase is complete: mark the phase as done.
|
|
169
|
+
- If milestone is complete: mark the milestone as done.
|
|
170
|
+
|
|
171
|
+
9. **Determine and output next action**
|
|
172
|
+
- If more plans in the current phase:
|
|
173
|
+
- Output: "Plan <plan-id> complete. Next plan: <next-plan-id>."
|
|
174
|
+
- End with: NEXT ACTION REQUIRED: /sdlc:spec
|
|
175
|
+
- If phase is complete but more phases exist:
|
|
176
|
+
- Output: "Phase <phase-name> complete. Next phase: <next-phase-name>."
|
|
177
|
+
- End with: NEXT ACTION REQUIRED: /sdlc:spec
|
|
178
|
+
- If milestone is complete but more milestones exist:
|
|
179
|
+
- Output: "Milestone <milestone-name> complete. Next milestone: <next-milestone-name>."
|
|
180
|
+
- End with: NEXT ACTION REQUIRED: /sdlc:spec
|
|
181
|
+
- If all milestones are complete:
|
|
182
|
+
- Output: "All milestones complete. Project roadmap fulfilled."
|
|
183
|
+
- End with: "Project complete. Run /sdlc:init to start a new project or update ROADMAP.md with new milestones."
|
|
184
|
+
</process>
|
|
185
|
+
|
|
186
|
+
<success_criteria>
|
|
187
|
+
- [ ] All loop artifacts read: SPEC, IMPL, VERIFY, REVIEW
|
|
188
|
+
- [ ] Task reconciliation complete: each task marked completed, skipped, or modified
|
|
189
|
+
- [ ] Acceptance criteria reconciliation complete: every AC mapped to pass/fail
|
|
190
|
+
- [ ] Scope reconciliation complete: files planned vs files modified compared
|
|
191
|
+
- [ ] Boundary reconciliation complete: out-of-scope work identified
|
|
192
|
+
- [ ] Every deviation documented with: what was planned, what happened, why, impact
|
|
193
|
+
- [ ] Key decisions recorded with rationale
|
|
194
|
+
- [ ] Lessons learned extracted from the loop
|
|
195
|
+
- [ ] SUMMARY-<plan-id>.md created with full reconciliation
|
|
196
|
+
- [ ] STATE.md updated: loop_position reset to SPEC, current plan advanced
|
|
197
|
+
- [ ] ROADMAP.md updated: completed plan/phase/milestone marked as done
|
|
198
|
+
- [ ] Correct next action determined based on roadmap position
|
|
199
|
+
- [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:spec (or project complete message)
|
|
200
|
+
</success_criteria>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdlc:debug
|
|
3
|
+
description: "Structured debugging with reproduce-isolate-fix-verify"
|
|
4
|
+
argument-hint: "<issue-description>"
|
|
5
|
+
allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, Agent, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_click, mcp__plugin_playwright_playwright__browser_fill_form, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_evaluate, mcp__plugin_playwright_playwright__browser_console_messages, mcp__plugin_playwright_playwright__browser_network_requests, mcp__plugin_playwright_playwright__browser_close, AskUserQuestion]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<objective>
|
|
9
|
+
Structured debugging that follows a disciplined flow: REPRODUCE, ISOLATE, ROOT-CAUSE, FIX, VERIFY. No guessing. No shotgun debugging.
|
|
10
|
+
|
|
11
|
+
**When to use:** Something is broken. You have a bug report, an error message, or unexpected behavior.
|
|
12
|
+
|
|
13
|
+
**What it does:**
|
|
14
|
+
1. Reproduce the bug with a minimal test case or Playwright sequence.
|
|
15
|
+
2. Isolate the source through binary search and code analysis.
|
|
16
|
+
3. Identify the root cause — WHY it happens, not just WHERE.
|
|
17
|
+
4. Apply a fix that follows engineering laws.
|
|
18
|
+
5. Verify the fix by re-running the reproduction and regression tests.
|
|
19
|
+
|
|
20
|
+
**What happens next:** /sdlc:review to validate the fix meets engineering standards.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<execution_context>
|
|
24
|
+
@~/.claude/sdlc-framework/workflows/debug.md
|
|
25
|
+
@.sdlc/STATE.md
|
|
26
|
+
@.sdlc/LAWS.md
|
|
27
|
+
</execution_context>
|
|
28
|
+
|
|
29
|
+
<context>
|
|
30
|
+
$ARGUMENTS
|
|
31
|
+
|
|
32
|
+
Read .sdlc/STATE.md to confirm framework is initialized.
|
|
33
|
+
Read .sdlc/LAWS.md to load engineering laws — the fix must comply.
|
|
34
|
+
Gather any error messages, stack traces, or reproduction steps from the user's description.
|
|
35
|
+
</context>
|
|
36
|
+
|
|
37
|
+
<process>
|
|
38
|
+
Follow workflow: @~/.claude/sdlc-framework/workflows/debug.md
|
|
39
|
+
|
|
40
|
+
Step-by-step:
|
|
41
|
+
|
|
42
|
+
1. **Pre-flight check**
|
|
43
|
+
- Verify .sdlc/ exists. If not, tell the user to run /sdlc:init first.
|
|
44
|
+
- Read .sdlc/STATE.md. Update loop_position to DEBUG.
|
|
45
|
+
- Parse $ARGUMENTS for: error message, affected area, steps to reproduce.
|
|
46
|
+
|
|
47
|
+
2. **REPRODUCE — Create a minimal reproduction**
|
|
48
|
+
- Goal: A failing test or Playwright sequence that demonstrates the bug.
|
|
49
|
+
- For code bugs:
|
|
50
|
+
- Search the codebase for the affected function/module using Grep.
|
|
51
|
+
- Write a minimal test case that triggers the failure.
|
|
52
|
+
- Run the test. Confirm it fails with the reported error.
|
|
53
|
+
- For UI bugs:
|
|
54
|
+
- Use Playwright to navigate to the affected page.
|
|
55
|
+
- Execute the steps that trigger the bug.
|
|
56
|
+
- Take a screenshot of the broken state.
|
|
57
|
+
- Capture console messages and network requests for clues.
|
|
58
|
+
- If reproduction fails, ask the user for more details via AskUserQuestion.
|
|
59
|
+
- Record the reproduction steps in the debug log.
|
|
60
|
+
|
|
61
|
+
3. **ISOLATE — Binary search for the source**
|
|
62
|
+
- Start from the error location and work backward.
|
|
63
|
+
- Use Grep to find all callers of the failing function.
|
|
64
|
+
- Use Read to examine suspicious code paths.
|
|
65
|
+
- Narrow down: which specific line or condition causes the failure?
|
|
66
|
+
- Techniques:
|
|
67
|
+
- Add logging to confirm execution path.
|
|
68
|
+
- Check recent git changes to the affected files (`git log --oneline -10 <file>`).
|
|
69
|
+
- Test with simplified inputs to isolate the trigger.
|
|
70
|
+
- Record: "Bug is in [file]:[line] — triggered when [condition]."
|
|
71
|
+
|
|
72
|
+
4. **ROOT-CAUSE — Explain WHY, not just WHERE**
|
|
73
|
+
- Answer these questions:
|
|
74
|
+
- What assumption does the code make that is wrong?
|
|
75
|
+
- When was this assumption introduced?
|
|
76
|
+
- What edge case does it fail to handle?
|
|
77
|
+
- Are there other locations with the same flawed assumption?
|
|
78
|
+
- Record the root cause explanation in plain language.
|
|
79
|
+
- Search for similar patterns elsewhere in the codebase that might have the same bug.
|
|
80
|
+
|
|
81
|
+
5. **FIX — Apply the fix following engineering laws**
|
|
82
|
+
- Fix the root cause, not the symptom.
|
|
83
|
+
- Enforce engineering laws:
|
|
84
|
+
- DRY: if a similar fix exists elsewhere, use the same pattern.
|
|
85
|
+
- Handle edge cases: null, undefined, empty arrays, empty strings.
|
|
86
|
+
- Max 40 lines per function. Extract helpers if needed.
|
|
87
|
+
- Named types for complex objects.
|
|
88
|
+
- No lint suppression.
|
|
89
|
+
- If similar bugs exist elsewhere (found in step 4), fix ALL of them.
|
|
90
|
+
|
|
91
|
+
6. **VERIFY — Confirm the fix works**
|
|
92
|
+
- Re-run the reproduction test from step 2. It MUST pass now.
|
|
93
|
+
- Run the full test suite to check for regressions.
|
|
94
|
+
- For UI bugs: re-run the Playwright sequence. Take a screenshot of the fixed state.
|
|
95
|
+
- If verification fails: return to step 3 (ISOLATE) — the root cause was wrong.
|
|
96
|
+
|
|
97
|
+
7. **Create DEBUG-LOG.md**
|
|
98
|
+
- Save to .sdlc/debug-logs/DEBUG-{timestamp}.md with:
|
|
99
|
+
- Bug description (from $ARGUMENTS)
|
|
100
|
+
- Reproduction steps and test case
|
|
101
|
+
- Isolation path (how you narrowed it down)
|
|
102
|
+
- Root cause explanation
|
|
103
|
+
- Fix applied (files and lines changed)
|
|
104
|
+
- Verification results
|
|
105
|
+
- Related patterns found (if any)
|
|
106
|
+
- This log serves as knowledge retention for future debugging.
|
|
107
|
+
|
|
108
|
+
8. **Update STATE.md and force next action**
|
|
109
|
+
- Update .sdlc/STATE.md: record the debug session, files changed.
|
|
110
|
+
- Output: "NEXT ACTION REQUIRED: /sdlc:review — validate the fix meets engineering standards."
|
|
111
|
+
</process>
|
|
112
|
+
|
|
113
|
+
<success_criteria>
|
|
114
|
+
- [ ] Bug reproduced with a failing test case or Playwright sequence
|
|
115
|
+
- [ ] Source isolated to specific file and line
|
|
116
|
+
- [ ] Root cause explained (WHY, not just WHERE)
|
|
117
|
+
- [ ] Fix applied following engineering laws from LAWS.md
|
|
118
|
+
- [ ] Reproduction test passes after fix
|
|
119
|
+
- [ ] Full test suite passes (no regressions)
|
|
120
|
+
- [ ] Similar bugs in other locations identified and fixed
|
|
121
|
+
- [ ] DEBUG-LOG.md created in .sdlc/debug-logs/
|
|
122
|
+
- [ ] STATE.md updated
|
|
123
|
+
- [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:review
|
|
124
|
+
</success_criteria>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdlc:fast
|
|
3
|
+
description: "Quick entry point — describe work, framework routes and executes"
|
|
4
|
+
argument-hint: "<description>"
|
|
5
|
+
allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_click, mcp__plugin_playwright_playwright__browser_fill_form, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_evaluate, mcp__plugin_playwright_playwright__browser_close, AskUserQuestion]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<objective>
|
|
9
|
+
The primary entry point for getting work done. Describe what you need in plain language — the framework classifies the work, estimates complexity, and either handles it inline or routes to the appropriate command.
|
|
10
|
+
|
|
11
|
+
**When to use:** Anytime. This is the default command for starting work. Use it instead of figuring out which specific command to run.
|
|
12
|
+
|
|
13
|
+
**What it does:**
|
|
14
|
+
1. Classify the work type (feature, bug, refactor, test, docs, research).
|
|
15
|
+
2. Estimate complexity (files, lines, dependencies).
|
|
16
|
+
3. Route based on classification and complexity:
|
|
17
|
+
- Simple work (≤3 files, ≤100 lines): execute full loop inline (spec→impl→verify→review→close).
|
|
18
|
+
- Complex feature: route to /sdlc:spec with pre-filled context.
|
|
19
|
+
- Bug: route to /sdlc:debug with reproduction context.
|
|
20
|
+
- Research question: route to /sdlc:research with topic.
|
|
21
|
+
- Critical production issue: route to /sdlc:hotfix with context.
|
|
22
|
+
4. For inline execution: run compressed loop with full engineering law enforcement.
|
|
23
|
+
|
|
24
|
+
**What happens next:** Depends on routing — either the task is complete, or you are directed to the appropriate specialized command.
|
|
25
|
+
|
|
26
|
+
**This is the "I just want to tell you what to do" command.** No ceremony. No choosing commands. Describe the work, the framework handles the rest.
|
|
27
|
+
</objective>
|
|
28
|
+
|
|
29
|
+
<execution_context>
|
|
30
|
+
@~/.claude/sdlc-framework/workflows/fast-forward.md
|
|
31
|
+
@~/.claude/sdlc-framework/references/prompt-detection.md
|
|
32
|
+
@.sdlc/STATE.md
|
|
33
|
+
@.sdlc/LAWS.md
|
|
34
|
+
@.sdlc/PROJECT.md
|
|
35
|
+
</execution_context>
|
|
36
|
+
|
|
37
|
+
<context>
|
|
38
|
+
$ARGUMENTS — natural language description of the work to be done.
|
|
39
|
+
|
|
40
|
+
Read these files to understand current state:
|
|
41
|
+
- .sdlc/STATE.md — current loop position, active phase, what was last done.
|
|
42
|
+
- .sdlc/PROJECT.md — project context, tech stack.
|
|
43
|
+
- .sdlc/LAWS.md — engineering laws for enforcement.
|
|
44
|
+
</context>
|
|
45
|
+
|
|
46
|
+
<process>
|
|
47
|
+
Follow workflow: @~/.claude/sdlc-framework/workflows/fast-forward.md
|
|
48
|
+
|
|
49
|
+
Step-by-step:
|
|
50
|
+
|
|
51
|
+
1. **Pre-flight check**
|
|
52
|
+
- Verify .sdlc/ exists. If not: "Run /sdlc:init first."
|
|
53
|
+
- Read .sdlc/STATE.md to understand current position.
|
|
54
|
+
- Read .sdlc/LAWS.md to load engineering laws.
|
|
55
|
+
|
|
56
|
+
2. **Classify the work** (prompt detection)
|
|
57
|
+
Parse $ARGUMENTS to determine work type:
|
|
58
|
+
|
|
59
|
+
| Type | Indicators | Route |
|
|
60
|
+
|------|-----------|-------|
|
|
61
|
+
| BUG | "fix", "bug", "error", "broken", "crash", "fails", "wrong", "regression" | /sdlc:debug |
|
|
62
|
+
| CRITICAL | "urgent", "production", "down", "outage", "critical", "P0", "hotfix" | /sdlc:hotfix |
|
|
63
|
+
| RESEARCH | "explore", "investigate", "research", "compare", "evaluate", "options" | /sdlc:research |
|
|
64
|
+
| FEATURE | "add", "create", "build", "implement", "new", "introduce" | complexity-dependent |
|
|
65
|
+
| REFACTOR | "refactor", "clean", "rename", "extract", "move", "simplify" | complexity-dependent |
|
|
66
|
+
| TEST | "test", "coverage", "spec", "assertion" | complexity-dependent |
|
|
67
|
+
| DOCS | "doc", "readme", "comment", "describe" | complexity-dependent |
|
|
68
|
+
|
|
69
|
+
Display: "Classified as: {type}"
|
|
70
|
+
|
|
71
|
+
3. **Immediate routing** (for specialized types)
|
|
72
|
+
- BUG → Display: "Bug detected. NEXT ACTION REQUIRED: /sdlc:debug {original description}" — STOP.
|
|
73
|
+
- CRITICAL → Display: "Critical issue. NEXT ACTION REQUIRED: /sdlc:hotfix {original description}" — STOP.
|
|
74
|
+
- RESEARCH → Display: "Research task. NEXT ACTION REQUIRED: /sdlc:research {original description}" — STOP.
|
|
75
|
+
|
|
76
|
+
4. **Complexity estimation** (for feature/refactor/test/docs)
|
|
77
|
+
- Scan codebase for files related to the description.
|
|
78
|
+
- Estimate file count and line count.
|
|
79
|
+
- Check for cross-module dependencies.
|
|
80
|
+
|
|
81
|
+
| Complexity | Files | Lines | Route |
|
|
82
|
+
|-----------|-------|-------|-------|
|
|
83
|
+
| Simple | ≤3 | ≤100 | Execute inline (fast loop) |
|
|
84
|
+
| Medium | 4-6 | 101-300 | Route to /sdlc:spec with pre-filled context |
|
|
85
|
+
| Complex | 7+ | 300+ | Route to /sdlc:spec with pre-filled context |
|
|
86
|
+
|
|
87
|
+
For MEDIUM/COMPLEX:
|
|
88
|
+
Display:
|
|
89
|
+
```
|
|
90
|
+
Task exceeds inline threshold ({N} files, ~{N} lines).
|
|
91
|
+
Routing to full spec for proper task decomposition and parallel sub-agent execution.
|
|
92
|
+
|
|
93
|
+
NEXT ACTION REQUIRED: /sdlc:spec
|
|
94
|
+
Context pre-loaded: {task description, identified files, estimated scope}
|
|
95
|
+
```
|
|
96
|
+
Write pre-filled context to .sdlc/STATE.md fast_context field so /sdlc:spec picks it up.
|
|
97
|
+
STOP.
|
|
98
|
+
|
|
99
|
+
5. **Inline execution — Mini-SPEC**
|
|
100
|
+
Create lightweight inline spec (not written to file):
|
|
101
|
+
```
|
|
102
|
+
Task: {name}
|
|
103
|
+
Type: {type}
|
|
104
|
+
Files: {list}
|
|
105
|
+
ACs:
|
|
106
|
+
AC-1: GIVEN ... WHEN ... THEN ...
|
|
107
|
+
Boundaries: do not modify files outside {list}
|
|
108
|
+
```
|
|
109
|
+
Display to user and ask: "Proceed? (yes/no)"
|
|
110
|
+
|
|
111
|
+
6. **Inline execution — Mini-IMPLEMENT**
|
|
112
|
+
- Read every file to modify first.
|
|
113
|
+
- Search for existing patterns before writing new code.
|
|
114
|
+
- Implement following engineering laws.
|
|
115
|
+
- No sub-agents (single-threaded for simple work).
|
|
116
|
+
|
|
117
|
+
7. **Inline execution — Mini-VERIFY**
|
|
118
|
+
- Run build + lint.
|
|
119
|
+
- Run tests relevant to changed files.
|
|
120
|
+
- For UI work: Playwright MCP verification.
|
|
121
|
+
- Check each AC: PASS or FAIL.
|
|
122
|
+
- If ANY FAIL: display failures, suggest fixes. User must fix and re-run.
|
|
123
|
+
|
|
124
|
+
8. **Inline execution — Mini-REVIEW**
|
|
125
|
+
- Quick engineering laws check on changed files only.
|
|
126
|
+
- Function length, params, nesting, DRY, security, error handling, tests.
|
|
127
|
+
- If BLOCKERS: fix inline (do not route to /sdlc:fix for fast tasks).
|
|
128
|
+
- If CLEAN: proceed.
|
|
129
|
+
|
|
130
|
+
9. **Inline execution — Mini-CLOSE**
|
|
131
|
+
- Create .sdlc/phases/{phase}/FF-{timestamp}-SUMMARY.md.
|
|
132
|
+
- Update STATE.md history.
|
|
133
|
+
- Restore prior state (fast does not advance the phase).
|
|
134
|
+
- Display completion summary.
|
|
135
|
+
</process>
|
|
136
|
+
|
|
137
|
+
<success_criteria>
|
|
138
|
+
- [ ] Work classified correctly from natural language description
|
|
139
|
+
- [ ] Bugs routed to /sdlc:debug — never processed inline
|
|
140
|
+
- [ ] Critical issues routed to /sdlc:hotfix
|
|
141
|
+
- [ ] Research tasks routed to /sdlc:research
|
|
142
|
+
- [ ] Complex work (>3 files or >100 lines) routed to /sdlc:spec with pre-filled context
|
|
143
|
+
- [ ] Simple work executed inline through full compressed loop
|
|
144
|
+
- [ ] All code changes comply with engineering laws
|
|
145
|
+
- [ ] Tests run and pass
|
|
146
|
+
- [ ] STATE.md updated appropriately
|
|
147
|
+
- [ ] Summary created for audit trail
|
|
148
|
+
- [ ] Routing decisions are explained to the user
|
|
149
|
+
</success_criteria>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdlc:fix
|
|
3
|
+
description: Fix review findings and re-verify compliance
|
|
4
|
+
argument-hint: "[review-path]"
|
|
5
|
+
allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList, AskUserQuestion]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<objective>
|
|
9
|
+
Systematically fix all blocker findings from /sdlc:review. Read the REVIEW.md, fix each violation, then re-run review to confirm compliance.
|
|
10
|
+
|
|
11
|
+
**When to use:** After /sdlc:review reports blockers that must be fixed before /sdlc:close.
|
|
12
|
+
|
|
13
|
+
**What it does:**
|
|
14
|
+
1. Read the REVIEW.md to load all findings.
|
|
15
|
+
2. Separate blockers (must fix) from warnings (should fix) and info (consider).
|
|
16
|
+
3. Analyze dependencies between findings (fixing one may resolve others).
|
|
17
|
+
4. For independent fixes: spawn parallel sub-agents per file.
|
|
18
|
+
5. For dependent fixes: apply sequentially.
|
|
19
|
+
6. After all blockers fixed: automatically re-run /sdlc:review to confirm compliance.
|
|
20
|
+
7. If warnings exist: present to user and ask which to fix (optional).
|
|
21
|
+
|
|
22
|
+
**What happens next:** Re-runs /sdlc:review automatically. If review passes, routes to /sdlc:close.
|
|
23
|
+
|
|
24
|
+
**Critical rule:** Fixes MUST follow the same engineering laws. A fix that introduces a new violation is not a fix.
|
|
25
|
+
</objective>
|
|
26
|
+
|
|
27
|
+
<execution_context>
|
|
28
|
+
@~/.claude/sdlc-framework/workflows/fix-findings.md
|
|
29
|
+
@~/.claude/sdlc-framework/references/engineering-laws.md
|
|
30
|
+
</execution_context>
|
|
31
|
+
|
|
32
|
+
<context>
|
|
33
|
+
$ARGUMENTS — optional path to REVIEW.md. If not provided, finds the most recent review file.
|
|
34
|
+
|
|
35
|
+
Read these files:
|
|
36
|
+
- .sdlc/STATE.md — current loop position and plan reference.
|
|
37
|
+
- The current REVIEW.md — findings to fix.
|
|
38
|
+
- .sdlc/LAWS.md — engineering laws for context on each violation.
|
|
39
|
+
- All files listed in REVIEW.md findings.
|
|
40
|
+
</context>
|
|
41
|
+
|
|
42
|
+
<process>
|
|
43
|
+
Follow workflow: @~/.claude/sdlc-framework/workflows/fix-findings.md
|
|
44
|
+
|
|
45
|
+
Step-by-step:
|
|
46
|
+
|
|
47
|
+
1. **Load review findings**
|
|
48
|
+
- Read REVIEW.md from .sdlc/phases/{phase}/{plan}-REVIEW.md
|
|
49
|
+
- Parse all findings: file, line, law, severity, description, suggested fix
|
|
50
|
+
- Count: blockers, warnings, info
|
|
51
|
+
|
|
52
|
+
2. **Triage findings**
|
|
53
|
+
- Group findings by file (fixes to the same file should be applied together)
|
|
54
|
+
- Identify dependencies between findings:
|
|
55
|
+
- DRY fix (extract utility) may resolve multiple findings across files
|
|
56
|
+
- SOLID fix (split class) may move code that has Clean Code findings
|
|
57
|
+
- YAGNI fix (remove code) may eliminate other findings on the removed code
|
|
58
|
+
- Order: fix dependent findings first, then independent ones in parallel
|
|
59
|
+
|
|
60
|
+
3. **Present fix plan to user**
|
|
61
|
+
```
|
|
62
|
+
Review Findings Fix Plan:
|
|
63
|
+
═══════════════════════════
|
|
64
|
+
Blockers to fix: {N}
|
|
65
|
+
Warnings to fix: {N} (optional — will ask)
|
|
66
|
+
|
|
67
|
+
Fix order:
|
|
68
|
+
1. {file}: {N} findings ({list laws violated})
|
|
69
|
+
2. {file}: {N} findings ({list laws violated})
|
|
70
|
+
|
|
71
|
+
Estimated changes: {N} files
|
|
72
|
+
```
|
|
73
|
+
Ask: "Proceed with fixing all blockers? For warnings, which would you like fixed?"
|
|
74
|
+
|
|
75
|
+
4. **Fix blockers** (parallel where possible)
|
|
76
|
+
- For each file group with independent fixes: spawn sub-agent
|
|
77
|
+
- Each agent gets: the file, the findings, the engineering laws, the suggested fixes
|
|
78
|
+
- Agent instruction: "Fix these findings. Do NOT introduce new violations. Follow engineering laws."
|
|
79
|
+
- For dependent fixes: apply sequentially in dependency order
|
|
80
|
+
- Track progress via TaskCreate/TaskUpdate
|
|
81
|
+
|
|
82
|
+
5. **Fix approved warnings** (after blockers are done)
|
|
83
|
+
- Same process for user-approved warnings
|
|
84
|
+
|
|
85
|
+
6. **Re-run review**
|
|
86
|
+
- After all fixes applied, automatically trigger /sdlc:review
|
|
87
|
+
- Display: "Fixes applied. Re-running review to confirm compliance..."
|
|
88
|
+
|
|
89
|
+
7. **Handle re-review results**
|
|
90
|
+
- If new blockers found (fix introduced new violations): report and loop
|
|
91
|
+
- If clean: route to /sdlc:close
|
|
92
|
+
</process>
|
|
93
|
+
|
|
94
|
+
<success_criteria>
|
|
95
|
+
- [ ] All blocker findings from REVIEW.md addressed
|
|
96
|
+
- [ ] Fixes follow engineering laws (no new violations introduced)
|
|
97
|
+
- [ ] Findings grouped by file for efficient parallel fixing
|
|
98
|
+
- [ ] Fix dependencies identified and ordered correctly
|
|
99
|
+
- [ ] User approved the fix plan before execution
|
|
100
|
+
- [ ] Sub-agents spawned for independent file fixes
|
|
101
|
+
- [ ] /sdlc:review automatically re-runs after fixes
|
|
102
|
+
- [ ] If review passes: output ends with NEXT ACTION REQUIRED: /sdlc:close
|
|
103
|
+
- [ ] If review fails again: output ends with "New findings found. Re-run /sdlc:fix"
|
|
104
|
+
</success_criteria>
|