feat(skill): one generic skill by default, carrying a working method and an answer form

The operator built a 2313-concept bundle from one project's own documentation,
asked it a question in his own words, and judged the result unusable. The
generated skill was an audit contract: all its discipline sat on the accounting
-- markings, denominators, budget lines, source pointers -- and none of it on
understanding the question, searching again, or writing one coherent answer.
Two sentences actively forbade the second of those.

**The two forbidding sentences are gone and their replacements are tested from
both sides.** "Do not go looking for context the pre-pass deliberately
withheld" read as "one run per question", and no wording of the operator's
question put the right document inside a single run's cut -- so a rule against
a second run was a rule against finding it at all. "Not something to retry with
a narrower question" generalised a budget-refusal case into the same ban.
SS 2.2 of the contract said the first of them, so the contract moved with the
skill rather than being left to disagree with it: a second pre-pass run with
other terms, and a fetch of a concept the payload NAMED, are reachable; SS 9's
two real boundaries -- directory enumeration, the verdict layer -- are not.

**Two new sections, and the checker requires them.** `## Working method`: read
the bundle's map, put the question into the bundle's own words, split a broad
question into 2-4 sub-questions, search per sub-question, read what lay just
outside the cut and search again with its words, same method across several
bundles, then assemble ONE answer ordered by sub-question, saying which source
holds and what is not covered. `## Answer form`: the questioner's language,
plain prose, no `below_k`, no digests, no budget lines, no denominators; short
textbook-style references (document + section, plus bundle where several were
read); and the audit trail written only when the questioner asks for it or
into a document that travels without the skill. `REQUIRED_SECTIONS` follows the
template and the contract's new SS 2.5 and SS 2.6 -- never the other way round.

**The generic skill becomes what `okf skill` and `okf project` write.** A
per-bundle skill's numbers go stale the moment its bundle is rebuilt, one copy
per consuming project, and a project with two bundles installs two
near-identical skills; the generic form carries no bundle's numbers and names
`okf card` for them. `--for-bundle` is the opt-in for the instantiated copy,
which still refuses out loud on a stale pairing -- safe to keep, not enough to
keep default. `rule_bundle_identity` learned to tell a generic skill from an
unfilled template by the frontmatter name the generator writes, so the template
still fails for the opposite reason: it declares no identity because it is
unfinished.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-20 23:53:34 +02:00
commit 30edd3f5d8
12 changed files with 564 additions and 92 deletions

View file

@ -41,14 +41,67 @@ carries them.
1. The pre-pass MUST do the reading, the ranking and the cut. The skill MUST do
the judgement.
2. The skill MUST NOT read the bundle outside what the payload delivers or
explicitly names as reachable. Context the pre-pass withheld was withheld
deliberately.
explicitly names as reachable. **The payload names the best-ranked withheld
concepts (§ 5.3), and those are reachable**: running the pre-pass again with
other terms, or fetching a named concept, is another measurement under the
same rules, not a way around the first one. What stays forbidden is § 9's
two: enumerating a directory the profile does not declare derived, and
reaching the verdict layer.
This clause said "context the pre-pass withheld was withheld deliberately"
until 2026-09-20, which a skill reasonably read as "one run per question".
Measured on a 2313-concept bundle, the first run's cut is one ranking's
answer to one wording, and no wording of the operator's question put the
right document inside the cut — so a rule against a second run is a rule
against finding it at all. The `withheld` block exists in the shape it does
so that a second run can be aimed rather than guessed.
3. The skill MUST declare the cut in its output rather than reporting as though
it had read the bundle. An undeclared cut is a denominator failure (§ 5)
dressed as an answer.
4. A conformant skill MAY be handed a payload by any transport. The transport is
not part of this contract.
### 2.5 Working method
A conformant skill MUST state a **working method** — how a question becomes
searches — and MUST NOT state one that stops at a single run.
1. It MUST tell its reader to read the bundle's own map before searching, and
to put the question into the bundle's terms. A bundle in one language and a
question in another share few tokens, and a pre-pass matching tokens then
ranks on almost nothing.
2. It MUST tell its reader to split a broad question into sub-questions and to
run the pre-pass per sub-question.
3. It MUST say that several runs are permitted and expected, and MUST NOT
contain a sentence forbidding a second run with other terms. Both the
`withheld` near misses (§ 5.3) and § 2.2 exist so that the second run can
be aimed.
4. Where more than one bundle is in scope, it MUST tell its reader to run the
same sub-questions against each and to keep each piece of material
attributed to its bundle.
5. It MUST tell its reader to assemble ONE answer — ordered by sub-question,
stating which source holds where sources disagree and with which version,
and saying what the bundle does not cover.
### 2.6 Answer form
A conformant skill MUST state an **answer form**, and that form MUST put the
answer before the audit trail.
1. The answer is written in the questioner's language, whatever language the
bundle is in, in ordinary prose.
2. The instrument's vocabulary stays out of it: withholding-rule names,
digests, budget lines and the word *denominator* describe how the answer
was produced, not what it says.
3. Source references are short and of the kind a textbook gives — the document
and the section, plus the bundle where more than one was read.
4. The audit trail of § 3, § 5 and § 7 — the markings, the three counts, the
ref, the rules the declined concepts fell under — is written when the
questioner asks for it, or into an artefact that will travel without the
skill (§ 8's document mode), and otherwise MAY be omitted from the answer.
The obligation to HOLD a marking and a source for every claim is unchanged:
what this clause governs is what the reader is made to read.
## 3. Source marking on every excerpt
1. Every excerpt MUST carry the tuple `(bundle_id, concept_id)`. Concept