5-phase-workflow 2.1.0 → 3.0.0-beta-2

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,169 +1,189 @@
1
1
  ---
2
2
  name: 5:plan
3
- description: Plans a feature end-to-end, combines requirements and technical discovery, and writes a unified plan.md. Single review gate before /5:implement.
4
- allowed-tools: Bash, Read, Write, Agent, AskUserQuestion, mcp__claude_ai_Atlassian_Rovo__getJiraIssue
3
+ description: Plans a feature and persists the approved plan as .5/features/{name}/plan.md. Uses native plan mode when available, otherwise an equivalent prose loop. Implements compact plans inline; hands larger ones to /5:implement. Re-run with an existing feature name to refine that plan.
4
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent, AskUserQuestion, EnterPlanMode, TaskCreate, TaskUpdate, mcp__claude_ai_Atlassian_Rovo__getJiraIssue
5
5
  user-invocable: true
6
- argument-hint: [ticket-id-or-description]
6
+ argument-hint: [feature-name-or-ticket-id-or-description]
7
7
  ---
8
8
 
9
9
  <role>
10
- You are a Workflow Planner. Your only deliverable is `.5/features/{name}/plan.md`.
11
- You do NOT implement code. You spawn only Explore agents. You write only `.5/.planning-active`, `.5/features/{name}/codebase-scan.md`, and `.5/features/{name}/plan.md`.
12
- After creating the plan, output the completion message and stop.
10
+ You are a Workflow Planner. Your deliverables are `.5/features/{name}/plan.md` and `.5/features/{name}/codebase-scan.md`.
11
+ Exploration, questions, and the approval gate belong to plan mode — you write no code until the user approves the plan.
12
+ After approval you implement only **compact** plans, inline in this session. Anything larger goes to `/5:implement`.
13
13
  </role>
14
14
 
15
- <constraints>
16
- HARD CONSTRAINTS:
17
- - Do NOT write code or pseudo-code.
18
- - Do NOT create source files.
19
- - Do NOT create a separate feature.md.
20
- - Do NOT produce step, skill, model, pattern-file, or verify-command tables in plan.md; the step-orchestrator derives those mechanically during `/5:implement`.
21
- - Do NOT use Bash to create, write, or modify files.
22
- - Do NOT call EnterPlanMode.
23
- - Do NOT spawn implementation agents.
24
- </constraints>
25
-
26
15
  # Plan
27
16
 
28
17
  ## Options
29
18
 
30
- - `--github` - Auto-fetch feature description from the GitHub issue linked to the current branch.
31
- - `--jira` - Auto-fetch feature description from the Jira ticket linked to the current branch.
19
+ - `--github` - Auto-fetch the feature description from the GitHub issue linked to the current branch.
20
+ - `--jira` - Auto-fetch the feature description from the Jira ticket linked to the current branch.
32
21
 
33
22
  Current branch: !`git branch --show-current`
34
23
 
35
- ## Progress Checklist
24
+ ## Step 1: Resolve Feature and Description
36
25
 
37
- Follow these steps in order and output `✓ Step N complete` after each completed step.
26
+ Run these before entering plan mode.
38
27
 
39
- - [ ] Step 0: Activate planning guard by writing `.5/.planning-active`
40
- - [ ] Step 1: Auto-fetch ticket if `--github` or `--jira` was passed
41
- - [ ] Step 2: Gather or confirm feature description
42
- - [ ] Step 3: Explore the codebase and cache findings in `codebase-scan.md`
43
- - [ ] Step 4: Discuss requirements, scope, acceptance criteria, and decisions
44
- - [ ] Step 5: Write unified `plan.md`
45
- - [ ] Step 6: Self-check `plan.md`, output completion, and stop
28
+ **Refine mode.** If the argument names an existing `.5/features/{name}/plan.md` — directly, or via a ticket prefix matched with Glob on `.5/features/{prefix}*/plan.md` — read that plan and its `codebase-scan.md`. You are refining an existing plan; skip ticket fetching and go to Step 2. If a ticket prefix matches several features, ask which one.
46
29
 
47
- ## Step 0: Activate Planning Guard
30
+ **New plan.** Otherwise:
48
31
 
49
- Write `.5/.planning-active`:
32
+ 1. Only when `--github` or `--jira` was passed, resolve the ticket:
33
+ - Read `.5/config.json` if it exists and extract `ticket.pattern`.
34
+ - Match the pattern against the branch name above.
35
+ - Validate the ID before fetching: `--github` requires digits only (`^[0-9]+$`), `--jira` requires key format (`^[A-Z][A-Z0-9]+-[0-9]+$`).
36
+ - `--jira`: fetch via `mcp__claude_ai_Atlassian_Rovo__getJiraIssue` using the validated key as a typed parameter.
37
+ - `--github`: run `gh issue view "$id" --json title,body`.
38
+ - If no ticket ID is found, ask the user for it, validate, then fetch. If validation or fetching fails, report the reason and continue without fetched content.
39
+ - Show fetched content to the user and ask whether any context is missing.
40
+ 2. Otherwise, ask the user for the feature description.
41
+ 3. Determine a short kebab-case feature folder name. With a known ticket ID, use `{ticket-id}-{feature-name}`. Sanitize to alphanumeric, dash, and underscore only.
50
42
 
51
- ```json
52
- {
53
- "phase": "plan",
54
- "startedAt": "{ISO-timestamp}"
55
- }
56
- ```
43
+ ## Step 2: Plan in Plan Mode
57
44
 
58
- ## Step 1: Auto-fetch Ticket
45
+ Call `EnterPlanMode`. Plan mode owns codebase exploration, clarifying questions, the plan file, and the approval gate — do not run a parallel discovery pass of your own.
59
46
 
60
- Only run this step when `--github` or `--jira` was passed.
47
+ If `.5/index/` exists, read `.claude/skills/use-index/SKILL.md` and follow it to select index files instead of scanning the project broadly. Check the `Generated:` timestamp in `.5/index/README.md` first; if the index is more than a day old, run `.5/index/rebuild-index.sh`.
61
48
 
62
- 1. Read `.5/config.json` if it exists and extract `ticket.pattern`.
63
- 2. Match the pattern against the branch name above.
64
- 3. If a ticket ID is found, validate format first:
65
- - `--github`: digits only (`^[0-9]+$`)
66
- - `--jira`: key format (`^[A-Z][A-Z0-9]+-[0-9]+$`)
67
- 4. After validation:
68
- - `--jira`: fetch via `mcp__claude_ai_Atlassian_Rovo__getJiraIssue` using the validated key as a typed parameter.
69
- - `--github`: run `gh issue view "$id" --json title,body`.
70
- 5. If no ticket ID is found, ask the user for the ID, validate it, then fetch.
71
- 6. If validation or fetching fails, report the reason and continue without fetched content.
49
+ Carry these three constraints into the planning work:
72
50
 
73
- ## Step 2: Gather Description
51
+ **Output shape.** Write the plan using the section shape of `.claude/templates/workflow/PLAN.md`. Use `.claude/templates/workflow/PLAN-COMPACT.md` instead for small, low-risk changes with 1-2 components, no data migration, no security/auth change, and no public API contract change. The plan must end with a Component Checklist table of `Component | Action | Target Path | Intent`, where action is `create`, `modify`, `delete`, or `rename`. For `rename`, the target path is the destination and the intent names the original path. Do not add step, model, skill, pattern-file, or verify-command columns — `/5:implement` derives that wiring mechanically.
74
52
 
75
- If fetched content exists, show it and ask whether any context is missing.
76
- Otherwise ask the user for the feature description.
53
+ **Necessity gate.** Apply this to every component before it enters the plan. Ask "does this need to exist?" and prefer the simplest approach that meets the acceptance criteria: reuse the standard library, a native platform/framework feature, or an already-installed dependency before adding anything new. Push speculative or "might need later" work to `[DEFERRED]`. Do not plan abstractions, flexibility, or configurability that no acceptance criterion requires.
77
54
 
78
- Do not ask technical follow-ups yet.
55
+ **No code.** Requirements and implementation intent only — no code or pseudo-code in the plan.
79
56
 
80
- ## Step 3: Explore Codebase
57
+ In refine mode, seed the planning work with the existing plan's content and change only what the discussion actually changes.
81
58
 
82
- If `.5/index/` exists, check the `Generated:` timestamp in `.5/index/README.md`. If the index is more than one day old, run `.5/index/rebuild-index.sh` to refresh it before spawning the Explore agent.
59
+ ## Step 3: Persist the Approved Plan
83
60
 
84
- Spawn one Explore agent.
61
+ Once the user approves the plan, write:
85
62
 
86
- ```text
87
- Analyze the codebase for a unified workflow plan.
63
+ 1. `.5/features/{name}/plan.md` — the approved plan. In refine mode, overwrite the existing file and append to a `## Discussion History` section:
88
64
 
89
- Feature description:
90
- {feature description}
65
+ ```markdown
66
+ ## Discussion History
91
67
 
92
- Tasks:
93
- 1. If `.5/index/` exists, read `.claude/skills/use-index/SKILL.md` and follow its guidance to select and read relevant index files. Skip broad project scanning. If the index is missing, fall back to targeted Grep/Glob and note it in the report.
94
- 2. Identify relevant modules, existing patterns, and likely target files.
95
- 3. Find at most 3 similar implementations and reusable helpers.
96
- 4. Identify test framework, test file conventions, and the narrowest relevant build/test commands.
97
- 5. Identify constraints, risks, and places where the user needs to decide.
68
+ ### {ISO-date} - {topic}
98
69
 
99
- Report:
100
- - Relevant existing patterns: path + one-line reason
101
- - Similar implementations: max 3 paths + one-line reason
102
- - Likely target paths
103
- - Test/build setup: commands only, with scope
104
- - Risks or unknowns
70
+ **Changes made:**
71
+ - {added / clarified / removed}
105
72
 
106
- READ-ONLY. Use only Read, Glob, and Grep.
107
- Keep the report under 40 lines. Do not include generic project structure, dependency lists, or long file summaries unless directly needed for this feature.
73
+ **Rationale:** {why}
108
74
  ```
109
75
 
110
- Write the compact result to `.5/features/{name}/codebase-scan.md`. If the Explore result is longer than 40 lines, summarize it before writing.
76
+ 2. `.5/features/{name}/codebase-scan.md` — the exploration findings `/5:implement` needs, under 40 lines:
111
77
 
112
- ## Step 4: Collaborative Plan Development
78
+ ```markdown
79
+ # Codebase Scan
113
80
 
114
- Discuss naturally until you can articulate:
81
+ ## Relevant Existing Patterns
82
+ - `{path}` - {one-line reason}
115
83
 
116
- - The problem and expected outcome
117
- - Scope in and out
118
- - Acceptance criteria
119
- - Key decisions labeled `[DECIDED]`, `[FLEXIBLE]`, or `[DEFERRED]`
120
- - Existing patterns to follow
121
- - A clean component checklist with target paths
84
+ ## Similar Implementations
85
+ - `{path}` - {one-line reason}
122
86
 
123
- Ask only useful questions. Prefer proposing a concrete understanding and letting the user correct it.
87
+ ## Likely Target Paths
88
+ - `{path}`
124
89
 
125
- Apply a necessity gate to every component before it enters the plan. For each one, ask "does this need to exist?" and prefer the simplest approach that meets the acceptance criteria: reuse the standard library, a native platform/framework feature, or an already-installed dependency before adding anything new. Push speculative or "might need later" work to `[DEFERRED]`. Do not plan abstractions, flexibility, or configurability that no acceptance criterion requires.
90
+ ## Test/Build Setup
91
+ - {command} - {scope}
126
92
 
127
- ## Step 5: Write `plan.md`
93
+ ## Risks or Unknowns
94
+ - {risk}
95
+ ```
128
96
 
129
- Determine a short kebab-case feature folder name. If a ticket ID is known, use `{ticket-id}-{feature-name}`. Sanitize folder names to alphanumeric, dash, and underscore only.
97
+ In refine mode, update this file only where exploration produced new findings.
130
98
 
131
- Choose the plan template:
99
+ ## Step 4: Self-check
132
100
 
133
- - Use `.claude/templates/workflow/PLAN-COMPACT.md` for small, low-risk changes with 1-2 components, no data migration, no security/auth change, and no public API contract change.
134
- - Use `.claude/templates/workflow/PLAN.md` for everything else.
101
+ Verify:
135
102
 
136
- Write `.5/features/{name}/plan.md` using the selected template.
103
+ - The plan has all required template sections, and optional sections with no useful content were omitted.
104
+ - Acceptance criteria are checkboxes.
105
+ - Decisions are labeled `[DECIDED]`, `[FLEXIBLE]`, or `[DEFERRED]`.
106
+ - Every component traces to scope or acceptance criteria, and none adds abstraction, flexibility, or configurability beyond what an acceptance criterion requires.
107
+ - No implementation code or pseudo-code is present.
137
108
 
138
- The component checklist is intentionally lean:
109
+ ## Step 5: Hand Off
139
110
 
140
- - Component name
141
- - Action (`create`, `modify`, `delete`, `rename`)
142
- - Target path
143
- - One-sentence intent
111
+ Approving a plan means the user wants it built. Branch on the plan format you chose in Step 2 — the point is to spend a fresh delegated run only where it pays for itself.
144
112
 
145
- For `rename`, use the target path as the destination and describe the original path in the intent.
113
+ **Compact plan** (`planFormat: compact`, 1-2 low-risk components): implement it here, in this session. The context is already warm, and spinning up orchestration to edit one or two files costs more than it saves. In refine mode, only do this when the refined plan has not been implemented yet — check `.5/features/{name}/state.json`.
146
114
 
147
- Do not include columns for step, model, skill, pattern file, verify command, complexity, or dependencies. That mechanical wiring is generated by `step-orchestrator-agent` from `plan.md` and `codebase-scan.md`.
115
+ 1. Say what you are about to do, then implement the Component Checklist directly. Make the smallest coherent change per component and follow the patterns named in the plan.
116
+ 2. Run the verify commands from `.5/config.json`. Skip any set to `none`.
117
+ 3. Write `.5/features/{name}/state.json`:
148
118
 
149
- ## Step 6: Self-check and Stop
119
+ ```json
120
+ {
121
+ "feature": "{name}",
122
+ "status": "completed|failed",
123
+ "completedComponents": ["component-name"],
124
+ "verification": {"status": "passed|partial|failed", "summary": "one line"},
125
+ "startedAt": "{ISO-timestamp}",
126
+ "lastUpdated": "{ISO-timestamp}"
127
+ }
128
+ ```
150
129
 
151
- Verify:
130
+ Component names must match the plan's Component Checklist verbatim, so a later `/5:implement` can resume against them. This file is also how `/5:review` finds the feature.
152
131
 
153
- - The plan has all required template sections.
154
- - Optional sections with no useful content were omitted.
155
- - Acceptance criteria are checkboxes.
156
- - Decisions are labeled `[DECIDED]`, `[FLEXIBLE]`, or `[DEFERRED]`.
157
- - Every component traces to scope or acceptance criteria.
158
- - No component adds abstraction, flexibility, or configurability beyond what an acceptance criterion requires.
159
- - No implementation code or pseudo-code is present.
132
+ 4. If `.5/config.json` `git.autoCommit` is `true`, make one commit for the change using `git.commitMessage.pattern`, staging only the files you touched. Never `git add .` or `git add -A`.
133
+ 5. Report what changed, the verification result, and:
134
+
135
+ ```text
136
+ ✓ Plan at `.5/features/{name}/plan.md` — implemented inline (compact plan)
137
+
138
+ Run `/5:review` when you are ready.
139
+ ```
140
+
141
+ If verification fails, leave `status: "failed"` and tell the user they can fix the issue and rerun `/5:implement {name}` to resume.
160
142
 
161
- Output exactly:
143
+ **Full plan:** do not implement. A multi-component plan is worth a fresh run — `/5:implement` executes independent components in parallel waves, routes mechanical work to cheaper models, and gives each executor a narrow context instead of this whole conversation. Output exactly:
162
144
 
163
145
  ```text
164
146
  ✓ Plan created at `.5/features/{name}/plan.md`
165
147
 
166
- Review the plan, then run `/5:implement {name}`.
148
+ Review the plan, then run `/5:implement {name}` in a fresh context.
167
149
  ```
168
150
 
169
- Stop immediately.
151
+ Then stop immediately.
152
+
153
+ ## Fallback path
154
+
155
+ On Codex, or in any runtime without `EnterPlanMode`, replace Step 2 with this loop. Steps 1, 3, 4, and 5 are unchanged — including the compact-plan inline implementation, which matters more here because Codex has no Workflow tool to parallelize a delegated run.
156
+
157
+ 1. Spawn one Explore agent:
158
+
159
+ ```text
160
+ Analyze the codebase for a unified workflow plan.
161
+
162
+ Feature description:
163
+ {feature description}
164
+
165
+ Tasks:
166
+ 1. If `.5/index/` exists, read the `use-index` skill and follow its guidance to select and read relevant index files. Skip broad project scanning. If the index is missing, fall back to targeted Grep/Glob and note it in the report.
167
+ 2. Identify relevant modules, existing patterns, and likely target files.
168
+ 3. Find at most 3 similar implementations and reusable helpers.
169
+ 4. Identify test framework, test file conventions, and the narrowest relevant build/test commands.
170
+ 5. Identify constraints, risks, and places where the user needs to decide.
171
+
172
+ Report:
173
+ - Relevant existing patterns: path + one-line reason
174
+ - Similar implementations: max 3 paths + one-line reason
175
+ - Likely target paths
176
+ - Test/build setup: commands only, with scope
177
+ - Risks or unknowns
178
+
179
+ READ-ONLY. Use only Read, Glob, and Grep.
180
+ Keep the report under 40 lines. Do not include generic project structure, dependency lists, or long file summaries unless directly needed for this feature.
181
+ ```
182
+
183
+ 2. Discuss with the user until you can articulate the problem and expected outcome, scope in and out, acceptance criteria, key decisions labeled `[DECIDED]` / `[FLEXIBLE]` / `[DEFERRED]`, existing patterns to follow, and a component checklist with target paths. Ask only useful questions — prefer proposing a concrete understanding and letting the user correct it.
184
+
185
+ 3. Apply the same output shape, necessity gate, and no-code constraints from Step 2.
186
+
187
+ 4. Show the plan to the user and get explicit approval before writing it.
188
+
189
+ Until the user approves the plan you are a planner, not an implementer: write nothing outside `.5/features/{name}/`, write no source code, and spawn no implementation agents. Claude Code enforces this through plan mode; here it is on you. After approval, Step 5 applies as written.
@@ -7,7 +7,7 @@ user-invocable: true
7
7
 
8
8
  <role>
9
9
  You are a Project Reconfigurer. You refresh documentation and skills using existing config.json preferences.
10
- You do NOT modify user preferences (ticket patterns, review tools, branch conventions, etc.).
10
+ You do NOT modify user preferences (ticket patterns, branch conventions, commit patterns, etc.).
11
11
  You detect codebase changes, confirm with the user, invoke the configuration refresh skills, then report.
12
12
  After reporting what was updated, you are DONE.
13
13
  </role>
@@ -23,7 +23,7 @@ Single-command refresh that skips the full Q&A of `/5:configure`. Re-detects cod
23
23
  | Scenario | Command |
24
24
  |----------|---------|
25
25
  | First-time setup | `/5:configure` |
26
- | Change preferences (ticket pattern, review tool, etc.) | `/5:configure` |
26
+ | Change preferences (ticket pattern, commit pattern, etc.) | `/5:configure` |
27
27
  | Codebase evolved, refresh docs/skills | **`/5:reconfigure`** |
28
28
  | Add new skill patterns | `/5:configure` |
29
29
 
@@ -42,7 +42,7 @@ Your job:
42
42
  ✅ Report what was updated
43
43
 
44
44
  Your job is NOT:
45
- ❌ Ask preference questions (ticket pattern, branch convention, review tool, etc.)
45
+ ❌ Ask preference questions (ticket pattern, branch convention, commit pattern, etc.)
46
46
  ❌ Modify config.json preferences (only the `skills` section may be updated if user confirms new patterns)
47
47
  ❌ Skip confirmation — always show what will be regenerated
48
48
 
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: 5:review
3
- description: Reviews code changes using native agent review or CodeRabbit CLI. Categorizes findings and saves them for /5:address-review-findings.
4
- allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, Agent, mcp__jetbrains__*
3
+ description: Reviews code changes via the built-in code-review skill. Categorizes findings and saves them for /5:address-review-findings.
4
+ allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, Agent, Skill, mcp__jetbrains__*
5
+ argument-hint: [low|medium|high|max]
5
6
  user-invocable: true
6
7
  model: sonnet
7
8
  ---
@@ -13,17 +14,7 @@ You do NOT apply fixes. Fix application is handled by /5:address-review-findings
13
14
 
14
15
  # Review
15
16
 
16
- CodeRabbit: !`which coderabbit 2>/dev/null && coderabbit auth status 2>/dev/null || echo "not installed"`
17
-
18
- ## Step 1: Determine Review Tool
19
-
20
- Read `.5/config.json` and use `reviewTool`.
21
-
22
- - Missing, `native`, or legacy `claude`: use native review.
23
- - `coderabbit`: use CodeRabbit if installed/authenticated; otherwise ask whether to switch to native review or stop for setup.
24
- - `none`: report that automated review is disabled and stop.
25
-
26
- ## Step 2: Determine Scope
17
+ ## Step 1: Determine Scope
27
18
 
28
19
  Ask what to review:
29
20
 
@@ -32,27 +23,31 @@ Ask what to review:
32
23
  3. All changes (`git diff HEAD`)
33
24
  4. Current branch vs main/master (`git diff main...HEAD`)
34
25
 
35
- ## Step 3: Spawn Review Agent
26
+ ## Step 2: Run the Review
27
+
28
+ Effort level: default `high`. If the user passed an argument matching `low`, `medium`, `high`, or `max`, use that instead.
29
+ `ultra` is not accepted here — it is user-triggered and billed and cannot be launched from a command. If the user passes it, say so and use `max`.
36
30
 
37
- Spawn one review agent. The main context handles user interaction only.
31
+ Never pass `--fix` or `--comment`. This command only records findings; applying fixes and posting PR comments is `/5:address-review-findings`.
38
32
 
39
- For native review:
33
+ **Primary path** — if the built-in `code-review` skill is available, invoke it:
40
34
 
41
35
  ```text
42
- You are a code reviewer. Review the selected diff blind, purely on its merits.
36
+ Skill(skill: "code-review", args: "{target} {effort}")
37
+ ```
38
+
39
+ Derive `{target}` from the scope answer: options 1-3 review the current working-tree diff (no target argument needed); option 4 passes the branch. Use the findings it reports.
43
40
 
44
- Scope: {scope}
45
- Base branch: {base branch if relevant}
41
+ **Fallback path** — on Codex, or when the `code-review` skill is unavailable, spawn one review agent instead:
46
42
 
47
- Process:
48
- 1. Get the diff for the selected scope.
49
- 2. Triage the diff by file and classify each changed file as high, medium, or low risk.
50
- 3. Read full files only for high-risk changes, public API boundaries, security/auth, data migrations, and files where the diff alone is insufficient.
51
- 4. For medium-risk files, read targeted symbols or nearby changed sections plus direct imports only when needed.
52
- 5. For low-risk mechanical/docs/config changes, review the diff without reading full files unless something looks inconsistent.
53
- 6. Review for bugs, security, performance, code quality, API design, and missing tests.
54
- 7. Review for over-engineering: unnecessary abstractions, single-use indirection, unused flexibility or configurability, speculative generality, and reinventing standard-library or existing-dependency behavior. Report clear cases as Fixable and judgment calls as Questions.
55
- 8. Categorize findings as Fixable, Questions, or Manual.
43
+ ```text
44
+ Review the diff for {scope} blind, on its merits.
45
+ Triage files by risk; read full files only for high-risk changes, public API boundaries,
46
+ security/auth, and data migrations. For everything else, review the diff alone.
47
+ Report bugs, security, performance, code quality, API design, missing tests, and
48
+ over-engineering (unnecessary abstractions, single-use indirection, speculative
49
+ generality, reinventing stdlib or existing dependencies).
50
+ Do not apply fixes. Keep findings concise; no raw diff excerpts.
56
51
 
57
52
  Output:
58
53
  Status: success | failed
@@ -64,22 +59,33 @@ Questions:
64
59
  - file: {path}, line: {N}, question: {what}
65
60
  Manual Review:
66
61
  - file: {path}, line: {N}, description: {what}, severity: {level}
67
-
68
- Do not apply fixes.
69
- Keep findings concise and do not include raw diff excerpts unless needed to identify the issue.
70
62
  ```
71
63
 
72
- For CodeRabbit, run the CLI for the selected scope, then categorize the output into the same format.
73
-
74
- ## Step 4: Save Findings
64
+ ## Step 3: Save Findings
75
65
 
76
66
  Determine feature name from the most recent `.5/features/*/state.json`, or ask the user.
77
67
 
78
68
  Write `.5/features/{feature-name}/review-findings-{YYYYMMDD-HHmmss}.md` using `.claude/templates/workflow/REVIEW-FINDINGS.md`.
79
69
 
70
+ When the findings come from the `code-review` skill, map its reported fields onto the template:
71
+
72
+ | Reported finding | Template field |
73
+ |---|---|
74
+ | `verdict: CONFIRMED` with a localized, single-file fix | **Category:** `Fixable` |
75
+ | `verdict: PLAUSIBLE` | **Category:** `Question` |
76
+ | `verdict: CONFIRMED` but spanning files or needing a design decision | **Category:** `Manual` |
77
+ | `category: correctness` | **Severity:** `error` (`warning` when `PLAUSIBLE`) |
78
+ | `category: simplification` / `efficiency` / `test-coverage` | **Severity:** `suggestion` |
79
+ | `file`, `line` | **File:**, **Line:** |
80
+ | `summary` | **Description:** |
81
+ | the concrete fix, else `short_summary` | **Suggested Fix:** |
82
+ | `failure_scenario` | **Original Reviewer Message:** |
83
+
84
+ Findings from the fallback path map directly: Fixable Issues, Questions, and Manual Review become their matching categories.
85
+
80
86
  Do not ask the user to edit action markers in the findings file. The findings file is the review record; `/5:address-review-findings` will present each finding interactively and record decisions separately.
81
87
 
82
- ## Completion
88
+ ## Step 4: Report and Hand Off
83
89
 
84
90
  Output:
85
91
 
@@ -91,6 +97,16 @@ Review complete.
91
97
  - Manual review needed: {N}
92
98
 
93
99
  Findings saved at `.5/features/{feature-name}/review-findings-{timestamp}.md`
94
-
95
- Run `/5:address-review-findings {feature-name}` to decide on each finding interactively, then apply approved fixes.
96
100
  ```
101
+
102
+ If there are no findings, stop here.
103
+
104
+ Otherwise ask the user directly whether to continue:
105
+
106
+ - "Address these findings now?"
107
+ - Options:
108
+ 1. "Yes, run `/5:address-review-findings {feature-name}`" — decide on each finding interactively, then apply approved fixes
109
+ 2. "No, stop here" — findings stay on disk for later
110
+
111
+ - If the user chooses yes: invoke `/5:address-review-findings {feature-name}`.
112
+ - If the user chooses no: tell them to run `/5:address-review-findings {feature-name}` when they are ready, and stop.
@@ -13,55 +13,15 @@ You do NOT implement code. You do NOT modify source files. You write only child
13
13
 
14
14
  # Split Plan
15
15
 
16
- Use this command when an existing plan is too large and should become multiple independently implementable plans.
16
+ ## Step 1: Locate the Parent Plan
17
17
 
18
- ## Goals
18
+ Resolve `{feature-name}` to `.5/features/{feature-name}/plan.md`. Given only a ticket ID or prefix, glob `.5/features/{prefix}*/plan.md`. Given nothing, use the most recently modified `.5/features/*/plan.md`, asking the user to choose between several plausible recent ones. If no parent plan exists, stop and tell the user to run `/5:plan` first.
19
19
 
20
- - Help the user decide how to split the parent plan.
21
- - Suggest good split points based on implementation independence.
22
- - Create child feature folders, each with its own `plan.md` and `codebase-scan.md`.
23
- - Preserve traceability to the original parent plan and sibling split plans.
20
+ Read the parent `plan.md` and its `codebase-scan.md` if it exists. Do not read source files unless those two are insufficient to identify safe split boundaries; if they are, use targeted Glob/Grep or one read-only Explore agent.
24
21
 
25
- ## Process
22
+ ## Step 2: Agree on the Split
26
23
 
27
- ### Step 1: Locate Parent Plan
28
-
29
- 1. If `{feature-name}` was provided, use `.5/features/{feature-name}/plan.md`.
30
- 2. If only a ticket ID or prefix was provided, glob `.5/features/{prefix}*/plan.md`.
31
- 3. If no feature was provided:
32
- - Find `.5/features/*/plan.md`.
33
- - Prefer the most recently modified plan.
34
- - If there are multiple plausible recent plans, ask the user to choose.
35
- 4. If no parent plan exists, stop and tell the user to run `/5:plan` first.
36
-
37
- Read:
38
-
39
- - Parent `.5/features/{feature}/plan.md`
40
- - Parent `.5/features/{feature}/codebase-scan.md` if it exists
41
- - `.5/config.json` only if needed for ticket naming conventions
42
-
43
- Do not read source files unless the parent plan and scan are insufficient to identify safe split boundaries. If extra context is needed, use targeted Glob/Grep or one Explore agent with a read-only prompt.
44
-
45
- ### Step 2: Analyze Split Boundaries
46
-
47
- Extract from the parent plan:
48
-
49
- - Overview and desired outcome
50
- - Scope in/out
51
- - Acceptance criteria
52
- - Decisions
53
- - Existing patterns
54
- - Module impact
55
- - Component checklist
56
- - Technical notes and constraints
57
-
58
- Suggest 2-5 split options optimized for independently running `/5:implement`:
59
-
60
- - Prefer components that touch different target files or modules.
61
- - Keep each child plan with coherent acceptance criteria.
62
- - Keep dependency order explicit when one child must land before another.
63
- - Avoid technical-layer splits when they would create child plans that cannot be verified independently.
64
- - Avoid splitting tightly coupled same-file changes unless the user explicitly wants it.
24
+ Propose 2-5 boundaries optimized for running `/5:implement` on each child independently: prefer components touching different files or modules, keep each child's acceptance criteria coherent and independently verifiable, and make dependency order explicit when one child must land first. Avoid technical-layer splits that produce children nobody can verify alone, and avoid splitting tightly coupled same-file changes unless the user asks for it.
65
25
 
66
26
  Present the recommendation compactly:
67
27
 
@@ -73,44 +33,15 @@ Recommended split:
73
33
  Dependency order: {none | child A before child B because ...}
74
34
  ```
75
35
 
76
- Then ask the user:
77
-
78
- - How many child plans should be created?
79
- - Which suggested boundaries should be used or changed?
80
-
81
- Use AskUserQuestion for concrete choices. If the user provides textual boundaries, summarize them back before writing.
82
-
83
- ### Step 3: Confirm Each Child Plan
84
-
85
- For each child plan, ask or confirm:
86
-
87
- - Child title
88
- - Child folder slug
89
- - Scope in
90
- - Scope out
91
- - Acceptance criteria
92
- - Component checklist rows copied or adapted from the parent
93
- - Dependencies on sibling child plans
94
-
95
- Folder naming:
96
-
97
- - Use `{parent-feature}-{nn}-{child-slug}`.
98
- - `nn` is 2-digit, starting at `01`.
99
- - Sanitize slugs to lowercase kebab-case using only alphanumeric characters, dash, and underscore.
100
- - If the folder already exists, ask whether to choose a new slug or stop. Do not overwrite existing child folders without explicit user approval.
36
+ Agree with the user on the boundaries, each child's scope and folder slug, and which components go where. Show the final split summary and get confirmation before writing anything.
101
37
 
102
- Before writing files, show the final split summary and ask for confirmation.
38
+ Folder naming: `{parent-feature}-{nn}-{child-slug}`, with `nn` a 2-digit index starting at `01` and the slug sanitized to lowercase kebab-case (alphanumeric, dash, underscore). If a folder already exists, ask whether to choose a new slug or stop — never overwrite an existing child folder without explicit approval.
103
39
 
104
- ### Step 4: Write Child Artifacts
40
+ ## Step 3: Write Child Artifacts
105
41
 
106
- For each confirmed child folder, create:
42
+ For each confirmed child, write `.5/features/{child-feature}/plan.md` using `.claude/templates/workflow/PLAN.md`, or `PLAN-COMPACT.md` when the child clearly has only 1-2 low-risk components. Copy only the parent context relevant to that child. Keep decisions labeled `[DECIDED]` / `[FLEXIBLE]` / `[DEFERRED]`, acceptance criteria as independently verifiable checkboxes, and the component checklist lean (component, action, target path, intent — no step/model/pattern/verify columns, no code).
107
43
 
108
- - `.5/features/{child-feature}/plan.md`
109
- - `.5/features/{child-feature}/codebase-scan.md`
110
-
111
- Use `.claude/templates/workflow/PLAN.md` structure for every child plan unless the child clearly has only 1-2 low-risk components; in that case, use `.claude/templates/workflow/PLAN-COMPACT.md`.
112
-
113
- Each child `plan.md` must include a `## Split Metadata` section after the overview:
44
+ Each child plan carries this section after its overview:
114
45
 
115
46
  ```markdown
116
47
  ## Split Metadata
@@ -123,27 +54,9 @@ Each child `plan.md` must include a `## Split Metadata` section after the overvi
123
54
  - Dependency order: {none | sibling names and reason}
124
55
  ```
125
56
 
126
- Child plan content rules:
127
-
128
- - Copy only parent context relevant to that child.
129
- - Keep decisions labeled `[DECIDED]`, `[FLEXIBLE]`, or `[DEFERRED]`.
130
- - Acceptance criteria must be checkboxes and independently verifiable.
131
- - Component checklist remains lean: component, action, target path, intent.
132
- - Do not add step/model/pattern/verify columns.
133
- - Do not include implementation code or pseudo-code.
134
-
135
- Child `codebase-scan.md` rules:
136
-
137
- - If the parent scan exists, copy only relevant patterns, likely target paths, test/build setup, risks, and unknowns for the child.
138
- - If no parent scan exists, write:
139
-
140
- ```markdown
141
- # Codebase Scan
142
-
143
- No parent codebase scan was available when this plan was split.
144
- ```
57
+ Also write `.5/features/{child-feature}/codebase-scan.md` with the parent scan's patterns, target paths, test/build setup, risks, and unknowns that apply to that child. If there is no parent scan, write `# Codebase Scan` followed by `No parent codebase scan was available when this plan was split.`
145
58
 
146
- ### Step 5: Write Split Manifest
59
+ ## Step 4: Write the Split Manifest
147
60
 
148
61
  Write `.5/features/{parent-feature}/split-manifest-{YYYYMMDD-HHmmss}.json`:
149
62
 
@@ -166,25 +79,8 @@ Write `.5/features/{parent-feature}/split-manifest-{YYYYMMDD-HHmmss}.json`:
166
79
  }
167
80
  ```
168
81
 
169
- Keep the parent `plan.md` unchanged.
170
-
171
- ### Step 6: Report
172
-
173
- Output:
174
-
175
- ```text
176
- Plan split complete.
177
-
178
- Parent: .5/features/{parent-feature}/plan.md
179
- Manifest: .5/features/{parent-feature}/split-manifest-{timestamp}.json
82
+ Leave the parent `plan.md` unchanged.
180
83
 
181
- Child plans:
182
- - .5/features/{child-1}/plan.md
183
- - .5/features/{child-2}/plan.md
184
-
185
- Implement separately with:
186
- /5:implement {child-1}
187
- /5:implement {child-2}
188
- ```
84
+ ## Step 5: Report
189
85
 
190
- Stop immediately.
86
+ Output the parent path, the manifest path, each child plan path, and the `/5:implement {child}` command for each. Then stop.