5-phase-workflow 1.9.2 → 1.9.4
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 +2 -2
- package/bin/sync-agents.js +2 -2
- package/package.json +1 -1
- package/src/commands/5/address-review-findings.md +97 -34
- package/src/commands/5/analyze-feature.md +1 -1
- package/src/commands/5/discuss-feature.md +2 -2
- package/src/commands/5/implement-feature.md +2 -2
- package/src/commands/5/plan-feature.md +3 -3
- package/src/commands/5/plan-implementation.md +2 -2
- package/src/commands/5/quick-implement.md +2 -2
- package/src/commands/5/reconfigure.md +3 -3
- package/src/commands/5/review-code.md +3 -3
- package/src/commands/5/verify-implementation.md +2 -2
- package/src/hooks/plan-guard.js +5 -5
- package/src/settings.json +2 -2
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
|
-
| \`
|
|
427
|
-
| \`
|
|
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\` |
|
package/bin/sync-agents.js
CHANGED
|
@@ -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
|
-
| \`
|
|
85
|
-
| \`
|
|
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,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,
|
|
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
|
-
|
|
141
|
+
Agent tool call:
|
|
142
142
|
subagent_type: general-purpose
|
|
143
143
|
model: sonnet
|
|
144
144
|
description: "Analyze PR review comments"
|
|
@@ -163,44 +163,92 @@ Task tool call:
|
|
|
163
163
|
|
|
164
164
|
For duplicates, note which local finding covers it.
|
|
165
165
|
|
|
166
|
+
For every actionable_fix and manual comment, also provide:
|
|
167
|
+
- **recommendation**: one of `address`, `defer`, `decline`, or `discuss`
|
|
168
|
+
- `address` — should be fixed now, clear and reasonable
|
|
169
|
+
- `defer` — valid concern but low urgency, can wait
|
|
170
|
+
- `decline` — out of scope or disagree with the suggestion
|
|
171
|
+
- `discuss` — needs more context before deciding
|
|
172
|
+
- **reasoning**: one plain-English sentence explaining the recommendation
|
|
173
|
+
|
|
166
174
|
## Output Format
|
|
167
175
|
Return a structured list:
|
|
168
176
|
|
|
169
177
|
---PR-COMMENTS---
|
|
170
|
-
{id} | {file}:{line} | {category} | {description} | {duplicate_of or "none"}
|
|
178
|
+
{id} | {file}:{line} | {category} | {description} | {duplicate_of or "none"} | {recommendation or "n/a"} | {one-sentence reasoning or "n/a"}
|
|
171
179
|
---END-PR-COMMENTS---
|
|
172
180
|
|
|
173
181
|
Rules:
|
|
174
182
|
- DO NOT apply fixes
|
|
175
183
|
- DO NOT interact with user
|
|
176
184
|
- Include every comment in the output
|
|
185
|
+
- recommendation and reasoning are required for actionable_fix and manual; use "n/a" for skip and duplicate
|
|
177
186
|
```
|
|
178
187
|
|
|
179
|
-
Parse the `---PR-COMMENTS---` block.
|
|
180
|
-
- `
|
|
181
|
-
- `
|
|
182
|
-
- `
|
|
188
|
+
Parse the `---PR-COMMENTS---` block. For each line extract all seven fields. Build:
|
|
189
|
+
- `pr_actionable` — actionable_fix items (with recommendation + reasoning)
|
|
190
|
+
- `pr_manual` — manual items (with recommendation + reasoning)
|
|
191
|
+
- `pr_duplicates` — duplicate items (auto-assign `decision: wont_fix`, no Q&A)
|
|
192
|
+
- `pr_skip` — skip items (auto-assign `decision: wont_fix`, no Q&A)
|
|
193
|
+
|
|
194
|
+
Initialize `pr_decisions` as an empty list. Append all `pr_duplicates` and `pr_skip` entries with `decision: wont_fix` and `user_note: ""`.
|
|
183
195
|
|
|
184
|
-
**
|
|
196
|
+
**Display count summary:**
|
|
185
197
|
```
|
|
186
|
-
PR Review Comments:
|
|
187
|
-
- Actionable (new):
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
- Skipped (bot/resolved):
|
|
198
|
+
PR Review Comments found:
|
|
199
|
+
- Actionable (new): {N}
|
|
200
|
+
- Manual/Discussion: {N}
|
|
201
|
+
- Duplicates (covered by local): {N}
|
|
202
|
+
- Skipped (bot/resolved): {N}
|
|
191
203
|
|
|
192
|
-
|
|
193
|
-
|
|
204
|
+
You will now be asked to decide on each actionable and manual comment individually.
|
|
205
|
+
```
|
|
194
206
|
|
|
195
|
-
|
|
196
|
-
|
|
207
|
+
If there are no `pr_actionable` and no `pr_manual` items, display `"No actionable or manual PR comments to review."` and skip the loop below.
|
|
208
|
+
|
|
209
|
+
**Per-comment decision loop** — iterate over all items in `pr_actionable + pr_manual` in order, using a counter `i` from 1 to total:
|
|
210
|
+
|
|
211
|
+
For each comment:
|
|
212
|
+
|
|
213
|
+
1. Display:
|
|
214
|
+
```
|
|
215
|
+
── PR Comment {i} of {total} ──────────────────────────
|
|
216
|
+
Category: {category}
|
|
217
|
+
File: {file}:{line}
|
|
218
|
+
Comment: {description}
|
|
219
|
+
|
|
220
|
+
Recommendation: {recommendation} — {reasoning}
|
|
221
|
+
──────────────────────────────────────────────────────
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
2. Ask via AskUserQuestion:
|
|
225
|
+
- Question: `"[{i}/{total}] {file}:{line} — How do you want to handle this comment?"`
|
|
226
|
+
- Options: `"fix — apply the suggested change"` / `"won't fix — decline"` / `"wait — defer for later"`
|
|
227
|
+
|
|
228
|
+
3. Record the decision (map to internal values: `fix`, `wont_fix`, `wait`).
|
|
229
|
+
|
|
230
|
+
4. Ask via AskUserQuestion:
|
|
231
|
+
- Question: `"Add a note for this comment? (shown in PR reply and summary report)"`
|
|
232
|
+
- Options: `"No note"` / `"Add a note"`
|
|
233
|
+
- If "Add a note": ask via AskUserQuestion with free-text input (no fixed options):
|
|
234
|
+
- Question: `"Enter your note for: {file}:{line}"`
|
|
235
|
+
|
|
236
|
+
5. Append to `pr_decisions`:
|
|
237
|
+
```
|
|
238
|
+
{ comment_id, file_line, category, description, decision, user_note (or ""), recommendation, reasoning }
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
After the loop, display:
|
|
197
242
|
```
|
|
243
|
+
Decision summary:
|
|
244
|
+
- fix: {N} comments
|
|
245
|
+
- won't fix: {N} comments
|
|
246
|
+
- wait: {N} comments
|
|
198
247
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- If "Let me choose": present each one and ask Fix / Skip per item.
|
|
248
|
+
Proceeding to apply fixes...
|
|
249
|
+
```
|
|
202
250
|
|
|
203
|
-
|
|
251
|
+
Derive `pr_approved_fixes` as the subset of `pr_decisions` where `decision == fix`. This list is used by Step 5.
|
|
204
252
|
|
|
205
253
|
### Step 5: Apply Fixes
|
|
206
254
|
|
|
@@ -224,7 +272,7 @@ Apply from highest line number to lowest within each file to avoid line offset s
|
|
|
224
272
|
#### Agent Application (4+ fixes per file)
|
|
225
273
|
|
|
226
274
|
```
|
|
227
|
-
|
|
275
|
+
Agent tool call:
|
|
228
276
|
subagent_type: general-purpose
|
|
229
277
|
model: {haiku for simple | sonnet for complex}
|
|
230
278
|
description: "Apply fixes to {file-path}"
|
|
@@ -265,9 +313,7 @@ For each `[MANUAL]` item with custom instructions:
|
|
|
265
313
|
|
|
266
314
|
### Step 6: Reply to GitHub PR Comments
|
|
267
315
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
Post a reply using the GitHub API:
|
|
316
|
+
Iterate over every entry in `pr_decisions` (excluding entries with category `skip` — do not reply to those). For each entry, post a reply using the GitHub API.
|
|
271
317
|
|
|
272
318
|
**For review comments (inline):**
|
|
273
319
|
```bash
|
|
@@ -283,12 +329,22 @@ gh api repos/{owner}/{repo}/issues/{number}/comments \
|
|
|
283
329
|
--field body="{reply text}"
|
|
284
330
|
```
|
|
285
331
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
332
|
+
**Template selection logic:**
|
|
333
|
+
|
|
334
|
+
1. If `category == "duplicate"`: use the auto-duplicate template below
|
|
335
|
+
2. Else if `decision == "fix"`: use fix template, with or without note based on `user_note` presence
|
|
336
|
+
3. Else if `decision == "wont_fix"`: use wont_fix template, with or without note based on `user_note` presence
|
|
337
|
+
4. Else if `decision == "wait"`: use wait template, with or without note based on `user_note` presence
|
|
338
|
+
|
|
339
|
+
**Templates:**
|
|
340
|
+
|
|
341
|
+
- **`fix` (with user note):** `Applied fix: {description}. Will be included in the next push. Note: {user_note}`
|
|
342
|
+
- **`fix` (no note):** `Applied fix: {description}. Will be included in the next push.`
|
|
343
|
+
- **`wont_fix` (with user note):** `Reviewed — not addressing: {user_note}`
|
|
344
|
+
- **`wont_fix` (no note):** `Reviewed — not addressing: will handle separately`
|
|
345
|
+
- **`wait` (with user note):** `Noted for later: {user_note}`
|
|
346
|
+
- **`wait` (no note):** `Noted for later: deferring for now`
|
|
347
|
+
- **`wont_fix` (auto, duplicate):** `Covered by local review findings — {local_decision}` where `{local_decision}` is `"fix applied"` if the matched local finding has action `[FIX]`, otherwise `"marked as skipped"` or `"flagged for manual review"` accordingly
|
|
292
348
|
|
|
293
349
|
If `gh api` is unavailable or fails, log the failure and continue. Do NOT abort for reply failures.
|
|
294
350
|
|
|
@@ -317,15 +373,16 @@ Use the template structure from `.claude/templates/workflow/REVIEW-SUMMARY.md`.
|
|
|
317
373
|
|
|
318
374
|
**Reviewed:** {feature} — findings from {findings-filename}
|
|
319
375
|
**Timestamp:** {ISO-timestamp}
|
|
320
|
-
**User Decisions:** Applied {N} fixes,
|
|
376
|
+
**User Decisions:** Applied {N} fixes, declined {N}, deferred {N}
|
|
321
377
|
|
|
322
378
|
## Summary
|
|
323
379
|
|
|
324
380
|
- **Local Fixes Applied:** {N}
|
|
325
381
|
- **Local Fixes Skipped:** {N}
|
|
326
382
|
- **Manual Items Applied:** {N}
|
|
327
|
-
- **PR Comments Fixed:**
|
|
328
|
-
- **PR Comments
|
|
383
|
+
- **PR Comments Fixed:** {N} (decision = fix)
|
|
384
|
+
- **PR Comments Deferred:** {N} (decision = wait)
|
|
385
|
+
- **PR Comments Declined:** {N} (decision = won't fix, excluding auto)
|
|
329
386
|
- **Build:** {passed/failed}
|
|
330
387
|
- **Tests:** {passed/failed}
|
|
331
388
|
|
|
@@ -338,6 +395,12 @@ Use the template structure from `.claude/templates/workflow/REVIEW-SUMMARY.md`.
|
|
|
338
395
|
## Manual Items
|
|
339
396
|
...
|
|
340
397
|
|
|
398
|
+
## PR Comment Decisions
|
|
399
|
+
|
|
400
|
+
| # | File:Line | Description | Decision | Note |
|
|
401
|
+
|---|-----------|-------------|----------|------|
|
|
402
|
+
| {i} | {file}:{line} | {description} | {fix/won't fix/wait} | {user_note or "—"} |
|
|
403
|
+
|
|
341
404
|
## PR Comment Replies
|
|
342
405
|
...
|
|
343
406
|
```
|
|
@@ -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,
|
|
4
|
+
allowed-tools: Read, Write, Glob, Grep, Agent, AskUserQuestion
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -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,
|
|
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
|
|
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:
|
|
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
|
-
|
|
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,
|
|
4
|
+
allowed-tools: Read, Write, Agent, AskUserQuestion
|
|
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
|
|
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
|
|
@@ -122,7 +122,7 @@ Ask the developer for the feature description using AskUserQuestion:
|
|
|
122
122
|
|
|
123
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.
|
|
124
124
|
|
|
125
|
-
Spawn
|
|
125
|
+
Spawn an Agent with `subagent_type=Explore`:
|
|
126
126
|
|
|
127
127
|
```
|
|
128
128
|
Analyze the codebase for a feature specification session.
|
|
@@ -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,
|
|
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
|
|
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,
|
|
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
|
|
|
@@ -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
|
-
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
4
|
+
allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, Agent, mcp__jetbrains__*
|
|
5
5
|
user-invocable: true
|
|
6
6
|
model: sonnet
|
|
7
7
|
context: fork
|
|
@@ -62,7 +62,7 @@ Spawn a single agent to execute the review. Do NOT run the review yourself.
|
|
|
62
62
|
#### 3A: CodeRabbit Review Agent
|
|
63
63
|
|
|
64
64
|
```
|
|
65
|
-
|
|
65
|
+
Agent tool call:
|
|
66
66
|
subagent_type: general-purpose
|
|
67
67
|
model: sonnet
|
|
68
68
|
description: "Run CodeRabbit review"
|
|
@@ -105,7 +105,7 @@ Task tool call:
|
|
|
105
105
|
#### 3B: Native Review Agent
|
|
106
106
|
|
|
107
107
|
```
|
|
108
|
-
|
|
108
|
+
Agent tool call:
|
|
109
109
|
subagent_type: general-purpose
|
|
110
110
|
model: sonnet
|
|
111
111
|
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,
|
|
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
|
-
|
|
108
|
+
Agent tool call:
|
|
109
109
|
subagent_type: general-purpose
|
|
110
110
|
model: sonnet
|
|
111
111
|
description: "Verify feature completeness for {feature-name}"
|
package/src/hooks/plan-guard.js
CHANGED
|
@@ -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",
|