Repository navigation
Conversation
added 3 commits
October 29, 2026 23:12
…reloads Claude Code injects the full SKILL.md of every name in an agent's clientConfig.claudeCli.skills into each subagent it spawns, on every turn. Each agent now preloads only what it needs before its first turn (constraints, plus verification or the agent's primary checker where the prompt mandates it); every other declared skill stays loadable through the Skill tool. dependencies.skills.skillNames is unchanged everywhere. - synth warns (konductor: warning:) when an agent's preload passes 32,768 B or Claude Code's 32-name cap, naming the dropped names. - synth -v prints a "claude preload:" line per agent; --json carries a claude_preload array. Both use the same measuring function as the lint. - The Claude agent file now ends with a "Skills you can load" block listing declared skills that are not preloaded. - k-product-manager, k-tpm and k-quality-assurance prompts no longer say their skills load automatically. - delegation-protocol asks for skills by exact skills/<name> identifier. - User guide and both HTML bundles: Skills is the declared count, with a separate preloaded count; check-guide-facts.py asserts both. - New e2e test synth_claude_preload_e2e.rs fails if any agent in this repository exceeds the budget or cap. Preload bytes per spawned subagent (synth -v, before = origin/main 7428dd9 synthed with this binary, after = this commit): agent before B names after B names k-architect 556,663 38 7,816 2 k-browser 25,899 4 25,899 4 k-developer 247,874 27 15,119 4 k-media-analyzer 2,708 1 2,708 1 k-product-manager 174,132 16 2,708 1 k-quality-assurance 260,121 12 7,816 2 k-researcher 55,255 8 6,340 2 k-tpm 112,859 14 2,708 1 konductor 141,380 13 13,063 2 konductor-cmux-orchestrator 114,097 10 2,708 1 konductor-mux-orchestrator 116,410 10 2,708 1 total 1,807,398 153 89,593 21 Verification run on this commit: - make build && make synth: pass; synth prints no preload warning (main's tree printed 9). - cargo test (cli/konductor-rs): 1800 passed, 0 failed. - make -C cli lint (clippy -D warnings, fmt --check): pass. - make test-skills-sh: pass. - make claude-plugin-check: pass. - make guide-check: 1 failure, the same one origin/main has today (`config` listed in WITHDRAWN_COMMANDS); no new failures. - dist/kiro-cli-v2 and dist/kiro-v3 differ from main's synth only in the k-product-manager, k-tpm and k-quality-assurance agent files and the delegation-protocol skill.
…or specs The Claude Code orchestrator follows its spec and never loads delegation-protocol, so the sentence asking for skills by exact skills/<name> identifier did not reach it there. It now sits on rule 4 of konductor, konductor-mux-orchestrator and konductor-cmux-orchestrator, and delegation-protocol's REQUIRED SKILLS line is back to main's text. Verification run on this commit: - make build && make synth: pass, no preload warning. - cd cli && make test: pass (cargo test 1800 passed, 0 failed; __dump_schema smoke check passed). - make -C cli lint: pass. - make test-skills-sh: 85 passed, 0 failed. - make test-py: 223 passed. - make claude-plugin-check: pass. - npm test: 119 of 136 pass; the 17 failures are identical on main (missing generated scripts/brand-config/lib/constants.js). - make guide-check: 1 failure, the same one main has (`config` in WITHDRAWN_COMMANDS).
…t/claude-preload-trim # Conflicts: # cli/konductor-rs/src/cli/synth/parse_canonical.rs
This was referenced Oct 31, 2026
Contributor
Author
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
Claude Code injects the full
SKILL.mdof every name in an agent'sclientConfig.claudeCli.skillsinto each subagent it spawns, and that text is re-sent on every turn of the subagent. On
mainthe agents together preloaded 1,807,398 B across 153 names, and k-architect declared 38 names,
past Claude Code's 32-name cap. This PR cuts the preload to what each agent needs before its first
turn and leaves every other declared skill loadable through the Skill tool.
Base:
feat/agent-skill-index(#120). This PR stacks on it;feat/agent-skill-indexis mergedinto this branch as a merge commit. #120's skills index is Kiro-only (
## Your skills, in all 11Kiro agent files of each Kiro output) and this PR's names block is Claude-only (
## Skills you can load, in all 11 Claude agent files), so no agent file carries both.Agents:
k-architect,k-developer,k-product-manager,k-quality-assurance,k-researcher,k-tpm,konductor,konductor-mux-orchestrator,konductor-cmux-orchestrator:claudeCli.skillstrimmed to
constraintsplusverificationor the agent's primary checker where the promptmandates it.
dependencies.skills.skillNamesis unchanged everywhere, so nothing becomesunavailable.
k-product-manager,k-tpm,k-quality-assurance: prompts no longer say their skills loadautomatically.
konductor,konductor-mux-orchestrator,konductor-cmux-orchestrator: rule 4 now asks foreach skill in a brief's REQUIRED SKILLS by its exact
skills/<name>identifier, so thesubagent can load the right one on demand. The rule lives in the spec because the Claude Code
orchestrator never loads
delegation-protocol; that skill is unchanged frommain.CLI:
konductor synthwarns (konductor: warning:) when an agent's preload passes 32,768 B or the32-name cap, and names the dropped skills.
main's tree prints 9 such warnings; this branchprints none.
synth -vprints aclaude preload:line per agent and--jsoncarries aclaude_preloadarray. Both use the same measuring function as the warning.
skills that are not preloaded.
cli/konductor-rs/tests/synth_claude_preload_e2e.rsfails if any agent in therepository exceeds the budget or the cap.
cli/README.mddocuments the warning and the new-v/--jsonoutput.Docs:
count.
check-guide-facts.pyasserts both.Preload per spawned subagent
Rendered bytes from
synth -v, before =mainat7428dd9synthed with this branch's binary,after = this branch after merging
feat/agent-skill-index. Synthingfeat/agent-skill-indexitself gives the same before figures within 78 B (1,807,320 B in total; k-architect 556,639 B,
k-developer 247,820 B), and the after figures are unchanged by the merge.
k-architect's 38 names exceeded the 32-name cap, so on
mainClaude Code silently dropped six,verificationamong them. Its effective preload was 511,397 B;verificationnow reaches it.Benchmark
Claude Code 2.1.312,
claude-sonnet-5-5,claude --agent konductor -p <prompt>. Four short cases(c1 feature + tests, c2 one-line fix, c3 design + threat model, c4 implement + docs + review),
3 reps each, 3 arms:
main(7428dd9),trim(this branch), anddelete(this branch with anempty
claudeCli.skillson everyk-*spec, not committed). 36 of 36 runs intact.Trim vs main per case (means; min-max ranges of the two arms are disjoint in every case for both
cost and tokens):
First-request tokens of each spawned subagent, which carry the preload:
The drop matches the bytes removed at about 2.8 bytes per token.
Right skill reached the working agent (9 scored runs per arm; c2 has no expected skill):
On trim, k-architect loaded
threat-modelingon demand in 3/3 c3 runs. The delete arm left theworking agent without the expected checker in 4 of 9 runs (c1 0/3), so an empty preload is not
proposed; this PR keeps the small preload.
Resume: a k-developer subagent resumed twice with
SendMessagereceived the preloaded skillbodies only on the first segment. Each resume added about 200 input tokens (23,301, 23,500,
23,712 on the first request of each segment), not the preload again. No delegation change is
needed for reviewer resume.
Outcome rubric: main 12/12, trim 9/12, delete 12/12. Each trim miss is a single rubric item
on an otherwise passing run (score 0.89 or higher): two c3 designs state concrete rate limits in
forms the regex does not match (a table, and
1 token/s), and one c4 reply reports the appliedreview fix without the words the pattern expects. None of the misses coincides with a skill
failing to load.
Type of Change
cli/) change, Rust or PythonTesting
npm testpasses (runstests/scripts/**/*.test.js): 119 of 136 pass. The 17 failures areidentical on
main(7428dd9); they need the generatedscripts/brand-config/lib/constants.js, which a fresh checkout does not have.cli/changed:cd cli && make testpasses on the merged head:cargo test1832passed, 0 failed, and the
__dump_schemasmoke check passes. Also on the merged head:make build && make synthpass with nokonductor: warning:line,make -C cli lintpasses,
make test-skills-sh85 passed, 0 failed,make test-py223 passed,make claude-plugin-checkpassescli/README.md'ssynth/installsteps, then ran
claude --agent konductoracross the 36 benchmark runs aboveCode matrix above, 3 reps per case) rather than
npm run benchmarkrule); formats without comment syntax (e.g. JSON) are exempt
Checklist
cli/changes,cd cli && make lintpasses (cargo clippy -- -D warnings+cargo fmt --check)Agents Affected
k-browser and k-media-analyzer keep their preload unchanged.
Notes for Reviewers
the three specialist specs and the rule 4 sentence on the three orchestrator specs.
delegation-protocolchange; the second commit moves thatsentence into the orchestrator specs, so the skill's net diff against
mainis empty.1695160), before the relocation commit and beforemerging
feat/agent-skill-index. Neither changes the Claude preload (the after bytes areidentical on the merged head) and feat(synth): add each Kiro agent's skills and a use rule to its prompt #120 changes only Kiro output, so the figures still apply;
the merged head was not re-benched.
parse_canonical.rs, where both branches added a synth warningloop at the same spot. Both loops are kept.
ranges are disjoint from
mainin every case. On c1 one trim rep spawned 5 subagents (tworeview rounds) and used 1,408,963 input tokens: below
main's c1 minimum (1,612,369) butless than a third under it. The other two reps cleared a third.
change takes off konductor's own cost on Claude Code.
make guide-checkhas 1 failure, the same onemainhas today (configlisted inWITHDRAWN_COMMANDS); no new failures.[Unreleased].