devflow-kit 1.5.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 +37 -0
- package/README.md +6 -3
- package/dist/commands/ambient.js +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/plugins.js +23 -23
- 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 -35
- 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 +10 -9
- package/plugins/devflow-code-review/commands/code-review-teams.md +43 -30
- package/plugins/devflow-code-review/commands/code-review.md +10 -1
- 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 +1 -1
- package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +7 -1
- 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 +6 -1
- package/plugins/devflow-implement/agents/simplifier.md +32 -1
- package/plugins/devflow-implement/agents/skimmer.md +5 -0
- package/plugins/devflow-implement/commands/implement-teams.md +72 -55
- package/plugins/devflow-implement/commands/implement.md +44 -35
- 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/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 +6 -1
- package/shared/agents/reviewer.md +10 -9
- package/shared/agents/simplifier.md +32 -1
- package/shared/agents/skimmer.md +5 -0
- package/shared/skills/ambient-router/SKILL.md +72 -28
- package/shared/skills/ambient-router/references/skill-catalog.md +40 -35
- 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/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
|
|
|
@@ -352,7 +360,7 @@ DOMAIN: {subtask 2 domain}"
|
|
|
352
360
|
- Different files/modules with no imports between them
|
|
353
361
|
- Each subtask is self-contained
|
|
354
362
|
|
|
355
|
-
### Phase
|
|
363
|
+
### Phase 8: Validate
|
|
356
364
|
|
|
357
365
|
After Coder completes, spawn Validator to verify correctness:
|
|
358
366
|
|
|
@@ -377,12 +385,12 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
377
385
|
SCOPE: Fix only the listed failures, no other changes
|
|
378
386
|
CREATE_PR: false"
|
|
379
387
|
```
|
|
380
|
-
- Loop back to Phase
|
|
388
|
+
- Loop back to Phase 8 (re-validate)
|
|
381
389
|
4. If `validation_retry_count > 2`: Report failures to user and halt
|
|
382
390
|
|
|
383
|
-
**If PASS:** Continue to Phase
|
|
391
|
+
**If PASS:** Continue to Phase 9
|
|
384
392
|
|
|
385
|
-
### Phase
|
|
393
|
+
### Phase 9: Simplify
|
|
386
394
|
|
|
387
395
|
After validation passes, spawn Simplifier to polish the code:
|
|
388
396
|
|
|
@@ -394,7 +402,7 @@ FILES_CHANGED: {list of files from Coder output}
|
|
|
394
402
|
Focus on code modified by Coder, apply project standards, enhance clarity"
|
|
395
403
|
```
|
|
396
404
|
|
|
397
|
-
### Phase
|
|
405
|
+
### Phase 10: Self-Review
|
|
398
406
|
|
|
399
407
|
After Simplifier completes, spawn Scrutinizer as final quality gate:
|
|
400
408
|
|
|
@@ -407,7 +415,7 @@ Evaluate 9 pillars, fix P0/P1 issues, report status"
|
|
|
407
415
|
|
|
408
416
|
If Scrutinizer returns BLOCKED, report to user and halt.
|
|
409
417
|
|
|
410
|
-
### Phase
|
|
418
|
+
### Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
411
419
|
|
|
412
420
|
If Scrutinizer made code changes (status: FIXED), spawn Validator to verify:
|
|
413
421
|
|
|
@@ -420,9 +428,9 @@ Verify Scrutinizer's fixes didn't break anything."
|
|
|
420
428
|
|
|
421
429
|
**If FAIL:** Report to user - Scrutinizer broke tests, needs manual intervention.
|
|
422
430
|
|
|
423
|
-
**If PASS:** Continue to Phase
|
|
431
|
+
**If PASS:** Continue to Phase 12
|
|
424
432
|
|
|
425
|
-
### Phase
|
|
433
|
+
### Phase 12: Shepherd↔Coder Dialogue
|
|
426
434
|
|
|
427
435
|
After Scrutinizer passes (and re-validation if needed), check alignment using direct dialogue:
|
|
428
436
|
|
|
@@ -437,7 +445,7 @@ Spawn teammates with self-contained prompts:
|
|
|
437
445
|
Prompt: |
|
|
438
446
|
You are validating that the implementation aligns with the original request.
|
|
439
447
|
ORIGINAL_REQUEST: {task description or issue content}
|
|
440
|
-
EXECUTION_PLAN: {synthesized plan from Phase
|
|
448
|
+
EXECUTION_PLAN: {synthesized plan from Phase 6}
|
|
441
449
|
FILES_CHANGED: {list of files from Coder output}
|
|
442
450
|
ACCEPTANCE_CRITERIA: {extracted criteria if available}
|
|
443
451
|
|
|
@@ -472,7 +480,7 @@ Spawn teammates with self-contained prompts:
|
|
|
472
480
|
summary: "Alignment fixes complete")
|
|
473
481
|
```
|
|
474
482
|
|
|
475
|
-
**Team Shutdown Protocol** (must complete before Phase
|
|
483
|
+
**Team Shutdown Protocol** (must complete before Phase 13):
|
|
476
484
|
|
|
477
485
|
```
|
|
478
486
|
Step 1: Shutdown each teammate
|
|
@@ -487,7 +495,7 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
487
495
|
If retry failed → HALT and report: "Alignment team cleanup failed."
|
|
488
496
|
```
|
|
489
497
|
|
|
490
|
-
**If ALIGNED:** Continue to Phase
|
|
498
|
+
**If ALIGNED:** Continue to Phase 13
|
|
491
499
|
|
|
492
500
|
**If MISALIGNED:**
|
|
493
501
|
1. Extract misalignment details from Shepherd output
|
|
@@ -510,19 +518,26 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
510
518
|
VALIDATION_SCOPE: changed-only"
|
|
511
519
|
```
|
|
512
520
|
- If Validator FAIL: Report to user
|
|
513
|
-
- If Validator PASS: Loop back to Phase
|
|
521
|
+
- If Validator PASS: Loop back to Phase 12 (re-check alignment)
|
|
514
522
|
4. If `alignment_fix_count > 2`: Report misalignments to user for decision
|
|
515
523
|
|
|
516
|
-
### Phase
|
|
524
|
+
### Phase 13: Create PR
|
|
517
525
|
|
|
518
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`.
|
|
519
527
|
|
|
520
528
|
**For SINGLE_CODER**: PR is created by the Coder agent (CREATE_PR: true).
|
|
521
529
|
|
|
522
|
-
### Phase
|
|
530
|
+
### Phase 14: Report
|
|
523
531
|
|
|
524
532
|
Display completion summary with phase status, PR info, and next steps.
|
|
525
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
|
+
|
|
526
541
|
## Architecture
|
|
527
542
|
|
|
528
543
|
```
|
|
@@ -531,55 +546,57 @@ Display completion summary with phase status, PR info, and next steps.
|
|
|
531
546
|
├─ Phase 1: Setup
|
|
532
547
|
│ └─ Git agent (operation: setup-task) - creates feature branch, fetches issue
|
|
533
548
|
│
|
|
534
|
-
├─ Phase
|
|
549
|
+
├─ Phase 2: Orient
|
|
535
550
|
│ └─ Skimmer agent (codebase overview via skim)
|
|
536
551
|
│
|
|
537
|
-
├─ Phase
|
|
552
|
+
├─ Phase 3: Exploration Team (Agent Teams)
|
|
538
553
|
│ ├─ Architecture Explorer (teammate)
|
|
539
554
|
│ ├─ Integration Explorer (teammate)
|
|
540
555
|
│ ├─ Reusable Code Explorer (teammate)
|
|
541
556
|
│ ├─ Edge Case Explorer (teammate)
|
|
542
557
|
│ └─ Debate → consensus exploration findings
|
|
543
558
|
│
|
|
544
|
-
├─ Phase
|
|
559
|
+
├─ Phase 4: Synthesize Exploration
|
|
545
560
|
│ └─ Synthesizer agent (mode: exploration)
|
|
546
561
|
│
|
|
547
|
-
├─ Phase
|
|
562
|
+
├─ Phase 5: Planning Team (Agent Teams)
|
|
548
563
|
│ ├─ Implementation Planner (teammate)
|
|
549
564
|
│ ├─ Testing Planner (teammate)
|
|
550
565
|
│ ├─ Risk & Execution Planner (teammate)
|
|
551
566
|
│ └─ Debate → consensus plan with strategy decision
|
|
552
567
|
│
|
|
553
|
-
├─ Phase
|
|
568
|
+
├─ Phase 6: Synthesize Planning
|
|
554
569
|
│ └─ Synthesizer agent (mode: planning) → returns strategy + DOMAIN hints
|
|
555
570
|
│
|
|
556
|
-
├─ Phase
|
|
571
|
+
├─ Phase 7: Implement (3-strategy framework)
|
|
557
572
|
│ ├─ SINGLE_CODER (80%): One Coder, full plan, CREATE_PR: true
|
|
558
573
|
│ ├─ SEQUENTIAL_CODERS (15%): N Coders with handoff summaries
|
|
559
574
|
│ └─ PARALLEL_CODERS (5%): N Coders in single message (rare)
|
|
560
575
|
│
|
|
561
|
-
├─ Phase
|
|
576
|
+
├─ Phase 8: Validate
|
|
562
577
|
│ └─ Validator agent (build, typecheck, lint, test)
|
|
563
578
|
│ └─ If FAIL: Coder fix loop (max 2 retries) → re-validate
|
|
564
579
|
│
|
|
565
|
-
├─ Phase
|
|
580
|
+
├─ Phase 9: Simplify
|
|
566
581
|
│ └─ Simplifier agent (refines code clarity and consistency)
|
|
567
582
|
│
|
|
568
|
-
├─ Phase
|
|
583
|
+
├─ Phase 10: Self-Review
|
|
569
584
|
│ └─ Scrutinizer agent (final quality gate, fixes P0/P1)
|
|
570
585
|
│
|
|
571
|
-
├─ Phase
|
|
586
|
+
├─ Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
572
587
|
│ └─ Validator agent (verify Scrutinizer fixes)
|
|
573
588
|
│
|
|
574
|
-
├─ Phase
|
|
589
|
+
├─ Phase 12: Shepherd↔Coder Dialogue (Agent Teams)
|
|
575
590
|
│ └─ Direct Shepherd↔Coder messaging (max 2 exchanges)
|
|
576
591
|
│
|
|
577
|
-
├─ Phase
|
|
592
|
+
├─ Phase 13: Create PR (if needed)
|
|
578
593
|
│ └─ SINGLE_CODER: handled by Coder
|
|
579
594
|
│ └─ SEQUENTIAL: handled by last Coder
|
|
580
595
|
│ └─ PARALLEL: orchestrator creates unified PR
|
|
581
596
|
│
|
|
582
|
-
|
|
597
|
+
├─ Phase 14: Display agent outputs
|
|
598
|
+
│
|
|
599
|
+
└─ Phase 15: Record Decisions (inline, if any)
|
|
583
600
|
```
|
|
584
601
|
|
|
585
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
|
|
|
@@ -225,7 +225,7 @@ DOMAIN: {subtask 2 domain}"
|
|
|
225
225
|
- Different files/modules with no imports between them
|
|
226
226
|
- Each subtask is self-contained
|
|
227
227
|
|
|
228
|
-
### Phase
|
|
228
|
+
### Phase 8: Validate
|
|
229
229
|
|
|
230
230
|
After Coder completes, spawn Validator to verify correctness:
|
|
231
231
|
|
|
@@ -250,12 +250,12 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
250
250
|
SCOPE: Fix only the listed failures, no other changes
|
|
251
251
|
CREATE_PR: false"
|
|
252
252
|
```
|
|
253
|
-
- Loop back to Phase
|
|
253
|
+
- Loop back to Phase 8 (re-validate)
|
|
254
254
|
4. If `validation_retry_count > 2`: Report failures to user and halt
|
|
255
255
|
|
|
256
|
-
**If PASS:** Continue to Phase
|
|
256
|
+
**If PASS:** Continue to Phase 9
|
|
257
257
|
|
|
258
|
-
### Phase
|
|
258
|
+
### Phase 9: Simplify
|
|
259
259
|
|
|
260
260
|
After validation passes, spawn Simplifier to polish the code:
|
|
261
261
|
|
|
@@ -267,7 +267,7 @@ FILES_CHANGED: {list of files from Coder output}
|
|
|
267
267
|
Focus on code modified by Coder, apply project standards, enhance clarity"
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
### Phase
|
|
270
|
+
### Phase 10: Self-Review
|
|
271
271
|
|
|
272
272
|
After Simplifier completes, spawn Scrutinizer as final quality gate:
|
|
273
273
|
|
|
@@ -280,7 +280,7 @@ Evaluate 9 pillars, fix P0/P1 issues, report status"
|
|
|
280
280
|
|
|
281
281
|
If Scrutinizer returns BLOCKED, report to user and halt.
|
|
282
282
|
|
|
283
|
-
### Phase
|
|
283
|
+
### Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
284
284
|
|
|
285
285
|
If Scrutinizer made code changes (status: FIXED), spawn Validator to verify:
|
|
286
286
|
|
|
@@ -293,22 +293,22 @@ Verify Scrutinizer's fixes didn't break anything."
|
|
|
293
293
|
|
|
294
294
|
**If FAIL:** Report to user - Scrutinizer broke tests, needs manual intervention.
|
|
295
295
|
|
|
296
|
-
**If PASS:** Continue to Phase
|
|
296
|
+
**If PASS:** Continue to Phase 12
|
|
297
297
|
|
|
298
|
-
### Phase
|
|
298
|
+
### Phase 12: Alignment Check
|
|
299
299
|
|
|
300
300
|
After Scrutinizer passes (and re-validation if needed), spawn Shepherd to validate alignment:
|
|
301
301
|
|
|
302
302
|
```
|
|
303
303
|
Task(subagent_type="Shepherd"):
|
|
304
304
|
"ORIGINAL_REQUEST: {task description or issue content}
|
|
305
|
-
EXECUTION_PLAN: {synthesized plan from Phase
|
|
305
|
+
EXECUTION_PLAN: {synthesized plan from Phase 6}
|
|
306
306
|
FILES_CHANGED: {list of files from Coder output}
|
|
307
307
|
ACCEPTANCE_CRITERIA: {extracted criteria if available}
|
|
308
308
|
Validate alignment with request and plan. Report ALIGNED or MISALIGNED with details."
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
**If ALIGNED:** Continue to Phase
|
|
311
|
+
**If ALIGNED:** Continue to Phase 13
|
|
312
312
|
|
|
313
313
|
**If MISALIGNED:**
|
|
314
314
|
1. Extract misalignment details from Shepherd output
|
|
@@ -331,19 +331,26 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
|
|
|
331
331
|
VALIDATION_SCOPE: changed-only"
|
|
332
332
|
```
|
|
333
333
|
- If Validator FAIL: Report to user
|
|
334
|
-
- If Validator PASS: Loop back to Phase
|
|
334
|
+
- If Validator PASS: Loop back to Phase 12 (re-check alignment)
|
|
335
335
|
4. If `alignment_fix_count > 2`: Report misalignments to user for decision
|
|
336
336
|
|
|
337
|
-
### Phase
|
|
337
|
+
### Phase 13: Create PR
|
|
338
338
|
|
|
339
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`.
|
|
340
340
|
|
|
341
341
|
**For SINGLE_CODER**: PR is created by the Coder agent (CREATE_PR: true).
|
|
342
342
|
|
|
343
|
-
### Phase
|
|
343
|
+
### Phase 14: Report
|
|
344
344
|
|
|
345
345
|
Display completion summary with phase status, PR info, and next steps.
|
|
346
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
|
+
|
|
347
354
|
## Architecture
|
|
348
355
|
|
|
349
356
|
```
|
|
@@ -352,54 +359,56 @@ Display completion summary with phase status, PR info, and next steps.
|
|
|
352
359
|
├─ Phase 1: Setup
|
|
353
360
|
│ └─ Git agent (operation: setup-task) - creates feature branch, fetches issue
|
|
354
361
|
│
|
|
355
|
-
├─ Phase
|
|
362
|
+
├─ Phase 2: Orient
|
|
356
363
|
│ └─ Skimmer agent (codebase overview via skim)
|
|
357
364
|
│
|
|
358
|
-
├─ Phase
|
|
365
|
+
├─ Phase 3: Explore (PARALLEL, with Skimmer context)
|
|
359
366
|
│ ├─ Explore: Architecture
|
|
360
367
|
│ ├─ Explore: Integration
|
|
361
368
|
│ ├─ Explore: Reusable code
|
|
362
369
|
│ └─ Explore: Edge cases
|
|
363
370
|
│
|
|
364
|
-
├─ Phase
|
|
371
|
+
├─ Phase 4: Synthesize Exploration
|
|
365
372
|
│ └─ Synthesizer agent (mode: exploration)
|
|
366
373
|
│
|
|
367
|
-
├─ Phase
|
|
374
|
+
├─ Phase 5: Plan (PARALLEL)
|
|
368
375
|
│ ├─ Plan: Implementation steps
|
|
369
376
|
│ ├─ Plan: Testing strategy
|
|
370
377
|
│ └─ Plan: Execution strategy (3-strategy decision)
|
|
371
378
|
│
|
|
372
|
-
├─ Phase
|
|
379
|
+
├─ Phase 6: Synthesize Planning
|
|
373
380
|
│ └─ Synthesizer agent (mode: planning) → returns strategy + DOMAIN hints
|
|
374
381
|
│
|
|
375
|
-
├─ Phase
|
|
382
|
+
├─ Phase 7: Implement (3-strategy framework)
|
|
376
383
|
│ ├─ SINGLE_CODER (80%): One Coder, full plan, CREATE_PR: true
|
|
377
384
|
│ ├─ SEQUENTIAL_CODERS (15%): N Coders with handoff summaries
|
|
378
385
|
│ └─ PARALLEL_CODERS (5%): N Coders in single message (rare)
|
|
379
386
|
│
|
|
380
|
-
├─ Phase
|
|
387
|
+
├─ Phase 8: Validate
|
|
381
388
|
│ └─ Validator agent (build, typecheck, lint, test)
|
|
382
389
|
│ └─ If FAIL: Coder fix loop (max 2 retries) → re-validate
|
|
383
390
|
│
|
|
384
|
-
├─ Phase
|
|
391
|
+
├─ Phase 9: Simplify
|
|
385
392
|
│ └─ Simplifier agent (refines code clarity and consistency)
|
|
386
393
|
│
|
|
387
|
-
├─ Phase
|
|
394
|
+
├─ Phase 10: Self-Review
|
|
388
395
|
│ └─ Scrutinizer agent (final quality gate, fixes P0/P1)
|
|
389
396
|
│
|
|
390
|
-
├─ Phase
|
|
397
|
+
├─ Phase 11: Re-Validate (if Scrutinizer made changes)
|
|
391
398
|
│ └─ Validator agent (verify Scrutinizer fixes)
|
|
392
399
|
│
|
|
393
|
-
├─ Phase
|
|
400
|
+
├─ Phase 12: Alignment Check
|
|
394
401
|
│ └─ Shepherd agent (validates alignment - reports only, no fixes)
|
|
395
402
|
│ └─ If MISALIGNED: Coder fix loop (max 2 iterations) → Validator → re-check
|
|
396
403
|
│
|
|
397
|
-
├─ Phase
|
|
404
|
+
├─ Phase 13: Create PR (if needed)
|
|
398
405
|
│ └─ SINGLE_CODER: handled by Coder
|
|
399
406
|
│ └─ SEQUENTIAL: handled by last Coder
|
|
400
407
|
│ └─ PARALLEL: orchestrator creates unified PR
|
|
401
408
|
│
|
|
402
|
-
|
|
409
|
+
├─ Phase 14: Display agent outputs
|
|
410
|
+
│
|
|
411
|
+
└─ Phase 15: Record Decisions (inline, if any)
|
|
403
412
|
```
|
|
404
413
|
|
|
405
414
|
## Principles
|