Skip to content

refactor(prompts): extract shared card fragments, one discipline authority - #1441

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-10674-prompts-shared-core-discipline-authority
Oct 16, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-10674-prompts-shared-core-discipline-authority

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Eleven director cards duplicated the same report envelope, DONE GATE voicings, out-of-lane prohibitions, and dispatch route table; the cards now compose shared fragments from a new packages/prompt-fragments package, with per-card golden byte pins (packages/prompt-fragments/src/goldens.ts + src/agent/directors/prompt-golden.test.ts) proving every composed card is byte-identical to the previous card. The composition contract ("a fragment change is a fleet-wide prompt change") is now a guarded invariant, not prose.
  • Grok's acknowledged double residual (finish bias AND tool budget) folds into one tool-discipline block — grok leaves 91 chars lighter (−22.75 tokens at chars/4); other model families byte-identical; muse/claude/astra untouched (measured wins elsewhere). DSV4's second identity authority rehomes to prompt-variance rows with a single identity header (residuals byte-identical 1860/1348 chars; the net wire adds header bytes in exchange for one authority — deliberate).
  • Dispatch's ten-lane route table is generated from a shared table pinned to DIRECTOR_REGISTRY (route-drift test); size baselines re-snapshotted to measured family maxima (the old numbers were stale in both directions); the <env> top-N + count cap is pinned by tests.
  • Eval honesty: a reachable live matrix (xai provider, grok-4.6 default) ran new-vs-base — NEW 3/3 pass vs BASE 2/3 (one verify-gated failure) — favorable but too small to certify the ship bar; E1/E3/E5 (halve-the-leaf, discipline-pointer, env-cap experiments) are pending implementation/eval and are documented as pending rather than claimed. One recorded intent question: the "dead surface branches" item was verified but not deleted pending authoritative plan-intent on whether SYSTEM.md-override-only branches may go.

Verification

  • bun run check exit 0 (two independent runs): 9,028 pass / 0 fail across 587 files; prompt-golden 18 tests + structural 22 + route-drift 3 + grok-residual 4; tsc --noEmit clean, dead-export guard clean, build clean.
  • Independent review: byte-identity independently reproduced (11/11 vs HEAD~1 incl. qa-lead; grok merge bullet-audited — 9 surviving bullets kept once, 91 chars exact; DSV4 golden bytes 1860/1348 exact); the reviewer's should-fix (missing committed byte-pin) is exactly what this branch adds.

Fixes CL-10674

@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

CL-10674

@corbits-triage

corbits-triage Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@TheGreatAxios
TheGreatAxios force-pushed the cl-10674-prompts-shared-core-discipline-authority branch from 8533408 to d3b5e10 Compare October 15, 2026 05:00
@TheGreatAxios
TheGreatAxios force-pushed the cl-10669-agentdirector-consolidation-one-definition-one branch from 5c07307 to 9760666 Compare October 16, 2026 04:04
…ority

Eleven director cards duplicated the same report envelope, DONE GATE
voicings, out-of-lane prohibitions, and route table; the cards now
compose shared fragments from packages/prompt-fragments with
byte-identity proofs per card (identities 9, envelope 7, DONE GATE 2 of
4, out-of-lane 8 of 10 — the verified tree counts; the audited prose
list did not reproduce). Grok's double residual folds into one
tool-discipline block (leaves 91 chars lighter, other families
byte-identical); DSV4's second identity authority rehomes to
prompt-variance rows with a single header. Dispatch routes generate
from DIRECTOR_REGISTRY with a drift test; size baselines re-snapshot to
measured maxima; the env-context cap is pinned.

Eval evidence is honest: one matrix at grok-4.6 favours the new cards
(3/3 vs base 2/3 pass) but is too small to certify the ship bar; E1/E3/
E5 remain pending and the result here is documented rather than claimed.
Director modules call composed cards from prompt-fragments and no longer
keep a second copy of the lane prose. Grok leaves again get the separate
finish-bias and tool-budget blocks, and DeepSeek slim bodies keep their
identity header.

Fixes CL-10674
@TheGreatAxios
TheGreatAxios force-pushed the cl-10674-prompts-shared-core-discipline-authority branch from e875586 to d946cc3 Compare October 16, 2026 04:12
@TheGreatAxios
TheGreatAxios changed the base branch from cl-10669-agentdirector-consolidation-one-definition-one to main October 16, 2026 04:13
@TheGreatAxios
TheGreatAxios merged commit e0e31cd into main Oct 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant