sdlc-framework 2.1.1 → 3.1.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.
@@ -1,99 +0,0 @@
1
- ---
2
- name: sdlc:transition
3
- description: Transition to the next phase after all plans in a phase complete
4
- argument-hint: "[phase-name]"
5
- allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, AskUserQuestion]
6
- ---
7
-
8
- <objective>
9
- Transition from the current phase to the next phase within a milestone. Verify phase completeness, update project state, commit the phase, and advance to the next phase.
10
-
11
- **When to use:** After /sdlc:close detects the last plan in a phase is done. Can also be run manually to force a phase transition.
12
-
13
- **What it does:**
14
- 1. Verify all plans in the current phase are complete (every SPEC has a SUMMARY, all ACs passed).
15
- 2. Cross-check STATE.md, PROJECT.md, and ROADMAP.md for consistency.
16
- 3. Update PROJECT.md with implemented, superseded, and newly discovered requirements.
17
- 4. Advance state to the next phase (or trigger milestone completion if this was the last phase).
18
- 5. Update ROADMAP.md with phase completion details.
19
- 6. Create a git commit marking the phase boundary.
20
-
21
- **What happens next:**
22
- - Next phase exists: Framework directs you to /sdlc:spec for the first plan of the new phase.
23
- - Last phase in milestone: Framework directs you to /sdlc:close for milestone finalization.
24
-
25
- **Critical rule:** No phase transitions without completeness verification. Every plan must have a summary. Every AC must pass. State inconsistencies are surfaced and resolved before advancing.
26
- </objective>
27
-
28
- <execution_context>
29
- @~/.claude/sdlc-framework/workflows/transition-phase.md
30
- @.sdlc/STATE.md
31
- @.sdlc/ROADMAP.md
32
- @.sdlc/PROJECT.md
33
- </execution_context>
34
-
35
- <context>
36
- $ARGUMENTS — optional phase name to transition from. If not provided, read from .sdlc/STATE.md current_phase field.
37
-
38
- Read these files:
39
- - .sdlc/STATE.md — current phase, milestone, loop position.
40
- - .sdlc/ROADMAP.md — phase list, plan counts, next phase identification.
41
- - .sdlc/PROJECT.md — requirements to update based on completed work.
42
- - All SUMMARY.md files in the completing phase's directory.
43
- </context>
44
-
45
- <process>
46
- Follow workflow: @~/.claude/sdlc-framework/workflows/transition-phase.md
47
-
48
- Step-by-step:
49
-
50
- 1. **Verify phase completeness**
51
- - Read .sdlc/STATE.md. Confirm loop_position is CLOSE ✓. If not, warn: "Loop not closed. Run /sdlc:close first."
52
- - List all SPEC and SUMMARY files in .sdlc/phases/{current_phase}/.
53
- - Every SPEC must have a corresponding SUMMARY. If not, block: "Phase transition blocked. Plan {N} has a spec but no summary."
54
- - Every SUMMARY must show all ACs passed. If not, block: "Phase transition blocked. Plan {N} has failing ACs."
55
-
56
- 2. **Verify state consistency**
57
- - Cross-check STATE.md, PROJECT.md, and ROADMAP.md:
58
- - STATE.md current_milestone matches ROADMAP.md in-progress milestone.
59
- - STATE.md current_phase matches the phase being completed.
60
- - Prior phases in this milestone are all COMPLETE.
61
- - If inconsistency found: display details, offer to auto-fix, ask for confirmation.
62
-
63
- 3. **Update PROJECT.md**
64
- - Read all SUMMARY.md files from the completing phase.
65
- - Mark addressed requirements as IMPLEMENTED.
66
- - Mark contradicted requirements as SUPERSEDED.
67
- - Add newly discovered requirements as NOT STARTED.
68
- - Display proposed changes and ask user to confirm before writing.
69
-
70
- 4. **Advance state to next phase**
71
- - Read ROADMAP.md to identify the next phase.
72
- - If next phase exists:
73
- - Update STATE.md: current_phase, clear current_plan, set loop_position: TRANSITION ✓, set next_required_action: /sdlc:spec.
74
- - Update ROADMAP.md: mark completed phase as COMPLETE, set next phase to IN PROGRESS.
75
- - If no next phase (last phase in milestone):
76
- - Update STATE.md: set next_required_action: /sdlc:close (milestone completion).
77
-
78
- 5. **Update ROADMAP.md with phase summary**
79
- - Add completion date, plan count, hotfix count, key deliverables, and duration.
80
-
81
- 6. **Create git commit** (if in a git repository)
82
- - Stage .sdlc/ files and source files from the phase.
83
- - Commit with message: "feat({phase-name}): complete phase {number}"
84
-
85
- 7. **Output next action**
86
- - If next phase exists: end with NEXT ACTION REQUIRED: /sdlc:spec
87
- - If milestone complete: end with NEXT ACTION REQUIRED: /sdlc:close
88
- </process>
89
-
90
- <success_criteria>
91
- - [ ] Phase completeness verified: every SPEC has a SUMMARY, all ACs passed
92
- - [ ] State consistency checked across STATE.md, PROJECT.md, ROADMAP.md
93
- - [ ] PROJECT.md updated with implemented, superseded, and new requirements
94
- - [ ] STATE.md advanced to next phase (or milestone completion)
95
- - [ ] ROADMAP.md updated with phase completion details and summary
96
- - [ ] Git commit created at phase boundary (if in a git repo)
97
- - [ ] If next phase exists: output ends with NEXT ACTION REQUIRED: /sdlc:spec
98
- - [ ] If milestone complete: output ends with NEXT ACTION REQUIRED: /sdlc:close
99
- </success_criteria>
@@ -1,219 +0,0 @@
1
- <purpose>Conduct structured research before writing a specification. Spawns sub-agents to explore the codebase or search the web, saves findings, and routes back to the spec phase with informed context.</purpose>
2
- <when_to_use>Run when you need to understand existing code patterns, evaluate technical options, or gather external information before committing to a spec. Typically run before /sdlc:spec or when the spec phase reveals unknowns.</when_to_use>
3
- <required_reading>.sdlc/STATE.md, .sdlc/PROJECT.md</required_reading>
4
- <loop_context>
5
- expected_phase: RESEARCH (pre-spec activity)
6
- prior_phase: any (usually between loops or during spec clarification)
7
- next_phase: SPEC (research always leads to a spec)
8
- </loop_context>
9
- <process>
10
-
11
- <step name="define_research_question" priority="first">
12
- Ask the user: "What do you need to research? Describe the question or topic."
13
-
14
- Then classify the research type:
15
-
16
- TYPE: CODEBASE_EXPLORATION
17
- Indicators: "how does X work in our code", "where is Y implemented", "what pattern does Z use", "find all instances of W"
18
- Method: Codebase search agents (Grep, Glob, Read)
19
-
20
- TYPE: WEB_RESEARCH
21
- Indicators: "what is the best library for X", "how does Y technology work", "compare options for Z", "what are best practices for W"
22
- Method: WebSearch agent
23
-
24
- TYPE: HYBRID
25
- Indicators: "how should we implement X" (needs both codebase understanding AND external knowledge)
26
- Method: Both codebase and web agents
27
-
28
- Display: "Research type: {type}. Proceeding with {method}."
29
-
30
- WHY: Different research types need different tools. Searching the web for "how is auth implemented in our code" is useless. Searching the codebase for "best JWT library" is equally useless.
31
- </step>
32
-
33
- <step name="spawn_codebase_agents" priority="second">
34
- ONLY IF type is CODEBASE_EXPLORATION or HYBRID.
35
-
36
- Spawn an exploration agent with run_in_background: true.
37
-
38
- Agent instruction:
39
- ```
40
- You are researching the codebase to answer: "{research question}"
41
-
42
- PROJECT CONTEXT:
43
- {from PROJECT.md: tech stack, architecture, conventions}
44
-
45
- YOUR TASK:
46
- 1. Search for files and code related to: {topic}
47
- - Use Glob to find files by name pattern
48
- - Use Grep to search file contents for relevant patterns
49
- - Read key files to understand implementation details
50
-
51
- 2. For each relevant finding, record:
52
- - File path and line numbers
53
- - What the code does
54
- - What pattern it follows
55
- - How it relates to the research question
56
-
57
- 3. Look for:
58
- - Existing implementations of similar features
59
- - Patterns and conventions used in the codebase
60
- - Utilities, helpers, and shared code that could be reused
61
- - Test patterns used for similar features
62
- - Configuration and setup patterns
63
-
64
- 4. Compile findings into a structured summary:
65
- - Existing patterns found: {list with file references}
66
- - Reusable code: {list of utilities/helpers that apply}
67
- - Conventions: {naming, structure, testing patterns}
68
- - Gaps: {what does NOT exist yet that would be needed}
69
- - Recommendation: {how to approach the implementation based on existing patterns}
70
- ```
71
-
72
- WHY: Codebase exploration prevents reinventing the wheel. Finding existing patterns before writing a spec ensures the spec follows conventions.
73
- </step>
74
-
75
- <step name="spawn_web_agents" priority="third">
76
- ONLY IF type is WEB_RESEARCH or HYBRID.
77
-
78
- Spawn a web research agent with run_in_background: true.
79
-
80
- Agent instruction:
81
- ```
82
- You are researching an external topic to inform a specification.
83
-
84
- RESEARCH QUESTION: "{research question}"
85
-
86
- PROJECT CONTEXT:
87
- {from PROJECT.md: tech stack — so research is relevant to the stack}
88
-
89
- YOUR TASK:
90
- 1. Use WebSearch to find information about: {topic}
91
- 2. Search for:
92
- - Official documentation for relevant libraries/tools
93
- - Best practices and common patterns
94
- - Comparison articles if evaluating options
95
- - Known issues, gotchas, and caveats
96
- - Security considerations
97
-
98
- 3. For each option/approach found:
99
- - Name and description
100
- - Pros: {advantages}
101
- - Cons: {disadvantages}
102
- - Maturity: {stable, beta, experimental}
103
- - Community: {active, declining, abandoned}
104
- - Compatibility with our stack: {yes/no, details}
105
-
106
- 4. Compile findings into a structured summary:
107
- - Options evaluated: {list}
108
- - Recommended option: {which and why}
109
- - Key considerations: {trade-offs, risks}
110
- - Implementation notes: {relevant details for the spec}
111
- ```
112
-
113
- WHY: Web research prevents choosing outdated or inappropriate tools. It also surfaces gotchas that would otherwise be discovered mid-implementation.
114
- </step>
115
-
116
- <step name="review_findings" priority="fourth">
117
- Wait for all agents to complete.
118
-
119
- Read and synthesize the results:
120
-
121
- FOR CODEBASE FINDINGS:
122
- - Are the patterns consistent? Or are there competing approaches in the codebase?
123
- - Is there reusable code? How much can be leveraged?
124
- - What gaps need to be filled?
125
-
126
- FOR WEB FINDINGS:
127
- - Are the recommended options compatible with our stack?
128
- - Do any options conflict with existing patterns?
129
- - Are there security concerns?
130
-
131
- FOR HYBRID:
132
- - Do the codebase patterns align with external best practices?
133
- - Where do they diverge? Is the divergence justified?
134
-
135
- Present the synthesized findings to the user:
136
- ```
137
- Research Findings: {topic}
138
-
139
- Codebase:
140
- - Found {N} relevant patterns
141
- - Key pattern: {description} (used in {files})
142
- - Reusable: {list of utilities/helpers}
143
- - Gap: {what is missing}
144
-
145
- External:
146
- - Recommended approach: {option}
147
- - Key trade-off: {trade-off}
148
- - Risk: {risk}
149
-
150
- Recommendation for spec:
151
- {How to approach this in the specification, given both codebase and external findings}
152
- ```
153
-
154
- Ask: "Does this answer your question? Any follow-up research needed?"
155
-
156
- IF FOLLOW-UP NEEDED: Return to step 1 with the refined question.
157
-
158
- WHY: Raw agent output needs synthesis. The user should see a coherent recommendation, not a dump of search results.
159
- </step>
160
-
161
- <step name="save_findings" priority="fifth">
162
- Create .sdlc/research/{topic-slug}.md:
163
-
164
- ```markdown
165
- # Research: {topic}
166
-
167
- ## Question
168
- {Original research question}
169
-
170
- ## Date
171
- {ISO timestamp}
172
-
173
- ## Type
174
- {CODEBASE|WEB|HYBRID}
175
-
176
- ## Codebase Findings
177
- {Structured findings from codebase exploration}
178
- - Pattern: {description} — {file}:{line}
179
- - Reusable: {utility/helper} — {file}
180
-
181
- ## External Findings
182
- {Structured findings from web research}
183
- - Option: {name} — Pros: {pros}, Cons: {cons}
184
-
185
- ## Synthesis
186
- {Combined analysis}
187
-
188
- ## Recommendation
189
- {What to do in the spec, and why}
190
-
191
- ## References
192
- - {file paths for codebase references}
193
- - {URLs for web references}
194
- ```
195
-
196
- WHY: Research findings are reusable. A future spec in the same area should read prior research instead of re-doing it. The research/ directory is a knowledge base.
197
- </step>
198
-
199
- <step name="route_to_spec" priority="sixth">
200
- Update .sdlc/STATE.md:
201
- - Add history entry: "{timestamp} | research | Topic: {topic}. Type: {type}. Findings saved."
202
- - next_required_action: /sdlc:spec (if not already set)
203
-
204
- Display:
205
- ```
206
- Research complete.
207
-
208
- Findings: .sdlc/research/{topic-slug}.md
209
-
210
- The spec phase will use these findings for informed task decomposition.
211
-
212
- NEXT ACTION REQUIRED: /sdlc:spec
213
- Run /sdlc:spec to create a specification informed by this research.
214
- ```
215
-
216
- WHY: Research without a spec is just reading. The forcing function ensures findings are applied to actual work.
217
- </step>
218
-
219
- </process>
@@ -1,203 +0,0 @@
1
- <purpose>Transition from one phase to the next within a milestone. Called automatically by close-phase when the last plan in a phase completes. Verifies completeness, updates project state, and commits the phase.</purpose>
2
- <when_to_use>Triggered automatically when /sdlc:close detects the last plan in a phase is done. Can also be run manually via /sdlc:transition to force a phase transition.</when_to_use>
3
- <required_reading>.sdlc/STATE.md, .sdlc/ROADMAP.md, .sdlc/PROJECT.md, all SUMMARY.md files in the completing phase</required_reading>
4
- <loop_context>
5
- expected_phase: TRANSITION (between phases)
6
- prior_phase: CLOSE ✓ (last plan in phase)
7
- next_phase: first SPEC of the next phase, or milestone completion
8
- </loop_context>
9
- <process>
10
-
11
- <step name="verify_phase_completeness" priority="first">
12
- Read .sdlc/STATE.md. Extract the current phase.
13
- Read .sdlc/ROADMAP.md. Get the current phase's plan count.
14
-
15
- List all files in .sdlc/phases/{current_phase}/:
16
- - Count *-SPEC.md files (plans created)
17
- - Count *-SUMMARY.md files (plans completed)
18
- - Count HOTFIX-*-SUMMARY.md files (hotfixes applied)
19
-
20
- VERIFY: Every SPEC.md has a corresponding SUMMARY.md.
21
- - If a SPEC exists without a SUMMARY: that plan was not completed.
22
- - STOP. Display: "Phase transition blocked. Plan {N} has a spec but no summary. Complete it first."
23
-
24
- VERIFY: Every SUMMARY.md shows all ACs passed.
25
- - Read each SUMMARY.md. Check the AC results table.
26
- - If any AC is FAIL: STOP. Display: "Phase transition blocked. Plan {N} has failing ACs."
27
-
28
- Display:
29
- ```
30
- Phase {phase} completeness check:
31
- Plans: {N} created, {N} completed
32
- Hotfixes: {N}
33
- All ACs: PASSED
34
- Phase is ready for transition.
35
- ```
36
-
37
- WHY: Transitioning with incomplete work means skipping it forever. The completeness check prevents accidental abandonment.
38
- </step>
39
-
40
- <step name="verify_state_consistency" priority="second">
41
- Cross-check three state files for consistency:
42
-
43
- STATE.MD:
44
- - current_milestone should match ROADMAP.md's in-progress milestone
45
- - current_phase should match the phase being completed
46
- - loop_position should be CLOSE ✓
47
-
48
- PROJECT.MD:
49
- - Tech stack should still be accurate (ask user if uncertain)
50
- - Requirements section should reflect what was built
51
-
52
- ROADMAP.MD:
53
- - Current phase should show correct plan count
54
- - Prior phases in this milestone should all be COMPLETE
55
-
56
- IF INCONSISTENCY FOUND:
57
- Display: "State inconsistency: {detail}. Recommend fixing before transitioning."
58
- Offer to auto-fix obvious inconsistencies (e.g., plan count mismatch).
59
- Ask for user confirmation before applying fixes.
60
-
61
- WHY: State drift accumulates silently. Catching it at phase boundaries prevents compounding errors.
62
- </step>
63
-
64
- <step name="update_project_md" priority="third">
65
- Read .sdlc/PROJECT.md.
66
-
67
- Based on the completed phase's summaries:
68
-
69
- A. VALIDATE EXISTING REQUIREMENTS:
70
- For each requirement listed in PROJECT.md:
71
- - Was it addressed in this phase? (search summaries for related work)
72
- - If addressed: mark as IMPLEMENTED with reference to plan number
73
- - If not addressed: leave as-is (future phase responsibility)
74
-
75
- B. INVALIDATE OUTDATED REQUIREMENTS:
76
- For each requirement:
77
- - Does the implementation contradict or supersede it?
78
- - If yes: mark as SUPERSEDED with explanation
79
-
80
- C. ADD NEW REQUIREMENTS:
81
- From decisions and lessons learned in summaries:
82
- - Were new requirements discovered during implementation?
83
- - If yes: add them to PROJECT.md with status NOT STARTED
84
-
85
- Display changes to user before writing:
86
- ```
87
- PROJECT.md updates:
88
- - IMPLEMENTED: {requirement} (Plan {N})
89
- - SUPERSEDED: {requirement} (replaced by {new approach})
90
- - NEW: {requirement} (discovered in Plan {N})
91
-
92
- Apply these changes? (yes/no)
93
- ```
94
-
95
- WHY: PROJECT.md must stay current. Stale requirements mislead future specs. New requirements discovered during implementation must be captured or they are forgotten.
96
- </step>
97
-
98
- <step name="update_state_for_next_phase" priority="fourth">
99
- Read .sdlc/ROADMAP.md. Identify the next phase in the current milestone.
100
-
101
- IF NEXT PHASE EXISTS:
102
- Update .sdlc/STATE.md:
103
- - current_phase: {next phase number and name}
104
- - current_plan: cleared
105
- - loop_position: TRANSITION ✓
106
- - next_required_action: /sdlc:spec
107
- - Add history entry: "{timestamp} | transition | Phase {old} complete. Transitioning to phase {new}."
108
-
109
- Update .sdlc/ROADMAP.md:
110
- - Set completed phase status to COMPLETE with date
111
- - Set next phase status to IN PROGRESS
112
-
113
- IF NO NEXT PHASE (this was the last phase in the milestone):
114
- Update .sdlc/STATE.md:
115
- - loop_position: TRANSITION ✓
116
- - next_required_action: /sdlc:close (milestone completion handled inline)
117
- - Add history entry: "{timestamp} | transition | Phase {current} complete. Last phase in milestone. Trigger milestone completion."
118
-
119
- Update .sdlc/ROADMAP.md:
120
- - Set completed phase status to COMPLETE with date
121
-
122
- WHY: The state machine must always point to exactly one next action. Whether that is the next phase or milestone completion depends on the roadmap.
123
- </step>
124
-
125
- <step name="update_roadmap" priority="fifth">
126
- Update .sdlc/ROADMAP.md with phase completion details:
127
-
128
- For the completed phase, update the row:
129
- ```
130
- | {phase-num} | {name} | COMPLETE ({date}) | {plan-count} |
131
- ```
132
-
133
- Add a phase summary note under the milestone:
134
- ```
135
- #### Phase {number} Summary
136
- - Plans executed: {N}
137
- - Hotfixes: {N}
138
- - Key deliverables: {from summaries}
139
- - Duration: {first spec date} to {completion date}
140
- ```
141
-
142
- WHY: The roadmap is the high-level progress tracker. Completion details help stakeholders understand velocity and scope.
143
- </step>
144
-
145
- <step name="create_git_commit" priority="sixth">
146
- IF the project is a git repository:
147
-
148
- Check: git status for uncommitted changes.
149
-
150
- IF UNCOMMITTED CHANGES EXIST:
151
- Stage all .sdlc/ files: git add .sdlc/
152
- Stage any source files that were part of the phase
153
-
154
- Create commit:
155
- ```
156
- feat({phase-name}): complete phase {number}
157
-
158
- Phase {number} ({phase-name}) of milestone {milestone-number} is complete.
159
-
160
- Plans executed: {N}
161
- Key deliverables:
162
- - {deliverable 1}
163
- - {deliverable 2}
164
- ```
165
-
166
- Display: "Git commit created: {hash}"
167
-
168
- IF NO UNCOMMITTED CHANGES:
169
- Display: "No uncommitted changes to commit."
170
-
171
- WHY: Phase completion is a natural commit point. The commit message documents what was accomplished, making git log useful as a project history.
172
- </step>
173
-
174
- <step name="display_result" priority="seventh">
175
- IF NEXT PHASE EXISTS:
176
- Display:
177
- ```
178
- Phase transition complete.
179
-
180
- Completed: Phase {old-number} — {old-name}
181
- Plans: {N} executed
182
- Starting: Phase {new-number} — {new-name}
183
-
184
- NEXT ACTION REQUIRED: /sdlc:spec
185
- Run /sdlc:spec to create the first specification for Phase {new-number}.
186
- ```
187
-
188
- IF MILESTONE COMPLETE (no next phase):
189
- Display:
190
- ```
191
- Phase transition complete.
192
-
193
- Completed: Phase {number} — {name} (LAST PHASE)
194
- Milestone {milestone-number} — {milestone-name}: ALL PHASES COMPLETE
195
-
196
- NEXT ACTION REQUIRED: /sdlc:close
197
- Run /sdlc:close to finalize the milestone.
198
- ```
199
-
200
- WHY: The display makes the transition visible. Moving to a new phase is a significant moment — the user should know where they are in the broader plan.
201
- </step>
202
-
203
- </process>