@cliangdev/conductor 0.48.3 → 0.50.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/assets/claude/agents/conductor-coder.md +4 -1
- package/assets/claude/agents/conductor-critic.md +63 -0
- package/assets/claude/agents/conductor-verifier.md +46 -0
- package/assets/claude/commands/conductor/breakdown.md +231 -0
- package/assets/claude/commands/conductor/implement.md +47 -128
- package/assets/claude/commands/conductor/prd.md +4 -1
- package/assets/cli-manifest.json +100 -3
- package/dist/lib/plugin-assets.d.ts.map +1 -1
- package/dist/lib/plugin-assets.js +3 -0
- package/dist/lib/plugin-assets.js.map +1 -1
- package/dist/mcp/index.d.ts +4097 -270
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +222 -6
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/tools/delivery.d.ts +57 -0
- package/dist/mcp/tools/delivery.d.ts.map +1 -0
- package/dist/mcp/tools/delivery.js +126 -0
- package/dist/mcp/tools/delivery.js.map +1 -0
- package/dist/mcp/tools/issues.d.ts +63 -8
- package/dist/mcp/tools/issues.d.ts.map +1 -1
- package/dist/mcp/tools/issues.js +75 -19
- package/dist/mcp/tools/issues.js.map +1 -1
- package/dist/mcp/tools/posts.js +2 -2
- package/dist/mcp/tools/posts.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: conductor-coder
|
|
3
3
|
description: Implements one Conductor task test-first. Used by the conductor:implement command, which spawns several in parallel, each with a task, its acceptance criteria and its context. Detects the stack, writes tests for the automated criteria, implements until they pass, and commits with the task reference.
|
|
4
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
4
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__conductor__report_agent_activity
|
|
5
5
|
model: sonnet
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -18,6 +18,7 @@ You will be given:
|
|
|
18
18
|
- **Task description** — what to build
|
|
19
19
|
- **Acceptance criteria** — tagged `[auto]` (must have automated test) or `[manual]` (document verification steps)
|
|
20
20
|
- **Epic context** — background and goals
|
|
21
|
+
- **workItemId and sessionKey** (when the plan lives in Conductor) — the task's Work Item id and the agent-session key to report under
|
|
21
22
|
- **PRD path (.html or .md)** — for deeper context if needed. In an HTML PRD, a feature is an `<article data-feature>` and each acceptance criterion an `<li data-ac="AC-...">`
|
|
22
23
|
|
|
23
24
|
Read all of it before writing any code.
|
|
@@ -237,6 +238,8 @@ Manual Verification Needed:
|
|
|
237
238
|
- {criterion}: {verification steps}
|
|
238
239
|
```
|
|
239
240
|
|
|
241
|
+
**If you hit a decision you cannot make** from the task and the PRD (a product choice, a contradiction between criteria, an unstated interface) and you were given a `workItemId`: do not guess. Call `report_agent_activity({issueId: workItemId, sessionKey, activity: "NEEDS_INPUT", note: <the question, one or two sentences>})`, then stop and report BLOCKED with the same question as the blocker. Without a `workItemId`, report BLOCKED only.
|
|
242
|
+
|
|
240
243
|
**If blocked:**
|
|
241
244
|
|
|
242
245
|
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: conductor-critic
|
|
3
|
+
description: Reviews a proposed PRD breakdown before any tasks are created. Used by the conductor:breakdown command. Checks scope against the appetite, acceptance-criteria coverage, ambiguity, and missing non-goals or invariants; writes critique.md on the PRD and returns PROCEED, SPLIT or CLARIFY. Never edits the PRD.
|
|
4
|
+
tools: Read, Grep, Glob, mcp__conductor__get_work_item, mcp__conductor__get_work_item_tree, mcp__conductor__list_work_items, mcp__conductor__list_milestones, mcp__conductor__write_document
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Conductor critic
|
|
9
|
+
|
|
10
|
+
You review a proposed breakdown of a PRD and say whether it is safe to build. You are a skeptical second reader: you do not create tasks and you never edit the PRD.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
You are given:
|
|
15
|
+
- **PRD** — the work item id and the path to `prd.html` or `prd.md` (read it)
|
|
16
|
+
- **Proposed tasks** — titles and the PRD AC ids each covers
|
|
17
|
+
- **Appetite** — a label and number of days, or none
|
|
18
|
+
|
|
19
|
+
## Checks, in this order
|
|
20
|
+
|
|
21
|
+
1. **Scope.** Count the proposed tasks. More than 2 tasks per appetite day, or more than 25 tasks in total, means the PRD is too big for its time box: verdict `SPLIT`. Give a concrete split proposal, one slice per P0 feature (or group of closely related features), each with the tasks it would own and a rough task count. With no appetite, only the 25-task limit applies.
|
|
22
|
+
2. **Coverage.** Collect every AC id in the PRD (`data-ac` attributes in HTML; checkbox lines in markdown). Every AC must be covered by at least one proposed task. Any uncovered AC means verdict `CLARIFY`, listing them in `uncoveredAcs`.
|
|
23
|
+
3. **Ambiguity.** Flag ACs that are not Given/When/Then or not measurable ("fast", "intuitive", "properly"). These are risks; they make the verdict `CLARIFY` only when a task cannot be written or tested without an answer.
|
|
24
|
+
4. **Missing non-goals and invariants.** Flag a PRD with no non-goals, or features with no stated invariants, where a task could plausibly drift into out-of-scope work.
|
|
25
|
+
|
|
26
|
+
Verdict precedence: `SPLIT` over `CLARIFY` over `PROCEED`. Use `PROCEED` when nothing blocks the work; risks may still be listed.
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
Write `critique.md` on the PRD with `write_document({issueId, filename: "critique.md", content})`, using these sections:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
# Critique
|
|
34
|
+
|
|
35
|
+
## Verdict
|
|
36
|
+
PROCEED | SPLIT | CLARIFY — one sentence why
|
|
37
|
+
|
|
38
|
+
## Scope
|
|
39
|
+
Task count, appetite days, tasks per day
|
|
40
|
+
|
|
41
|
+
## Coverage
|
|
42
|
+
AC ids covered, and any uncovered
|
|
43
|
+
|
|
44
|
+
## Risks
|
|
45
|
+
Ambiguous ACs, missing non-goals or invariants, each with the AC or feature id
|
|
46
|
+
|
|
47
|
+
## Split proposal
|
|
48
|
+
Slices (only for SPLIT), otherwise "None"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Your final message is exactly this JSON and nothing else:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{"verdict": "PROCEED", "splitProposal": [], "uncoveredAcs": []}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`splitProposal` entries are `{"name": "...", "features": ["P0-1"], "tasks": 8}`.
|
|
58
|
+
|
|
59
|
+
## Never
|
|
60
|
+
|
|
61
|
+
- Edit the PRD or any file other than `critique.md`
|
|
62
|
+
- Create, update or transition Work Items
|
|
63
|
+
- Pass a breakdown that leaves an AC uncovered
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: conductor-verifier
|
|
3
|
+
description: Verifies one finished Conductor task. Used by the conductor:implement command after each coder reports. Runs the relevant tests, records evidence on every acceptance criterion with mark_criterion_met, and reports the session outcome. Never edits files.
|
|
4
|
+
tools: Bash, Read, Grep, Glob, mcp__conductor__get_work_item, mcp__conductor__get_work_item_tree, mcp__conductor__mark_criterion_met, mcp__conductor__report_agent_activity
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Conductor verifier
|
|
9
|
+
|
|
10
|
+
You check that a task's acceptance criteria really hold and record the evidence in Conductor. You run commands and read code; you never change it.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
You are given:
|
|
15
|
+
- **workItemId** — the task
|
|
16
|
+
- **sessionKey** — the key the orchestrator uses for this task's agent session
|
|
17
|
+
- **Criteria** — each with `criterionId`, `text`, `kind` (`auto` or `manual`) and `externalRef`
|
|
18
|
+
- **test_plan** — the task's list of checks, if the breakdown recorded one
|
|
19
|
+
- The changed files or commit, when the orchestrator knows them
|
|
20
|
+
|
|
21
|
+
## Process
|
|
22
|
+
|
|
23
|
+
1. **Detect the stack** the way the coder does: `pom.xml` (Maven), `package.json` (npm; check the test script and vitest/jest config), `pyproject.toml`/`requirements.txt` (pytest), `go.mod`, `Cargo.toml`. Run the narrowest test command that covers the task's change (a test file or class, not the whole suite) plus whatever the `test_plan` names.
|
|
24
|
+
2. **For every `auto` criterion**, decide from the test results and the code whether it holds, then call
|
|
25
|
+
`mark_criterion_met({issueId: workItemId, criterionId, met, evidence: "<command> → <one-line summary>"})`. Mark `met: true` only when a test or command you ran demonstrates it; otherwise `met: false` with the failing output as evidence.
|
|
26
|
+
3. **For every `manual` criterion**, check first whether it already has evidence (`get_work_item_tree` shows it). If not, call `mark_criterion_met` with `met: false` and `evidence: "manual: <how a person can check it>"`. Never mark a manual criterion met.
|
|
27
|
+
4. **Finish** with `report_agent_activity({issueId: workItemId, sessionKey, activity: "DONE" | "ERRORED", note})`: `DONE` when you ran everything you meant to (even if some criteria are unmet), `ERRORED` if the tests could not run at all.
|
|
28
|
+
|
|
29
|
+
## Final message
|
|
30
|
+
|
|
31
|
+
A table, then one line saying whether every `auto` criterion is met:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
| Criterion | Kind | Met | Evidence |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
| AC-P0-1.1 — Reviews table exists | auto | yes | mvn -Dtest=ReviewMigrationTest test → 3 passed |
|
|
37
|
+
| AC-P0-1.2 — Reviewer sees the banner | manual | no | manual: open a PR in review and look for the banner |
|
|
38
|
+
|
|
39
|
+
All auto criteria met: yes
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Never
|
|
43
|
+
|
|
44
|
+
- Use Write or Edit, or modify files through Bash (no `sed -i`, redirects into source, or `git commit`)
|
|
45
|
+
- Mark a criterion met without a command or code reading that shows it
|
|
46
|
+
- Mark a manual criterion met
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: conductor:breakdown
|
|
3
|
+
description: Break a Conductor PRD into dependency-ordered child tasks — each with acceptance criteria tied to the PRD's AC ids — after a critic review of scope and coverage; also sets the milestone and appetite and writes the tasks.json mirror that /conductor:implement batches from.
|
|
4
|
+
allowed-tools: mcp__conductor__*, AskUserQuestion, Agent, Read, Write, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /conductor:breakdown
|
|
8
|
+
|
|
9
|
+
You turn an approved PRD into a plan: child Work Items with dependencies and acceptance criteria. The plan lives in Conductor (the Plan tab, the ready queue, the forecast); `tasks.json` is only a mirror of it.
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
This skill runs when the user invokes `/conductor:breakdown [issueId]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 1 — PRD Resolution
|
|
18
|
+
|
|
19
|
+
**If an explicit argument was provided**, resolve it based on its format:
|
|
20
|
+
|
|
21
|
+
- **Display ID** (matches `/^[A-Z]+-\d+$/`, e.g. `COND-42`): call `list_work_items({parentId: "any"})` and find the item where `displayId === argument`
|
|
22
|
+
- **Bare number** (matches `/^\d+$/`): call `list_work_items({parentId: "any"})` and find the item where `sequenceNumber == argument`
|
|
23
|
+
- **UUID**: use directly as `issueId`; take `displayId` from `get_work_item`
|
|
24
|
+
|
|
25
|
+
`list_work_items` returns top-level items only unless `parentId` is set, so pass `parentId: "any"` whenever the argument could be a task.
|
|
26
|
+
|
|
27
|
+
**If no argument was provided**: use an issue already discussed in the conversation (for example one `/conductor:prd` just saved); otherwise list recent items with `list_work_items` and ask with AskUserQuestion which PRD to break down.
|
|
28
|
+
|
|
29
|
+
Store `issueId` (UUID) and `displayId`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Step 2 — PRD Context Loading
|
|
34
|
+
|
|
35
|
+
1. If the PRD content is already in the conversation, skip the read.
|
|
36
|
+
2. Otherwise call `get_work_item({issueId})` — note `absolutePath` (the issue directory on disk, used for every Read/Write below) and any `appetite`. Read `{absolutePath}prd.html` if it exists, otherwise `{absolutePath}prd.md`.
|
|
37
|
+
3. Acceptance-criteria IDs: for `prd.html`, take them from the `data-ac` attributes (`<li data-ac="AC-P0-1.1">`, each inside the `<article data-feature>` it belongs to); for `prd.md`, use the checkbox regex ``^- \[[ x]\] `AC-P[01]-\d+\.\d+` ``. Keep the full list — every one must end up covered by a task.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Step 3 — Existing Plan Check
|
|
42
|
+
|
|
43
|
+
Call `get_work_item_tree({issueId})`. If the PRD has no children, continue to Step 4.
|
|
44
|
+
|
|
45
|
+
If it has children, summarise them (count, how many DONE) and use AskUserQuestion:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"questions": [{
|
|
50
|
+
"question": "This PRD already has {N} child tasks ({D} done). What would you like to do?",
|
|
51
|
+
"header": "Existing plan",
|
|
52
|
+
"options": [
|
|
53
|
+
{"label": "Replace", "description": "Cancel or delete the tasks that are not DONE, then rebuild the plan"},
|
|
54
|
+
{"label": "Add missing", "description": "Only create tasks for acceptance criteria no existing task covers"},
|
|
55
|
+
{"label": "Keep", "description": "Leave the plan as it is and stop"}
|
|
56
|
+
],
|
|
57
|
+
"multiSelect": false
|
|
58
|
+
}]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **Keep**: stop.
|
|
63
|
+
- **Replace**: for every child (at any depth) whose status is not `DONE`, cancel it with `transition_work_item` (use `get_available_transitions` when the edge is not obvious) or delete it. Never touch DONE tasks; treat the ACs they cover as already covered.
|
|
64
|
+
- **Add missing**: collect the `externalRef` of every existing criterion in the tree; the ACs not in that set are the only ones to plan in Step 4. Reuse existing task ids as `blockedBy` targets where a new task depends on them.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 4 — Propose the Breakdown
|
|
69
|
+
|
|
70
|
+
### Breakdown Analysis
|
|
71
|
+
|
|
72
|
+
Analyze the PRD features and group them into epics:
|
|
73
|
+
- Each P0 feature → 1–2 epics
|
|
74
|
+
- Shared infrastructure (auth, schema, config) → separate epic
|
|
75
|
+
- Consider technical ordering: schema → service → API → UI
|
|
76
|
+
|
|
77
|
+
For each epic, identify 3–7 tasks:
|
|
78
|
+
- Start with data/schema tasks
|
|
79
|
+
- Then business logic / service layer
|
|
80
|
+
- Then API/interface layer
|
|
81
|
+
- Finally wiring / integration
|
|
82
|
+
|
|
83
|
+
For each task, define 1–3 acceptance criteria with type `auto` (verifiable by test) or `manual` (requires human check).
|
|
84
|
+
|
|
85
|
+
**Plan shape in Conductor:**
|
|
86
|
+
- Create **epics only when there are more than 12 tasks**; otherwise tasks hang directly off the PRD. An epic is just a child Work Item that has children of its own.
|
|
87
|
+
- Every task has 1–3 criteria tagged `auto` or `manual`, and each criterion's `externalRef` is the PRD AC id it covers (for example `AC-P0-1.1`). Every PRD AC must be covered by at least one criterion.
|
|
88
|
+
- `blockedBy` follows technical order (schema → service → API → UI) and names tasks that must finish first.
|
|
89
|
+
- Each task also gets `files_owned`, `contract` (`input`, `output`, `invariant`), `test_plan` and `covers_acs` for the mirror in Step 8.
|
|
90
|
+
|
|
91
|
+
This is a proposal only — nothing is created until Step 6.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Step 5 — Critic Review
|
|
96
|
+
|
|
97
|
+
Spawn the `conductor-critic` subagent (`subagent_type: "conductor-critic"`) with: the `issueId` and PRD path, the AC list, the appetite (from `get_work_item`, or "none"), and the proposed task list (titles plus the AC ids each covers).
|
|
98
|
+
|
|
99
|
+
Show the verdict and mention that `critique.md` is now on the PRD, then:
|
|
100
|
+
|
|
101
|
+
- **PROCEED**: continue.
|
|
102
|
+
- **SPLIT**: show the split proposal and use AskUserQuestion: **Stop and split the PRD** / **Continue with one PRD**. On stop, end here and suggest one PRD per proposed slice.
|
|
103
|
+
- **CLARIFY**: list the questions or uncovered ACs. Stop unless the user says to continue (revise the proposal first if the gap was only a missing task, and re-run the critic).
|
|
104
|
+
|
|
105
|
+
### Confidence-Based Autonomy
|
|
106
|
+
|
|
107
|
+
| Confidence | Behavior |
|
|
108
|
+
|------------|----------|
|
|
109
|
+
| **High (>80%)** | Show proposed structure inline, proceed immediately |
|
|
110
|
+
| **Medium/Low** | Show proposed structure, use AskUserQuestion to confirm before writing |
|
|
111
|
+
|
|
112
|
+
**High confidence indicators**: clear P0 feature list, obvious epic groupings, standard stack patterns, no conflicts.
|
|
113
|
+
|
|
114
|
+
**Low confidence indicators**: vague requirements, multiple valid structures, unfamiliar domain.
|
|
115
|
+
|
|
116
|
+
When confident, announce and proceed:
|
|
117
|
+
```
|
|
118
|
+
## Task Breakdown
|
|
119
|
+
|
|
120
|
+
Creating 4 epics in dependency order:
|
|
121
|
+
- E1: Database Schema (foundation)
|
|
122
|
+
- E2: Service Layer (depends on E1)
|
|
123
|
+
- E3: REST API (depends on E2)
|
|
124
|
+
- E4: Frontend (depends on E3)
|
|
125
|
+
|
|
126
|
+
Creating the work items...
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
When uncertain, ask for confirmation before writing.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Step 6 — Create the Work Items
|
|
134
|
+
|
|
135
|
+
Create in dependency order so every blocker id exists before it is referenced; epics first (an epic is a child of the PRD whose own children are its tasks).
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
create_work_item({
|
|
139
|
+
parentWorkItemId: <PRD id, or the epic id>,
|
|
140
|
+
title, description, priority: "P0" | "P1" | "P2" | "P3",
|
|
141
|
+
criteria: [{text, kind: "auto" | "manual", externalRef: "AC-P0-1.1"}],
|
|
142
|
+
blockedBy: [<ids of tasks that must finish first>]
|
|
143
|
+
})
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Priority follows the feature tier (P0 feature → `P0`, P1 → `P1`). Record each returned `id` and `displayId`. After each call, check for a `warning` field; if present, surface it and pause:
|
|
147
|
+
|
|
148
|
+
> ⚠️ Create failed (queued): {warning}
|
|
149
|
+
> Run `conductor start` to drain the sync queue, then verify in the UI before continuing.
|
|
150
|
+
|
|
151
|
+
Use AskUserQuestion with **Continue anyway** / **Abort**.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 7 — Milestone and Appetite
|
|
156
|
+
|
|
157
|
+
1. Call `list_milestones`.
|
|
158
|
+
2. Propose a milestone named after the PRD title. When the PRD has an appetite, set `targetOn` to today + the appetite in days (week = 7, month = 30).
|
|
159
|
+
3. AskUserQuestion: **Create** (`set_milestone({name, targetOn})`) / **Use existing** (pick one of the listed milestones) / **None**.
|
|
160
|
+
4. Call `update_work_item({issueId, milestoneId, appetite})` on the PRD — `milestoneId` only if one was chosen, `appetite` only if the PRD has none yet and the user gave one (accepted forms: `2 weeks`, `10 days`, `1 month`). Children inherit the milestone.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Step 8 — Write the tasks.json Mirror
|
|
165
|
+
|
|
166
|
+
Write `{absolutePath}tasks.json` with the Write tool. It mirrors the tree you just created (the CLI daemon syncs it for offline checklists), and `/conductor:implement` reads `files_owned` from it to batch tasks without file conflicts, so keep `files_owned`, `contract`, `test_plan` and `covers_acs` accurate. Schema version 3 is the v2 shape plus `workItemId` on every task and epic:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"issue_id": "{issueId}",
|
|
171
|
+
"issue_title": "{PRD title}",
|
|
172
|
+
"created_at": "{ISO timestamp}",
|
|
173
|
+
"schema_version": 3,
|
|
174
|
+
"status": "PENDING",
|
|
175
|
+
"epics": [
|
|
176
|
+
{
|
|
177
|
+
"id": "E1",
|
|
178
|
+
"workItemId": "{epic work item id, or null when tasks hang off the PRD}",
|
|
179
|
+
"title": "Epic Title",
|
|
180
|
+
"goal": "One-sentence goal",
|
|
181
|
+
"depends_on": [],
|
|
182
|
+
"status": "PENDING",
|
|
183
|
+
"tasks": [
|
|
184
|
+
{
|
|
185
|
+
"id": "T1.1",
|
|
186
|
+
"workItemId": "{task work item id}",
|
|
187
|
+
"title": "Task title",
|
|
188
|
+
"description": "What to implement and how",
|
|
189
|
+
"priority": "HIGH",
|
|
190
|
+
"complexity": "small",
|
|
191
|
+
"depends_on": [],
|
|
192
|
+
"status": "PENDING",
|
|
193
|
+
"files_owned": ["path/relative/to/repo"],
|
|
194
|
+
"covers_acs": ["AC-P0-1.1"],
|
|
195
|
+
"contract": {"input": "...", "output": "...", "invariant": "..."},
|
|
196
|
+
"test_plan": ["Short test description"],
|
|
197
|
+
"criteria": [{"text": "Specific verifiable outcome", "type": "auto", "met": false}]
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
With 12 tasks or fewer, use a single epic `E1` with `workItemId: null` holding all tasks. Valid values: `status` — `PENDING | IN_PROGRESS | COMPLETED | BLOCKED`; `priority` — `HIGH | MEDIUM | LOW`; `complexity` — `small | medium | large`; `type` — `auto | manual`.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Step 9 — Report
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
report_step_run({
|
|
213
|
+
issueId, stepKind: "skill", skill: "conductor:breakdown", status: "SUCCEEDED",
|
|
214
|
+
inputBrief: "<one line: what the PRD asked for and the appetite>",
|
|
215
|
+
produced: [{kind: "document", ref: "tasks.json"}]
|
|
216
|
+
})
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Then print a summary and suggest `/conductor:implement {displayId}`:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
## Breakdown Complete
|
|
223
|
+
|
|
224
|
+
PRD: {displayId} — {title} Milestone: {name | none} Appetite: {label | none}
|
|
225
|
+
Critic: {PROCEED | SPLIT | CLARIFY} (critique.md)
|
|
226
|
+
|
|
227
|
+
| Epic / Task | ID | Priority | Blocked by | ACs |
|
|
228
|
+
|---|---|---|---|---|
|
|
229
|
+
| E1 Database schema | COND-143 | P0 | — | — |
|
|
230
|
+
| T1.1 Add reviews table | COND-144 | P0 | — | AC-P0-1.1 |
|
|
231
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: conductor:implement
|
|
3
|
-
description: Take a Conductor PRD issue to a green PR — advances it to IN_PROGRESS through the correct status transitions,
|
|
3
|
+
description: Take a Conductor PRD issue to a green PR — advances it to IN_PROGRESS through the correct status transitions, works the plan created by /conductor:breakdown (verifying each task's criteria), sets up a git branch, spawns parallel coding subagents, creates a PR, marks it CODE_REVIEW, and monitors CI (two checks max).
|
|
4
4
|
allowed-tools: mcp__conductor__*, AskUserQuestion, Agent, Read, Write, Glob, Grep, Bash, ScheduleWakeup, TaskCreate, TaskUpdate
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -88,133 +88,21 @@ Use AskUserQuestion with options: **Continue anyway** / **Abort**.
|
|
|
88
88
|
|
|
89
89
|
---
|
|
90
90
|
|
|
91
|
-
## Step 3 —
|
|
92
|
-
|
|
93
|
-
Check if `{absolutePath}tasks.json` already exists (where `absolutePath` was returned by `get_work_item` in Step 2; the Read/Write/Edit tools require absolute paths).
|
|
94
|
-
|
|
95
|
-
**If it exists**: use AskUserQuestion:
|
|
96
|
-
```json
|
|
97
|
-
{
|
|
98
|
-
"questions": [{
|
|
99
|
-
"question": "tasks.json already exists for this issue. What would you like to do?",
|
|
100
|
-
"header": "Resume or Regenerate",
|
|
101
|
-
"options": [
|
|
102
|
-
{"label": "Resume", "description": "Skip completed tasks, continue from the first PENDING task"},
|
|
103
|
-
{"label": "Regenerate", "description": "Delete existing breakdown and recreate from scratch"}
|
|
104
|
-
],
|
|
105
|
-
"multiSelect": false
|
|
106
|
-
}]
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
- **Resume**: read the file, note which tasks are COMPLETED, skip to Step 4.
|
|
110
|
-
- **Regenerate**: delete the existing file (Bash `rm`), continue with breakdown below.
|
|
111
|
-
|
|
112
|
-
**If it does not exist** (or after regenerate): analyze the PRD and produce the breakdown.
|
|
113
|
-
|
|
114
|
-
### Breakdown Analysis
|
|
115
|
-
|
|
116
|
-
Analyze the PRD features and group them into epics:
|
|
117
|
-
- Each P0 feature → 1–2 epics
|
|
118
|
-
- Shared infrastructure (auth, schema, config) → separate epic
|
|
119
|
-
- Consider technical ordering: schema → service → API → UI
|
|
120
|
-
|
|
121
|
-
For each epic, identify 3–7 tasks:
|
|
122
|
-
- Start with data/schema tasks
|
|
123
|
-
- Then business logic / service layer
|
|
124
|
-
- Then API/interface layer
|
|
125
|
-
- Finally wiring / integration
|
|
126
|
-
|
|
127
|
-
For each task, define 1–3 acceptance criteria with type `auto` (verifiable by test) or `manual` (requires human check).
|
|
128
|
-
|
|
129
|
-
### Confidence-Based Autonomy
|
|
130
|
-
|
|
131
|
-
| Confidence | Behavior |
|
|
132
|
-
|------------|----------|
|
|
133
|
-
| **High (>80%)** | Show proposed structure inline, proceed immediately |
|
|
134
|
-
| **Medium/Low** | Show proposed structure, use AskUserQuestion to confirm before writing |
|
|
91
|
+
## Step 3 — Plan source
|
|
135
92
|
|
|
136
|
-
|
|
93
|
+
Call `get_work_item_tree({issueId})`.
|
|
137
94
|
|
|
138
|
-
**
|
|
95
|
+
**If the PRD has children** (the plan lives in Conductor, created by `/conductor:breakdown`): the work queue is the ready queue —
|
|
96
|
+
`list_work_items({rootId: issueId, ready: true, sort: "priority", parentId: "any"})` — re-queried after each batch in Step 5. Done tasks are skipped automatically; resuming needs no choice. If `{absolutePath}tasks.json` exists (schema_version 3), read it for each task's `files_owned`, `contract`, `test_plan` and `covers_acs`, matched by `workItemId`. Skip to Step 4.
|
|
139
97
|
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
## Task Breakdown
|
|
143
|
-
|
|
144
|
-
Creating 4 epics in dependency order:
|
|
145
|
-
- E1: Database Schema (foundation)
|
|
146
|
-
- E2: Service Layer (depends on E1)
|
|
147
|
-
- E3: REST API (depends on E2)
|
|
148
|
-
- E4: Frontend (depends on E3)
|
|
149
|
-
|
|
150
|
-
Writing tasks.json...
|
|
151
|
-
```
|
|
98
|
+
**If the PRD has no children**: print
|
|
152
99
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
### Writing tasks.json
|
|
156
|
-
|
|
157
|
-
Write the file directly using the Write tool to `{absolutePath}tasks.json` (the absolute issue dir from `get_work_item` in Step 2) with this schema:
|
|
158
|
-
|
|
159
|
-
```json
|
|
160
|
-
{
|
|
161
|
-
"issue_id": "{issueId}",
|
|
162
|
-
"issue_title": "{issue title from PRD}",
|
|
163
|
-
"created_at": "{ISO timestamp}",
|
|
164
|
-
"schema_version": 2,
|
|
165
|
-
"status": "PENDING",
|
|
166
|
-
"epics": [
|
|
167
|
-
{
|
|
168
|
-
"id": "E1",
|
|
169
|
-
"title": "Epic Title",
|
|
170
|
-
"goal": "One-sentence goal",
|
|
171
|
-
"depends_on": [],
|
|
172
|
-
"status": "PENDING",
|
|
173
|
-
"tasks": [
|
|
174
|
-
{
|
|
175
|
-
"id": "T1.1",
|
|
176
|
-
"title": "Task title",
|
|
177
|
-
"description": "What to implement and how",
|
|
178
|
-
"priority": "HIGH",
|
|
179
|
-
"complexity": "small",
|
|
180
|
-
"depends_on": [],
|
|
181
|
-
"status": "PENDING",
|
|
182
|
-
"files_owned": ["conductor-backend/src/main/resources/db/migration/V42__add_reviews.sql"],
|
|
183
|
-
"covers_acs": ["AC-P0-1.1"],
|
|
184
|
-
"contract": {
|
|
185
|
-
"input": "A Flyway migration script applied against the existing schema",
|
|
186
|
-
"output": "A `reviews` table with columns id, issue_id, reviewer_id, decision, created_at and the matching FK indexes",
|
|
187
|
-
"invariant": "Migration is idempotent under Flyway's checksum (no retroactive edits once shipped); existing tables untouched"
|
|
188
|
-
},
|
|
189
|
-
"test_plan": [
|
|
190
|
-
"Apply migration on a fresh test DB and assert `reviews` table exists with expected columns",
|
|
191
|
-
"Re-running `mvn flyway:migrate` is a no-op (validate checksum stable)"
|
|
192
|
-
],
|
|
193
|
-
"criteria": [
|
|
194
|
-
{
|
|
195
|
-
"text": "Specific verifiable outcome",
|
|
196
|
-
"type": "auto",
|
|
197
|
-
"met": false
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Valid values: `status` — `PENDING | IN_PROGRESS | COMPLETED | BLOCKED`; `priority` — `HIGH | MEDIUM | LOW`; `complexity` — `small | medium | large`; `type` — `auto | manual`.
|
|
100
|
+
> No plan yet — run /conductor:breakdown first
|
|
208
101
|
|
|
209
|
-
|
|
210
|
-
- `files_owned` — string array of repo-relative paths the task is authorized to edit (≥1 entry)
|
|
211
|
-
- `covers_acs` — string array of AC IDs from the PRD in the form `AC-P{0|1}-{n}.{m}` (≥1 entry; each ID must reference a real AC in the PRD)
|
|
212
|
-
- `contract` — object with non-empty string fields `input`, `output`, `invariant` describing the task boundary
|
|
213
|
-
- `test_plan` — string array of short test descriptions (NOT pseudocode; ≥1 entry)
|
|
102
|
+
then fall through to the legacy flow, which still works for a `tasks.json` that already exists at `{absolutePath}tasks.json` (where `absolutePath` was returned by `get_work_item` in Step 2; the Read/Write/Edit tools require absolute paths):
|
|
214
103
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
**v1 fallback**: tasks files without a top-level `schema_version` (i.e. legacy v1) load and run unchanged; the orchestrator skips file-conflict detection for them (see Step 5) and does not require the four new fields.
|
|
104
|
+
- **It exists**: read it (schema_version 1 or 2 run as before) and skip COMPLETED tasks, continuing from the first PENDING one.
|
|
105
|
+
- **It does not exist**: stop and tell the user to run `/conductor:breakdown {displayId}`. Breakdown analysis, confidence rules and the `tasks.json` schema live in `.claude/commands/conductor/breakdown.md`; this command no longer generates a plan.
|
|
218
106
|
|
|
219
107
|
---
|
|
220
108
|
|
|
@@ -247,11 +135,11 @@ Before any implementation begins, set up the feature branch.
|
|
|
247
135
|
|
|
248
136
|
## Step 5 — Implementation Orchestration
|
|
249
137
|
|
|
250
|
-
Read `tasks.json` from `{absolutePath}tasks.json` (or use the in-memory breakdown from Step 3).
|
|
251
|
-
|
|
252
138
|
### Work Queue
|
|
253
139
|
|
|
254
|
-
|
|
140
|
+
**Tree plan (children exist):** take the ready queue from Step 3. Each row is a task; use `get_work_item({issueId: task})` for its description and criteria (`criterionId`, `text`, `kind`, `externalRef`). Tasks with unfinished blockers are not in the queue; they appear after their blockers reach DONE, so re-query `list_work_items({rootId, ready: true, sort: "priority", parentId: "any"})` after each batch until the queue is empty. Epics (tasks that have children) are completed by the system once their children finish; do not dispatch them.
|
|
141
|
+
|
|
142
|
+
**Legacy tasks.json plan:** read `{absolutePath}tasks.json` and build an ordered list:
|
|
255
143
|
1. Sort epics by dependency order (topological sort on `depends_on`)
|
|
256
144
|
2. Within each epic, sort tasks by dependency order, then by priority (HIGH → MEDIUM → LOW)
|
|
257
145
|
3. Mark tasks with unresolved dependencies as BLOCKED
|
|
@@ -278,10 +166,20 @@ Before dispatching a batch, compute the union of `files_owned` across tasks in t
|
|
|
278
166
|
|
|
279
167
|
When splitting, place the conflicting tasks in different sub-batches such that each sub-batch's `files_owned` union has no duplicates; sub-batches then run one after another (the second sub-batch waits for the first to complete).
|
|
280
168
|
|
|
169
|
+
For tree plans, take `files_owned` from the tasks.json mirror (matched by `workItemId`); a task with no entry there is assumed to conflict with nothing.
|
|
170
|
+
|
|
281
171
|
For v1 tasks (no top-level `schema_version`, or no `files_owned` on tasks), behavior falls back to the existing heuristic-based grouping — the file-conflict check is skipped and v1 batches are formed from the complexity table above without change.
|
|
282
172
|
|
|
283
173
|
### Subagent Dispatch
|
|
284
174
|
|
|
175
|
+
**Per task, before dispatch (tree plans):**
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
transition_work_item({issueId: <task>, toStatus: "IN_PROGRESS"}) // TODO → IN_PROGRESS
|
|
179
|
+
report_agent_activity({issueId: <task>, sessionKey: <stable key, e.g. "implement-{displayId}-{task displayId}">,
|
|
180
|
+
mode: "DELEGATE", activity: "WORKING"})
|
|
181
|
+
```
|
|
182
|
+
|
|
285
183
|
For each batch, spawn `conductor-coder` subagents in parallel using the Agent tool, all calls in one message, each with `subagent_type: "conductor-coder"`. The agent (`.claude/agents/conductor-coder.md`) is self-contained and handles stack detection internally. Pass each agent this prompt:
|
|
286
184
|
|
|
287
185
|
```
|
|
@@ -296,6 +194,8 @@ For each batch, spawn `conductor-coder` subagents in parallel using the Agent to
|
|
|
296
194
|
## Context
|
|
297
195
|
- Epic: {epic.id} - {epic.title}
|
|
298
196
|
- Issue: {issue_id} - {issue_title}
|
|
197
|
+
- workItemId: {task work item id, tree plans only}
|
|
198
|
+
- sessionKey: {the key used above, tree plans only}
|
|
299
199
|
- Full PRD: {prdPath} (prd.html or prd.md, whichever exists; read if more context needed)
|
|
300
200
|
|
|
301
201
|
## Workflow
|
|
@@ -303,12 +203,23 @@ For each batch, spawn `conductor-coder` subagents in parallel using the Agent to
|
|
|
303
203
|
2. Implement until all tests pass
|
|
304
204
|
3. Document [manual] criteria verification steps
|
|
305
205
|
4. Commit: "{task.id}: {brief description}" with acceptance criteria in body
|
|
306
|
-
5.
|
|
206
|
+
5. If you hit a decision you cannot make from the task and the PRD, report NEEDS_INPUT on workItemId and stop BLOCKED
|
|
207
|
+
6. Report: COMPLETED or BLOCKED (with reason)
|
|
307
208
|
```
|
|
308
209
|
|
|
210
|
+
**After each coder reports (tree plans):**
|
|
211
|
+
|
|
212
|
+
1. If COMPLETED, spawn `conductor-verifier` (`subagent_type: "conductor-verifier"`) with `workItemId`, `sessionKey`, the task's criteria (`criterionId`, `text`, `kind`, `externalRef`) and its `test_plan`. It records evidence with `mark_criterion_met` and ends with `report_agent_activity(DONE|ERRORED)`.
|
|
213
|
+
2. Re-read the criteria (`get_work_item_tree({issueId: task})`). Only when **every `auto` criterion is met**, call `transition_work_item({issueId: task, toStatus: "DONE"})` (`IN_PROGRESS → DONE`). Otherwise leave the task IN_PROGRESS and list it under Known gaps with the unmet criteria.
|
|
214
|
+
3. If the coder reported BLOCKED, it has already reported `NEEDS_INPUT` when a decision was missing; otherwise call `report_agent_activity({issueId: task, sessionKey, activity: "ERRORED", note: <blocker>})`. Leave the task IN_PROGRESS and list it under Known gaps.
|
|
215
|
+
|
|
216
|
+
Check every `transition_work_item` response for a `warning` field and surface it as in Step 2b.
|
|
217
|
+
|
|
309
218
|
### After Each Batch
|
|
310
219
|
|
|
311
|
-
|
|
220
|
+
Tree plans: update the status of each dispatched task in the tasks.json mirror when it exists (`COMPLETED` or `BLOCKED`, `met` on passing criteria), then re-query the ready queue for the next batch.
|
|
221
|
+
|
|
222
|
+
Legacy plans: update `tasks.json` using the Edit tool:
|
|
312
223
|
- Set `status: COMPLETED` or `status: BLOCKED` on each task
|
|
313
224
|
- Set `met: true` on criteria that passed
|
|
314
225
|
- Update epic `status` based on its tasks' statuses
|
|
@@ -377,7 +288,15 @@ After the PR is created successfully:
|
|
|
377
288
|
})
|
|
378
289
|
```
|
|
379
290
|
|
|
380
|
-
3. **
|
|
291
|
+
3. **Draft the health update** (tree plans): one paragraph on where delivery stands, for the owner to confirm in the web app:
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
draft_health_update({issueId, health: "ON_TRACK" | "AT_RISK", note: "<what is done, what is not, and why>"})
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
`ON_TRACK` when every task reached DONE; `AT_RISK` when any task is a Known gap.
|
|
298
|
+
|
|
299
|
+
4. **Advance to CODE_REVIEW** (definition-driven — confirm `CODE_REVIEW` is in the available transitions first):
|
|
381
300
|
|
|
382
301
|
```
|
|
383
302
|
get_available_transitions({issueId}) // expect CODE_REVIEW among the options from IN_PROGRESS
|
|
@@ -33,6 +33,8 @@ Ask adaptive follow-up questions (one at a time via AskUserQuestion) until you h
|
|
|
33
33
|
|
|
34
34
|
Do NOT proceed to research until the problem, users, and core solution are clear.
|
|
35
35
|
|
|
36
|
+
Then ask one more AskUserQuestion, "How much time is this worth?" (header "Appetite"), with options **1 week** / **2 weeks** / **1 month** / **Other**. The answer is the PRD's appetite: a time box that scope is cut to fit, not an estimate. Remember it as `appetite` (for example `2 weeks`) for Phase 4, and shape the P0 scope to fit it.
|
|
37
|
+
|
|
36
38
|
If the scope seems large (>3 distinct epics), use AskUserQuestion to ask:
|
|
37
39
|
> "This sounds like a large initiative. Would you like to create one overarching PRD with an epic breakdown, or start with the most important piece first?"
|
|
38
40
|
|
|
@@ -333,6 +335,7 @@ Call MCP tools in this exact sequence:
|
|
|
333
335
|
|
|
334
336
|
2. **Create the Work Item**: `create_work_item({workflow, type: "PRD", title, description})`
|
|
335
337
|
- Receive: `{issueId, displayId, localPath}`
|
|
338
|
+
- Then record the appetite from Discovery: `update_work_item({issueId, appetite})`
|
|
336
339
|
|
|
337
340
|
3. **Scaffold document**: `scaffold_document({issueId, filename: "prd.html"})` (or `"prd.md"` when writing markdown). The filename extension sets the content type.
|
|
338
341
|
- Receive: `{localPath: ".conductor/issues/{issueId}/prd.html", absolutePath: "/abs/path/to/.conductor/issues/{issueId}/prd.html"}`
|
|
@@ -341,7 +344,7 @@ Call MCP tools in this exact sequence:
|
|
|
341
344
|
|
|
342
345
|
5. **Move to IN_REVIEW** (definition-driven): call `get_available_transitions({issueId})` to confirm `IN_REVIEW` is an available next status from the Workflow's initial status, then `transition_work_item({issueId, toStatus: "IN_REVIEW"})`, signalling the PRD is ready for team review.
|
|
343
346
|
|
|
344
|
-
6. **Confirm**: "PRD saved — **{displayId}** is now IN_REVIEW."
|
|
347
|
+
6. **Confirm**: "PRD saved — **{displayId}** is now IN_REVIEW. When it is approved, run `/conductor:breakdown {displayId}` to turn it into tasks."
|
|
345
348
|
|
|
346
349
|
Then offer supporting documents via AskUserQuestion:
|
|
347
350
|
> "Would you like to add any supporting documents?"
|