5-phase-workflow 1.0.0
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/README.md +332 -0
- package/bin/install.js +408 -0
- package/docs/workflow-guide.md +1024 -0
- package/package.json +34 -0
- package/src/agents/integration-agent.md +219 -0
- package/src/agents/review-processor.md +160 -0
- package/src/agents/step-executor.md +108 -0
- package/src/agents/step-fixer.md +132 -0
- package/src/agents/step-verifier.md +125 -0
- package/src/agents/verification-agent.md +411 -0
- package/src/commands/5/configure.md +309 -0
- package/src/commands/5/discuss-feature.md +393 -0
- package/src/commands/5/implement-feature.md +502 -0
- package/src/commands/5/plan-feature.md +285 -0
- package/src/commands/5/plan-implementation.md +376 -0
- package/src/commands/5/quick-implement.md +263 -0
- package/src/commands/5/review-code.md +583 -0
- package/src/commands/5/verify-implementation.md +277 -0
- package/src/hooks/statusline.js +53 -0
- package/src/settings.json +6 -0
- package/src/skills/build-project/SKILL.md +277 -0
- package/src/skills/configure-project/SKILL.md +355 -0
- package/src/skills/generate-readme/EXAMPLES.md +168 -0
- package/src/skills/generate-readme/SKILL.md +123 -0
- package/src/skills/generate-readme/TEMPLATE.md +141 -0
- package/src/skills/run-tests/SKILL.md +365 -0
- package/src/templates/ARCHITECTURE.md +64 -0
- package/src/templates/CONCERNS.md +75 -0
- package/src/templates/CONVENTIONS.md +75 -0
- package/src/templates/INTEGRATIONS.md +65 -0
- package/src/templates/STACK.md +60 -0
- package/src/templates/STRUCTURE.md +60 -0
- package/src/templates/TESTING.md +107 -0
|
@@ -0,0 +1,1024 @@
|
|
|
1
|
+
# Claude-Assisted Development Workflow Guide
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
1. [Overview](#overview)
|
|
6
|
+
2. [Architecture](#architecture)
|
|
7
|
+
3. [The 5-Phase Workflow](#the-5-phase-workflow)
|
|
8
|
+
4. [Phase 1: Feature Planning](#phase-1-feature-planning)
|
|
9
|
+
5. [Phase 2: Implementation Planning](#phase-2-implementation-planning)
|
|
10
|
+
6. [Phase 3: Orchestrated Implementation](#phase-3-orchestrated-implementation)
|
|
11
|
+
7. [Phase 4: Verify Implementation](#phase-4-verify-implementation)
|
|
12
|
+
8. [Phase 5: Code Review](#phase-5-code-review)
|
|
13
|
+
9. [Complete Example Walkthrough](#complete-example-walkthrough)
|
|
14
|
+
10. [Tips for Effective Collaboration](#tips-for-effective-collaboration)
|
|
15
|
+
11. [Troubleshooting](#troubleshooting)
|
|
16
|
+
12. [Advanced Topics](#advanced-topics)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
This guide describes how to use Claude Code's skill system to efficiently implement features in any software project. The workflow minimizes context usage while ensuring systematic, high-quality implementations.
|
|
23
|
+
|
|
24
|
+
### Why This Workflow?
|
|
25
|
+
|
|
26
|
+
**Benefits:**
|
|
27
|
+
- Lower context usage (orchestrator stays thin, agents do heavy lifting in forked contexts)
|
|
28
|
+
- Better collaboration (intensive Q&A ensures requirements are clear)
|
|
29
|
+
- Session continuity (can pause and resume without losing context)
|
|
30
|
+
- Systematic delivery (clear phases, clear handoffs, clear verification)
|
|
31
|
+
- Developer confidence (transparent process, visible progress, predictable results)
|
|
32
|
+
|
|
33
|
+
**When to Use:**
|
|
34
|
+
- New domain entities
|
|
35
|
+
- Extending existing domains
|
|
36
|
+
- Adding business rules/validation
|
|
37
|
+
- Creating API endpoints
|
|
38
|
+
- Any non-trivial feature requiring multiple files
|
|
39
|
+
|
|
40
|
+
**When NOT to Use:**
|
|
41
|
+
- Simple bug fixes
|
|
42
|
+
- Typo corrections
|
|
43
|
+
- Single-line changes
|
|
44
|
+
- Purely exploratory work
|
|
45
|
+
|
|
46
|
+
**Middle Ground - Use `/quick-implement`:**
|
|
47
|
+
For small, well-understood tasks (1-5 files). Uses same state tracking and skills as full workflow, but with inline planning and `/build-project` verification instead of full agents.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Architecture
|
|
52
|
+
|
|
53
|
+
The workflow uses a **4-layer architecture**:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Developer
|
|
57
|
+
|
|
|
58
|
+
v
|
|
59
|
+
Commands (thin orchestrators, main context)
|
|
60
|
+
| - /plan-feature, /plan-implementation
|
|
61
|
+
| - /implement-feature, /verify-implementation, /review-code
|
|
62
|
+
v
|
|
63
|
+
Agents (heavy lifting, forked contexts)
|
|
64
|
+
| - step-executor, step-verifier
|
|
65
|
+
| - integration-agent, verification-agent, review-processor
|
|
66
|
+
v
|
|
67
|
+
Skills (atomic operations, called by agents)
|
|
68
|
+
| - /build-project, /run-tests, /generate-readme
|
|
69
|
+
| - Project-specific skills as configured
|
|
70
|
+
v
|
|
71
|
+
Tools (file operations, compilation, IDE integration)
|
|
72
|
+
- Read, Write, Edit, Bash, Glob, Grep, JetBrains MCP
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Layer Responsibilities
|
|
76
|
+
|
|
77
|
+
| Layer | Context | Responsibility |
|
|
78
|
+
|-------|---------|---------------|
|
|
79
|
+
| **Commands** | Main (inherit) | User interaction, orchestration, state tracking |
|
|
80
|
+
| **Agents** | Forked | Heavy work: skill execution, compilation, review parsing |
|
|
81
|
+
| **Skills** | Called by agents | Atomic operations: create files, run builds, run tests |
|
|
82
|
+
| **Tools** | N/A | Low-level operations: file I/O, bash, IDE integration |
|
|
83
|
+
|
|
84
|
+
### Why Agents?
|
|
85
|
+
|
|
86
|
+
Commands used to call skills directly, consuming main context for heavy operations. With the agent layer:
|
|
87
|
+
|
|
88
|
+
- **Commands stay thin**: Only read plans, spawn agents, process results, update state
|
|
89
|
+
- **Agents handle heavy work**: File creation, compilation, review parsing in forked contexts
|
|
90
|
+
- **Skills remain unchanged**: Same atomic operations, called by agents instead of commands
|
|
91
|
+
- **Main context preserved**: More room for user interaction and error handling
|
|
92
|
+
|
|
93
|
+
### Agent Inventory
|
|
94
|
+
|
|
95
|
+
| Agent | Spawned By | Purpose |
|
|
96
|
+
|-------|-----------|---------|
|
|
97
|
+
| `step-executor` | implement-feature | Execute all components of a single step |
|
|
98
|
+
| `step-verifier` | implement-feature | Build and check files after each step |
|
|
99
|
+
| `integration-agent` | implement-feature | Wire components, register routes (final step) |
|
|
100
|
+
| `verification-agent` | verify-implementation | Full verification (files, compilation, tests) |
|
|
101
|
+
| `review-processor` | review-code | Run CodeRabbit CLI and categorize findings |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## The 5-Phase Workflow
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
+-----------------------------------------------------------------+
|
|
109
|
+
| Phase 1: Feature Planning |
|
|
110
|
+
| |
|
|
111
|
+
| Developer: /plan-feature |
|
|
112
|
+
| Claude: Asks 6-10 questions, challenges assumptions |
|
|
113
|
+
| Output: .5/{TICKET-ID}-{description}/feature.md |
|
|
114
|
+
| Developer: Reviews and approves spec |
|
|
115
|
+
+-----------------------------+-------------------------------------+
|
|
116
|
+
|
|
|
117
|
+
v
|
|
118
|
+
+-----------------------------------------------------------------+
|
|
119
|
+
| Phase 2: Implementation Planning |
|
|
120
|
+
| |
|
|
121
|
+
| Developer: /plan-implementation {TICKET-ID}-{description} |
|
|
122
|
+
| Claude: Maps to modules, skills, dependency steps |
|
|
123
|
+
| Output: .5/{ticket}/plan.md |
|
|
124
|
+
| Developer: Reviews technical approach |
|
|
125
|
+
+-----------------------------+-------------------------------------+
|
|
126
|
+
|
|
|
127
|
+
v
|
|
128
|
+
+-----------------------------------------------------------------+
|
|
129
|
+
| Phase 3: Orchestrated Implementation |
|
|
130
|
+
| |
|
|
131
|
+
| Developer: /implement-feature {TICKET-ID}-{description} |
|
|
132
|
+
| Claude: Spawns agents for each step, tracks state |
|
|
133
|
+
| Agents: step-executor -> step-verifier (per step) |
|
|
134
|
+
| Agent: integration-agent (final step) |
|
|
135
|
+
| Output: Completed feature + state file |
|
|
136
|
+
+-----------------------------+-------------------------------------+
|
|
137
|
+
|
|
|
138
|
+
v
|
|
139
|
+
+-----------------------------------------------------------------+
|
|
140
|
+
| Phase 4: Verify Implementation |
|
|
141
|
+
| |
|
|
142
|
+
| Developer: /verify-implementation (or automatic) |
|
|
143
|
+
| Agent: verification-agent checks files, compiles, runs tests |
|
|
144
|
+
| Claude: Reports results, prompts for commit |
|
|
145
|
+
| Output: Verification report |
|
|
146
|
+
+-----------------------------+-------------------------------------+
|
|
147
|
+
|
|
|
148
|
+
v
|
|
149
|
+
+-----------------------------------------------------------------+
|
|
150
|
+
| Phase 5: Code Review |
|
|
151
|
+
| |
|
|
152
|
+
| Developer: /review-code |
|
|
153
|
+
| Agent: review-processor runs CodeRabbit, categorizes findings |
|
|
154
|
+
| Claude: Shows overview, applies user-approved fixes |
|
|
155
|
+
| Output: Improved code + review report |
|
|
156
|
+
+-----------------------------------------------------------------+
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Phase 1: Feature Planning
|
|
162
|
+
|
|
163
|
+
### Goal
|
|
164
|
+
Understand requirements, challenge assumptions, and create a comprehensive feature specification.
|
|
165
|
+
|
|
166
|
+
### Command
|
|
167
|
+
```bash
|
|
168
|
+
/plan-feature
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### What Happens
|
|
172
|
+
|
|
173
|
+
1. **Intensive Q&A**: Claude asks 6-10 clarifying questions
|
|
174
|
+
- Requirements clarity
|
|
175
|
+
- Scope boundaries
|
|
176
|
+
- Edge cases
|
|
177
|
+
- Performance expectations
|
|
178
|
+
- Testing strategy
|
|
179
|
+
- Integration points
|
|
180
|
+
- Alternative approaches
|
|
181
|
+
- Complexity trade-offs
|
|
182
|
+
|
|
183
|
+
2. **Assumption Challenges**: Claude questions your approach
|
|
184
|
+
- "Is this the simplest solution?"
|
|
185
|
+
- "Have you considered X alternative?"
|
|
186
|
+
- "What happens when Y fails?"
|
|
187
|
+
- "Could we reuse existing Z component?"
|
|
188
|
+
|
|
189
|
+
3. **Codebase Exploration**: Claude examines existing patterns
|
|
190
|
+
- Checks affected domains
|
|
191
|
+
- Reviews similar implementations
|
|
192
|
+
- Identifies reusable components
|
|
193
|
+
|
|
194
|
+
4. **Ticket ID Collection**: Claude asks for ticket ID if not provided
|
|
195
|
+
|
|
196
|
+
5. **Feature Spec Creation**: Claude writes structured spec to:
|
|
197
|
+
```
|
|
198
|
+
.5/{TICKET-ID}-{description}/feature.md
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Your Role
|
|
202
|
+
|
|
203
|
+
1. **Answer questions thoroughly**: Don't rush, clarify requirements
|
|
204
|
+
2. **Challenge back if needed**: If Claude misunderstands, correct it
|
|
205
|
+
3. **Provide ticket ID**: From Jira or your task tracking system
|
|
206
|
+
4. **Review the spec carefully**: This becomes the contract for implementation
|
|
207
|
+
5. **Approve or request changes**: Don't proceed if spec is unclear
|
|
208
|
+
|
|
209
|
+
### Next Steps
|
|
210
|
+
|
|
211
|
+
After approval:
|
|
212
|
+
```bash
|
|
213
|
+
/plan-implementation {TICKET-ID}-{description}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Phase 2: Implementation Planning
|
|
219
|
+
|
|
220
|
+
### Goal
|
|
221
|
+
Map feature requirements to technical components, skills, and dependency steps.
|
|
222
|
+
|
|
223
|
+
### Command
|
|
224
|
+
```bash
|
|
225
|
+
/plan-implementation PROJ-1234-add-user-profile
|
|
226
|
+
```
|
|
227
|
+
(Replace with your ticket ID and description)
|
|
228
|
+
|
|
229
|
+
### What Happens
|
|
230
|
+
|
|
231
|
+
1. **Load Feature Spec**: Claude reads the approved feature spec
|
|
232
|
+
|
|
233
|
+
2. **Technical Analysis**: Analyzes project structure to identify affected areas
|
|
234
|
+
- Examines existing codebase architecture
|
|
235
|
+
- Identifies modules, layers, or packages that need changes
|
|
236
|
+
- Maps to your project's specific patterns (MVC, Clean Architecture, etc.)
|
|
237
|
+
- Determines which files need to be created or modified
|
|
238
|
+
|
|
239
|
+
3. **Technical Q&A**: Claude asks 3-5 framework-specific questions
|
|
240
|
+
- Which persistence layer changes are needed?
|
|
241
|
+
- What validation approach should be used?
|
|
242
|
+
- Which API endpoints need to be created/modified?
|
|
243
|
+
- Are there business logic components needed?
|
|
244
|
+
- What integration points exist?
|
|
245
|
+
|
|
246
|
+
4. **Component Mapping**: Each component mapped to a skill or creation task
|
|
247
|
+
- Based on available project-specific skills
|
|
248
|
+
- Or described as file creation tasks if no skill exists
|
|
249
|
+
- Example: User model -> /model-generator (if available) or manual creation
|
|
250
|
+
|
|
251
|
+
5. **Dependency Steps**: Groups components into implementation steps (configurable, default 3)
|
|
252
|
+
- **Step 1 (Foundation)**: Core models, types, schemas (parallel execution)
|
|
253
|
+
- **Step 2 (Logic)**: Business logic, services, handlers (sequential if needed)
|
|
254
|
+
- **Step 3 (Integration)**: API routes, wiring, tests (sequential for integration)
|
|
255
|
+
|
|
256
|
+
Note: Step count and organization is configurable in `.claude/.5/config.json`
|
|
257
|
+
|
|
258
|
+
6. **Implementation Plan Creation**: Claude writes plan to:
|
|
259
|
+
```
|
|
260
|
+
.5/{TICKET-ID}-{description}/plan.md
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Your Role
|
|
264
|
+
|
|
265
|
+
1. **Answer technical questions**: Clarify implementation details
|
|
266
|
+
2. **Review module impact**: Ensure correct modules affected
|
|
267
|
+
3. **Check component checklist**: All components needed?
|
|
268
|
+
4. **Validate dependency steps**: Does order make sense?
|
|
269
|
+
5. **Review technical decisions**: Agree with approach?
|
|
270
|
+
6. **Approve or request changes**: Don't proceed if plan is unclear
|
|
271
|
+
|
|
272
|
+
### Next Steps
|
|
273
|
+
|
|
274
|
+
After approval:
|
|
275
|
+
```bash
|
|
276
|
+
/implement-feature {TICKET-ID}-{description}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Phase 3: Orchestrated Implementation
|
|
282
|
+
|
|
283
|
+
### Goal
|
|
284
|
+
Execute the implementation plan with state tracking, using agents in forked contexts to minimize main context usage.
|
|
285
|
+
|
|
286
|
+
### Command
|
|
287
|
+
```bash
|
|
288
|
+
/implement-feature PROJ-1234-add-user-profile
|
|
289
|
+
```
|
|
290
|
+
(Replace with your ticket ID and description)
|
|
291
|
+
|
|
292
|
+
### What Happens
|
|
293
|
+
|
|
294
|
+
1. **Load Implementation Plan**: Command reads the approved plan
|
|
295
|
+
|
|
296
|
+
2. **Initialize State File**: Creates tracking file
|
|
297
|
+
```
|
|
298
|
+
.5/{TICKET-ID}-{description}/state.json
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
3. **Create Task List**: One item per step (default 3 steps, configurable)
|
|
302
|
+
|
|
303
|
+
4. **Execute Steps** (for each implementation step):
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
[Main Context] Construct step input from plan
|
|
307
|
+
|
|
|
308
|
+
v
|
|
309
|
+
[FORK] step-executor agent
|
|
310
|
+
| - Calls skills for each component
|
|
311
|
+
| - Creates/modifies files as needed
|
|
312
|
+
| - Returns created files and status
|
|
313
|
+
v
|
|
314
|
+
[Main Context] Process results, update state
|
|
315
|
+
|
|
|
316
|
+
v
|
|
317
|
+
[FORK] step-verifier agent
|
|
318
|
+
| - Runs project build command
|
|
319
|
+
| - Checks files for problems
|
|
320
|
+
| - Returns verification status
|
|
321
|
+
v
|
|
322
|
+
[Main Context] Process results, handle failures, next step
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
5. **Integration (Final Step)**:
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
[FORK] integration-agent
|
|
329
|
+
| - Wires components using project patterns
|
|
330
|
+
| - Registers routes/endpoints
|
|
331
|
+
| - Runs final build and tests
|
|
332
|
+
v
|
|
333
|
+
[Main Context] Process results, update state
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
6. **Report Completion**: Summary of all work done
|
|
337
|
+
|
|
338
|
+
### State File
|
|
339
|
+
|
|
340
|
+
Tracks progress in JSON format:
|
|
341
|
+
```json
|
|
342
|
+
{
|
|
343
|
+
"ticketId": "PROJ-1234",
|
|
344
|
+
"featureName": "PROJ-1234-add-user-profile",
|
|
345
|
+
"status": "in-progress",
|
|
346
|
+
"currentStep": 2,
|
|
347
|
+
"totalSteps": 3,
|
|
348
|
+
"completedComponents": [...],
|
|
349
|
+
"pendingComponents": [...],
|
|
350
|
+
"contextUsage": "45%"
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Your Role
|
|
355
|
+
|
|
356
|
+
1. **Monitor progress**: Watch task list updates
|
|
357
|
+
2. **Review errors if any**: Claude will escalate if stuck
|
|
358
|
+
3. **Approve integration changes**: Review wiring/routing changes
|
|
359
|
+
4. **Trust the delegation**: Let Claude delegate to agents and skills
|
|
360
|
+
|
|
361
|
+
### Output Files
|
|
362
|
+
|
|
363
|
+
- **State file**: `.5/{ticket}/state.json`
|
|
364
|
+
- **All created files**: As specified in implementation plan
|
|
365
|
+
|
|
366
|
+
### Next Steps
|
|
367
|
+
|
|
368
|
+
After implementation completes:
|
|
369
|
+
```bash
|
|
370
|
+
/verify-implementation
|
|
371
|
+
```
|
|
372
|
+
(This may be invoked automatically by `/implement-feature`)
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## Phase 4: Verify Implementation
|
|
377
|
+
|
|
378
|
+
### Goal
|
|
379
|
+
Systematically verify that the implementation is complete, correct, and ready for review.
|
|
380
|
+
|
|
381
|
+
### Command
|
|
382
|
+
```bash
|
|
383
|
+
/verify-implementation
|
|
384
|
+
```
|
|
385
|
+
(Usually invoked automatically by `/implement-feature` at the end of Phase 3)
|
|
386
|
+
|
|
387
|
+
### What Happens
|
|
388
|
+
|
|
389
|
+
1. **Load Implementation State**: Command reads state file from Phase 3
|
|
390
|
+
|
|
391
|
+
2. **Spawn verification-agent**: Delegates all checks to forked context
|
|
392
|
+
|
|
393
|
+
3. **Agent Performs Checks**:
|
|
394
|
+
- File existence (all planned files exist?)
|
|
395
|
+
- IDE diagnostics (errors vs warnings)
|
|
396
|
+
- Production code compilation
|
|
397
|
+
- Test code compilation
|
|
398
|
+
- Test execution
|
|
399
|
+
|
|
400
|
+
4. **Process Results**: Command receives structured verification data
|
|
401
|
+
|
|
402
|
+
5. **Save Report**: Writes verification report to:
|
|
403
|
+
`.5/{ticket}/verification.md`
|
|
404
|
+
|
|
405
|
+
6. **Update State File**: Marks verification status
|
|
406
|
+
|
|
407
|
+
7. **Prompt for Commit**: If passed, asks user about committing
|
|
408
|
+
|
|
409
|
+
### Verification Statuses
|
|
410
|
+
|
|
411
|
+
**PASSED**
|
|
412
|
+
- All files exist
|
|
413
|
+
- No errors (warnings OK)
|
|
414
|
+
- Compilation successful
|
|
415
|
+
- All tests passing
|
|
416
|
+
|
|
417
|
+
**PASSED WITH WARNINGS**
|
|
418
|
+
- All files exist
|
|
419
|
+
- Warnings present (but no errors)
|
|
420
|
+
- Compilation successful
|
|
421
|
+
- All tests passing
|
|
422
|
+
|
|
423
|
+
**FAILED**
|
|
424
|
+
- Missing files, OR
|
|
425
|
+
- Errors present, OR
|
|
426
|
+
- Compilation failures, OR
|
|
427
|
+
- Test failures
|
|
428
|
+
|
|
429
|
+
### Your Role
|
|
430
|
+
|
|
431
|
+
1. **Review verification report**: Check the generated markdown report
|
|
432
|
+
2. **Address failures if any**: Fix errors before proceeding
|
|
433
|
+
3. **Decide on warnings**: Warnings don't block, but review them
|
|
434
|
+
4. **Proceed to code review**: If passed, move to Phase 5
|
|
435
|
+
|
|
436
|
+
### Next Steps
|
|
437
|
+
|
|
438
|
+
If verification passed:
|
|
439
|
+
```bash
|
|
440
|
+
/review-code
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
If verification failed:
|
|
444
|
+
- Address the reported issues
|
|
445
|
+
- Re-run `/verify-implementation` after fixes
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Phase 5: Code Review
|
|
450
|
+
|
|
451
|
+
### Goal
|
|
452
|
+
Use automated code review to catch quality issues, apply auto-fixes, and ensure code meets standards.
|
|
453
|
+
|
|
454
|
+
### Command
|
|
455
|
+
```bash
|
|
456
|
+
/review-code
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### What Happens
|
|
460
|
+
|
|
461
|
+
1. **Check Prerequisites**: Verifies CodeRabbit CLI is installed and authenticated
|
|
462
|
+
|
|
463
|
+
2. **Ask Review Scope**: User chooses what to review (staged, branch, files)
|
|
464
|
+
|
|
465
|
+
3. **Spawn review-processor agent**: Delegates CodeRabbit execution to forked context
|
|
466
|
+
- Agent runs `coderabbit review --plain`
|
|
467
|
+
- Agent parses output and categorizes findings
|
|
468
|
+
- Agent returns structured results (fixable, questions, manual)
|
|
469
|
+
|
|
470
|
+
4. **Show Overview**: Command presents categorized findings to user
|
|
471
|
+
|
|
472
|
+
5. **User Decisions**: Ask user which fixes to apply, how to handle questions
|
|
473
|
+
|
|
474
|
+
6. **Apply Fixes**: Only user-approved fixes applied via Edit tool
|
|
475
|
+
|
|
476
|
+
7. **Handle Questions**: Present each question to user if requested
|
|
477
|
+
|
|
478
|
+
8. **Verify**: Compile and test after applying fixes
|
|
479
|
+
|
|
480
|
+
9. **Save Report**: Store review summary in `.5/{feature-name}/`
|
|
481
|
+
|
|
482
|
+
### Your Role
|
|
483
|
+
|
|
484
|
+
1. **Choose review scope**: What changes to review
|
|
485
|
+
2. **Review findings overview**: Understand what CodeRabbit found
|
|
486
|
+
3. **Decide on fixes**: Which to apply, which to skip
|
|
487
|
+
4. **Answer questions**: Respond to clarifications
|
|
488
|
+
5. **Address manual issues**: Fix issues that require judgment
|
|
489
|
+
6. **Approve changes**: If satisfied, proceed to commit
|
|
490
|
+
|
|
491
|
+
### Next Steps
|
|
492
|
+
|
|
493
|
+
After code review:
|
|
494
|
+
1. Review all changes (implementation + review fixes)
|
|
495
|
+
2. Run tests locally if desired
|
|
496
|
+
3. Commit and push
|
|
497
|
+
4. Create pull request
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
## Complete Example Walkthrough
|
|
502
|
+
|
|
503
|
+
Let's walk through implementing "Add user profile endpoint to API"
|
|
504
|
+
|
|
505
|
+
### Step 1: Start Feature Planning
|
|
506
|
+
|
|
507
|
+
```bash
|
|
508
|
+
You: /plan-feature
|
|
509
|
+
|
|
510
|
+
Claude: I'll help you plan this feature. Let me ask some clarifying questions...
|
|
511
|
+
|
|
512
|
+
[Claude asks 8 questions about requirements, scope, validation, API design, etc.]
|
|
513
|
+
|
|
514
|
+
You: [Answer each question]
|
|
515
|
+
|
|
516
|
+
Claude: Let me explore the existing user domain...
|
|
517
|
+
[Claude examines existing user models, routes, controllers]
|
|
518
|
+
|
|
519
|
+
Claude: What's the ticket ID for this feature?
|
|
520
|
+
|
|
521
|
+
You: PROJ-1234
|
|
522
|
+
|
|
523
|
+
Claude: Feature spec created at .5/PROJ-1234-add-user-profile/feature.md
|
|
524
|
+
Please review and then run: /plan-implementation PROJ-1234-add-user-profile
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### Step 2: Review Feature Spec
|
|
528
|
+
|
|
529
|
+
Open `.5/PROJ-1234-add-user-profile/feature.md` and review:
|
|
530
|
+
- Problem statement clear?
|
|
531
|
+
- Requirements complete?
|
|
532
|
+
- Acceptance criteria verifiable?
|
|
533
|
+
- Alternatives make sense?
|
|
534
|
+
|
|
535
|
+
If satisfied, proceed to next phase.
|
|
536
|
+
|
|
537
|
+
### Step 3: Start Implementation Planning
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
You: /plan-implementation PROJ-1234-add-user-profile
|
|
541
|
+
|
|
542
|
+
Claude: Reading feature spec...
|
|
543
|
+
|
|
544
|
+
[Claude analyzes technical requirements]
|
|
545
|
+
|
|
546
|
+
Claude: Let me ask a few technical questions...
|
|
547
|
+
- Should profile validation be separate or part of existing UserValidator?
|
|
548
|
+
- Do we need database schema changes or just new API endpoints?
|
|
549
|
+
- What authentication/authorization is required?
|
|
550
|
+
|
|
551
|
+
You: [Answer technical questions]
|
|
552
|
+
|
|
553
|
+
Claude: Implementation plan created at
|
|
554
|
+
.5/PROJ-1234-add-user-profile/plan.md
|
|
555
|
+
|
|
556
|
+
Module Impact:
|
|
557
|
+
- src/models: 1 update (User model)
|
|
558
|
+
- src/services: 1 new file (ProfileService)
|
|
559
|
+
- src/routes: 1 update (user routes)
|
|
560
|
+
- src/validators: 1 new file (ProfileValidator)
|
|
561
|
+
|
|
562
|
+
Component Checklist:
|
|
563
|
+
Step 1 (Foundation): User model update, ProfileValidator
|
|
564
|
+
Step 2 (Logic): ProfileService with business logic
|
|
565
|
+
Step 3 (Integration): API route registration, tests
|
|
566
|
+
|
|
567
|
+
Please review and then run: /implement-feature PROJ-1234-add-user-profile
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### Step 4: Start Implementation (with Agents)
|
|
571
|
+
|
|
572
|
+
```bash
|
|
573
|
+
You: /implement-feature PROJ-1234-add-user-profile
|
|
574
|
+
|
|
575
|
+
Claude: Reading implementation plan...
|
|
576
|
+
Creating state file...
|
|
577
|
+
Initializing tasks...
|
|
578
|
+
|
|
579
|
+
[FORK] step-executor: Step 1 (Foundation)
|
|
580
|
+
-> User model updated (added profile fields)
|
|
581
|
+
-> ProfileValidator created
|
|
582
|
+
[FORK] step-verifier: Step 1
|
|
583
|
+
-> Build successful
|
|
584
|
+
|
|
585
|
+
[FORK] step-executor: Step 2 (Logic)
|
|
586
|
+
-> ProfileService created
|
|
587
|
+
-> Business logic implemented
|
|
588
|
+
[FORK] step-verifier: Step 2
|
|
589
|
+
-> Build successful
|
|
590
|
+
|
|
591
|
+
[FORK] step-executor: Step 3 (Integration)
|
|
592
|
+
-> Profile routes added
|
|
593
|
+
-> Tests created
|
|
594
|
+
[FORK] step-verifier: Step 3
|
|
595
|
+
-> Build successful
|
|
596
|
+
|
|
597
|
+
[FORK] integration-agent: Final integration
|
|
598
|
+
-> Routes registered in app
|
|
599
|
+
-> All tests passing
|
|
600
|
+
|
|
601
|
+
Feature implementation complete!
|
|
602
|
+
- All 4 components created/updated
|
|
603
|
+
- State file updated
|
|
604
|
+
- Ready for verification!
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
### Step 5: Verify Implementation
|
|
608
|
+
|
|
609
|
+
```bash
|
|
610
|
+
You: /verify-implementation
|
|
611
|
+
|
|
612
|
+
Claude: Loading implementation state...
|
|
613
|
+
|
|
614
|
+
[FORK] verification-agent
|
|
615
|
+
-> File existence: 4/4 exist
|
|
616
|
+
-> Problem detection: 0 errors, 2 warnings
|
|
617
|
+
-> Build: Successful
|
|
618
|
+
-> Tests: 23/23 passing
|
|
619
|
+
|
|
620
|
+
Verification Status: PASSED WITH WARNINGS
|
|
621
|
+
|
|
622
|
+
Would you like to commit these changes now?
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### Step 6: Code Review
|
|
626
|
+
|
|
627
|
+
```bash
|
|
628
|
+
You: /review-code
|
|
629
|
+
|
|
630
|
+
Claude: Checking CodeRabbit CLI... installed
|
|
631
|
+
What would you like to review? [Staged changes]
|
|
632
|
+
|
|
633
|
+
[FORK] review-processor
|
|
634
|
+
-> CodeRabbit found 3 issues
|
|
635
|
+
-> 2 fixable, 1 manual
|
|
636
|
+
|
|
637
|
+
CodeRabbit Review Results:
|
|
638
|
+
- 2 fixable issues
|
|
639
|
+
- 1 manual review item
|
|
640
|
+
|
|
641
|
+
Apply all fixable issues? [Yes]
|
|
642
|
+
|
|
643
|
+
Applied:
|
|
644
|
+
- Removed unused import
|
|
645
|
+
- Added missing error handling
|
|
646
|
+
|
|
647
|
+
Manual issues:
|
|
648
|
+
- Consider adding rate limiting (line 42)
|
|
649
|
+
|
|
650
|
+
Build: Successful
|
|
651
|
+
Tests: All passing
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
---
|
|
655
|
+
|
|
656
|
+
## Tips for Effective Collaboration
|
|
657
|
+
|
|
658
|
+
### During Feature Planning (Phase 1)
|
|
659
|
+
|
|
660
|
+
1. **Be thorough with questions**: Don't rush, clarify everything
|
|
661
|
+
2. **Challenge assumptions**: If Claude suggests something unexpected, ask why
|
|
662
|
+
3. **Provide examples**: If requirements are complex, give examples
|
|
663
|
+
4. **Think about edge cases**: What happens when things go wrong?
|
|
664
|
+
5. **Consider existing patterns**: Mention similar features for consistency
|
|
665
|
+
|
|
666
|
+
### During Implementation Planning (Phase 2)
|
|
667
|
+
|
|
668
|
+
1. **Validate technical approach**: Ensure approach aligns with codebase patterns
|
|
669
|
+
2. **Check module dependencies**: Make sure step order is correct
|
|
670
|
+
3. **Question complexity**: If plan seems overly complex, challenge it
|
|
671
|
+
4. **Clarify verification steps**: Make sure verification will catch issues
|
|
672
|
+
|
|
673
|
+
### During Implementation (Phase 3)
|
|
674
|
+
|
|
675
|
+
1. **Monitor progress**: Watch task list for updates
|
|
676
|
+
2. **Don't interrupt mid-step**: Let steps complete before reviewing
|
|
677
|
+
3. **Review errors promptly**: If Claude escalates, review and respond
|
|
678
|
+
4. **Trust the process**: Agents handle heavy lifting, you focus on high-level review
|
|
679
|
+
|
|
680
|
+
### During Verification (Phase 4)
|
|
681
|
+
|
|
682
|
+
1. **Review the verification report carefully**: Check all sections
|
|
683
|
+
2. **Warnings are OK**: Don't block on warnings, but review them
|
|
684
|
+
3. **Fix errors immediately**: Address any errors before proceeding
|
|
685
|
+
4. **Re-verify after fixes**: Run `/verify-implementation` again if you made changes
|
|
686
|
+
|
|
687
|
+
### During Code Review (Phase 5)
|
|
688
|
+
|
|
689
|
+
1. **Review auto-fixes**: Check what CodeRabbit changed automatically
|
|
690
|
+
2. **Address manual issues**: Fix issues that require human judgment
|
|
691
|
+
3. **Don't skip this phase**: Code review catches quality issues early
|
|
692
|
+
4. **Learn from feedback**: CodeRabbit feedback helps improve coding patterns
|
|
693
|
+
|
|
694
|
+
### General Tips
|
|
695
|
+
|
|
696
|
+
1. **Use git branches**: Create feature branch before starting
|
|
697
|
+
2. **Commit often**: Commit after Phase 3 completes successfully
|
|
698
|
+
3. **Run verification manually**: Re-run /verify-implementation after fixes
|
|
699
|
+
4. **Review state files**: Check `.5/{feature-name}/state.json` for progress tracking
|
|
700
|
+
5. **Save verification reports**: Keep reports for documentation/debugging
|
|
701
|
+
|
|
702
|
+
---
|
|
703
|
+
|
|
704
|
+
## Troubleshooting
|
|
705
|
+
|
|
706
|
+
### Issue: Feature spec is too vague
|
|
707
|
+
|
|
708
|
+
**Solution**: Ask Claude more questions during Phase 1. Use AskUserQuestion to clarify requirements before finalizing spec.
|
|
709
|
+
|
|
710
|
+
### Issue: Implementation plan identifies wrong modules
|
|
711
|
+
|
|
712
|
+
**Solution**: Provide feedback during Phase 2 review. Tell Claude which modules should actually be affected.
|
|
713
|
+
|
|
714
|
+
### Issue: Component creation fails during implementation
|
|
715
|
+
|
|
716
|
+
**Symptom**: Claude reports agent failure or compilation error
|
|
717
|
+
|
|
718
|
+
**Solution**:
|
|
719
|
+
1. Check error message in state file
|
|
720
|
+
2. If small fix (missing import, syntax error), Claude will fix in main context
|
|
721
|
+
3. If large fix needed, Claude will re-spawn agent with corrected prompt
|
|
722
|
+
4. If stuck after 2 attempts, Claude will escalate to you
|
|
723
|
+
|
|
724
|
+
### Issue: Tests fail during verification
|
|
725
|
+
|
|
726
|
+
**Solution**:
|
|
727
|
+
1. Review verification report for test failures
|
|
728
|
+
2. Check test output for error details
|
|
729
|
+
3. Fix failing tests manually or ask Claude to fix
|
|
730
|
+
4. Re-run /verify-implementation after fixes
|
|
731
|
+
|
|
732
|
+
### Issue: Context usage too high
|
|
733
|
+
|
|
734
|
+
**Symptom**: Claude warns about 50% or 80% context usage
|
|
735
|
+
|
|
736
|
+
**Solution**:
|
|
737
|
+
1. Let current step complete
|
|
738
|
+
2. Commit current progress
|
|
739
|
+
3. Break remaining work into new feature
|
|
740
|
+
4. Start new session for remaining work
|
|
741
|
+
|
|
742
|
+
### Issue: State file corrupted
|
|
743
|
+
|
|
744
|
+
**Symptom**: JSON parse error when reading state file
|
|
745
|
+
|
|
746
|
+
**Solution**:
|
|
747
|
+
1. Open `.5/{ticket}/state.json`
|
|
748
|
+
2. Fix JSON syntax error
|
|
749
|
+
3. Or delete and re-run /implement-feature (will restart from beginning)
|
|
750
|
+
|
|
751
|
+
### Issue: Verification passes with warnings
|
|
752
|
+
|
|
753
|
+
**Status**: PASSED WITH WARNINGS
|
|
754
|
+
|
|
755
|
+
**Action**:
|
|
756
|
+
- Warnings don't block completion
|
|
757
|
+
- Review warnings in verification report
|
|
758
|
+
- Optionally fix warnings (unused imports, etc.)
|
|
759
|
+
- Proceed to commit
|
|
760
|
+
|
|
761
|
+
### Issue: Need to pause mid-implementation
|
|
762
|
+
|
|
763
|
+
**Solution**:
|
|
764
|
+
1. Let current step complete if possible
|
|
765
|
+
2. Commit current progress
|
|
766
|
+
3. State file preserves progress
|
|
767
|
+
4. Resume later by running /implement-feature {ticket} (will continue from current step)
|
|
768
|
+
|
|
769
|
+
### Issue: Agent returns unexpected results
|
|
770
|
+
|
|
771
|
+
**Solution**:
|
|
772
|
+
1. Check the agent output for error details
|
|
773
|
+
2. The command will attempt to fix small issues
|
|
774
|
+
3. For persistent failures, the command will escalate to you
|
|
775
|
+
4. You can re-run the command to retry from the failed step
|
|
776
|
+
|
|
777
|
+
---
|
|
778
|
+
|
|
779
|
+
## Advanced Topics
|
|
780
|
+
|
|
781
|
+
### Resuming Interrupted Implementation
|
|
782
|
+
|
|
783
|
+
If implementation was interrupted:
|
|
784
|
+
1. Check state file: `.5/{ticket}/state.json`
|
|
785
|
+
2. Note `currentStep` value
|
|
786
|
+
3. Re-run `/implement-feature {ticket}`
|
|
787
|
+
4. Claude will resume from `currentStep`
|
|
788
|
+
|
|
789
|
+
### Breaking Large Features into Parts
|
|
790
|
+
|
|
791
|
+
If feature is too large:
|
|
792
|
+
1. Complete Phase 1 (feature planning) for full feature
|
|
793
|
+
2. In Phase 2, split implementation plan into parts:
|
|
794
|
+
- Part 1: Core model + validation
|
|
795
|
+
- Part 2: API layer
|
|
796
|
+
- Part 3: Advanced features
|
|
797
|
+
3. Implement each part separately
|
|
798
|
+
4. Each part gets own state file
|
|
799
|
+
|
|
800
|
+
### Custom Verification
|
|
801
|
+
|
|
802
|
+
If you need custom verification:
|
|
803
|
+
1. Let /verify-implementation run standard checks
|
|
804
|
+
2. Add your own checks (performance tests, integration tests, etc.)
|
|
805
|
+
3. Document custom checks in verification report
|
|
806
|
+
|
|
807
|
+
### Automated Code Review with CodeRabbit
|
|
808
|
+
|
|
809
|
+
Use `/review-code` to get AI-powered code review before committing:
|
|
810
|
+
|
|
811
|
+
**Prerequisites:**
|
|
812
|
+
- Install CodeRabbit CLI: https://docs.coderabbit.ai/cli/installation
|
|
813
|
+
- Authenticate: `coderabbit auth login`
|
|
814
|
+
|
|
815
|
+
**Usage:**
|
|
816
|
+
```bash
|
|
817
|
+
# After making changes, stage them
|
|
818
|
+
git add .
|
|
819
|
+
|
|
820
|
+
# Run automated review
|
|
821
|
+
/review-code
|
|
822
|
+
|
|
823
|
+
# review-processor agent will:
|
|
824
|
+
# - Run CodeRabbit CLI
|
|
825
|
+
# - Parse and categorize findings
|
|
826
|
+
# - Return structured results to the command
|
|
827
|
+
#
|
|
828
|
+
# The command will then:
|
|
829
|
+
# - Show overview to you
|
|
830
|
+
# - Ask which fixes to apply
|
|
831
|
+
# - Apply approved fixes
|
|
832
|
+
# - Verify changes build correctly
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
### Working with Existing Features
|
|
836
|
+
|
|
837
|
+
If modifying existing feature:
|
|
838
|
+
1. Phase 1: Describe modifications clearly
|
|
839
|
+
2. Phase 2: Plan will include "Modified" status for affected modules
|
|
840
|
+
3. Phase 3: Agents will use Edit tool instead of Write for modifications
|
|
841
|
+
|
|
842
|
+
### Parallel Feature Development
|
|
843
|
+
|
|
844
|
+
If working on multiple features:
|
|
845
|
+
1. Each feature has own branch
|
|
846
|
+
2. Each feature has own state file
|
|
847
|
+
3. Can run /plan-feature for multiple features
|
|
848
|
+
4. Implement one at a time (to avoid context conflicts)
|
|
849
|
+
|
|
850
|
+
---
|
|
851
|
+
|
|
852
|
+
## Quick Reference
|
|
853
|
+
|
|
854
|
+
### Commands
|
|
855
|
+
|
|
856
|
+
| Command | Phase | Purpose |
|
|
857
|
+
|---------|-------|---------|
|
|
858
|
+
| `/plan-feature` | 1 | Create feature specification |
|
|
859
|
+
| `/plan-implementation {ticket}` | 2 | Create implementation plan |
|
|
860
|
+
| `/implement-feature {ticket}` | 3 | Execute implementation via agents |
|
|
861
|
+
| `/verify-implementation {ticket}` | 4 | Verify via verification-agent |
|
|
862
|
+
| `/review-code` | 5 | Review via review-processor agent |
|
|
863
|
+
| `/quick-implement` | - | Fast path for small tasks (inline planning, same state tracking) |
|
|
864
|
+
|
|
865
|
+
### Agents
|
|
866
|
+
|
|
867
|
+
| Agent | Phase | Purpose |
|
|
868
|
+
|-------|-------|---------|
|
|
869
|
+
| `step-executor` | 3 | Execute step components via skills |
|
|
870
|
+
| `step-verifier` | 3 | Build and check after each step |
|
|
871
|
+
| `integration-agent` | 3 | Wire components and routes (final step) |
|
|
872
|
+
| `verification-agent` | 4 | Full verification checks |
|
|
873
|
+
| `review-processor` | 5 | Run CodeRabbit and categorize findings |
|
|
874
|
+
|
|
875
|
+
### File Locations
|
|
876
|
+
|
|
877
|
+
| File | Purpose | Committed? |
|
|
878
|
+
|------|---------|------------|
|
|
879
|
+
| `.5/{ticket}/feature.md` | Feature spec | Yes (after approval) |
|
|
880
|
+
| `.5/{ticket}/plan.md` | Implementation plan | Yes (after approval) |
|
|
881
|
+
| `.5/{ticket}/state.json` | Progress tracking | No (gitignored) |
|
|
882
|
+
| `.5/{ticket}/verification.md` | Verification report | No (gitignored) |
|
|
883
|
+
| `.5/{ticket}/review-{timestamp}.md` | CodeRabbit review report | No (gitignored) |
|
|
884
|
+
|
|
885
|
+
### State File Status Values
|
|
886
|
+
|
|
887
|
+
| Status | Meaning |
|
|
888
|
+
|--------|---------|
|
|
889
|
+
| `in-progress` | Implementation ongoing |
|
|
890
|
+
| `completed` | Implementation finished successfully |
|
|
891
|
+
| `failed` | Implementation failed, needs fixes |
|
|
892
|
+
|
|
893
|
+
### Verification Status Values
|
|
894
|
+
|
|
895
|
+
| Status | Meaning | Action |
|
|
896
|
+
|--------|---------|--------|
|
|
897
|
+
| `passed` | All checks successful | Ready to commit |
|
|
898
|
+
| `passed-with-warnings` | Warnings but no errors | Review warnings, then commit |
|
|
899
|
+
| `failed` | Errors found | Fix errors, re-verify |
|
|
900
|
+
|
|
901
|
+
---
|
|
902
|
+
|
|
903
|
+
## Configuring for Different Tech Stacks
|
|
904
|
+
|
|
905
|
+
The 5-phase workflow is designed to work with any technology stack. Configuration is stored in `.claude/.5/config.json` and can be customized using the `/5:configure` command.
|
|
906
|
+
|
|
907
|
+
### Quick Setup
|
|
908
|
+
|
|
909
|
+
```bash
|
|
910
|
+
# Interactive configuration wizard
|
|
911
|
+
/5:configure
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
The wizard will:
|
|
915
|
+
1. Auto-detect your project type (Node.js, Python, Java, Rust, Go, etc.)
|
|
916
|
+
2. Set up appropriate build and test commands
|
|
917
|
+
3. Configure ticket ID patterns
|
|
918
|
+
4. Set up step structure (default 3 steps)
|
|
919
|
+
|
|
920
|
+
### Configuration Examples
|
|
921
|
+
|
|
922
|
+
**JavaScript/TypeScript (Node.js)**
|
|
923
|
+
```json
|
|
924
|
+
{
|
|
925
|
+
"ticket": {
|
|
926
|
+
"pattern": "[A-Z]+-\\d+",
|
|
927
|
+
"extractFromBranch": true
|
|
928
|
+
},
|
|
929
|
+
"build": {
|
|
930
|
+
"command": "npm run build",
|
|
931
|
+
"testCommand": "npm test"
|
|
932
|
+
},
|
|
933
|
+
"steps": [
|
|
934
|
+
{ "name": "foundation", "mode": "parallel" },
|
|
935
|
+
{ "name": "logic", "mode": "sequential" },
|
|
936
|
+
{ "name": "integration", "mode": "sequential" }
|
|
937
|
+
]
|
|
938
|
+
}
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
**Python**
|
|
942
|
+
```json
|
|
943
|
+
{
|
|
944
|
+
"build": {
|
|
945
|
+
"command": "python -m py_compile",
|
|
946
|
+
"testCommand": "pytest"
|
|
947
|
+
},
|
|
948
|
+
"steps": [
|
|
949
|
+
{ "name": "models", "mode": "parallel" },
|
|
950
|
+
{ "name": "services", "mode": "sequential" },
|
|
951
|
+
{ "name": "api", "mode": "sequential" }
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
```
|
|
955
|
+
|
|
956
|
+
**Java (Gradle)**
|
|
957
|
+
```json
|
|
958
|
+
{
|
|
959
|
+
"build": {
|
|
960
|
+
"command": "gradle build",
|
|
961
|
+
"testCommand": "gradle test"
|
|
962
|
+
},
|
|
963
|
+
"steps": [
|
|
964
|
+
{ "name": "domain", "mode": "parallel" },
|
|
965
|
+
{ "name": "business-logic", "mode": "sequential" },
|
|
966
|
+
{ "name": "api-integration", "mode": "sequential" }
|
|
967
|
+
]
|
|
968
|
+
}
|
|
969
|
+
```
|
|
970
|
+
|
|
971
|
+
### Customizing Steps
|
|
972
|
+
|
|
973
|
+
You can configure the number and names of implementation steps. The default is 3 steps:
|
|
974
|
+
|
|
975
|
+
- **Step 1 (Foundation)**: Core models, types, schemas - executed in parallel
|
|
976
|
+
- **Step 2 (Logic)**: Business logic, services - executed sequentially if dependencies exist
|
|
977
|
+
- **Step 3 (Integration)**: API routes, wiring, tests - executed sequentially
|
|
978
|
+
|
|
979
|
+
For more complex projects, you might use 4-5 steps:
|
|
980
|
+
|
|
981
|
+
```json
|
|
982
|
+
{
|
|
983
|
+
"steps": [
|
|
984
|
+
{ "name": "models", "mode": "parallel" },
|
|
985
|
+
{ "name": "validation", "mode": "parallel" },
|
|
986
|
+
{ "name": "services", "mode": "sequential" },
|
|
987
|
+
{ "name": "api", "mode": "sequential" },
|
|
988
|
+
{ "name": "integration", "mode": "sequential" }
|
|
989
|
+
]
|
|
990
|
+
}
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
### Auto-Detection
|
|
994
|
+
|
|
995
|
+
The workflow automatically detects:
|
|
996
|
+
- **Build system**: package.json, build.gradle, Cargo.toml, go.mod, Makefile, etc.
|
|
997
|
+
- **Test runner**: Jest, Vitest, pytest, cargo test, go test, Gradle, Maven, etc.
|
|
998
|
+
- **Project type**: Express, NestJS, Next.js, Django, FastAPI, Spring Boot, etc.
|
|
999
|
+
|
|
1000
|
+
You can override auto-detected values in the config file.
|
|
1001
|
+
|
|
1002
|
+
### Further Customization
|
|
1003
|
+
|
|
1004
|
+
See the `/5:configure` command for interactive configuration, or manually edit `.claude/.5/config.json` to customize:
|
|
1005
|
+
- Ticket ID patterns
|
|
1006
|
+
- Branch naming conventions
|
|
1007
|
+
- Build and test commands
|
|
1008
|
+
- Step structure and execution modes
|
|
1009
|
+
- Integration patterns
|
|
1010
|
+
|
|
1011
|
+
---
|
|
1012
|
+
|
|
1013
|
+
## Related Documentation
|
|
1014
|
+
|
|
1015
|
+
- **[CLAUDE.md](../../CLAUDE.md)** - Project context, domain patterns and conventions
|
|
1016
|
+
- **[Skills README](../../skills/README.md)** - All available skills
|
|
1017
|
+
|
|
1018
|
+
---
|
|
1019
|
+
|
|
1020
|
+
## Feedback
|
|
1021
|
+
|
|
1022
|
+
Found an issue with this workflow or have suggestions?
|
|
1023
|
+
- Create an issue: https://github.com/anthropics/claude-code/issues
|
|
1024
|
+
- Or discuss with your team
|