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>
62 lines
2.2 KiB
JSON
62 lines
2.2 KiB
JSON
{
|
|
"contract": "okf-consumption/1",
|
|
"bundle": {
|
|
"bundle_id": "b-golden-segmented-okf-v0-2",
|
|
"ref": "sha256-tree:e272be79295bdeaa19127cd7d8ee76b8a02f05b7f6b2feeb1c48ffb55e87b230"
|
|
},
|
|
"budget": {
|
|
"unit": "utf-8 bytes of emitted JSON",
|
|
"instrument": "okf_consume.measure (len of the ensure_ascii=False JSON encoding, utf-8)",
|
|
"limit": 120000,
|
|
"spent": 1306,
|
|
"known_positive": {
|
|
"case": "docs/consumption-contract.md, encoded as a JSON string",
|
|
"expected": 10349,
|
|
"measured": 10349,
|
|
"raw_bytes": 10060,
|
|
"encoding_delta": 289
|
|
}
|
|
},
|
|
"denominators": {
|
|
"considered": 3,
|
|
"withheld": 0,
|
|
"delivered": 3
|
|
},
|
|
"question": "Hva sier veiledningen om krav?",
|
|
"excerpts": [
|
|
{
|
|
"bundle_id": "b-golden-segmented-okf-v0-2",
|
|
"concept_id": "krav/1-1/foerste-krav",
|
|
"sha256": "29ac5dfe604b0d7bd50182a68b18f614f1388913c7487adcd95c4997f5ef4b35",
|
|
"adjudication": "proposed",
|
|
"trust_tier": "unverified",
|
|
"bundle_id_inherited": false,
|
|
"text_sha256": "08447c690087834883a78fb9f40d474c68b2526ed57d0dafe01c4868db3c04f0",
|
|
"text": "\n## 1.1 Foerste krav\n\nEt krav som beskriver den foerste betingelsen i eksempelet.",
|
|
"rank": 1
|
|
},
|
|
{
|
|
"bundle_id": "b-golden-segmented-okf-v0-2",
|
|
"concept_id": "veiledning",
|
|
"sha256": "85d54e499a9d6499418994dbdbc472568cf5a14fea1ecc9179fd8983b61a31c1",
|
|
"adjudication": "proposed",
|
|
"trust_tier": "unverified",
|
|
"bundle_id_inherited": false,
|
|
"text_sha256": "82d67ff01367a1a56532130e077956048004ac047e6062eae2143d96704c4a92",
|
|
"text": "\n# Veiledning for eksempelbundel\n\nDenne teksten er syntetisk og finnes kun for a pinne bytes.",
|
|
"rank": 2
|
|
},
|
|
{
|
|
"bundle_id": "b-golden-segmented-okf-v0-2",
|
|
"concept_id": "krav/1-2/andre-krav",
|
|
"sha256": "c40b32d60f2488d22c73c06966174eb01a0971d4c7e0f8267b2d942e70f23038",
|
|
"adjudication": "proposed",
|
|
"trust_tier": "unverified",
|
|
"bundle_id_inherited": false,
|
|
"text_sha256": "4c181e1debb141d3cb1a7bd47249fdac1c0b2c5db1b47cf255ef8f04f83ec840",
|
|
"text": "\n## 1.2 Andre krav\n\nEt krav som beskriver den andre betingelsen i eksempelet.",
|
|
"rank": 3
|
|
}
|
|
],
|
|
"withheld": []
|
|
}
|