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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-designer",
|
|
3
|
+
"description": "Creates phase-level architecture designs with component interactions, key decisions, interfaces, and trade-offs.",
|
|
4
|
+
"tools": [
|
|
5
|
+
"read",
|
|
6
|
+
"write",
|
|
7
|
+
"shell",
|
|
8
|
+
"code"
|
|
9
|
+
],
|
|
10
|
+
"allowedTools": [
|
|
11
|
+
"read",
|
|
12
|
+
"write",
|
|
13
|
+
"shell",
|
|
14
|
+
"code"
|
|
15
|
+
],
|
|
16
|
+
"resources": [
|
|
17
|
+
"file://.konductor/project.md",
|
|
18
|
+
"file://.konductor/requirements.md",
|
|
19
|
+
"file://.konductor/roadmap.md",
|
|
20
|
+
"file://.konductor/phases/*/research.md",
|
|
21
|
+
"file://.kiro/steering/**/*.md",
|
|
22
|
+
"file://~/.kiro/steering/**/*.md"
|
|
23
|
+
],
|
|
24
|
+
"hooks": {
|
|
25
|
+
"preToolUse": [
|
|
26
|
+
{
|
|
27
|
+
"matcher": "*",
|
|
28
|
+
"command": "konductor hook",
|
|
29
|
+
"timeout_ms": 1000
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"postToolUse": [
|
|
33
|
+
{
|
|
34
|
+
"matcher": "*",
|
|
35
|
+
"command": "konductor hook",
|
|
36
|
+
"timeout_ms": 2000
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"prompt": "You are a software architect. Create a phase-level design document (design.md) covering: overall architecture, component interactions, key technical decisions, interfaces between components, and trade-offs. Focus on the 'what' and 'why', not the 'how' — task-level details belong in execution plans."
|
|
41
|
+
}
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
|
-
"prompt": ""
|
|
36
|
+
"prompt": "You are the plan-checker agent. Validate every plan file against these rules and reject any plan that violates them.\n\n## No-Placeholder Rule\n\nReject any plan containing these banned patterns in task actions or steps:\n- \"TBD\", \"TODO\", \"implement later\", \"fill in details\"\n- \"Add appropriate error handling\" / \"add validation\" / \"handle edge cases\" (must show actual code)\n- \"Write tests for the above\" without actual test code\n- \"Similar to Task N\" (must repeat the code)\n- Steps that describe what to do without showing how (code blocks required for code steps)\n- References to types, functions, or methods not defined in any prior or current task\n\nFor each violation, report: the task number, the banned pattern found, and the surrounding text.\n\n## Structural Checks\n\n1. **Frontmatter completeness**: phase, plan, wave, depends_on, type, autonomous, requirements, files_modified, must_haves (truths, artifacts, key_links) must all be present. The `type` field must be explicitly set to \"tdd\" or \"execute\".\n2. **Task sizing**: Each plan has 2-5 tasks. Each task has files, action, verify, and done fields. Code steps within tasks must include code blocks.\n3. **Wave dependencies**: depends_on values must reference valid plan numbers. No circular dependencies.\n4. **Requirement coverage**: Cross-reference requirements field against .konductor/requirements.md. Flag any REQ-XX not covered by any plan.\n5. **Design section**: Every plan must have a ## Design section with Approach, Key Interfaces, Error Handling, and Trade-offs subsections.\n6. **Verification commands**: Every task verify field must be a concrete command, not \"manual testing\" or similar.\n\n## Output\n\nFor each plan, report PASS or FAIL. On FAIL, list every violation with task number, rule violated, and the offending text. Fix issues in-place when possible."
|
|
37
37
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-spec-reviewer",
|
|
3
|
+
"description": "Reviews task output for spec compliance. Checks that implementation matches the task specification exactly.",
|
|
4
|
+
"tools": [
|
|
5
|
+
"read",
|
|
6
|
+
"write",
|
|
7
|
+
"shell",
|
|
8
|
+
"code"
|
|
9
|
+
],
|
|
10
|
+
"allowedTools": [
|
|
11
|
+
"read",
|
|
12
|
+
"write",
|
|
13
|
+
"shell",
|
|
14
|
+
"code"
|
|
15
|
+
],
|
|
16
|
+
"resources": [
|
|
17
|
+
"file://.konductor/requirements.md",
|
|
18
|
+
"file://.konductor/project.md",
|
|
19
|
+
"file://.konductor/phases/*/plans/*.md",
|
|
20
|
+
"file://.kiro/steering/**/*.md",
|
|
21
|
+
"file://~/.kiro/steering/**/*.md"
|
|
22
|
+
],
|
|
23
|
+
"hooks": {
|
|
24
|
+
"preToolUse": [
|
|
25
|
+
{
|
|
26
|
+
"matcher": "*",
|
|
27
|
+
"command": "konductor hook",
|
|
28
|
+
"timeout_ms": 1000
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"postToolUse": [
|
|
32
|
+
{
|
|
33
|
+
"matcher": "*",
|
|
34
|
+
"command": "konductor hook",
|
|
35
|
+
"timeout_ms": 2000
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"prompt": "You are a spec compliance reviewer. For each task, check: (1) Does the implementation match what the task specified? Compare the task's action description against actual file changes. (2) Are all files listed in the task's files field created or modified? (3) Does the verify step pass when run? (4) Are there extra changes not specified in the task? (5) Does the done condition hold true? Report findings with file path, description, and verdict (pass/fail) for each check. Write your review to the specified output file. Do NOT fix any issues — only report them."
|
|
40
|
+
}
|
package/agents/konductor.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "konductor",
|
|
3
|
-
"description": "Spec-driven development orchestrator. Manages project
|
|
3
|
+
"description": "Spec-driven development orchestrator. Manages project spec, phase design, planning, execution, verification, and shipping. Use @k-spec, @k-design, @k-plan, @k-exec, @k-verify, @k-next, @k-status, or other prompts to trigger commands.",
|
|
4
4
|
"model": "claude-opus-4.6-1m",
|
|
5
5
|
"tools": [
|
|
6
6
|
"@builtin",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
}
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
|
-
"prompt": "You are the Konductor orchestrator — a spec-driven development pipeline manager. You coordinate work by loading skills and delegating to konductor-* subagents. You never write application code directly.\n\nCore workflow:
|
|
55
|
+
"prompt": "You are the Konductor orchestrator — a spec-driven development pipeline manager. You coordinate work by loading skills and delegating to konductor-* subagents. You never write application code directly.\n\nCore workflow: spec → discuss → design → plan → review → exec → verify → ship (per phase).\n\nRules:\n1. Always call state_get before acting to determine the current pipeline step.\n2. Use konductor MCP tools for all state and config management: state_init, state_get, state_transition, state_add_blocker, state_resolve_blocker, state_advance_phase, plans_list, status, config_get, config_init. Never read or write state.toml or config.toml directly.\n3. When a user request matches a skill, load and follow it step by step.\n4. Delegate heavy work (coding, research, planning, review, verification) to konductor-* subagents — you only manage state transitions and orchestration.\n5. If no konductor project exists (.konductor/ missing), suggest running spec first."
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: konductor-design
|
|
3
|
+
description: Create architecture and design for a phase. Use when the user says design, architect, design phase, or create design.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Konductor Design — Phase Architecture
|
|
7
|
+
|
|
8
|
+
You are the Konductor orchestrator. Create the architecture and design for a phase.
|
|
9
|
+
|
|
10
|
+
## Critical Rules
|
|
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 (research).
|
|
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 "design phase 01" or "design phase 01-auth-system". Resolve short form by scanning `.konductor/phases/` directories.
|
|
16
|
+
|
|
17
|
+
## Step 1: Validate State
|
|
18
|
+
|
|
19
|
+
Call the `state_get` MCP tool to read current state, and call the `config_get` MCP tool to read configuration.
|
|
20
|
+
|
|
21
|
+
Validate that `current.step` is `"specced"` or `"discussed"`. If not, tell the user:
|
|
22
|
+
> "Phase {phase} is not ready for design. Current step: {step}. Run 'spec' or 'discuss' first."
|
|
23
|
+
Then stop.
|
|
24
|
+
|
|
25
|
+
Validate that the specified phase exists in `.konductor/roadmap.md`.
|
|
26
|
+
Create the phase directory if it doesn't exist:
|
|
27
|
+
```bash
|
|
28
|
+
mkdir -p .konductor/phases/{phase}/plans
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Step 2: Discover (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`).
|
|
36
|
+
|
|
37
|
+
Use the **konductor-researcher** agent to discover the ecosystem for this phase. Provide it with:
|
|
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 Design
|
|
46
|
+
|
|
47
|
+
Use the **konductor-designer** agent to create the phase-level architecture. Provide it with:
|
|
48
|
+
- `.konductor/phases/{phase}/research.md` (if discover was run)
|
|
49
|
+
- `.konductor/requirements.md`
|
|
50
|
+
- `.konductor/roadmap.md` (phase goal and success criteria)
|
|
51
|
+
- `.konductor/project.md` (tech stack and constraints)
|
|
52
|
+
- Instructions: write `.konductor/phases/{phase}/design.md` covering overall architecture, component interactions, key decisions, interfaces, and trade-offs. Do NOT create plan files yet.
|
|
53
|
+
|
|
54
|
+
Wait for the planner to complete. Verify `design.md` was created.
|
|
55
|
+
|
|
56
|
+
## Step 4: Update State
|
|
57
|
+
|
|
58
|
+
Write `.konductor/.results/design-{phase}.toml`:
|
|
59
|
+
```toml
|
|
60
|
+
step = "design"
|
|
61
|
+
phase = "{phase}"
|
|
62
|
+
status = "ok"
|
|
63
|
+
timestamp = {current ISO timestamp}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Call `state_transition` with `step = "designed"` to advance the pipeline.
|
|
67
|
+
|
|
68
|
+
Tell the user:
|
|
69
|
+
- Design document created at `.konductor/phases/{phase}/design.md`
|
|
70
|
+
- Suggest: "Say 'next' to create execution plans, or review the design first."
|
|
71
|
+
|
|
72
|
+
## Error Handling
|
|
73
|
+
|
|
74
|
+
If any subagent fails:
|
|
75
|
+
1. Write `.konductor/.results/design-{phase}.toml` with `status = "error"`
|
|
76
|
+
2. Call `state_add_blocker` MCP tool with the phase and reason for the failure
|
|
77
|
+
3. Report failure to user with actionable context
|
|
78
|
+
4. Do NOT retry crashed subagents
|
|
@@ -153,7 +153,7 @@ Recorded {decisions_count} decisions for Phase {number}: {name}.
|
|
|
153
153
|
|
|
154
154
|
Context saved to: `.konductor/phases/{phase}/context.md`
|
|
155
155
|
|
|
156
|
-
These decisions will guide the
|
|
156
|
+
These decisions will guide the design process. Say 'next' to begin designing this phase.
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
## Error Handling
|
|
@@ -163,7 +163,7 @@ If the phase doesn't exist in the roadmap, report it and stop.
|
|
|
163
163
|
|
|
164
164
|
**State file missing:**
|
|
165
165
|
If calling `state_get` returns a `STATE_NOT_FOUND` error:
|
|
166
|
-
1. Tell the user: "No Konductor project found. Run '
|
|
166
|
+
1. Tell the user: "No Konductor project found. Run 'spec' first."
|
|
167
167
|
2. Stop
|
|
168
168
|
|
|
169
169
|
**User provides insufficient input:**
|
|
@@ -5,18 +5,19 @@ description: Execute the plans for a phase by spawning executor subagents. Use w
|
|
|
5
5
|
|
|
6
6
|
# Konductor Exec — Phase Execution Pipeline
|
|
7
7
|
|
|
8
|
-
You are the Konductor orchestrator. Execute the plans for a phase by spawning executor subagents to implement each
|
|
8
|
+
You are the Konductor orchestrator. Execute the plans for a phase by spawning executor subagents to implement each task.
|
|
9
9
|
|
|
10
10
|
## Critical Rules
|
|
11
11
|
|
|
12
12
|
1. **Only YOU manage state transitions** — use the MCP tools (`state_get`, `state_transition`, `state_add_blocker`) instead of writing `state.toml` directly. Subagents write their own output files (summary files, result files).
|
|
13
|
-
2. **Read config via MCP** — call `config_get` to get parallelism settings and
|
|
14
|
-
3. **
|
|
15
|
-
4. **Resume support** — scan for existing summary files to skip completed
|
|
13
|
+
2. **Read config via MCP** — call `config_get` to get parallelism settings, git configuration, and feature flags.
|
|
14
|
+
3. **Fresh executor per task** — spawn a new konductor-executor for each task. Do not reuse executors across tasks.
|
|
15
|
+
4. **Resume support** — scan for existing per-task summary files to skip completed tasks. A task is complete only when its summary has `## Status: DONE` AND `## Review Status: passed`.
|
|
16
|
+
5. **Circuit breaker** — if 3+ tasks in the phase are BLOCKED, stop execution and report to user.
|
|
16
17
|
|
|
17
18
|
## Step 1: Read State and Config
|
|
18
19
|
|
|
19
|
-
Call the `state_get` MCP tool to read current state, and call the `config_get` MCP tool for execution settings (parallelism, git config).
|
|
20
|
+
Call the `state_get` MCP tool to read current state, and call the `config_get` MCP tool for execution settings (parallelism, git config, feature flags).
|
|
20
21
|
|
|
21
22
|
Validate that `[current].step` is either:
|
|
22
23
|
- `"planned"` — ready to start execution
|
|
@@ -30,95 +31,147 @@ Then stop.
|
|
|
30
31
|
|
|
31
32
|
Call `state_transition` with `step = "executing"` to mark the start of execution.
|
|
32
33
|
|
|
33
|
-
## Step 3: Load and Group
|
|
34
|
+
## Step 3: Load Plans, Extract Tasks, and Group by Wave
|
|
34
35
|
|
|
35
36
|
Read all plan files from `.konductor/phases/{phase}/plans/`.
|
|
36
37
|
|
|
37
38
|
For each plan file:
|
|
38
39
|
1. Parse the TOML frontmatter (delimited by `+++` markers at start and end)
|
|
39
|
-
2. Extract the `wave` field (required)
|
|
40
|
-
3.
|
|
41
|
-
4.
|
|
40
|
+
2. Extract the `wave` field (required) and `plan` field (plan number)
|
|
41
|
+
3. Parse the `## Tasks` section to extract individual tasks. Each task is a `### Task N` subsection. Record the task number and its content (action, files, verify, done criteria).
|
|
42
|
+
4. Store the task list per plan: e.g., plan 1 has tasks [1, 2, 3], plan 2 has tasks [1, 2].
|
|
42
43
|
|
|
43
|
-
**Wave ordering:** Plans execute in wave order (wave 1, then wave 2, etc.). Plans within a wave can execute in parallel if `max_wave_parallelism > 1`.
|
|
44
|
+
Group plans by wave number. **Wave ordering:** Plans execute in wave order (wave 1, then wave 2, etc.). Plans within a wave can execute in parallel if `max_wave_parallelism > 1`.
|
|
44
45
|
|
|
45
46
|
## Step 4: Resume Check
|
|
46
47
|
|
|
47
|
-
Scan `.konductor/phases/{phase}/plans/` for existing summary files.
|
|
48
|
+
Scan `.konductor/phases/{phase}/plans/` for existing per-task summary files.
|
|
48
49
|
|
|
49
|
-
**Summary file naming:** `{plan-number}-summary.md` (e.g., `001-summary.md`, `
|
|
50
|
+
**Summary file naming:** `{plan-number}-task-{n}-summary.md` (e.g., `001-task-1-summary.md`, `001-task-2-summary.md`)
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
**Task completion definition:** A task is complete when BOTH conditions are met:
|
|
53
|
+
1. Its summary file exists with `## Status: DONE`
|
|
54
|
+
2. The summary contains `## Review Status: passed` (appended by the orchestrator after both review stages pass)
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
**Plan completion:** A plan is complete when ALL its tasks are complete.
|
|
57
|
+
|
|
58
|
+
**Resume logic:**
|
|
59
|
+
- Find the first incomplete task in the first incomplete plan of the current wave
|
|
60
|
+
- If a task has a summary with `NEEDS_CONTEXT` or `BLOCKED` status, report it to the user before resuming
|
|
61
|
+
- Resume execution from that task
|
|
56
62
|
|
|
57
63
|
## Step 5: Wave Execution Loop
|
|
58
64
|
|
|
59
65
|
For each wave (in ascending order):
|
|
60
66
|
|
|
61
|
-
### 5.1:
|
|
67
|
+
### 5.1: Execute Plans in Wave
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
Read `config.toml` field `execution.max_wave_parallelism`:
|
|
64
70
|
|
|
65
|
-
|
|
71
|
+
- **Parallel mode** (`max_wave_parallelism > 1`): Each plan's task sequence runs independently in parallel.
|
|
72
|
+
- **Sequential mode** (`max_wave_parallelism = 1`): Execute plans one at a time within the wave.
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
For each plan in the wave, execute its tasks sequentially:
|
|
75
|
+
|
|
76
|
+
#### Per-Task Dispatch Loop
|
|
77
|
+
|
|
78
|
+
For each task in the plan (sequential within a plan):
|
|
79
|
+
|
|
80
|
+
**5.1.1 — Dispatch Executor**
|
|
81
|
+
|
|
82
|
+
Spawn a fresh **konductor-executor** agent with:
|
|
83
|
+
- The plan file path (absolute path)
|
|
84
|
+
- The specific task number to execute
|
|
85
|
+
- Summaries from prior completed tasks in this plan (for context)
|
|
86
|
+
- Git configuration: `git.auto_commit` and `git.branching_strategy`
|
|
87
|
+
- Reference to `references/execution-guide.md` (status protocol, deviation rules, commit protocol)
|
|
88
|
+
- Reference to `references/tdd.md` if plan frontmatter `type = "tdd"`
|
|
89
|
+
|
|
90
|
+
Wait for `{plan-number}-task-{n}-summary.md` to be written.
|
|
91
|
+
|
|
92
|
+
**5.1.2 — Handle Implementer Status**
|
|
93
|
+
|
|
94
|
+
Read the `## Status` field from the task summary and handle per the implementer status protocol (see `references/execution-guide.md`):
|
|
68
95
|
|
|
69
|
-
**
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
- The git configuration: `git.auto_commit` and `git.branching_strategy`
|
|
74
|
-
- Reference to `references/execution-guide.md` (deviation rules, commit protocol, analysis paralysis guard)
|
|
75
|
-
- Reference to `references/tdd.md` if plan frontmatter `type = "tdd"`
|
|
76
|
-
- Wait for ALL executors in the wave to complete (check for summary files)
|
|
96
|
+
- **DONE** → proceed to two-stage review (Step 5.1.3)
|
|
97
|
+
- **DONE_WITH_CONCERNS** → read `## Concerns`. If concerns mention correctness issues, security risks, or spec deviations (actionable) → dispatch executor to address them, then proceed to review. If concerns are informational → proceed to review.
|
|
98
|
+
- **NEEDS_CONTEXT** → read `## Missing Context`, provide the information, re-dispatch executor with the context (max 2 retries). If still NEEDS_CONTEXT after 2 retries → treat as BLOCKED.
|
|
99
|
+
- **BLOCKED** → read `## Blocker`. Assess: context problem → provide context and re-dispatch; task too complex → split into smaller tasks. If assessment fails or the task remains blocked after re-dispatch, call `state_add_blocker` with the blocker description. Track blocked count. If 3+ tasks in the phase have been BLOCKED, trigger circuit breaker: stop execution and report all blockers to user.
|
|
77
100
|
|
|
78
|
-
**
|
|
79
|
-
- Execute plans one at a time within the wave
|
|
80
|
-
- Spawn one executor, wait for completion, then spawn the next
|
|
101
|
+
**5.1.3 — Two-Stage Review** (if `config.toml` `features.code_review = true`)
|
|
81
102
|
|
|
82
|
-
|
|
83
|
-
- A plan is complete when `{plan-number}-summary.md` exists
|
|
84
|
-
- If an executor crashes or produces no summary, treat it as a failure (see Step 5.4)
|
|
103
|
+
If `features.code_review` is false, skip reviews and mark task complete (append `## Review Status: passed` to the task summary).
|
|
85
104
|
|
|
86
|
-
|
|
105
|
+
**Stage 1 — Spec Compliance Review:**
|
|
106
|
+
Dispatch **konductor-spec-reviewer** agent with:
|
|
107
|
+
- The task spec (the specific `### Task N` section from the plan file)
|
|
108
|
+
- The task summary file (`{plan}-task-{n}-summary.md`)
|
|
109
|
+
- The modified files listed in the summary
|
|
87
110
|
|
|
88
|
-
|
|
111
|
+
The reviewer checks whether the implementation matches the task specification and writes findings to `{plan}-task-{n}-spec-review.md`.
|
|
112
|
+
|
|
113
|
+
If the reviewer reports issues:
|
|
114
|
+
1. Dispatch **konductor-executor** to fix the reported issues
|
|
115
|
+
2. Re-run **konductor-spec-reviewer** to verify fixes
|
|
116
|
+
3. Maximum 2 review-fix iterations. If still failing → log as needing manual intervention, continue to next task.
|
|
117
|
+
|
|
118
|
+
**Stage 2 — Code Quality Review:**
|
|
119
|
+
Dispatch **konductor-code-reviewer** agent with:
|
|
120
|
+
- The task summary file
|
|
121
|
+
- The modified files listed in the summary
|
|
122
|
+
- Git diff for the task's changes
|
|
123
|
+
|
|
124
|
+
The reviewer checks code quality (correctness, error handling, security, duplication, performance, dead code, consistency) and writes findings to `{plan}-task-{n}-quality-review.md`.
|
|
125
|
+
|
|
126
|
+
If the reviewer reports issues:
|
|
127
|
+
1. Dispatch **konductor-executor** to fix the reported issues
|
|
128
|
+
2. Re-run **konductor-code-reviewer** to verify fixes
|
|
129
|
+
3. Maximum 2 review-fix iterations. If still failing → log as needing manual intervention, continue to next task.
|
|
130
|
+
|
|
131
|
+
**After both stages pass:** Append `## Review Status: passed` to the task summary file. Mark task complete.
|
|
132
|
+
|
|
133
|
+
### 5.2: Write Result Files
|
|
134
|
+
|
|
135
|
+
After each plan completes (all tasks done, successfully or with errors), write `.konductor/.results/execute-{phase}-plan-{n}.toml`:
|
|
89
136
|
|
|
90
137
|
```toml
|
|
91
138
|
step = "execute"
|
|
92
139
|
phase = "{phase}"
|
|
93
140
|
plan = {plan_number}
|
|
94
141
|
wave = {wave_number}
|
|
95
|
-
status = "ok" # or "error" if
|
|
142
|
+
status = "ok" # or "error" if any task failed
|
|
143
|
+
tasks_total = {total_tasks}
|
|
144
|
+
tasks_completed = {completed_tasks}
|
|
96
145
|
timestamp = {current ISO timestamp}
|
|
97
146
|
```
|
|
98
147
|
|
|
99
|
-
### 5.
|
|
148
|
+
### 5.3: Error Handling
|
|
100
149
|
|
|
101
150
|
If an executor fails (crashes, times out, or reports errors):
|
|
102
151
|
1. Write `.konductor/.results/execute-{phase}-plan-{n}.toml` with `status = "error"` and error details
|
|
103
|
-
2. **Continue** with remaining plans in the wave (do not stop)
|
|
104
|
-
3. Track failed
|
|
105
|
-
4. At the end of the wave, report which
|
|
152
|
+
2. **Continue** with remaining tasks/plans in the wave (do not stop unless circuit breaker triggers)
|
|
153
|
+
3. Track failed task numbers
|
|
154
|
+
4. At the end of the wave, report which tasks failed
|
|
106
155
|
|
|
107
|
-
|
|
156
|
+
### 5.4: Update Progress Counters
|
|
108
157
|
|
|
109
|
-
|
|
158
|
+
After each wave completes, track progress (completed tasks/plans count and percentage) for reporting.
|
|
110
159
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
## Step 6: Code Review (if enabled)
|
|
160
|
+
## Step 6: Code Review — Holistic Final Pass (if enabled)
|
|
114
161
|
|
|
115
162
|
If `config.toml` `features.code_review = true`:
|
|
116
163
|
|
|
164
|
+
Per-task reviews (spec compliance + code quality) have already been performed during execution. This phase-level code review is a **holistic final pass** checking cross-task consistency:
|
|
165
|
+
- Shared interfaces match across plans (types, function signatures, API contracts)
|
|
166
|
+
- Naming conventions are consistent across all modified files
|
|
167
|
+
- Integration points work correctly (modules wire together properly)
|
|
168
|
+
- No cross-plan duplication (shared logic extracted)
|
|
169
|
+
|
|
117
170
|
Spawn a **konductor-code-reviewer** agent. Provide it with:
|
|
118
|
-
- `.konductor/.tracking/modified-files.log` (list of changed files)
|
|
119
|
-
- All `*-summary.md` files from `.konductor/phases/{phase}/plans/`
|
|
171
|
+
- `.konductor/.tracking/modified-files.log` (list of all changed files)
|
|
172
|
+
- All `*-task-*-summary.md` files from `.konductor/phases/{phase}/plans/`
|
|
120
173
|
- The phase name and plan files for context
|
|
121
|
-
- Instructions:
|
|
174
|
+
- Instructions: focus on cross-task and cross-plan consistency, not individual task correctness (already reviewed). Write findings to `.konductor/phases/{phase}/code-review.md`.
|
|
122
175
|
|
|
123
176
|
Wait for the reviewer to complete. Read `code-review.md`.
|
|
124
177
|
|
|
@@ -131,23 +184,24 @@ Wait for the reviewer to complete. Read `code-review.md`.
|
|
|
131
184
|
|
|
132
185
|
## Step 7: Set Executed State
|
|
133
186
|
|
|
134
|
-
After
|
|
187
|
+
After all execution and reviews complete (with no blocking issues), call `state_transition` with `step = "executed"` to advance the pipeline.
|
|
135
188
|
|
|
136
189
|
Tell the user:
|
|
137
|
-
- Total plans executed
|
|
138
|
-
-
|
|
139
|
-
-
|
|
190
|
+
- Total plans and tasks executed
|
|
191
|
+
- Tasks succeeded vs. failed (if any)
|
|
192
|
+
- Per-task review results (spec + quality)
|
|
193
|
+
- Phase-level code review findings (if enabled)
|
|
140
194
|
- Next step suggestion: "Say 'next' to verify the phase."
|
|
141
195
|
|
|
142
|
-
If any
|
|
143
|
-
> "Review the
|
|
196
|
+
If any tasks failed or need manual intervention, list them and suggest:
|
|
197
|
+
> "Review the task summaries and review files in `.konductor/phases/{phase}/plans/`. You can re-run execution to retry incomplete tasks."
|
|
144
198
|
|
|
145
199
|
## Error Handling
|
|
146
200
|
|
|
147
201
|
**Executor crashes:**
|
|
148
202
|
If an executor subagent crashes:
|
|
149
203
|
1. Write error result file for that plan
|
|
150
|
-
2. Continue with remaining plans
|
|
204
|
+
2. Continue with remaining tasks/plans
|
|
151
205
|
3. Report the failure at the end of execution
|
|
152
206
|
|
|
153
207
|
**State corruption:**
|