konductor 0.7.3 → 0.10.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-code-reviewer.json +39 -0
- package/agents/konductor-codebase-mapper.json +16 -14
- package/agents/konductor-design-reviewer.json +40 -0
- package/agents/konductor-discoverer.json +16 -14
- package/agents/konductor-executor.json +16 -14
- package/agents/konductor-plan-checker.json +16 -14
- package/agents/konductor-planner.json +16 -14
- package/agents/konductor-researcher.json +16 -14
- package/agents/konductor-verifier.json +16 -14
- package/agents/konductor.json +17 -14
- package/package.json +1 -2
- package/scripts/postinstall.js +1 -2
- package/skills/konductor-exec/SKILL.md +22 -2
- package/skills/konductor-next/SKILL.md +18 -4
- package/skills/konductor-plan/SKILL.md +60 -4
- package/skills/konductor-plan/references/planning-guide.md +77 -0
- package/skills/konductor-ship/SKILL.md +25 -11
- package/hooks/konductor-hooks.json +0 -16
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-code-reviewer",
|
|
3
|
+
"description": "Reviews code changes after execution for correctness, security, and quality. Reports findings for the executor to fix.",
|
|
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
|
+
],
|
|
22
|
+
"hooks": {
|
|
23
|
+
"preToolUse": [
|
|
24
|
+
{
|
|
25
|
+
"matcher": "*",
|
|
26
|
+
"command": "konductor hook",
|
|
27
|
+
"timeout_ms": 1000
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"postToolUse": [
|
|
31
|
+
{
|
|
32
|
+
"matcher": "*",
|
|
33
|
+
"command": "konductor hook",
|
|
34
|
+
"timeout_ms": 2000
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"prompt": "You are a code reviewer. Review all modified source files and evaluate against these criteria: (1) Correctness — does the code match what the plan and summary describe? (2) Error handling — are errors handled, not silently swallowed? (3) Security — no hardcoded secrets, no injection risks, no path traversal, proper input validation. (4) Duplication — is there copy-pasted logic that should be extracted into a shared function/module? (5) Performance — unnecessary allocations in hot paths, N+1 queries, unbounded loops, blocking calls in async code. (6) Dead code — no unused imports, unreachable branches, or commented-out blocks. (7) Consistency — does the code follow patterns already established in the codebase? (8) TODOs/FIXMEs — any left behind that should have been resolved? Run the project's test suite and linter. Do NOT fix any issues yourself — only report them with file, line, description, and severity (minor/significant). Write all findings to code-review.md."
|
|
39
|
+
}
|
|
@@ -14,19 +14,21 @@
|
|
|
14
14
|
"code"
|
|
15
15
|
],
|
|
16
16
|
"resources": [],
|
|
17
|
-
"hooks":
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
"hooks": {
|
|
18
|
+
"preToolUse": [
|
|
19
|
+
{
|
|
20
|
+
"matcher": "*",
|
|
21
|
+
"command": "konductor hook",
|
|
22
|
+
"timeout_ms": 1000
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"postToolUse": [
|
|
26
|
+
{
|
|
27
|
+
"matcher": "*",
|
|
28
|
+
"command": "konductor hook",
|
|
29
|
+
"timeout_ms": 2000
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
31
33
|
"prompt": ""
|
|
32
34
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "konductor-design-reviewer",
|
|
3
|
+
"description": "Reviews phase design.md and per-plan Design sections for architectural soundness, feasibility, risk, security, cross-plan consistency, and requirement coverage. Writes structured feedback.",
|
|
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/roadmap.md",
|
|
19
|
+
"file://.konductor/project.md",
|
|
20
|
+
"file://.konductor/phases/*/plans/*.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 design reviewer. Evaluate the phase design.md and per-plan ## Design sections against these criteria: (1) Architectural soundness — do components and interactions make sense? (2) Feasibility — are proposed interfaces and approaches realistic given the codebase? (3) Security — are there hardcoded secrets, injection risks, missing input validation, or unsafe patterns? (4) Risk — missing error handling, dependency issues, integration gaps. (5) Cross-plan consistency — do shared interfaces match across dependent plans? (6) Requirement coverage — every REQ-XX for this phase is addressed. Write findings to review.md with a verdict (pass/revise/reject), issues with severity (critical/warning/info), and strengths."
|
|
40
|
+
}
|
|
@@ -14,19 +14,21 @@
|
|
|
14
14
|
"code"
|
|
15
15
|
],
|
|
16
16
|
"resources": [],
|
|
17
|
-
"hooks":
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
"hooks": {
|
|
18
|
+
"preToolUse": [
|
|
19
|
+
{
|
|
20
|
+
"matcher": "*",
|
|
21
|
+
"command": "konductor hook",
|
|
22
|
+
"timeout_ms": 1000
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"postToolUse": [
|
|
26
|
+
{
|
|
27
|
+
"matcher": "*",
|
|
28
|
+
"command": "konductor hook",
|
|
29
|
+
"timeout_ms": 2000
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
31
33
|
"prompt": ""
|
|
32
34
|
}
|
|
@@ -19,19 +19,21 @@
|
|
|
19
19
|
"file://.konductor/phases/*/plans/*.md",
|
|
20
20
|
"file://.kiro/steering/**/*.md"
|
|
21
21
|
],
|
|
22
|
-
"hooks":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
"hooks": {
|
|
23
|
+
"preToolUse": [
|
|
24
|
+
{
|
|
25
|
+
"matcher": "*",
|
|
26
|
+
"command": "konductor hook",
|
|
27
|
+
"timeout_ms": 1000
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"postToolUse": [
|
|
31
|
+
{
|
|
32
|
+
"matcher": "*",
|
|
33
|
+
"command": "konductor hook",
|
|
34
|
+
"timeout_ms": 2000
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
36
38
|
"prompt": ""
|
|
37
39
|
}
|
|
@@ -17,19 +17,21 @@
|
|
|
17
17
|
"file://.konductor/requirements.md",
|
|
18
18
|
"file://.konductor/phases/*/plans/*.md"
|
|
19
19
|
],
|
|
20
|
-
"hooks":
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
"hooks": {
|
|
21
|
+
"preToolUse": [
|
|
22
|
+
{
|
|
23
|
+
"matcher": "*",
|
|
24
|
+
"command": "konductor hook",
|
|
25
|
+
"timeout_ms": 1000
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"postToolUse": [
|
|
29
|
+
{
|
|
30
|
+
"matcher": "*",
|
|
31
|
+
"command": "konductor hook",
|
|
32
|
+
"timeout_ms": 2000
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
34
36
|
"prompt": ""
|
|
35
37
|
}
|
|
@@ -19,19 +19,21 @@
|
|
|
19
19
|
"file://.konductor/roadmap.md",
|
|
20
20
|
"file://.kiro/steering/**/*.md"
|
|
21
21
|
],
|
|
22
|
-
"hooks":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
"hooks": {
|
|
23
|
+
"preToolUse": [
|
|
24
|
+
{
|
|
25
|
+
"matcher": "*",
|
|
26
|
+
"command": "konductor hook",
|
|
27
|
+
"timeout_ms": 1000
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"postToolUse": [
|
|
31
|
+
{
|
|
32
|
+
"matcher": "*",
|
|
33
|
+
"command": "konductor hook",
|
|
34
|
+
"timeout_ms": 2000
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
36
38
|
"prompt": ""
|
|
37
39
|
}
|
|
@@ -18,19 +18,21 @@
|
|
|
18
18
|
"file://.konductor/requirements.md",
|
|
19
19
|
"file://.kiro/steering/**/*.md"
|
|
20
20
|
],
|
|
21
|
-
"hooks":
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
"hooks": {
|
|
22
|
+
"preToolUse": [
|
|
23
|
+
{
|
|
24
|
+
"matcher": "*",
|
|
25
|
+
"command": "konductor hook",
|
|
26
|
+
"timeout_ms": 1000
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"postToolUse": [
|
|
30
|
+
{
|
|
31
|
+
"matcher": "*",
|
|
32
|
+
"command": "konductor hook",
|
|
33
|
+
"timeout_ms": 2000
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
35
37
|
"prompt": ""
|
|
36
38
|
}
|
|
@@ -18,19 +18,21 @@
|
|
|
18
18
|
"file://.konductor/phases/*/plans/*.md",
|
|
19
19
|
"file://.kiro/steering/**/*.md"
|
|
20
20
|
],
|
|
21
|
-
"hooks":
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
"hooks": {
|
|
22
|
+
"preToolUse": [
|
|
23
|
+
{
|
|
24
|
+
"matcher": "*",
|
|
25
|
+
"command": "konductor hook",
|
|
26
|
+
"timeout_ms": 1000
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"postToolUse": [
|
|
30
|
+
{
|
|
31
|
+
"matcher": "*",
|
|
32
|
+
"command": "konductor hook",
|
|
33
|
+
"timeout_ms": 2000
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
35
37
|
"prompt": ""
|
|
36
38
|
}
|
package/agents/konductor.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "konductor",
|
|
3
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
|
+
"model": "claude-opus-4.6-1m",
|
|
4
5
|
"tools": [
|
|
5
6
|
"read",
|
|
6
7
|
"write",
|
|
@@ -39,19 +40,21 @@
|
|
|
39
40
|
]
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
|
-
"hooks":
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
"hooks": {
|
|
44
|
+
"preToolUse": [
|
|
45
|
+
{
|
|
46
|
+
"matcher": "*",
|
|
47
|
+
"command": "konductor hook",
|
|
48
|
+
"timeout_ms": 1000
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"postToolUse": [
|
|
52
|
+
{
|
|
53
|
+
"matcher": "*",
|
|
54
|
+
"command": "konductor hook",
|
|
55
|
+
"timeout_ms": 2000
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
56
59
|
"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."
|
|
57
60
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "konductor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Spec-driven development orchestrator for Kiro CLI — MCP server and hook processor",
|
|
5
5
|
"bin": {
|
|
6
6
|
"konductor": "bin/konductor"
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"scripts/",
|
|
11
11
|
"agents/",
|
|
12
12
|
"skills/",
|
|
13
|
-
"hooks/",
|
|
14
13
|
"README.md"
|
|
15
14
|
],
|
|
16
15
|
"scripts": {
|
package/scripts/postinstall.js
CHANGED
|
@@ -72,7 +72,7 @@ async function main() {
|
|
|
72
72
|
fs.chmodSync(dest, 0o755);
|
|
73
73
|
console.log("konductor binary installed.");
|
|
74
74
|
|
|
75
|
-
// Install agents
|
|
75
|
+
// Install agents and skills to ~/.kiro/
|
|
76
76
|
installKiroAssets();
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -99,7 +99,6 @@ function installKiroAssets() {
|
|
|
99
99
|
const assets = [
|
|
100
100
|
{ src: "agents", dest: "agents" },
|
|
101
101
|
{ src: "skills", dest: "skills" },
|
|
102
|
-
{ src: "hooks", dest: "hooks" },
|
|
103
102
|
];
|
|
104
103
|
|
|
105
104
|
for (const { src, dest } of assets) {
|
|
@@ -110,13 +110,33 @@ If an executor fails (crashes, times out, or reports errors):
|
|
|
110
110
|
|
|
111
111
|
After each wave completes, track progress (completed plans count and percentage) for reporting.
|
|
112
112
|
|
|
113
|
-
## Step 6:
|
|
113
|
+
## Step 6: Code Review (if enabled)
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
If `config.toml` `features.code_review = true`:
|
|
116
|
+
|
|
117
|
+
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/`
|
|
120
|
+
- The phase name and plan files for context
|
|
121
|
+
- Instructions: review all modified source files, run tests and linting, do NOT fix any issues — only report them with file, line, description, and severity (minor/significant). Write findings to `.konductor/phases/{phase}/code-review.md`.
|
|
122
|
+
|
|
123
|
+
Wait for the reviewer to complete. Read `code-review.md`.
|
|
124
|
+
|
|
125
|
+
**If the review reports issues:**
|
|
126
|
+
1. Spawn a **konductor-executor** agent with the issues from `code-review.md` as context. Instruct it to fix all reported issues and commit with `fix({phase}): code review fixes`.
|
|
127
|
+
2. Re-run the **konductor-code-reviewer** to verify the fixes.
|
|
128
|
+
3. Maximum 3 review-fix iterations. If issues remain after 3 iterations, call `state_add_blocker` with a summary of remaining issues and report to user.
|
|
129
|
+
|
|
130
|
+
**If no issues remain:** Proceed to Step 7.
|
|
131
|
+
|
|
132
|
+
## Step 7: Set Executed State
|
|
133
|
+
|
|
134
|
+
After code review completes (with no blocking issues), call `state_transition` with `step = "executed"` to advance the pipeline.
|
|
116
135
|
|
|
117
136
|
Tell the user:
|
|
118
137
|
- Total plans executed
|
|
119
138
|
- Plans succeeded vs. failed (if any)
|
|
139
|
+
- Code review findings (issues fixed, warnings reported)
|
|
120
140
|
- Next step suggestion: "Say 'next' to verify the phase."
|
|
121
141
|
|
|
122
142
|
If any plans failed, list them and suggest:
|
|
@@ -50,7 +50,7 @@ Then run the **Planning Pipeline**:
|
|
|
50
50
|
- requirements.md
|
|
51
51
|
- roadmap.md (for phase goal and success criteria)
|
|
52
52
|
- Reference: see `references/planning-guide.md` in the konductor-plan skill
|
|
53
|
-
The planner will write plan files to `.konductor/phases/{phase}/plans/`.
|
|
53
|
+
The planner will first write `.konductor/phases/{phase}/design.md` with the phase-level architecture, then write plan files with `## Design` sections to `.konductor/phases/{phase}/plans/`.
|
|
54
54
|
Wait for completion.
|
|
55
55
|
|
|
56
56
|
3. **Check Plans** (if `config.toml` `features.plan_checker = true`):
|
|
@@ -59,7 +59,18 @@ Then run the **Planning Pipeline**:
|
|
|
59
59
|
- requirements.md
|
|
60
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
61
|
|
|
62
|
-
4. **
|
|
62
|
+
4. **Design Review** (if `config.toml` `features.design_review = true`):
|
|
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**:
|
|
63
74
|
Write `.konductor/.results/plan-{phase}.toml`:
|
|
64
75
|
```toml
|
|
65
76
|
step = "plan"
|
|
@@ -96,8 +107,11 @@ The phase is ready for execution. Run the **Execution Pipeline**:
|
|
|
96
107
|
After each wave completes, track progress.
|
|
97
108
|
|
|
98
109
|
6. Write `.konductor/.results/execute-{phase}-plan-{n}.toml` for each completed plan.
|
|
99
|
-
7.
|
|
100
|
-
|
|
110
|
+
7. **Code Review** (if `config.toml` `features.code_review = true`):
|
|
111
|
+
Spawn **konductor-code-reviewer** agent with: `.konductor/.tracking/modified-files.log`, all `*-summary.md` files from plans directory, phase name. The reviewer writes `.konductor/phases/{phase}/code-review.md`.
|
|
112
|
+
If issues found: spawn a **konductor-executor** agent with the issues to fix them, then re-run the reviewer. Maximum 3 review-fix iterations. If still unresolved, call `state_add_blocker` and report to user.
|
|
113
|
+
8. Call `state_transition` with `step = "executed"`.
|
|
114
|
+
9. Tell the user: "Phase {phase} executed. N plans completed. Say 'next' to verify."
|
|
101
115
|
|
|
102
116
|
### Case: `step = "executing"`
|
|
103
117
|
|
|
@@ -10,7 +10,7 @@ You are the Konductor orchestrator. Plan a phase by researching the ecosystem, c
|
|
|
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.
|
|
13
|
-
2. **Read `config.toml` first** — respect feature flags (research, plan_checker).
|
|
13
|
+
2. **Read `config.toml` first** — respect feature flags (research, plan_checker, design_review).
|
|
14
14
|
3. **Report errors, don't retry crashes** — if a subagent fails, set status to "blocked".
|
|
15
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
16
|
|
|
@@ -44,9 +44,9 @@ Use the **konductor-planner** agent to decompose the phase into execution plans.
|
|
|
44
44
|
- `.konductor/requirements.md`
|
|
45
45
|
- `.konductor/roadmap.md` (phase goal and success criteria)
|
|
46
46
|
- The planning guide: see `references/planning-guide.md`
|
|
47
|
-
- Instructions: create plan files in `.konductor/phases/{phase}/plans/` using TOML frontmatter format
|
|
47
|
+
- Instructions: first write `.konductor/phases/{phase}/design.md` with the phase-level architecture (see planning guide "Phase-Level Design Document" section), then create plan files in `.konductor/phases/{phase}/plans/` using TOML frontmatter format with `## Design` sections in each plan
|
|
48
48
|
|
|
49
|
-
Wait for the planner to complete. Verify at least one plan file
|
|
49
|
+
Wait for the planner to complete. Verify `design.md` was created and at least one plan file exists.
|
|
50
50
|
|
|
51
51
|
## Step 4: Validate Plans (if enabled)
|
|
52
52
|
|
|
@@ -62,7 +62,63 @@ If the checker reports issues that it could not fix:
|
|
|
62
62
|
- Re-run the **konductor-plan-checker**
|
|
63
63
|
- Maximum 3 iterations. If still unresolved, report to user.
|
|
64
64
|
|
|
65
|
-
## Step 5:
|
|
65
|
+
## Step 5: Design Review (if enabled)
|
|
66
|
+
|
|
67
|
+
If `config.toml` `features.design_review = true`:
|
|
68
|
+
|
|
69
|
+
Use the **konductor-design-reviewer** agent to review the technical design. Provide it with:
|
|
70
|
+
- `.konductor/phases/{phase}/design.md`
|
|
71
|
+
- All plan files in `.konductor/phases/{phase}/plans/`
|
|
72
|
+
- `.konductor/requirements.md`
|
|
73
|
+
- `.konductor/roadmap.md` (phase goal and success criteria)
|
|
74
|
+
- `.konductor/project.md` (tech stack and constraints)
|
|
75
|
+
- Instructions: analyze the phase design and per-plan Design sections, then write a structured review to `.konductor/phases/{phase}/review.md`
|
|
76
|
+
|
|
77
|
+
**Review criteria the agent must evaluate:**
|
|
78
|
+
1. Architectural soundness of design.md — do the components and interactions make sense?
|
|
79
|
+
2. Feasibility of per-plan Design sections — are the proposed interfaces and approaches realistic?
|
|
80
|
+
3. Cross-plan consistency — do shared interfaces match across plans that depend on each other?
|
|
81
|
+
4. Requirement coverage — every REQ-XX for this phase is addressed
|
|
82
|
+
5. Risk identification — missing error handling, security concerns, dependency issues
|
|
83
|
+
|
|
84
|
+
**Review output format** (written to `.konductor/phases/{phase}/review.md`):
|
|
85
|
+
```markdown
|
|
86
|
+
# Design Review: Phase {phase}
|
|
87
|
+
|
|
88
|
+
## Summary
|
|
89
|
+
{one paragraph overall assessment}
|
|
90
|
+
|
|
91
|
+
## Verdict: {pass | revise | reject}
|
|
92
|
+
|
|
93
|
+
## Issues
|
|
94
|
+
|
|
95
|
+
### Issue 1: {title}
|
|
96
|
+
- **Severity:** critical | warning | info
|
|
97
|
+
- **Affected plan:** {plan number or "design.md"}
|
|
98
|
+
- **Description:** {what's wrong}
|
|
99
|
+
- **Suggestion:** {how to fix}
|
|
100
|
+
|
|
101
|
+
## Strengths
|
|
102
|
+
{what the design does well}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Wait for the reviewer to complete. Verify `review.md` was created.
|
|
106
|
+
|
|
107
|
+
**If verdict is "pass":** Proceed to Step 6.
|
|
108
|
+
|
|
109
|
+
**If verdict is "revise"** (has critical or warning issues):
|
|
110
|
+
1. Spawn a new **konductor-planner** agent with the review feedback as additional context
|
|
111
|
+
2. Instruct it to revise `design.md` and the affected plans in-place
|
|
112
|
+
3. Re-run the **konductor-design-reviewer**
|
|
113
|
+
4. Maximum 2 review-revise iterations. If still "revise" after 2 iterations, proceed to user approval with warnings noted.
|
|
114
|
+
|
|
115
|
+
**Present the review summary to the user.** Ask:
|
|
116
|
+
> "Approve plans for execution? (approve / reject)"
|
|
117
|
+
|
|
118
|
+
- **On approve:** Proceed to Step 6.
|
|
119
|
+
- **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."
|
|
120
|
+
|
|
121
|
+
## Step 6: Update State
|
|
66
122
|
|
|
67
123
|
Write `.konductor/.results/plan-{phase}.toml`:
|
|
68
124
|
```toml
|
|
@@ -76,6 +76,16 @@ Each plan is a markdown file with TOML frontmatter and a structured body.
|
|
|
76
76
|
- `must_haves.artifacts`: Files that must exist
|
|
77
77
|
- `must_haves.key_links`: Wiring checks (A imports B, C calls D)
|
|
78
78
|
|
|
79
|
+
**Body sections (in order):**
|
|
80
|
+
- `## Goal`: What this plan delivers
|
|
81
|
+
- `## Design`: Technical design for this plan's implementation
|
|
82
|
+
- `### Approach`: Why this approach, what alternatives were considered
|
|
83
|
+
- `### Key Interfaces`: Function signatures, type definitions, API contracts introduced or modified by this plan
|
|
84
|
+
- `### Error Handling`: How errors are handled within this plan's scope
|
|
85
|
+
- `### Trade-offs`: What was traded off and why
|
|
86
|
+
- `## Dependencies` (optional): Interface context from plans this one depends on
|
|
87
|
+
- `## Tasks`: Ordered list of implementation tasks
|
|
88
|
+
|
|
79
89
|
**Complete example:**
|
|
80
90
|
```markdown
|
|
81
91
|
+++
|
|
@@ -99,6 +109,33 @@ key_links = ["User model imported by auth routes", "bcrypt used in user.rs"]
|
|
|
99
109
|
## Goal
|
|
100
110
|
Create the User data model and database schema to support user registration.
|
|
101
111
|
|
|
112
|
+
## Design
|
|
113
|
+
|
|
114
|
+
### Approach
|
|
115
|
+
Use a single User struct with private password_hash field. Bcrypt for hashing (industry standard, built-in salt). Migration creates the users table directly — no ORM migration framework needed at this stage.
|
|
116
|
+
|
|
117
|
+
### Key Interfaces
|
|
118
|
+
```rust
|
|
119
|
+
pub struct User {
|
|
120
|
+
pub id: Uuid,
|
|
121
|
+
pub email: String,
|
|
122
|
+
password_hash: String,
|
|
123
|
+
pub created_at: DateTime<Utc>,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
impl User {
|
|
127
|
+
pub fn new(email: String, password: String) -> Result<Self, AuthError>;
|
|
128
|
+
pub fn verify_password(&self, password: &str) -> bool;
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Error Handling
|
|
133
|
+
`User::new` returns `AuthError::WeakPassword` if password doesn't meet requirements, `AuthError::HashError` if bcrypt fails. Callers handle these via the Result type.
|
|
134
|
+
|
|
135
|
+
### Trade-offs
|
|
136
|
+
- Bcrypt over argon2: simpler dependency, sufficient for this use case, slightly slower but acceptable
|
|
137
|
+
- No email uniqueness enforcement at struct level — handled by DB unique constraint
|
|
138
|
+
|
|
102
139
|
## Tasks
|
|
103
140
|
|
|
104
141
|
### Task 1: Create User struct
|
|
@@ -130,6 +167,44 @@ Create the User data model and database schema to support user registration.
|
|
|
130
167
|
- **done:** Registration route can create User instances
|
|
131
168
|
```
|
|
132
169
|
|
|
170
|
+
## Phase-Level Design Document
|
|
171
|
+
|
|
172
|
+
Before writing individual plans, the planner must produce `.konductor/phases/{phase}/design.md`. This document captures the overall technical design for the phase, giving reviewers and executors a holistic view.
|
|
173
|
+
|
|
174
|
+
**Contents:**
|
|
175
|
+
1. **Overview** — one paragraph summarizing the architectural approach for this phase
|
|
176
|
+
2. **Components** — which modules, files, or services are involved and their responsibilities
|
|
177
|
+
3. **Interactions** — how components communicate (function calls, API requests, event flows)
|
|
178
|
+
4. **Key Decisions** — architectural choices that span multiple plans, with rationale
|
|
179
|
+
5. **Shared Interfaces** — type definitions, function signatures, or API contracts used across multiple plans
|
|
180
|
+
|
|
181
|
+
**Template:**
|
|
182
|
+
```markdown
|
|
183
|
+
# Design: Phase {phase} — {name}
|
|
184
|
+
|
|
185
|
+
## Overview
|
|
186
|
+
{One paragraph: what is being built and the high-level approach}
|
|
187
|
+
|
|
188
|
+
## Components
|
|
189
|
+
- **{component}**: {responsibility}
|
|
190
|
+
- **{component}**: {responsibility}
|
|
191
|
+
|
|
192
|
+
## Interactions
|
|
193
|
+
{Describe how components interact — which calls which, data flow}
|
|
194
|
+
|
|
195
|
+
## Key Decisions
|
|
196
|
+
|
|
197
|
+
### {Decision title}
|
|
198
|
+
**Choice:** {what was decided}
|
|
199
|
+
**Rationale:** {why}
|
|
200
|
+
**Alternatives considered:** {what else was evaluated}
|
|
201
|
+
|
|
202
|
+
## Shared Interfaces
|
|
203
|
+
{Type definitions, function signatures, or API contracts referenced by multiple plans}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Individual plan `## Design` sections should reference this document for shared context rather than duplicating it. For example: "See design.md Key Decisions for the choice of bcrypt over argon2."
|
|
207
|
+
|
|
133
208
|
## Goal-Backward Methodology
|
|
134
209
|
|
|
135
210
|
Work backward from the phase goal to derive concrete requirements.
|
|
@@ -253,7 +328,9 @@ Use this interface in Task 2 when implementing the login handler.
|
|
|
253
328
|
|
|
254
329
|
Before finalizing plans, verify:
|
|
255
330
|
|
|
331
|
+
- [ ] Phase-level `design.md` exists with overview, components, interactions, key decisions, and shared interfaces
|
|
256
332
|
- [ ] Every plan has valid TOML frontmatter
|
|
333
|
+
- [ ] Every plan has a `## Design` section with Approach, Key Interfaces, Error Handling, and Trade-offs
|
|
257
334
|
- [ ] Wave numbers form a valid DAG (no cycles)
|
|
258
335
|
- [ ] Each plan has 2-5 tasks
|
|
259
336
|
- [ ] Each task has files, action, verify, and done
|
|
@@ -60,23 +60,37 @@ Read `.konductor/.results/verify-integration.toml`.
|
|
|
60
60
|
- Tell the user: "Integration issues found. Fix these before shipping: {list of issues}. You can use 'exec' to re-run specific plans or fix manually."
|
|
61
61
|
- Stop here
|
|
62
62
|
|
|
63
|
-
## Step 5: Create Release
|
|
63
|
+
## Step 5: Create Release Branch and PR
|
|
64
64
|
|
|
65
65
|
Read `.konductor/project.md` to extract:
|
|
66
66
|
- Project name
|
|
67
67
|
- Version (if specified, or use "v1.0.0" as default)
|
|
68
68
|
|
|
69
|
-
Create a
|
|
69
|
+
Create a feature branch, rebase onto the default branch, and push a PR:
|
|
70
|
+
|
|
70
71
|
```bash
|
|
71
|
-
|
|
72
|
+
# Ensure we're up to date
|
|
73
|
+
git fetch origin
|
|
74
|
+
|
|
75
|
+
# Determine default branch
|
|
76
|
+
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
|
|
72
77
|
|
|
73
|
-
|
|
78
|
+
# Create release branch
|
|
79
|
+
git checkout -b release/{version}
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
# Rebase onto default branch
|
|
82
|
+
git rebase origin/$DEFAULT_BRANCH
|
|
83
|
+
|
|
84
|
+
# Push and create PR
|
|
85
|
+
git push -u origin release/{version}
|
|
76
86
|
```
|
|
77
87
|
|
|
88
|
+
Create a pull request targeting the default branch with:
|
|
89
|
+
- **Title:** `release: {version} — {project name}`
|
|
90
|
+
- **Body:** Summary of all phases completed, verification status, and milestone info
|
|
91
|
+
|
|
78
92
|
Tell the user:
|
|
79
|
-
> "Created
|
|
93
|
+
> "Created release branch and PR for {version}. Review and merge to ship."
|
|
80
94
|
|
|
81
95
|
## Step 6: Archive Project State
|
|
82
96
|
|
|
@@ -133,11 +147,11 @@ Tell the user:
|
|
|
133
147
|
- {phases_total} phases completed
|
|
134
148
|
- {total_agent_sessions} agent sessions
|
|
135
149
|
- Verified: All integration checks passed
|
|
136
|
-
-
|
|
150
|
+
- Release PR: {pr_url}
|
|
137
151
|
- Archived: .konductor/milestones/{version}/
|
|
138
152
|
|
|
139
153
|
## Next Steps
|
|
140
|
-
-
|
|
154
|
+
- Review and merge the release PR
|
|
141
155
|
- Review the milestone summary: `.konductor/milestones/{version}/summary.md`
|
|
142
156
|
- Consider deploying your project
|
|
143
157
|
|
|
@@ -152,9 +166,9 @@ If phases are incomplete, do NOT proceed with shipping. Report the gap and stop.
|
|
|
152
166
|
**Verification failures:**
|
|
153
167
|
If the verifier finds issues, do NOT create tags or archives. Report issues and stop.
|
|
154
168
|
|
|
155
|
-
**
|
|
156
|
-
If the
|
|
157
|
-
> "
|
|
169
|
+
**Release branch already exists:**
|
|
170
|
+
If the branch `release/{version}` already exists, warn the user:
|
|
171
|
+
> "Branch release/{version} already exists. Use a different version or delete the existing branch first."
|
|
158
172
|
|
|
159
173
|
Then stop.
|
|
160
174
|
|