docs(okf): plan adaptive taxonomy, page warrants, and the why-register

Prior-art scan (OpenWiki, DeepWiki, deepwiki-skill) found a convergent
pattern octobot lacks: a declared, human-editable page plan that
generation must conform to. Without one, write-OKF has no legal home for
module reference, how-to, or analysis pages, so they land as loose files
in the OKF root.

Locks decisions 7-16 and adds phases 6 and 7:

- Page taxonomy is derived per repo, never fixed - an analysis repo keeps
  analyses in directories and may have no plotting module, a library has
  neither, and a hard-coded layout yields empty ceremonial pages.
- Every page carries a warrant (purpose / answers[] / cites[]) after
  type. A page that answers no question, or one another page owns, is
  inadmissible; the same field doubles as the routing index.
- index.md is the locked page plan; a separate TOC file would duplicate
  its existing job.
- Module and analysis pages are two-zone, so a scan cannot launder
  hand-written judgement.
- One why-register at OKF/decisions/, absorbing the roadmap's locked
  decisions and the empty adr/ directory. Zero ADRs in the project's life
  is evidence the three-of-three rule was unusable where it sat.
- Ferry decisions graduate at moor and the ferry directory collapses to a
  single page, pinned by sealed: to the parent commit where the
  deliberation still exists. The OKF is not the archive of record.
- One okf-check validator, built to the doctrine already written in
  add-copilot-project-skill/project-validator.md. write-OKF and moor gate
  on its pasted output, making the done-gate a run rather than a claim.

ROADMAP is over the 110-line cap until phase 7 lands; closing it is that
phase's first verify clause. Execution order is 7 then 6 - run the
register on octobot itself before freezing it into a contract for other
repos. Phase 7 ships as two blueprints because ferry graduation depends
on the register already existing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Łukasz Boryń 2026-07-21 02:41:58 +02:00
parent c1643b75b9
commit 421f4a1a69
2 changed files with 131 additions and 0 deletions

View File

@ -41,6 +41,40 @@ the brief. _Avoid_: prompt (ambiguous).
The commit-atomic-jj describe step where scratch becomes artifact; the sieve
fires here. _Avoid_: commit (mechanics), merge.
**Page plan**:
The locked set of admissible OKF pages, recorded as `index.md`'s
one-line-per-page list. write-OKF proposes it from a repo scan; the user
edits and locks it. A page absent from the plan is inadmissible.
_Avoid_: TOC, sitemap, nav, wiki.json.
**Warrant**:
The frontmatter fields that justify a page's existence — `purpose`,
`answers[]`, `cites[]`, after the required `type`. No `answers` entry, or
one another page already answers, culls the page; an unresolved `cites`
path is drift. _Avoid_: metadata, header, justification.
**Derived zone**:
The `<!-- okf:derived begin/end -->` region of a page, regenerated on
every refresh. Everything outside it is the **judgement zone** —
append/supersede only, never scan-edited. _Avoid_: generated block,
managed section.
**Register**:
An append-only OKF directory or page that is the single home for one
kind of durable fact — `decisions/` (why we chose), `LEARNINGS.md` (what
we got wrong), `blueprints/` (what we built). ROADMAP holds only what is
still ahead. _Avoid_: log, archive, history.
**Graduate**:
Moving a resolved ferry decision out of `ferries/<topic>/D-n-*.md` into
the decisions register at moor, leaving a pointer in MAP.md. _Avoid_:
promote, publish, merge.
**Sealed pin**:
The `sealed:` frontmatter on a moored ferry — jj change id, git hash,
date — naming the **parent** commit where the dissolved D-n files still
exist. Makes "recoverable from history" cashable. _Avoid_: ref, anchor.
**House cap**:
110 lines per SKILL.md; topic-named siblings load on demand and carry
no hard cap. _Avoid_: limit, budget.

View File

@ -16,6 +16,13 @@ substrate, alongside the existing practice/scaffold skills. Vocabulary:
| mattpocock/skills | blueprint/ticket pipeline, tracker-backed | file-based substrate, jj, R/Py ecosystem, debloat/review axes |
| obra/superpowers | subagent execution, verification gate | persistent wiki memory, ecosystem scaffolds |
| octobot pre-2026-07 | review axes, scaffolds, jj discipline | plan→blueprint→weave spine, knowledge substrate |
| langchain-ai/openwiki | OKF v0.1 emitter, CI auto-refresh, doc Q&A | durable-synthesis caps, human-locked page plan, loop wiring |
| Cognition DeepWiki | declared page plan (`.devin/wiki.json`), page hierarchy | local/file-based, OKF conformance, warrant checks |
| natsu1211/deepwiki-skill | TOC-first generation, line-level cites, `--update` | taxonomy adapted per repo shape, judgement/derived split |
Sources: <https://github.com/langchain-ai/openwiki>,
<https://docs.devin.ai/work-with-devin/deepwiki>,
<https://github.com/natsu1211/deepwiki-skill> (scanned 2026-07-21).
Octobot's slot: file-based loop over OKF (open-knowledge-format), jj-native.
@ -31,6 +38,52 @@ Octobot's slot: file-based loop over OKF (open-knowledge-format), jj-native.
5. Handoff gate: no mutating subagent without a brief (goal, OKF/blueprint
refs, verify command); read-only lookups exempt.
6. New skill names: imperative-verb-first; legacy names grandfathered.
7. Page taxonomy is **derived per repo, never fixed** — write-OKF scans
disk, proposes a page plan, user locks it. A fixed layout yields empty
ceremonial pages: analysis repos keep analyses in directories and may
have no plotting module; libraries have neither. Reversible — collapse
to a fixed list in okf-layout.md.
8. Every page carries a **warrant** after `type`: `purpose`, `answers[]`,
`cites[]`. Zero `answers`, or answers another page owns → inadmissible;
unresolved `cites` → drift. Doubles as routing index
(`grep -r "answers:" OKF/`). Reversible — OKF v0.1 permits
producer-defined fields after `type`.
9. `index.md` **is** the locked page plan; no TOC file, which would
duplicate index.md's job. Absent from index.md → inadmissible.
Reversible by extracting TOC.md.
10. Module and analysis pages are **two-zone**: `<!-- okf:derived -->`
fences the scan-regenerated seam, everything outside is judgement —
append/supersede only, never scan-edited. Reversible — drop fences,
fall back to the existing whole-page supersede rule.
11. Code-reference layer stays **inside write-OKF** as siblings
(`taxonomy-scan.md`, `page-warrant.md`), not a new skill — one
trigger, one mental model. Reversible by extraction if the router
breaches the house cap.
12. **One why-register**: `OKF/decisions/NNN-<slug>.md`, indexed by the
question each settles. Absorbs this section and `adr/` (empty at
absorption — zero migration cost, and evidence three-of-three was
unusable); the warrant replaces the three-of-three rule. Reversible
by re-splitting.
13. ROADMAP is a **plan, not an archive** — decisions move to the
register, debunked claims to LEARNINGS.md (which already duplicates
them by instruction), §Risks keeps only forward-looking risk.
14. Ferry decisions **graduate at moor** into the register; MAP.md keeps
a pointer, never a copy.
15. Moor **collapses** `ferries/<topic>/` into `ferries/<topic>.md` —
problem shape, rejected alternatives, decision pointers. Directory
means open, file means moored, so `ls` answers what's in flight.
Deliberation stays recoverable via `sealed:` (jj change id + git
hash + date) pinned to the **parent** (`@-` at moor) — the sealing
commit cannot name itself, and the parent is where the D-n files
still exist. Unresolvable pin = drift. Reversible: OKF is not the
archive of record, history is.
16. **One `okf-check` validator** at `write-OKF/scripts/`, built to the
existing doctrine in
[add-copilot-project-skill/project-validator.md](../skills/engineering/add-copilot-project-skill/project-validator.md);
write-OKF and moor both gate on its pasted output, so the done-gate
is a run, not a claim. Per that doctrine it must pass clean on
octobot today — over-cap pages are a **warning** until phase 7, never
an error. Reversible by inlining the checks as prose.
## Architecture
@ -66,6 +119,35 @@ See [ARCHITECTURE.md](ARCHITECTURE.md); loop diagram in `README.md`.
steer names every skill; conjure rejects a noun-first name.
✅ verified 2026-07-19 (16 flagged / 11 model-invoked by grep; steer
table covers all 34; conjure gather+review reject noun-first).
6. **Adaptive taxonomy + page warrants** — write-OKF gains a taxonomy
scan (scan → propose page plan → user locks it into `index.md`), the
warrant frontmatter contract, `okf:derived` two-zone fences, and drift
reporting on refresh. New siblings `taxonomy-scan.md` and
`page-warrant.md`; `okf-layout.md` gains `modules/` and `analyses/` as
*proposable*, never mandatory, directories. **Verify:** scaffold
against two fixtures — an analysis repo (`analysis/` dirs, no plotting
module) and a plain library repo — yields two different non-empty page
plans with zero empty ceremonial pages; `grep -rL "^purpose:"` over
`OKF/**.md` returns only `index.md`; after moving a cited symbol,
refresh reports DRIFT and leaves every judgement zone byte-identical.
7. **Why-register + ferry collapse** — create `OKF/decisions/` (indexed
by question, warrant frontmatter); migrate decisions 1–15 in, retire
empty `adr/`, shed debunked claims to LEARNINGS.md. moor gains the
graduation and collapse steps with the `sealed:` pin; refresh resolves
pins. **Verify:** ROADMAP ≤110 lines and every decision reachable from
`decisions/index.md`; `grep -rL "^type:" OKF/` still returns only
`index.md`; moor a fixture ferry → directory becomes one page,
decisions numbered, `jj show <change>` resolves; corrupt the pin →
refresh reports DRIFT. Ships in two blueprints — register first, ferry
collapse second (graduation needs the register to exist). Both close
on `okf-check` exiting 0 with output pasted.
**Execution order: 7 → 6.** Phase 7 is small, closes the cap breach now,
and makes octobot's own OKF *run* the register before phase 6 freezes it
into a contract for other repos. Numbers stay as issued — append-only.
> ROADMAP is over the 110-line cap until phase 7 lands. Tracked, not
> ignored — closing it is that phase's first verify clause.
## Risks & gotchas
@ -78,10 +160,25 @@ See [ARCHITECTURE.md](ARCHITECTURE.md); loop diagram in `README.md`.
- `jj` mutations backgrounded hang on the headless editor — always
foreground, use `-m`/`--use-destination-message`
([LEARNINGS.md](LEARNINGS.md)).
- Believed: OKF was an octobot coinage. True: OKF v0.1 is also what
OpenWiki emits, so import-compat is nearly free — but its output model
(hundreds of generated files, CI-refreshed) is opposite pressure to
OKF's ≤110-line durable synthesis. Source: langchain-ai/openwiki.
- Declared page plans are convergent prior art, not invention — DeepWiki
`pages[]{title, purpose, parent}` and deepwiki-skill's `toc.yaml`.
Decision 9 is the same move minus a config format.
- Open, for phase 6's blueprint: `cites:` pinned at `path:line` churns on
every refactor — the staleness detector is also the maintenance bill.
Candidate mitigation `path:symbol` where the language allows.
## Out of scope
- Issue-tracker backends (GitHub/GitLab) for blueprints — files only.
- OpenWiki CLI dependency — import-compat at most.
- Full auto-generated API reference (every symbol) — the derived zone
carries the public seam a caller needs, nothing more.
- Diagram generation and mermaid validation — deepwiki-skill territory.
- Scheduled/CI wiki regeneration (OpenWiki's GitHub Action) — refresh
stays human-invoked.
- Renaming grandfathered non-verb skills.
- Matt's writing-* / teach / wizard / obsidian skill families.