cc-dev-template 0.1.31 → 0.1.33

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.
Files changed (37) hide show
  1. package/bin/install.js +5 -9
  2. package/package.json +1 -1
  3. package/src/commands/done.md +52 -0
  4. package/src/commands/prime.md +40 -4
  5. package/src/hooks/bash-precheck.sh +2 -2
  6. package/src/mcp-servers/qa-server/README.md +10 -8
  7. package/src/mcp-servers/qa-server/src/index.ts +20 -27
  8. package/src/skills/initialize-project/SKILL.md +88 -0
  9. package/src/agents/adr-agent.md +0 -167
  10. package/src/agents/claude-md-agent.md +0 -124
  11. package/src/agents/decomposition-agent.md +0 -170
  12. package/src/agents/execution-agent.md +0 -232
  13. package/src/agents/rca-agent.md +0 -192
  14. package/src/agents/tdd-agent.md +0 -205
  15. package/src/commands/create-agent-skill.md +0 -11
  16. package/src/commands/finalize.md +0 -48
  17. package/src/commands/heal-skill.md +0 -69
  18. package/src/hooks/orchestration-guidance.sh +0 -56
  19. package/src/hooks/orchestration-hook.json +0 -14
  20. package/src/scripts/adr-list.js +0 -298
  21. package/src/scripts/adr-tags.js +0 -242
  22. package/src/scripts/validate-yaml.js +0 -142
  23. package/src/scripts/yaml-validation-hook.json +0 -15
  24. package/src/skills/orchestration/SKILL.md +0 -161
  25. package/src/skills/orchestration/references/debugging/describe.md +0 -144
  26. package/src/skills/orchestration/references/debugging/fix.md +0 -117
  27. package/src/skills/orchestration/references/debugging/learn.md +0 -185
  28. package/src/skills/orchestration/references/debugging/rca.md +0 -92
  29. package/src/skills/orchestration/references/debugging/verify.md +0 -102
  30. package/src/skills/orchestration/references/execution/complete.md +0 -175
  31. package/src/skills/orchestration/references/execution/start.md +0 -77
  32. package/src/skills/orchestration/references/execution/tasks.md +0 -114
  33. package/src/skills/orchestration/references/planning/draft.md +0 -269
  34. package/src/skills/orchestration/references/planning/explore.md +0 -160
  35. package/src/skills/orchestration/references/planning/finalize.md +0 -184
  36. package/src/skills/orchestration/references/planning/start.md +0 -119
  37. package/src/skills/orchestration/scripts/plan-status.js +0 -355
@@ -1,269 +0,0 @@
1
- # Planning Phase 3: Plan Drafting
2
-
3
- ## Purpose
4
-
5
- Synthesize everything you've learned into a structured plan document. The plan becomes the single source of truth for this work—a contract between planning and execution.
6
-
7
- Someone should be able to read the plan and understand what's being built WITHOUT having been in the conversation. It captures requirements, context, constraints, and approach in one place.
8
-
9
- **Success looks like**: A plan.md file that's self-contained, realistic (informed by exploration), and actionable (can be decomposed into tasks).
10
-
11
- ## The Right Level of Detail
12
-
13
- The plan is an **architecture document**, not a technical design document.
14
-
15
- **Include:**
16
- - What each component/module is responsible for (natural language)
17
- - Data models (structures, fields, relationships)
18
- - API contracts (what gets passed between components, inputs/outputs)
19
- - How pieces connect and communicate
20
-
21
- **Keep it at the architecture level.** Define the shape of the system—what exists, what it does, how pieces connect. Leave internal implementation details (function signatures, code snippets, specific algorithms) for execution.
22
-
23
- This level is right because:
24
- - It's enough to decompose into tasks during execution
25
- - It doesn't over-constrain implementation choices
26
- - It catches integration issues early (if contracts don't make sense, you find out now)
27
- - Stakeholders can review it and understand what's being built
28
-
29
- ## What To Do
30
-
31
- Complete each step in order before proceeding to the next.
32
-
33
- <steps>
34
-
35
- <step name="Create the Plan Directory">
36
- Create a directory for this plan:
37
-
38
- ```
39
- .claude/plans/[slug]/
40
- ```
41
-
42
- The slug should be short, descriptive, kebab-case. Examples: `user-auth`, `api-rate-limiting`, `checkout-refactor`.
43
- </step>
44
-
45
- <step name="Write plan.md">
46
- Create `plan.md` in the plan directory. Pull together everything from requirements (Phase 1) and exploration (Phase 2).
47
-
48
- **Format:** Markdown with YAML frontmatter. The frontmatter contains minimal metadata (status, title, created). The Markdown body contains the plan content.
49
-
50
- **Note on backward compatibility:** Existing plan.yaml files continue to work. The plan-status.js script supports both formats, preferring plan.md when present.
51
-
52
- **Schema:**
53
-
54
- ```markdown
55
- ---
56
- status: draft
57
- title: [Descriptive title]
58
- created: [YYYY-MM-DD]
59
- ---
60
-
61
- # [Plan Title]
62
-
63
- ## Problem Statement
64
-
65
- [1-2 sentences: What problem are we solving? Why does it matter?]
66
-
67
- ## Goals
68
-
69
- - [Goal 1]
70
- - [Goal 2]
71
-
72
- ## Success Criteria
73
-
74
- - [How we'll know it's done - criterion 1]
75
- - [How we'll know it's done - criterion 2]
76
-
77
- ## Integration Points
78
-
79
- From exploration - where this fits in the codebase.
80
-
81
- | Component | Interaction | Changes Required |
82
- |-----------|-------------|------------------|
83
- | [name] | [how this work interacts with it] | [what needs to change] |
84
-
85
- ## Data Models
86
-
87
- Define the shape of data - structures, fields, relationships.
88
-
89
- ### [Model name]
90
-
91
- [What it represents]
92
-
93
- | Field | Type | Description |
94
- |-------|------|-------------|
95
- | [field name] | [type] | [purpose] |
96
-
97
- ## API Contracts
98
-
99
- Define how components communicate - inputs, outputs, contracts.
100
-
101
- ### [Interface/endpoint name]
102
-
103
- [What it does]
104
-
105
- - **Inputs**: [What goes in]
106
- - **Outputs**: [What comes out]
107
- - **Between**: [Component A] -> [Component B]
108
-
109
- ## Relevant ADRs
110
-
111
- ADRs that constrain this work.
112
-
113
- | ADR | Title | Constraint |
114
- |-----|-------|------------|
115
- | ADR-[XXX] | [title] | [What this ADR requires us to do or avoid] |
116
-
117
- ## ADR Exceptions
118
-
119
- Intentional deviations from ADRs for this specific work. ADRs are gospel by default—exceptions must be explicitly acknowledged here with a reason.
120
-
121
- | ADR | Reason for Exception |
122
- |-----|---------------------|
123
- | [ADR-XXX] | [Why this work intentionally deviates from this ADR] |
124
-
125
- _If no exceptions, omit this section entirely._
126
-
127
- ## Affected Submodules
128
-
129
- Submodules affected by this work (for repos with git submodules).
130
-
131
- | Path | Reason |
132
- |------|--------|
133
- | [relative/path/to/submodule] | [Why this submodule is affected by the plan] |
134
- ```
135
-
136
- **Section guidance:**
137
-
138
- - **Required in frontmatter**: status, title, created
139
- - **Required sections**: Problem Statement, Goals, Success Criteria
140
- - **Include if relevant**: Integration Points, Data Models, API Contracts, Relevant ADRs, Affected Submodules
141
- - **Include if intentionally deviating from ADRs**: ADR Exceptions (document the reason for each deviation)
142
- - **Only include sections that were discussed**: The plan reflects the conversation from Phases 1 and 2
143
-
144
- **ADR Exceptions section:**
145
-
146
- ADRs are gospel by default—when an ADR says "don't do X", it should be impossible for X to reach production. However, intentional, documented deviations are acceptable when the exception is explicitly acknowledged during planning.
147
-
148
- Include this section when:
149
- - An ADR tension was surfaced during planning and the user consciously decided to deviate
150
- - The deviation applies only to this specific work (not a general change to the ADR)
151
- - The reason for the exception is clear and documented
152
-
153
- If no ADR exceptions exist, omit the section entirely. The presence of the section signals that execution agents should check it before flagging ADR violations—an ADR listed here is not a violation for this plan, but should still be documented in task outcomes as "relying on acknowledged exception."
154
-
155
- **Affected Submodules section:**
156
-
157
- Include this section when working in repositories with git submodules and the plan's scope touches specific submodules. This enables scope-aware ADR discovery—the adr-agent can filter to only show ADRs that are either global or scoped to the affected submodules.
158
-
159
- Use SubmoduleContext (from SKILL.md startup) to know which submodules exist:
160
- - `submodulePaths` lists all available submodules in the repo
161
- - If `isInSubmodule` is true, you're working inside a submodule (may want to target just the current one)
162
-
163
- Table columns:
164
- - **Path** (required): Relative path to the submodule, matching what appears in `.gitmodules`
165
- - **Reason** (optional): Brief explanation of why this submodule is affected by the plan
166
-
167
- Example:
168
- ```markdown
169
- ## Affected Submodules
170
-
171
- | Path | Reason |
172
- |------|--------|
173
- | packages/auth | Adding new authentication method |
174
- | packages/shared | Shared types need updating for new auth flow |
175
- ```
176
-
177
- When a plan declares affected submodules, ADRs scoped to those submodules become relevant, while ADRs scoped to unaffected submodules can be filtered out. ADRs with no scope field are always treated as global and remain relevant regardless of which submodules are affected.
178
-
179
- **Why no approach or risks?** The plan defines WHAT we're building, not HOW. The approach (phases, task breakdown) gets figured out during decomposition in execution. Risks emerge naturally during exploration or decomposition.
180
- </step>
181
-
182
- <step name="Present the Draft">
183
- Show the plan to the user. Highlight:
184
- - Key decisions made
185
- - How exploration findings shaped the approach
186
- - Any risks or concerns
187
- - Areas where you made judgment calls
188
-
189
- Summarize it in a readable format first, then offer to show the full plan.md if they want details.
190
- </step>
191
-
192
- <step name="Surface Ambiguities">
193
- **Before asking for approval, proactively identify what's unclear or unknown.**
194
-
195
- Ask yourself: "If I were to execute this plan right now, what information would I be missing? What decisions haven't been made?"
196
-
197
- Look for:
198
- - **Placeholder values**: Are there fields that say "TBD" or "[something]" that need real values?
199
- - **Implicit assumptions**: Did you assume something the user hasn't confirmed?
200
- - **Missing details**: Are there implementation choices that affect the plan but weren't discussed?
201
- - **Edge cases**: What happens when things go wrong or inputs are unexpected?
202
- - **Dependencies**: Are there external factors (APIs, data sources, other systems) with unknowns?
203
-
204
- **Present any ambiguities you find:**
205
-
206
- ```
207
- ## Potential Ambiguities
208
-
209
- Before we finalize this plan, I want to flag some things that might need clarification:
210
-
211
- 1. **[Topic]**: [What's unclear and why it matters]
212
- 2. **[Topic]**: [What's unclear and why it matters]
213
-
214
- Would you like to clarify these now, or are they acceptable unknowns?
215
- ```
216
-
217
- If you find ambiguities, use AskUserQuestion to resolve them one at a time before proceeding.
218
-
219
- **If no ambiguities**: State that you reviewed the plan for unknowns and didn't find any that would block execution.
220
- </step>
221
-
222
- <step name="Iterate If Needed">
223
- The user may have feedback. If they want changes:
224
- - Update the plan.md
225
- - Re-present the updated version
226
- - Re-check for ambiguities
227
- - Repeat until they're satisfied
228
-
229
- Use AskUserQuestion to check:
230
-
231
- ```
232
- AskUserQuestion:
233
- Question: "How does this plan look?"
234
- Options:
235
- - "Looks good" - Ready for validation
236
- - "Needs changes" - I'll explain what to adjust
237
- - "Let's discuss" - I have questions before deciding
238
- - "Start over" - This isn't the right direction
239
- ```
240
- </step>
241
-
242
- <checkpoint>
243
- Before proceeding to the next phase:
244
- - Plan directory exists at .claude/plans/[slug]/
245
- - plan.md has been written with all required sections
246
- - Draft has been presented to user
247
- - Ambiguities have been surfaced and resolved (or explicitly accepted)
248
- - User has indicated they're satisfied with the draft
249
- </checkpoint>
250
-
251
- </steps>
252
-
253
- ## Key Principles
254
-
255
- **Surface ambiguities proactively.** This is one of the most important things you can do when drafting a plan. Before asking "How does this look?", always ask yourself: "If I were to execute this, what information would I be missing?" Surface those unknowns and resolve them with the user. Ambiguity discovered during execution is expensive; ambiguity discovered during planning is cheap.
256
-
257
- **Keep implementation details for execution.** The plan stays at the architecture level—function signatures, code snippets, and library choices come later during task execution.
258
-
259
- **Define data models and contracts clearly.** When components pass data to each other, specify what that data looks like. Clear contracts prevent integration problems.
260
-
261
- **Match plan complexity to work complexity.** A simple enhancement gets a simple plan. Let the scope of the work determine the size of the document.
262
-
263
- **Include only what was discussed.** The plan reflects the conversation from Phases 1 and 2. Before adding anything, ask: "Did this come from our requirements or exploration?" If yes, include it. If you're inventing it, leave it out.
264
-
265
- The plan captures what the user asked for—goals, success criteria, data models, contracts. It stays focused on that.
266
-
267
- <transition>
268
- When the user is satisfied with the draft, read `references/planning/finalize.md` to validate against ADRs and get approval.
269
- </transition>
@@ -1,160 +0,0 @@
1
- # Planning Phase 2: Codebase Exploration
2
-
3
- ## Purpose
4
-
5
- Ground the requirements in the reality of the codebase. You know WHAT you're building—now understand WHERE it fits and WHAT CONSTRAINTS exist.
6
-
7
- This is reconnaissance. You're gathering intelligence so the plan you write is realistic and informed, not wishful thinking that ignores how the codebase actually works.
8
-
9
- **Success looks like**: You understand the terrain well enough to write a plan with no surprises. You know the integration points, the patterns to follow, and the architectural constraints (ADRs) that apply.
10
-
11
- ## What To Do
12
-
13
- Complete each step in order before proceeding to the next.
14
-
15
- <steps>
16
-
17
- <step name="Identify What You Need to Learn">
18
- Look at the requirements from Phase 1. Ask yourself:
19
-
20
- > "What do I need to understand about this codebase to write a realistic plan for this work?"
21
-
22
- This will vary based on the requirements. A new feature touching authentication needs different exploration than a refactor of the build system. Don't follow a checklist—think about what THIS specific work requires you to understand.
23
-
24
- Common things you might need to learn:
25
- - Where would this code live? What components/modules are involved?
26
- - What existing code would we integrate with or modify?
27
- - What patterns does this codebase use for similar functionality?
28
- - Are there conventions for testing, error handling, APIs, etc.?
29
- - What might make this tricky based on the current architecture?
30
- </step>
31
-
32
- <step name="Explore in Parallel">
33
- Spawn multiple Task agents (subagent_type="Plan") in parallel to explore different aspects of the codebase. Each agent should have a focused question to answer.
34
-
35
- **How to do this:**
36
-
37
- Use the Task tool with subagent_type="Plan" to spawn several agents simultaneously, each with a specific exploration goal based on what you identified in Step 1. For example:
38
-
39
- ```
40
- Agent 1: "Find where [feature area] is implemented. Identify the key files,
41
- components, and how they interact."
42
-
43
- Agent 2: "Look at how similar functionality is implemented elsewhere in the
44
- codebase. What patterns should we follow?"
45
-
46
- Agent 3: "Identify what would need to change to support [requirement].
47
- What are the integration points?"
48
- ```
49
-
50
- The specific agents you spawn depend on the requirements. Use your judgment—you know what you need to learn.
51
- </step>
52
-
53
- <step name="Find Relevant ADRs">
54
- While codebase exploration is happening, also spawn the adr-agent to find architectural constraints.
55
-
56
- ```
57
- Spawn adr-agent: "Find ADRs that would be relevant to [summary of requirements].
58
- For each relevant ADR, explain why it matters and what
59
- constraints it imposes on this work.
60
-
61
- Submodule context: [pass SubmoduleContext from SKILL.md if available]
62
- Affected submodules: [list from requirements, if identified]
63
-
64
- Use --include-parent flag with adr-list.js to discover both
65
- local and inherited ADRs. Filter results by scope when specific
66
- submodules are targeted."
67
- ```
68
-
69
- ADRs discovered now will inform the plan you write. Better to know the rules before you design than to discover violations later.
70
-
71
- **For submodule-aware discovery:**
72
- - Pass SubmoduleContext so the agent knows if you're in a submodule
73
- - If in a submodule, inherited ADRs from the parent repo may apply
74
- - Scope-aware discovery surfaces the most relevant ADRs while filtering out ADRs that only apply to other submodules
75
- - The adr-agent uses `--include-parent` to find both local and inherited ADRs
76
- </step>
77
-
78
- <step name="Synthesize Findings">
79
- Once all agents return, synthesize what you learned into a coherent picture.
80
-
81
- **Critical: Validate exploration findings against ADRs.**
82
-
83
- ADRs are gospel—before moving to plan drafting, ensure the exploration findings don't suggest approaches that violate ADRs:
84
-
85
- 1. Review each ADR discovered by adr-agent
86
- 2. Check if any exploration finding conflicts with an ADR constraint
87
- 3. If conflict found:
88
- - Note it in "ADR tensions" below
89
- - Surface to user before proceeding—they may need to choose between approaches or acknowledge an exception
90
-
91
- ```
92
- ## Exploration Findings
93
-
94
- **Where this work fits:**
95
- [Which components/modules are involved]
96
-
97
- **Integration points:**
98
- [What existing code we'll touch or integrate with]
99
-
100
- **Patterns to follow:**
101
- [Conventions and patterns from the codebase we should match]
102
-
103
- **Relevant ADRs:**
104
- - [ADR-XXX]: [Why it matters, what it constrains] (source: local/inherited)
105
- - [ADR-YYY]: [Why it matters, what it constrains] (source: local/inherited)
106
-
107
- **ADR tensions (if any):**
108
- - [Describe any conflicts between exploration findings and ADR constraints]
109
- - [Note: These must be resolved before drafting—either adjust approach or acknowledge exception]
110
-
111
- **Potential challenges:**
112
- [Anything that might make this tricky]
113
- ```
114
-
115
- If you identified ADR tensions, use AskUserQuestion to resolve them now:
116
- ```
117
- AskUserQuestion:
118
- Question: "The exploration suggests [approach], but this conflicts with ADR-XXX which says [constraint]. How should we proceed?"
119
- Options:
120
- - "Follow the ADR" - Adjust our approach to comply
121
- - "Exception for this work" - Document why we're deviating
122
- - "Update the ADR" - The ADR is outdated
123
- ```
124
- </step>
125
-
126
- <step name="Check for Gaps">
127
- Before moving on, ask yourself:
128
-
129
- > "Do I know enough to write a realistic plan?"
130
-
131
- If there are still unknowns:
132
- - **Codebase facts** (what exists, how it works) → Explore more. Spawn additional agents to investigate.
133
- - **User intent** (goals, preferences, decisions) → Ask the user.
134
-
135
- Explore until you understand the terrain, then present your findings and move on.
136
- </step>
137
-
138
- <checkpoint>
139
- Before proceeding to the next phase:
140
- - Codebase exploration agents have returned findings
141
- - ADR constraints have been identified
142
- - Findings have been validated against ADRs (no unresolved tensions)
143
- - Any ADR tensions have been surfaced to user and resolved (adjust approach, document exception, or update ADR)
144
- - Findings have been synthesized and presented
145
- - No critical unknowns remain
146
- </checkpoint>
147
-
148
- </steps>
149
-
150
- ## Key Principles
151
-
152
- **Gather information, save decisions for later.** You're exploring, not designing. Note what you find; implementation decisions come during drafting.
153
-
154
- **Stay focused on this work.** Explore what's relevant to the requirements. A targeted investigation beats a comprehensive codebase tour.
155
-
156
- **Find ADRs early.** Architectural constraints discovered now save expensive rework later. Include them in your exploration.
157
-
158
- <transition>
159
- When you have a clear picture of where this work fits, what patterns to follow, and what ADRs constrain it, read `references/planning/draft.md` to continue to plan drafting.
160
- </transition>
@@ -1,184 +0,0 @@
1
- # Planning Phase 4: Finalize
2
-
3
- ## Purpose
4
-
5
- Validate the plan against architectural constraints and get user approval. This is the last step before the plan is ready for the execution workflow.
6
-
7
- Validation catches ADR conflicts while they're cheap to fix. Approval ensures the user agrees with what's about to be built.
8
-
9
- **Success looks like**: The plan complies with all relevant ADRs, the user has approved it, and it's ready for the execution workflow.
10
-
11
- ## What To Do
12
-
13
- Complete each step in order before proceeding to the next.
14
-
15
- <steps>
16
-
17
- <step name="Validate Against ADRs">
18
- Spawn the adr-agent to validate the plan. The agent will:
19
- - Read the plan.md (or plan.yaml for backward compatibility)
20
- - Find ALL ADRs that might be relevant (not just the ones declared in the plan)
21
- - Use `--include-parent` flag to discover both local AND inherited ADRs
22
- - Use the plan's Affected Submodules section for scope-aware filtering
23
- - Check compliance for each: COMPLIANT, TENSION, or CONFLICT
24
- - Report what needs attention
25
-
26
- ```
27
- Spawn adr-agent: "Validate the plan at .claude/plans/[slug]/plan.md.
28
-
29
- Find all ADRs that could be relevant to this work—check beyond what's
30
- declared in the plan's Relevant ADRs section. Better to surface extra
31
- ADRs than miss important ones.
32
-
33
- Submodule context: [pass SubmoduleContext from SKILL.md]
34
-
35
- Use --include-parent flag with adr-list.js to discover both local
36
- and inherited ADRs. When in a submodule, parent repo ADRs may impose
37
- constraints on this work.
38
-
39
- Use the plan's Affected Submodules section to focus on ADRs that apply
40
- to the relevant submodules. Global ADRs always apply; submodule-scoped
41
- ADRs only apply when their scope matches the affected submodules.
42
-
43
- Apply precedence rules: local ADRs override inherited ADRs on the same topic.
44
-
45
- For each relevant ADR, report:
46
- - COMPLIANT: Plan follows this ADR
47
- - TENSION: Potential friction, worth noting
48
- - CONFLICT: Plan violates this ADR, must resolve
49
- - Source: local or inherited
50
-
51
- Note in the report when ADRs were filtered by scope or are inherited."
52
- ```
53
-
54
- **Show the validation report to the user** before proceeding.
55
- </step>
56
-
57
- <step name="Handle Validation Results">
58
- **If all COMPLIANT (or only TENSION):**
59
- - Note any tensions for awareness
60
- - Proceed to user approval
61
-
62
- **If CONFLICT found:**
63
- - Present the conflicts to the user clearly
64
- - For each conflict, explain:
65
- - Which ADR is violated
66
- - What the ADR requires
67
- - How the plan conflicts
68
- - Work with the user to resolve:
69
- - Adjust the plan to comply
70
- - Or discuss whether the ADR needs updating (spawn adr-agent to supersede if so)
71
- - Re-validate after changes
72
-
73
- Use AskUserQuestion to discuss conflicts:
74
-
75
- ```
76
- AskUserQuestion:
77
- Question: "The plan conflicts with [ADR-XXX]. How should we resolve this?"
78
- Options:
79
- - "Adjust the plan" - I'll describe what to change
80
- - "The ADR is outdated" - Let's update or supersede the ADR
81
- - "Let's discuss" - I need more context before deciding
82
- - "Something else" - I have a different approach
83
- ```
84
-
85
- Iterate until validation passes (no CONFLICT items).
86
- </step>
87
-
88
- <checkpoint>
89
- Before proceeding to approval:
90
- - adr-agent was spawned and returned results
91
- - Validation report was shown to user
92
- - Any CONFLICT items have been resolved
93
- </checkpoint>
94
-
95
- <step name="Present Final Plan">
96
- Once validation passes, present the plan summary to the user:
97
-
98
- ```
99
- ## Plan Ready for Approval
100
-
101
- **Title**: [plan title]
102
- **Type**: [feature / enhancement / refactor]
103
-
104
- **Problem**: [1-2 sentence summary]
105
-
106
- **Goals**:
107
- - [Goal 1]
108
- - [Goal 2]
109
-
110
- **Success Criteria**:
111
- - [Criterion 1]
112
- - [Criterion 2]
113
-
114
- **Key Components**:
115
- - [Data models, API contracts, integration points - high level]
116
-
117
- **Relevant ADRs**: [list with compliance status]
118
-
119
- The plan has been validated against architectural constraints.
120
- ```
121
- </step>
122
-
123
- <step name="Get Approval">
124
- Use AskUserQuestion to get explicit approval:
125
-
126
- ```
127
- AskUserQuestion:
128
- Question: "Approve this plan?"
129
- Options:
130
- - "Approved" - Mark as approved
131
- - "Needs changes" - I'll explain what to adjust
132
- - "Let's discuss first" - I have questions
133
- ```
134
-
135
- **If approved:**
136
- 1. Update plan.md frontmatter: `status: approved`
137
- 2. Optionally add an `updated: [today's date]` field to the frontmatter
138
-
139
- **If changes requested:**
140
- - Make the requested changes
141
- - Re-validate if changes affect ADR compliance
142
- - Present again and get approval
143
- </step>
144
-
145
- <checkpoint>
146
- Before proceeding to execution handoff:
147
- - Plan summary was presented to user
148
- - User explicitly selected "Approved"
149
- - plan.md frontmatter status is now `approved`
150
- </checkpoint>
151
-
152
- <step name="Offer Next Steps">
153
- Ask what the user wants to do next:
154
-
155
- ```
156
- AskUserQuestion:
157
- Question: "Plan approved. What's next?"
158
- Options:
159
- - "Start the execution workflow" - Proceed to decomposition phase
160
- - "Stop here for now" - Save and exit
161
- ```
162
-
163
- **If "Start the execution workflow":**
164
- Read `references/execution/start.md` to begin. The execution workflow starts with decomposition—breaking the plan into tasks. Agents handle implementation; you orchestrate.
165
-
166
- **If "Stop here for now":**
167
- End with: "Plan saved and approved. Run `/prime` when you're ready to start the execution workflow."
168
- </step>
169
-
170
- </steps>
171
-
172
- ## Key Principles
173
-
174
- **Validate thoroughly.** The adr-agent should find ADRs beyond what's declared. Missing a relevant ADR now means discovering violations during execution.
175
-
176
- **Resolve conflicts before approval.** A plan with known ADR conflicts shouldn't be approved. Either fix the plan or update the ADR.
177
-
178
- **Get explicit approval.** The plan represents a commitment. Make sure the user consciously agrees before marking it approved.
179
-
180
- **Approval and next steps are separate decisions.** Get approval first. Then ask about execution. Don't combine these into one question.
181
-
182
- <transition>
183
- When the user chooses to start execution, read `references/execution/start.md` to begin the execution workflow.
184
- </transition>