config-audit/docs
Kjell Tore Guttormsen d2c45a3bb8 feat(hooks): additionalContext injection advisory + filter-before lever (v5.10 B5) [skip-docs]
HKV now flags hooks that build hookSpecificOutput.additionalContext from
un-grepped command output as an INFO advisory (weight 0, never severity-bearing
— excluded from the self-audit nonInfo set). That field enters Claude's context
every time the hook fires (plain stdout on exit 0 does not), so an unfiltered
payload is a recurring per-turn token cost.

- New lib scanners/lib/hook-additional-context.mjs: pure assessHookAdditionalContext
  (unit-tested, no IO) + IO wrapper assessHookContextForRepo (walk hooks->scripts).
  Heuristic: additionalContext + verbose-prone capture (cat/git log/execSync/…) &&
  no filter (grep/head/jq/.slice). Deliberately low precision -> advisory only.
- HKV: emits the advisory inline on scripts it already reads (after the M5 verbose
  check). Additive, info severity -> frozen v5.0.0 + SC-5 snapshots untouched.
- feature-gap: new filterHookLeverFinding companion, fires ONLY when >=1 chatty
  hook is detected — surfaces the filter-before-Claude-reads lever (CC
  filter-test-output.sh). Silent otherwise (opportunity, not noise).
- docs: README HKV + GAP scanner rows; scanner-internals.md HKV row + full B5
  implementation note. CLAUDE.md kept lean ([skip-docs]); B5 fully documented in
  README + scanner-internals.

Mechanism verified 2026-06-23 against code.claude.com/docs context-window.md
(additionalContext enters context; plain stdout does not). Suite 1239 -> 1254 green.
Version/badges/CHANGELOG wait for the v5.10 release cut.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 20:28:33 +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(hooks): additionalContext injection advisory + filter-before lever (v5.10 B5) [skip-docs] 2026-06-23 20:28:33 +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