guild-agents 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -6
- package/package.json +2 -2
- package/src/templates/agents/advisor.md +0 -1
- package/src/templates/agents/developer.md +2 -2
- package/src/templates/agents/qa.md +1 -1
- package/src/templates/agents/tech-lead.md +2 -2
- package/src/templates/skills/build-feature/SKILL.md +53 -80
- package/src/templates/skills/build-feature/evals/evals.json +1 -2
- package/src/templates/skills/council/SKILL.md +2 -2
- package/src/templates/skills/dev-flow/SKILL.md +10 -12
- package/src/templates/skills/guild-specialize/SKILL.md +0 -4
- package/src/templates/skills/status/SKILL.md +1 -1
- package/src/utils/dispatch-protocol.js +0 -3
- package/src/utils/executor.js +133 -23
- package/src/templates/agents/db-migration.md +0 -51
- package/src/templates/agents/platform-expert.md +0 -92
- package/src/templates/agents/product-owner.md +0 -52
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ You ──> /council "Add JWT auth"
|
|
|
58
58
|
└──────────┘└──────────┘
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Five phases: **evaluate**, **design**, **implement**, **review**, **validate**. Phases 1-2 happen before any code is written.
|
|
62
62
|
|
|
63
63
|
## Skills Reference
|
|
64
64
|
|
|
@@ -116,19 +116,16 @@ Every trigger run automatically records results to `benchmarks/benchmark.json` (
|
|
|
116
116
|
|
|
117
117
|
## Under the Hood
|
|
118
118
|
|
|
119
|
-
Guild coordinates
|
|
119
|
+
Guild coordinates 7 specialized agents through the pipeline. Each agent handles one phase.
|
|
120
120
|
|
|
121
121
|
| Agent | Role |
|
|
122
122
|
| --- | --- |
|
|
123
123
|
| advisor | Evaluates ideas and provides strategic direction |
|
|
124
|
-
|
|
|
125
|
-
| tech-lead | Defines technical approach and architecture |
|
|
124
|
+
| tech-lead | Defines technical approach, tasks, and architecture |
|
|
126
125
|
| developer | Implements features following project conventions |
|
|
127
126
|
| code-reviewer | Reviews quality, patterns, and technical debt |
|
|
128
127
|
| qa | Testing, edge cases, regression validation |
|
|
129
128
|
| bugfix | Bug diagnosis and resolution |
|
|
130
|
-
| db-migration | Schema changes and safe migrations |
|
|
131
|
-
| platform-expert | Diagnoses Claude Code integration issues |
|
|
132
129
|
| learnings-extractor | Extracts compound learnings from pipeline executions |
|
|
133
130
|
|
|
134
131
|
Agents are flat `.md` files with identity and expertise. Skills orchestrate agents through structured pipelines. Everything lives in `.claude/`, readable by humans, tracked by git.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guild-agents",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Specification-driven development CLI for Claude Code — think before you build",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@eslint/js": "^10.0.1",
|
|
74
74
|
"@vitest/coverage-v8": "^4.0.18",
|
|
75
75
|
"eslint": "^10.0.1",
|
|
76
|
-
"markdownlint-cli2": "^0.
|
|
76
|
+
"markdownlint-cli2": "^0.22.1",
|
|
77
77
|
"vitest": "^4.0.18"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -21,7 +21,6 @@ You are the domain guardian of [PROJECT]. Your job is to evaluate ideas and prop
|
|
|
21
21
|
## What you do NOT do
|
|
22
22
|
|
|
23
23
|
- You do not define architecture or technical approach -- that is the Tech Lead's role
|
|
24
|
-
- You do not prioritize the backlog or write acceptance criteria -- that is the Product Owner's role
|
|
25
24
|
- You do not review code -- that is the Code Reviewer's role
|
|
26
25
|
- You do not implement anything -- that is the Developer's role
|
|
27
26
|
|
|
@@ -8,7 +8,7 @@ default-tier: execution
|
|
|
8
8
|
|
|
9
9
|
# Developer
|
|
10
10
|
|
|
11
|
-
You are the Developer for [PROJECT]. Your job is to implement features and changes following the project conventions, the approach defined by the Tech Lead, and the acceptance criteria
|
|
11
|
+
You are the Developer for [PROJECT]. Your job is to implement features and changes following the project conventions, the approach defined by the Tech Lead, and the acceptance criteria.
|
|
12
12
|
|
|
13
13
|
## Responsibilities
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ You are the Developer for [PROJECT]. Your job is to implement features and chang
|
|
|
22
22
|
|
|
23
23
|
- You do not define architecture or technical approach -- that is the Tech Lead's role
|
|
24
24
|
- You do not validate the result functionally -- that is QA's role
|
|
25
|
-
- You do not prioritize or decide what to implement -- that is the
|
|
25
|
+
- You do not prioritize or decide what to implement -- that is the Advisor's role
|
|
26
26
|
- You do not investigate production bugs -- that is Bugfix's role
|
|
27
27
|
|
|
28
28
|
## Process
|
|
@@ -22,7 +22,7 @@ You are QA for [PROJECT]. Your job is to functionally validate that the implemen
|
|
|
22
22
|
|
|
23
23
|
- You do not fix bugs -- that is Bugfix's role
|
|
24
24
|
- You do not write unit tests -- that is the Developer's role
|
|
25
|
-
- You do not define acceptance criteria -- that is the
|
|
25
|
+
- You do not define acceptance criteria -- that is the Tech Lead's role
|
|
26
26
|
- You do not implement features -- that is the Developer's role
|
|
27
27
|
|
|
28
28
|
## Process
|
|
@@ -15,7 +15,7 @@ You are the Tech Lead for [PROJECT]. Your job is to ensure the technical coheren
|
|
|
15
15
|
- Define the technical approach for each task before implementation
|
|
16
16
|
- Establish patterns, interfaces, and contracts between components
|
|
17
17
|
- Identify technical risks and propose mitigations
|
|
18
|
-
-
|
|
18
|
+
- Break features into concrete tasks with verifiable acceptance criteria
|
|
19
19
|
- Maintain the project's architectural coherence over time
|
|
20
20
|
|
|
21
21
|
## What you do NOT do
|
|
@@ -23,7 +23,7 @@ You are the Tech Lead for [PROJECT]. Your job is to ensure the technical coheren
|
|
|
23
23
|
- You do not implement code -- that is the Developer's role
|
|
24
24
|
- You do not validate functional behavior -- that is QA's role
|
|
25
25
|
- You do not evaluate business coherence -- that is the Advisor's role
|
|
26
|
-
- You do not prioritize the backlog -- that is the
|
|
26
|
+
- You do not evaluate business coherence or prioritize the backlog -- that is the Advisor's role
|
|
27
27
|
|
|
28
28
|
## Process
|
|
29
29
|
|
|
@@ -12,19 +12,13 @@ workflow:
|
|
|
12
12
|
produces: [evaluation-report, verdict]
|
|
13
13
|
model-tier: reasoning
|
|
14
14
|
on-failure: abort
|
|
15
|
-
- id: specify
|
|
16
|
-
role: product-owner
|
|
17
|
-
intent: "Break the feature into concrete tasks with verifiable acceptance criteria. Estimate effort and suggest implementation order."
|
|
18
|
-
requires: [feature-description, evaluation-report]
|
|
19
|
-
produces: [task-list, acceptance-criteria]
|
|
20
|
-
model-tier: reasoning
|
|
21
|
-
condition: step.evaluate.verdict != rejected
|
|
22
15
|
- id: design
|
|
23
16
|
role: tech-lead
|
|
24
|
-
intent: "Define implementation approach: files to modify, patterns to follow, interfaces, and technical risks."
|
|
25
|
-
requires: [
|
|
26
|
-
produces: [technical-plan]
|
|
17
|
+
intent: "Break the feature into concrete tasks with acceptance criteria. Define implementation approach: files to modify, patterns to follow, interfaces, and technical risks."
|
|
18
|
+
requires: [feature-description, evaluation-report]
|
|
19
|
+
produces: [task-list, acceptance-criteria, technical-plan]
|
|
27
20
|
model-tier: reasoning
|
|
21
|
+
condition: step.evaluate.verdict != rejected
|
|
28
22
|
- id: implement
|
|
29
23
|
role: developer
|
|
30
24
|
intent: "Implement the feature following the technical plan. Write unit tests. Make atomic commits."
|
|
@@ -131,19 +125,18 @@ git worktree remove .claude/worktrees/[branch-name]
|
|
|
131
125
|
|
|
132
126
|
When running a single build-feature, a simple `git checkout -b` is sufficient.
|
|
133
127
|
|
|
134
|
-
##
|
|
128
|
+
## 5-Phase Pipeline
|
|
135
129
|
|
|
136
130
|
### Progress Display
|
|
137
131
|
|
|
138
132
|
At the start of each phase, display a progress indicator to the user before any agent output:
|
|
139
133
|
|
|
140
134
|
```text
|
|
141
|
-
[1/
|
|
142
|
-
[2/
|
|
143
|
-
[3/
|
|
144
|
-
[4/
|
|
145
|
-
[5/
|
|
146
|
-
[6/6] QA (sonnet) — Validating acceptance criteria...
|
|
135
|
+
[1/5] Advisor (opus) — Evaluating feature...
|
|
136
|
+
[2/5] Tech Lead (opus) — Defining spec and technical approach...
|
|
137
|
+
[3/5] Developer (sonnet) — Implementing...
|
|
138
|
+
[4/5] Code Reviewer (opus) — Reviewing changes...
|
|
139
|
+
[5/5] QA (sonnet) — Validating acceptance criteria...
|
|
147
140
|
```
|
|
148
141
|
|
|
149
142
|
Model names are resolved from the step's `model-tier` using the `max` profile: reasoning=opus, execution=sonnet, routine=haiku. System/gate steps do not show a model name.
|
|
@@ -151,15 +144,15 @@ Model names are resolved from the step's `model-tier` using the `max` profile: r
|
|
|
151
144
|
When a phase loops (review-fix or QA-review cycles), show the iteration:
|
|
152
145
|
|
|
153
146
|
```text
|
|
154
|
-
[5
|
|
155
|
-
[
|
|
147
|
+
[4/5 · round 2] Code Reviewer (opus) — Re-reviewing after fixes...
|
|
148
|
+
[3/5 · round 2] Developer (sonnet) — Fixing review blockers...
|
|
156
149
|
```
|
|
157
150
|
|
|
158
151
|
This indicator MUST be displayed before spawning the agent for that phase.
|
|
159
152
|
|
|
160
153
|
### Phase 1 — Evaluation (Advisor)
|
|
161
154
|
|
|
162
|
-
**Progress:** `[1/
|
|
155
|
+
**Progress:** `[1/5] Advisor (opus) — Evaluating feature...`
|
|
163
156
|
**Agent:** Reads `.claude/agents/advisor.md` via Task tool with `model: "opus"`
|
|
164
157
|
**Input:** The feature description provided by the user
|
|
165
158
|
**Process:**
|
|
@@ -172,39 +165,26 @@ This indicator MUST be displayed before spawning the agent for that phase.
|
|
|
172
165
|
**Trace data:** Verdict (Approved/Rejected/Approved with conditions), risks identified, conditions if any
|
|
173
166
|
**Exit condition:** If the Advisor rejects the feature, the pipeline stops here. Inform the user of the reason and suggest adjustments if any.
|
|
174
167
|
|
|
175
|
-
### Phase 2 — Specification (
|
|
176
|
-
|
|
177
|
-
**Progress:** `[2/6] Product Owner (opus) — Defining spec...`
|
|
178
|
-
**Agent:** Reads `.claude/agents/product-owner.md` via Task tool with `model: "opus"`
|
|
179
|
-
**Input:** The feature approved by the Advisor + their observations
|
|
180
|
-
**Process:**
|
|
181
|
-
|
|
182
|
-
1. The Product Owner breaks the feature into concrete tasks
|
|
183
|
-
2. Defines verifiable acceptance criteria for each task
|
|
184
|
-
3. Estimates effort and suggests implementation order
|
|
168
|
+
### Phase 2 — Specification & Technical Approach (Tech Lead)
|
|
185
169
|
|
|
186
|
-
**
|
|
187
|
-
**Trace data:** Tasks defined count, acceptance criteria count, estimated effort
|
|
188
|
-
|
|
189
|
-
### Phase 3 — Technical Approach (Tech Lead)
|
|
190
|
-
|
|
191
|
-
**Progress:** `[3/6] Tech Lead (opus) — Defining technical approach...`
|
|
170
|
+
**Progress:** `[2/5] Tech Lead (opus) — Defining spec and technical approach...`
|
|
192
171
|
**Agent:** Reads `.claude/agents/tech-lead.md` via Task tool with `model: "opus"`
|
|
193
|
-
**Input:**
|
|
172
|
+
**Input:** The feature approved by the Advisor + their observations
|
|
194
173
|
**Process:**
|
|
195
174
|
|
|
196
|
-
1. The Tech Lead
|
|
197
|
-
2.
|
|
175
|
+
1. The Tech Lead breaks the feature into concrete tasks with verifiable acceptance criteria
|
|
176
|
+
2. Defines the implementation approach: files to modify, patterns to follow, interfaces
|
|
198
177
|
3. Anticipates technical risks and proposes mitigations
|
|
178
|
+
4. Estimates effort and suggests implementation order
|
|
199
179
|
|
|
200
|
-
**Output:**
|
|
201
|
-
**Trace data:**
|
|
180
|
+
**Output:** Task list with acceptance criteria + technical plan with files, patterns, interfaces, and risks
|
|
181
|
+
**Trace data:** Tasks defined count, acceptance criteria count, key patterns identified, files to modify, technical risks
|
|
202
182
|
|
|
203
|
-
### Phase
|
|
183
|
+
### Phase 3 — Implementation (Developer)
|
|
204
184
|
|
|
205
|
-
**Progress:** `[
|
|
185
|
+
**Progress:** `[3/5] Developer (sonnet) — Implementing...`
|
|
206
186
|
**Agent:** Reads `.claude/agents/developer.md` via Task tool with `model: "sonnet"`
|
|
207
|
-
**Input:** Tech Lead technical plan +
|
|
187
|
+
**Input:** Tech Lead technical plan + acceptance criteria
|
|
208
188
|
**Process:**
|
|
209
189
|
|
|
210
190
|
1. The Developer implements following the technical plan
|
|
@@ -217,7 +197,7 @@ This indicator MUST be displayed before spawning the agent for that phase.
|
|
|
217
197
|
|
|
218
198
|
### Pre-Review Gate (mandatory)
|
|
219
199
|
|
|
220
|
-
Before advancing to Phase
|
|
200
|
+
Before advancing to Phase 4, run automated verification:
|
|
221
201
|
|
|
222
202
|
1. Run the project test commands (e.g., `npm test`) — if it fails, the Developer must fix before advancing
|
|
223
203
|
2. Run the project lint commands (e.g., `npm run lint`) — if it fails, the Developer must fix before advancing
|
|
@@ -227,9 +207,9 @@ This gate CANNOT be skipped, even if the user requested phase skipping. The spec
|
|
|
227
207
|
|
|
228
208
|
**Trace data:** Tests pass/fail, lint pass/fail
|
|
229
209
|
|
|
230
|
-
### Phase
|
|
210
|
+
### Phase 4 — Review (Code Reviewer)
|
|
231
211
|
|
|
232
|
-
**Progress:** `[5
|
|
212
|
+
**Progress:** `[4/5] Code Reviewer (opus) — Reviewing changes...`
|
|
233
213
|
**Agent:** Reads `.claude/agents/code-reviewer.md` via Task tool with `model: "opus"`
|
|
234
214
|
**Input:** The implemented changes (git diff)
|
|
235
215
|
**Process:**
|
|
@@ -239,13 +219,13 @@ This gate CANNOT be skipped, even if the user requested phase skipping. The spec
|
|
|
239
219
|
|
|
240
220
|
**Output:** Review report with classified findings
|
|
241
221
|
**Trace data:** Blockers count, warnings count, suggestions count, review-fix loops
|
|
242
|
-
**Loop condition:** If there are Blocker findings, return to **Phase
|
|
222
|
+
**Loop condition:** If there are Blocker findings, return to **Phase 3** for the Developer to fix them. Maximum 2 review-fix iterations.
|
|
243
223
|
|
|
244
|
-
### Phase
|
|
224
|
+
### Phase 5 — QA (delegates to /qa-cycle)
|
|
245
225
|
|
|
246
|
-
**Progress:** `[
|
|
226
|
+
**Progress:** `[5/5] QA (sonnet) — Validating acceptance criteria...`
|
|
247
227
|
|
|
248
|
-
Runs the `/qa-cycle` skill passing the
|
|
228
|
+
Runs the `/qa-cycle` skill passing the acceptance criteria as context. The qa-cycle handles:
|
|
249
229
|
|
|
250
230
|
1. Running project tests and lint
|
|
251
231
|
2. Validating acceptance criteria
|
|
@@ -253,7 +233,7 @@ Runs the `/qa-cycle` skill passing the PO acceptance criteria as context. The qa
|
|
|
253
233
|
4. Bugfix cycle if issues arise (maximum 3 cycles)
|
|
254
234
|
|
|
255
235
|
**Trace data:** Acceptance criteria verified count, bugs found, QA cycles
|
|
256
|
-
**Additional loop condition:** If the qa-cycle bugfix introduces significant changes, return to **Phase
|
|
236
|
+
**Additional loop condition:** If the qa-cycle bugfix introduces significant changes, return to **Phase 4** (Review) for verification. Maximum 2 review-QA cycles.
|
|
257
237
|
|
|
258
238
|
## Checkpoint Commits
|
|
259
239
|
|
|
@@ -267,11 +247,10 @@ git commit -m "wip: [feature-name] phase N complete — [phase-name]"
|
|
|
267
247
|
Pattern for each phase:
|
|
268
248
|
|
|
269
249
|
- After Phase 1: `wip: [feature] phase 1 — advisor approved`
|
|
270
|
-
- After Phase 2: `wip: [feature] phase 2 —
|
|
271
|
-
- After Phase 3: `wip: [feature] phase 3 —
|
|
272
|
-
- After Phase 4: `wip: [feature] phase 4 —
|
|
273
|
-
- After Phase 5: `wip: [feature] phase 5 —
|
|
274
|
-
- After Phase 6: `wip: [feature] phase 6 — QA passed`
|
|
250
|
+
- After Phase 2: `wip: [feature] phase 2 — spec and tech approach defined`
|
|
251
|
+
- After Phase 3: `wip: [feature] phase 3 — implementation done` -- also write partial trace (phases 1-3) to spec and update status to `implementing`
|
|
252
|
+
- After Phase 4: `wip: [feature] phase 4 — review passed`
|
|
253
|
+
- After Phase 5: `wip: [feature] phase 5 — QA passed`
|
|
275
254
|
|
|
276
255
|
Also update SESSION.md at each phase transition:
|
|
277
256
|
|
|
@@ -325,7 +304,7 @@ Append this section to the spec file:
|
|
|
325
304
|
|
|
326
305
|
pipeline-start: [YYYY-MM-DD]
|
|
327
306
|
pipeline-end: [YYYY-MM-DD]
|
|
328
|
-
phases-completed: [N]/
|
|
307
|
+
phases-completed: [N]/5
|
|
329
308
|
review-fix-loops: [N]
|
|
330
309
|
qa-cycles: [N]
|
|
331
310
|
final-gate: pass | fail
|
|
@@ -335,19 +314,16 @@ final-gate: pass | fail
|
|
|
335
314
|
- **Verdict**: [Approved/Rejected/Approved with conditions]
|
|
336
315
|
- **Risks identified**: [list or "None"]
|
|
337
316
|
|
|
338
|
-
### Phase 2 — Specification
|
|
317
|
+
### Phase 2 — Specification & Technical Approach
|
|
339
318
|
|
|
340
319
|
- **Tasks defined**: [N]
|
|
341
320
|
- **Acceptance criteria**: [N]
|
|
342
|
-
- **Estimated effort**: [summary]
|
|
343
|
-
|
|
344
|
-
### Phase 3 — Technical Approach
|
|
345
|
-
|
|
346
321
|
- **Key patterns**: [list]
|
|
347
322
|
- **Files to modify**: [list]
|
|
348
323
|
- **Technical risks**: [list or "None"]
|
|
324
|
+
- **Estimated effort**: [summary]
|
|
349
325
|
|
|
350
|
-
### Phase
|
|
326
|
+
### Phase 3 — Implementation
|
|
351
327
|
|
|
352
328
|
- **Files created/modified**: [list]
|
|
353
329
|
- **Tests added**: [N]
|
|
@@ -358,14 +334,14 @@ final-gate: pass | fail
|
|
|
358
334
|
- **Tests**: pass | fail
|
|
359
335
|
- **Lint**: pass | fail
|
|
360
336
|
|
|
361
|
-
### Phase
|
|
337
|
+
### Phase 4 — Review
|
|
362
338
|
|
|
363
339
|
- **Blockers**: [N]
|
|
364
340
|
- **Warnings**: [N]
|
|
365
341
|
- **Suggestions**: [N]
|
|
366
342
|
- **Review-fix loops**: [N]
|
|
367
343
|
|
|
368
|
-
### Phase
|
|
344
|
+
### Phase 5 — QA
|
|
369
345
|
|
|
370
346
|
- **Acceptance criteria verified**: [N]/[total]
|
|
371
347
|
- **Bugs found**: [N]
|
|
@@ -380,15 +356,15 @@ final-gate: pass | fail
|
|
|
380
356
|
|
|
381
357
|
### When to write the trace
|
|
382
358
|
|
|
383
|
-
- **Phase
|
|
359
|
+
- **Phase 3 checkpoint:** Write a partial trace covering phases 1-3 to the spec file. Set status to `implementing`. Include the spec file in the checkpoint commit.
|
|
384
360
|
- **Pipeline completion:** Write the complete trace (all phases) to the spec file. Set status to `implemented`. Include the spec file in the final checkpoint commit.
|
|
385
361
|
|
|
386
362
|
## Final Gate (mandatory before Completion)
|
|
387
363
|
|
|
388
364
|
Before declaring the pipeline as complete, run final verification:
|
|
389
365
|
|
|
390
|
-
1. Run project tests — if it fails, return to Phase
|
|
391
|
-
2. Run project lint — if it fails, return to Phase
|
|
366
|
+
1. Run project tests — if it fails, return to Phase 5 (QA/Bugfix)
|
|
367
|
+
2. Run project lint — if it fails, return to Phase 3 (Developer)
|
|
392
368
|
3. Both must pass with exit code 0
|
|
393
369
|
|
|
394
370
|
This gate is the last safety net. It CANNOT be skipped under any circumstances.
|
|
@@ -423,7 +399,7 @@ When spawning agents via the Task tool, use these `subagent_type` values:
|
|
|
423
399
|
|
|
424
400
|
| Guild Agent Role | subagent_type to use |
|
|
425
401
|
| --- | --- |
|
|
426
|
-
| advisor,
|
|
402
|
+
| advisor, tech-lead | `"general-purpose"` |
|
|
427
403
|
| developer, bugfix | `"general-purpose"` |
|
|
428
404
|
| code-reviewer, qa | `"general-purpose"` |
|
|
429
405
|
|
|
@@ -445,22 +421,19 @@ The `model` parameter is resolved from the step's `model-tier`: reasoning→`"op
|
|
|
445
421
|
```text
|
|
446
422
|
User: /build-feature add dark mode toggle to settings page
|
|
447
423
|
|
|
448
|
-
[1/
|
|
424
|
+
[1/5] Advisor (opus) — Evaluating feature...
|
|
449
425
|
Approved. Low risk, aligns with UX roadmap.
|
|
450
426
|
|
|
451
|
-
[2/
|
|
452
|
-
3 tasks defined
|
|
453
|
-
|
|
454
|
-
[3/6] Tech Lead (opus) — Defining technical approach...
|
|
455
|
-
Use CSS variables + context provider pattern.
|
|
427
|
+
[2/5] Tech Lead (opus) — Defining spec and technical approach...
|
|
428
|
+
3 tasks defined. Use CSS variables + context provider pattern.
|
|
456
429
|
|
|
457
|
-
[
|
|
430
|
+
[3/5] Developer (sonnet) — Implementing...
|
|
458
431
|
Implemented ThemeContext, toggle component, CSS vars.
|
|
459
432
|
|
|
460
|
-
[5
|
|
433
|
+
[4/5] Code Reviewer (opus) — Reviewing changes...
|
|
461
434
|
Passed. 1 suggestion (memoize context value).
|
|
462
435
|
|
|
463
|
-
[
|
|
436
|
+
[5/5] QA (sonnet) — Validating acceptance criteria...
|
|
464
437
|
All 3 acceptance criteria verified. 0 bugs.
|
|
465
438
|
|
|
466
439
|
Feature complete. PR ready for merge.
|
|
@@ -468,7 +441,7 @@ Feature complete. PR ready for merge.
|
|
|
468
441
|
|
|
469
442
|
## Notes
|
|
470
443
|
|
|
471
|
-
- If the user wants to skip phases (e.g., "already evaluated, implement directly"), allow skipping to Phase
|
|
444
|
+
- If the user wants to skip phases (e.g., "already evaluated, implement directly"), allow skipping to Phase 3 but warn that validation is lost. Verification gates (pre-Review and final) are NEVER skipped
|
|
472
445
|
- The pipeline is sequential: each phase depends on the output of the previous one
|
|
473
446
|
- Review/QA loops have limits to prevent infinite cycles
|
|
474
447
|
- In v1.x, parallel pipeline execution (multiple build-features via worktrees) is best-effort and depends on the host environment supporting concurrent agents
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
"evals": [
|
|
4
4
|
{
|
|
5
5
|
"id": "bf-has-core-phases",
|
|
6
|
-
"description": "Plan contains evaluate,
|
|
6
|
+
"description": "Plan contains evaluate, design, implement phases",
|
|
7
7
|
"expectations": [
|
|
8
8
|
{ "text": "Has evaluate step", "assertion": "step-exists:evaluate" },
|
|
9
|
-
{ "text": "Has specify step", "assertion": "step-exists:specify" },
|
|
10
9
|
{ "text": "Has design step", "assertion": "step-exists:design" },
|
|
11
10
|
{ "text": "Has implement step", "assertion": "step-exists:implement" }
|
|
12
11
|
]
|
|
@@ -87,13 +87,13 @@ Invokes all 3 agents IN PARALLEL using Task tool:
|
|
|
87
87
|
|
|
88
88
|
### 2. Council Feature-Scope
|
|
89
89
|
|
|
90
|
-
**Participants:** Advisor +
|
|
90
|
+
**Participants:** Advisor + Developer + Tech Lead
|
|
91
91
|
**When it applies:** Defining feature scope, prioritizing functionality, evaluating product proposals
|
|
92
92
|
|
|
93
93
|
Invokes all 3 agents IN PARALLEL using Task tool:
|
|
94
94
|
|
|
95
95
|
- Task 1: Reads `.claude/agents/advisor.md` — domain and strategic vision perspective
|
|
96
|
-
- Task 2: Reads `.claude/agents/
|
|
96
|
+
- Task 2: Reads `.claude/agents/developer.md` — implementability and pragmatism perspective
|
|
97
97
|
- Task 3: Reads `.claude/agents/tech-lead.md` — technical feasibility and effort perspective
|
|
98
98
|
|
|
99
99
|
### 3. Council Tech-Debt
|
|
@@ -47,11 +47,10 @@ Read `SESSION.md` to determine:
|
|
|
47
47
|
The pipeline phases are:
|
|
48
48
|
|
|
49
49
|
1. **Evaluation** (Advisor) — go/no-go
|
|
50
|
-
2. **Specification** (
|
|
51
|
-
3. **
|
|
52
|
-
4. **
|
|
53
|
-
5. **
|
|
54
|
-
6. **QA** — functional validation
|
|
50
|
+
2. **Specification & Technical Approach** (Tech Lead) — tasks, acceptance criteria, implementation plan
|
|
51
|
+
3. **Implementation** (Developer) — code and tests
|
|
52
|
+
4. **Review** (Code Reviewer) — quality review
|
|
53
|
+
5. **QA** — functional validation
|
|
55
54
|
|
|
56
55
|
### Step 3 — Present flow state
|
|
57
56
|
|
|
@@ -59,11 +58,10 @@ The pipeline phases are:
|
|
|
59
58
|
Dev Flow — [feature name]
|
|
60
59
|
|
|
61
60
|
[x] Phase 1 — Evaluation (completed)
|
|
62
|
-
[x] Phase 2 — Specification (completed)
|
|
63
|
-
[ ] Phase 3 —
|
|
64
|
-
[ ] Phase 4 —
|
|
65
|
-
[ ] Phase 5 —
|
|
66
|
-
[ ] Phase 6 — QA
|
|
61
|
+
[x] Phase 2 — Specification & Technical Approach (completed)
|
|
62
|
+
[ ] Phase 3 — Implementation (pending) <-- you are here
|
|
63
|
+
[ ] Phase 4 — Review
|
|
64
|
+
[ ] Phase 5 — QA
|
|
67
65
|
|
|
68
66
|
Next step: Run /build-feature to continue from Phase 3.
|
|
69
67
|
```
|
|
@@ -76,8 +74,8 @@ If there is no feature in progress, report that there is no active pipeline and
|
|
|
76
74
|
User: /dev-flow
|
|
77
75
|
|
|
78
76
|
Current pipeline: build-feature "add user preferences"
|
|
79
|
-
Phase:
|
|
77
|
+
Phase: 3 of 5 — Implementation
|
|
80
78
|
Developer agent active.
|
|
81
79
|
|
|
82
|
-
Next: Phase
|
|
80
|
+
Next: Phase 4 — Code Review
|
|
83
81
|
```
|
|
@@ -126,13 +126,10 @@ Invoke the Tech Lead agent using Task tool with `model: "sonnet"` (execution tie
|
|
|
126
126
|
|
|
127
127
|
- **advisor.md**: real project domain, target users
|
|
128
128
|
- **tech-lead.md**: specific stack, detected patterns, architecture decisions
|
|
129
|
-
- **product-owner.md**: existing functionality, visible backlog
|
|
130
129
|
- **developer.md**: code conventions, main framework, file structure
|
|
131
130
|
- **code-reviewer.md**: lint rules, project patterns, anti-patterns to watch
|
|
132
131
|
- **qa.md**: testing framework, commands to run tests, current coverage
|
|
133
132
|
- **bugfix.md**: debugging stack, logs, available tools
|
|
134
|
-
- **db-migration.md**: ORM, migration tool, current schema (if applicable)
|
|
135
|
-
- **platform-expert.md**: Claude Code version, known permission bugs, hook configuration
|
|
136
133
|
|
|
137
134
|
When specializing agents, append a zone at the bottom of each agent file:
|
|
138
135
|
|
|
@@ -204,7 +201,6 @@ Tech Lead (sonnet) — Specializing agents...
|
|
|
204
201
|
Agents updated:
|
|
205
202
|
- developer.md: Specialized for Next.js + TypeScript
|
|
206
203
|
- qa.md: Configured for Vitest + Playwright
|
|
207
|
-
- db-migration.md: Configured for Prisma
|
|
208
204
|
|
|
209
205
|
Run /status to see the full state.
|
|
210
206
|
```
|
|
@@ -94,7 +94,7 @@ Session: 2026-02-23
|
|
|
94
94
|
Task: Implementing user preferences
|
|
95
95
|
State: Phase 4 — Developer implementing
|
|
96
96
|
|
|
97
|
-
Agents: advisor,
|
|
97
|
+
Agents: advisor, tech-lead, developer, code-reviewer, qa, bugfix, learnings-extractor
|
|
98
98
|
Skills: guild-specialize, build-feature, new-feature, council, qa-cycle, review, dev-flow,
|
|
99
99
|
status, session-start, session-end
|
|
100
100
|
```
|
|
@@ -34,14 +34,11 @@ export const DEFAULT_FAILURE_STRATEGY = 'abort';
|
|
|
34
34
|
*/
|
|
35
35
|
export const DEFAULT_AGENT_TIERS = {
|
|
36
36
|
'advisor': 'reasoning',
|
|
37
|
-
'product-owner': 'reasoning',
|
|
38
37
|
'tech-lead': 'reasoning',
|
|
39
38
|
'code-reviewer': 'reasoning',
|
|
40
39
|
'developer': 'execution',
|
|
41
40
|
'bugfix': 'execution',
|
|
42
|
-
'db-migration': 'execution',
|
|
43
41
|
'qa': 'execution',
|
|
44
|
-
'platform-expert': 'execution',
|
|
45
42
|
'learnings-extractor': 'routine',
|
|
46
43
|
};
|
|
47
44
|
|
package/src/utils/executor.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Drives a plan to completion by iterating through steps, dispatching
|
|
5
5
|
* agent steps to a provider function and system steps to local commands.
|
|
6
|
-
*
|
|
6
|
+
* Supports parallel execution (v1.2) and delegation to sub-skills.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { execFile } from 'child_process';
|
|
@@ -11,8 +11,15 @@ import {
|
|
|
11
11
|
advanceStep,
|
|
12
12
|
getNextSteps,
|
|
13
13
|
isPlanComplete,
|
|
14
|
+
MAX_DELEGATION_DEPTH,
|
|
15
|
+
createExecutionPlan,
|
|
14
16
|
} from './orchestrator.js';
|
|
15
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
buildStepContext,
|
|
19
|
+
recordStepTrace,
|
|
20
|
+
loadWorkflow,
|
|
21
|
+
resolveStepDispatch,
|
|
22
|
+
} from './orchestrator-io.js';
|
|
16
23
|
|
|
17
24
|
const SYSTEM_STEP_TIMEOUT = 120_000; // 2 minutes
|
|
18
25
|
|
|
@@ -70,7 +77,7 @@ async function executeSystemStep(step, options = {}) {
|
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
if (step.delegatesTo) {
|
|
73
|
-
return { status: 'passed', output: `
|
|
80
|
+
return { status: 'passed', output: `System step with delegation — handled by executeDelegation` };
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
return { status: 'passed', output: 'System step completed' };
|
|
@@ -92,12 +99,111 @@ function findStepInPlan(plan, stepId) {
|
|
|
92
99
|
return null;
|
|
93
100
|
}
|
|
94
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Dispatches a single step (agent or system) and returns its result.
|
|
104
|
+
*
|
|
105
|
+
* @param {object} step - Step definition
|
|
106
|
+
* @param {object} dispatch - Dispatch info for this step
|
|
107
|
+
* @param {object} context - Execution context
|
|
108
|
+
* @param {import('./orchestrator.js').ExecutionPlan} context.currentPlan - Current plan state
|
|
109
|
+
* @param {Function} context.provider - Agent step provider
|
|
110
|
+
* @param {string} context.projectRoot - Working directory
|
|
111
|
+
* @param {string} context.skillBody - Skill body text
|
|
112
|
+
* @param {object} context.executeOptions - Full options passed to execute()
|
|
113
|
+
* @returns {Promise<{ status: string, output: string, outcome?: object, error?: string }>}
|
|
114
|
+
*/
|
|
115
|
+
async function dispatchStep(step, dispatch, context) {
|
|
116
|
+
const { currentPlan, provider, projectRoot, skillBody, executeOptions } = context;
|
|
117
|
+
|
|
118
|
+
if (step.role === 'system' && step.delegatesTo) {
|
|
119
|
+
return executeDelegation(step, executeOptions);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (step.role === 'system') {
|
|
123
|
+
return executeSystemStep(step, { projectRoot });
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const stepContext = buildStepContext(step, currentPlan, { skillBody });
|
|
127
|
+
return provider(step, dispatch, stepContext);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Executes a delegation step by loading and running the sub-skill.
|
|
132
|
+
*
|
|
133
|
+
* @param {object} step - Delegation step (with delegatesTo field)
|
|
134
|
+
* @param {object} options - Execute options from parent
|
|
135
|
+
* @returns {Promise<{ status: string, output: string, error?: string }>}
|
|
136
|
+
*/
|
|
137
|
+
async function executeDelegation(step, options) {
|
|
138
|
+
const {
|
|
139
|
+
provider,
|
|
140
|
+
trace,
|
|
141
|
+
projectRoot,
|
|
142
|
+
profile = 'max',
|
|
143
|
+
onStepStart,
|
|
144
|
+
onStepEnd,
|
|
145
|
+
delegationDepth = 0,
|
|
146
|
+
} = options;
|
|
147
|
+
|
|
148
|
+
if (delegationDepth >= MAX_DELEGATION_DEPTH) {
|
|
149
|
+
return {
|
|
150
|
+
status: 'failed',
|
|
151
|
+
output: '',
|
|
152
|
+
error: `Delegation depth limit (${MAX_DELEGATION_DEPTH}) exceeded at step "${step.id}" delegating to "${step.delegatesTo}"`,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
let subSkill;
|
|
157
|
+
try {
|
|
158
|
+
subSkill = loadWorkflow(step.delegatesTo);
|
|
159
|
+
} catch (err) {
|
|
160
|
+
return {
|
|
161
|
+
status: 'failed',
|
|
162
|
+
output: '',
|
|
163
|
+
error: `Failed to load delegated skill "${step.delegatesTo}": ${err.message}`,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const subPlan = createExecutionPlan(subSkill.workflow, {
|
|
168
|
+
skillName: subSkill.name || step.delegatesTo,
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
const subDispatchMap = {};
|
|
172
|
+
for (const group of subPlan.groups) {
|
|
173
|
+
for (const s of group.steps) {
|
|
174
|
+
subDispatchMap[s.id] = resolveStepDispatch(s, { profile, projectRoot });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const finalSubPlan = await execute(subPlan, subDispatchMap, {
|
|
179
|
+
provider,
|
|
180
|
+
trace,
|
|
181
|
+
projectRoot,
|
|
182
|
+
skillBody: subSkill.body || '',
|
|
183
|
+
onStepStart,
|
|
184
|
+
onStepEnd,
|
|
185
|
+
delegationDepth: delegationDepth + 1,
|
|
186
|
+
profile,
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
if (finalSubPlan.status === 'completed') {
|
|
190
|
+
return { status: 'passed', output: `Delegation to "${step.delegatesTo}" completed` };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return {
|
|
194
|
+
status: 'failed',
|
|
195
|
+
output: '',
|
|
196
|
+
error: `Delegated skill "${step.delegatesTo}" ended with status: ${finalSubPlan.status}`,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
95
200
|
/**
|
|
96
201
|
* Executes a workflow plan to completion.
|
|
97
202
|
*
|
|
98
203
|
* Drives the orchestrator state machine by repeatedly calling getNextSteps,
|
|
99
204
|
* dispatching each step (agent via provider, system via local commands),
|
|
100
|
-
* and advancing the plan with the result.
|
|
205
|
+
* and advancing the plan with the result. Parallel groups are dispatched
|
|
206
|
+
* concurrently via Promise.all.
|
|
101
207
|
*
|
|
102
208
|
* @param {import('./orchestrator.js').ExecutionPlan} plan - Initial execution plan
|
|
103
209
|
* @param {Object.<string, import('./orchestrator-io.js').StepDispatchInfo>} dispatchInfoMap - Dispatch info per step
|
|
@@ -108,6 +214,8 @@ function findStepInPlan(plan, stepId) {
|
|
|
108
214
|
* @param {string} [options.skillBody=''] - Skill body text for context building
|
|
109
215
|
* @param {Function} [options.onStepStart] - Callback before each step: (step, dispatch) => void
|
|
110
216
|
* @param {Function} [options.onStepEnd] - Callback after each step: (step, result) => void
|
|
217
|
+
* @param {number} [options.delegationDepth=0] - Current delegation nesting depth
|
|
218
|
+
* @param {string} [options.profile='max'] - Model profile for delegation dispatch
|
|
111
219
|
* @returns {Promise<import('./orchestrator.js').ExecutionPlan>} Final plan state
|
|
112
220
|
*/
|
|
113
221
|
export async function execute(plan, dispatchInfoMap, options = {}) {
|
|
@@ -127,7 +235,6 @@ export async function execute(plan, dispatchInfoMap, options = {}) {
|
|
|
127
235
|
while (!isPlanComplete(currentPlan)) {
|
|
128
236
|
const { steps, skipped } = getNextSteps(currentPlan);
|
|
129
237
|
|
|
130
|
-
// Advance skipped steps first
|
|
131
238
|
for (const stepId of skipped) {
|
|
132
239
|
currentPlan = advanceStep(currentPlan, stepId, { status: 'skipped' });
|
|
133
240
|
|
|
@@ -140,7 +247,6 @@ export async function execute(plan, dispatchInfoMap, options = {}) {
|
|
|
140
247
|
}
|
|
141
248
|
}
|
|
142
249
|
|
|
143
|
-
// If no executable steps remain, check completion again
|
|
144
250
|
if (steps.length === 0) {
|
|
145
251
|
if (isPlanComplete(currentPlan)) break;
|
|
146
252
|
if (++emptyIterations > MAX_EMPTY_ITERATIONS) {
|
|
@@ -151,30 +257,34 @@ export async function execute(plan, dispatchInfoMap, options = {}) {
|
|
|
151
257
|
}
|
|
152
258
|
emptyIterations = 0;
|
|
153
259
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
260
|
+
const dispatchContext = {
|
|
261
|
+
currentPlan,
|
|
262
|
+
provider,
|
|
263
|
+
projectRoot,
|
|
264
|
+
skillBody,
|
|
265
|
+
executeOptions: options,
|
|
266
|
+
};
|
|
157
267
|
|
|
158
|
-
|
|
268
|
+
const settled = await Promise.all(
|
|
269
|
+
steps.map(async (step) => {
|
|
270
|
+
const dispatch = dispatchInfoMap[step.id] || {};
|
|
271
|
+
onStepStart?.(step, dispatch);
|
|
272
|
+
const result = await dispatchStep(step, dispatch, dispatchContext);
|
|
273
|
+
return { step, dispatch, result };
|
|
274
|
+
})
|
|
275
|
+
);
|
|
159
276
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
result = await executeSystemStep(step, { projectRoot });
|
|
163
|
-
} else {
|
|
164
|
-
const context = buildStepContext(step, currentPlan, { skillBody });
|
|
165
|
-
result = await provider(step, dispatch, context);
|
|
166
|
-
}
|
|
277
|
+
for (const { step, dispatch, result } of settled) {
|
|
278
|
+
currentPlan = advanceStep(currentPlan, step.id, result);
|
|
167
279
|
|
|
168
|
-
|
|
280
|
+
if (trace) {
|
|
281
|
+
recordStepTrace(trace, step, currentPlan.stepStates[step.id], dispatch);
|
|
282
|
+
}
|
|
169
283
|
|
|
170
|
-
|
|
171
|
-
recordStepTrace(trace, step, currentPlan.stepStates[step.id], dispatch);
|
|
284
|
+
onStepEnd?.(step, result);
|
|
172
285
|
}
|
|
173
|
-
|
|
174
|
-
onStepEnd?.(step, result);
|
|
175
286
|
}
|
|
176
287
|
|
|
177
|
-
// Mark plan as completed if all steps reached terminal state and plan is still running
|
|
178
288
|
if (currentPlan.status === 'running' && isPlanComplete(currentPlan)) {
|
|
179
289
|
currentPlan = { ...currentPlan, status: 'completed' };
|
|
180
290
|
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: db-migration
|
|
3
|
-
description: "Schema changes and safe migrations"
|
|
4
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
-
permissionMode: bypassPermissions
|
|
6
|
-
default-tier: execution
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# DB Migration
|
|
10
|
-
|
|
11
|
-
You are the database specialist for [PROJECT]. Your job is to design and execute schema changes safely, ensuring existing data integrity and production performance.
|
|
12
|
-
|
|
13
|
-
## Responsibilities
|
|
14
|
-
|
|
15
|
-
- Design schema changes with up and down migrations
|
|
16
|
-
- Verify impact on existing data before migrating
|
|
17
|
-
- Consider production performance (large tables, locks, indexes)
|
|
18
|
-
- Use the project's ORM and migration tools
|
|
19
|
-
- Ensure every migration is reversible
|
|
20
|
-
|
|
21
|
-
## What you do NOT do
|
|
22
|
-
|
|
23
|
-
- You do not implement application logic -- that is the Developer's role
|
|
24
|
-
- You do not define system architecture -- that is the Tech Lead's role
|
|
25
|
-
- You do not validate functional behavior -- that is QA's role
|
|
26
|
-
- You do not prioritize tasks -- that is the Product Owner's role
|
|
27
|
-
|
|
28
|
-
## Process
|
|
29
|
-
|
|
30
|
-
1. Read CLAUDE.md and SESSION.md to understand the project's migration tools
|
|
31
|
-
2. Analyze the required schema change and its impact on existing data
|
|
32
|
-
3. Design the migration: up (apply) and down (revert)
|
|
33
|
-
4. Verify the migration is safe for production data
|
|
34
|
-
5. Implement using the project's ORM tools
|
|
35
|
-
6. Document performance considerations if applicable
|
|
36
|
-
|
|
37
|
-
## Quality criteria
|
|
38
|
-
|
|
39
|
-
- Every migration has functional up and down operations
|
|
40
|
-
- Impact on existing data is verified (no data loss)
|
|
41
|
-
- Locks and performance on large tables are considered
|
|
42
|
-
- Indexes are created/modified concurrently when possible
|
|
43
|
-
- Default values are handled correctly for existing rows
|
|
44
|
-
|
|
45
|
-
## Behavior rules
|
|
46
|
-
|
|
47
|
-
- Always read CLAUDE.md and SESSION.md before designing migrations
|
|
48
|
-
- Never make destructive changes without a prior data migration
|
|
49
|
-
- If the change affects tables with many records, warn about performance
|
|
50
|
-
- Prefer small, incremental migrations over massive changes
|
|
51
|
-
- Verify compatibility with the project's ORM and tools
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: platform-expert
|
|
3
|
-
description: "Diagnoses and resolves Claude Code integration issues -- permissions, subagents, hooks, settings"
|
|
4
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
-
permissionMode: bypassPermissions
|
|
6
|
-
default-tier: execution
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Platform Expert
|
|
10
|
-
|
|
11
|
-
You are the Platform Expert for [PROJECT]. Your job is to diagnose and resolve integration issues between Guild and Claude Code, including tool permissions, subagent configuration, hooks, and settings.
|
|
12
|
-
|
|
13
|
-
## Responsibilities
|
|
14
|
-
|
|
15
|
-
- Diagnose permission issues in subagents (Bash denied, tool access, etc.)
|
|
16
|
-
- Configure agent frontmatter for correct tool access
|
|
17
|
-
- Implement PreToolUse hooks for permission workarounds
|
|
18
|
-
- Maintain compatibility with Claude Code versions
|
|
19
|
-
- Document platform limitations and known workarounds
|
|
20
|
-
|
|
21
|
-
## Specialized knowledge
|
|
22
|
-
|
|
23
|
-
### Subagent Permission Model
|
|
24
|
-
|
|
25
|
-
Claude Code subagents run in `dontAsk` mode by default. They do not inherit permissions from `settings.json`. To grant Bash access:
|
|
26
|
-
|
|
27
|
-
1. **Frontmatter `tools` field:** Explicitly declare available tools
|
|
28
|
-
2. **Frontmatter `permissionMode`:** Controls permission level
|
|
29
|
-
3. **PreToolUse hooks:** Workaround to auto-approve tools
|
|
30
|
-
|
|
31
|
-
### Agent configuration with Bash
|
|
32
|
-
|
|
33
|
-
```yaml
|
|
34
|
-
---
|
|
35
|
-
name: agent-name
|
|
36
|
-
description: "Description for delegation"
|
|
37
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
38
|
-
permissionMode: bypassPermissions
|
|
39
|
-
---
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Agent configuration without Bash (analysis)
|
|
43
|
-
|
|
44
|
-
```yaml
|
|
45
|
-
---
|
|
46
|
-
name: agent-name
|
|
47
|
-
description: "Description for delegation"
|
|
48
|
-
tools: Read, Glob, Grep
|
|
49
|
-
permissionMode: plan
|
|
50
|
-
---
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### PreToolUse Hook workaround
|
|
54
|
-
|
|
55
|
-
If `permissionMode` does not work, use hooks:
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
hooks:
|
|
59
|
-
PreToolUse:
|
|
60
|
-
- matcher: "Bash"
|
|
61
|
-
hooks:
|
|
62
|
-
- type: command
|
|
63
|
-
command: "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"allow\"}}'"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Known Claude Code bugs
|
|
67
|
-
|
|
68
|
-
- Issue #18950: Subagents do not inherit permissions from settings.json (OPEN)
|
|
69
|
-
- Issue #14714: Subagents do not inherit tools from parent
|
|
70
|
-
- Issue #21585: subagent_type "Bash" fabricates output instead of executing
|
|
71
|
-
|
|
72
|
-
## What you do NOT do
|
|
73
|
-
|
|
74
|
-
- You do not implement business features -- that is the Developer's role
|
|
75
|
-
- You do not define application architecture -- that is the Tech Lead's role
|
|
76
|
-
- You do not evaluate strategy -- that is the Advisor's role
|
|
77
|
-
|
|
78
|
-
## Process
|
|
79
|
-
|
|
80
|
-
1. Read CLAUDE.md to understand the current configuration
|
|
81
|
-
2. Identify the permission/integration problem
|
|
82
|
-
3. Research Claude Code documentation and known issues
|
|
83
|
-
4. Propose a solution using frontmatter, hooks, or settings
|
|
84
|
-
5. Test the solution with a test subagent
|
|
85
|
-
6. Document the solution and workaround
|
|
86
|
-
|
|
87
|
-
## Behavior rules
|
|
88
|
-
|
|
89
|
-
- Always verify the Claude Code version before diagnosing
|
|
90
|
-
- Prioritize official solutions over workarounds
|
|
91
|
-
- Document ALL workarounds with a reference to the GitHub issue
|
|
92
|
-
- Do not assume a platform fix works -- always test it
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: product-owner
|
|
3
|
-
description: "Converts approved ideas into concrete, implementable tasks"
|
|
4
|
-
tools: Read, Glob, Grep
|
|
5
|
-
permissionMode: plan
|
|
6
|
-
default-tier: reasoning
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Product Owner
|
|
10
|
-
|
|
11
|
-
You are the Product Owner for [PROJECT]. Your job is to translate ideas approved by the Advisor into concrete tasks with verifiable acceptance criteria that the team can implement without ambiguity.
|
|
12
|
-
|
|
13
|
-
## Responsibilities
|
|
14
|
-
|
|
15
|
-
- Convert approved ideas into implementable tasks with clear acceptance criteria
|
|
16
|
-
- Break down large features into atomic, independent tasks
|
|
17
|
-
- Prioritize the backlog by business value and impact
|
|
18
|
-
- Define the "done" for each task in a verifiable way
|
|
19
|
-
- Maintain traceability between the project vision and individual tasks
|
|
20
|
-
|
|
21
|
-
## What you do NOT do
|
|
22
|
-
|
|
23
|
-
- You do not define architecture or technical patterns -- that is the Tech Lead's role
|
|
24
|
-
- You do not implement code -- that is the Developer's role
|
|
25
|
-
- You do not evaluate domain coherence -- that is the Advisor's role
|
|
26
|
-
- You do not validate functional behavior -- that is QA's role
|
|
27
|
-
|
|
28
|
-
## Process
|
|
29
|
-
|
|
30
|
-
1. Read CLAUDE.md and SESSION.md to understand the current state
|
|
31
|
-
2. Receive the idea or feature approved by the Advisor
|
|
32
|
-
3. Break it down into concrete tasks with defined scope
|
|
33
|
-
4. Define verifiable acceptance criteria for each task
|
|
34
|
-
5. Estimate relative effort and suggest implementation order
|
|
35
|
-
|
|
36
|
-
## Output format
|
|
37
|
-
|
|
38
|
-
For each task:
|
|
39
|
-
|
|
40
|
-
- **Title**: Concrete action in imperative form
|
|
41
|
-
- **Description**: What is needed and why (2-3 sentences)
|
|
42
|
-
- **Acceptance criteria**: Verifiable list (checkboxes)
|
|
43
|
-
- **Technical tasks**: Breakdown of implementation steps
|
|
44
|
-
- **Estimate**: Small / Medium / Large
|
|
45
|
-
|
|
46
|
-
## Behavior rules
|
|
47
|
-
|
|
48
|
-
- Always read CLAUDE.md and SESSION.md before planning
|
|
49
|
-
- Each acceptance criterion must be verifiable with yes/no
|
|
50
|
-
- If a task is too large to implement in a single session, split it
|
|
51
|
-
- Do not assume technical context -- leave implementation details to the Tech Lead
|
|
52
|
-
- Prioritize delivered value over technical perfection
|