konductor 0.12.4 → 0.14.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/agents/konductor-designer.json +41 -0
- package/agents/konductor-plan-checker.json +1 -1
- package/agents/konductor-spec-reviewer.json +40 -0
- package/agents/konductor.json +2 -2
- package/package.json +1 -1
- package/skills/konductor-design/SKILL.md +78 -0
- package/skills/konductor-discuss/SKILL.md +2 -2
- package/skills/konductor-exec/SKILL.md +110 -56
- package/skills/konductor-exec/references/execution-guide.md +108 -50
- package/skills/konductor-next/SKILL.md +104 -75
- package/skills/konductor-plan/SKILL.md +18 -96
- package/skills/konductor-plan/references/planning-guide.md +229 -50
- package/skills/konductor-review/SKILL.md +91 -0
- package/skills/{konductor-init → konductor-spec}/SKILL.md +9 -9
- package/skills/konductor-status/SKILL.md +6 -5
- /package/skills/{konductor-init → konductor-spec}/references/questioning.md +0 -0
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# Execution Guide — For Konductor Executor Agents
|
|
2
2
|
|
|
3
|
-
This guide is for executor subagents that implement individual
|
|
3
|
+
This guide is for executor subagents that implement individual tasks. You are responsible for executing one task and writing a per-task summary.
|
|
4
4
|
|
|
5
5
|
## Your Role
|
|
6
6
|
|
|
7
7
|
You are a **konductor-executor** agent. You receive:
|
|
8
|
-
- A plan file
|
|
8
|
+
- A plan file (for context on the overall goal and prior tasks)
|
|
9
|
+
- A specific task number to execute
|
|
10
|
+
- Summaries from prior completed tasks in this plan (for context)
|
|
9
11
|
- Git configuration (auto-commit, branching strategy)
|
|
10
12
|
- Reference to this guide
|
|
11
13
|
|
|
12
14
|
Your job:
|
|
13
|
-
1. Read and understand the
|
|
14
|
-
2. Execute
|
|
15
|
+
1. Read and understand the assigned task
|
|
16
|
+
2. Execute the task
|
|
15
17
|
3. Write tests when required (TDD plans)
|
|
16
18
|
4. Commit changes following the protocol
|
|
17
|
-
5. Write a summary
|
|
19
|
+
5. Write a per-task summary with your status
|
|
18
20
|
|
|
19
21
|
## Deviation Rules
|
|
20
22
|
|
|
@@ -120,15 +122,11 @@ Make commits atomic and descriptive. Follow this protocol for every commit.
|
|
|
120
122
|
|
|
121
123
|
### Commit Frequency
|
|
122
124
|
|
|
123
|
-
**One commit per task** (
|
|
124
|
-
- After completing
|
|
125
|
+
**One commit per task** (required):
|
|
126
|
+
- After completing your assigned task, commit the changes
|
|
125
127
|
- Keeps history granular and reviewable
|
|
126
128
|
- Easier to roll back individual changes
|
|
127
129
|
|
|
128
|
-
**Exceptions:**
|
|
129
|
-
- If tasks are tightly coupled and splitting commits would break functionality, combine them
|
|
130
|
-
- Always explain in the commit body why tasks were combined
|
|
131
|
-
|
|
132
130
|
### Staging Files
|
|
133
131
|
|
|
134
132
|
**IMPORTANT:** Stage specific files, never use `git add -A` or `git add .`
|
|
@@ -201,84 +199,144 @@ Check `config.toml` field `git.auto_commit`:
|
|
|
201
199
|
- Reading referenced interfaces from dependencies (doesn't count)
|
|
202
200
|
- First-time codebase exploration at start of plan (first 3 reads don't count)
|
|
203
201
|
|
|
202
|
+
## Implementer Status Protocol
|
|
203
|
+
|
|
204
|
+
After completing a task (or failing to), report exactly one of these four statuses in your summary file. The orchestrator uses your status to decide what happens next.
|
|
205
|
+
|
|
206
|
+
### DONE
|
|
207
|
+
|
|
208
|
+
Task completed successfully. All files created/modified, tests pass, verify step satisfied.
|
|
209
|
+
|
|
210
|
+
**Orchestrator action:** Proceed to spec review, then code quality review.
|
|
211
|
+
|
|
212
|
+
### DONE_WITH_CONCERNS
|
|
213
|
+
|
|
214
|
+
Task completed, but you have doubts or observations the orchestrator should know about.
|
|
215
|
+
|
|
216
|
+
**Orchestrator triage:**
|
|
217
|
+
- **Actionable concerns** (potential correctness issues, security risks, spec deviations) → orchestrator dispatches an executor to address them before proceeding to review.
|
|
218
|
+
- **Informational concerns** (considered alternative approach, style preferences, future improvement ideas) → orchestrator proceeds directly to review.
|
|
219
|
+
|
|
220
|
+
**Examples of actionable concerns:**
|
|
221
|
+
- "The spec says validate email format, but I used a simple regex that may miss edge cases"
|
|
222
|
+
- "This endpoint accepts user input without rate limiting"
|
|
223
|
+
- "The plan says return 404, but the existing codebase returns 204 for missing resources"
|
|
224
|
+
|
|
225
|
+
**Examples of informational concerns:**
|
|
226
|
+
- "Considered using a builder pattern but kept it simple per the plan"
|
|
227
|
+
- "This function could be split further in a future refactor"
|
|
228
|
+
|
|
229
|
+
### NEEDS_CONTEXT
|
|
230
|
+
|
|
231
|
+
You cannot complete the task because information is missing. Be specific about what you need.
|
|
232
|
+
|
|
233
|
+
**Orchestrator action:** Provide the missing context and re-dispatch you. Maximum 2 retries — if still blocked after 2 attempts, escalate to user.
|
|
234
|
+
|
|
235
|
+
**Your summary must include a `## Missing Context` section listing exactly what you need.**
|
|
236
|
+
|
|
237
|
+
### BLOCKED
|
|
238
|
+
|
|
239
|
+
You cannot complete the task due to a technical or architectural issue.
|
|
240
|
+
|
|
241
|
+
**Orchestrator assessment:**
|
|
242
|
+
- **Context problem** → provide context and re-dispatch
|
|
243
|
+
- **Task too complex** → split into smaller tasks
|
|
244
|
+
- **Plan wrong** → escalate to user
|
|
245
|
+
|
|
246
|
+
**Your summary must include a `## Blocker` section describing the issue.**
|
|
247
|
+
|
|
248
|
+
**Default rule:** If you encounter an issue you cannot classify into the other three statuses, use BLOCKED with a description.
|
|
249
|
+
|
|
204
250
|
## Summary Writing
|
|
205
251
|
|
|
206
|
-
After completing
|
|
252
|
+
After completing each task (or encountering a blocker), write a per-task summary file.
|
|
207
253
|
|
|
208
|
-
**File location:** `.konductor/phases/{phase}/plans/{plan-
|
|
254
|
+
**File location:** `.konductor/phases/{phase}/plans/{plan}-task-{n}-summary.md`
|
|
209
255
|
|
|
210
256
|
**File name examples:**
|
|
211
|
-
- `001-summary.md`
|
|
212
|
-
- `
|
|
213
|
-
- `
|
|
257
|
+
- `001-task-1-summary.md` — Plan 001, Task 1
|
|
258
|
+
- `001-task-2-summary.md` — Plan 001, Task 2
|
|
259
|
+
- `003-task-1-summary.md` — Plan 003, Task 1
|
|
214
260
|
|
|
215
261
|
### Summary Structure
|
|
216
262
|
|
|
217
263
|
```markdown
|
|
218
|
-
# Plan {plan
|
|
264
|
+
# Plan {plan} — Task {n} Summary
|
|
219
265
|
|
|
220
|
-
## Status
|
|
221
|
-
[Completed | Blocked | Partial]
|
|
266
|
+
## Status: DONE
|
|
222
267
|
|
|
223
268
|
## Files Created
|
|
224
269
|
- `src/models/user.rs` — User struct with password hashing
|
|
225
|
-
- `src/db/migrations/001_users.sql` — Users table migration
|
|
226
270
|
|
|
227
271
|
## Files Modified
|
|
228
|
-
- `src/routes/auth.rs` — Added registration endpoint
|
|
229
272
|
- `Cargo.toml` — Added bcrypt dependency
|
|
230
273
|
|
|
231
274
|
## Tests Added
|
|
232
275
|
- `user::test_password_hashing` — Verifies bcrypt integration
|
|
233
|
-
- `auth::test_registration_endpoint` — Verifies POST /auth/register
|
|
234
276
|
|
|
235
277
|
### Test Results
|
|
236
278
|
```
|
|
237
279
|
cargo test user
|
|
238
|
-
|
|
239
|
-
Finished test [unoptimized + debuginfo] target(s) in 2.3s
|
|
240
|
-
Running unittests (target/debug/deps/auth_system-abc123)
|
|
241
|
-
running 2 tests
|
|
280
|
+
running 1 test
|
|
242
281
|
test user::test_password_hashing ... ok
|
|
243
|
-
test
|
|
244
|
-
|
|
245
|
-
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
|
282
|
+
test result: ok. 1 passed; 0 failed
|
|
246
283
|
```
|
|
247
284
|
|
|
248
285
|
## Deviations from Plan
|
|
249
|
-
1. **Rule
|
|
250
|
-
2. **Rule 2:** Added email validation to registration endpoint (plan didn't specify)
|
|
251
|
-
3. **Rule 3:** Added bcrypt to Cargo.toml (plan assumed it was already present)
|
|
286
|
+
1. **Rule 3:** Added bcrypt to Cargo.toml (plan assumed it was already present)
|
|
252
287
|
|
|
253
288
|
## Decisions Made
|
|
254
|
-
- Used bcrypt cost factor of 12 (industry standard
|
|
255
|
-
- Made password_hash field private to prevent accidental exposure
|
|
256
|
-
- Added index on users.email for faster lookups during login
|
|
257
|
-
|
|
258
|
-
## Blockers Encountered
|
|
259
|
-
None. All tasks completed successfully.
|
|
289
|
+
- Used bcrypt cost factor of 12 (industry standard)
|
|
260
290
|
|
|
261
291
|
## Verification
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
292
|
+
- [x] User model exists with password hashing (compiler confirms)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Conditional Sections by Status
|
|
296
|
+
|
|
297
|
+
Include these sections only when the status requires them:
|
|
298
|
+
|
|
299
|
+
**DONE_WITH_CONCERNS** — add `## Concerns`:
|
|
300
|
+
```markdown
|
|
301
|
+
## Status: DONE_WITH_CONCERNS
|
|
302
|
+
|
|
303
|
+
## Concerns
|
|
304
|
+
- Email validation uses a simple regex that may miss edge cases (potential correctness issue)
|
|
305
|
+
- Considered using a builder pattern but kept it simple per the plan (informational)
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**NEEDS_CONTEXT** — add `## Missing Context`:
|
|
309
|
+
```markdown
|
|
310
|
+
## Status: NEEDS_CONTEXT
|
|
311
|
+
|
|
312
|
+
## Missing Context
|
|
313
|
+
- What authentication strategy does the existing codebase use? (JWT vs sessions)
|
|
314
|
+
- Is there an existing User type in `src/models/` that should be extended?
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**BLOCKED** — add `## Blocker`:
|
|
318
|
+
```markdown
|
|
319
|
+
## Status: BLOCKED
|
|
320
|
+
|
|
321
|
+
## Blocker
|
|
322
|
+
The plan requires adding a DynamoDB table, but the SAM template uses a format incompatible with the existing deployment pipeline. This is an architectural decision (Rule 4).
|
|
266
323
|
```
|
|
267
324
|
|
|
268
325
|
### Summary Requirements
|
|
269
326
|
|
|
270
327
|
Your summary MUST include:
|
|
271
|
-
- **Status:** One of
|
|
272
|
-
- **Files created:** List with brief descriptions
|
|
273
|
-
- **Files modified:** List with brief descriptions
|
|
274
|
-
- **Tests added:** Test names and what they verify
|
|
275
|
-
- **Test results:** Actual output from test runner (
|
|
328
|
+
- **Status:** One of DONE, DONE_WITH_CONCERNS, NEEDS_CONTEXT, BLOCKED
|
|
329
|
+
- **Files created:** List with brief descriptions (if any)
|
|
330
|
+
- **Files modified:** List with brief descriptions (if any)
|
|
331
|
+
- **Tests added:** Test names and what they verify (if any)
|
|
332
|
+
- **Test results:** Actual output from test runner (if tests were run)
|
|
276
333
|
- **Deviations:** Every deviation with rule number and explanation
|
|
277
334
|
- **Decisions:** Technical choices you made
|
|
278
|
-
- **
|
|
279
|
-
|
|
335
|
+
- **Verification:** Checklist of task verify/done criteria from the plan
|
|
336
|
+
|
|
337
|
+
**Conditional sections:** Include Concerns, Missing Context, or Blocker as required by your status.
|
|
280
338
|
|
|
281
|
-
**
|
|
339
|
+
**Note:** After both spec compliance and code quality reviews pass, the orchestrator appends `## Review Status: passed` to your summary file. You do not write this field yourself — it is managed by the orchestrator.
|
|
282
340
|
|
|
283
341
|
## Working with TDD Plans
|
|
284
342
|
|
|
@@ -21,152 +21,181 @@ Call the `state_get` MCP tool to read current state. Also read:
|
|
|
21
21
|
- `.konductor/roadmap.md` — phase list and status
|
|
22
22
|
|
|
23
23
|
If `.konductor/` does not exist, tell the user:
|
|
24
|
-
> "No Konductor project found. Say '
|
|
24
|
+
> "No Konductor project found. Say 'spec' to get started."
|
|
25
25
|
Then stop.
|
|
26
26
|
|
|
27
27
|
## Step 2: Determine Next Action
|
|
28
28
|
|
|
29
29
|
Based on the `current.step` field from `state_get`:
|
|
30
30
|
|
|
31
|
-
### Case: `step = "
|
|
31
|
+
### Case: `step = "specced"` or `step = "discussed"`
|
|
32
32
|
|
|
33
|
-
The phase needs
|
|
34
|
-
> "Tip: you can say 'discuss phase {phase}' to set preferences before
|
|
33
|
+
The phase needs design. Mention to the user:
|
|
34
|
+
> "Tip: you can say 'discuss phase {phase}' to set preferences before design. Proceeding to design."
|
|
35
35
|
|
|
36
|
-
Then run the **
|
|
36
|
+
Then run the **Design Pipeline**:
|
|
37
37
|
|
|
38
|
-
1. **
|
|
38
|
+
1. **Discover** (if `config.toml` `features.research = true`):
|
|
39
39
|
Read `.konductor/phases/{phase}/context.md` if it exists.
|
|
40
|
-
Use the **konductor-researcher** agent to
|
|
40
|
+
Use the **konductor-researcher** agent to discover the ecosystem for phase {phase}. Provide it with:
|
|
41
41
|
- The phase name and goal from roadmap.md
|
|
42
42
|
- User decisions from context.md (if exists)
|
|
43
43
|
- Relevant requirements from requirements.md
|
|
44
44
|
The researcher will write to `.konductor/phases/{phase}/research.md`.
|
|
45
45
|
Wait for completion.
|
|
46
46
|
|
|
47
|
-
2. **
|
|
47
|
+
2. **Design**:
|
|
48
|
+
Use the **konductor-designer** agent to create the phase-level architecture. Provide it with:
|
|
49
|
+
- research.md (if discover was run)
|
|
50
|
+
- requirements.md
|
|
51
|
+
- roadmap.md (for phase goal and success criteria)
|
|
52
|
+
- project.md (tech stack and constraints)
|
|
53
|
+
The planner will write `.konductor/phases/{phase}/design.md` with overall architecture, component interactions, key decisions, interfaces, and trade-offs.
|
|
54
|
+
Wait for completion.
|
|
55
|
+
|
|
56
|
+
3. **Update State**:
|
|
57
|
+
Write `.konductor/.results/design-{phase}.toml`:
|
|
58
|
+
```toml
|
|
59
|
+
step = "design"
|
|
60
|
+
phase = "{phase}"
|
|
61
|
+
status = "ok"
|
|
62
|
+
timestamp = {current ISO timestamp}
|
|
63
|
+
```
|
|
64
|
+
Call `state_transition` with `step = "designed"`.
|
|
65
|
+
Tell the user: "Phase {phase} design complete. Say 'next' to create execution plans."
|
|
66
|
+
|
|
67
|
+
### Case: `step = "designed"`
|
|
68
|
+
|
|
69
|
+
The phase needs task planning. Run the **Planning Pipeline**:
|
|
70
|
+
|
|
71
|
+
1. **Plan**:
|
|
48
72
|
Use the **konductor-planner** agent to create execution plans. Provide it with:
|
|
49
|
-
-
|
|
73
|
+
- `.konductor/phases/{phase}/design.md`
|
|
74
|
+
- research.md (if exists)
|
|
50
75
|
- requirements.md
|
|
51
76
|
- roadmap.md (for phase goal and success criteria)
|
|
52
77
|
- Reference: see `references/planning-guide.md` in the konductor-plan skill
|
|
53
|
-
The planner will
|
|
78
|
+
The planner will write plan files to `.konductor/phases/{phase}/plans/`.
|
|
54
79
|
Wait for completion.
|
|
55
80
|
|
|
56
|
-
|
|
81
|
+
2. **Check Plans** (if `config.toml` `features.plan_checker = true`):
|
|
57
82
|
Use the **konductor-plan-checker** agent to validate the plans. Provide it with:
|
|
58
83
|
- All plan files in `.konductor/phases/{phase}/plans/`
|
|
59
84
|
- requirements.md
|
|
60
85
|
If the checker reports issues, use a new **konductor-planner** agent with the issues as context to revise. Then re-check. Maximum 3 iterations.
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
Use the **konductor-design-reviewer** agent to review the design. Provide it with:
|
|
64
|
-
- `.konductor/phases/{phase}/design.md`
|
|
65
|
-
- All plan files in `.konductor/phases/{phase}/plans/`
|
|
66
|
-
- requirements.md, roadmap.md, project.md
|
|
67
|
-
The reviewer writes `.konductor/phases/{phase}/review.md` with a verdict (pass/revise/reject) and issues.
|
|
68
|
-
If verdict is "revise": spawn a new **konductor-planner** with the review feedback to revise design.md and affected plans, then re-run the reviewer. Maximum 2 iterations.
|
|
69
|
-
Present the review summary to the user. Ask: "Approve plans for execution? (approve / reject)".
|
|
70
|
-
On approve: proceed to step 5.
|
|
71
|
-
On reject: stop. Do not advance state.
|
|
72
|
-
|
|
73
|
-
5. **Update State**:
|
|
87
|
+
3. **Update State**:
|
|
74
88
|
Write `.konductor/.results/plan-{phase}.toml`:
|
|
75
89
|
```toml
|
|
76
90
|
step = "plan"
|
|
77
91
|
phase = "{phase}"
|
|
78
92
|
status = "ok"
|
|
79
93
|
timestamp = {current ISO timestamp}
|
|
94
|
+
plan_count = {number of plan files created}
|
|
80
95
|
```
|
|
81
|
-
|
|
82
|
-
Tell the user: "Phase {phase} planned with N plans in M waves. Say 'next' to
|
|
96
|
+
Call `state_transition` with `step = "planned"`.
|
|
97
|
+
Tell the user: "Phase {phase} planned with N plans in M waves. Say 'next' to review."
|
|
83
98
|
|
|
84
99
|
### Case: `step = "planned"`
|
|
85
100
|
|
|
86
|
-
The phase is ready for execution. Run the **Execution Pipeline**:
|
|
101
|
+
The phase is ready for review then execution. Run the **Review + Execution Pipeline**:
|
|
102
|
+
|
|
103
|
+
**Review** (if `config.toml` `features.design_review = true`):
|
|
104
|
+
Use the **konductor-design-reviewer** agent to review the design. Provide it with:
|
|
105
|
+
- `.konductor/phases/{phase}/design.md`
|
|
106
|
+
- All plan files in `.konductor/phases/{phase}/plans/`
|
|
107
|
+
- requirements.md, roadmap.md, project.md
|
|
108
|
+
The reviewer writes `.konductor/phases/{phase}/review.md` with a verdict (pass/revise/reject) and issues.
|
|
109
|
+
If verdict is "revise": spawn a new **konductor-planner** with the review feedback to revise design.md and affected plans, then re-run the reviewer. Maximum 2 iterations.
|
|
110
|
+
If verdict is "reject": stop. Tell the user to fix issues and re-run design.
|
|
111
|
+
Present the review summary to the user. Ask: "Approve plans for execution? (approve / reject)".
|
|
112
|
+
On approve: proceed to execution.
|
|
113
|
+
On reject: stop. Do not advance state.
|
|
114
|
+
|
|
115
|
+
**Execution:**
|
|
87
116
|
|
|
88
117
|
1. Read `config.toml` for `execution.max_wave_parallelism` and `git.auto_commit`.
|
|
89
118
|
2. Read all plan files from `.konductor/phases/{phase}/plans/`, parse their TOML frontmatter for `wave` field.
|
|
90
119
|
3. Group plans by wave number (wave 1 first, then 2, etc.).
|
|
91
120
|
4. Call `state_transition` with `step = "executing"`.
|
|
92
121
|
|
|
93
|
-
5. **
|
|
94
|
-
|
|
122
|
+
5. **Per-Task Wave Execution Loop:**
|
|
123
|
+
|
|
124
|
+
For each wave (in ascending order):
|
|
95
125
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- Its specific plan file path
|
|
99
|
-
- Whether to auto-commit (`git.auto_commit`)
|
|
100
|
-
- The branching strategy (`git.branching_strategy`)
|
|
101
|
-
- Reference: see `references/execution-guide.md` in the konductor-exec skill
|
|
102
|
-
Wait for ALL executors to complete (check for summary files).
|
|
126
|
+
For each plan in the wave (parallel if `max_wave_parallelism > 1`, sequential otherwise):
|
|
127
|
+
Parse the plan's `## Tasks` section to extract individual tasks. For each task (sequential within a plan):
|
|
103
128
|
|
|
104
|
-
**
|
|
105
|
-
|
|
129
|
+
**5a. Dispatch executor:**
|
|
130
|
+
Spawn a fresh **konductor-executor** agent with:
|
|
131
|
+
- The plan file path and the specific task number to execute
|
|
132
|
+
- Summaries from prior completed tasks in this plan (for context)
|
|
133
|
+
- Git config: `git.auto_commit` and `git.branching_strategy`
|
|
134
|
+
- Reference: see `references/execution-guide.md` in the konductor-exec skill (status protocol, deviation rules)
|
|
135
|
+
Wait for `{plan}-task-{n}-summary.md` in `.konductor/phases/{phase}/plans/`.
|
|
106
136
|
|
|
107
|
-
|
|
137
|
+
**5b. Handle implementer status:**
|
|
138
|
+
Read the `## Status` field from the task summary:
|
|
139
|
+
- **DONE** → proceed to 5c (two-stage review).
|
|
140
|
+
- **DONE_WITH_CONCERNS** → read `## Concerns`. If actionable (correctness, security, spec deviations): dispatch a fresh executor to address them, then proceed to 5c. If informational: proceed to 5c.
|
|
141
|
+
- **NEEDS_CONTEXT** → provide the requested information, re-dispatch. Maximum 2 retries. If still NEEDS_CONTEXT, treat as BLOCKED.
|
|
142
|
+
- **BLOCKED** → assess and attempt resolution. If 3+ tasks BLOCKED, trigger circuit breaker: stop and report all blockers.
|
|
108
143
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
Spawn **konductor-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
144
|
+
**5c. Two-stage review** (if `features.code_review = true`; skip if disabled, append `## Review Status: passed` to summary):
|
|
145
|
+
|
|
146
|
+
**Stage 1 — Spec Compliance:** Spawn **konductor-spec-reviewer**. If issues: fix and re-review (max 2 iterations).
|
|
147
|
+
**Stage 2 — Code Quality:** Spawn **konductor-code-reviewer**. If issues: fix and re-review (max 2 iterations).
|
|
148
|
+
After both pass: append `## Review Status: passed` to task summary.
|
|
149
|
+
|
|
150
|
+
**5d. Write result file** after each plan completes.
|
|
151
|
+
|
|
152
|
+
6. **Phase-Level Code Review** (holistic final pass, if `features.code_review = true`):
|
|
153
|
+
Check cross-task consistency. Spawn **konductor-code-reviewer** with modified-files.log and all task summaries. Fix issues (max 3 iterations).
|
|
154
|
+
7. Call `state_transition` with `step = "executed"`.
|
|
155
|
+
8. Tell the user: "Phase {phase} executed. Say 'next' to verify."
|
|
115
156
|
|
|
116
157
|
### Case: `step = "executing"`
|
|
117
158
|
|
|
118
|
-
Execution was interrupted. Resume:
|
|
119
|
-
1.
|
|
120
|
-
2.
|
|
121
|
-
3.
|
|
122
|
-
4.
|
|
159
|
+
Execution was interrupted. Resume at task-level granularity:
|
|
160
|
+
1. Scan for `{plan}-task-{n}-summary.md` files.
|
|
161
|
+
2. A task is complete when its summary has `## Status: DONE` AND `## Review Status: passed`.
|
|
162
|
+
3. Check for NEEDS_CONTEXT or BLOCKED tasks — report before resuming.
|
|
163
|
+
4. Resume from the first incomplete task.
|
|
164
|
+
5. Continue the Execution Pipeline from step 5 above.
|
|
123
165
|
|
|
124
166
|
### Case: `step = "executed"`
|
|
125
167
|
|
|
126
168
|
The phase needs verification. Run the **Verification Pipeline**:
|
|
127
169
|
|
|
128
|
-
1.
|
|
129
|
-
Call `state_transition` with `step = "complete"`, advance phase. Stop.
|
|
170
|
+
1. If `config.toml` `features.verifier = false`: skip verification, call `state_transition` with `step = "complete"`, advance phase. Stop.
|
|
130
171
|
|
|
131
|
-
2. Use the **konductor-verifier** agent
|
|
132
|
-
- All summary files from `.konductor/phases/{phase}/plans/`
|
|
133
|
-
- requirements.md
|
|
134
|
-
- All plan files (for must_haves in frontmatter)
|
|
135
|
-
- Reference: see `references/verification-patterns.md` in the konductor-verify skill
|
|
136
|
-
The verifier writes `.konductor/phases/{phase}/verification.md`.
|
|
137
|
-
Wait for completion.
|
|
172
|
+
2. Use the **konductor-verifier** agent. The verifier writes `.konductor/phases/{phase}/verification.md`.
|
|
138
173
|
|
|
139
174
|
3. Read `verification.md`. Write `.konductor/.results/verify-{phase}.toml`.
|
|
140
|
-
4. If status = "ok":
|
|
141
|
-
|
|
142
|
-
Advance to next phase in roadmap (call `state_transition` with the new phase).
|
|
143
|
-
Tell user: "Phase {phase} verified and complete. Advancing to next phase."
|
|
144
|
-
5. If status = "issues-found":
|
|
145
|
-
Keep current step as "executed".
|
|
146
|
-
Tell user the gaps found and suggest: "Run 'plan phase {phase}' to create gap-closure plans."
|
|
175
|
+
4. If status = "ok": call `state_transition` with `step = "complete"`. Advance to next phase. Tell user: "Phase {phase} verified and complete."
|
|
176
|
+
5. If status = "issues-found": keep step as "executed". Tell user the gaps and suggest re-planning.
|
|
147
177
|
|
|
148
178
|
### Case: `step = "complete"`
|
|
149
179
|
|
|
150
180
|
Current phase is done. Check roadmap for next incomplete phase:
|
|
151
|
-
- If found: update phase via `state_transition
|
|
181
|
+
- If found: update phase via `state_transition`, run Design Pipeline.
|
|
152
182
|
- If all phases complete: tell user "All phases complete! Say 'ship' to finalize."
|
|
153
183
|
|
|
154
184
|
### Case: `step = "shipped"`
|
|
155
185
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
- If
|
|
159
|
-
- If no new phases exist: tell the user "All phases complete and shipped! To continue, add new phases to roadmap.md and requirements.md, then say 'next' again."
|
|
186
|
+
Check `.konductor/roadmap.md` for any phases not yet completed.
|
|
187
|
+
- If a new phase exists: call `state_advance_phase` MCP tool. Then run the Design Pipeline.
|
|
188
|
+
- If no new phases: tell the user "All phases complete and shipped! To continue, add new phases to roadmap.md and requirements.md, then say 'next' again."
|
|
160
189
|
|
|
161
190
|
### Case: `step = "blocked"`
|
|
162
191
|
|
|
163
|
-
Tell the user about the blocker
|
|
192
|
+
Tell the user about the blocker. Suggest:
|
|
164
193
|
> "To unblock, fix the underlying issue, then call the `state_resolve_blocker` MCP tool with the phase to clear the blocker. After that, say 'next' to continue."
|
|
165
194
|
|
|
166
195
|
## Step 3: Error Handling
|
|
167
196
|
|
|
168
|
-
If any subagent fails
|
|
169
|
-
1. Write `.konductor/.results/{step}-{phase}.toml` with `status = "error"
|
|
170
|
-
2. Call `state_add_blocker` MCP tool with the phase and
|
|
171
|
-
3. Report the failure to the user
|
|
197
|
+
If any subagent fails:
|
|
198
|
+
1. Write `.konductor/.results/{step}-{phase}.toml` with `status = "error"`.
|
|
199
|
+
2. Call `state_add_blocker` MCP tool with the phase and failure description.
|
|
200
|
+
3. Report the failure to the user.
|
|
172
201
|
4. Do NOT automatically retry a crashed subagent.
|
|
@@ -1,59 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: konductor-plan
|
|
3
|
-
description:
|
|
3
|
+
description: Break a phase design into execution plans with tasks. Use when the user says plan, create tasks, break down, or task planning.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Konductor Plan —
|
|
6
|
+
# Konductor Plan — Task Planning
|
|
7
7
|
|
|
8
|
-
You are the Konductor orchestrator.
|
|
8
|
+
You are the Konductor orchestrator. Break a phase design into execution plans with tasks, acceptance criteria, and wave ordering.
|
|
9
9
|
|
|
10
10
|
## Critical Rules
|
|
11
11
|
|
|
12
|
-
1. **Only YOU manage state transitions** — use the MCP tools (`state_get`, `state_transition`, `state_add_blocker`) instead of writing `state.toml` directly.
|
|
13
|
-
2. **Read config via MCP** — call `config_get` to get feature flags (
|
|
12
|
+
1. **Only YOU manage state transitions** — use the MCP tools (`state_get`, `state_transition`, `state_add_blocker`) instead of writing `state.toml` directly.
|
|
13
|
+
2. **Read config via MCP** — call `config_get` to get feature flags (plan_checker).
|
|
14
14
|
3. **Report errors, don't retry crashes** — if a subagent fails, set status to "blocked".
|
|
15
|
-
4. **Accept a phase argument** — the user may say "plan phase 01"
|
|
15
|
+
4. **Accept a phase argument** — the user may say "plan phase 01". Resolve short form by scanning `.konductor/phases/` directories.
|
|
16
16
|
|
|
17
17
|
## Step 1: Validate State
|
|
18
18
|
|
|
19
19
|
Call the `state_get` MCP tool to read current state, and call the `config_get` MCP tool to read configuration.
|
|
20
20
|
|
|
21
|
-
Validate that `current.step` is `"
|
|
22
|
-
> "Phase {phase} is not ready for planning. Current step: {step}. Run '
|
|
21
|
+
Validate that `current.step` is `"designed"`. If not, tell the user:
|
|
22
|
+
> "Phase {phase} is not ready for task planning. Current step: {step}. Run 'design' first."
|
|
23
23
|
Then stop.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
Create the phase directory if it doesn't exist:
|
|
27
|
-
```bash
|
|
28
|
-
mkdir -p .konductor/phases/{phase}/plans
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Step 2: Research (if enabled)
|
|
32
|
-
|
|
33
|
-
If `config.toml` `features.research = true`:
|
|
34
|
-
|
|
35
|
-
Read `.konductor/phases/{phase}/context.md` if it exists (user decisions from `konductor-discuss`).
|
|
25
|
+
Verify `.konductor/phases/{phase}/design.md` exists.
|
|
36
26
|
|
|
37
|
-
|
|
38
|
-
- The phase name, description, and success criteria from roadmap.md
|
|
39
|
-
- User decisions from context.md (if exists)
|
|
40
|
-
- Relevant requirements from `.konductor/requirements.md`
|
|
41
|
-
- Instructions: investigate the ecosystem, identify libraries, patterns, risks, and best practices. Write findings to `.konductor/phases/{phase}/research.md`.
|
|
42
|
-
|
|
43
|
-
Wait for the researcher to complete. Verify `research.md` was created.
|
|
44
|
-
|
|
45
|
-
## Step 3: Create Plans
|
|
27
|
+
## Step 2: Create Plans
|
|
46
28
|
|
|
47
29
|
Use the **konductor-planner** agent to decompose the phase into execution plans. Provide it with:
|
|
48
|
-
- `.konductor/phases/{phase}/
|
|
30
|
+
- `.konductor/phases/{phase}/design.md`
|
|
31
|
+
- `.konductor/phases/{phase}/research.md` (if exists)
|
|
49
32
|
- `.konductor/requirements.md`
|
|
50
33
|
- `.konductor/roadmap.md` (phase goal and success criteria)
|
|
51
34
|
- The planning guide: see `references/planning-guide.md`
|
|
52
|
-
- Instructions:
|
|
35
|
+
- Instructions: create plan files in `.konductor/phases/{phase}/plans/` using TOML frontmatter format with tasks, acceptance criteria, and wave ordering.
|
|
53
36
|
|
|
54
|
-
Wait for the planner to complete. Verify
|
|
37
|
+
Wait for the planner to complete. Verify at least one plan file exists.
|
|
55
38
|
|
|
56
|
-
## Step
|
|
39
|
+
## Step 3: Validate Plans (if enabled)
|
|
57
40
|
|
|
58
41
|
If `config.toml` `features.plan_checker = true`:
|
|
59
42
|
|
|
@@ -67,66 +50,7 @@ If the checker reports issues that it could not fix:
|
|
|
67
50
|
- Re-run the **konductor-plan-checker**
|
|
68
51
|
- Maximum 3 iterations. If still unresolved, report to user.
|
|
69
52
|
|
|
70
|
-
## Step
|
|
71
|
-
|
|
72
|
-
If `config.toml` `features.design_review = true`:
|
|
73
|
-
|
|
74
|
-
Use the **konductor-design-reviewer** agent to review the technical design. Provide it with:
|
|
75
|
-
- `.konductor/phases/{phase}/design.md`
|
|
76
|
-
- All plan files in `.konductor/phases/{phase}/plans/`
|
|
77
|
-
- `.konductor/requirements.md`
|
|
78
|
-
- `.konductor/roadmap.md` (phase goal and success criteria)
|
|
79
|
-
- `.konductor/project.md` (tech stack and constraints)
|
|
80
|
-
- Instructions: analyze the phase design and per-plan Design sections, then write a structured review to `.konductor/phases/{phase}/review.md`
|
|
81
|
-
|
|
82
|
-
**Review criteria the agent must evaluate:**
|
|
83
|
-
1. Architectural soundness of design.md — do the components and interactions make sense?
|
|
84
|
-
2. Feasibility of per-plan Design sections — are the proposed interfaces and approaches realistic?
|
|
85
|
-
3. Cross-plan consistency — do shared interfaces match across plans that depend on each other?
|
|
86
|
-
4. Requirement coverage — every REQ-XX for this phase is addressed
|
|
87
|
-
5. Risk identification — missing error handling, security concerns, dependency issues
|
|
88
|
-
|
|
89
|
-
**Review output format** (written to `.konductor/phases/{phase}/review.md`):
|
|
90
|
-
```markdown
|
|
91
|
-
# Design Review: Phase {phase}
|
|
92
|
-
|
|
93
|
-
## Summary
|
|
94
|
-
{one paragraph overall assessment}
|
|
95
|
-
|
|
96
|
-
## Verdict: {pass | revise | reject}
|
|
97
|
-
|
|
98
|
-
## Issues
|
|
99
|
-
|
|
100
|
-
### Issue 1: {title}
|
|
101
|
-
- **Severity:** critical | warning | info
|
|
102
|
-
- **Affected plan:** {plan number or "design.md"}
|
|
103
|
-
- **Description:** {what's wrong}
|
|
104
|
-
- **Suggestion:** {how to fix}
|
|
105
|
-
|
|
106
|
-
## Strengths
|
|
107
|
-
{what the design does well}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Wait for the reviewer to complete. Verify `review.md` was created.
|
|
111
|
-
|
|
112
|
-
**If verdict is "pass":** Proceed to Step 6.
|
|
113
|
-
|
|
114
|
-
**If verdict is "revise"** (has critical or warning issues):
|
|
115
|
-
1. Spawn a new **konductor-planner** agent with the review feedback as additional context
|
|
116
|
-
2. Instruct it to revise `design.md` and the affected plans in-place
|
|
117
|
-
3. Re-run the **konductor-design-reviewer**
|
|
118
|
-
4. Maximum 2 review-revise iterations. If still "revise" after 2 iterations, proceed to user approval with warnings noted.
|
|
119
|
-
|
|
120
|
-
**If verdict is "reject":** Stop. Do not advance state. Tell the user:
|
|
121
|
-
> "Design rejected by reviewer. See `.konductor/phases/{phase}/review.md` for details. Fix the fundamental issues and re-run planning."
|
|
122
|
-
|
|
123
|
-
**Present the review summary to the user.** Ask:
|
|
124
|
-
> "Approve plans for execution? (approve / reject)"
|
|
125
|
-
|
|
126
|
-
- **On approve:** Proceed to Step 6.
|
|
127
|
-
- **On reject:** Stop. Do not advance state. Tell the user: "Plans not approved. Edit the plans in `.konductor/phases/{phase}/plans/` or re-run planning."
|
|
128
|
-
|
|
129
|
-
## Step 6: Update State
|
|
53
|
+
## Step 4: Update State
|
|
130
54
|
|
|
131
55
|
Write `.konductor/.results/plan-{phase}.toml`:
|
|
132
56
|
```toml
|
|
@@ -137,14 +61,12 @@ timestamp = {current ISO timestamp}
|
|
|
137
61
|
plan_count = {number of plan files created}
|
|
138
62
|
```
|
|
139
63
|
|
|
140
|
-
|
|
141
|
-
- Call `state_transition` with `step = "planned"` to advance the pipeline
|
|
142
|
-
- The tool automatically updates status and timestamps
|
|
64
|
+
Call `state_transition` with `step = "planned"` to advance the pipeline.
|
|
143
65
|
|
|
144
66
|
Tell the user:
|
|
145
67
|
- How many plans were created
|
|
146
68
|
- How many waves
|
|
147
|
-
- Suggest: "Say 'next' to
|
|
69
|
+
- Suggest: "Say 'next' to review the design and plans, or inspect them in `.konductor/phases/{phase}/plans/`"
|
|
148
70
|
|
|
149
71
|
## Error Handling
|
|
150
72
|
|