| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-1ec03b1 |
| 4 | status: exploring |
| 5 | title: Verification policy is path-scoped — required attestations are a function of the diff |
| 6 | created: 2026-07-06 |
| 7 | source: conversation, 2026-07-06 |
| 8 | --- |
| 9 | |
| 10 | # Verification policy is path-scoped |
| 11 | |
| 12 | The integrator derives a change's required attestation set from the **actual tree diff**, never from |
| 13 | the contributor's claim about the change. Policy maps path classes to required checks: |
| 14 | |
| 15 | - `.the-valley/**` only → signature + knowledge lint: frontmatter vetted against a CUE `#Node` |
| 16 | schema (types, status enums, id derived from slug, filename coherence) and reference integrity |
| 17 | (`[[wiki-links]]`, `blocked_by` ids, and relative links all resolve). |
| 18 | - Code → the full check suite ([verification.md](../../design/verification.md)). |
| 19 | - Mixed → the max of everything touched, automatically. |
| 20 | |
| 21 | Because routing is computed from the tree, there is no "node door" to smuggle code through. Mixed |
| 22 | commits are a feature, not a hole — "a landed change closes the outcome it serves" wants code and |
| 23 | node flip in one commit, and that commit simply carries code-level requirements. This is also the |
| 24 | argument for knowledge staying in-tree rather than on its own ref: one protection mechanism, |
| 25 | proportionate checks, no split in the one-clone durability story. |
| 26 | |
| 27 | The policy itself is data — path classes and required checks — so it is a CUE document, versioned |
| 28 | in-repo and validated like everything else. One schema language then covers config, events, and |
| 29 | knowledge. |
| 30 | |
| 31 | The knowledge lint has three lifetimes: a `nix flake check` derivation today (no integrator needed), |
| 32 | the required attestation for `.the-valley/**` diffs at the integrator rung |
| 33 | ([architecture.md](../../design/architecture.md)), and a pure, witness-re-derivable check under the |
| 34 | trust backstop. Same derivation throughout. |
| 35 | |
| 36 | Addendum (2026-07-17, owner observation): the prose corpus has very long lines — whole paragraphs on one line, node files past 900 characters — the kind of thing lint, formatting, and a resubmit CI check would normally catch, and nothing here checks yet. This slots straight into the structure above: a prose-format rule is a missing member of the knowledge lint's check set, with the same three lifetimes (flake check today, attestation later). Candidate convention, undecided: semantic line breaks — one sentence per line — rather than a hard wrap. It renders identically, and it aligns diffs, conflicts, and blame to sentence boundaries, which is worth real money in `valley review` and `[b]` rebases. When the check lands, the corpus reformat is one mechanical sweep, kept to a single commit so blame churn is contained. |
| 37 | |
| 38 | ## Related |
| 39 | |
| 40 | - Extends the one-structural-invariant idea (only the integrator writes protected refs) one level |
| 41 | down, path-wise within a ref. |
| 42 | - The scheduling context this serves: [[ida-3145b7a]] — cheap node integration keeps the graph a |
| 43 | live coordination surface, not ceremony. |