config-audit/tests/fixtures/subtraction/shapes-claude-md.md
Kjell Tore Guttormsen e9921d3c9d feat(optimize): add --subtract, the subtraction axis, behind a deterministic floor
Every command so far asked an addition question — what to add, what to move,
what it costs. Nothing asked what is no longer earning its always-loaded rent.
This adds that axis as a fourth lensCheck on the existing hybrid motor rather
than a new scanner or a 22nd command: the measured payoff (~18% of one file)
justifies a mode, not machinery.

It is the only lens that proposes REMOVING config, so it carries a guarantee
the others don't need: a load-bearing block is never a candidate. Precision is
asymmetric — a missed dead line costs a few tokens per turn, a deleted one
costs a wrong remote or a broken script — so the floor is decided in code
(lib/floor-exclusion.mjs) before the opus judge sees anything, never in prose.

Granularity is the leaf block, with two structural exceptions: a paragraph
ending in ':' merges with the list it introduces, and an ordered list is a
contract whose steps inherit floor from any sibling. Unordered lists
deliberately do not inherit — a load-bearing bullet and a disposable one
routinely share a list, and container-reasoning is the error the hand-built
ground truth exists to catch.

Verified against that ground truth (built before any classifier existed), with
the comparison machine-checked rather than read by eye: zero load-bearing
blocks proposed, 11/18 deletable groups surfaced, ~756 tok ~ 18% of a ~4300
token file — inside the pre-registered band. The first run found five floor
violations the synthesized fixture missed; each got a structural rule and a
fixture shape so it cannot regress.

Three real bugs the dogfood run exposed, all now covered:
- JS \b is ASCII-only, so /\bunngå\b/ never matches — every Norwegian keyword
  ending in æ/ø/å was silently dead.
- A bare word/word is not a path; "pros/cons" vetoed the largest deletable
  block until PATH_RE was tightened to rooted paths and globs.
- "Mid-sentence" must key on a preceding lowercase letter; the loose version
  read **bold labels:** and quoted openers as entities, costing 4 of 11 groups.

BP-SUB-001 is grounded entirely in the Anthropic steering blog already cited by
BP-MECH-001..004 and asserts nothing from the talk that motivated the feature —
no "80%", no ablation figure.

Suite 1365 -> 1382/0. Frozen v5.0.0 snapshots untouched; plain optimize output
byte-identical on identical input (--subtract adds keys only when passed).
knowledge-refresh-cli's reference date moved to 2026-08-01: its premise that
every seed entry was verified 2026-06-20 expired when BP-SUB-001 got a genuine
verification date, and backdating the entry to fit the test would have been a
lie about when its source was checked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RW2haJXbxZpKivKHseSXNh
2026-07-31 16:24:51 +02:00

3.2 KiB

Subtraction shapes — synthesized fixture

This fixture reproduces the discriminating shapes from the hand-built subtraction fasit (økt #40) without reproducing any of the operator's private config text. Every block below exists to make one classification call hard in the same way a real block was hard.

Both languages appear on purpose: the config this lens was designed against is Norwegian prose with English identifiers, and a detector that only speaks English would score well here and fail in the field.

Preferences

  • Language: Norwegian for dialogue, English for code and documentation.
  • Tone: direct and technical, minimal ceremony.
  • Format: be concrete and action-oriented, avoid unnecessary text.
  • Never say "as an AI I cannot"; skip apologies and over-explanation.

Kodepreferanser

  • TypeScript > JavaScript
  • Readability > cleverness
  • Conventional Commits: type(scope): description

Oppstart

  1. Run pwd to see where you are.
  2. Read the nearest STATE.md and confirm the active task.
  3. Sjekk git status mot det STATE.md hevder.
  4. Summarize before you do anything.

Arbeidsregler

  • Commit often with descriptive messages.
  • Test incrementally, and ask when blocked.
  • Tenk før du koder — uttal antakelser eksplisitt og spør ved tvetydighet.
  • Aldri gjett på rotårsak; undersøk først.

Defensive shell-scripting

  • Alltid siter variabel-ekspansjoner ("$var") — en usitert ekspansjon brøt en zsh-loop.
  • Hold testkode ASCII-ren; et multibyte-tegn krasjet bash 3.2 under set -u.

Anti-patterns

  • Do not one-shot large features.
  • Never declare "done" without running the tests.
  • Aldri jobb i et annet repo enn det økten står i. Hvert repo eier sin egen versjonsplan og sin egen tilstand. Skriver du der, tar du beslutninger på deres vegne uten deres kontekst — coord-send er mekanismen, send arbeidet dit i stedet.
  • Do not refactor as part of a bugfix without approval.

Git

  • Aldri GitHub. Kun Forgejo (git.example-forge.test). Aldri gh CLI.
  • Etter git commit: push til Forgejo umiddelbart.

Miljø

  • System bash er 3.2: ingen declare -A, ingen readarray.
  • Alle hook-scripts må være 3.2-kompatible.

Modellvalg

Default for alt arbeid er Opus 4.8 med xhigh effort. Ingen annen modell skal brukes. Sett model: "opus" på hver spawn. Haiku: aldri.

Secrets

  • ALDRI commit secrets. Bruk .env/.template-mønsteret.

The Iron Law: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Arbeidsflyt

Default for alle oppgaver: forstå problemet, vurder alternativer, presenter dem, og vent på bekreftelse før du implementerer. Ved usikkerhet om en oppgave faller i unntakene: den gjør det ikke.

Viktig: /harness continue og andre skills styrer sin egen workflow.

Kodeblokk

# Never run this in production, and always check every time first.
echo "avoid unnecessary output"

Kontinuitet

Konteksten mellom sesjoner hviler på tre lag med hver sin ene jobb:

  • STATE.md — current state-of-play der du jobber. Overskrives alltid ved sesjonsslutt.
  • MEMORY.md — varige fakta om bruker. Hold den under 200 linjer.

Verktøy

  • Deleger arbeid til subagenter, og bruk Explore for søk.
  • Skriv alltid kortest mulig kode.