5-phase-workflow 1.9.3 → 1.9.5

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/bin/install.js CHANGED
@@ -423,8 +423,8 @@ This skill was authored for Claude Code. Map these tool references:
423
423
  | Claude Code | Codex Equivalent |
424
424
  |-------------|------------------|
425
425
  | \`AskUserQuestion\` | Ask the user directly in conversation |
426
- | \`Task(subagent_type="Explore")\` | Research the codebase yourself using available tools |
427
- | \`Task(prompt="...")\` | \`spawn_agent(message="...")\` |
426
+ | \`Agent(subagent_type="Explore")\` | Research the codebase yourself using available tools |
427
+ | \`Agent(prompt="...")\` | \`spawn_agent(message="...")\` |
428
428
  | \`Read\` | \`read_file\` |
429
429
  | \`Write\` | \`write_file\` |
430
430
  | \`Edit\` | \`patch\` |
@@ -81,8 +81,8 @@ This skill was authored for Claude Code. Map these tool references:
81
81
  | Claude Code | Codex Equivalent |
82
82
  |-------------|------------------|
83
83
  | \`AskUserQuestion\` | Ask the user directly in conversation |
84
- | \`Task(subagent_type="Explore")\` | Research the codebase yourself using available tools |
85
- | \`Task(prompt="...")\` | \`spawn_agent(message="...")\` |
84
+ | \`Agent(subagent_type="Explore")\` | Research the codebase yourself using available tools |
85
+ | \`Agent(prompt="...")\` | \`spawn_agent(message="...")\` |
86
86
  | \`Read\` | \`read_file\` |
87
87
  | \`Write\` | \`write_file\` |
88
88
  | \`Edit\` | \`patch\` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5-phase-workflow",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "A 5-phase feature development workflow for Claude Code",
5
5
  "bin": {
6
6
  "5-phase-workflow": "bin/install.js"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:address-review-findings
3
3
  description: Applies annotated review findings and/or addresses GitHub PR review comments. Use --github to process PR comments only.
4
- allowed-tools: Bash, Read, Edit, Write, Glob, Grep, AskUserQuestion, Task, Skill, mcp__jetbrains__*
4
+ allowed-tools: Bash, Read, Edit, Write, Glob, Grep, AskUserQuestion, Agent, Skill, mcp__jetbrains__*
5
5
  user-invocable: true
6
6
  model: sonnet
7
7
  context: fork
@@ -138,7 +138,7 @@ gh repo view --json owner,name
138
138
  Spawn a sonnet agent to analyze PR comments:
139
139
 
140
140
  ```
141
- Task tool call:
141
+ Agent tool call:
142
142
  subagent_type: general-purpose
143
143
  model: sonnet
144
144
  description: "Analyze PR review comments"
@@ -272,7 +272,7 @@ Apply from highest line number to lowest within each file to avoid line offset s
272
272
  #### Agent Application (4+ fixes per file)
273
273
 
274
274
  ```
275
- Task tool call:
275
+ Agent tool call:
276
276
  subagent_type: general-purpose
277
277
  model: {haiku for simple | sonnet for complex}
278
278
  description: "Apply fixes to {file-path}"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:analyze-feature
3
3
  description: Analyze any feature, dataflow, or domain concept in the codebase and generate comprehensive documentation with mermaid diagrams. Use when you need to understand how a feature works end-to-end, trace a dataflow, or document a domain area.
4
- allowed-tools: Read, Write, Glob, Grep, Task, AskUserQuestion
4
+ allowed-tools: Read, Write, Glob, Grep, Agent, AskUserQuestion
5
5
  user-invocable: true
6
6
  ---
7
7
 
@@ -16,6 +16,8 @@ After writing config.json and the feature spec, you are DONE. Exit immediately.
16
16
 
17
17
  # Configure (Phase 1 - Plan Feature for Project Configuration)
18
18
 
19
+ Current commit: !`git rev-parse --short HEAD 2>/dev/null || echo "none"`
20
+
19
21
  ## Overview
20
22
 
21
23
  This command is **Phase 1** of the 5-phase workflow applied to project configuration itself. It analyzes the project, asks the user questions, and outputs a feature spec at `.5/features/CONFIGURE/feature.md`.
@@ -283,7 +285,7 @@ mkdir -p .5
283
285
  After writing config.json, update `.5/version.json` so the reconfigure reminder can track staleness:
284
286
  1. Read `.5/version.json` (if it exists)
285
287
  2. Set `configuredAt` to the current ISO timestamp (`new Date().toISOString()`)
286
- 3. Set `configuredAtCommit` to the current short commit hash (run `git rev-parse --short HEAD`)
288
+ 3. Set `configuredAtCommit` to the current short commit hash injected at the top of this command
287
289
  4. Write back `.5/version.json` preserving all other fields
288
290
 
289
291
  **Apply `.gitignore` if selected:**
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:discuss-feature
3
3
  description: Discusses and refines an existing feature specification through iterative Q&A. Use after /plan-feature when requirements need clarification or changes. Updates the feature spec based on discussion.
4
- allowed-tools: Read, Write, Glob, Grep, Task, AskUserQuestion
4
+ allowed-tools: Read, Write, Glob, Grep, Agent, AskUserQuestion
5
5
  user-invocable: true
6
6
  model: opus
7
7
  context: inherit
@@ -129,7 +129,7 @@ Based on the user's focus area, explore the codebase if needed:
129
129
  - Check dependencies
130
130
  - Identify ripple effects
131
131
 
132
- Use Task tool with subagent_type=Explore for complex exploration.
132
+ Use Agent tool with subagent_type=Explore for complex exploration.
133
133
 
134
134
  ### Step 5: Interactive Q&A
135
135
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:implement-feature
3
3
  description: Executes an implementation plan by delegating to agents. Phase 3 of the 5-phase workflow.
4
- allowed-tools: Task, Read, Write, Glob, Grep, Bash, TaskCreate, TaskUpdate, TaskList
4
+ allowed-tools: Agent, Read, Write, Glob, Grep, Bash, TaskCreate, TaskUpdate, TaskList
5
5
  user-invocable: true
6
6
  model: opus
7
7
  context: fork
@@ -189,7 +189,7 @@ For steps with multiple independent components, spawn one agent per component in
189
189
  Agent prompt template (adapt per component):
190
190
 
191
191
  ```
192
- Task tool call:
192
+ Agent tool call:
193
193
  subagent_type: general-purpose
194
194
  model: {based on complexity}
195
195
  description: "{Action} {component-name} for {feature-name}"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:plan-feature
3
3
  description: Plans feature implementation by analyzing requirements, identifying affected modules, and creating a structured feature specification. Use at the start of any new feature to ensure systematic implementation. This is Phase 1 of the 5-phase workflow.
4
- allowed-tools: Read, Write, Task, AskUserQuestion
4
+ allowed-tools: Bash, Read, Write, Agent, AskUserQuestion, mcp__claude_ai_Atlassian_Rovo__getJiraIssue
5
5
  user-invocable: true
6
6
  model: opus
7
7
  ---
@@ -18,7 +18,7 @@ HARD CONSTRAINTS:
18
18
  - Do NOT write code or pseudo-code — describe behavior and data shapes in natural language or tables
19
19
  - Do NOT create implementation plans, file lists, or step-by-step build guides — that is Phase 2's job
20
20
  - Do NOT offer to proceed to the next phase — the user will invoke `/5:plan-implementation` themselves
21
- - Do NOT spawn Task agents with subagent_type other than Explore
21
+ - Do NOT use the Agent tool with subagent_type other than Explore
22
22
  - Do NOT write to any file except .5/.planning-active, .5/features/{name}/codebase-scan.md, and .5/features/{name}/feature.md
23
23
  - Do NOT call EnterPlanMode — the workflow has its own planning process
24
24
  - Do NOT use Bash to create, write, or modify files — this bypasses the plan-guard
@@ -35,8 +35,8 @@ WHAT IS ALLOWED:
35
35
  <write-rules>
36
36
  You have access to the Write tool for exactly these files:
37
37
  1. `.5/.planning-active` — Step 0 only
38
- 2. `.5/features/{name}/codebase-scan.md` — Step 2 only (Explore agent results cache)
39
- 3. `.5/features/{name}/feature.md` — Step 4 only
38
+ 2. `.5/features/{name}/codebase-scan.md` — Step 3 only (Explore agent results cache)
39
+ 3. `.5/features/{name}/feature.md` — Step 5 only
40
40
  Any other Write target WILL be blocked by the plan-guard hook. Do not attempt it.
41
41
  </write-rules>
42
42
 
@@ -81,18 +81,26 @@ If any of these are unclear, keep discussing.
81
81
 
82
82
  # Plan Feature (Phase 1)
83
83
 
84
+ ## Options
85
+
86
+ - **`--github`** — Auto-fetch feature description from the GitHub issue linked to the current branch.
87
+ - **`--jira`** — Auto-fetch feature description from the Jira ticket linked to the current branch.
88
+
89
+ Current branch: !`git branch --show-current`
90
+
84
91
  ## Progress Checklist
85
92
 
86
93
  Follow these steps IN ORDER. Do NOT skip steps. Do NOT proceed to a later step until the current one is complete. After completing each step, output a status line: `✓ Step N complete`.
87
94
 
88
95
  - [ ] Step 0: Activate planning guard — write `.5/.planning-active`
89
- - [ ] Step 1: Gather feature description ask developer via AskUserQuestion
90
- - [ ] Step 2: Explore codebasespawn Explore sub-agent, wait for results, cache to codebase-scan.md
91
- - [ ] Step 3: Collaborative spec development discuss with the user until the spec is clear
92
- - [ ] Step 4: Write feature specificationcreate `.5/features/{name}/feature.md` (with optional mermaid diagrams)
96
+ - [ ] Step 1: Auto-fetch ticket *(only when `--github` or `--jira` flag is present — skip otherwise)*
97
+ - [ ] Step 2: Gather feature description present fetched content or ask developer via AskUserQuestion
98
+ - [ ] Step 3: Explore codebasespawn Explore sub-agent, wait for results, cache to codebase-scan.md
99
+ - [ ] Step 4: Collaborative spec developmentdiscuss with the user until the spec is clear
100
+ - [ ] Step 5: Write feature specification — create `.5/features/{name}/feature.md` (with optional mermaid diagrams)
93
101
  - [ ] Output completion message and STOP
94
102
 
95
- > **MANDATORY:** After completing Steps 0, 1, 2, and 4, output `✓ Step N complete` before moving on. Step 3 is open-ended — it completes when you and the user agree the spec is ready to write.
103
+ > **MANDATORY:** After completing Steps 0, 1, 2, 3, and 5, output `✓ Step N complete` before moving on. Step 4 is open-ended — it completes when you and the user agree the spec is ready to write.
96
104
 
97
105
  ## Process
98
106
 
@@ -109,25 +117,64 @@ Write the planning guard marker to `.5/.planning-active` using the Write tool:
109
117
 
110
118
  This activates the plan-guard hook which prevents accidental source file edits during planning. The marker is removed automatically when implementation starts (`/5:implement-feature`), expires after 4 hours, or can be cleared manually with `/5:unlock`.
111
119
 
112
- ### Step 1: Gather Feature Description
120
+ ### Step 1: Auto-fetch Ticket *(conditional — skip if no flag was passed)*
121
+
122
+ **Only execute this step when the command was invoked with `--github` or `--jira`.**
123
+
124
+ 1. Read `.5/config.json`. Extract `ticket.pattern` (e.g., `[A-Z]+-\d+` or `\d+`).
125
+ 2. Match the pattern against the injected branch name at the top of this command.
126
+
127
+ **If a ticket ID is found in the branch name:**
128
+
129
+ - **`--jira`**: Call `mcp__claude_ai_Atlassian_Rovo__getJiraIssue` with the extracted ticket ID. Combine the `summary` and `description` fields into `$FETCHED_DESCRIPTION`.
130
+ - **`--github`**: Run `gh issue view {id} --json title,body` via Bash. Combine `title` and `body` into `$FETCHED_DESCRIPTION`.
131
+ - If the fetch **succeeds**: proceed to Step 2 with `$FETCHED_DESCRIPTION` set.
132
+ - If the fetch **fails** (not found, auth error, network issue): inform the user ("Could not fetch ticket {id}: {reason}") and proceed to Step 2 without `$FETCHED_DESCRIPTION`.
133
+
134
+ **If no ticket ID is found in the branch name:**
135
+
136
+ Ask the user via AskUserQuestion:
137
+
138
+ > "Could not extract a ticket ID from branch `{branch}`. Please provide the ticket ID (e.g., `PROJ-1234` or `123` for GitHub issues):"
139
+
140
+ Use the provided ID to fetch using the same logic above. If the fetch fails after the user-provided ID, inform the user and proceed to Step 2 without `$FETCHED_DESCRIPTION`.
141
+
142
+ ### Step 2: Gather Feature Description
143
+
144
+ **If `$FETCHED_DESCRIPTION` is set (flag was used and fetch succeeded):**
145
+
146
+ Display the fetched ticket content to the user and ask via AskUserQuestion:
147
+
148
+ ```
149
+ Here's what I fetched from {GitHub Issues / Jira}:
150
+
151
+ **{Title / Summary}**
152
+ {Body / Description}
153
+
154
+ Is this description complete, or would you like to add any context before I explore the codebase?
155
+ ```
156
+
157
+ Accept any additions from the user. Merge user additions with `$FETCHED_DESCRIPTION` to form the working feature description.
158
+
159
+ **Otherwise (no flag, or fetch failed):**
113
160
 
114
- Ask the developer for the feature description using AskUserQuestion:
161
+ Ask the developer via AskUserQuestion:
115
162
 
116
163
  "Please describe the feature you want to specify. Paste the full ticket description or explain it in your own words."
117
164
 
118
165
  - Expect free-text answer, do NOT provide options
119
166
  - Do NOT ask follow-up questions yet
120
167
 
121
- ### Step 2: Spawn Explore Agent for Codebase Analysis
168
+ ### Step 3: Spawn Explore Agent for Codebase Analysis
122
169
 
123
- > **ROLE CHECK:** You are a Feature Planner. Your ONLY output is feature.md. If you are tempted to write code or create files, STOP and return to the next question in Step 3.
170
+ > **ROLE CHECK:** You are a Feature Planner. Your ONLY output is feature.md. If you are tempted to write code or create files, STOP and return to the next question in Step 4.
124
171
 
125
- Spawn a Task with `subagent_type=Explore`:
172
+ Spawn an Agent with `subagent_type=Explore`:
126
173
 
127
174
  ```
128
175
  Analyze the codebase for a feature specification session.
129
176
 
130
- **Feature Description:** {paste the user's feature description}
177
+ **Feature Description:** {paste the full feature description from Step 2}
131
178
 
132
179
  **Your Task:**
133
180
  1. Check if `.5/index/` exists. If it does, read `.5/index/README.md` first — it includes a generation timestamp. If the index is fresh (under 1 day old), read the relevant index files (e.g., modules.md, routes.md, models.md) as your structural overview and skip broad Glob scans for information already covered. If the index is outdated (over 1 day old), note in your report that the user should run `.5/index/rebuild-index.sh` to refresh it, then use it anyway (stale is better than nothing). If `.5/index/` does not exist at all, note in your report that the user can run `/5:reconfigure` to generate it, then proceed with Glob/Grep exploration as below.
@@ -136,10 +183,8 @@ Analyze the codebase for a feature specification session.
136
183
  4. Identify coding patterns and conventions
137
184
  5. Find reusable components or patterns
138
185
  6. Identify affected files/modules
139
- 7. Run `git branch --show-current` to get the current branch name
140
186
 
141
187
  **Report Format:**
142
- - Current git branch name
143
188
  - Project structure overview
144
189
  - Relevant existing patterns found
145
190
  - Similar implementations discovered
@@ -147,18 +192,18 @@ Analyze the codebase for a feature specification session.
147
192
  - Reusable components identified
148
193
  - Potential integration points
149
194
 
150
- **IMPORTANT:** READ-ONLY agent. Only use Read, Glob, Grep, and Bash (for git branch) tools.
195
+ **IMPORTANT:** READ-ONLY agent. Only use Read, Glob, and Grep tools.
151
196
  ```
152
197
 
153
198
  Wait for the sub-agent to return before proceeding.
154
199
 
155
200
  **Cache the results:** Write the Explore agent's full output to `.5/features/{name}/codebase-scan.md` using the Write tool. This saves Phase 2 from re-scanning the same codebase and saves significant tokens.
156
201
 
157
- ### Step 3: Collaborative Spec Development
202
+ ### Step 4: Collaborative Spec Development
158
203
 
159
204
  > **ROLE CHECK:** You are gathering requirements, NOT designing solutions. Discussion covers WHAT and WHY, never HOW.
160
205
 
161
- **Begin by sharing your understanding.** Based on the user's description (Step 1) and the codebase exploration (Step 2), propose a concise summary of the feature:
206
+ **Begin by sharing your understanding.** Based on the feature description (Step 2) and the codebase exploration (Step 3), propose a concise summary of the feature:
162
207
  - What problem it solves
163
208
  - What the key capabilities are
164
209
  - Which existing components are relevant
@@ -181,7 +226,7 @@ Ask the user: "Here's my understanding of the feature — [summary]. Does this c
181
226
  4. Acceptance criteria (how to verify success)
182
227
  5. Key decisions and their labels ([DECIDED], [FLEXIBLE], [DEFERRED])
183
228
 
184
- If any of these are unclear, keep discussing. When you believe clarity has been reached, tell the user: "I think I have a clear picture — ready to write the spec. Anything else before I do?" Then proceed to Step 4.
229
+ If any of these are unclear, keep discussing. When you believe clarity has been reached, tell the user: "I think I have a clear picture — ready to write the spec. Anything else before I do?" Then proceed to Step 5.
185
230
 
186
231
  **Optional re-exploration:** If the user mentions components not covered in the initial report, spawn a targeted Explore agent:
187
232
 
@@ -192,13 +237,13 @@ Targeted exploration for feature planning.
192
237
  **READ-ONLY.** Only use Read, Glob, and Grep tools.
193
238
  ```
194
239
 
195
- ### Step 4: Create Feature Specification
240
+ ### Step 5: Create Feature Specification
196
241
 
197
242
  > **ROLE CHECK:** You are writing a FEATURE SPECIFICATION. After writing feature.md you are DONE — do NOT proceed to implementation planning or coding.
198
243
 
199
- **Extract ticket ID from git branch:**
200
- - The Explore agent from Step 2 already ran `git branch --show-current` find the branch name in its results
201
- - Use the configurable ticket pattern from `.5/config.json` (e.g., `PROJ-\d+`) to extract the ticket ID from the branch name
244
+ **Extract ticket ID from the branch name:**
245
+ - Use the branch name injected at the top of this command
246
+ - Use the configurable ticket pattern from `.5/config.json` (e.g., `PROJ-\d+`) to extract the ticket ID
202
247
  - **Sanitize the ticket ID:** Only allow alphanumeric characters, dashes (`-`), and underscores (`_`). Strip any other characters (especially `/`, `..`, `~`, spaces).
203
248
  - **If ticket found:** use folder name `{TICKET-ID}-{feature-name}` and write the ticket ID into the spec
204
249
  - **If no ticket found:** use folder name `{feature-name}` and write `<no-ticket>` as the ticket ID in the spec
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:plan-implementation
3
3
  description: Creates an implementation plan from a feature spec. Phase 2 of the 5-phase workflow.
4
- allowed-tools: Read, Write, Task, AskUserQuestion
4
+ allowed-tools: Read, Write, Agent, AskUserQuestion
5
5
  user-invocable: true
6
6
  model: opus
7
7
  ---
@@ -144,7 +144,7 @@ Read `.5/features/{feature-name}/codebase-scan.md`. If it exists and is non-empt
144
144
 
145
145
  **If `codebase-scan.md` does NOT exist** (e.g., user skipped Phase 1 or ran an older version), spawn a fresh Explore agent:
146
146
 
147
- Spawn a Task with `subagent_type=Explore`:
147
+ Spawn an Agent with `subagent_type=Explore`:
148
148
 
149
149
  ```
150
150
  Quick codebase scan for implementation planning.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:quick-implement
3
3
  description: Execute small, focused implementations quickly with state tracking and atomic commits. Skips extensive planning phases and verification agents - use for tasks where you know exactly what to do.
4
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Task, AskUserQuestion, Skill, TaskCreate, TaskUpdate, TaskList, mcp__jetbrains__*
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent, AskUserQuestion, Skill, TaskCreate, TaskUpdate, TaskList, mcp__jetbrains__*
5
5
  user-invocable: true
6
6
  ---
7
7
 
@@ -14,6 +14,8 @@ This command handles ONE task. When done, you are DONE.
14
14
 
15
15
  # Quick Implement
16
16
 
17
+ Current branch: !`git branch --show-current`
18
+
17
19
  Fast path for small, well-understood tasks (1-5 files). Skips extensive planning phases but preserves state tracking and skill-based implementation.
18
20
 
19
21
  ## ⚠️ CRITICAL SCOPE CONSTRAINT
@@ -57,9 +59,7 @@ Store as `$DESCRIPTION`.
57
59
 
58
60
  ### Step 2: Extract Ticket ID and Load Config
59
61
 
60
- ```bash
61
- git branch --show-current
62
- ```
62
+ Use the branch name injected at the top of this command.
63
63
 
64
64
  Extract ticket ID using configurable pattern from config (e.g., `PROJ-\d+` or `\d+`). If not found, ask developer.
65
65
 
@@ -244,7 +244,7 @@ Determine the model based on the highest complexity in the plan's components:
244
244
  Spawn an agent with inline instructions:
245
245
 
246
246
  ```
247
- Task tool call:
247
+ Agent tool call:
248
248
  subagent_type: general-purpose
249
249
  model: {haiku or sonnet based on complexity above}
250
250
  description: "Execute quick implementation for ${feature_name}"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:reconfigure
3
3
  description: Lightweight refresh of project documentation, codebase index, and skills without full Q&A. Re-detects codebase changes, regenerates .5/*.md docs, rebuilds .5/index/, updates AGENTS.md, and refreshes all skills.
4
- allowed-tools: Read, Write, Bash, Glob, Grep, Task, AskUserQuestion
4
+ allowed-tools: Read, Write, Bash, Glob, Grep, Agent, AskUserQuestion
5
5
  user-invocable: true
6
6
  context: fork
7
7
  ---
@@ -134,7 +134,7 @@ New skills will be created and stale skills removed based on the user's choices.
134
134
 
135
135
  ### Step 5: Regenerate
136
136
 
137
- Invoke the refresh skills in **refresh mode** via the Task tool:
137
+ Invoke the refresh skills in **refresh mode** via the Agent tool:
138
138
 
139
139
  ```
140
140
  Task prompt 1: "Run configure-docs-index skill in REFRESH MODE.
@@ -163,7 +163,7 @@ Re-analyze the codebase and:
163
163
  6. Remove rule files the user chose to drop"
164
164
  ```
165
165
 
166
- Use `subagent_type: "general-purpose"` for the Task.
166
+ Use `subagent_type: "general-purpose"` for the Agent.
167
167
 
168
168
  ### Step 6: Track
169
169
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:review-code
3
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, Task, mcp__jetbrains__*
4
+ allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, Agent, mcp__jetbrains__*
5
5
  user-invocable: true
6
6
  model: sonnet
7
7
  context: fork
@@ -17,6 +17,8 @@ After saving the findings file, you are DONE.
17
17
 
18
18
  # Review Code (Phase 5)
19
19
 
20
+ CodeRabbit: !`which coderabbit 2>/dev/null && coderabbit auth status 2>/dev/null || echo "not installed"`
21
+
20
22
  ## Review Tools
21
23
 
22
24
  Two review tools are supported (configured in `.5/config.json` field `reviewTool`):
@@ -35,10 +37,7 @@ Read `.5/config.json` and check the `reviewTool` field.
35
37
  - If not set, missing, or `"claude"` (legacy value), default to `"native"`
36
38
  - If `"none"`, inform user that automated review is disabled and STOP
37
39
 
38
- **If CodeRabbit:** Check prerequisites via Bash:
39
- ```bash
40
- which coderabbit && coderabbit auth status
41
- ```
40
+ **If CodeRabbit:** Check the CodeRabbit status injected at the top of this command.
42
41
  If not installed or not authenticated, ask user via AskUserQuestion:
43
42
  - "Switch to native review for this review? (Recommended)" / "I'll install CodeRabbit first"
44
43
  - If they choose CodeRabbit setup, provide install instructions and STOP
@@ -62,7 +61,7 @@ Spawn a single agent to execute the review. Do NOT run the review yourself.
62
61
  #### 3A: CodeRabbit Review Agent
63
62
 
64
63
  ```
65
- Task tool call:
64
+ Agent tool call:
66
65
  subagent_type: general-purpose
67
66
  model: sonnet
68
67
  description: "Run CodeRabbit review"
@@ -105,7 +104,7 @@ Task tool call:
105
104
  #### 3B: Native Review Agent
106
105
 
107
106
  ```
108
- Task tool call:
107
+ Agent tool call:
109
108
  subagent_type: general-purpose
110
109
  model: sonnet
111
110
  description: "Run native code review"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 5:verify-implementation
3
3
  description: Verifies a feature implementation is complete and working with multi-layer checks. Phase 4 of the 5-phase workflow.
4
- allowed-tools: Read, Glob, Grep, Bash, Write, Task, AskUserQuestion
4
+ allowed-tools: Read, Glob, Grep, Bash, Write, Agent, AskUserQuestion
5
5
  user-invocable: true
6
6
  model: sonnet
7
7
  context: fork
@@ -105,7 +105,7 @@ Record: SUCCESS / FAILED with details (which tests failed, error messages).
105
105
  Spawn a sonnet agent to cross-reference the implementation against the feature spec:
106
106
 
107
107
  ```
108
- Task tool call:
108
+ Agent tool call:
109
109
  subagent_type: general-purpose
110
110
  model: sonnet
111
111
  description: "Verify feature completeness for {feature-name}"
@@ -2,7 +2,7 @@
2
2
 
3
3
  // Plan Guard - PreToolUse Hook
4
4
  // Prevents LLM breakout from planning phases by blocking:
5
- // - Task agents other than Explore (when not in implementation mode)
5
+ // - Agent/Task agents other than Explore (when not in implementation mode)
6
6
  // - Write/Edit operations outside .5/ (when not in implementation mode)
7
7
  //
8
8
  // Planning mode is detected per-feature by checking if that specific feature's
@@ -20,8 +20,8 @@ process.stdin.on('end', () => {
20
20
  const data = JSON.parse(input);
21
21
  const toolName = data.tool_name || '';
22
22
 
23
- // Short-circuit: only check Task, Write, Edit, EnterPlanMode, and Bash tools
24
- if (toolName !== 'Task' && toolName !== 'Write' && toolName !== 'Edit' && toolName !== 'EnterPlanMode' && toolName !== 'Bash') {
23
+ // Short-circuit: only check Agent, Task, Write, Edit, EnterPlanMode, and Bash tools
24
+ if (toolName !== 'Agent' && toolName !== 'Task' && toolName !== 'Write' && toolName !== 'Edit' && toolName !== 'EnterPlanMode' && toolName !== 'Bash') {
25
25
  process.exit(0);
26
26
  }
27
27
 
@@ -57,7 +57,7 @@ process.stdin.on('end', () => {
57
57
  process.exit(2);
58
58
  }
59
59
 
60
- if (toolName === 'Task') {
60
+ if (toolName === 'Agent' || toolName === 'Task') {
61
61
  const agentType = toolInput.subagent_type || '';
62
62
  if (agentType && agentType !== 'Explore') {
63
63
  const blockCount = incrementBlockCount(workspaceDir);
@@ -189,7 +189,7 @@ function getTargetFeature(toolName, toolInput, workspaceDir) {
189
189
  }
190
190
  }
191
191
 
192
- if (toolName === 'Task') {
192
+ if (toolName === 'Agent' || toolName === 'Task') {
193
193
  // Check the task prompt for feature name references
194
194
  const prompt = toolInput.prompt || '';
195
195
  const desc = toolInput.description || '';
package/src/settings.json CHANGED
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "PreToolUse": [
30
30
  {
31
- "matcher": "Task",
31
+ "matcher": "Task|Agent",
32
32
  "hooks": [
33
33
  {
34
34
  "type": "command",
@@ -38,7 +38,7 @@
38
38
  ]
39
39
  },
40
40
  {
41
- "matcher": "Task|Write|Edit|EnterPlanMode|Bash",
41
+ "matcher": "Task|Agent|Write|Edit|EnterPlanMode|Bash",
42
42
  "hooks": [
43
43
  {
44
44
  "type": "command",