Repository navigation
Conversation
18 of 20 tasks
10 tasks done
added 2 commits
October 29, 2026 00:32
Specialists (k-*) now follow one always-loaded rule in k-core-rules.md: never spawn an orchestrator or another specialist. They do their own part, then return a note naming the role the rest needs, or a proposed parallel split with the files each part touches. A permission denial is not a handoff; the specialist asks the user. Orchestrators get a matching instruction in k-orchestrator-routing-rules.md and delegation-protocol. Removes the "Subagent Delegation" sections and "offer to spawn" steps from k-architect, k-quality-assurance and k-tpm so the prompts do not contradict the rule. Spawn grants in spec configs are unchanged. Always-loaded bytes added (same on Kiro v3, Kiro v2, Claude Code): k-browser, k-developer, k-media-analyzer, k-product-manager, k-researcher +646; k-quality-assurance +509; k-tpm +439; k-architect +431; konductor, konductor-mux-orchestrator, konductor-cmux-orchestrator +1008. Verified: make build, make synth, test-skills-sh, claude-plugin-check pass; test-py 222 passed and kiro-power-check pass (pytest 8.3.4, PyYAML 6.0.2 venv); test-rust cli 1779, mcp 318, shared 76 passed (resolve_cwd_json_envelope flaked once, passed rerun alone). guide-check reports one failure that also exists on main (withdrawn config command).
…ition Wording only: a denied action is not a handoff, report it and stop. Verified: make build, make synth, make test-skills-sh pass.
knihit
force-pushed
the
feat/specialists-return-routing
branch
from
October 29, 2026 04:37
f1f6718 to
f5dd0ad
Compare
15 of 16 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On GPT models under Kiro CLI v3, specialists re-delegate to orchestrators and cascade to the depth limit: about 19 spawns per run on main against about 2 for Claude. About 70% of deep spawns sit under an orchestrator self-spawn, and the rest are specialist-to-specialist chains. This PR gives specialists one always-loaded rule: do your part and hand routing back. The stacked PR enforces it in config.
Context / system prompts:
context/k-core-rules.md: new## Specialist handoffssection. Ak-*specialist never spawns an orchestrator or another specialist. It finishes its part, then returns a note naming the role the rest needs, or a proposed parallel split with the files each part touches. A denied action is not a handoff: the specialist reports it and stops. The rule wins over skill or SOP text that says to spawn.context/k-orchestrator-routing-rules.md: orchestrators route a handoff note to the named role, and check a proposed split for disjoint files before fanning it out.Skills:
skills/delegation-protocol/SKILL.md: the same handoff and split handling, next to the disjoint-files rule.Agents:
k-architect,k-quality-assurance,k-tpm: removed the "Subagent Delegation" sections and "offer to spawn" steps, so the prompts do not contradict the rule.Docs / Other:
docs/user-guide/concepts.md,docs/user-guide/sop-workflows/testing-and-specs.md: say specialists return to the orchestrator instead of spawning.CHANGELOG.md: one[Unreleased]bullet. No VERSION bump.Always-loaded bytes added per agent (same on Kiro CLI v3, Kiro CLI v2 and Claude Code): k-browser, k-developer, k-media-analyzer, k-product-manager, k-researcher +682; k-quality-assurance +545; k-tpm +475; k-architect +467; the three orchestrators +1044. The three specialists come in lower because their old delegation sections were removed.
Type of Change
Testing
npm testpasses (runstests/scripts/**/*.test.js)Not clean: 119 of 136 pass. The same 17 fail on unmodified main (missing
scripts/brand-config/lib/constants.js).make build,make synth,make test-skills-sh,make claude-plugin-check,make kiro-power-check: passmake test-py: 222 passed.make test-rust: cli 1779, mcp 318, shared 76 passed (one known macOS-flaky test passed on an isolated rerun)konductor install --from <tree>into a scratch project on Kiro CLI v3 and Claude Code, rank-architectandkonductorheadless. With this rule in place, Claude Code'sk-architectrefused a spawn request and cited the rule.npm run benchmark)Not run. A separate 72-run A/B was run against the top of the stack instead; see Benchmark below.
make guide-checkreports one failure that also exists on main (configis listed as withdrawn butcli/README.mdno longer declares it). Unrelated to this PR.Benchmark
This change was not benchmarked on its own. The numbers below cover this PR and the stacked config deny PR together, measured at the top of the stack.
Setup: main vs the stacked branch, three cells (a GPT model on Kiro CLI v3, a Claude Sonnet model on Kiro CLI v3, a Claude Sonnet model on Claude Code), 4 cases (small feature with tests, bug fix, design doc plus threat model, implement then document then review), 3 reps each, every run in a fresh isolated project and HOME installed with
--no-telemetry. 72 runs.Spec to spec counts spawns where a specialist spawned another specialist; max depth 6 means an attempt hit Kiro's depth limit.
On the GPT cell, specialist spawning, self-spawns and depth-limit hits went to zero, and spawns, credits and wall time roughly halved, with task success unchanged. The Claude cells did not change on spawns or cost. One regression to watch: Claude on Kiro CLI v3 went from 3/3 to 1/3 on the implement, document and review case, both times on the file-scope check, not on the feature itself.
Follow-up on that case: neither miss involved a specialist spawn or a handoff note. One was a review file written by Kiro's built-in reviewer, which the orchestrator chose on its own, and the other was a README line
k-developeredited during implementation. Five more reps per side, with the branch at this stack's final head: main 2/5, branch 5/5, and main hit the same reviewer-file miss once. Over 8 reps that is main 5/8 and branch 6/8, so the drop reads as run-to-run variance.Caveats: n=3 per case, so only the design plus threat model case shows a clear, non-overlapping difference. One main GPT run timed out, so its counts are lower bounds. The later wording change to the denial sentence in
context/k-core-rules.mdis wording-only and was made after the benchmark.Checklist
cli/change in this PR)Prompt-only change; the stacked PR adds tests for the config deny.
Agents Affected
Notes for Reviewers
deliberation-panel) is overridden by the core rule, not rewritten.