devflow-kit 1.4.0 → 1.6.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/CHANGELOG.md +51 -0
- package/README.md +7 -3
- package/dist/commands/ambient.js +1 -1
- package/dist/commands/init.js +31 -2
- package/dist/commands/list.d.ts +21 -0
- package/dist/commands/list.js +71 -3
- package/dist/plugins.js +24 -24
- package/dist/utils/manifest.d.ts +45 -0
- package/dist/utils/manifest.js +100 -0
- package/dist/utils/post-install.js +6 -1
- package/package.json +1 -1
- package/plugins/devflow-accessibility/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-ambient/.claude-plugin/plugin.json +25 -4
- package/plugins/devflow-ambient/README.md +48 -29
- package/plugins/devflow-ambient/agents/coder.md +135 -0
- package/plugins/devflow-ambient/agents/reviewer.md +165 -0
- package/plugins/devflow-ambient/agents/scrutinizer.md +80 -0
- package/plugins/devflow-ambient/agents/shepherd.md +94 -0
- package/plugins/devflow-ambient/agents/simplifier.md +93 -0
- package/plugins/devflow-ambient/agents/skimmer.md +93 -0
- package/plugins/devflow-ambient/agents/validator.md +86 -0
- package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +72 -28
- package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +40 -34
- package/plugins/devflow-ambient/skills/debug-orchestration/SKILL.md +69 -0
- package/plugins/devflow-ambient/skills/implementation-orchestration/SKILL.md +92 -0
- package/plugins/devflow-ambient/skills/plan-orchestration/SKILL.md +71 -0
- package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +10 -1
- package/plugins/devflow-audit-claude/commands/audit-claude.md +4 -0
- package/plugins/devflow-code-review/.claude-plugin/plugin.json +2 -1
- package/plugins/devflow-code-review/agents/reviewer.md +47 -9
- package/plugins/devflow-code-review/agents/synthesizer.md +12 -5
- package/plugins/devflow-code-review/commands/code-review-teams.md +43 -30
- package/plugins/devflow-code-review/commands/code-review.md +14 -2
- package/plugins/devflow-code-review/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-code-review/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-core-skills/.claude-plugin/plugin.json +2 -1
- package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +7 -1
- package/plugins/devflow-core-skills/skills/search-first/SKILL.md +133 -0
- package/plugins/devflow-core-skills/skills/search-first/references/evaluation-criteria.md +101 -0
- package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +6 -5
- package/plugins/devflow-debug/.claude-plugin/plugin.json +5 -3
- package/plugins/devflow-debug/agents/synthesizer.md +211 -0
- package/plugins/devflow-debug/commands/debug-teams.md +28 -14
- package/plugins/devflow-debug/commands/debug.md +26 -12
- package/plugins/devflow-debug/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-debug/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-implement/.claude-plugin/plugin.json +2 -1
- package/plugins/devflow-implement/agents/coder.md +21 -13
- package/plugins/devflow-implement/agents/simplifier.md +32 -1
- package/plugins/devflow-implement/agents/skimmer.md +5 -0
- package/plugins/devflow-implement/agents/synthesizer.md +12 -5
- package/plugins/devflow-implement/commands/implement-teams.md +73 -60
- package/plugins/devflow-implement/commands/implement.md +45 -40
- package/plugins/devflow-implement/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-implement/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-resolve/.claude-plugin/plugin.json +4 -3
- package/plugins/devflow-resolve/agents/simplifier.md +32 -1
- package/plugins/devflow-resolve/commands/resolve-teams.md +16 -7
- package/plugins/devflow-resolve/commands/resolve.md +16 -7
- package/plugins/devflow-resolve/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-resolve/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-self-review/.claude-plugin/plugin.json +10 -1
- package/plugins/devflow-self-review/agents/simplifier.md +32 -1
- package/plugins/devflow-self-review/commands/self-review.md +10 -4
- package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-specify/agents/skimmer.md +5 -0
- package/plugins/devflow-specify/agents/synthesizer.md +12 -5
- package/plugins/devflow-specify/commands/specify-teams.md +27 -20
- package/plugins/devflow-specify/commands/specify.md +26 -19
- package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
- package/scripts/hooks/ambient-prompt +8 -7
- package/scripts/hooks/session-start-memory +33 -3
- package/shared/agents/coder.md +21 -13
- package/shared/agents/reviewer.md +47 -9
- package/shared/agents/simplifier.md +32 -1
- package/shared/agents/skimmer.md +5 -0
- package/shared/agents/synthesizer.md +12 -5
- package/shared/skills/ambient-router/SKILL.md +72 -28
- package/shared/skills/ambient-router/references/skill-catalog.md +40 -34
- package/shared/skills/debug-orchestration/SKILL.md +69 -0
- package/shared/skills/docs-framework/SKILL.md +7 -1
- package/shared/skills/implementation-orchestration/SKILL.md +92 -0
- package/shared/skills/knowledge-persistence/SKILL.md +128 -0
- package/shared/skills/knowledge-persistence/references/examples.md +44 -0
- package/shared/skills/plan-orchestration/SKILL.md +71 -0
- package/shared/skills/search-first/SKILL.md +133 -0
- package/shared/skills/search-first/references/evaluation-criteria.md +101 -0
- package/shared/skills/test-driven-development/SKILL.md +6 -5
- package/plugins/devflow-ambient/commands/ambient.md +0 -110
|
@@ -46,7 +46,7 @@ Return the branch setup summary."
|
|
|
46
46
|
- `ISSUE_CONTENT`: Full issue body including description (if provided)
|
|
47
47
|
- `ACCEPTANCE_CRITERIA`: Extracted acceptance criteria from issue (if provided)
|
|
48
48
|
|
|
49
|
-
### Phase
|
|
49
|
+
### Phase 2: Orient
|
|
50
50
|
|
|
51
51
|
Spawn Skimmer agent for codebase overview:
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ Task(subagent_type="Skimmer"):
|
|
|
56
56
|
Use skim to identify relevant files, functions, integration points"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
### Phase
|
|
59
|
+
### Phase 3: Exploration Team
|
|
60
60
|
|
|
61
61
|
Create an agent team for collaborative codebase exploration:
|
|
62
62
|
|
|
@@ -69,48 +69,56 @@ Spawn exploration teammates with self-contained prompts:
|
|
|
69
69
|
Prompt: |
|
|
70
70
|
You are exploring a codebase for task: {task description}
|
|
71
71
|
1. Read your skill: `Read ~/.claude/skills/implementation-patterns/SKILL.md`
|
|
72
|
-
2.
|
|
72
|
+
2. Read `.memory/knowledge/decisions.md` and `.memory/knowledge/pitfalls.md` if they exist.
|
|
73
|
+
Consider prior decisions and known pitfalls relevant to this task.
|
|
74
|
+
3. Skimmer context (files/patterns already identified):
|
|
73
75
|
{skimmer output}
|
|
74
|
-
|
|
76
|
+
4. Your deliverable: Find similar implementations, established patterns,
|
|
75
77
|
module structure, and architectural conventions relevant to this task.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
5. Document findings with file:path references.
|
|
79
|
+
6. Report completion: SendMessage(type: "message", recipient: "team-lead",
|
|
78
80
|
summary: "Architecture exploration done")
|
|
79
81
|
|
|
80
82
|
- Name: "integration-explorer"
|
|
81
83
|
Prompt: |
|
|
82
84
|
You are exploring a codebase for task: {task description}
|
|
83
85
|
1. Read your skill: `Read ~/.claude/skills/implementation-patterns/SKILL.md`
|
|
84
|
-
2.
|
|
86
|
+
2. Read `.memory/knowledge/decisions.md` and `.memory/knowledge/pitfalls.md` if they exist.
|
|
87
|
+
Consider prior decisions and known pitfalls relevant to this task.
|
|
88
|
+
3. Skimmer context (files/patterns already identified):
|
|
85
89
|
{skimmer output}
|
|
86
|
-
|
|
90
|
+
4. Your deliverable: Find entry points, services, database models,
|
|
87
91
|
configuration, and integration points relevant to this task.
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
5. Document findings with file:path references.
|
|
93
|
+
6. Report completion: SendMessage(type: "message", recipient: "team-lead",
|
|
90
94
|
summary: "Integration exploration done")
|
|
91
95
|
|
|
92
96
|
- Name: "reusable-code-explorer"
|
|
93
97
|
Prompt: |
|
|
94
98
|
You are exploring a codebase for task: {task description}
|
|
95
99
|
1. Read your skill: `Read ~/.claude/skills/implementation-patterns/SKILL.md`
|
|
96
|
-
2.
|
|
100
|
+
2. Read `.memory/knowledge/decisions.md` and `.memory/knowledge/pitfalls.md` if they exist.
|
|
101
|
+
Consider prior decisions and known pitfalls relevant to this task.
|
|
102
|
+
3. Skimmer context (files/patterns already identified):
|
|
97
103
|
{skimmer output}
|
|
98
|
-
|
|
104
|
+
4. Your deliverable: Find utilities, helpers, validation patterns,
|
|
99
105
|
and error handling that can be reused for this task.
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
5. Document findings with file:path references.
|
|
107
|
+
6. Report completion: SendMessage(type: "message", recipient: "team-lead",
|
|
102
108
|
summary: "Reusable code exploration done")
|
|
103
109
|
|
|
104
110
|
- Name: "edge-case-explorer"
|
|
105
111
|
Prompt: |
|
|
106
112
|
You are exploring a codebase for task: {task description}
|
|
107
113
|
1. Read your skill: `Read ~/.claude/skills/implementation-patterns/SKILL.md`
|
|
108
|
-
2.
|
|
114
|
+
2. Read `.memory/knowledge/decisions.md` and `.memory/knowledge/pitfalls.md` if they exist.
|
|
115
|
+
Consider prior decisions and known pitfalls relevant to this task.
|
|
116
|
+
3. Skimmer context (files/patterns already identified):
|
|
109
117
|
{skimmer output}
|
|
110
|
-
|
|
118
|
+
4. Your deliverable: Find error scenarios, race conditions, permission
|
|
111
119
|
failures, and boundary cases relevant to this task.
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
5. Document findings with file:path references.
|
|
121
|
+
6. Report completion: SendMessage(type: "message", recipient: "team-lead",
|
|
114
122
|
summary: "Edge case exploration done")
|
|
115
123
|
|
|
116
124
|
After initial exploration, lead initiates debate:
|
|
@@ -125,7 +133,7 @@ Max 2 debate rounds, then submit consensus exploration findings.
|
|
|
125
133
|
|
|
126
134
|
**Exploration team output**: Consensus findings on patterns, integration points, reusable code, edge cases.
|
|
127
135
|
|
|
128
|
-
**Team Shutdown Protocol** (must complete before Phase
|
|
136
|
+
**Team Shutdown Protocol** (must complete before Phase 5):
|
|
129
137
|
|
|
130
138
|
```
|
|
131
139
|
Step 1: Shutdown each teammate
|
|
@@ -142,7 +150,7 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
142
150
|
If retry failed → HALT and report: "Exploration team cleanup failed. Cannot create planning team."
|
|
143
151
|
```
|
|
144
152
|
|
|
145
|
-
### Phase
|
|
153
|
+
### Phase 4: Synthesize Exploration
|
|
146
154
|
|
|
147
155
|
**CRITICAL**: Do NOT synthesize outputs yourself in the main session.
|
|
148
156
|
You MUST spawn the Synthesizer agent.
|
|
@@ -155,7 +163,7 @@ Explorer consensus: {team exploration consensus output}
|
|
|
155
163
|
Combine into: patterns, integration points, reusable code, edge cases"
|
|
156
164
|
```
|
|
157
165
|
|
|
158
|
-
### Phase
|
|
166
|
+
### Phase 5: Planning Team
|
|
159
167
|
|
|
160
168
|
Create an agent team for collaborative implementation planning:
|
|
161
169
|
|
|
@@ -169,7 +177,7 @@ Spawn planning teammates with self-contained prompts:
|
|
|
169
177
|
You are planning implementation for task: {task description}
|
|
170
178
|
1. Read your skill: `Read ~/.claude/skills/implementation-patterns/SKILL.md`
|
|
171
179
|
2. Exploration synthesis (what we know about the codebase):
|
|
172
|
-
{synthesis output from Phase
|
|
180
|
+
{synthesis output from Phase 4}
|
|
173
181
|
3. Your deliverable: Step-by-step coding approach with specific files
|
|
174
182
|
to create/modify, dependencies between steps, and execution order.
|
|
175
183
|
4. Report completion: SendMessage(type: "message", recipient: "team-lead",
|
|
@@ -180,7 +188,7 @@ Spawn planning teammates with self-contained prompts:
|
|
|
180
188
|
You are planning the test strategy for task: {task description}
|
|
181
189
|
1. Read your skill: `Read ~/.claude/skills/test-patterns/SKILL.md`
|
|
182
190
|
2. Exploration synthesis (what we know about the codebase):
|
|
183
|
-
{synthesis output from Phase
|
|
191
|
+
{synthesis output from Phase 4}
|
|
184
192
|
3. Your deliverable: Test strategy — unit tests, integration tests,
|
|
185
193
|
edge case coverage, testing patterns to follow from the codebase.
|
|
186
194
|
4. Report completion: SendMessage(type: "message", recipient: "team-lead",
|
|
@@ -191,7 +199,7 @@ Spawn planning teammates with self-contained prompts:
|
|
|
191
199
|
You are assessing risk and execution strategy for task: {task description}
|
|
192
200
|
1. Read your skill: `Read ~/.claude/skills/implementation-patterns/SKILL.md`
|
|
193
201
|
2. Exploration synthesis (what we know about the codebase):
|
|
194
|
-
{synthesis output from Phase
|
|
202
|
+
{synthesis output from Phase 4}
|
|
195
203
|
3. Your deliverable: Risk assessment, rollback strategy, and execution
|
|
196
204
|
strategy decision (SINGLE_CODER vs SEQUENTIAL_CODERS vs PARALLEL_CODERS)
|
|
197
205
|
based on artifact independence, context capacity, and domain specialization.
|
|
@@ -222,7 +230,7 @@ Max 2 debate rounds, then submit consensus plan.
|
|
|
222
230
|
- **HIGH**: 20-30 files, multiple modules → SEQUENTIAL_CODERS (2-3 phases)
|
|
223
231
|
- **CRITICAL**: >30 files, cross-cutting concerns → SEQUENTIAL_CODERS (more phases)
|
|
224
232
|
|
|
225
|
-
**Team Shutdown Protocol** (must complete before Phase
|
|
233
|
+
**Team Shutdown Protocol** (must complete before Phase 7):
|
|
226
234
|
|
|
227
235
|
```
|
|
228
236
|
Step 1: Shutdown each teammate
|
|
@@ -238,7 +246,7 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
238
246
|
If retry failed → HALT and report: "Planning team cleanup failed. Cannot proceed to implementation."
|
|
239
247
|
```
|
|
240
248
|
|
|
241
|
-
### Phase
|
|
249
|
+
### Phase 6: Synthesize Planning
|
|
242
250
|
|
|
243
251
|
**CRITICAL**: Do NOT synthesize outputs yourself in the main session.
|
|
244
252
|
You MUST spawn the Synthesizer agent.
|
|
@@ -257,9 +265,9 @@ Combine into: execution plan with strategy decision (SINGLE_CODER | SEQUENTIAL_C
|
|
|
257
265
|
- Subtask breakdown with DOMAIN hints (if not SINGLE_CODER)
|
|
258
266
|
- Implementation plan with dependencies
|
|
259
267
|
|
|
260
|
-
### Phase
|
|
268
|
+
### Phase 7: Implement
|
|
261
269
|
|
|
262
|
-
Based on Phase
|
|
270
|
+
Based on Phase 6 synthesis, use the three-strategy framework:
|
|
263
271
|
|
|
264
272
|
**Strategy Selection** (from planning team consensus):
|
|
265
273
|
|
|
@@ -318,11 +326,7 @@ FILES_FROM_PRIOR_PHASE: {list of files created}
|
|
|
318
326
|
HANDOFF_REQUIRED: {true if not last phase}"
|
|
319
327
|
```
|
|
320
328
|
|
|
321
|
-
**Handoff Protocol**: Each sequential Coder receives the prior Coder's implementation summary. The
|
|
322
|
-
1. Check git log to see commits from previous phases
|
|
323
|
-
2. Read actual files created - do not trust summary alone
|
|
324
|
-
3. Identify patterns from actual code (naming, error handling, testing)
|
|
325
|
-
4. Reference handoff summary to validate understanding
|
|
329
|
+
**Handoff Protocol**: Each sequential Coder receives the prior Coder's implementation summary via PRIOR_PHASE_SUMMARY and FILES_FROM_PRIOR_PHASE. The Coder's built-in branch orientation step handles git log scanning, file reading, and pattern discovery automatically.
|
|
326
330
|
|
|
327
331
|
---
|
|
328
332
|
|
|
@@ -356,7 +360,7 @@ DOMAIN: {subtask 2 domain}"
|
|
|
356
360
|
- Different files/modules with no imports between them
|
|
357
361
|
- Each subtask is self-contained
|
|
358
362
|
|
|
359
|
-
### Phase
|
|
363
|
+
### Phase 8: Validate
|
|
360
364
|
|
|
361
365
|
After Coder completes, spawn Validator to verify correctness:
|
|
362
366
|
|
|
@@ -381,12 +385,12 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
381
385
|
SCOPE: Fix only the listed failures, no other changes
|
|
382
386
|
CREATE_PR: false"
|
|
383
387
|
```
|
|
384
|
-
- Loop back to Phase
|
|
388
|
+
- Loop back to Phase 8 (re-validate)
|
|
385
389
|
4. If `validation_retry_count > 2`: Report failures to user and halt
|
|
386
390
|
|
|
387
|
-
**If PASS:** Continue to Phase
|
|
391
|
+
**If PASS:** Continue to Phase 9
|
|
388
392
|
|
|
389
|
-
### Phase
|
|
393
|
+
### Phase 9: Simplify
|
|
390
394
|
|
|
391
395
|
After validation passes, spawn Simplifier to polish the code:
|
|
392
396
|
|
|
@@ -398,7 +402,7 @@ FILES_CHANGED: {list of files from Coder output}
|
|
|
398
402
|
Focus on code modified by Coder, apply project standards, enhance clarity"
|
|
399
403
|
```
|
|
400
404
|
|
|
401
|
-
### Phase
|
|
405
|
+
### Phase 10: Self-Review
|
|
402
406
|
|
|
403
407
|
After Simplifier completes, spawn Scrutinizer as final quality gate:
|
|
404
408
|
|
|
@@ -411,7 +415,7 @@ Evaluate 9 pillars, fix P0/P1 issues, report status"
|
|
|
411
415
|
|
|
412
416
|
If Scrutinizer returns BLOCKED, report to user and halt.
|
|
413
417
|
|
|
414
|
-
### Phase
|
|
418
|
+
### Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
415
419
|
|
|
416
420
|
If Scrutinizer made code changes (status: FIXED), spawn Validator to verify:
|
|
417
421
|
|
|
@@ -424,9 +428,9 @@ Verify Scrutinizer's fixes didn't break anything."
|
|
|
424
428
|
|
|
425
429
|
**If FAIL:** Report to user - Scrutinizer broke tests, needs manual intervention.
|
|
426
430
|
|
|
427
|
-
**If PASS:** Continue to Phase
|
|
431
|
+
**If PASS:** Continue to Phase 12
|
|
428
432
|
|
|
429
|
-
### Phase
|
|
433
|
+
### Phase 12: Shepherd↔Coder Dialogue
|
|
430
434
|
|
|
431
435
|
After Scrutinizer passes (and re-validation if needed), check alignment using direct dialogue:
|
|
432
436
|
|
|
@@ -441,7 +445,7 @@ Spawn teammates with self-contained prompts:
|
|
|
441
445
|
Prompt: |
|
|
442
446
|
You are validating that the implementation aligns with the original request.
|
|
443
447
|
ORIGINAL_REQUEST: {task description or issue content}
|
|
444
|
-
EXECUTION_PLAN: {synthesized plan from Phase
|
|
448
|
+
EXECUTION_PLAN: {synthesized plan from Phase 6}
|
|
445
449
|
FILES_CHANGED: {list of files from Coder output}
|
|
446
450
|
ACCEPTANCE_CRITERIA: {extracted criteria if available}
|
|
447
451
|
|
|
@@ -476,7 +480,7 @@ Spawn teammates with self-contained prompts:
|
|
|
476
480
|
summary: "Alignment fixes complete")
|
|
477
481
|
```
|
|
478
482
|
|
|
479
|
-
**Team Shutdown Protocol** (must complete before Phase
|
|
483
|
+
**Team Shutdown Protocol** (must complete before Phase 13):
|
|
480
484
|
|
|
481
485
|
```
|
|
482
486
|
Step 1: Shutdown each teammate
|
|
@@ -491,7 +495,7 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
491
495
|
If retry failed → HALT and report: "Alignment team cleanup failed."
|
|
492
496
|
```
|
|
493
497
|
|
|
494
|
-
**If ALIGNED:** Continue to Phase
|
|
498
|
+
**If ALIGNED:** Continue to Phase 13
|
|
495
499
|
|
|
496
500
|
**If MISALIGNED:**
|
|
497
501
|
1. Extract misalignment details from Shepherd output
|
|
@@ -514,19 +518,26 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
514
518
|
VALIDATION_SCOPE: changed-only"
|
|
515
519
|
```
|
|
516
520
|
- If Validator FAIL: Report to user
|
|
517
|
-
- If Validator PASS: Loop back to Phase
|
|
521
|
+
- If Validator PASS: Loop back to Phase 12 (re-check alignment)
|
|
518
522
|
4. If `alignment_fix_count > 2`: Report misalignments to user for decision
|
|
519
523
|
|
|
520
|
-
### Phase
|
|
524
|
+
### Phase 13: Create PR
|
|
521
525
|
|
|
522
526
|
**For SEQUENTIAL_CODERS or PARALLEL_CODERS**: The last sequential Coder (with CREATE_PR: true) handles PR creation. For parallel coders, create unified PR using `git-workflow` skill patterns. Push branch and run `gh pr create` with comprehensive description, targeting `BASE_BRANCH`.
|
|
523
527
|
|
|
524
528
|
**For SINGLE_CODER**: PR is created by the Coder agent (CREATE_PR: true).
|
|
525
529
|
|
|
526
|
-
### Phase
|
|
530
|
+
### Phase 14: Report
|
|
527
531
|
|
|
528
532
|
Display completion summary with phase status, PR info, and next steps.
|
|
529
533
|
|
|
534
|
+
### Phase 15: Record Decisions (if any)
|
|
535
|
+
|
|
536
|
+
If the Coder's report includes Key Decisions with architectural significance:
|
|
537
|
+
1. Read `~/.claude/skills/knowledge-persistence/SKILL.md` and follow its extraction procedure to record decisions to `.memory/knowledge/decisions.md`
|
|
538
|
+
2. Source field: `/implement {TASK_ID}`
|
|
539
|
+
3. Skip entirely if no architectural decisions were made
|
|
540
|
+
|
|
530
541
|
## Architecture
|
|
531
542
|
|
|
532
543
|
```
|
|
@@ -535,55 +546,57 @@ Display completion summary with phase status, PR info, and next steps.
|
|
|
535
546
|
├─ Phase 1: Setup
|
|
536
547
|
│ └─ Git agent (operation: setup-task) - creates feature branch, fetches issue
|
|
537
548
|
│
|
|
538
|
-
├─ Phase
|
|
549
|
+
├─ Phase 2: Orient
|
|
539
550
|
│ └─ Skimmer agent (codebase overview via skim)
|
|
540
551
|
│
|
|
541
|
-
├─ Phase
|
|
552
|
+
├─ Phase 3: Exploration Team (Agent Teams)
|
|
542
553
|
│ ├─ Architecture Explorer (teammate)
|
|
543
554
|
│ ├─ Integration Explorer (teammate)
|
|
544
555
|
│ ├─ Reusable Code Explorer (teammate)
|
|
545
556
|
│ ├─ Edge Case Explorer (teammate)
|
|
546
557
|
│ └─ Debate → consensus exploration findings
|
|
547
558
|
│
|
|
548
|
-
├─ Phase
|
|
559
|
+
├─ Phase 4: Synthesize Exploration
|
|
549
560
|
│ └─ Synthesizer agent (mode: exploration)
|
|
550
561
|
│
|
|
551
|
-
├─ Phase
|
|
562
|
+
├─ Phase 5: Planning Team (Agent Teams)
|
|
552
563
|
│ ├─ Implementation Planner (teammate)
|
|
553
564
|
│ ├─ Testing Planner (teammate)
|
|
554
565
|
│ ├─ Risk & Execution Planner (teammate)
|
|
555
566
|
│ └─ Debate → consensus plan with strategy decision
|
|
556
567
|
│
|
|
557
|
-
├─ Phase
|
|
568
|
+
├─ Phase 6: Synthesize Planning
|
|
558
569
|
│ └─ Synthesizer agent (mode: planning) → returns strategy + DOMAIN hints
|
|
559
570
|
│
|
|
560
|
-
├─ Phase
|
|
571
|
+
├─ Phase 7: Implement (3-strategy framework)
|
|
561
572
|
│ ├─ SINGLE_CODER (80%): One Coder, full plan, CREATE_PR: true
|
|
562
573
|
│ ├─ SEQUENTIAL_CODERS (15%): N Coders with handoff summaries
|
|
563
574
|
│ └─ PARALLEL_CODERS (5%): N Coders in single message (rare)
|
|
564
575
|
│
|
|
565
|
-
├─ Phase
|
|
576
|
+
├─ Phase 8: Validate
|
|
566
577
|
│ └─ Validator agent (build, typecheck, lint, test)
|
|
567
578
|
│ └─ If FAIL: Coder fix loop (max 2 retries) → re-validate
|
|
568
579
|
│
|
|
569
|
-
├─ Phase
|
|
580
|
+
├─ Phase 9: Simplify
|
|
570
581
|
│ └─ Simplifier agent (refines code clarity and consistency)
|
|
571
582
|
│
|
|
572
|
-
├─ Phase
|
|
583
|
+
├─ Phase 10: Self-Review
|
|
573
584
|
│ └─ Scrutinizer agent (final quality gate, fixes P0/P1)
|
|
574
585
|
│
|
|
575
|
-
├─ Phase
|
|
586
|
+
├─ Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
576
587
|
│ └─ Validator agent (verify Scrutinizer fixes)
|
|
577
588
|
│
|
|
578
|
-
├─ Phase
|
|
589
|
+
├─ Phase 12: Shepherd↔Coder Dialogue (Agent Teams)
|
|
579
590
|
│ └─ Direct Shepherd↔Coder messaging (max 2 exchanges)
|
|
580
591
|
│
|
|
581
|
-
├─ Phase
|
|
592
|
+
├─ Phase 13: Create PR (if needed)
|
|
582
593
|
│ └─ SINGLE_CODER: handled by Coder
|
|
583
594
|
│ └─ SEQUENTIAL: handled by last Coder
|
|
584
595
|
│ └─ PARALLEL: orchestrator creates unified PR
|
|
585
596
|
│
|
|
586
|
-
|
|
597
|
+
├─ Phase 14: Display agent outputs
|
|
598
|
+
│
|
|
599
|
+
└─ Phase 15: Record Decisions (inline, if any)
|
|
587
600
|
```
|
|
588
601
|
|
|
589
602
|
## Principles
|
|
@@ -46,7 +46,7 @@ Return the branch setup summary."
|
|
|
46
46
|
- `ISSUE_CONTENT`: Full issue body including description (if provided)
|
|
47
47
|
- `ACCEPTANCE_CRITERIA`: Extracted acceptance criteria from issue (if provided)
|
|
48
48
|
|
|
49
|
-
### Phase
|
|
49
|
+
### Phase 2: Orient
|
|
50
50
|
|
|
51
51
|
Spawn Skimmer agent for codebase overview:
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ Task(subagent_type="Skimmer"):
|
|
|
56
56
|
Use skim to identify relevant files, functions, integration points"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
### Phase
|
|
59
|
+
### Phase 3: Explore (Parallel)
|
|
60
60
|
|
|
61
61
|
Spawn 4 Explore agents **in a single message**, each with Skimmer context:
|
|
62
62
|
|
|
@@ -69,9 +69,9 @@ Spawn 4 Explore agents **in a single message**, each with Skimmer context:
|
|
|
69
69
|
|
|
70
70
|
Track success/failure of each explorer for synthesis context.
|
|
71
71
|
|
|
72
|
-
### Phase
|
|
72
|
+
### Phase 4: Synthesize Exploration
|
|
73
73
|
|
|
74
|
-
**WAIT** for Phase
|
|
74
|
+
**WAIT** for Phase 3 to complete.
|
|
75
75
|
|
|
76
76
|
**CRITICAL**: Do NOT synthesize outputs yourself in the main session.
|
|
77
77
|
You MUST spawn the Synthesizer agent - "spawn Synthesizer" means delegate to the agent, not do the work yourself.
|
|
@@ -85,7 +85,7 @@ Failed explorations: {any failures}
|
|
|
85
85
|
Combine into: patterns, integration points, reusable code, edge cases"
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
### Phase
|
|
88
|
+
### Phase 5: Plan (Parallel)
|
|
89
89
|
|
|
90
90
|
Spawn 3 Plan agents **in a single message**, each with exploration synthesis:
|
|
91
91
|
|
|
@@ -109,9 +109,9 @@ Spawn 3 Plan agents **in a single message**, each with exploration synthesis:
|
|
|
109
109
|
- **HIGH**: 20-30 files, multiple modules → SEQUENTIAL_CODERS (2-3 phases)
|
|
110
110
|
- **CRITICAL**: >30 files, cross-cutting concerns → SEQUENTIAL_CODERS (more phases)
|
|
111
111
|
|
|
112
|
-
### Phase
|
|
112
|
+
### Phase 6: Synthesize Planning
|
|
113
113
|
|
|
114
|
-
**WAIT** for Phase
|
|
114
|
+
**WAIT** for Phase 5 to complete.
|
|
115
115
|
|
|
116
116
|
**CRITICAL**: Do NOT synthesize outputs yourself in the main session.
|
|
117
117
|
You MUST spawn the Synthesizer agent - "spawn Synthesizer" means delegate to the agent, not do the work yourself.
|
|
@@ -130,9 +130,9 @@ Combine into: execution plan with strategy decision (SINGLE_CODER | SEQUENTIAL_C
|
|
|
130
130
|
- Subtask breakdown with DOMAIN hints (if not SINGLE_CODER)
|
|
131
131
|
- Implementation plan with dependencies
|
|
132
132
|
|
|
133
|
-
### Phase
|
|
133
|
+
### Phase 7: Implement
|
|
134
134
|
|
|
135
|
-
Based on Phase
|
|
135
|
+
Based on Phase 6 synthesis, use the three-strategy framework:
|
|
136
136
|
|
|
137
137
|
**Strategy Selection** (from Execution Strategy planner):
|
|
138
138
|
|
|
@@ -191,11 +191,7 @@ FILES_FROM_PRIOR_PHASE: {list of files created}
|
|
|
191
191
|
HANDOFF_REQUIRED: {true if not last phase}"
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
**Handoff Protocol**: Each sequential Coder receives the prior Coder's implementation summary. The
|
|
195
|
-
1. Check git log to see commits from previous phases
|
|
196
|
-
2. Read actual files created - do not trust summary alone
|
|
197
|
-
3. Identify patterns from actual code (naming, error handling, testing)
|
|
198
|
-
4. Reference handoff summary to validate understanding
|
|
194
|
+
**Handoff Protocol**: Each sequential Coder receives the prior Coder's implementation summary via PRIOR_PHASE_SUMMARY and FILES_FROM_PRIOR_PHASE. The Coder's built-in branch orientation step handles git log scanning, file reading, and pattern discovery automatically.
|
|
199
195
|
|
|
200
196
|
---
|
|
201
197
|
|
|
@@ -229,7 +225,7 @@ DOMAIN: {subtask 2 domain}"
|
|
|
229
225
|
- Different files/modules with no imports between them
|
|
230
226
|
- Each subtask is self-contained
|
|
231
227
|
|
|
232
|
-
### Phase
|
|
228
|
+
### Phase 8: Validate
|
|
233
229
|
|
|
234
230
|
After Coder completes, spawn Validator to verify correctness:
|
|
235
231
|
|
|
@@ -254,12 +250,12 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
254
250
|
SCOPE: Fix only the listed failures, no other changes
|
|
255
251
|
CREATE_PR: false"
|
|
256
252
|
```
|
|
257
|
-
- Loop back to Phase
|
|
253
|
+
- Loop back to Phase 8 (re-validate)
|
|
258
254
|
4. If `validation_retry_count > 2`: Report failures to user and halt
|
|
259
255
|
|
|
260
|
-
**If PASS:** Continue to Phase
|
|
256
|
+
**If PASS:** Continue to Phase 9
|
|
261
257
|
|
|
262
|
-
### Phase
|
|
258
|
+
### Phase 9: Simplify
|
|
263
259
|
|
|
264
260
|
After validation passes, spawn Simplifier to polish the code:
|
|
265
261
|
|
|
@@ -271,7 +267,7 @@ FILES_CHANGED: {list of files from Coder output}
|
|
|
271
267
|
Focus on code modified by Coder, apply project standards, enhance clarity"
|
|
272
268
|
```
|
|
273
269
|
|
|
274
|
-
### Phase
|
|
270
|
+
### Phase 10: Self-Review
|
|
275
271
|
|
|
276
272
|
After Simplifier completes, spawn Scrutinizer as final quality gate:
|
|
277
273
|
|
|
@@ -284,7 +280,7 @@ Evaluate 9 pillars, fix P0/P1 issues, report status"
|
|
|
284
280
|
|
|
285
281
|
If Scrutinizer returns BLOCKED, report to user and halt.
|
|
286
282
|
|
|
287
|
-
### Phase
|
|
283
|
+
### Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
288
284
|
|
|
289
285
|
If Scrutinizer made code changes (status: FIXED), spawn Validator to verify:
|
|
290
286
|
|
|
@@ -297,22 +293,22 @@ Verify Scrutinizer's fixes didn't break anything."
|
|
|
297
293
|
|
|
298
294
|
**If FAIL:** Report to user - Scrutinizer broke tests, needs manual intervention.
|
|
299
295
|
|
|
300
|
-
**If PASS:** Continue to Phase
|
|
296
|
+
**If PASS:** Continue to Phase 12
|
|
301
297
|
|
|
302
|
-
### Phase
|
|
298
|
+
### Phase 12: Alignment Check
|
|
303
299
|
|
|
304
300
|
After Scrutinizer passes (and re-validation if needed), spawn Shepherd to validate alignment:
|
|
305
301
|
|
|
306
302
|
```
|
|
307
303
|
Task(subagent_type="Shepherd"):
|
|
308
304
|
"ORIGINAL_REQUEST: {task description or issue content}
|
|
309
|
-
EXECUTION_PLAN: {synthesized plan from Phase
|
|
305
|
+
EXECUTION_PLAN: {synthesized plan from Phase 6}
|
|
310
306
|
FILES_CHANGED: {list of files from Coder output}
|
|
311
307
|
ACCEPTANCE_CRITERIA: {extracted criteria if available}
|
|
312
308
|
Validate alignment with request and plan. Report ALIGNED or MISALIGNED with details."
|
|
313
309
|
```
|
|
314
310
|
|
|
315
|
-
**If ALIGNED:** Continue to Phase
|
|
311
|
+
**If ALIGNED:** Continue to Phase 13
|
|
316
312
|
|
|
317
313
|
**If MISALIGNED:**
|
|
318
314
|
1. Extract misalignment details from Shepherd output
|
|
@@ -335,19 +331,26 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
|
|
|
335
331
|
VALIDATION_SCOPE: changed-only"
|
|
336
332
|
```
|
|
337
333
|
- If Validator FAIL: Report to user
|
|
338
|
-
- If Validator PASS: Loop back to Phase
|
|
334
|
+
- If Validator PASS: Loop back to Phase 12 (re-check alignment)
|
|
339
335
|
4. If `alignment_fix_count > 2`: Report misalignments to user for decision
|
|
340
336
|
|
|
341
|
-
### Phase
|
|
337
|
+
### Phase 13: Create PR
|
|
342
338
|
|
|
343
339
|
**For SEQUENTIAL_CODERS or PARALLEL_CODERS**: The last sequential Coder (with CREATE_PR: true) handles PR creation. For parallel coders, create unified PR using `git-workflow` skill patterns. Push branch and run `gh pr create` with comprehensive description, targeting `BASE_BRANCH`.
|
|
344
340
|
|
|
345
341
|
**For SINGLE_CODER**: PR is created by the Coder agent (CREATE_PR: true).
|
|
346
342
|
|
|
347
|
-
### Phase
|
|
343
|
+
### Phase 14: Report
|
|
348
344
|
|
|
349
345
|
Display completion summary with phase status, PR info, and next steps.
|
|
350
346
|
|
|
347
|
+
### Phase 15: Record Decisions (if any)
|
|
348
|
+
|
|
349
|
+
If the Coder's report includes Key Decisions with architectural significance:
|
|
350
|
+
1. Read `~/.claude/skills/knowledge-persistence/SKILL.md` and follow its extraction procedure to record decisions to `.memory/knowledge/decisions.md`
|
|
351
|
+
2. Source field: `/implement {TASK_ID}`
|
|
352
|
+
3. Skip entirely if no architectural decisions were made
|
|
353
|
+
|
|
351
354
|
## Architecture
|
|
352
355
|
|
|
353
356
|
```
|
|
@@ -356,54 +359,56 @@ Display completion summary with phase status, PR info, and next steps.
|
|
|
356
359
|
├─ Phase 1: Setup
|
|
357
360
|
│ └─ Git agent (operation: setup-task) - creates feature branch, fetches issue
|
|
358
361
|
│
|
|
359
|
-
├─ Phase
|
|
362
|
+
├─ Phase 2: Orient
|
|
360
363
|
│ └─ Skimmer agent (codebase overview via skim)
|
|
361
364
|
│
|
|
362
|
-
├─ Phase
|
|
365
|
+
├─ Phase 3: Explore (PARALLEL, with Skimmer context)
|
|
363
366
|
│ ├─ Explore: Architecture
|
|
364
367
|
│ ├─ Explore: Integration
|
|
365
368
|
│ ├─ Explore: Reusable code
|
|
366
369
|
│ └─ Explore: Edge cases
|
|
367
370
|
│
|
|
368
|
-
├─ Phase
|
|
371
|
+
├─ Phase 4: Synthesize Exploration
|
|
369
372
|
│ └─ Synthesizer agent (mode: exploration)
|
|
370
373
|
│
|
|
371
|
-
├─ Phase
|
|
374
|
+
├─ Phase 5: Plan (PARALLEL)
|
|
372
375
|
│ ├─ Plan: Implementation steps
|
|
373
376
|
│ ├─ Plan: Testing strategy
|
|
374
377
|
│ └─ Plan: Execution strategy (3-strategy decision)
|
|
375
378
|
│
|
|
376
|
-
├─ Phase
|
|
379
|
+
├─ Phase 6: Synthesize Planning
|
|
377
380
|
│ └─ Synthesizer agent (mode: planning) → returns strategy + DOMAIN hints
|
|
378
381
|
│
|
|
379
|
-
├─ Phase
|
|
382
|
+
├─ Phase 7: Implement (3-strategy framework)
|
|
380
383
|
│ ├─ SINGLE_CODER (80%): One Coder, full plan, CREATE_PR: true
|
|
381
384
|
│ ├─ SEQUENTIAL_CODERS (15%): N Coders with handoff summaries
|
|
382
385
|
│ └─ PARALLEL_CODERS (5%): N Coders in single message (rare)
|
|
383
386
|
│
|
|
384
|
-
├─ Phase
|
|
387
|
+
├─ Phase 8: Validate
|
|
385
388
|
│ └─ Validator agent (build, typecheck, lint, test)
|
|
386
389
|
│ └─ If FAIL: Coder fix loop (max 2 retries) → re-validate
|
|
387
390
|
│
|
|
388
|
-
├─ Phase
|
|
391
|
+
├─ Phase 9: Simplify
|
|
389
392
|
│ └─ Simplifier agent (refines code clarity and consistency)
|
|
390
393
|
│
|
|
391
|
-
├─ Phase
|
|
394
|
+
├─ Phase 10: Self-Review
|
|
392
395
|
│ └─ Scrutinizer agent (final quality gate, fixes P0/P1)
|
|
393
396
|
│
|
|
394
|
-
├─ Phase
|
|
397
|
+
├─ Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
395
398
|
│ └─ Validator agent (verify Scrutinizer fixes)
|
|
396
399
|
│
|
|
397
|
-
├─ Phase
|
|
400
|
+
├─ Phase 12: Alignment Check
|
|
398
401
|
│ └─ Shepherd agent (validates alignment - reports only, no fixes)
|
|
399
402
|
│ └─ If MISALIGNED: Coder fix loop (max 2 iterations) → Validator → re-check
|
|
400
403
|
│
|
|
401
|
-
├─ Phase
|
|
404
|
+
├─ Phase 13: Create PR (if needed)
|
|
402
405
|
│ └─ SINGLE_CODER: handled by Coder
|
|
403
406
|
│ └─ SEQUENTIAL: handled by last Coder
|
|
404
407
|
│ └─ PARALLEL: orchestrator creates unified PR
|
|
405
408
|
│
|
|
406
|
-
|
|
409
|
+
├─ Phase 14: Display agent outputs
|
|
410
|
+
│
|
|
411
|
+
└─ Phase 15: Record Decisions (inline, if any)
|
|
407
412
|
```
|
|
408
413
|
|
|
409
414
|
## Principles
|