Commit graph

10 commits

Author SHA1 Message Date
51735fa7a8 feat(consume): instantiate the K2 consumption skill, and document the pre-pass
Step 12's README section is brought forward to here because the docs gate is
right: a feat commit that ships a new command needs the command documented.
CLAUDE.md's Commands section gains the pre-pass beside `okf build`. Nothing
else moves.

Contract check against a real payload from the 629-concept bundle:

  $ .venv/bin/python tools/okf_consume.py <K2-bundle> \
      --question 'Hvordan skal prisene fylles ut?' --out /tmp/k2.json
  $ .venv/bin/python tools/okf_contract_check.py \
      --skill skills/okf-consume/SKILL.md --payload /tmp/k2.json
  conformant: 14 rules over 8 excerpts and 621 withheld entries, 0 findings
  exit=0

And the two negative controls, because a green checker proves little on its
own -- measured, it returns 0 findings on an empty payload paired with the
unfilled template:

  broken denominator identity -> NOT conformant, 2 findings, exit=1
  missing payload file        -> exit=2

Placeholder scan, known-positive first: the DOTALL scan reports 20 occurrences
on the template and 0 on this copy. The shipped example payload is generated
from the in-repo golden bundle, not from the corpus, and a test regenerates it
byte for byte. No K2 concept path or document title reaches any tracked file
here, checked with a pattern shown able to find against the bundle's own index.

Suite run after git add: 1224 passed, mypy --strict clean on 26 files,
ruff clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:30:32 +02:00
5d066f1799 feat(consume): a CLI with three exit codes and an asserted ref
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:22:15 +02:00
42ab9c1d1a feat(consume): assemble a payload that measures its own emitted bytes
Two corrections the plan did not carry, both found by running the instrument:

- A question matching nothing still returned the top eight by tie-break -- a
  confident guess wearing a denominator. The closed rule set gains
  no_lexical_match, so the known-negative returns a measured empty set with
  every considered concept named in withheld.
- The stage-one document prior summed overlap across a document's units, so it
  measured document SIZE. Measured on K2 for the price question: the
  competition document sums to 6.0 over 79 concepts (0.076 each), the price
  document to 2.0 over 1. The prior is now a density; the price-form gold moves
  from outside the top eight to rank 1. Found with that answer visible, which
  the measurement document states beside the number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:20:50 +02:00
7eb87a04cb feat(consume): cut by exact knapsack with a closing partition
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:16:05 +02:00
f4b1f4ef0b feat(consume): fuse concept signals by RRF with declared tie-breaks
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:14:04 +02:00
0550870ae2 feat(consume): rank documents from the indexes with stem matching
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:13:27 +02:00
b8c43198b5 feat(consume): a byte budget instrument that validates before it reports
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:11:54 +02:00
aa33555208 feat(consume): derive trust_tier, and withhold what cannot be tiered
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:10:37 +02:00
1ec3f5289c feat(consume): read a concept, with adjudication absence as its own state
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:08:41 +02:00
4f970f61c1 feat(consume): walk a bundle and compute a content-identity ref
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:07:40 +02:00