Repository navigation
refactor(goal-conductor): one copy of each rule, pointers to the shared conductor rules - #37778
Conversation
…ed conductor rules
goal-conductor/SKILL.md (1065 -> 903 lines) drops the copies the audit lists as
D1-D25 that the earlier skill PRs left: where _LEDGER_CONDUCTOR_RULES already holds
a rule, the skill keeps a one-line pointer ("your prompt's ... rule"); duplicate
paragraphs inside the skill keep one copy; history and rationale asides are cut.
No rule is dropped: every safety rule of the audit's section 6 is still in the
skill or in the shared rules.
The root charter and a Bot's conductor.patrol already render every shared rule.
The team lead (opt-in through agent.crew_mode_agent) did not, so its installed
prompt now carries _SHARED_CONDUCTOR_RULES_BLOCK, built from the same rules.
test_mate_conductor_parity.py checks that block and the skill's pointers.
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: I checked every agent that maps the Notes
[DESIGN-REVIEWED] cce1755 Description read[DESCRIPTION-READ] ad91def51316bdeb3cf9489f2e46d467880dda431b4ef717415a571fccc5c9e8 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This change removes copies and adds nothing new. The one addition, the shared-rules block in the team lead's prompt, is what makes the skill's new "your prompt's rule" pointers true for the only agent that lacked those rules. What this change shipsInventory (8 items) — 8 justifiedIntent: let every conductor follow one copy of each goal-conductor rule, so a fix reaches all of them and the skill loaded on every goal gets shorter. This is a FIX (rule drift) done as a deletion.
[FIRST-PRINCIPLES-REVIEWED] cce1755 Description read[DESCRIPTION-READ] b706ac998373a4c309249a603af600193031fa6b421159147c636f59c1373d88 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. None of the five candidates held up when checked against the code. Each one depended on guessing how a model would read the text, or the rule it says was lost is still there: the shared rules in [OPUS-REVIEWED] cce1755 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: A person should decideWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 620 lines, more than the 400 it may approve on its own. This PR replaces the goal-conductor skill's restated shared rules with "your prompt's ... rule" pointers, and gives the team lead the shared rules in its prompt through a new block ( An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On cce1755 the review confirmed that all 25 shared conductor rules render for every agent that maps the goal-conductor skill: the root conductor, the ledger alias, the Bot conductor, and now the team lead through _SHARED_CONDUCTOR_RULES_BLOCK. Each cut from SKILL.md still lives in a prompt rule or in another skill section. Only the kirocrew-team-lead.json digests change. The new team-lead check builds the real installed spec, compares each rule byte for byte, and has a positive control. The audit table in the body made every move checkable.
Optional:
- For the team lead, the plan-reviewer rule now applies only to goals of more than one item (spec_prompts.py:271). The old skill text had no such condition. It would help to say so in the body, or to keep a one-line note for a single-item goal whose output no lane reviews.
- team-lead/SKILL.md:151 and :194 still describe the goal-conductor wave counts and the Patrol incident list, which this PR moved into the prompt. Pointing them at the prompt rules would remove an extra hop.
- The hand-written "The dispatch steps are ..." line in
_SHARED_CONDUCTOR_RULES_BLOCK(spec_prompts.py:682) is another copy of the dispatch steps, and no test pins it. Deleting it, or making step 2 a shared rule, keeps each rule written once.
Problem / Motivation
Goal: Each goal-conductor rule is written once, so a fix to a rule reaches every conductor and the always-loaded skill gets shorter.
goal-conductor/SKILL.mdrestates many rules that_LEDGER_CONDUCTOR_RULESalready renders into the root charter and a Bot'sconductor.patrol, and repeats several of its own rules in two or three sections (audit D1-D25). Two copies drift: a fix lands in one and the conductor reads the other.Why it matters
The skill is read by every conductor on every goal. Copies cost tokens on every load and are where rule drift starts; the owner wants Bots and conductor mode to work from the same rules.
Not a goal
references/(PR5, after this merges).What changed (motivation → approach → change)
Two copies drift → keep one → the shared rules stay the copy; the skill points at them with one line ("your prompt's ... rule"). Rules only the skill holds keep one copy inside the skill. History and rationale asides are cut.
SKILL.md: 1065 → 903 lines (68,271 → 58,202 chars, about −2,518 tokens on every load).
Pointers to shared rules work only for an agent whose prompt holds those rules. The root charter and a Bot's
conductor.patrolalready render all 25. The team lead (opt-in viaagent.crew_mode_agent) did not, so its installed prompt now carries_SHARED_CONDUCTOR_RULES_BLOCK, built from the same_LEDGER_CONDUCTOR_RULES(+10,620 chars ≈ 2,655 tokens, team lead only). No other agent's prompt changes.Why the team lead gets the block: the skill now keeps only pointers to the shared rules, so anyone who still sets
agent.crew_mode_agenttokirocrew-team-leadwould lose those rules without it.Audit items (
skill-audit.mdsections 3 and 7)resource_statussizes the waveresource_wave; queue/arm extras keptgoal_plan; Board aside cutask_questionblocksagentnot_boundsession_ledgerwatch="work-ledger"patrol_watch; pinned "is mandatory" keptpatrol_bounds; Stop conditions keeps the backstopfolderfolder" in step 2own_files/merge_linesnothing_to_dopending_overduereferences/in PR5item_budget,own_files,merge_lines,plan_reviewer,bar_pr_merged,wake_check,routine_incidents,report_before_park,bind_before_seed,claimed_pr,dependent_callsSafety rules (
skill-audit.mdsection 6): moved linesEvery rule S1-S41 was checked by anchor phrase against the new skill and the shared rules (69 anchors, none missing). Already moved earlier: S17, S40 (remote, #37612), S33 (host pressure, not on main). Lines this PR moves:
unknownqueues liketight, no own numberresource_wavebind_before_seedmemory_delegation_deniednot a settingroutine_incidents+ skill line "save a worker's unpushed work"pris never the barclaimed_prplan_reviewer; skill keeps "verdict stays withaccept_eval"decisionis the one instructionBackwards compatibility
Compatible: text only. No config key, schema, API or tool changes.
Reader: src/kiro_crew/agent_materialization/service_agents.py:_install_team_lead_agent -- chat (conductor mode with
agent.crew_mode_agent=kirocrew-team-lead) -- its prompt now holds every shared rule the skill points at; test_a_team_lead_carries_every_shared_rule_in_its_promptReader: src/kiro_crew/agent_parts/spec_prompts.py:_CONDUCTOR_PROMPT_SECTIONS -- chat (conductor mode default) -- renders all shared rules already; test_every_shared_rule_renders_on_both_installed_conductors
Reader: src/kiro_crew/crewmate_prompts.json:conductor.patrol -- crew page (Bot chat) -- renders all shared rules already; test_every_shared_rule_reaches_the_crewmate_conductor
Tests
test/test_mate_conductor_parity.py: the per-rule skill-anchor map is replaced bytest_a_team_lead_carries_every_shared_rule_in_its_prompt(+ positive controltest_the_team_lead_check_sees_a_lost_rule) andtest_goal_conductor_points_at_each_shared_rule_it_no_longer_restates(SKILL_POINTERS). The Bot and root comparisons are unchanged.test/test_team_lead_agent.py: installed prompt includes the shared block; the 40-line charter bound excludes it.test/test_conductor_team_management_rules.py,test/test_goal_conductor_parks_findings.py: the incident list and the five goal parts are read from the shared rule; the skill pointer is asserted.test/test_agent_refactor_spec_bytes.py:kirocrew-team-lead.jsondigests re-pinned.crew-mode.md(290 files): 12649 passed, 900 skipped. After the rebase ontof3dc24c0d1(feat(mate): one worker protocol for both workers #37619): the 12 directly affected files, 525 passed.Proof: not provable -- other: de-duplication of prompt text; the positive-control tests guard the new checks.
Manual verification
N/A — the rendered prompts and the skill pointers are asserted directly.
Related Issues
references/; delete the team-lead agent and skill once no install setsagent.crew_mode_agentto it (that also removes_SHARED_CONDUCTOR_RULES_BLOCK).Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.