feat(sound): make nostos primary and file reads the fallback

Sound queried nostos as a hint and then re-read the same bytes from
disk. Codegraph returns source, not metadata, so that read was a
duplicate everywhere except the two places the index is blind: nothing
indexed, and the working copy.

Step 2 becomes the primary source for what the code says; step 3 opens a
file only on an empty nostos result or a path dirty per one `jj st` per
run. The cite rule moves out of step 3 — it applies to every claim — and
prefers `path:symbol`, matching okf-layout's grammar for page
frontmatter. A new guardrail forbids shelling out to `codegraph`:
freshness is nostos's job, the working copy is sound's.

CONTEXT's Sounding entry and README's one-liner follow. Blueprint 008
flips to implemented; the belief it corrected lands in LEARNINGS.

Implements blueprint 008.

Verify: okf-check OKF/ → 0 error(s), 0 warning(s); sound/SKILL.md 98
lines (cap 110); grep -rni 'live code' over README, CONTEXT and
sound/SKILL.md matches nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Łukasz Boryń 2026-07-23 23:36:27 +02:00
parent 5686c254b3
commit 49f98ba1da
6 changed files with 41 additions and 19 deletions

View File

@ -84,9 +84,9 @@ exist. Makes "recoverable from history" cashable. _Avoid_: ref, anchor.
**Sounding**: **Sounding**:
The recon pass `sound` runs before a blueprint locks — the OKF, then the The recon pass `sound` runs before a blueprint locks — the OKF, then the
nostos MCP server when configured, then live code, which is what catches nostos MCP server, then a file read only where nostos cannot answer: an
the first two going stale. Its mark is `sounded:` in the blueprint's empty result, or a path with uncommitted changes. Its mark is `sounded:`
frontmatter. _Avoid_: research, investigation, spike. in the blueprint's frontmatter. _Avoid_: research, investigation, spike.
**House cap**: **House cap**:
110 lines per SKILL.md; topic-named siblings load on demand and carry 110 lines per SKILL.md; topic-named siblings load on demand and carry

View File

@ -66,3 +66,10 @@ status: live
visibility principle it follows from. A decision that *extends* a live visibility principle it follows from. A decision that *extends* a live
one without changing it is that one applied, not a new one. Source: one without changing it is that one applied, not a new one. Source:
warrant test, session 2026-07-22; 020 stays unspent. warrant test, session 2026-07-22; 020 stays unspent.
- Believed: a confirm-against-the-code step is what catches a stale
index, so it must run for every claim. True: an index that returns
**source** rather than metadata makes that step a re-read of bytes
already in hand — its value survives only at the gaps where the index
cannot answer (nothing indexed, and the working copy). A verification
step earns its cost only where the step before it is blind. Source:
weave of blueprint 008.

View File

@ -1,6 +1,6 @@
--- ---
type: Blueprint type: Blueprint
status: locked status: implemented
traces-to: user request 2026-07-23 traces-to: user request 2026-07-23
sounded: 2026-07-23 sounded: 2026-07-23
--- ---

View File

@ -29,7 +29,7 @@ your task needs. Humans welcome too.
- [005](blueprints/005-propose-the-page-plan-from-a-repo-scan.md) — propose the page plan from a repo scan — 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 - [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 — implemented - [007](blueprints/007-add-sound.md) — add sound, the recon that precedes a lock — implemented
- [008](blueprints/008-make-nostos-primary-and-files-the-fallback.md) — make nostos primary and file reads the fallback — locked - [008](blueprints/008-make-nostos-primary-and-files-the-fallback.md) — make nostos primary and file reads the fallback — implemented
## Ferries ## Ferries

View File

@ -59,7 +59,7 @@ write-OKF → architect → blueprint → ferry → weave → review+verify →
- **blueprint** — synthesize discussed work into a justified, verifiable - **blueprint** — synthesize discussed work into a justified, verifiable
blueprint at `OKF/blueprints/NNN-<slug>.md` (status: draft → locked → implemented). blueprint at `OKF/blueprints/NNN-<slug>.md` (status: draft → locked → implemented).
- **sound** — verified recon before a lock: OKF, then the nostos MCP - **sound** — verified recon before a lock: OKF, then the nostos MCP
server when configured, then live code; stamps `sounded:`. server, then files only where nostos cannot answer; stamps `sounded:`.
- **ferry** — work too big for one session becomes a directory of small, - **ferry** — work too big for one session becomes a directory of small,
edge-declared decision files; resolve one per sitting. edge-declared decision files; resolve one per sitting.
- **weave** — execute one locked blueprint: bdd at its seams, four-axis - **weave** — execute one locked blueprint: bdd at its seams, four-axis

View File

@ -1,6 +1,6 @@
--- ---
name: sound 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. 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 for what the code says, open files only where nostos cannot answer, 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 # sound
@ -11,22 +11,35 @@ it. Ports mattpocock's `research`, re-founded on the OKF.
## The spine ## The spine
Three steps, in order, every run. Each feeds the next. Three steps, in order. Steps 1 and 2 run every time; step 3 runs only
where step 2 came up short.
1. **OKF** — read the pages the question touches, starting at 1. **OKF** — read the pages the question touches, starting at
`OKF/index.md`. No `./OKF/` → say so in one line, name `OKF/index.md`. No `./OKF/` → say so in one line, name
[`/write-OKF`](../write-OKF/SKILL.md), **stop**. Nothing else runs. [`/write-OKF`](../write-OKF/SKILL.md), **stop**. Nothing else runs.
2. **nostos** — query the nostos MCP server when one is configured, via 2. **nostos** — query the nostos MCP server, via its `find` /
its `find` / `provenance_of` tools. Presence comes from the agent's `provenance_of` tools. It is the primary source for what the code
MCP configuration, never from a filesystem path — never guess at a says, not a hint feeding a later read: what it returns is source, not
checkout. Absent → one line naming `nostos install`, run from the metadata. Presence comes from the agent's MCP configuration, never
repo to be indexed, then continue. from a filesystem path — never guess at a checkout. Absent or
3. **Live code** — confirm what steps 1 and 2 claimed against the files unconfigured → every query comes back empty, which routes every claim
themselves. Either can be stale; this step is what makes the run to step 3; say so in one line naming `nostos install`, run from the
worth its context. Cite `path:line` or `path:symbol` for every claim repo to be indexed, and continue.
that survives. A claim with no internal owner — a third-party API, a 3. **File read — the fallback.** A file is opened for a claim in exactly
spec — is followed to its primary source and cited. **Nothing else two cases:
leaves the repo.** - **Empty result** — nostos returned nothing. Empty means *not
indexed*, never *not there*.
- **Dirty path** — the claim touches a path with uncommitted changes,
per one `jj st` per run.
Neither → the nostos answer stands, unread.
Cite `path:symbol` where a symbol carries the claim — that is the shape
that breaks when the thing it cites moves, while a `path:line` suffix is
a reading aid nothing validates
([okf-layout.md](../write-OKF/okf-layout.md)). 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 ## Two mouths
@ -66,6 +79,8 @@ the user asks, or when a cite no longer resolves.
- **Never** write on a self-fire, in any form, however small. - **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 - **Never** skip step 1 to reach step 3 — an unread OKF is what makes a
recon into research. recon into research.
- **Never** shell out to `codegraph` — the MCP server is the only mouth;
keeping the index fresh is its job, not sound's.
- **Never** run in a subagent, background or otherwise: the findings are - **Never** run in a subagent, background or otherwise: the findings are
the deliverable and belong in the calling context. the deliverable and belong in the calling context.
- **Never** leave the repo past the no-internal-owner gap — general web - **Never** leave the repo past the no-internal-owner gap — general web