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.
@@ -0,0 +1,197 @@
1
+ # Questioning Guide for Project Discovery
2
+
3
+ ## Purpose
4
+
5
+ This guide helps the konductor-discoverer agent extract project vision, requirements, and roadmap through structured questioning.
6
+
7
+ ## Question Design Principles
8
+
9
+ 1. **Ask one question at a time** — Wait for the response before asking the next
10
+ 2. **Prefer multiple choice when possible** — Makes it easier for users to respond quickly
11
+ 3. **Keep it short** — 5-8 questions maximum for v1 discovery
12
+ 4. **Be specific** — Avoid vague questions like "tell me about your project"
13
+ 5. **Confirm and clarify** — Repeat back what you heard to ensure understanding
14
+
15
+ ## Question Categories
16
+
17
+ ### 1. Vision & Purpose
18
+
19
+ **Goal:** Understand what problem the project solves and why it exists.
20
+
21
+ Example questions:
22
+ - "What are you building? Describe it in one sentence."
23
+ - "What problem does this solve?"
24
+ - "Why build this now?"
25
+
26
+ ### 2. Target Users
27
+
28
+ **Goal:** Identify who will use the project and how.
29
+
30
+ Example questions:
31
+ - "Who will use this? (developers, end users, internal team, customers)"
32
+ - "How technical is your target audience?"
33
+ - "Will this be public/open-source or private/internal?"
34
+
35
+ ### 3. Tech Stack
36
+
37
+ **Goal:** Determine technical constraints and preferences.
38
+
39
+ Example questions:
40
+ - "What's your tech stack preference? (or should I suggest one)"
41
+ - "Are there any required frameworks or libraries?"
42
+ - "What programming language(s)?"
43
+ - For brownfield: "I found [tech stack from codebase analysis]. Any changes planned?"
44
+
45
+ ### 4. Key Features
46
+
47
+ **Goal:** Define the minimum viable product (v1) scope.
48
+
49
+ Example questions:
50
+ - "What are the must-have features for v1?"
51
+ - "What's the single most important capability?"
52
+ - "Which features can wait for v2?"
53
+
54
+ ### 5. Constraints
55
+
56
+ **Goal:** Identify hard limits on timeline, budget, integrations, or dependencies.
57
+
58
+ Example questions:
59
+ - "Any hard deadlines? (launch date, demo, customer commitment)"
60
+ - "Budget or resource constraints?"
61
+ - "Required integrations? (APIs, databases, services)"
62
+ - "Any compliance or security requirements?"
63
+
64
+ ### 6. Out of Scope
65
+
66
+ **Goal:** Explicitly define what is NOT being built to avoid scope creep.
67
+
68
+ Example questions:
69
+ - "What's explicitly NOT in scope for v1?"
70
+ - "What features have you decided to skip?"
71
+ - "Any common expectations you want to push back on?"
72
+
73
+ ## Output Templates
74
+
75
+ ### project.md
76
+
77
+ Structure:
78
+ ```markdown
79
+ # {Project Name}
80
+
81
+ ## Vision
82
+ {One-paragraph description of what this project is and why it exists}
83
+
84
+ ## Target Users
85
+ {Description of who will use this and how}
86
+
87
+ ## Tech Stack
88
+ - Language: {primary language}
89
+ - Framework: {if applicable}
90
+ - Database: {if applicable}
91
+ - Key Libraries: {list any required dependencies}
92
+
93
+ ## Constraints
94
+ - {List any hard constraints: deadlines, budgets, integrations, compliance}
95
+ ```
96
+
97
+ ### requirements.md
98
+
99
+ Structure:
100
+ ```markdown
101
+ # Requirements
102
+
103
+ ## V1 Requirements (Must-Have)
104
+
105
+ - **REQ-01**: {First requirement}
106
+ - Acceptance: {How to know it's done}
107
+
108
+ - **REQ-02**: {Second requirement}
109
+ - Acceptance: {How to know it's done}
110
+
111
+ ... continue for all v1 requirements ...
112
+
113
+ ## V2 Requirements (Nice-to-Have)
114
+
115
+ - {Feature or improvement for future versions}
116
+ - {Another future feature}
117
+
118
+ ## Explicitly Out of Scope
119
+
120
+ - {Feature explicitly not being built}
121
+ - {Another excluded feature}
122
+ ```
123
+
124
+ ### roadmap.md
125
+
126
+ Structure:
127
+ ```markdown
128
+ # Development Roadmap
129
+
130
+ ## Phase 01: {Phase Name}
131
+ **Goal:** {What this phase accomplishes}
132
+
133
+ **Deliverables:**
134
+ - {Deliverable 1}
135
+ - {Deliverable 2}
136
+
137
+ **Success Criteria:**
138
+ - {How to know this phase is complete}
139
+
140
+ ## Phase 02: {Phase Name}
141
+ **Goal:** {What this phase accomplishes}
142
+
143
+ **Deliverables:**
144
+ - {Deliverable 1}
145
+ - {Deliverable 2}
146
+
147
+ **Success Criteria:**
148
+ - {How to know this phase is complete}
149
+
150
+ ... continue for all phases ...
151
+
152
+ ## Estimated Timeline
153
+ - Phase 01: {rough estimate if known, or "TBD"}
154
+ - Phase 02: {rough estimate if known, or "TBD"}
155
+ ```
156
+
157
+ ## Question Flow Example
158
+
159
+ For a new web app project:
160
+
161
+ 1. "What are you building? Describe it in one sentence."
162
+ → User: "A task management app for remote teams"
163
+
164
+ 2. "Who will use this? (a) developers, (b) end users/customers, (c) internal team"
165
+ → User: "b - end users, small remote teams"
166
+
167
+ 3. "What's your tech stack preference? (a) Node.js/React, (b) Python/Django, (c) Rails, (d) suggest one"
168
+ → User: "a - Node.js and React"
169
+
170
+ 4. "What are the 3-5 must-have features for v1?"
171
+ → User: "Create tasks, assign to team members, track status, simple kanban view"
172
+
173
+ 5. "Any hard constraints? (deadlines, required integrations, compliance)"
174
+ → User: "Need to integrate with Slack, launch in 3 months"
175
+
176
+ 6. "What's explicitly NOT in scope for v1?"
177
+ → User: "No mobile app, no time tracking, no advanced reporting"
178
+
179
+ After gathering responses, synthesize into the three output files.
180
+
181
+ ## Tips for Brownfield Projects
182
+
183
+ When working with existing codebases:
184
+
185
+ 1. **Start with codebase analysis context** — Reference the structure and tech stack discovered by konductor-codebase-mapper
186
+ 2. **Validate assumptions** — "I found you're using {tech}. Is that still the plan?"
187
+ 3. **Ask about gaps** — "What's missing that you need to build?"
188
+ 4. **Identify refactoring needs** — "Any parts that need to be rewritten or improved?"
189
+ 5. **Clarify existing vs. new** — "Which requirements are new features vs. improvements to existing code?"
190
+
191
+ ## Common Pitfalls to Avoid
192
+
193
+ - **Don't ask leading questions** — Let the user define priorities
194
+ - **Don't assume technical knowledge** — Explain terms if needed
195
+ - **Don't skip out-of-scope** — This is critical for preventing scope creep
196
+ - **Don't write vague requirements** — Each requirement should have clear acceptance criteria
197
+ - **Don't create too many phases** — 3-6 phases is typical for v1 projects
@@ -0,0 +1,190 @@
1
+ ---
2
+ name: konductor-map-codebase
3
+ description: Analyze and map an existing codebase. Use when the user says map codebase, analyze codebase, understand this project, scan project, or audit code structure.
4
+ ---
5
+
6
+ # Konductor Map Codebase — Codebase Analysis
7
+
8
+ You are the Konductor orchestrator. Analyze an existing codebase to understand its structure, tech stack, patterns, and conventions.
9
+
10
+ ## Step 1: Verify Target Directory
11
+
12
+ Check if a project root exists. By default, analyze the current working directory.
13
+
14
+ If the user specified a different directory, verify it exists:
15
+ ```bash
16
+ ls {target_directory}
17
+ ```
18
+
19
+ If it doesn't exist, tell the user:
20
+ > "Directory '{target_directory}' not found. Please provide a valid path."
21
+
22
+ Then stop.
23
+
24
+ ## Step 2: Quick Scan for Indicators
25
+
26
+ Check for common project files to determine if this is a real codebase:
27
+ ```bash
28
+ ls package.json Cargo.toml go.mod pyproject.toml requirements.txt composer.json build.gradle pom.xml 2>/dev/null | wc -l
29
+ ```
30
+
31
+ If no project files are found, tell the user:
32
+ > "No recognizable project structure found. This doesn't appear to be a codebase with standard project files."
33
+
34
+ Ask if they want to proceed anyway.
35
+
36
+ ## Step 3: Spawn Codebase Mapper Agent
37
+
38
+ Spawn the **konductor-codebase-mapper** subagent with these instructions:
39
+
40
+ **Analysis scope:**
41
+ 1. **File structure:**
42
+ - Directory layout (top-level directories and their purpose)
43
+ - Key directories (source code, tests, config, docs, build artifacts)
44
+ - File organization patterns
45
+
46
+ 2. **Tech stack:**
47
+ - Programming languages (primary and secondary)
48
+ - Frameworks and libraries (extracted from dependency files)
49
+ - Package managers and build tools
50
+ - Runtime versions (Node, Python, Go, Rust, etc. from config files)
51
+
52
+ 3. **Architecture and patterns:**
53
+ - Architecture style (monolithic, microservices, modular, etc.)
54
+ - Design patterns observed (MVC, layered, event-driven, etc.)
55
+ - Naming conventions (file names, directories, modules)
56
+ - Code organization (how features are structured)
57
+
58
+ 4. **Testing setup:**
59
+ - Test framework(s) used
60
+ - Test locations (unit, integration, e2e)
61
+ - Coverage tooling (if present)
62
+ - Test naming and organization patterns
63
+
64
+ 5. **Integrations and external dependencies:**
65
+ - APIs consumed (look for HTTP clients, API keys in configs)
66
+ - Databases (connection strings, ORM/query tools)
67
+ - External services (cloud providers, SaaS integrations)
68
+ - CI/CD configuration (GitHub Actions, CircleCI, Jenkins, etc.)
69
+
70
+ **Output requirements:**
71
+ The mapper should write TWO files:
72
+
73
+ 1. `.kiro/steering/structure.md` — File and directory structure analysis
74
+ 2. `.kiro/steering/tech.md` — Tech stack, patterns, testing, and integrations
75
+
76
+ Create the directory first:
77
+ ```bash
78
+ mkdir -p .kiro/steering
79
+ ```
80
+
81
+ **Mapper behavior:**
82
+ - Read relevant files (package.json, requirements.txt, README, etc.)
83
+ - Use Grep/Glob to scan for patterns
84
+ - Do NOT modify any project files
85
+ - Focus on facts and observations, not recommendations
86
+ - Complete the analysis within reasonable time (don't analyze every single file)
87
+
88
+ Provide the mapper with:
89
+ - The target directory (absolute path)
90
+ - The output file paths (absolute paths)
91
+ - Reference to `references/codebase-analysis.md` if it exists
92
+
93
+ Wait for the mapper to complete.
94
+
95
+ ## Step 4: Verify Mapper Output
96
+
97
+ Check that both output files were created:
98
+ ```bash
99
+ ls .kiro/steering/structure.md .kiro/steering/tech.md 2>/dev/null
100
+ ```
101
+
102
+ If either file is missing:
103
+ - Report which file is missing
104
+ - Show any error messages from the mapper
105
+ - Tell the user: "Codebase mapping incomplete. Review the mapper's output for errors."
106
+ - Stop
107
+
108
+ ## Step 5: Read and Summarize Results
109
+
110
+ Read both files:
111
+ - `.kiro/steering/structure.md`
112
+ - `.kiro/steering/tech.md`
113
+
114
+ Extract key findings:
115
+ - Primary programming language(s)
116
+ - Main framework(s)
117
+ - Architecture style
118
+ - Number of top-level directories
119
+ - Test coverage status (if determinable)
120
+
121
+ ## Step 6: Report to User
122
+
123
+ Present a summary:
124
+
125
+ ```
126
+ # Codebase Mapped
127
+
128
+ ## Tech Stack
129
+ {primary languages and frameworks}
130
+
131
+ ## Structure
132
+ {brief description of directory layout}
133
+ - {key directories}
134
+
135
+ ## Testing
136
+ {test framework and location, or "No tests found" if none}
137
+
138
+ ## Integrations
139
+ {external services and APIs, or "None detected" if none}
140
+
141
+ ---
142
+
143
+ Detailed analysis saved to:
144
+ - Structure: `.kiro/steering/structure.md`
145
+ - Tech stack: `.kiro/steering/tech.md`
146
+
147
+ These files will be used as context for planning and execution.
148
+ ```
149
+
150
+ ## Step 7: Optional State Update
151
+
152
+ If a Konductor project exists (`.konductor/state.toml`), update the metrics:
153
+ - Increment `[metrics].total_agent_sessions`
154
+ - Update `[metrics].last_activity`
155
+
156
+ Write a result file at `.konductor/.results/map-codebase.toml`:
157
+
158
+ ```toml
159
+ step = "map"
160
+ timestamp = {current ISO timestamp}
161
+ languages = ["{lang1}", "{lang2}", ...]
162
+ primary_framework = "{framework}"
163
+ ```
164
+
165
+ If no Konductor project exists, skip this step (mapping can be done standalone).
166
+
167
+ ## Error Handling
168
+
169
+ **Mapper agent fails:**
170
+ If the mapper crashes or produces errors:
171
+ 1. Show the error to the user
172
+ 2. Suggest running the analysis on a smaller scope or manually reviewing the codebase
173
+ 3. Stop
174
+
175
+ **Invalid directory:**
176
+ If the target directory is empty or inaccessible:
177
+ 1. Report the issue
178
+ 2. Stop
179
+
180
+ **Partial results:**
181
+ If the mapper creates only one file:
182
+ 1. Report which file was created and which is missing
183
+ 2. Display the content of the file that was created
184
+ 3. Suggest the user review it and potentially fill in the gaps manually
185
+
186
+ **No recognizable project:**
187
+ If the mapper reports that it cannot identify a tech stack:
188
+ 1. Show what it did find (if anything)
189
+ 2. Ask the user if they want to provide manual context
190
+ 3. If yes, guide them to write `.kiro/steering/tech.md` manually
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: konductor-next
3
+ description: Determine and run the next step in the development pipeline. Use when the user says next, continue, what's next, keep going, or proceed.
4
+ ---
5
+
6
+ # Konductor Next — Pipeline Orchestrator
7
+
8
+ You are the Konductor orchestrator. Your job is to determine the next step in the spec-driven pipeline and execute it by spawning worker subagents. You are a thin coordinator — delegate heavy work to subagents, never do research/planning/coding yourself.
9
+
10
+ ## Critical Rules
11
+
12
+ 1. **Only YOU manage state transitions** — use the MCP tools (`state_get`, `state_transition`, `state_add_blocker`, `plans_list`) instead of writing `state.toml` directly. Subagents never touch state. They write their own output files.
13
+ 2. **`.results/` is the source of truth** — if state and `.results/` conflict, trust `.results/`.
14
+ 3. **Read `config.toml` first** — respect feature flags and parallelism settings.
15
+ 4. **Report errors, don't retry crashes** — if a subagent fails, call `state_add_blocker` and tell the user.
16
+
17
+ ## Step 1: Read State
18
+
19
+ Call the `state_get` MCP tool to read current state. Also read:
20
+ - `.konductor/config.toml` — feature flags and settings
21
+ - `.konductor/roadmap.md` — phase list and status
22
+
23
+ If `.konductor/` does not exist, tell the user:
24
+ > "No Konductor project found. Say 'initialize my project' to get started."
25
+ Then stop.
26
+
27
+ ## Step 2: Determine Next Action
28
+
29
+ Based on the `current.step` field from `state_get`:
30
+
31
+ ### Case: `step = "initialized"` or `step = "discussed"`
32
+
33
+ The phase needs planning. Mention to the user:
34
+ > "Tip: you can say 'discuss phase {phase}' to set preferences before planning. Proceeding to plan."
35
+
36
+ Then run the **Planning Pipeline**:
37
+
38
+ 1. **Research** (if `config.toml` `features.research = true`):
39
+ Read `.konductor/phases/{phase}/context.md` if it exists.
40
+ Use the **konductor-researcher** agent to research phase {phase}. Provide it with:
41
+ - The phase name and goal from roadmap.md
42
+ - User decisions from context.md (if exists)
43
+ - Relevant requirements from requirements.md
44
+ The researcher will write to `.konductor/phases/{phase}/research.md`.
45
+ Wait for completion.
46
+
47
+ 2. **Plan**:
48
+ Use the **konductor-planner** agent to create execution plans. Provide it with:
49
+ - research.md (if research was run)
50
+ - requirements.md
51
+ - roadmap.md (for phase goal and success criteria)
52
+ - Reference: see `references/planning-guide.md` in the konductor-plan skill
53
+ The planner will write plan files to `.konductor/phases/{phase}/plans/`.
54
+ Wait for completion.
55
+
56
+ 3. **Check Plans** (if `config.toml` `features.plan_checker = true`):
57
+ Use the **konductor-plan-checker** agent to validate the plans. Provide it with:
58
+ - All plan files in `.konductor/phases/{phase}/plans/`
59
+ - requirements.md
60
+ 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
+
62
+ 4. **Update State**:
63
+ Write `.konductor/.results/plan-{phase}.toml`:
64
+ ```toml
65
+ step = "plan"
66
+ phase = "{phase}"
67
+ status = "ok"
68
+ timestamp = {current ISO timestamp}
69
+ ```
70
+ Update state: call `state_transition` with `step = "planned"`.
71
+ Tell the user: "Phase {phase} planned with N plans in M waves. Say 'next' to execute."
72
+
73
+ ### Case: `step = "planned"`
74
+
75
+ The phase is ready for execution. Run the **Execution Pipeline**:
76
+
77
+ 1. Read `config.toml` for `execution.max_wave_parallelism` and `git.auto_commit`.
78
+ 2. Read all plan files from `.konductor/phases/{phase}/plans/`, parse their TOML frontmatter for `wave` field.
79
+ 3. Group plans by wave number (wave 1 first, then 2, etc.).
80
+ 4. Call `state_transition` with `step = "executing"`.
81
+
82
+ 5. **For each wave** (in order):
83
+ Update wave tracking as needed.
84
+
85
+ **If `max_wave_parallelism > 1` (parallel mode):**
86
+ For each plan in this wave, use the **konductor-executor** agent to execute it. Launch all plans in the wave simultaneously. Each executor receives:
87
+ - Its specific plan file path
88
+ - Whether to auto-commit (`git.auto_commit`)
89
+ - The branching strategy (`git.branching_strategy`)
90
+ - Reference: see `references/execution-guide.md` in the konductor-exec skill
91
+ Wait for ALL executors to complete (check for summary files).
92
+
93
+ **If `max_wave_parallelism = 1` (sequential mode):**
94
+ Execute plans one at a time, in order within the wave.
95
+
96
+ After each wave completes, track progress.
97
+
98
+ 6. Write `.konductor/.results/execute-{phase}-plan-{n}.toml` for each completed plan.
99
+ 7. Call `state_transition` with `step = "executed"`.
100
+ 8. Tell the user: "Phase {phase} executed. N plans completed. Say 'next' to verify."
101
+
102
+ ### Case: `step = "executing"`
103
+
104
+ Execution was interrupted. Resume:
105
+ 1. Check which `{plan}-summary.md` files exist in `.konductor/phases/{phase}/plans/`.
106
+ 2. Plans with summaries are complete — skip them.
107
+ 3. Resume from the first incomplete plan in the current wave.
108
+ 4. Continue the Execution Pipeline from step 5 above.
109
+
110
+ ### Case: `step = "executed"`
111
+
112
+ The phase needs verification. Run the **Verification Pipeline**:
113
+
114
+ 1. Check if `config.toml` `features.verifier = false`. If so, skip verification:
115
+ Call `state_transition` with `step = "complete"`, advance phase. Stop.
116
+
117
+ 2. Use the **konductor-verifier** agent to verify the phase. Provide it with:
118
+ - All summary files from `.konductor/phases/{phase}/plans/`
119
+ - requirements.md
120
+ - All plan files (for must_haves in frontmatter)
121
+ - Reference: see `references/verification-patterns.md` in the konductor-verify skill
122
+ The verifier writes `.konductor/phases/{phase}/verification.md`.
123
+ Wait for completion.
124
+
125
+ 3. Read `verification.md`. Write `.konductor/.results/verify-{phase}.toml`.
126
+ 4. If status = "ok":
127
+ Call `state_transition` with `step = "complete"`.
128
+ Advance to next phase in roadmap (call `state_transition` with the new phase).
129
+ Tell user: "Phase {phase} verified and complete. Advancing to next phase."
130
+ 5. If status = "issues-found":
131
+ Keep current step as "executed".
132
+ Tell user the gaps found and suggest: "Run 'plan phase {phase}' to create gap-closure plans."
133
+
134
+ ### Case: `step = "complete"`
135
+
136
+ Current phase is done. Check roadmap for next incomplete phase:
137
+ - If found: update phase via `state_transition` with the new phase, set `step = "initialized"`, run Planning Pipeline.
138
+ - If all phases complete: tell user "All phases complete! Say 'ship' to finalize."
139
+
140
+ ### Case: `step = "blocked"`
141
+
142
+ Tell the user about the blocker from the `state_get` response `blockers` list and ask how to proceed.
143
+
144
+ ## Step 3: Error Handling
145
+
146
+ If any subagent fails (no output produced, Kiro reports error):
147
+ 1. Write `.konductor/.results/{step}-{phase}.toml` with `status = "error"` and error description.
148
+ 2. Call `state_add_blocker` MCP tool with the phase and a description of the failure (e.g., "Subagent {agent-name} failed: {error details}").
149
+ 3. Report the failure to the user with actionable context.
150
+ 4. Do NOT automatically retry a crashed subagent.
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: konductor-plan
3
+ description: Plan a phase for execution. Research the ecosystem, create execution plans, and validate them. Use when the user says plan phase, plan, research and plan, or prepare phase.
4
+ ---
5
+
6
+ # Konductor Plan — Phase Planning Pipeline
7
+
8
+ You are the Konductor orchestrator. Plan a phase by researching the ecosystem, creating execution plans, and validating them.
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.
13
+ 2. **Read `config.toml` first** — respect feature flags (research, plan_checker).
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" or "plan 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 read `.konductor/config.toml`.
20
+ Validate that the specified phase exists in `.konductor/roadmap.md`.
21
+ Create the phase directory if it doesn't exist:
22
+ ```bash
23
+ mkdir -p .konductor/phases/{phase}/plans
24
+ ```
25
+
26
+ ## Step 2: Research (if enabled)
27
+
28
+ If `config.toml` `features.research = true`:
29
+
30
+ Read `.konductor/phases/{phase}/context.md` if it exists (user decisions from `konductor-discuss`).
31
+
32
+ Use the **konductor-researcher** agent to research this phase. Provide it with:
33
+ - The phase name, description, and success criteria from roadmap.md
34
+ - User decisions from context.md (if exists)
35
+ - Relevant requirements from `.konductor/requirements.md`
36
+ - Instructions: investigate the ecosystem, identify libraries, patterns, risks, and best practices. Write findings to `.konductor/phases/{phase}/research.md`.
37
+
38
+ Wait for the researcher to complete. Verify `research.md` was created.
39
+
40
+ ## Step 3: Create Plans
41
+
42
+ Use the **konductor-planner** agent to decompose the phase into execution plans. Provide it with:
43
+ - `.konductor/phases/{phase}/research.md` (if research was run)
44
+ - `.konductor/requirements.md`
45
+ - `.konductor/roadmap.md` (phase goal and success criteria)
46
+ - The planning guide: see `references/planning-guide.md`
47
+ - Instructions: create plan files in `.konductor/phases/{phase}/plans/` using TOML frontmatter format
48
+
49
+ Wait for the planner to complete. Verify at least one plan file was created.
50
+
51
+ ## Step 4: Validate Plans (if enabled)
52
+
53
+ If `config.toml` `features.plan_checker = true`:
54
+
55
+ Use the **konductor-plan-checker** agent to validate the plans. Provide it with:
56
+ - All plan files in `.konductor/phases/{phase}/plans/`
57
+ - `.konductor/requirements.md`
58
+ - Instructions: check coverage (every requirement addressed), sizing (2-5 tasks per plan), dependencies (valid wave ordering), completeness (no gaps). Fix issues in-place.
59
+
60
+ If the checker reports issues that it could not fix:
61
+ - Spawn a new **konductor-planner** agent with the checker's feedback as additional context
62
+ - Re-run the **konductor-plan-checker**
63
+ - Maximum 3 iterations. If still unresolved, report to user.
64
+
65
+ ## Step 5: Update State
66
+
67
+ Write `.konductor/.results/plan-{phase}.toml`:
68
+ ```toml
69
+ step = "plan"
70
+ phase = "{phase}"
71
+ status = "ok"
72
+ timestamp = {current ISO timestamp}
73
+ plan_count = {number of plan files created}
74
+ ```
75
+
76
+ Update state using MCP tools:
77
+ - Call `state_transition` with `step = "planned"` to advance the pipeline
78
+ - The tool automatically updates status and timestamps
79
+
80
+ Tell the user:
81
+ - How many plans were created
82
+ - How many waves
83
+ - Suggest: "Say 'next' to execute, or review the plans in `.konductor/phases/{phase}/plans/`"
84
+
85
+ ## Error Handling
86
+
87
+ If any subagent fails:
88
+ 1. Write `.konductor/.results/plan-{phase}.toml` with `status = "error"`
89
+ 2. Call `state_add_blocker` MCP tool with the phase and reason for the failure
90
+ 3. Report failure to user with actionable context
91
+ 4. Do NOT retry crashed subagents