fix(mcp): trim the press plan text back under the always-loaded byte budget

ST
39m ago
+2-5

Fixes the command-tools-loading-meta byte-budget failure introduced on main by #4296.

What broke

feat(mcp)!: preload loop tools, trim schemas, and shorten errors (d78be6c) set an ALWAYS_LOADED_BUDGET_BYTES = 22 KiB guard on the tool JSON that lands in every run's first prompt. The multi-ref plan merge (#4296) grew the press tool description (+407 B of plan-contract text) and the intervalMs field copy (+73 B), which — combined with the same-day back description growth from the maintainer's 19:41Z push — pushed the set from 22060 B (budget headroom 468 B) to 22862 B on CI: the test has been red on main since the #4296 merge push (20:28Z) through 21:11Z, the latest head.

Measured attribution (local, per-sha, clean install)

shaTOTALpressstate
d78be6c8 (budget set)220603373green, 468 B margin
89485f95 (pre-#4296)223963373green, 132 B margin (maintainer back +336 ate most of it)
82819f8f (#4296 merge)22854+8 env3831over by 326 local / 334 CI
this fix224983475green, ~22-30 B margin

The fix

The long plan contract already lives in docs/commands.md (the ADR 0014 section) — the MCP description keeps the semantic minimum: comma-separated ref list, 2-16 keys in order as one command, admitted before the first press. intervalMs returns to its pre-plan wording (the generic repeated-action delay text already covers ref sequences). No behavior change, no budget bump — the maintainer's trim-first approach (d78be6c) is the precedent this follows.

Verification

  • src/mcp/__tests__/command-tools-loading-meta.test.ts: 5/5 pass
  • src/mcp/: 28 files / 232 tests pass
  • packages/command-surface/src/interaction/: 4 files / 26 tests pass
  • packages/command-runtime/src/commands/interaction/ + packages/command-registry/src/: 85 files / 561 tests pass

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.