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>
21 lines
963 B
Markdown
21 lines
963 B
Markdown
# References
|
|
|
|
`example-payload.json` is a **real** payload, not an illustration: it was
|
|
produced by
|
|
|
|
```sh
|
|
python3 tools/okf_consume.py examples/ingest-golden-segmented-okf-v0-2/expected-bundle \
|
|
--question "Hva sier veiledningen om krav?" --out references/example-payload.json
|
|
```
|
|
|
|
against the three-concept golden bundle that ships in this repository, so anyone
|
|
reading this file can regenerate it byte for byte and compare. It carries no
|
|
content from the K2 corpus.
|
|
|
|
It is here so that the payload's shape can be read without running anything, and
|
|
so that a reader can see what the members the contract does not name look like in
|
|
practice: `text` and `text_sha256` on every excerpt (§ 8 permits additional
|
|
members; § 1 defines an excerpt as delivered *content*, and without a body the
|
|
budget gate would measure a skeleton), `rank`, `bundle_id_inherited`, and the
|
|
`raw_bytes`/`encoding_delta` pair that gives the known-positive a second,
|
|
independent check.
|