From 6441d0f425b718ba79eb8bb5f0ef5c14fddbc00c Mon Sep 17 00:00:00 2001 From: Lukasz Boryn Date: Wed, 22 Jul 2026 13:18:27 +0200 Subject: [PATCH] feat(sound): add verified recon before a blueprint locks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New `skills/loop/sound/` — a three-step spine run in order: read the OKF pages the question touches, query the nostos MCP server when one is configured, then confirm both against live code, because either can have gone stale. A claim with no internal owner is followed to its primary source; nothing else leaves the repo. Two mouths, per 019. Reached by name it refines the blueprint it sounded and stamps `sounded: `; self-fired it reports and writes nothing — a stamp a self-fire cannot make is a stamp a lock can trust. It is the loop's only model-invoked skill, so README's "All loop skills are user-invoked" and ARCHITECTURE's invocation seam both stop being true and are corrected here. Sounding becomes a precondition of lock: okf-check warns `locked without sounded:` on a locked blueprint carrying no stamp — never at draft (not-yet-sounded is correct there) nor at implemented (it would retro-flag 002-006). Warning, not error, so exit status stays 0. Implements blueprint 007. The script leg of its Verify is green; the four session checks need fresh sessions and stay open in ROADMAP. Co-Authored-By: Claude Opus 4.8 --- OKF/ARCHITECTURE.md | 4 +- OKF/ROADMAP.md | 3 + OKF/blueprints/007-add-sound.md | 2 +- OKF/index.md | 2 +- README.md | 5 +- skills/loop/blueprint/SKILL.md | 14 ++-- skills/loop/blueprint/blueprint-format.md | 3 + skills/loop/sound/SKILL.md | 83 +++++++++++++++++++++++ skills/loop/steer/SKILL.md | 1 + skills/loop/write-OKF/scripts/okf-check | 9 ++- 10 files changed, 116 insertions(+), 10 deletions(-) create mode 100644 skills/loop/sound/SKILL.md diff --git a/OKF/ARCHITECTURE.md b/OKF/ARCHITECTURE.md index 0248200..3a1754e 100644 --- a/OKF/ARCHITECTURE.md +++ b/OKF/ARCHITECTURE.md @@ -45,7 +45,9 @@ frontmatter `description` (routing) plus its SKILL.md body (procedure). ## Seams - **Skill frontmatter** — `disable-model-invocation` flips a skill - between description-routed and name-only invocation. + between description-routed and name-only invocation. Orchestrators and + rituals carry it; a read-only recon whose trigger is a detectable state + may go without ([decisions/019](decisions/019-recon-may-self-fire.md)). - **Progressive disclosure** — SKILL.md bodies point to topic-named sibling files; swapping a sibling changes behaviour without touching the router (`skills/productivity/conjure-a-skill/PRINCIPLES.md`). diff --git a/OKF/ROADMAP.md b/OKF/ROADMAP.md index 648a072..f04ad58 100644 --- a/OKF/ROADMAP.md +++ b/OKF/ROADMAP.md @@ -59,6 +59,9 @@ append-only. once and continues; a self-fired run leaves the blueprint byte-identical; and in a fresh session on a repo with no `OKF/`, ten ordinary code questions fire sound zero times; caps hold. + ✅ script leg verified 2026-07-22 (blueprint 007 — `draft: 0` + `locked: 1` `implemented: 0`, `okf-check OKF/` clean, caps hold). The + four session checks need fresh sessions and stay open. ## Risks & gotchas diff --git a/OKF/blueprints/007-add-sound.md b/OKF/blueprints/007-add-sound.md index c6dd4a3..a228d88 100644 --- a/OKF/blueprints/007-add-sound.md +++ b/OKF/blueprints/007-add-sound.md @@ -1,6 +1,6 @@ --- type: Blueprint -status: locked +status: implemented traces-to: ROADMAP.md phase 9; decision 019 sounded: 2026-07-22 --- diff --git a/OKF/index.md b/OKF/index.md index ba01804..ef2cbae 100644 --- a/OKF/index.md +++ b/OKF/index.md @@ -28,7 +28,7 @@ your task needs. Humans welcome too. - [004](blueprints/004-give-cites-teeth-and-fence-derived-zone.md) — give cites teeth and fence the derived zone — implemented - [005](blueprints/005-propose-the-page-plan-from-a-repo-scan.md) — propose the page plan from a repo scan — implemented - [006](blueprints/006-rescan-the-page-plan-on-refresh.md) — rescan the page plan on refresh — implemented -- [007](blueprints/007-add-sound.md) — add sound, the recon that precedes a lock — locked +- [007](blueprints/007-add-sound.md) — add sound, the recon that precedes a lock — implemented ## Ferries diff --git a/README.md b/README.md index 5486dbc..5be306b 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,8 @@ write-OKF → architect → blueprint → ferry → weave → review+verify → greenfield and revision modes (replaces plan-project + update-project). - **blueprint** — synthesize discussed work into a justified, verifiable blueprint at `OKF/blueprints/NNN-.md` (status: draft → locked → implemented). +- **sound** — verified recon before a lock: OKF, then the nostos MCP + server when configured, then live code; stamps `sounded:`. - **ferry** — work too big for one session becomes a directory of small, edge-declared decision files; resolve one per sitting. - **weave** — execute one locked blueprint: bdd at its seams, four-axis @@ -71,7 +73,8 @@ write-OKF → architect → blueprint → ferry → weave → review+verify → - **steer** — router over every skill; most are user-invoked, steer is the index. -All loop skills are user-invoked (`disable-model-invocation: true`). +Every loop skill is user-invoked (`disable-model-invocation: true`) +except **sound**, which only reads — see `OKF/decisions/019`. ### productivity - **conjure-a-skill** — meta-skill that scaffolds new skills consistently. diff --git a/skills/loop/blueprint/SKILL.md b/skills/loop/blueprint/SKILL.md index e1dcb09..85c1998 100644 --- a/skills/loop/blueprint/SKILL.md +++ b/skills/loop/blueprint/SKILL.md @@ -33,18 +33,22 @@ blueprint with justification. The interview happened upstream pre-agreed seam list. - *Verify* is a runnable command or observable check — weave's done-gate runs exactly this. -4. **Show the blueprint**; iterate. On explicit user yes → flip status to +4. **Sound it** — call [sound](../sound/SKILL.md) by name on the draft: + it verifies what the blueprint rests on and stamps `sounded: `. + Unsounded, there is nothing to lock against. +5. **Show the blueprint**; iterate. On explicit user yes → flip status to `locked`. No yes, no lock. -5. **Index it** — add `NNN — — <status>` to `OKF/index.md` +6. **Index it** — add `NNN — <title> — <status>` to `OKF/index.md` Blueprints section. -6. **Seal** via [commit-atomic-jj](../../productivity/commit-atomic-jj/SKILL.md): +7. **Seal** via [commit-atomic-jj](../../productivity/commit-atomic-jj/SKILL.md): `docs(blueprint): add NNN <slug>`. ## Status discipline `draft → locked → implemented`, or `→ superseded-by-NNN` from any state. Never backwards; never edit a locked blueprint's Contract section — supersede -with a new number instead. The "tracker" is -`grep -r "^status:" OKF/blueprints/`. +with a new number instead. **A lock has a precondition: a `sounded:` +stamp** — `okf-check` warns on a `locked` blueprint without one. The +"tracker" is `grep -r "^status:" OKF/blueprints/`. ## Output / done criteria - Blueprint exists, matches blueprint-format.md, indexed in index.md. diff --git a/skills/loop/blueprint/blueprint-format.md b/skills/loop/blueprint/blueprint-format.md index b2181bf..4e0d419 100644 --- a/skills/loop/blueprint/blueprint-format.md +++ b/skills/loop/blueprint/blueprint-format.md @@ -5,6 +5,7 @@ type: Blueprint status: draft | locked | implemented | superseded-by-NNN traces-to: ROADMAP.md phase N | ferries/<topic>/D-<n> | user request <date> +sounded: YYYY-MM-DD --- # NNN — <imperative title, completes "this change will…"> @@ -41,6 +42,8 @@ up in the diff.> [write-OKF/okf-layout.md](../write-OKF/okf-layout.md)) — always first. - `traces-to` is mandatory; a blueprint that traces to nothing fails [sieve](../../engineering/sieve/SKILL.md)'s Real test by definition. +- `sounded:` is the date [sound](../sound/SKILL.md) verified what the + blueprint rests on; absent until then, and required to lock. - Locked blueprint's Contract/Verify sections are immutable — supersede, don't edit. Justification may gain references; status may advance. - A blueprint grows into `NNN-<slug>/` (blueprint.md + notes) when one file won't diff --git a/skills/loop/sound/SKILL.md b/skills/loop/sound/SKILL.md new file mode 100644 index 0000000..d7da68f --- /dev/null +++ b/skills/loop/sound/SKILL.md @@ -0,0 +1,83 @@ +--- +name: sound +description: Verify what a blueprint is about to rest on, before it locks — read the OKF pages the question touches, query the nostos MCP server when one is configured, then confirm both against live code and stamp `sounded: <date>`. Use when the user says "sound", "/sound", "sound this blueprint", "verify this before I lock it"; when blueprint reaches its lock step; or when you are about to act on a claim taken from an OKF page, a blueprint's Justification, or a cite that nothing has checked against the code. Not open-ended "how does this work" research — the trigger is an unverified claim about *this* repo, not a topic. +--- + +# sound + +The recon pass that precedes a lock. A blueprint locks on a human's yes, +and that yes rests on knowledge nothing checked — sounding is what checks +it. Ports mattpocock's `research`, re-founded on the OKF. + +## The spine + +Three steps, in order, every run. Each feeds the next. + +1. **OKF** — read the pages the question touches, starting at + `OKF/index.md`. No `./OKF/` → say so in one line, name + [`/write-OKF`](../write-OKF/SKILL.md), **stop**. Nothing else runs. +2. **nostos** — query the nostos MCP server when one is configured, via + its `find` / `provenance_of` tools. Presence comes from the agent's + MCP configuration, never from a filesystem path — never guess at a + checkout. Absent → one line naming `nostos install`, run from the + repo to be indexed, then continue. +3. **Live code** — confirm what steps 1 and 2 claimed against the files + themselves. Either can be stale; this step is what makes the run + worth its context. Cite `path:line` or `path:symbol` for every claim + that survives. A claim with no internal owner — a third-party API, a + spec — is followed to its primary source and cited. **Nothing else + leaves the repo.** + +## Two mouths + +The same skill, two modes, and which one is decided by *how the run +started* — see [019](../../../OKF/decisions/019-recon-may-self-fire.md). + +| Reached | Behaviour | +|---|---| +| **By name** — user, or `blueprint` at its lock step | refine the blueprint sounded; stamp `sounded: <date>` | +| **Self-fired** — routed by description | **report only; write nothing** | + +The stamp is what a lock leans on, so a run nobody asked for may not +make it. A stamp a self-fire cannot make is a stamp a lock can trust. +Self-fired and the findings matter → say so and name `/sound`; the user +decides whether it becomes a write. + +## The mark + +`sounded: YYYY-MM-DD`, fourth frontmatter field, after `traces-to` (see +[blueprint-format.md](../blueprint/blueprint-format.md)). Sounding is a +precondition of lock: `okf-check` warns `<path>: locked without +sounded:` on a `locked` blueprint carrying no stamp. Warning, not error +— exit status stays 0. + +**Idempotence.** Already stamped and no cited file changed since → +report `sounded <date>, unchanged` and stop. Re-sound anyway only when +the user asks, or when a cite no longer resolves. + +## Output / done criteria + +- Findings in the calling context: what held, what drifted, what has no + owner — each with its cite. +- Reached by name → the blueprint refined and stamped. +- Self-fired → the report, and the working copy byte-identical. + +## Guardrails +- **Never** write on a self-fire, in any form, however small. +- **Never** skip step 1 to reach step 3 — an unread OKF is what makes a + recon into research. +- **Never** run in a subagent, background or otherwise: the findings are + the deliverable and belong in the calling context. +- **Never** leave the repo past the no-internal-owner gap — general web + research is upstream `research`, not this. +- **Never** edit a locked blueprint's Contract or Verify — a sounding + that contradicts them supersedes, per + [blueprint](../blueprint/SKILL.md)'s status discipline. + +## See also +- [../blueprint/SKILL.md](../blueprint/SKILL.md) — the caller; sounding + gates its lock step. +- [../write-OKF/SKILL.md](../write-OKF/SKILL.md) — no `OKF/` → there + first; `okf-check` owns the warning. +- [../weave/SKILL.md](../weave/SKILL.md) — executes what a sounded + blueprint locked. diff --git a/skills/loop/steer/SKILL.md b/skills/loop/steer/SKILL.md index 2777fd9..f5c32c8 100644 --- a/skills/loop/steer/SKILL.md +++ b/skills/loop/steer/SKILL.md @@ -21,6 +21,7 @@ write-OKF → architect → blueprint → ferry → weave → review+verify → | project has no `OKF/` knowledge folder, or wiki is stale | `/write-OKF` | | starting a project / roadmap needs creating or revising | `/architect` | | discussed work needs a justified, verifiable blueprint | `/blueprint` | +| a blueprint is about to lock on unverified knowledge | `/sound` | | feature too big for one session — map decisions | `/ferry` | | a locked blueprint is ready to execute | `/weave` | | ferry's blueprints locked — agent-orchestrated crossing | `/call-charon` | diff --git a/skills/loop/write-OKF/scripts/okf-check b/skills/loop/write-OKF/scripts/okf-check index e81b9be..519125c 100755 --- a/skills/loop/write-OKF/scripts/okf-check +++ b/skills/loop/write-OKF/scripts/okf-check @@ -5,7 +5,8 @@ Errors (exit 1): missing type, missing warrant, duplicate answer, unresolvable cite, malformed `okf:derived` fence, page unreachable from index.md, register index line disagreeing with its decision file, moored ferry with a malformed `sealed:` pin or a surviving directory. Warnings -(exit 0): page over the 110-line cap, page with no cites. +(exit 0): page over the 110-line cap, page with no cites, blueprint +locked without a `sounded:` stamp. Pin *shape* only — whether the change id still resolves needs the repo in hand, which is write-OKF refresh's job, not a validator that must exit 0 @@ -208,6 +209,12 @@ def main(argv): if len(text.splitlines()) > CAP: warnings.append(f"{rel}: over the {CAP}-line cap") + # Sounding is a precondition of lock. Only at `locked`: `draft` is + # not-yet-sounded, and `implemented` would retro-flag 002-006. + if ("blueprints" in rel.parts and fields.get("status") == "locked" + and not fields.get("sounded")): + warnings.append(f"{rel}: locked without sounded:") + # The warrant contract covers durable synthesis pages; blueprints # and ferries carry their own frontmatter contracts. if {"blueprints", "ferries"} & set(rel.parts) or page.name == "index.md":