config-audit/docs
Kjell Tore Guttormsen 8f7e196046 feat(tokens): MCP tool-schema deferral check + CLI-over-MCP lever (v5.10 B4)
By default Claude Code defers MCP tool schemas (names-only, ~120 tok; full
schemas on demand via tool search). CA-TOK-006 detects config-file signals that
force the FULL schemas into the always-loaded prefix every turn:
  - settings.json env.ENABLE_TOOL_SEARCH="false"          (high)
  - "ToolSearch" in permissions.deny                       (high)
  - configured model is a Haiku model                      (medium)
  - per-server .mcp.json alwaysLoad:true (CC v2.1.121+)    (high)
auto[:N] is threshold mode (info, not a trigger).

New engine lib/mcp-deferral.mjs: pure assessMcpDeferral({settings,mcpServers})
(unit-tested, no IO) + thin IO wrapper assessMcpDeferralForRepo shared by TOK and
GAP. Severity scales with aggregate forced-upfront tokens (medium-confidence
reasons cap at medium). feature-gap cliOverMcpLeverFinding fires only as a
companion to CA-TOK-006 (prefer gh/aws/gcloud over MCP for common ops).

Honest scoping (Verifiseringsplikt): triggers on config files ONLY — never
process.env shell vars. Vertex / custom ANTHROPIC_BASE_URL / runtime /model
switch are launch state (would flap snapshots machine-dependently), so they are
DISCLOSED in every finding, not triggered. Tool-level anthropic/alwaysLoad and
claude.ai connectors likewise disclosed. Mechanism verified 2026-06-23 against
code.claude.com/docs (context-window.md, mcp.md#configure-tool-search +
#exempt-a-server-from-deferral, costs.md); the prefix-cache invalidation claim
was NOT-CONFIRMED in docs and is not asserted.

alwaysLoad added to CA-MCP VALID_SERVER_FIELDS (no longer flagged as unknown).
active-config-reader surfaces per-server alwaysLoad. Byte-stable: CA-TOK-006
fires only on new conditions; frozen v5.0.0 + SC-5 snapshots untouched.
Tests 1215 -> 1239 (engine 16, integration 5, lever 2, mcp-field guard 1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 19:59:14 +02:00
..
cc-2.1.x-changelog-delta.md docs(knowledge): refresh corpus to Opus 4.8 era (CC 2.1.114->181 Batch 3) 2026-06-18 13:35:00 +02:00
cc-2.1.x-fase4-items-2-3-plan.md feat(skill-listing): add CA-SKL-002 aggregate listing-budget check 2026-06-18 18:06:17 +02:00
cc-2.1.x-gap-matrix.md docs(plan): v5.4.0 Session A — reconciliation + ship-list GO (Option A) [skip-docs] 2026-06-19 21:24:58 +02:00
cc-2.1.x-gap-review-plan.md docs(config-audit): CC 2.1.114-181 coverage gap analysis (Fase 0-2) 2026-06-18 11:31:48 +02:00
devils-advocate-gap-verification-plan.md docs(plan): devil's advocate brief — adversarial gap-review verification 2026-06-18 18:28:02 +02:00
humanizer.md feat(ost): v5.6 C — output-style scanner (CA-OST, count 13→14) 2026-06-20 21:02:44 +02:00
scanner-internals.md feat(tokens): MCP tool-schema deferral check + CLI-over-MCP lever (v5.10 B4) 2026-06-23 19:59:14 +02:00
v5-brief.md docs(config-audit): v5.0.0 brief + implementation plan 2026-05-01 06:10:44 +02:00
v5-implementation-log.md docs(config-audit): v5 implementation log — Session 5 release result 2026-05-01 09:48:40 +02:00
v5-plan.md docs(config-audit): v5.0.0 brief + implementation plan 2026-05-01 06:10:44 +02:00
v5.1.0-test-audit.md chore(humanizer): pre-flight snapshots + test audit for v5.1.0 2026-05-01 16:47:13 +02:00
v5.2.0-release-plan.md release: v5.2.0 — CC 2.1.114→181 compat + skill-listing budget (SKL) 2026-06-18 20:37:45 +02:00
v5.3.0-release-plan.md docs(plan): v5.3.0 Session A — scope decision (ship-list empty) + gap-matrix reconciliation [skip-docs] 2026-06-19 20:30:04 +02:00
v5.4.0-release-plan.md docs(plan): mark v5.4.0 Feature 3 DONE — Session B complete [skip-docs] 2026-06-19 22:15:26 +02:00
v5.5-steering-model-plan.md chore(state): v5.5.0 A+E landed on main; Foundation deferred to v5.6 2026-06-20 11:21:30 +02:00
v5.7-optimization-lens-plan.md docs(state): v5.7 Fase 1 designet — visjons-diskusjon 2026-06-20 22:02:01 +02:00