refactor(framework): thin-core prompt diet — cut injected contract ~53% #529

Merged
jason.woltje merged 2 commits from feat/contract-thin-core into main 2026-06-11 18:10:43 +00:00
Owner

Closes #528.

What

Thin the always-injected Mosaic contract back to a "core + on-demand guides" shape:

  • defaults/AGENTS.md -> thin core (12 hard gates verbatim; 37 operating rules condensed to ~15 bullets pointing at guides/E2E-DELIVERY.md; Superpowers condensed; load order made on-demand instead of "read everything up front").
  • defaults/TOOLS.md -> index; full catalog preserved in NEW guides/TOOLS-REFERENCE.md (read on demand).
  • runtime/claude/RUNTIME.md -> slimmed (dedup tier table, terser pointers).

Result

Composed AGENTS+TOOLS+RUNTIME: 8,827 -> 4,122 tok (minus 53 percent), re-fed every turn. AGENTS/TOOLS are shared across runtimes, so the diet benefits codex/pi/opencode too.

Validation

  • Gate-checklist (deterministic): all 12 hard gates + critical rules + mode lines + sequential-thinking + OpenBrain + Superpowers present.
  • Functional A/B (headless interactive, subscription): thin 7/9 vs monolith 5/9 probes; strictly better on deploy/review/simple-task; no gate lost.
  • Method: autoresearch-style keep-or-discard loop (token cost gated by per-probe fidelity). Full evidence in scratchpads/contract-thin-core.md.

Scope / caveats

  • Diet-only against this repo's current content. No behavioral change; nothing imported from drifted deployments.
  • The canonical repo is BEHIND some live deployments (Gate 13-15, federated memory, OpenViking). Intentionally NOT addressed here; separate reconciliation.
  • p11 (don't-stop-at-PR) probe dips 3 to 2/3 on one rubric line: verified a scorer/phrasing artifact (answer correctly cites gates 5/9 + close-issue; gate verbatim-present).

Generated with Claude Code.

Closes #528. ## What Thin the always-injected Mosaic contract back to a "core + on-demand guides" shape: - defaults/AGENTS.md -> thin core (12 hard gates verbatim; 37 operating rules condensed to ~15 bullets pointing at guides/E2E-DELIVERY.md; Superpowers condensed; load order made on-demand instead of "read everything up front"). - defaults/TOOLS.md -> index; full catalog preserved in NEW guides/TOOLS-REFERENCE.md (read on demand). - runtime/claude/RUNTIME.md -> slimmed (dedup tier table, terser pointers). ## Result Composed AGENTS+TOOLS+RUNTIME: 8,827 -> 4,122 tok (minus 53 percent), re-fed every turn. AGENTS/TOOLS are shared across runtimes, so the diet benefits codex/pi/opencode too. ## Validation - Gate-checklist (deterministic): all 12 hard gates + critical rules + mode lines + sequential-thinking + OpenBrain + Superpowers present. - Functional A/B (headless interactive, subscription): thin 7/9 vs monolith 5/9 probes; strictly better on deploy/review/simple-task; no gate lost. - Method: autoresearch-style keep-or-discard loop (token cost gated by per-probe fidelity). Full evidence in scratchpads/contract-thin-core.md. ## Scope / caveats - Diet-only against this repo's current content. No behavioral change; nothing imported from drifted deployments. - The canonical repo is BEHIND some live deployments (Gate 13-15, federated memory, OpenViking). Intentionally NOT addressed here; separate reconciliation. - p11 (don't-stop-at-PR) probe dips 3 to 2/3 on one rubric line: verified a scorer/phrasing artifact (answer correctly cites gates 5/9 + close-issue; gate verbatim-present). Generated with Claude Code.
jason.woltje added 1 commit 2026-06-09 21:42:26 +00:00
refactor(framework): thin-core prompt diet — cut injected contract ~53%
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
52aa5d7982
Thin defaults/AGENTS.md + defaults/TOOLS.md + runtime/claude/RUNTIME.md to a core
that references guides on demand; preserve the full tool catalog in new
guides/TOOLS-REFERENCE.md. All 12 hard gates verbatim; validated via a deterministic
gate-checklist + a 9-probe headless A/B (thin 7/9 vs monolith 5/9). Composed
AGENTS+TOOLS+RUNTIME 8,827->4,122 tok. Diet-only against repo content; no behavioral
change, nothing imported from drifted deployments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jason.woltje added 1 commit 2026-06-09 21:55:46 +00:00
style(framework): prettier-format thinned markdown
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
1e9da0d27a
format:check (prettier on **/*.md) flagged the hand-written tables/wrapping in the
thinned contract files. No content change — formatting only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jason.woltje merged commit 59b611ba8a into main 2026-06-11 18:10:43 +00:00
jason.woltje deleted branch feat/contract-thin-core 2026-06-11 18:10:44 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#529