config-audit/tests/lib
Kjell Tore Guttormsen 2975b0563f fix(acr): honest absence-state copy for two GAP enhancement findings (M-BUG-15)
The t2_3 ("No path-scoped rules") and t3_6 ("No subagent isolation")
feature-gap checks iterate a collection (rule files / agent files) and return
false for an EMPTY one — so they fire even when the user has zero rules / zero
subagents, the same state their presence-gap siblings flag. But the humanized
titles presupposed the feature already exists:
  - "Your rules all load on every conversation" (with zero rules)
  - "Your subagents share Claude's main work folder" (with zero subagents)
The second directly contradicts GAP-005 "You haven't set up any specialized
helper agents yet" in the same report — a user cannot simultaneously have no
subagents and have subagents that lack isolation. Found by dogfooding the
analyze pipeline against linkedin-posts (premise-verifying each finding before
trusting the analyzer-agent's report).

Decided fix = align the two titles with the house "You haven't set up X yet"
absence framing (state-neutral: honest for both the zero-state and the
has-but-unconfigured state), NOT a base-feature presence gate in the scanner —
that would change the frozen v5.0.0 marketplace-medium baseline (zero
rules/agents, freezes these gaps firing) and break the RAW byte contract.
Mirrors M-BUG-14's humanizer-layer, copy-only approach.

- humanizer-data.mjs: title "Your rules all load on every conversation" ->
  "You haven't set up path-scoped rules yet"; title "Your subagents share
  Claude's main work folder" -> "You haven't set up subagent isolation yet".
  description + recommendation unchanged. t3_5/t3_7 ("Your skills don't ...")
  left as-is: their possessive is correct in the common case where skills
  exist; the zero-skills edge is latent, not manifest here.
- RED-first unit test pins both titles existence-neutral (forbids "your rules
  all load" / "your subagents"; feature still named).

Frozen v5.0.0 snapshots untouched (RAW bypasses humanizer); default-output
snapshot regenerated (2 titles only, no collateral). Verified on linkedin-posts:
GAP-004/005/011 now all consistently absence-framed. Suite 1356->1357/0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01683eAqVecv9VZfQzL8CQ9h
2026-06-30 12:57:40 +02:00
..
active-config-reader.test.mjs fix(acr): token estimator discounts block-level HTML comments (M-BUG-6) 2026-06-26 14:29:24 +02:00
active-model.test.mjs feat(skl,cml): --context-window auto model→window probe (v5.12 B8b) [skip-docs] 2026-06-23 22:29:12 +02:00
baseline.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
best-practices-register.test.mjs feat(knowledge): best-practices register foundation — v5.7 Fase 1 Chunk 1 2026-06-20 22:37:47 +02:00
campaign-export.test.mjs feat(campaign): plan export + execution-by-reuse (v5.7 Fase 2 Block 4c) 2026-06-23 10:08:04 +02:00
campaign-ledger.test.mjs feat(campaign): machine-wide always-loaded token roll-up — pure layer (v5.9 B2a) 2026-06-23 16:57:31 +02:00
context-window.test.mjs feat(skl,cml): --context-window auto model→window probe (v5.12 B8b) [skip-docs] 2026-06-23 22:29:12 +02:00
diff-engine.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
file-discovery.test.mjs fix(acr): file-discovery skips backups/ dirs — never live config (M-BUG-8) 2026-06-26 12:23:43 +02:00
forbidden-words-data.test.mjs feat(humanizer): forbidden-words data file (tier1/2/3) 2026-05-01 16:53:37 +02:00
humanizer-data.test.mjs fix(acr): honest absence-state copy for two GAP enhancement findings (M-BUG-15) 2026-06-30 12:57:40 +02:00
humanizer.test.mjs feat(tokens): stale plugin-cache disk-cleanup finding, honestly labelled Dead config (v5.9 B3b) 2026-06-23 18:17:55 +02:00
knowledge-refresh.test.mjs feat(knowledge): knowledge-refresh — living register, deterministic stale core + web poll (v5.7 Chunk 3) 2026-06-21 19:22:57 +02:00
lens-prefilter.test.mjs feat(opt): optimization lens Chunk 2b — opus prose-judgment analyzer + /config-audit optimize 2026-06-21 14:01:18 +02:00
output.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
permission-rules.test.mjs feat(dis): flag forbidden-param permission rules CC silently ignores 2026-06-19 14:04:25 +02:00
report-generator.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
scoring-humanizer.test.mjs feat(humanizer): wire humanizer into posture and scoring scorecard 2026-05-01 17:38:03 +02:00
scoring.test.mjs feat(config-audit): severity-weighted scoreByArea (v5 F3) 2026-05-01 06:20:08 +02:00
severity.test.mjs feat(config-audit): export WEIGHTS from severity.mjs (v5 F3 prep) 2026-05-01 06:16:28 +02:00
skill-listing-budget.test.mjs feat(skl,cml): --context-window calibration, advisory when unknown (v5.11 B8) [skip-docs] 2026-06-23 21:44:52 +02:00
string-utils.test.mjs fix(acr): SET typo-gates unknown-key false positives (M-BUG-10) 2026-06-26 15:15:14 +02:00
suppression.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
yaml-parser.test.mjs feat(acr,yaml): v5.6 Foundation — load-pattern enumeration + block-seq parser 2026-06-20 16:57:52 +02:00