5-phase-workflow 1.1.1 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5-phase-workflow",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A 5-phase feature development workflow for Claude Code",
5
5
  "bin": {
6
6
  "5-phase-workflow": "bin/install.js"
@@ -19,6 +19,37 @@ After running this command, proceed through the standard phases:
19
19
  4. `/5:verify-implementation` - Verify configuration
20
20
  5. `/5:review-code` - Review generated files
21
21
 
22
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
23
+
24
+ **THIS COMMAND ONLY CREATES THE CONFIGURATION FEATURE SPEC. IT DOES NOT CONFIGURE.**
25
+
26
+ Your job in this command:
27
+ ✅ Analyze project (detect type, build commands, etc.)
28
+ ✅ Gather user preferences via questions
29
+ ✅ Create feature spec at `.5/CONFIGURE/feature.md`
30
+ ✅ Tell user to run /5:plan-implementation CONFIGURE
31
+
32
+ Your job is NOT:
33
+ ❌ Write config.json directly (Phase 3 does this)
34
+ ❌ Create CLAUDE.md directly (Phase 3 does this)
35
+ ❌ Generate skills directly (Phase 3 does this)
36
+ ❌ Skip user interaction
37
+ ❌ Assume project structure
38
+
39
+ **After creating the feature spec and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
40
+
41
+ ## ❌ Boundaries: What This Command Does NOT Do
42
+
43
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
44
+
45
+ - ❌ **Write config.json** - That's Phase 3's job (via configure-project skill)
46
+ - ❌ **Create CLAUDE.md** - That's Phase 3's job
47
+ - ❌ **Generate skills** - That's Phase 3's job
48
+ - ❌ **Skip questions** - Always confirm detected values with user
49
+ - ❌ **Assume structure** - Detect or ask, don't guess
50
+
51
+ **If you find yourself creating config files or CLAUDE.md, STOP IMMEDIATELY. You should only be creating the feature spec.**
52
+
22
53
  ## Configuration Process
23
54
 
24
55
  ### Step 1: Analyze Project (auto-detect, no user interaction)
@@ -19,6 +19,41 @@ This skill is part of **Phase 1** (Feature Planning) of the 5-phase workflow:
19
19
 
20
20
  This skill enables **optional iterative refinement** of feature specs after initial planning through discussion, clarification, and requirement changes. Use it when the initial spec needs adjustments before proceeding to implementation planning.
21
21
 
22
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
23
+
24
+ **THIS COMMAND ONLY UPDATES FEATURE SPECIFICATIONS. IT DOES NOT PLAN OR IMPLEMENT.**
25
+
26
+ Your job in this command:
27
+ ✅ Read existing feature specification
28
+ ✅ Ask what user wants to discuss
29
+ ✅ Explore codebase if needed for context
30
+ ✅ Ask clarifying questions
31
+ ✅ Update feature specification
32
+ ✅ Tell user to run /5:plan-implementation
33
+
34
+ Your job is NOT:
35
+ ❌ Create new feature specs (use /5:plan-feature)
36
+ ❌ Create implementation plans
37
+ ❌ Map to technical components
38
+ ❌ Start implementation
39
+ ❌ Write any code
40
+ ❌ Rewrite entire feature spec (only update changed sections)
41
+
42
+ **After updating the feature spec and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
43
+
44
+ ## ❌ Boundaries: What This Command Does NOT Do
45
+
46
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
47
+
48
+ - ❌ **Create new feature specs** - That's /5:plan-feature
49
+ - ❌ **Create implementation plans** - That's Phase 2 (/5:plan-implementation)
50
+ - ❌ **Start implementation** - That's Phase 3 (/5:implement-feature)
51
+ - ❌ **Write any code** - This is planning only
52
+ - ❌ **Rewrite entire spec** - Only update sections that changed
53
+ - ❌ **Delete previous Q&A** - Append new discussions, keep history
54
+
55
+ **If you find yourself creating plans or writing code, STOP IMMEDIATELY. You are exceeding this command's scope.**
56
+
22
57
  ## Use Cases
23
58
 
24
59
  Use this skill when:
@@ -196,15 +231,19 @@ After updating the spec, tell the developer:
196
231
 
197
232
  ## Instructions Summary
198
233
 
234
+ Follow these steps **IN ORDER** and **STOP after step 9**:
235
+
199
236
  1. **Extract feature name** - From user input or by matching ticket ID
200
237
  2. **Read feature spec** - Load current state from `.5/{feature-name}/feature.md`
201
238
  3. **Ask initial question** - What do they want to discuss?
202
239
  4. **Explore if needed** - Understand codebase context
203
240
  5. **Interactive Q&A** - Multiple rounds of clarifying questions
204
- 6. **Iterate** - Allow continued discussion
205
- 7. **Update feature spec** - Modify relevant sections
241
+ 6. **Iterate** - Allow continued discussion until user is satisfied
242
+ 7. **Update feature spec** - Modify only the relevant sections that changed
206
243
  8. **Track changes** - Document discussion history
207
- 9. **Inform developer** - Summarize changes and next steps
244
+ 9. **Inform developer** - Summarize changes and ask: "Discuss more or run `/clear` followed by `/5:plan-implementation {feature-name}`?"
245
+
246
+ **🛑 STOP HERE. YOUR JOB IS COMPLETE. DO NOT CREATE IMPLEMENTATION PLANS.**
208
247
 
209
248
  ## Key Principles
210
249
 
@@ -216,14 +255,6 @@ After updating the spec, tell the developer:
216
255
  6. **Preserve history** - Keep previous Q&A, add new discussions
217
256
  7. **Clear next steps** - Guide user on what to do next
218
257
 
219
- ## DO NOT in This Skill
220
-
221
- - DO NOT rewrite the entire feature spec (only update changed sections)
222
- - DO NOT skip asking what the user wants to discuss
223
- - DO NOT create new feature specs (use /plan-feature for that)
224
- - DO NOT proceed to technical planning (that's Phase 2's job)
225
- - DO NOT start implementation
226
- - DO NOT delete previous Q&A sections (append to them)
227
258
 
228
259
  ## Discussion Patterns
229
260
 
@@ -31,6 +31,43 @@ This command is a **thin orchestrator** that:
31
31
  - The plan contains self-contained prompts - agents execute without codebase exploration
32
32
  - Skills are called by agents when specified in the plan
33
33
 
34
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
35
+
36
+ **THIS COMMAND ORCHESTRATES IMPLEMENTATION. IT DELEGATES TO AGENTS.**
37
+
38
+ Your job in this phase:
39
+ ✅ Load implementation plan
40
+ ✅ Initialize state tracking
41
+ ✅ Spawn agents (step-executor, step-verifier, step-fixer)
42
+ ✅ Process agent results
43
+ ✅ Update state file after each step
44
+ ✅ Report completion
45
+ ✅ Tell user to run /5:verify-implementation
46
+
47
+ Your job is NOT:
48
+ ❌ Execute skills directly (agents call skills)
49
+ ❌ Do heavy file reading/writing (agents do this)
50
+ ❌ Write code files directly (agents do this)
51
+ ❌ Skip state file updates
52
+ ❌ Analyze or fix errors yourself (delegate to step-fixer agent)
53
+ ❌ Continue past 80% context usage
54
+
55
+ **You are a THIN ORCHESTRATOR. Delegate all heavy work to agents in forked contexts.**
56
+
57
+ ## ❌ Boundaries: What This Command Does NOT Do
58
+
59
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
60
+
61
+ - ❌ **Execute skills directly** - Agents call skills, not this command
62
+ - ❌ **Write code directly** - Agents handle all file operations
63
+ - ❌ **Analyze errors yourself** - Delegate to step-fixer agent (sonnet)
64
+ - ❌ **Skip state file updates** - State updates are MANDATORY after each step
65
+ - ❌ **Skip verification** - step-verifier must run after each step-executor
66
+ - ❌ **Continue after 2 failed retries** - Escalate to user
67
+ - ❌ **Ignore context warnings** - Stop at 80% usage
68
+
69
+ **If you find yourself writing code or fixing errors directly, STOP. You should be spawning agents instead.**
70
+
34
71
  ## Prerequisites
35
72
 
36
73
  Before using this skill, ensure:
@@ -367,17 +404,25 @@ Update state file:
367
404
  4. **Verify** the update by reading the file again
368
405
 
369
406
  Tell the developer:
370
- 1. "Feature implementation complete!"
371
- 2. "All {N} components created successfully"
372
- 3. "Compilation: Successful"
373
- 4. "Tests: All passing ({N} tests)"
374
- 5. **"State file: `.5/{feature-name}/state.json`"** (this is critical for resume capability)
375
- 6. "Next steps:"
376
- - "Run `/clear` to reset context"
377
- - "Then run `/5:verify-implementation {feature-name}` to validate completeness"
407
+
408
+ ```
409
+ Feature implementation complete!
410
+
411
+ Summary:
412
+ - All {N} components created successfully
413
+ - Compilation: Successful
414
+ - Tests: All passing ({N} tests)
415
+ - State file: `.5/{feature-name}/state.json`
416
+
417
+ Next steps:
418
+ 1. Run `/clear` to reset context
419
+ 2. Run `/5:verify-implementation {feature-name}` to validate completeness
420
+ ```
378
421
 
379
422
  **Note:** The verification step will automatically prompt the developer to commit changes, which is recommended before running CodeRabbit review.
380
423
 
424
+ **🛑 YOUR JOB IS COMPLETE. DO NOT START VERIFICATION. Wait for user to proceed to Phase 4.**
425
+
381
426
  ## State File Schema
382
427
 
383
428
  ```typescript
@@ -467,25 +512,29 @@ User: /implement-feature PROJ-1234-add-emergency-schedule
467
512
 
468
513
  ## Instructions Summary
469
514
 
515
+ Follow these steps **IN ORDER**:
516
+
470
517
  1. **Load implementation plan metadata** from `.5/{feature-name}/plan/meta.md` - parse YAML frontmatter for total_steps, total_components
471
518
  2. **Initialize state file** (MANDATORY) in `.5/{feature-name}/state.json` - verify creation
472
519
  3. **Create tasks** for all steps defined in the plan
473
520
  4. **For each step (1 to total_steps):**
474
521
  - Load and parse step file: `.5/{feature-name}/plan/step-{N}.md` (parse YAML frontmatter + components block)
475
522
  - Build step block object from parsed data
476
- - Spawn step-executor with step block
523
+ - Spawn step-executor with step block (haiku model)
477
524
  - Process results
478
525
  - Spawn step-verifier
479
526
  - Process results
480
527
  - **Update state file** (MANDATORY - Step 4f) - verify update
481
528
  5. **For final integration step (if configured):** Spawn integration-agent, process results, **update state file** (MANDATORY)
482
- 6. **Handle failures** - record in state file (MANDATORY), extract original prompt from plan/step-{N}.md, spawn step-fixer to diagnose and fix, re-verify after fix, escalate if stuck
529
+ 6. **Handle failures** - record in state file (MANDATORY), extract original prompt from plan/step-{N}.md, spawn step-fixer (sonnet) to diagnose and fix, re-verify after fix, escalate if stuck
483
530
  7. **Monitor context** - warn at 50%, stop at 80%
484
531
  8. **Update state file to completed** (MANDATORY - Step 8) - verify final update
485
- 9. **Report completion** with summary including state file location
532
+ 9. **Report completion** - Tell user: "Run `/clear` followed by `/5:verify-implementation {feature-name}`"
486
533
 
487
534
  **CRITICAL**: State file updates at Steps 2, 4f (after each step), 5 (failures), and 8 (completion) are MANDATORY. These enable resumability if implementation is interrupted.
488
535
 
536
+ **🛑 AFTER REPORTING COMPLETION, YOUR JOB IS DONE. DO NOT START VERIFICATION.**
537
+
489
538
  ## Key Principles
490
539
 
491
540
  1. **Thin orchestrator** - Main context only reads plans, spawns agents, processes results, updates state
@@ -524,18 +573,6 @@ User: "Continue implementation of PROJ-1234-add-emergency-schedule"
524
573
  [Execute Step 2 → remaining steps]
525
574
  ```
526
575
 
527
- ## DO NOT
528
-
529
- - DO NOT execute skills directly from this command (agents call skills)
530
- - DO NOT do heavy file reading/writing in main context (agents do this)
531
- - **DO NOT skip state file updates** (this breaks resumability)
532
- - **DO NOT skip state file initialization** (Step 2 is mandatory)
533
- - **DO NOT skip state file completion update** (Step 8 is mandatory)
534
- - DO NOT skip verification (step-verifier) after any step
535
- - DO NOT continue after 2 failed retry attempts without escalation
536
- - DO NOT ignore context usage warnings
537
- - DO NOT analyze errors in main context (delegate to step-fixer)
538
- - DO NOT fix code in main context (delegate to step-fixer)
539
576
 
540
577
  ## Related Documentation
541
578
 
@@ -19,6 +19,41 @@ This skill is the **first phase** of the 5-phase workflow:
19
19
 
20
20
  This skill guides intensive collaboration with the developer to understand requirements, challenge assumptions, and create a comprehensive feature specification.
21
21
 
22
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
23
+
24
+ **THIS COMMAND ONLY CREATES THE FEATURE SPECIFICATION. IT DOES NOT IMPLEMENT.**
25
+
26
+ Your job in this phase:
27
+ ✅ Ask questions
28
+ ✅ Explore codebase
29
+ ✅ Create feature.md file
30
+ ✅ Tell user to run /5:plan-implementation
31
+
32
+ Your job is NOT:
33
+ ❌ Create implementation plans
34
+ ❌ Map to technical components
35
+ ❌ Write any code
36
+ ❌ Start implementation
37
+
38
+ **After creating feature.md and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
39
+
40
+ ## ❌ Boundaries: What This Command Does NOT Do
41
+
42
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
43
+
44
+ - ❌ **Create implementation plans** - That's Phase 2 (`/5:plan-implementation`)
45
+ - ❌ **Map components to skills** - That's Phase 2's job
46
+ - ❌ **Start any implementation** - That's Phase 3 (`/5:implement-feature`)
47
+ - ❌ **Write any code** - Not even example code
48
+ - ❌ **Create TodoWrite task lists** - Wrong phase
49
+ - ❌ Ask for ticket ID (extract from branch name automatically)
50
+ - ❌ Skip asking for feature description first
51
+ - ❌ Ask questions before exploring the codebase
52
+ - ❌ Skip the intensive Q&A phase
53
+ - ❌ Accept vague requirements
54
+
55
+ **If you find yourself doing any of the above, STOP IMMEDIATELY. You are exceeding this command's scope.**
56
+
22
57
  ## Planning Process
23
58
 
24
59
  ### Step 1: Gather Feature Description
@@ -129,7 +164,9 @@ Based on the feature description and discussion:
129
164
 
130
165
  ### Step 6: Create Feature Specification
131
166
 
132
- Write a comprehensive feature spec to `.5/{TICKET-ID}-{description}/feature.md` with the following structure:
167
+ Write a comprehensive feature spec to `.5/{TICKET-ID}-{description}/feature.md` with the following structure.
168
+
169
+ **THIS IS YOUR FINAL OUTPUT. After creating this file, proceed immediately to Step 7.**
133
170
 
134
171
  ```markdown
135
172
  # Feature: {TICKET-ID} - {Title}
@@ -219,6 +256,8 @@ After approval:
219
256
 
220
257
  ## Instructions
221
258
 
259
+ Follow these steps **IN ORDER** and **STOP after step 8**:
260
+
222
261
  1. **Ask for feature description** - Request task description and additional information from developer
223
262
  2. **Extract Ticket ID** - Get current branch name and extract ticket ID using configured pattern
224
263
  3. **Explore the codebase** - Understand existing patterns and affected modules
@@ -226,7 +265,9 @@ After approval:
226
265
  5. **Challenge assumptions** - Present alternatives, question complexity
227
266
  6. **Determine feature name** - Create short kebab-case description
228
267
  7. **Create feature specification** in `.5/{TICKET-ID}-{description}/feature.md`
229
- 8. **Inform the developer** to review the spec and then run `/plan-implementation {TICKET-ID}-{description}`
268
+ 8. **Inform the developer** to review the spec and then run `/clear` followed by `/5:plan-implementation {TICKET-ID}-{description}`
269
+
270
+ **🛑 STOP HERE. YOUR JOB IS COMPLETE. DO NOT PROCEED TO IMPLEMENTATION.**
230
271
 
231
272
  ## Key Principles
232
273
 
@@ -239,16 +280,6 @@ After approval:
239
280
  7. **Structured output** - Use the feature spec template consistently
240
281
  8. **Clear handoff** - Tell developer what to do next
241
282
 
242
- ## DO NOT in This Skill
243
-
244
- - DO NOT ask for ticket ID (extract from branch name automatically)
245
- - DO NOT skip asking for feature description first
246
- - DO NOT ask questions before exploring the codebase
247
- - DO NOT create TodoWrite task lists (that's Phase 2's job)
248
- - DO NOT map components to skills (that's Phase 2's job)
249
- - DO NOT start implementation (that's Phase 3's job)
250
- - DO NOT skip the intensive Q&A phase
251
- - DO NOT accept vague requirements
252
283
 
253
284
  ## Common Feature Types
254
285
 
@@ -279,8 +310,14 @@ After approval:
279
310
  7. Skill challenges: "Could we reuse existing scheduling infrastructure instead of creating new one?"
280
311
  8. Skill determines: Feature name `add-emergency-schedule`
281
312
  9. Skill creates: `.5/PROJ-1234-add-emergency-schedule/feature.md`
282
- 10. Skill tells user: "Feature spec created. Please review and then run `/clear` followed by `/5:plan-implementation PROJ-1234-add-emergency-schedule`"
283
- 11. Skill tells user: "If the feature needs refinements, run `/5:discuss-feature PROJ-1234-add-emergency-schedule`"
313
+ 10. Skill tells user: "Feature spec created at `.5/PROJ-1234-add-emergency-schedule/feature.md`
314
+
315
+ **Next steps:**
316
+ 1. Review the feature spec
317
+ 2. If changes needed: `/5:discuss-feature PROJ-1234-add-emergency-schedule`
318
+ 3. If approved: `/clear` then `/5:plan-implementation PROJ-1234-add-emergency-schedule`"
319
+
320
+ **🛑 COMMAND COMPLETE. The skill stops here and waits for user to proceed to Phase 2.**
284
321
 
285
322
  ## Related Documentation
286
323
 
@@ -19,6 +19,41 @@ This skill is the **second phase** of the 5-phase workflow:
19
19
 
20
20
  **Critical design constraint:** The plan must be executable by haiku-model agents without any codebase exploration. This means YOU must do all analysis upfront and embed everything into the plan: exact file paths, exact code patterns, reference snippets, imports, and complete instructions.
21
21
 
22
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
23
+
24
+ **THIS COMMAND ONLY CREATES THE IMPLEMENTATION PLAN. IT DOES NOT IMPLEMENT.**
25
+
26
+ Your job in this phase:
27
+ ✅ Read feature specification
28
+ ✅ Analyze codebase deeply
29
+ ✅ Ask technical questions
30
+ ✅ Create atomic plan files (meta.md, step-N.md, verification.md)
31
+ ✅ Build self-contained prompts for each component
32
+ ✅ Tell user to run /5:implement-feature
33
+
34
+ Your job is NOT:
35
+ ❌ Start implementation
36
+ ❌ Execute any components
37
+ ❌ Create state files
38
+ ❌ Write any code files
39
+ ❌ Run build or tests
40
+ ❌ Create TodoWrite task lists
41
+
42
+ **After creating the plan files and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
43
+
44
+ ## ❌ Boundaries: What This Command Does NOT Do
45
+
46
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
47
+
48
+ - ❌ **Start implementation** - That's Phase 3 (`/5:implement-feature`)
49
+ - ❌ **Execute components** - That's Phase 3's job
50
+ - ❌ **Create state files** - That's Phase 3's responsibility
51
+ - ❌ **Write code files** - Only create plan files in `.5/{feature-name}/plan/`
52
+ - ❌ **Run builds or tests** - Phase 3 and 4 handle this
53
+ - ❌ **Create vague prompts** - Every prompt must be self-contained and executable by haiku without exploration
54
+
55
+ **If you find yourself doing any of the above, STOP IMMEDIATELY. You are exceeding this command's scope.**
56
+
22
57
  ## Prerequisites
23
58
 
24
59
  Before invoking this skill, ensure:
@@ -386,14 +421,18 @@ prompt: |
386
421
 
387
422
  ## Instructions Summary
388
423
 
424
+ Follow these steps **IN ORDER** and **STOP after step 8**:
425
+
389
426
  1. **Read feature spec** from `.5/{feature-name}/feature.md`
390
427
  2. **Deep codebase analysis** - Read actual files, extract patterns, imports, conventions. This is the critical step.
391
428
  3. **Ask 3-5 technical questions** - Clarify implementation details
392
429
  4. **Map components to skills** - Check `.claude/skills/` for available skills
393
430
  5. **Group into dependency steps** - Based on component dependencies
394
431
  6. **Build self-contained prompts** - Each prompt must be executable by haiku without exploration
395
- 7. **Write plan** to `.5/{feature-name}/plan.md` in the structured format
396
- 8. **Inform developer** to review and run `/5:implement-feature`
432
+ 7. **Write plan** to `.5/{feature-name}/plan/` directory with atomic files (meta.md, step-N.md, verification.md)
433
+ 8. **Inform developer** to review and run `/clear` followed by `/5:implement-feature {feature-name}`
434
+
435
+ **🛑 STOP HERE. YOUR JOB IS COMPLETE. DO NOT START IMPLEMENTATION.**
397
436
 
398
437
  ## Key Principles
399
438
 
@@ -404,15 +443,6 @@ prompt: |
404
443
  5. **Dependency-driven steps** - Step grouping from component dependencies
405
444
  6. **Verify prompt quality** - Could someone with no codebase knowledge execute it?
406
445
 
407
- ## DO NOT
408
-
409
- - DO NOT start implementation (that's Phase 3's job)
410
- - DO NOT create state files (that's `/implement-feature`'s job)
411
- - DO NOT write vague prompts like "follow existing patterns" without including the pattern
412
- - DO NOT skip codebase analysis - reading actual files is mandatory
413
- - DO NOT leave file paths ambiguous
414
- - DO NOT write prompts that require the executor to read other files to understand what to do
415
- - DO NOT assume the executor can figure things out - be explicit
416
446
 
417
447
  ## Example Usage
418
448
 
@@ -431,7 +461,19 @@ Skill:
431
461
  9. Writes plan/meta.md with metadata and risks
432
462
  10. Writes plan/step-1.md, plan/step-2.md, plan/step-3.md with YAML components
433
463
  11. Writes plan/verification.md with build/test config
434
- 12. Tells user: "Plan created with 7 components across 3 steps. Atomic plan structure at `.5/PROJ-1234-add-emergency-schedule/plan/`. Review the plan files, then run `/clear` followed by `/5:implement-feature PROJ-1234-add-emergency-schedule`"
464
+ 12. Tells user: " Implementation plan created at `.5/PROJ-1234-add-emergency-schedule/plan/`
465
+
466
+ **Plan structure:**
467
+ - 7 components across 3 steps
468
+ - Atomic plan files: meta.md, step-1.md, step-2.md, step-3.md, verification.md
469
+ - Self-contained prompts ready for haiku execution
470
+
471
+ **Next steps:**
472
+ 1. Review the plan files
473
+ 2. Run `/clear` to reset context
474
+ 3. Run `/5:implement-feature PROJ-1234-add-emergency-schedule`"
475
+
476
+ **🛑 COMMAND COMPLETE. The command stops here and waits for user to proceed to Phase 3.**
435
477
  ```
436
478
 
437
479
  ## Related Documentation
@@ -10,6 +10,43 @@ user-invocable: true
10
10
 
11
11
  Fast path for small, well-understood tasks (1-5 files). Skips extensive planning phases but preserves state tracking and skill-based implementation.
12
12
 
13
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
14
+
15
+ **THIS COMMAND IS FOR SMALL, FOCUSED TASKS ONLY (1-5 FILES).**
16
+
17
+ Your job in this command:
18
+ ✅ Get task description
19
+ ✅ Extract ticket ID
20
+ ✅ Create quick plan (max 5 components)
21
+ ✅ Get user approval on plan
22
+ ✅ Initialize state tracking
23
+ ✅ Execute implementation
24
+ ✅ Run verification
25
+ ✅ Report completion
26
+
27
+ Your job is NOT:
28
+ ❌ Handle complex features (6+ files)
29
+ ❌ Work across multiple domains
30
+ ❌ Skip clarifying questions if unclear
31
+ ❌ Skip state file updates
32
+ ❌ Create feature spec files (use full workflow)
33
+ ❌ Commit changes (user handles this)
34
+
35
+ **This is a FAST PATH for well-understood, small tasks. For anything complex, use the full workflow.**
36
+
37
+ ## ❌ Boundaries: What This Command Does NOT Do
38
+
39
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
40
+
41
+ - ❌ **Use for complex features** - 6+ files or multiple domains → use full workflow
42
+ - ❌ **Skip clarifying questions** - If implementation is unclear, ask first
43
+ - ❌ **Skip state updates** - State file updates are MANDATORY
44
+ - ❌ **Create feature specs** - This is for quick tasks, not full features
45
+ - ❌ **Auto-commit** - User handles commits
46
+ - ❌ **Skip plan approval** - Always show plan and get user approval first
47
+
48
+ **If the task involves more than 5 files or multiple domains, STOP and recommend the full workflow instead.**
49
+
13
50
  ## Process
14
51
 
15
52
  ### Step 1: Get Task Description
@@ -224,7 +261,7 @@ Skill tool call:
224
261
  Report to user:
225
262
 
226
263
  ```
227
- Quick implementation complete!
264
+ Quick implementation complete!
228
265
 
229
266
  ${TICKET_ID}: ${DESCRIPTION}
230
267
 
@@ -238,10 +275,12 @@ Tests: {Success | Skipped}
238
275
  State: .5/${feature_name}/state.json
239
276
 
240
277
  Next steps:
241
- - Review and commit changes
242
- - For a new task, run `/clear` before starting
278
+ 1. Review and commit changes
279
+ 2. For a new task, run `/clear` before starting
243
280
  ```
244
281
 
282
+ **🛑 YOUR JOB IS COMPLETE. DO NOT START NEW TASKS.**
283
+
245
284
  ## Skill Mappings
246
285
 
247
286
  Skills are project-specific and should be configured in your project's `.claude/skills/` directory. Common patterns include:
@@ -256,12 +295,3 @@ Skills are project-specific and should be configured in your project's `.claude/
256
295
  | Tests | Project-specific test skill |
257
296
  | Simple edits | Edit tool directly |
258
297
 
259
- ## DO NOT
260
-
261
- - DO NOT use for complex features (6+ files, multiple domains)
262
- - DO NOT skip clarifying questions if implementation is unclear
263
- - **DO NOT skip state file updates** (breaks resumability)
264
- - **DO NOT skip state file initialization** (Step 7 is mandatory)
265
- - **DO NOT skip state file completion update** (Step 10 is mandatory)
266
- - DO NOT create feature spec files (use full workflow for that)
267
- - DO NOT commit changes (user handles this)
@@ -30,6 +30,45 @@ This skill automates code review using the CodeRabbit CLI. It supports two workf
30
30
  - This command stays in the main context (user interaction, fix application)
31
31
  - review-processor agent runs CodeRabbit and categorizes findings (forked context)
32
32
 
33
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
34
+
35
+ **THIS COMMAND REVIEWS CODE AND APPLIES USER-APPROVED FIXES ONLY.**
36
+
37
+ Your job in this phase:
38
+ ✅ Check CodeRabbit prerequisites
39
+ ✅ Ask user what to review
40
+ ✅ Spawn review-processor agent
41
+ ✅ Present findings overview to user
42
+ ✅ Ask user which fixes to apply
43
+ ✅ Apply ONLY user-approved fixes
44
+ ✅ Verify changes (compile and test)
45
+ ✅ Save review report
46
+
47
+ Your job is NOT:
48
+ ❌ Run CodeRabbit directly (agent does this)
49
+ ❌ Parse CodeRabbit output directly (agent does this)
50
+ ❌ Apply fixes without user approval
51
+ ❌ Auto-apply complex refactoring
52
+ ❌ Skip the overview step
53
+ ❌ Skip verification after applying fixes
54
+ ❌ Proceed if CodeRabbit not installed
55
+
56
+ **ALWAYS GET USER CONSENT BEFORE APPLYING ANY FIXES. This is a review tool, not an auto-fix tool.**
57
+
58
+ ## ❌ Boundaries: What This Command Does NOT Do
59
+
60
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
61
+
62
+ - ❌ **Run CodeRabbit directly** - review-processor agent handles this
63
+ - ❌ **Parse CodeRabbit output directly** - review-processor agent handles this
64
+ - ❌ **Apply fixes without approval** - ALWAYS ask user first
65
+ - ❌ **Auto-apply refactoring** - Even if CodeRabbit suggests it
66
+ - ❌ **Skip the overview** - User must see all findings first
67
+ - ❌ **Skip verification** - Always compile and test after fixes
68
+ - ❌ **Assume user wants all fixes** - Each fix needs approval
69
+
70
+ **If you find yourself applying fixes without user approval, STOP IMMEDIATELY. User consent is mandatory.**
71
+
33
72
  ## Prerequisites
34
73
 
35
74
  **Required:**
@@ -451,31 +490,45 @@ For interactive mode only, save the review summary to:
451
490
  ## Instructions Summary
452
491
 
453
492
  ### Interactive Mode (Default)
493
+
494
+ Follow these steps **IN ORDER**:
495
+
454
496
  1. **Check prerequisites** - CodeRabbit installed and logged in
455
497
  2. **Ask what to review** - Staged, unstaged, branch, or specific files
456
498
  3. **Ask review mode** - Interactive or save to file
457
499
  4. **Spawn review-processor** - Delegate CodeRabbit execution and parsing
458
500
  5. **Process results** - Receive categorized findings
459
- 6. **Provide overview** - Show concise summary to user
501
+ 6. **Provide overview** - Show concise summary to user (MANDATORY - don't skip)
460
502
  7. **Ask user** - Which fixes to apply, how to handle questions
461
503
  8. **Apply fixes** - Only user-approved fixes, using Edit tool
462
504
  9. **Handle questions** - Ask user for each if requested
463
505
  10. **Verify changes** - Compile and test after applying fixes
464
506
  11. **Save report** - Store in `.5/{feature-name}/`
465
507
 
508
+ **🛑 AFTER SAVING REPORT, YOUR JOB IS COMPLETE.**
509
+
466
510
  ### File-Based Annotation Mode
511
+
512
+ Follow these steps **IN ORDER**:
513
+
467
514
  1. **Check prerequisites** - CodeRabbit installed and logged in
468
515
  2. **Ask what to review** - Staged, unstaged, branch, or specific files
469
516
  3. **User selects "Save to file"**
470
517
  4. **Spawn review-processor** - Delegate CodeRabbit execution and parsing
471
518
  5. **Process results** - Receive categorized findings
472
519
  6. **Save findings file** - Store structured findings in `.5/{feature-name}/review-{timestamp}-findings.md`
473
- 7. **User edits file** - Mark findings as [FIX], [SKIP], or [MANUAL] with instructions
474
- 8. **User runs `/review-code apply`** - Apply annotated fixes
475
- 9. **Parse annotations** - Read user's action markers and custom instructions
476
- 10. **Apply marked fixes** - Apply [FIX] and [MANUAL] fixes automatically
477
- 11. **Verify changes** - Compile and test after applying fixes
478
- 12. **Update findings file** - Append application results
520
+ 7. **Tell user** - Edit the file and run `/5:review-code apply`
521
+
522
+ **🛑 STOP HERE if in save-to-file mode. Wait for user to edit and run apply.**
523
+
524
+ **When user runs `/5:review-code apply`:**
525
+
526
+ 8. **Parse annotations** - Read user's action markers and custom instructions
527
+ 9. **Apply marked fixes** - Apply [FIX] and [MANUAL] fixes automatically (user already approved via file annotations)
528
+ 10. **Verify changes** - Compile and test after applying fixes
529
+ 11. **Update findings file** - Append application results
530
+
531
+ **🛑 AFTER UPDATING FINDINGS FILE, YOUR JOB IS COMPLETE.**
479
532
 
480
533
  ## Key Principles
481
534
 
@@ -486,16 +539,6 @@ For interactive mode only, save the review summary to:
486
539
  5. **Verification** - Always compile and test after applying fixes
487
540
  6. **Non-intrusive** - If not installed or logged in, gracefully exit
488
541
 
489
- ## DO NOT
490
-
491
- - DO NOT run CodeRabbit directly (agent handles this)
492
- - DO NOT parse CodeRabbit output directly (agent handles this)
493
- - DO NOT apply fixes without user approval
494
- - DO NOT auto-apply complex refactoring suggestions
495
- - DO NOT skip the overview step
496
- - DO NOT skip verification (compilation/tests)
497
- - DO NOT proceed if CodeRabbit is not installed
498
- - DO NOT assume user wants all fixes applied
499
542
 
500
543
  ## Error Handling
501
544
 
@@ -20,6 +20,43 @@ This skill provides comprehensive verification of a completed feature implementa
20
20
  - Delegates verification work to the verification-agent (also forked context)
21
21
  - Handles reporting, state updates, and user interaction within the forked context
22
22
 
23
+ ## ⚠️ CRITICAL SCOPE CONSTRAINT
24
+
25
+ **THIS COMMAND VERIFIES IMPLEMENTATION. IT DELEGATES CHECKS TO AGENT.**
26
+
27
+ Your job in this phase:
28
+ ✅ Load implementation plan
29
+ ✅ Spawn verification-agent
30
+ ✅ Process verification results
31
+ ✅ Save verification report
32
+ ✅ Update state file
33
+ ✅ Prompt for commit (if passed)
34
+ ✅ Tell user to run /5:review-code
35
+
36
+ Your job is NOT:
37
+ ❌ Run compilation directly (agent does this)
38
+ ❌ Run tests directly (agent does this)
39
+ ❌ Detect problems directly (agent does this)
40
+ ❌ Block on warnings (only errors block)
41
+ ❌ Create commits without user approval
42
+ ❌ Skip asking about commit
43
+
44
+ **After prompting for commit and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
45
+
46
+ ## ❌ Boundaries: What This Command Does NOT Do
47
+
48
+ **CRITICAL:** This command has a LIMITED scope. Do NOT:
49
+
50
+ - ❌ **Run compilation directly** - verification-agent handles this
51
+ - ❌ **Run tests directly** - verification-agent handles this
52
+ - ❌ **Detect problems directly** - verification-agent handles this
53
+ - ❌ **Block on warnings** - Only errors block completion
54
+ - ❌ **Auto-commit** - Always ask user first
55
+ - ❌ **Skip state file update** - State update is mandatory
56
+ - ❌ **Start code review** - That's Phase 5 (/5:review-code)
57
+
58
+ **If you find yourself running builds or tests directly, STOP. You should be spawning the verification-agent instead.**
59
+
23
60
  ## Verification Process
24
61
 
25
62
  ### Step 1: Load Implementation Plan
@@ -259,16 +296,20 @@ EOF
259
296
 
260
297
  ## Instructions Summary
261
298
 
299
+ Follow these steps **IN ORDER** and **STOP after step 7**:
300
+
262
301
  1. **Load implementation plan** from `.5/{feature-name}/plan/`:
263
302
  - Read meta.md for plan metadata
264
303
  - Read verification.md for build/test config and targets
265
304
  - Aggregate expected files from all step-N.md files
266
305
  2. **Spawn verification-agent** with aggregated expected files, modules, and test modules
267
306
  3. **Process agent results** - extract status, report, and structured data
268
- 4. **Save verification report** to state directory
307
+ 4. **Save verification report** to `.5/{feature-name}/verification.md`
269
308
  5. **Update state file** with verification results
270
309
  6. **Inform developer** with clear status
271
- 7. **Prompt for commit** (if PASSED or PASSED WITH WARNINGS) - Recommended before CodeRabbit review
310
+ 7. **Prompt for commit** (if PASSED or PASSED WITH WARNINGS) and tell user: "Run `/clear` followed by `/5:review-code` for CodeRabbit review"
311
+
312
+ **🛑 STOP HERE. YOUR JOB IS COMPLETE. DO NOT START CODE REVIEW.**
272
313
 
273
314
  ## Key Principles
274
315
 
@@ -280,17 +321,6 @@ EOF
280
321
  6. **Resumable** - Can be re-run after fixes
281
322
  7. **Commit ready** - Prompt for commit after successful verification
282
323
 
283
- ## DO NOT
284
-
285
- - DO NOT run compilation or tests directly (agent handles this)
286
- - DO NOT run problem detection directly (agent handles this)
287
- - DO NOT block on warnings (only errors block)
288
- - DO NOT skip state file update
289
- - DO NOT skip saving verification report
290
- - DO NOT skip asking about commit if verification passed
291
- - DO NOT automatically create commits without user approval
292
- - DO NOT use emojis in commit messages
293
- - DO NOT include AI attribution or Co-Authored-By lines in commit messages
294
324
 
295
325
  ## Error Handling
296
326