llm-ingestion-okf/skills/okf-consume/references/example-payload.json
Kjell Tore Guttormsen 839bd61349 feat(consume): --follow-parent carries the enclosing section's text, from room the cut left
K3-21 B. The second form of `parent`: `okf consume --follow-parent`
(`consume.attach_parent_text`) puts the enclosing concept's text inside an
excerpt's `parent`, with that concept's own `sha256` so a claim resting on it
is cited as that concept. It runs AFTER the cut, on the room the cut left, in
rank order, so the delivered set, its order, the withheld list and the
denominators are the same with the flag as without it -- inherited text
cannot displace an excerpt, the mechanism a consumer measured when copied-in
ancestor text pushed the right section to withheld place 504 and 1 069. A
text that does not fit is cut to the longest prefix that does and marked
`truncated`; a parent the payload already holds, or one a higher-ranked
excerpt already carried, travels once. OFF; the defaults are chosen on the
measurement that follows this commit.

`delivered_text` is the one normalisation an excerpt's `text` and a parent's
share. Contract SS 8 point 6 gains the MAY; the template tells the reader
what `text`, `sha256` and `truncated` mean. README and CLAUDE.md name the
flag.

Moved on purpose: the SS 7.4 known-positive again (14 455 / 14 083 / 372 ->
14 721 / 14 346 / 375), and `skills/okf-consume/` regenerated with it.
`tests/test_parent_text.py::test_no_room_means_no_text_and_no_lost_excerpt`
changed from its red form: it asked through `build_payload` at `limit ==
spent`, where the knapsack's 500 B buckets admit nothing at all
(`budget_admits_nothing`); it now holds the rule at `attach_parent_text`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 13:11:24 +02:00

103 lines
3.5 KiB
JSON

{
"contract": "okf-consumption/1",
"bundle": {
"bundle_id": "b-golden-segmented-okf-v0-2",
"ref": "sha256-tree:f85646c1f77982a69b97afca08209f369b79cd39c217f6f2c074c2dc5bac23fe"
},
"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": 2289,
"known_positive": {
"case": "docs/consumption-contract.md, encoded as a JSON string",
"expected": 14721,
"measured": 14721,
"raw_bytes": 14346,
"encoding_delta": 375
}
},
"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": "84145512284a8bbc1a8905c73d0de3f0e0cb7081cf517f778fe88a610d2b4f62",
"adjudication": "proposed",
"trust_tier": "unverified",
"bundle_id_inherited": false,
"title": "Foerste krav",
"sources": [
{
"resource": "veiledning.md",
"title": "veiledning.md"
}
],
"source_file": "veiledning.md",
"source_sha256": "6906ec0acbcfc246e825bda9863c716eb5611b465020e8204eeb448c32343f7d",
"source_lines": "[5, 8]",
"source_offset": "[94, 176]",
"parent": {
"concept_id": "veiledning",
"title": "Veiledning for eksempelbundel"
},
"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": "krav/1-2/andre-krav",
"sha256": "4f8a869aa4e898ec1a30595951b3e198e09091d76c41078a52e821000eb9e22c",
"adjudication": "proposed",
"trust_tier": "unverified",
"bundle_id_inherited": false,
"title": "Andre krav",
"sources": [
{
"resource": "veiledning.md",
"title": "veiledning.md"
}
],
"source_file": "veiledning.md",
"source_sha256": "6906ec0acbcfc246e825bda9863c716eb5611b465020e8204eeb448c32343f7d",
"source_lines": "[9, 11]",
"source_offset": "[176, 253]",
"parent": {
"concept_id": "veiledning",
"title": "Veiledning for eksempelbundel"
},
"text_sha256": "4c181e1debb141d3cb1a7bd47249fdac1c0b2c5db1b47cf255ef8f04f83ec840",
"text": "\n## 1.2 Andre krav\n\nEt krav som beskriver den andre betingelsen i eksempelet.",
"rank": 2
},
{
"bundle_id": "b-golden-segmented-okf-v0-2",
"concept_id": "veiledning",
"sha256": "8f1f4d940887b96b39496d0aceb7a4fa212553510165917427e4f7e9efb98b03",
"adjudication": "proposed",
"trust_tier": "unverified",
"bundle_id_inherited": false,
"title": "Veiledning for eksempelbundel",
"sources": [
{
"resource": "veiledning.md",
"title": "veiledning.md"
}
],
"source_file": "veiledning.md",
"source_sha256": "6906ec0acbcfc246e825bda9863c716eb5611b465020e8204eeb448c32343f7d",
"source_lines": "[1, 4]",
"source_offset": "[0, 94]",
"text_sha256": "82d67ff01367a1a56532130e077956048004ac047e6062eae2143d96704c4a92",
"text": "\n# Veiledning for eksempelbundel\n\nDenne teksten er syntetisk og finnes kun for a pinne bytes.",
"rank": 3
}
],
"withheld": []
}