Thin-core prompt diet: cut always-injected contract ~53% (AGENTS/TOOLS/RUNTIME) #528

Closed
opened 2026-06-09 21:38:40 +00:00 by jason.woltje · 0 comments
Owner

Problem

The mosaic launcher inlines the full defaults/AGENTS.md + defaults/TOOLS.md + runtime/claude/RUNTIME.md into every session's system prompt (~8.8k tokens), re-fed every turn, regardless of agent role. The intended "thin core that references guides" drifted into a monolith, and the load order mandated reading guides up front.

Approach (diet-only)

Re-apply a validated thinning design to the repo's CURRENT content — no behavioral change, nothing imported from drifted deployments:

  • Thin AGENTS.md to a core: all 12 hard gates verbatim, condensed operating rules + Superpowers, conditional guide-loading index, on-demand load order.
  • Replace the full TOOLS.md catalog with an index; preserve the catalog in new guides/TOOLS-REFERENCE.md (read on demand).
  • Slim runtime/claude/RUNTIME.md (dedup the tier table, terser pointers).

Validation

  • Deterministic gate-checklist: ALL 12 hard gates + critical rules + mode lines + sequential-thinking + OpenBrain + Superpowers present.
  • Functional A/B (headless interactive, subscription) on real framework content: thin 7/9 vs monolith 5/9 probes; strictly better on deploy / review / simple-task probes.
  • Method: autoresearch-style keep-or-discard loop (token cost gated by per-probe fidelity).

Result

Composed AGENTS+TOOLS+RUNTIME: 8,827 → 4,122 tok (−53%), every gate intact. Benefits all runtimes (AGENTS/TOOLS are shared across claude/codex/pi/opencode).

Notes

  • The p11 (don't-stop-at-PR) probe dips 3→2/3 on one rubric line: verified a scorer/phrasing artifact — the model's answer correctly cites gates 5/9 and close-issue; gate content is verbatim-present.
  • The canonical repo is behind some live deployments (Gate 13-15, federated memory, OpenViking) — intentionally NOT addressed here; separate reconciliation.
## Problem The `mosaic` launcher inlines the full `defaults/AGENTS.md` + `defaults/TOOLS.md` + `runtime/claude/RUNTIME.md` into every session's system prompt (~8.8k tokens), re-fed every turn, regardless of agent role. The intended "thin core that references guides" drifted into a monolith, and the load order mandated reading guides up front. ## Approach (diet-only) Re-apply a validated thinning design to the repo's CURRENT content — no behavioral change, nothing imported from drifted deployments: - Thin `AGENTS.md` to a core: all 12 hard gates verbatim, condensed operating rules + Superpowers, conditional guide-loading index, on-demand load order. - Replace the full `TOOLS.md` catalog with an index; preserve the catalog in new `guides/TOOLS-REFERENCE.md` (read on demand). - Slim `runtime/claude/RUNTIME.md` (dedup the tier table, terser pointers). ## Validation - Deterministic gate-checklist: ALL 12 hard gates + critical rules + mode lines + sequential-thinking + OpenBrain + Superpowers present. - Functional A/B (headless interactive, subscription) on real framework content: thin **7/9** vs monolith **5/9** probes; strictly better on deploy / review / simple-task probes. - Method: autoresearch-style keep-or-discard loop (token cost gated by per-probe fidelity). ## Result Composed AGENTS+TOOLS+RUNTIME: **8,827 → 4,122 tok (−53%)**, every gate intact. Benefits all runtimes (AGENTS/TOOLS are shared across claude/codex/pi/opencode). ## Notes - The p11 (don't-stop-at-PR) probe dips 3→2/3 on one rubric line: verified a scorer/phrasing artifact — the model's answer correctly cites gates 5/9 and close-issue; gate content is verbatim-present. - The canonical repo is behind some live deployments (Gate 13-15, federated memory, OpenViking) — intentionally NOT addressed here; separate reconciliation.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#528