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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Skimmer
|
|
3
3
|
description: Codebase orientation using skim to identify relevant files, functions, and patterns for a feature or task
|
|
4
|
+
skills: knowledge-persistence
|
|
4
5
|
model: inherit
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -20,6 +21,7 @@ You receive from orchestrator:
|
|
|
20
21
|
3. **Search for task-relevant code** - Find files matching task keywords
|
|
21
22
|
4. **Identify integration points** - Exports, entry points, import patterns
|
|
22
23
|
5. **Generate orientation summary** - Structured output for implementation planning
|
|
24
|
+
6. **Check project knowledge** - If `.memory/knowledge/decisions.md` exists, read its `<!-- TL;DR: ... -->` first-line comment and include active decision count in orientation under "### Active Decisions". Only the TL;DR is read here (not full entries) — this is intentional for token efficiency; agents that need full entries read the file themselves.
|
|
23
25
|
|
|
24
26
|
## Tool Invocation
|
|
25
27
|
|
|
@@ -64,6 +66,9 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
|
|
|
64
66
|
### Patterns Observed
|
|
65
67
|
{Existing patterns to follow}
|
|
66
68
|
|
|
69
|
+
### Active Decisions
|
|
70
|
+
{Count and key decisions from `.memory/knowledge/decisions.md` TL;DR, or "None found" if file missing}
|
|
71
|
+
|
|
67
72
|
### Suggested Approach
|
|
68
73
|
{Brief recommendation based on codebase structure}
|
|
69
74
|
```
|
|
@@ -128,10 +128,14 @@ Analyze 3 axes to determine strategy:
|
|
|
128
128
|
Synthesize outputs from multiple Reviewer agents. Apply strict merge rules.
|
|
129
129
|
|
|
130
130
|
**Process:**
|
|
131
|
-
1. Read all review reports from `${REVIEW_BASE_DIR}
|
|
132
|
-
2.
|
|
133
|
-
3.
|
|
134
|
-
|
|
131
|
+
1. Read all review reports from `${REVIEW_BASE_DIR}/*.md` (exclude your own output `review-summary.*.md`)
|
|
132
|
+
2. Extract confidence percentages from each finding
|
|
133
|
+
3. Apply confidence-aware aggregation: when multiple reviewers flag the same file:line, boost confidence by 10% per additional reviewer (cap at 100%)
|
|
134
|
+
<!-- Confidence threshold also in: shared/agents/reviewer.md, plugins/devflow-code-review/commands/code-review.md -->
|
|
135
|
+
4. Maintain ≥80% confidence threshold in final output
|
|
136
|
+
5. Categorize issues into 3 buckets (from review-methodology)
|
|
137
|
+
6. Count by severity (CRITICAL, HIGH, MEDIUM, LOW)
|
|
138
|
+
7. Determine merge recommendation based on blocking issues
|
|
135
139
|
|
|
136
140
|
**Issue Categories:**
|
|
137
141
|
- **Blocking** (Category 1): Issues in YOUR changes - CRITICAL/HIGH must block
|
|
@@ -172,7 +176,10 @@ Report format:
|
|
|
172
176
|
| Pre-existing | - | - | {n} | {n} | {n} |
|
|
173
177
|
|
|
174
178
|
## Blocking Issues
|
|
175
|
-
{List with file:line and suggested fix}
|
|
179
|
+
{List with file:line, confidence %, and suggested fix}
|
|
180
|
+
|
|
181
|
+
## Suggestions (Lower Confidence)
|
|
182
|
+
{Max 5 items across all reviewers with 60-79% confidence. Brief descriptions only.}
|
|
176
183
|
|
|
177
184
|
## Action Plan
|
|
178
185
|
1. {Priority fix}
|
|
@@ -57,7 +57,11 @@ Find: project structure, similar features, patterns, integration points
|
|
|
57
57
|
Return: codebase context for requirements (not implementation details)"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### Phase 3:
|
|
60
|
+
### Phase 3: Load Project Knowledge
|
|
61
|
+
|
|
62
|
+
Read `.memory/knowledge/decisions.md` and `.memory/knowledge/pitfalls.md`. Pass their content as context to the exploration team below — prior decisions constrain requirements, known pitfalls inform failure modes.
|
|
63
|
+
|
|
64
|
+
### Phase 4: Explore Requirements (Agent Teams)
|
|
61
65
|
|
|
62
66
|
Create an agent team for collaborative requirements exploration:
|
|
63
67
|
|
|
@@ -122,7 +126,7 @@ Max 2 debate rounds, then submit consensus requirements findings.
|
|
|
122
126
|
|
|
123
127
|
**Exploration team output**: Consensus findings on user needs, similar features, constraints, failure modes.
|
|
124
128
|
|
|
125
|
-
**Team Shutdown Protocol** (must complete before Phase
|
|
129
|
+
**Team Shutdown Protocol** (must complete before Phase 6):
|
|
126
130
|
|
|
127
131
|
```
|
|
128
132
|
Step 1: Shutdown each teammate
|
|
@@ -139,9 +143,9 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
139
143
|
If retry failed → HALT and report: "Exploration team cleanup failed. Cannot create planning team."
|
|
140
144
|
```
|
|
141
145
|
|
|
142
|
-
### Phase
|
|
146
|
+
### Phase 5: Synthesize Exploration
|
|
143
147
|
|
|
144
|
-
**WAIT** for Phase
|
|
148
|
+
**WAIT** for Phase 4, then spawn Synthesizer:
|
|
145
149
|
|
|
146
150
|
```
|
|
147
151
|
Task(subagent_type="Synthesizer"):
|
|
@@ -151,7 +155,7 @@ Explorer consensus: {team exploration consensus output}
|
|
|
151
155
|
Combine into: user needs, similar features, constraints, failure modes"
|
|
152
156
|
```
|
|
153
157
|
|
|
154
|
-
### Phase
|
|
158
|
+
### Phase 6: Plan Scope (Agent Teams)
|
|
155
159
|
|
|
156
160
|
Create an agent team for collaborative scope planning:
|
|
157
161
|
|
|
@@ -164,7 +168,7 @@ Spawn planning teammates with self-contained prompts:
|
|
|
164
168
|
Prompt: |
|
|
165
169
|
You are planning scope for feature: {feature}
|
|
166
170
|
Exploration synthesis (what we know):
|
|
167
|
-
{synthesis output from Phase
|
|
171
|
+
{synthesis output from Phase 5}
|
|
168
172
|
|
|
169
173
|
Your deliverable: User stories in "As X, I want Y, so that Z" format.
|
|
170
174
|
Cover all actors, actions, and outcomes identified in exploration.
|
|
@@ -175,7 +179,7 @@ Spawn planning teammates with self-contained prompts:
|
|
|
175
179
|
Prompt: |
|
|
176
180
|
You are planning scope for feature: {feature}
|
|
177
181
|
Exploration synthesis (what we know):
|
|
178
|
-
{synthesis output from Phase
|
|
182
|
+
{synthesis output from Phase 5}
|
|
179
183
|
|
|
180
184
|
Your deliverable: v1 MVP scope, v2 deferred items, explicitly out of scope,
|
|
181
185
|
and dependencies on other features or systems.
|
|
@@ -186,7 +190,7 @@ Spawn planning teammates with self-contained prompts:
|
|
|
186
190
|
Prompt: |
|
|
187
191
|
You are planning scope for feature: {feature}
|
|
188
192
|
Exploration synthesis (what we know):
|
|
189
|
-
{synthesis output from Phase
|
|
193
|
+
{synthesis output from Phase 5}
|
|
190
194
|
|
|
191
195
|
Your deliverable: Testable acceptance criteria for success cases,
|
|
192
196
|
failure cases, and edge cases. Every criterion must be verifiable.
|
|
@@ -221,9 +225,9 @@ Step 3: GATE — Verify TeamDelete succeeded
|
|
|
221
225
|
If retry failed → HALT and report: "Planning team cleanup failed. Cannot proceed to Gate 1."
|
|
222
226
|
```
|
|
223
227
|
|
|
224
|
-
### Phase
|
|
228
|
+
### Phase 7: Synthesize Planning
|
|
225
229
|
|
|
226
|
-
**WAIT** for Phase
|
|
230
|
+
**WAIT** for Phase 6, then spawn Synthesizer:
|
|
227
231
|
|
|
228
232
|
```
|
|
229
233
|
Task(subagent_type="Synthesizer"):
|
|
@@ -233,7 +237,7 @@ Planner consensus: {team planning consensus output}
|
|
|
233
237
|
Combine into: user stories, scope breakdown, acceptance criteria, open questions"
|
|
234
238
|
```
|
|
235
239
|
|
|
236
|
-
### Phase
|
|
240
|
+
### Phase 8: Gate 1 - Validate Scope
|
|
237
241
|
|
|
238
242
|
Use AskUserQuestion to validate:
|
|
239
243
|
- Primary problem being solved
|
|
@@ -241,14 +245,14 @@ Use AskUserQuestion to validate:
|
|
|
241
245
|
- v1 scope selection (minimal/medium/full)
|
|
242
246
|
- Explicit exclusions
|
|
243
247
|
|
|
244
|
-
### Phase
|
|
248
|
+
### Phase 9: Gate 2 - Confirm Criteria
|
|
245
249
|
|
|
246
250
|
Present specification summary, then use AskUserQuestion for final confirmation:
|
|
247
251
|
- Success UX pattern
|
|
248
252
|
- Error handling approach
|
|
249
253
|
- Ready to create issue / Needs changes / Cancel
|
|
250
254
|
|
|
251
|
-
### Phase
|
|
255
|
+
### Phase 10: Create Issue
|
|
252
256
|
|
|
253
257
|
Create GitHub issue with `gh issue create`:
|
|
254
258
|
- Title: feature name
|
|
@@ -268,32 +272,35 @@ Report issue number and URL.
|
|
|
268
272
|
├─ Phase 2: Orient
|
|
269
273
|
│ └─ Skimmer agent (codebase context via skim)
|
|
270
274
|
│
|
|
271
|
-
├─ Phase 3:
|
|
275
|
+
├─ Phase 3: Load Project Knowledge
|
|
276
|
+
│ └─ Read decisions.md + pitfalls.md
|
|
277
|
+
│
|
|
278
|
+
├─ Phase 4: Explore Requirements (Agent Teams)
|
|
272
279
|
│ ├─ User Perspective Explorer (teammate)
|
|
273
280
|
│ ├─ Similar Features Explorer (teammate)
|
|
274
281
|
│ ├─ Constraints Explorer (teammate)
|
|
275
282
|
│ ├─ Failure Mode Explorer (teammate)
|
|
276
283
|
│ └─ Debate → consensus requirements findings
|
|
277
284
|
│
|
|
278
|
-
├─ Phase
|
|
285
|
+
├─ Phase 5: Synthesize Exploration
|
|
279
286
|
│ └─ Synthesizer agent (mode: exploration)
|
|
280
287
|
│
|
|
281
|
-
├─ Phase
|
|
288
|
+
├─ Phase 6: Plan Scope (Agent Teams)
|
|
282
289
|
│ ├─ User Stories Planner (teammate)
|
|
283
290
|
│ ├─ Scope Boundaries Planner (teammate)
|
|
284
291
|
│ ├─ Acceptance Criteria Planner (teammate)
|
|
285
292
|
│ └─ Debate → consensus scope plan
|
|
286
293
|
│
|
|
287
|
-
├─ Phase
|
|
294
|
+
├─ Phase 7: Synthesize Planning
|
|
288
295
|
│ └─ Synthesizer agent (mode: planning)
|
|
289
296
|
│
|
|
290
|
-
├─ Phase
|
|
297
|
+
├─ Phase 8: GATE 1 - Validate Scope ⛔ MANDATORY
|
|
291
298
|
│ └─ AskUserQuestion: Confirm scope and priorities
|
|
292
299
|
│
|
|
293
|
-
├─ Phase
|
|
300
|
+
├─ Phase 9: GATE 2 - Confirm Criteria ⛔ MANDATORY
|
|
294
301
|
│ └─ AskUserQuestion: Final spec approval
|
|
295
302
|
│
|
|
296
|
-
├─ Phase
|
|
303
|
+
├─ Phase 10: Create Issue
|
|
297
304
|
│ └─ gh issue create
|
|
298
305
|
│
|
|
299
306
|
└─ Report: Issue number, URL, /implement command
|
|
@@ -57,20 +57,24 @@ Find: project structure, similar features, patterns, integration points
|
|
|
57
57
|
Return: codebase context for requirements (not implementation details)"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### Phase 3:
|
|
60
|
+
### Phase 3: Load Project Knowledge
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Read `.memory/knowledge/decisions.md` and `.memory/knowledge/pitfalls.md`. Pass their content as context to the Explore agents below — prior decisions constrain requirements, known pitfalls inform failure modes.
|
|
63
|
+
|
|
64
|
+
### Phase 4: Explore Requirements (Parallel)
|
|
65
|
+
|
|
66
|
+
Spawn 4 Explore agents **in a single message**, each with Skimmer context and project knowledge (if loaded):
|
|
63
67
|
|
|
64
68
|
| Focus | Thoroughness | Find |
|
|
65
69
|
|-------|-------------|------|
|
|
66
70
|
| User perspective | medium | Target users, goals, pain points, user journeys |
|
|
67
71
|
| Similar features | medium | Comparable features, scope patterns, edge cases |
|
|
68
|
-
| Constraints | quick | Dependencies, business rules, security, performance |
|
|
69
|
-
| Failure modes | quick | Error states, edge cases, validation needs |
|
|
72
|
+
| Constraints | quick | Dependencies, business rules, security, performance, **prior architectural decisions** |
|
|
73
|
+
| Failure modes | quick | Error states, edge cases, validation needs, **known pitfalls** |
|
|
70
74
|
|
|
71
|
-
### Phase
|
|
75
|
+
### Phase 5: Synthesize Exploration
|
|
72
76
|
|
|
73
|
-
**WAIT** for Phase
|
|
77
|
+
**WAIT** for Phase 4, then spawn Synthesizer:
|
|
74
78
|
|
|
75
79
|
```
|
|
76
80
|
Task(subagent_type="Synthesizer"):
|
|
@@ -79,7 +83,7 @@ Mode: exploration
|
|
|
79
83
|
Combine into: user needs, similar features, constraints, failure modes"
|
|
80
84
|
```
|
|
81
85
|
|
|
82
|
-
### Phase
|
|
86
|
+
### Phase 6: Plan Scope (Parallel)
|
|
83
87
|
|
|
84
88
|
Spawn 3 Plan agents **in a single message**, each with exploration synthesis:
|
|
85
89
|
|
|
@@ -89,9 +93,9 @@ Spawn 3 Plan agents **in a single message**, each with exploration synthesis:
|
|
|
89
93
|
| Scope boundaries | v1 MVP, v2 deferred, out of scope, dependencies |
|
|
90
94
|
| Acceptance criteria | Success/failure/edge case criteria (testable) |
|
|
91
95
|
|
|
92
|
-
### Phase
|
|
96
|
+
### Phase 7: Synthesize Planning
|
|
93
97
|
|
|
94
|
-
**WAIT** for Phase
|
|
98
|
+
**WAIT** for Phase 6, then spawn Synthesizer:
|
|
95
99
|
|
|
96
100
|
```
|
|
97
101
|
Task(subagent_type="Synthesizer"):
|
|
@@ -100,7 +104,7 @@ Mode: planning
|
|
|
100
104
|
Combine into: user stories, scope breakdown, acceptance criteria, open questions"
|
|
101
105
|
```
|
|
102
106
|
|
|
103
|
-
### Phase
|
|
107
|
+
### Phase 8: Gate 1 - Validate Scope
|
|
104
108
|
|
|
105
109
|
Use AskUserQuestion to validate:
|
|
106
110
|
- Primary problem being solved
|
|
@@ -108,14 +112,14 @@ Use AskUserQuestion to validate:
|
|
|
108
112
|
- v1 scope selection (minimal/medium/full)
|
|
109
113
|
- Explicit exclusions
|
|
110
114
|
|
|
111
|
-
### Phase
|
|
115
|
+
### Phase 9: Gate 2 - Confirm Criteria
|
|
112
116
|
|
|
113
117
|
Present specification summary, then use AskUserQuestion for final confirmation:
|
|
114
118
|
- Success UX pattern
|
|
115
119
|
- Error handling approach
|
|
116
120
|
- Ready to create issue / Needs changes / Cancel
|
|
117
121
|
|
|
118
|
-
### Phase
|
|
122
|
+
### Phase 10: Create Issue
|
|
119
123
|
|
|
120
124
|
Create GitHub issue with `gh issue create`:
|
|
121
125
|
- Title: feature name
|
|
@@ -135,30 +139,33 @@ Report issue number and URL.
|
|
|
135
139
|
├─ Phase 2: Orient
|
|
136
140
|
│ └─ Skimmer agent (codebase context via skim)
|
|
137
141
|
│
|
|
138
|
-
├─ Phase 3:
|
|
142
|
+
├─ Phase 3: Load Project Knowledge
|
|
143
|
+
│ └─ Read decisions.md + pitfalls.md
|
|
144
|
+
│
|
|
145
|
+
├─ Phase 4: Explore Requirements (PARALLEL)
|
|
139
146
|
│ ├─ Explore: User perspective
|
|
140
147
|
│ ├─ Explore: Similar features
|
|
141
148
|
│ ├─ Explore: Constraints
|
|
142
149
|
│ └─ Explore: Failure modes
|
|
143
150
|
│
|
|
144
|
-
├─ Phase
|
|
151
|
+
├─ Phase 5: Synthesize Exploration
|
|
145
152
|
│ └─ Synthesizer agent (mode: exploration)
|
|
146
153
|
│
|
|
147
|
-
├─ Phase
|
|
154
|
+
├─ Phase 6: Plan Scope (PARALLEL)
|
|
148
155
|
│ ├─ Plan: User stories
|
|
149
156
|
│ ├─ Plan: Scope boundaries
|
|
150
157
|
│ └─ Plan: Acceptance criteria
|
|
151
158
|
│
|
|
152
|
-
├─ Phase
|
|
159
|
+
├─ Phase 7: Synthesize Planning
|
|
153
160
|
│ └─ Synthesizer agent (mode: planning)
|
|
154
161
|
│
|
|
155
|
-
├─ Phase
|
|
162
|
+
├─ Phase 8: GATE 1 - Validate Scope ⛔ MANDATORY
|
|
156
163
|
│ └─ AskUserQuestion: Confirm scope and priorities
|
|
157
164
|
│
|
|
158
|
-
├─ Phase
|
|
165
|
+
├─ Phase 9: GATE 2 - Confirm Criteria ⛔ MANDATORY
|
|
159
166
|
│ └─ AskUserQuestion: Final spec approval
|
|
160
167
|
│
|
|
161
|
-
├─ Phase
|
|
168
|
+
├─ Phase 10: Create Issue
|
|
162
169
|
│ └─ gh issue create
|
|
163
170
|
│
|
|
164
171
|
└─ Report: Issue number, URL, /implement command
|
|
@@ -30,15 +30,16 @@ if [ "$WORD_COUNT" -lt 2 ]; then
|
|
|
30
30
|
exit 0
|
|
31
31
|
fi
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
Intent: BUILD | DEBUG | REVIEW | PLAN | EXPLORE | CHAT
|
|
36
|
-
Depth: QUICK (no overhead) | GUIDED (load skills) | ELEVATE (suggest /command)
|
|
33
|
+
# Normalize to lowercase for matching
|
|
34
|
+
PROMPT_LOWER=$(echo "$PROMPT" | tr '[:upper:]' '[:lower:]')
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
# Fast-path: git operations are always QUICK — skip preamble
|
|
37
|
+
if echo "$PROMPT_LOWER" | grep -qE '^(commit|push|pull|merge|rebase|cherry-pick|squash|tag|stash)|create (a )?pr|open (a )?pr'; then
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
# Inject classification preamble
|
|
42
|
+
PREAMBLE="AMBIENT MODE ACTIVE: Before responding, silently classify this prompt using the ambient-router skill already in your session context. If QUICK, respond normally without stating classification."
|
|
42
43
|
|
|
43
44
|
jq -n --arg ctx "$PREAMBLE" '{
|
|
44
45
|
"hookSpecificOutput": {
|
|
@@ -119,6 +119,31 @@ ${COMPACT_NOTE}"
|
|
|
119
119
|
fi
|
|
120
120
|
fi
|
|
121
121
|
|
|
122
|
+
# --- Section 1.5: Project Knowledge TL;DR ---
|
|
123
|
+
KNOWLEDGE_DIR="$CWD/.memory/knowledge"
|
|
124
|
+
if [ -d "$KNOWLEDGE_DIR" ]; then
|
|
125
|
+
KNOWLEDGE_TLDR=""
|
|
126
|
+
for kf in "$KNOWLEDGE_DIR"/decisions.md "$KNOWLEDGE_DIR"/pitfalls.md; do
|
|
127
|
+
if [ -f "$kf" ]; then
|
|
128
|
+
TLDR_LINE=$(sed -n '1s/<!-- TL;DR: \(.*\) -->/\1/p' "$kf")
|
|
129
|
+
if [ -n "$TLDR_LINE" ]; then
|
|
130
|
+
KNOWLEDGE_TLDR="${KNOWLEDGE_TLDR}${TLDR_LINE}\n"
|
|
131
|
+
fi
|
|
132
|
+
fi
|
|
133
|
+
done
|
|
134
|
+
if [ -n "$KNOWLEDGE_TLDR" ]; then
|
|
135
|
+
KNOWLEDGE_SECTION="--- PROJECT KNOWLEDGE (TL;DR) ---
|
|
136
|
+
$(printf '%b' "$KNOWLEDGE_TLDR")"
|
|
137
|
+
if [ -n "$CONTEXT" ]; then
|
|
138
|
+
CONTEXT="${CONTEXT}
|
|
139
|
+
|
|
140
|
+
${KNOWLEDGE_SECTION}"
|
|
141
|
+
else
|
|
142
|
+
CONTEXT="$KNOWLEDGE_SECTION"
|
|
143
|
+
fi
|
|
144
|
+
fi
|
|
145
|
+
fi
|
|
146
|
+
|
|
122
147
|
# --- Section 2: Ambient Skill Injection ---
|
|
123
148
|
|
|
124
149
|
# Inject ambient-router SKILL.md directly into context so Claude doesn't need a Read call.
|
|
@@ -129,10 +154,15 @@ AMBIENT_SKILL_PATH="$HOME/.claude/skills/ambient-router/SKILL.md"
|
|
|
129
154
|
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
130
155
|
if [ -f "$AMBIENT_SKILL_PATH" ] && [ -f "$SETTINGS_FILE" ] && grep -q "ambient-prompt" "$SETTINGS_FILE" 2>/dev/null; then
|
|
131
156
|
AMBIENT_SKILL_CONTENT=$(cat "$AMBIENT_SKILL_PATH")
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
--- AMBIENT ROUTER (auto-loaded) ---
|
|
157
|
+
AMBIENT_SECTION="--- AMBIENT ROUTER (auto-loaded) ---
|
|
135
158
|
${AMBIENT_SKILL_CONTENT}"
|
|
159
|
+
if [ -n "$CONTEXT" ]; then
|
|
160
|
+
CONTEXT="${CONTEXT}
|
|
161
|
+
|
|
162
|
+
${AMBIENT_SECTION}"
|
|
163
|
+
else
|
|
164
|
+
CONTEXT="$AMBIENT_SECTION"
|
|
165
|
+
fi
|
|
136
166
|
fi
|
|
137
167
|
|
|
138
168
|
# --- Output ---
|
package/shared/agents/coder.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: Coder
|
|
3
3
|
description: Autonomous task implementation on feature branch. Implements, tests, and commits.
|
|
4
4
|
model: inherit
|
|
5
|
-
skills: core-patterns, git-safety, implementation-patterns, git-workflow, test-patterns, input-validation
|
|
5
|
+
skills: core-patterns, git-safety, implementation-patterns, git-workflow, test-patterns, test-driven-development, search-first, input-validation
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Coder Agent
|
|
@@ -29,11 +29,16 @@ You receive from orchestrator:
|
|
|
29
29
|
|
|
30
30
|
## Responsibilities
|
|
31
31
|
|
|
32
|
-
1. **Orient on branch state
|
|
32
|
+
1. **Orient on branch state** (always, before any implementation):
|
|
33
|
+
- Run `git log --oneline --stat -n 10` to scan recent commit history on this branch
|
|
34
|
+
- Run `git status` and `git diff --stat` and `git diff --cached --stat` to see uncommitted/unstaged work
|
|
35
|
+
- Cross-reference changed files against EXECUTION_PLAN to identify what's relevant to your task
|
|
36
|
+
- Read those relevant files to understand interfaces, types, naming conventions, error handling, and testing patterns established by prior work
|
|
37
|
+
- If PRIOR_PHASE_SUMMARY is provided, use it to validate your understanding — actual code is authoritative, summaries are supplementary
|
|
38
|
+
- If `.memory/knowledge/decisions.md` exists, read it. Apply prior architectural decisions relevant to this task. Avoid contradicting accepted decisions without documenting a new ADR.
|
|
39
|
+
- If `.memory/knowledge/pitfalls.md` exists, scan for pitfalls in files you're about to modify.
|
|
33
40
|
|
|
34
|
-
2. **
|
|
35
|
-
|
|
36
|
-
3. **Load domain skills**: Based on DOMAIN hint and files in scope, dynamically load relevant language/ecosystem skills by reading their SKILL.md. Only load skills that are installed:
|
|
41
|
+
2. **Load domain skills**: Based on DOMAIN hint and files in scope, dynamically load relevant language/ecosystem skills by reading their SKILL.md. Only load skills that are installed:
|
|
37
42
|
- `backend` (TypeScript): Read `~/.claude/skills/typescript/SKILL.md`, `~/.claude/skills/input-validation/SKILL.md`
|
|
38
43
|
- `backend` (Go): Read `~/.claude/skills/go/SKILL.md`
|
|
39
44
|
- `backend` (Java): Read `~/.claude/skills/java/SKILL.md`
|
|
@@ -44,22 +49,22 @@ You receive from orchestrator:
|
|
|
44
49
|
- `fullstack`: Combine backend + frontend skills
|
|
45
50
|
- If a Read fails (skill not installed), skip it silently and continue.
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
3. **Implement the plan**: Work through execution steps systematically, creating and modifying files. Follow existing patterns. Type everything. Use Result types if codebase uses them.
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
4. **Write tests**: Add tests for new functionality. Cover happy path, error cases, and edge cases. Follow existing test patterns.
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
5. **Run tests**: Execute the test suite. Fix any failures. All tests must pass before proceeding.
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
6. **Commit and push**: Create atomic commits with clear messages. Reference TASK_ID. Push to remote.
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
7. **Create PR** (if CREATE_PR=true): Create pull request against BASE_BRANCH with summary and testing notes.
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
8. **Generate handoff** (if HANDOFF_REQUIRED=true): Include implementation summary for next Coder (see Output section).
|
|
58
63
|
|
|
59
64
|
## Principles
|
|
60
65
|
|
|
61
66
|
1. **Work on feature branch** - All operations happen on the current feature branch
|
|
62
|
-
2. **Branch orientation first** -
|
|
67
|
+
2. **Branch orientation first** - Always orient on branch state before writing code; actual code is authoritative over summaries
|
|
63
68
|
3. **Pattern discovery first** - Before writing code, find similar implementations and match their conventions
|
|
64
69
|
4. **Be decisive** - Make confident implementation choices. Don't present alternatives or ask permission for tactical decisions
|
|
65
70
|
5. **Follow existing patterns** - Match codebase style, don't invent new conventions
|
|
@@ -86,6 +91,9 @@ Return structured completion status:
|
|
|
86
91
|
### PR (if created)
|
|
87
92
|
- URL: {pr_url}
|
|
88
93
|
|
|
94
|
+
### Key Decisions (if any)
|
|
95
|
+
- {Decision}: {rationale}
|
|
96
|
+
|
|
89
97
|
### Blockers (if any)
|
|
90
98
|
{Description of blocker or failure with recommendation}
|
|
91
99
|
```
|
|
@@ -124,4 +132,4 @@ Return structured completion status:
|
|
|
124
132
|
- Switch branches during implementation
|
|
125
133
|
- Push to branches other than your feature branch
|
|
126
134
|
- Merge PRs (orchestrator handles this)
|
|
127
|
-
- Trust handoff summaries without reading actual code
|
|
135
|
+
- Trust handoff summaries without reading actual code
|
|
@@ -42,12 +42,38 @@ The orchestrator provides:
|
|
|
42
42
|
## Responsibilities
|
|
43
43
|
|
|
44
44
|
1. **Load focus skill** - Read the pattern skill file for your focus area from the table above. This gives you detection rules and patterns specific to your review type.
|
|
45
|
-
2. **
|
|
46
|
-
3. **
|
|
47
|
-
4. **Apply
|
|
48
|
-
5. **
|
|
49
|
-
6. **
|
|
50
|
-
7. **
|
|
45
|
+
2. **Check known pitfalls** - If `.memory/knowledge/pitfalls.md` exists, read it. Check if any pitfall Areas overlap with files in the current diff. Verify the Resolution was applied. Flag if a known pitfall pattern is being reintroduced.
|
|
46
|
+
3. **Identify changed lines** - Get diff against base branch (main/master/develop)
|
|
47
|
+
4. **Apply 3-category classification** - Sort issues by where they occur
|
|
48
|
+
5. **Apply focus-specific analysis** - Use pattern skill detection rules from the loaded skill file
|
|
49
|
+
6. **Assign severity** - CRITICAL, HIGH, MEDIUM, LOW based on impact
|
|
50
|
+
7. **Assess confidence** - Assign 0-100% confidence to each finding (see Confidence Scale below)
|
|
51
|
+
8. **Filter by confidence** - Only report findings ≥80% in main sections; lower-confidence items go to Suggestions
|
|
52
|
+
9. **Consolidate similar issues** - Group related findings to reduce noise (see Consolidation Rules)
|
|
53
|
+
10. **Generate report** - File:line references with suggested fixes
|
|
54
|
+
11. **Determine merge recommendation** - Based on blocking issues
|
|
55
|
+
|
|
56
|
+
## Confidence Scale
|
|
57
|
+
|
|
58
|
+
Assess how certain you are that each finding is a real issue (not a false positive):
|
|
59
|
+
|
|
60
|
+
| Range | Label | Meaning |
|
|
61
|
+
|-------|-------|---------|
|
|
62
|
+
| 90-100% | Certain | Clearly a bug, vulnerability, or violation — no ambiguity |
|
|
63
|
+
| 80-89% | High | Very likely an issue, but minor chance of false positive |
|
|
64
|
+
| 60-79% | Medium | Plausible issue, but depends on context you may not fully see |
|
|
65
|
+
| < 60% | Low | Possible concern, but likely a matter of style or interpretation |
|
|
66
|
+
|
|
67
|
+
<!-- Confidence threshold also in: shared/agents/synthesizer.md, plugins/devflow-code-review/commands/code-review.md -->
|
|
68
|
+
**Threshold**: Only report findings with ≥80% confidence in Blocking, Should-Fix, and Pre-existing sections. Findings with 60-79% confidence go to the Suggestions section. Findings < 60% are dropped entirely.
|
|
69
|
+
|
|
70
|
+
## Consolidation Rules
|
|
71
|
+
|
|
72
|
+
Before writing your report, apply these noise reduction rules:
|
|
73
|
+
|
|
74
|
+
1. **Group similar issues** — If 3+ instances of the same pattern appear (e.g., "missing error handling" in multiple functions), consolidate into 1 finding listing all locations rather than N separate findings
|
|
75
|
+
2. **Skip stylistic preferences** — Do not flag formatting, naming style, or code organization choices unless they violate explicit project conventions found in CLAUDE.md, .editorconfig, or linter configs
|
|
76
|
+
3. **Skip issues in unchanged code** — Pre-existing issues in lines you did NOT change should only be reported if CRITICAL severity (security vulnerabilities, data loss risks)
|
|
51
77
|
|
|
52
78
|
## Issue Categories (from review-methodology)
|
|
53
79
|
|
|
@@ -76,17 +102,29 @@ Report format for `{output_path}`:
|
|
|
76
102
|
|
|
77
103
|
### CRITICAL
|
|
78
104
|
**{Issue}** - `file.ts:123`
|
|
105
|
+
**Confidence**: {n}%
|
|
79
106
|
- Problem: {description}
|
|
80
107
|
- Fix: {suggestion with code}
|
|
81
108
|
|
|
109
|
+
**{Issue Title} ({N} occurrences)** — Confidence: {n}%
|
|
110
|
+
- `file1.ts:12`, `file2.ts:45`, `file3.ts:89`
|
|
111
|
+
- Problem: {description of the shared pattern}
|
|
112
|
+
- Fix: {suggestion that applies to all occurrences}
|
|
113
|
+
|
|
82
114
|
### HIGH
|
|
83
|
-
{issues...}
|
|
115
|
+
{issues with **Confidence**: {n}% each...}
|
|
84
116
|
|
|
85
117
|
## Issues in Code You Touched (Should Fix)
|
|
86
|
-
{issues with file:line...}
|
|
118
|
+
{issues with file:line and **Confidence**: {n}% each...}
|
|
87
119
|
|
|
88
120
|
## Pre-existing Issues (Not Blocking)
|
|
89
|
-
{informational issues...}
|
|
121
|
+
{informational issues with **Confidence**: {n}% each...}
|
|
122
|
+
|
|
123
|
+
## Suggestions (Lower Confidence)
|
|
124
|
+
|
|
125
|
+
{Max 3 items with 60-79% confidence. Brief description only — no code fixes.}
|
|
126
|
+
|
|
127
|
+
- **{Issue}** - `file.ts:456` (Confidence: {n}%) — {brief description}
|
|
90
128
|
|
|
91
129
|
## Summary
|
|
92
130
|
| Category | CRITICAL | HIGH | MEDIUM | LOW |
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Simplifier
|
|
3
3
|
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
|
|
4
|
+
skills: core-patterns
|
|
4
5
|
model: inherit
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -59,4 +60,34 @@ Your refinement process:
|
|
|
59
60
|
5. Verify the refined code is simpler and more maintainable
|
|
60
61
|
6. Document only significant changes that affect understanding
|
|
61
62
|
|
|
62
|
-
You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.
|
|
63
|
+
You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.
|
|
64
|
+
|
|
65
|
+
## Output
|
|
66
|
+
|
|
67
|
+
Return structured completion status:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
## Simplification Report
|
|
71
|
+
|
|
72
|
+
### Changes Applied
|
|
73
|
+
- {file}: {description of simplification}
|
|
74
|
+
|
|
75
|
+
### Changes Skipped
|
|
76
|
+
- {reason not simplified — would change behavior / already clean}
|
|
77
|
+
|
|
78
|
+
### Files Modified
|
|
79
|
+
- {file} ({change description})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Boundaries
|
|
83
|
+
|
|
84
|
+
**Escalate to orchestrator:**
|
|
85
|
+
- Changes that would alter observable behavior or break tests
|
|
86
|
+
- Simplifications requiring new dependencies or architectural changes
|
|
87
|
+
- Files outside the recently modified scope (unless instructed)
|
|
88
|
+
|
|
89
|
+
**Handle autonomously:**
|
|
90
|
+
- Naming improvements, dead code removal, nesting reduction
|
|
91
|
+
- Import sorting and organization
|
|
92
|
+
- Redundant abstraction elimination
|
|
93
|
+
- Comment cleanup (remove obvious, keep non-obvious)
|
package/shared/agents/skimmer.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Skimmer
|
|
3
3
|
description: Codebase orientation using skim to identify relevant files, functions, and patterns for a feature or task
|
|
4
|
+
skills: knowledge-persistence
|
|
4
5
|
model: inherit
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -20,6 +21,7 @@ You receive from orchestrator:
|
|
|
20
21
|
3. **Search for task-relevant code** - Find files matching task keywords
|
|
21
22
|
4. **Identify integration points** - Exports, entry points, import patterns
|
|
22
23
|
5. **Generate orientation summary** - Structured output for implementation planning
|
|
24
|
+
6. **Check project knowledge** - If `.memory/knowledge/decisions.md` exists, read its `<!-- TL;DR: ... -->` first-line comment and include active decision count in orientation under "### Active Decisions". Only the TL;DR is read here (not full entries) — this is intentional for token efficiency; agents that need full entries read the file themselves.
|
|
23
25
|
|
|
24
26
|
## Tool Invocation
|
|
25
27
|
|
|
@@ -64,6 +66,9 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
|
|
|
64
66
|
### Patterns Observed
|
|
65
67
|
{Existing patterns to follow}
|
|
66
68
|
|
|
69
|
+
### Active Decisions
|
|
70
|
+
{Count and key decisions from `.memory/knowledge/decisions.md` TL;DR, or "None found" if file missing}
|
|
71
|
+
|
|
67
72
|
### Suggested Approach
|
|
68
73
|
{Brief recommendation based on codebase structure}
|
|
69
74
|
```
|