konductor 0.6.0 → 0.7.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-codebase-mapper.json +8 -0
- package/agents/konductor-discoverer.json +8 -0
- package/agents/konductor-executor.json +13 -0
- package/agents/konductor-plan-checker.json +11 -0
- package/agents/konductor-planner.json +13 -0
- package/agents/konductor-researcher.json +12 -0
- package/agents/konductor-verifier.json +12 -0
- package/agents/konductor.json +25 -0
- package/hooks/konductor-hooks.json +16 -0
- package/package.json +9 -1
- package/scripts/postinstall.js +38 -0
- package/skills/konductor-discuss/SKILL.md +179 -0
- package/skills/konductor-exec/SKILL.md +143 -0
- package/skills/konductor-exec/references/execution-guide.md +294 -0
- package/skills/konductor-exec/references/tdd.md +450 -0
- package/skills/konductor-init/SKILL.md +95 -0
- package/skills/konductor-init/references/questioning.md +197 -0
- package/skills/konductor-map-codebase/SKILL.md +190 -0
- package/skills/konductor-next/SKILL.md +150 -0
- package/skills/konductor-plan/SKILL.md +91 -0
- package/skills/konductor-plan/references/planning-guide.md +265 -0
- package/skills/konductor-plan/references/verification-patterns.md +400 -0
- package/skills/konductor-ship/SKILL.md +165 -0
- package/skills/konductor-status/SKILL.md +109 -0
- package/skills/konductor-verify/SKILL.md +116 -0
- package/skills/konductor-verify/references/verification-patterns.md +400 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-codebase-mapper",
|
|
3
|
+
"description": "Analyzes existing codebases for brownfield projects. Maps file structure, tech stack, patterns, conventions, testing, and integrations.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [],
|
|
7
|
+
"prompt": ""
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-discoverer",
|
|
3
|
+
"description": "Interactive project discovery. Asks questions about vision, users, tech stack, and constraints. Generates project.md, requirements.md, and roadmap.md.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [],
|
|
7
|
+
"prompt": ""
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-executor",
|
|
3
|
+
"description": "Executes a single implementation plan. Writes code, runs tests, commits atomically per task. Follows deviation rules for auto-fixing bugs.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [
|
|
7
|
+
"file://.konductor/project.md",
|
|
8
|
+
"file://.konductor/requirements.md",
|
|
9
|
+
"file://.konductor/phases/*/plans/*.md",
|
|
10
|
+
"file://.kiro/steering/**/*.md"
|
|
11
|
+
],
|
|
12
|
+
"prompt": ""
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-plan-checker",
|
|
3
|
+
"description": "Validates execution plans for coverage, sizing, dependencies, and completeness. Fixes issues in-place.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [
|
|
7
|
+
"file://.konductor/requirements.md",
|
|
8
|
+
"file://.konductor/phases/*/plans/*.md"
|
|
9
|
+
],
|
|
10
|
+
"prompt": ""
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-planner",
|
|
3
|
+
"description": "Decomposes phases into wave-ordered execution plans with task breakdowns, dependency graphs, and requirement tracing.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [
|
|
7
|
+
"file://.konductor/project.md",
|
|
8
|
+
"file://.konductor/requirements.md",
|
|
9
|
+
"file://.konductor/roadmap.md",
|
|
10
|
+
"file://.kiro/steering/**/*.md"
|
|
11
|
+
],
|
|
12
|
+
"prompt": ""
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-researcher",
|
|
3
|
+
"description": "Phase ecosystem research. Investigates libraries, patterns, risks, and best practices for a given phase.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [
|
|
7
|
+
"file://.konductor/project.md",
|
|
8
|
+
"file://.konductor/requirements.md",
|
|
9
|
+
"file://.kiro/steering/**/*.md"
|
|
10
|
+
],
|
|
11
|
+
"prompt": ""
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-verifier",
|
|
3
|
+
"description": "Post-execution verification. Performs 3-level check (exists, substantive, wired) on all artifacts and key links.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code"],
|
|
6
|
+
"resources": [
|
|
7
|
+
"file://.konductor/requirements.md",
|
|
8
|
+
"file://.konductor/phases/*/plans/*.md",
|
|
9
|
+
"file://.kiro/steering/**/*.md"
|
|
10
|
+
],
|
|
11
|
+
"prompt": ""
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor",
|
|
3
|
+
"description": "Spec-driven development orchestrator. Manages project initialization, phase planning, execution, verification, and shipping. Use @k-plan, @k-exec, @k-verify, @k-next, @k-status, or other prompts to trigger commands.",
|
|
4
|
+
"tools": ["read", "write", "shell", "code", "@konductor"],
|
|
5
|
+
"allowedTools": ["read", "write", "shell", "code", "@konductor"],
|
|
6
|
+
"resources": [
|
|
7
|
+
"skill://.kiro/skills/konductor-*/SKILL.md",
|
|
8
|
+
"file://.kiro/steering/**/*.md",
|
|
9
|
+
"file://.konductor/config.toml",
|
|
10
|
+
"file://.konductor/roadmap.md"
|
|
11
|
+
],
|
|
12
|
+
"toolsSettings": {
|
|
13
|
+
"subagent": {
|
|
14
|
+
"availableAgents": ["konductor-*"],
|
|
15
|
+
"trustedAgents": ["konductor-*"]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"konductor": {
|
|
20
|
+
"command": "konductor",
|
|
21
|
+
"args": ["mcp"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"prompt": "Use the konductor MCP tools (state_init, state_get, state_transition, state_add_blocker, state_resolve_blocker, plans_list, status) for all state management instead of reading/writing state.toml directly."
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "konductor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Spec-driven development orchestrator for Kiro CLI — MCP server and hook processor",
|
|
5
5
|
"bin": {
|
|
6
6
|
"konductor": "bin/konductor"
|
|
7
7
|
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"scripts/",
|
|
11
|
+
"agents/",
|
|
12
|
+
"skills/",
|
|
13
|
+
"hooks/",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
8
16
|
"scripts": {
|
|
9
17
|
"postinstall": "node scripts/postinstall.js"
|
|
10
18
|
},
|
package/scripts/postinstall.js
CHANGED
|
@@ -71,6 +71,44 @@ async function main() {
|
|
|
71
71
|
fs.writeFileSync(dest, binary);
|
|
72
72
|
fs.chmodSync(dest, 0o755);
|
|
73
73
|
console.log("konductor binary installed.");
|
|
74
|
+
|
|
75
|
+
// Install agents, skills, and hooks to ~/.kiro/
|
|
76
|
+
installKiroAssets();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function copyDirSync(src, dest, force) {
|
|
80
|
+
if (!fs.existsSync(src)) return;
|
|
81
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
82
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
83
|
+
const srcPath = path.join(src, entry.name);
|
|
84
|
+
const destPath = path.join(dest, entry.name);
|
|
85
|
+
if (entry.isDirectory()) {
|
|
86
|
+
copyDirSync(srcPath, destPath, force);
|
|
87
|
+
} else if (force || !fs.existsSync(destPath)) {
|
|
88
|
+
fs.copyFileSync(srcPath, destPath);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function installKiroAssets() {
|
|
94
|
+
const home = process.env.HOME || process.env.USERPROFILE;
|
|
95
|
+
if (!home) return;
|
|
96
|
+
const kiroDir = path.join(home, ".kiro");
|
|
97
|
+
const pkgRoot = path.join(__dirname, "..");
|
|
98
|
+
|
|
99
|
+
const assets = [
|
|
100
|
+
{ src: "agents", dest: "agents" },
|
|
101
|
+
{ src: "skills", dest: "skills" },
|
|
102
|
+
{ src: "hooks", dest: "hooks" },
|
|
103
|
+
];
|
|
104
|
+
|
|
105
|
+
for (const { src, dest } of assets) {
|
|
106
|
+
const srcDir = path.join(pkgRoot, src);
|
|
107
|
+
if (fs.existsSync(srcDir)) {
|
|
108
|
+
copyDirSync(srcDir, path.join(kiroDir, dest), false);
|
|
109
|
+
console.log(`Installed ${src} to ${path.join(kiroDir, dest)}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
74
112
|
}
|
|
75
113
|
|
|
76
114
|
main().catch((err) => {
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: konductor-discuss
|
|
3
|
+
description: Discuss and set context for a phase before planning. Use when the user says discuss phase, talk about phase, set phase context, phase preferences, or discuss decisions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Konductor Discuss — Phase Context and Decision Setting
|
|
7
|
+
|
|
8
|
+
You are the Konductor orchestrator. Have a conversation with the user to establish context, preferences, and decisions for a specific phase before planning begins.
|
|
9
|
+
|
|
10
|
+
## Step 1: Parse Phase Argument
|
|
11
|
+
|
|
12
|
+
The user will provide a phase identifier (e.g., "discuss phase 01", "discuss phase 2", "talk about authentication").
|
|
13
|
+
|
|
14
|
+
Extract the phase number or name from the request.
|
|
15
|
+
|
|
16
|
+
If no phase is specified, ask the user:
|
|
17
|
+
> "Which phase would you like to discuss? (Provide a phase number or name)"
|
|
18
|
+
|
|
19
|
+
Wait for their response.
|
|
20
|
+
|
|
21
|
+
## Step 2: Read Phase Information
|
|
22
|
+
|
|
23
|
+
Read `.konductor/roadmap.md` to find the specified phase.
|
|
24
|
+
|
|
25
|
+
For the target phase, extract:
|
|
26
|
+
- Phase number
|
|
27
|
+
- Phase name
|
|
28
|
+
- Goal/purpose
|
|
29
|
+
- Scope description
|
|
30
|
+
- Success criteria (if defined)
|
|
31
|
+
|
|
32
|
+
If the phase is not found in the roadmap, tell the user:
|
|
33
|
+
> "Phase '{phase}' not found in roadmap. Say 'status' to see all phases."
|
|
34
|
+
|
|
35
|
+
Then stop.
|
|
36
|
+
|
|
37
|
+
## Step 3: Present Phase Context
|
|
38
|
+
|
|
39
|
+
Display the phase information to the user:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
# Discussing Phase {number}: {name}
|
|
43
|
+
|
|
44
|
+
## Goal
|
|
45
|
+
{goal from roadmap}
|
|
46
|
+
|
|
47
|
+
## Scope
|
|
48
|
+
{scope from roadmap}
|
|
49
|
+
|
|
50
|
+
{if success criteria exist}
|
|
51
|
+
## Success Criteria
|
|
52
|
+
{criteria from roadmap}
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
Let's discuss how we should approach this phase.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Step 4: Interactive Discussion
|
|
59
|
+
|
|
60
|
+
Ask the user a series of questions to gather context and preferences. Adapt questions to the phase goal, but generally cover:
|
|
61
|
+
|
|
62
|
+
1. **Approach preferences:**
|
|
63
|
+
- "What approach would you prefer for {phase goal}? (e.g., incremental vs. all-at-once, TDD vs. implementation-first)"
|
|
64
|
+
|
|
65
|
+
2. **Library and tool choices:**
|
|
66
|
+
- "Are there specific libraries, frameworks, or tools you want to use for this phase?"
|
|
67
|
+
- "Any libraries or approaches you want to avoid?"
|
|
68
|
+
|
|
69
|
+
3. **Architectural trade-offs:**
|
|
70
|
+
- "What's more important for this phase: performance, simplicity, maintainability, or something else?"
|
|
71
|
+
|
|
72
|
+
4. **Known constraints:**
|
|
73
|
+
- "Are there any constraints we should keep in mind? (e.g., existing APIs to integrate with, backward compatibility, deployment limitations)"
|
|
74
|
+
|
|
75
|
+
5. **Scope boundaries:**
|
|
76
|
+
- "Is there anything explicitly out of scope for this phase that we should defer to later?"
|
|
77
|
+
|
|
78
|
+
**Conversation style:**
|
|
79
|
+
- Ask questions one at a time or in small groups
|
|
80
|
+
- Wait for user responses
|
|
81
|
+
- Ask follow-up questions if answers are vague
|
|
82
|
+
- Acknowledge their input and summarize understanding
|
|
83
|
+
- Keep the conversation focused on decisions that will affect planning
|
|
84
|
+
|
|
85
|
+
This is a natural conversation — not a rigid questionnaire. Adapt based on the user's responses.
|
|
86
|
+
|
|
87
|
+
## Step 5: Write Decisions to Context File
|
|
88
|
+
|
|
89
|
+
After gathering sufficient context, write the decisions to `.konductor/phases/{phase}/context.md`.
|
|
90
|
+
|
|
91
|
+
**File structure:**
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
# Phase {number}: {name} — Context
|
|
95
|
+
|
|
96
|
+
Discussed: {current date}
|
|
97
|
+
|
|
98
|
+
## Phase Goal
|
|
99
|
+
{goal from roadmap}
|
|
100
|
+
|
|
101
|
+
## Decisions
|
|
102
|
+
|
|
103
|
+
### Decision 1: {title}
|
|
104
|
+
**Choice:** {what was decided}
|
|
105
|
+
**Rationale:** {why this choice was made}
|
|
106
|
+
|
|
107
|
+
### Decision 2: {title}
|
|
108
|
+
**Choice:** {what was decided}
|
|
109
|
+
**Rationale:** {why this choice was made}
|
|
110
|
+
|
|
111
|
+
{repeat for all decisions}
|
|
112
|
+
|
|
113
|
+
## Constraints
|
|
114
|
+
{list any constraints mentioned by the user}
|
|
115
|
+
|
|
116
|
+
## Out of Scope
|
|
117
|
+
{list anything explicitly deferred or excluded from this phase}
|
|
118
|
+
|
|
119
|
+
## Preferred Libraries/Tools
|
|
120
|
+
{list specific libraries or tools to use}
|
|
121
|
+
|
|
122
|
+
## Avoid
|
|
123
|
+
{list anything the user wants to avoid}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Create the phase directory if it doesn't exist:
|
|
127
|
+
```bash
|
|
128
|
+
mkdir -p .konductor/phases/{phase}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Step 6: Update State
|
|
132
|
+
|
|
133
|
+
Call the `state_transition` MCP tool with `step = "discussed"` to advance the pipeline state.
|
|
134
|
+
If the transition fails (e.g., the current phase doesn't match), the tool will return an error — report it to the user.
|
|
135
|
+
|
|
136
|
+
Write a result file at `.konductor/.results/discuss-{phase}.toml`:
|
|
137
|
+
|
|
138
|
+
```toml
|
|
139
|
+
step = "discuss"
|
|
140
|
+
phase = "{phase}"
|
|
141
|
+
timestamp = {current ISO timestamp}
|
|
142
|
+
decisions_count = {number of decisions recorded}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Step 7: Confirm with User
|
|
146
|
+
|
|
147
|
+
Tell the user:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
# Phase Context Set
|
|
151
|
+
|
|
152
|
+
Recorded {decisions_count} decisions for Phase {number}: {name}.
|
|
153
|
+
|
|
154
|
+
Context saved to: `.konductor/phases/{phase}/context.md`
|
|
155
|
+
|
|
156
|
+
These decisions will guide the planning process. Say 'next' to begin planning this phase.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Error Handling
|
|
160
|
+
|
|
161
|
+
**Phase not found:**
|
|
162
|
+
If the phase doesn't exist in the roadmap, report it and stop.
|
|
163
|
+
|
|
164
|
+
**State file missing:**
|
|
165
|
+
If calling `state_get` returns a `STATE_NOT_FOUND` error:
|
|
166
|
+
1. Tell the user: "No Konductor project found. Run 'init' first."
|
|
167
|
+
2. Stop
|
|
168
|
+
|
|
169
|
+
**User provides insufficient input:**
|
|
170
|
+
If the user gives very brief or unclear answers:
|
|
171
|
+
- Ask clarifying follow-up questions
|
|
172
|
+
- Offer examples or options to help them decide
|
|
173
|
+
- Don't proceed until you have enough context to write meaningful decisions
|
|
174
|
+
|
|
175
|
+
**No decisions made:**
|
|
176
|
+
If the conversation ends without any concrete decisions:
|
|
177
|
+
- Summarize what was discussed
|
|
178
|
+
- Ask if the user wants to proceed with default approaches
|
|
179
|
+
- If yes, write a minimal context file noting "default approach" for key decisions
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: konductor-exec
|
|
3
|
+
description: Execute the plans for a phase by spawning executor subagents. Use when the user says execute phase, exec, run phase, build phase, or implement.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Konductor Exec — Phase Execution Pipeline
|
|
7
|
+
|
|
8
|
+
You are the Konductor orchestrator. Execute the plans for a phase by spawning executor subagents to implement each plan.
|
|
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. Subagents write their own output files (summary files, result files).
|
|
13
|
+
2. **Read `config.toml` first** — respect parallelism settings and git configuration.
|
|
14
|
+
3. **Report errors, don't retry crashes** — if an executor fails, write an error result for that plan, continue with remaining plans, and report all failures at the end.
|
|
15
|
+
4. **Resume support** — scan for existing summary files to skip completed plans.
|
|
16
|
+
|
|
17
|
+
## Step 1: Read State and Config
|
|
18
|
+
|
|
19
|
+
Call the `state_get` MCP tool to read current state, and read `.konductor/config.toml` for execution settings (parallelism, git config).
|
|
20
|
+
|
|
21
|
+
Validate that `[current].step` is either:
|
|
22
|
+
- `"planned"` — ready to start execution
|
|
23
|
+
- `"executing"` — resuming interrupted execution
|
|
24
|
+
|
|
25
|
+
If the phase is not in one of these states, tell the user:
|
|
26
|
+
> "Phase {phase} is not ready for execution. Current step: {step}. Run 'plan phase {phase}' first."
|
|
27
|
+
Then stop.
|
|
28
|
+
|
|
29
|
+
## Step 2: Set Executing State
|
|
30
|
+
|
|
31
|
+
Call `state_transition` with `step = "executing"` to mark the start of execution.
|
|
32
|
+
|
|
33
|
+
## Step 3: Load and Group Plans by Wave
|
|
34
|
+
|
|
35
|
+
Read all plan files from `.konductor/phases/{phase}/plans/`.
|
|
36
|
+
|
|
37
|
+
For each plan file:
|
|
38
|
+
1. Parse the TOML frontmatter (delimited by `+++` markers at start and end)
|
|
39
|
+
2. Extract the `wave` field (required)
|
|
40
|
+
3. Extract the `plan` field (plan number)
|
|
41
|
+
4. Group plans by wave number
|
|
42
|
+
|
|
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
|
+
|
|
45
|
+
## Step 4: Resume Check
|
|
46
|
+
|
|
47
|
+
Scan `.konductor/phases/{phase}/plans/` for existing summary files.
|
|
48
|
+
|
|
49
|
+
**Summary file naming:** `{plan-number}-summary.md` (e.g., `001-summary.md`, `002-summary.md`)
|
|
50
|
+
|
|
51
|
+
For each plan:
|
|
52
|
+
- If `{plan-number}-summary.md` exists, the plan is complete — skip it
|
|
53
|
+
- If summary does not exist, the plan needs execution
|
|
54
|
+
|
|
55
|
+
Resume from the current wave with incomplete plans.
|
|
56
|
+
|
|
57
|
+
## Step 5: Wave Execution Loop
|
|
58
|
+
|
|
59
|
+
For each wave (in ascending order):
|
|
60
|
+
|
|
61
|
+
### 5.1: Update Wave State
|
|
62
|
+
|
|
63
|
+
Track the current wave number for reporting purposes.
|
|
64
|
+
|
|
65
|
+
### 5.2: Execute Plans in Wave
|
|
66
|
+
|
|
67
|
+
Read `config.toml` field `execution.max_wave_parallelism`:
|
|
68
|
+
|
|
69
|
+
**If `max_wave_parallelism > 1` (parallel mode):**
|
|
70
|
+
- For each plan in this wave, spawn a **konductor-executor** agent simultaneously
|
|
71
|
+
- Each executor receives:
|
|
72
|
+
- Its specific plan file path (absolute path)
|
|
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)
|
|
77
|
+
|
|
78
|
+
**If `max_wave_parallelism = 1` (sequential mode):**
|
|
79
|
+
- Execute plans one at a time within the wave
|
|
80
|
+
- Spawn one executor, wait for completion, then spawn the next
|
|
81
|
+
|
|
82
|
+
**Executor completion check:**
|
|
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)
|
|
85
|
+
|
|
86
|
+
### 5.3: Write Result Files
|
|
87
|
+
|
|
88
|
+
After each plan completes (successfully or with errors), write `.konductor/.results/execute-{phase}-plan-{n}.toml`:
|
|
89
|
+
|
|
90
|
+
```toml
|
|
91
|
+
step = "execute"
|
|
92
|
+
phase = "{phase}"
|
|
93
|
+
plan = {plan_number}
|
|
94
|
+
wave = {wave_number}
|
|
95
|
+
status = "ok" # or "error" if executor failed
|
|
96
|
+
timestamp = {current ISO timestamp}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 5.4: Error Handling
|
|
100
|
+
|
|
101
|
+
If an executor fails (crashes, times out, or reports errors):
|
|
102
|
+
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 plan numbers
|
|
105
|
+
4. At the end of the wave, report which plans failed
|
|
106
|
+
|
|
107
|
+
**Do NOT retry failed executors automatically.** Let the user decide how to proceed.
|
|
108
|
+
|
|
109
|
+
### 5.5: Update Progress Counters
|
|
110
|
+
|
|
111
|
+
After each wave completes, track progress (completed plans count and percentage) for reporting.
|
|
112
|
+
|
|
113
|
+
## Step 6: Set Executed State
|
|
114
|
+
|
|
115
|
+
After all waves complete, call `state_transition` with `step = "executed"` to advance the pipeline.
|
|
116
|
+
|
|
117
|
+
Tell the user:
|
|
118
|
+
- Total plans executed
|
|
119
|
+
- Plans succeeded vs. failed (if any)
|
|
120
|
+
- Next step suggestion: "Say 'next' to verify the phase."
|
|
121
|
+
|
|
122
|
+
If any plans failed, list them and suggest:
|
|
123
|
+
> "Review the errors in `.results/execute-{phase}-plan-{n}.toml` files. You can re-run individual plans or fix issues manually."
|
|
124
|
+
|
|
125
|
+
## Error Handling
|
|
126
|
+
|
|
127
|
+
**Executor crashes:**
|
|
128
|
+
If an executor subagent crashes:
|
|
129
|
+
1. Write error result file for that plan
|
|
130
|
+
2. Continue with remaining plans
|
|
131
|
+
3. Report the failure at the end of execution
|
|
132
|
+
|
|
133
|
+
**State corruption:**
|
|
134
|
+
If `state_get` returns malformed data or plan files are malformed:
|
|
135
|
+
1. Report the specific parsing error
|
|
136
|
+
2. Stop execution
|
|
137
|
+
3. Do NOT attempt to fix state automatically
|
|
138
|
+
|
|
139
|
+
**Missing plan files:**
|
|
140
|
+
If a plan referenced in the state doesn't exist:
|
|
141
|
+
1. Report the missing plan number
|
|
142
|
+
2. Skip that plan
|
|
143
|
+
3. Continue with remaining plans
|