feat(skills): a consumption-skill template with no defaults
A per-corpus skill copies this directory and fills every <PLACEHOLDER>. None of them has a default: a corpus's budget, instrument, profile name and conditional fields are facts about that corpus, and a default would be this repository asserting one it has not measured. The section headings are fixed because the checker in the next commit reads them by name. references/example-payload.json is the known-positive that keeps a refuse-everything checker from passing.
This commit is contained in:
parent
f9513cdcb4
commit
d077e4e064
3 changed files with 232 additions and 0 deletions
24
skills/okf-consume-template/references/README.md
Normal file
24
skills/okf-consume-template/references/README.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# References for the consumption-skill template
|
||||
|
||||
Two files, and they play different roles.
|
||||
|
||||
- **`example-payload.json`** — a conformant payload in the shape
|
||||
`docs/consumption-contract.md` § 8 fixes. It is the **known-positive** for
|
||||
`tools/okf_contract_check.py`: the suite checks that this file passes, so a
|
||||
checker that refuses everything cannot be green. Its three excerpts carry one
|
||||
of each `adjudication` value on purpose, so that the closed set is exercised
|
||||
rather than asserted. The digests are real sha256 digests of the paths beside
|
||||
them, not of any real concept file: the example is a shape, not a bundle.
|
||||
- **`SKILL.md` beside this directory** — the template a per-corpus skill copies.
|
||||
|
||||
## Copying the template
|
||||
|
||||
1. Copy `skills/okf-consume-template/` to wherever the per-corpus skill lives.
|
||||
2. Replace every `<PLACEHOLDER>`. None has a default; a copy with one left is
|
||||
unfinished, not configured.
|
||||
3. Keep every `##` heading. The checker reads them by name.
|
||||
4. Point `--payload` at your own pre-pass output, not at this example, and run
|
||||
the checker in the corpus repo's test suite rather than by hand.
|
||||
|
||||
The checker checks shape. The division of labour (§ 2) and the prohibitions
|
||||
(§ 9) are properties of a run, and no static check can see them.
|
||||
59
skills/okf-consume-template/references/example-payload.json
Normal file
59
skills/okf-consume-template/references/example-payload.json
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"contract": "okf-consumption/1",
|
||||
"bundle": {
|
||||
"bundle_id": "example-corpus",
|
||||
"ref": "9dd86b1f0c2e4a7b8d3f5061a2c4e6809bdf1357"
|
||||
},
|
||||
"budget": {
|
||||
"unit": "o200k_base tokens",
|
||||
"instrument": "<BUDGET_INSTRUMENT>",
|
||||
"limit": 30000,
|
||||
"spent": 18412,
|
||||
"known_positive": {
|
||||
"case": "commons reference document",
|
||||
"expected": 10406,
|
||||
"measured": 10406
|
||||
}
|
||||
},
|
||||
"denominators": {
|
||||
"considered": 5,
|
||||
"withheld": 2,
|
||||
"delivered": 3
|
||||
},
|
||||
"excerpts": [
|
||||
{
|
||||
"bundle_id": "example-corpus",
|
||||
"concept_id": "fire-compartmentation-3-1",
|
||||
"path": "concepts/fire-compartmentation-3-1.md",
|
||||
"sha256": "39ccd5fdef696327c9b8bed873cb5d085fc2460e9a01cd12f872488cd8c74580",
|
||||
"adjudication": "adjudicated",
|
||||
"trust_tier": "human-reviewed"
|
||||
},
|
||||
{
|
||||
"bundle_id": "example-corpus",
|
||||
"concept_id": "escape-routes-3-2",
|
||||
"path": "concepts/escape-routes-3-2.md",
|
||||
"sha256": "4352bb77959800ef35bb2b7afd82fbe764a93adc4252d635263388c8ef8811a6",
|
||||
"adjudication": "proposed",
|
||||
"trust_tier": "machine-confirmed"
|
||||
},
|
||||
{
|
||||
"bundle_id": "example-corpus",
|
||||
"concept_id": "scope-1-0",
|
||||
"path": "concepts/scope-1-0.md",
|
||||
"sha256": "735ee94323f323b17bb567b9f02fa0926ade222f520c66641581e9be3c007088",
|
||||
"adjudication": "unknown",
|
||||
"trust_tier": "unverified"
|
||||
}
|
||||
],
|
||||
"withheld": [
|
||||
{
|
||||
"concept_id": "appendix-a-tables",
|
||||
"rule": "over budget after knapsack"
|
||||
},
|
||||
{
|
||||
"concept_id": "revision-log",
|
||||
"rule": "type not in question scope"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue