# Privacy-as-Load-Bearing, and the Recipe as Intermediate Abstraction: v0.3 → v0.3.1

From v0.3 (12 May) to v0.3.1 (13 May): 4,810 words to 2,304 words, 2,040 words in new or rewritten paragraphs and 4,546 taken out, 200 paragraphs changed.

## Change note of v0.3.1

**Privacy addendum - a leak that every single push check missed**

A short addendum replaces the maturity report. A day after version 0.3 called the method mature, private details were found in the shared history although every push had passed the privacy check. Each push only scanned its own changes; the sum of all pushes was never scanned. The paper turns that into a general lesson and a new rule.

- The failure pattern in one sentence: a check on each change proves no change made things worse, not that the whole is clean.
- New rule: privacy ranks above function, because a leak on public history cannot be taken back.
- The push gate now also scans everything not yet on the main branch.
- The same shape is shown in other contracts: performance budgets, bundle size, schema migrations.
- The claim of maturity is narrowed accordingly.

## Changed paragraphs

Marks: [-removed-] {+added+}.

### RSC v0.3 — From Optics to Self-Auditing Contracts: A Maturity Report

[-# RSC v0.3 — From Optics to Self-Auditing Contracts: A Maturity Report-]

### RSC v0.3.1 — Privacy-as-Load-Bearing (Addendum to v0.3)

{+# RSC v0.3.1 — Privacy-as-Load-Bearing (Addendum to v0.3)+}

### RSC v0.3.1 — Privacy-as-Load-Bearing (Addendum to v0.3)

**Oscar Serra¹, Architect (Claude Opus 4.7)²** ¹Independent Research ²TinkerClaw, anchored on OpenClaw *Paper J15 — Version [-0.3-] {+0.3.1+} — [-12-] {+13+} May 2026*

### RSC v0.3 — From Optics to Self-Auditing Contracts: A Maturity Report

[-**Internal codename:** RSC (after the retrosplenial cortex; see v0.1 §1.2 and §8) **Status:** The bible discipline is 24 hours older than v0.2 and substantially more mature. Five primitives now (v0.1 had four). The merge-gate runner is **load-bearing on every push**, not just every merge. The bible **audits itself**. Round-trip self-tests exist for the first failure mode. Three independent agents (Architect, Jarvis, upstream-merge cron) now have explicit ownership zones. Industry convergence is striking: the discipline matches Spec-Driven Development, ADRs, C4, and capability-oriented design almost line for line, without us having reached for any of them by name.-]

### RSC v0.3.1 — Privacy-as-Load-Bearing (Addendum to v0.3)

{+**Internal codename:** RSC (after the retrosplenial cortex; see v0.1 §1.2 and §8) **Status:** A 24-hour addendum to v0.3. One new design principle (#17 — *privacy precedes functionality*), one gate-hardening (the pre-push hook now scans accumulated drift, not just the push-range), one new failure-pattern identification (*accumulated-drift across individually-clean pushes*), and one tightened claim in the v0.3 conclusion. The five primitives from v0.3 stand; v0.3.1 adds a constraint that those primitives operate under.+}

### 0. Why a v0.3

[-## 0. Why a v0.3-]

### 0. Why a v0.3

[-v0.1 proposed. v0.2 reported one week of practice. v0.3 reports the second week — during which the discipline crossed three thresholds simultaneously:-]

### 0. Why a v0.3

[-1. **It became automatic.** `pnpm bible:invariants` now runs on every `pnpm test` and inside the `git-hooks/pre-push` gate. The gate has already refused its own commits during this session, twice, when transient state would have masked a real regression. The bible's claims are now enforced, not aspirational. 2. **It became self-auditing.** A "meta-verify" phase walks the bible's cross-references, ownership claims, INDEX coverage, and `diagnose_with` → probes.md resolution. The bible can no longer drift quietly; its first orphaned cross-reference was caught and fixed within minutes of the meta-verify shipping. 3. **It became multi-agent-aware.** Two parallel Claude Code sessions (Architect + Jarvis, both on the same gateway) collided over `tinker-ui/src/app.ts` for ~30 minutes on day 1, then again on a registry-stale verify. The fix wasn't a tighter lock — it was an explicit ownership map plus a relaxed verify shape that tolerates the legitimate concurrency. The discipline learned to live with multiple authors instead of pretending only one existed.-]

### 0. Why a v0.3

[-What v0.2 framed as "lessons" v0.3 frames as **theorems with empirical proof attached**.-]

### 0. Why v0.3.1 (24 hours after v0.3)

{+## 0. Why v0.3.1 (24 hours after v0.3)+}

### 0. Why v0.3.1 (24 hours after v0.3)

{+v0.3's conclusion claimed the discipline was mature enough to be "boring." Within 24 hours we found a class of failure the discipline had **not** caught: PII accumulating across individually-clean pushes. The pre-push hook scanned each push's range and reported zero hits for every push for two weeks. The union across the develop branch carried 16 hits — none of which any single push had introduced from "clean to dirty"; each had inherited from a prior commit.+}

### 0. Why v0.3.1 (24 hours after v0.3)

{+The principle this exposes is sharp: *the gate is necessary, not sufficient*. The gate proves no push made the situation worse. It does not prove the situation is clean.+}

### 0. Why v0.3.1 (24 hours after v0.3)

{+The fix is small (the gate now scans both the push-range AND `origin/main..HEAD`), but the lesson is large. **Privacy is not a co-equal axis with functionality; it dominates.** A regression in functionality can be fixed in the next commit. A leaked first name or phone number on public history can never be retracted from the audit trail of "what was public, when."+}

### 0. Why v0.3.1 (24 hours after v0.3)

{+v0.3.1 is the smallest possible update that captures this.+}

### 1. What v0.1 and v0.2 got right

[-## 1. What v0.1 and v0.2 got right-]

### 1. What v0.1 and v0.2 got right

[-**The bible folder pattern works.** Splitting one monolithic markdown into 19 small per-question files (v0.2 ended at 16; v0.3 added `wa-triggers.md`, `branch-policy.md`, `ownership.md`, `design-principles.md`) lets an AI load `failures.md` when debugging M10 and `flows.md` when tracing a turn, never both at once. The compression is asymmetric: the *first reader's* cost goes from 3,000 lines to ~150, and the *first writer's* cost stays roughly constant because writing one fact in one place is the same effort regardless of how many places it could have lived.-]

### 1. What v0.1 and v0.2 got right

[-**Executable invariants pay for themselves at the second failure.** The 32 verify checks of v0.2 grew to 91 in v0.3 (61 per-file + 24 meta-verify + 6 unit-test-layer). Two specific regressions were caught at gate time during this session: the `tinker-ui` registry going stale because a parallel Jarvis session added more FORK comments, and the `debug.dumpUiSnapshot` verify being over-strict in the no-UI-connected state. Both surfaced because the gate refused to push, not because a human noticed.-]

### 1. What v0.1 and v0.2 got right

[-**The Symmetry Principle held.** Every write surface added since v0.2 came with its paired probe in the same PR. The discipline becomes self-reinforcing: writing the probe forces you to articulate what the write surface promises to do. We shipped six new probes in 48 hours (`wa.recentOutbound`, `gateway.stuckSessions`, `gateway.diagnosticSessionCount`, `plugin.boot.status`, `gateway.observability.snapshot`, `gateway.flow.replay`) plus the inverse (`debug.simulate.stuckSession`) without anyone treating it as extra work.-]

### 1. What v0.1 and v0.2 got right

[-**Commit-and-timestamp anchors caught a stale claim.** `CLAUDE.md` said "the Bible is a DIRECTORY of 13 files." It was. Now it's 19. The meta-verify would have caught it via "INDEX.md mentions every bible file" eventually; a human caught it first because the claim was load-bearing in a session-start instruction. The lesson: anchors are necessary but not sufficient; load-bearing claims need the strongest enforcement available.-]

### 1. What v0.1 and v0.2 got right

[-**What v0.1 underestimated (now confirmed):** the gate runner's value isn't the assertions; it's the *refusal to merge*. Without the refusal, every primitive degrades back into prose within months. The refusal makes the bible part of the build, not part of the documentation.-]

### 1. The accumulated-drift failure pattern

{+## 1. The accumulated-drift failure pattern+}

### 1.1 What happened

{+### 1.1 What happened+}

### 1.1 What happened

{+Between 2026-05-11 (when the pre-push PII gate shipped — commit `97f5baea08`) and 2026-05-12, eight Architect commits and one Jarvis commit landed on `origin/develop`. Each push triggered the gate. Each gate run scanned `<remote_sha>..<local_sha>` for the PII regex on lines starting with `+`. Each run reported zero hits. Every push succeeded.+}

### 1.1 What happened

{+On 2026-05-13, when the user asked to advance `main`, the architect ran `git log -p origin/main..origin/develop` over the same regex. The result: **16 hits**. None of those hits had appeared in any individual push range, because:+}

### 1.1 What happened

{+- **Type A — content unchanged across commits.** Lines like `**Per-chat strategy — design note (FORK 2026-05-09 — Oscar's invariant).**` lived in `bible.md` before the pre-push gate shipped. They were carried forward verbatim when bible.md was slimmed into `wa-triggers.md`; the line was unchanged in the *destination* file by the slim script. No push added a new PII line — the line was old. - **Type B — content edited but PII preserved.** Lines that DID change across commits, but where the PII token survived the edit. Each push's diff showed the change as a `-<old>` followed by `+<new>` where `<new>` still contained the matched token. The gate scanned `+` lines and flagged them. But the gate was either (a) bypassed because the line was inside a self-excluded file (e.g., the pre-push hook excluded the original `bible.md` at one point, then no longer excluded it after a restructure), or (b) flagged but inside an earlier commit on develop, which the per-push scan re-flagged but the user-visible test focused on the latest push.+}

### 1.1 What happened

{+The net result: develop accumulated PII across 50+ commits while every individual push passed its own gate.+}

### 1.2 The pattern in one sentence

{+### 1.2 The pattern in one sentence+}

### 1.2 The pattern in one sentence

{+> A diff-based gate scoped to the push-range proves each push doesn't make things worse. It does not prove the cumulative state is clean.+}

### 1.3 Generalisation beyond PII

{+### 1.3 Generalisation beyond PII+}

### 1.3 Generalisation beyond PII

{+The pattern is the same for any contract that needs to hold over the cumulative state, not just over each step:+}

### 1.3 Generalisation beyond PII

{+- Schema-drift contracts: a single migration may not violate the schema invariant, but a chain of three migrations might land in a state none of them individually broke. - Performance contracts: a single commit may not regress a benchmark by 5%, but seven commits each regressing by 0.9% land beyond the threshold. - Bundle-size contracts: a single dependency add may be small, but the accumulated dependency tree exceeds the budget.+}

### 1.3 Generalisation beyond PII

{+Anywhere a contract is "the system state must satisfy X," a per-delta gate is necessary but not sufficient. **The gate must check the absolute state, not just the delta.**+}

### 2. The fifth primitive: round-trip-tested symmetry

[-## 2. The fifth primitive: round-trip-tested symmetry-]

### 2. The fifth-primitive constraint: privacy dominates functionality

{+## 2. The fifth-primitive constraint: privacy dominates functionality+}

### 2. The fifth-primitive constraint: privacy dominates functionality

{+v0.3 named five primitives:+}

### 2. The fifth-primitive constraint: privacy dominates functionality

[-v0.1 named four primitives:-] 1. Multi-optic atlas 2. Executable invariants 3. Probe symmetry [-(every write surface has a read probe)-] 4. Commit-and-timestamp [-anchors-] {+anchors 5. Manifest-injection round-trips+}

### 2. The fifth primitive: round-trip-tested symmetry

[-v0.3 adds a fifth:-]

### 5. **Manifest-injection round-trips**

[-### 5. **Manifest-injection round-trips**-]

### 5. **Manifest-injection round-trips**

[-> Every failure mode that names a `diagnose_with:` probe should also name a `manifest_via:` RPC. The probe is the read side; manifest is the write side. The round-trip is: call `manifest_via` to inject the fault, then call `diagnose_with` and confirm the fault is detected, then call `manifest_via {action:"clear"}` to remove it. The round-trip is a single test that proves the entire chain works, not just the read or the write in isolation.-]

### 5. **Manifest-injection round-trips**

[-This closes a gap v0.1 didn't name. A `diagnose_with:` claim that's never been exercised is a *hope*, not a contract. Symmetric pairing without round-trip testing is the same shape as a unit test that mocks every dependency — it asserts the parts work, not the whole.-]

### 5. **Manifest-injection round-trips**

[-Concrete instance shipped this session: `failures.md M10` (stuck session) now reads:-]

### 5. **Manifest-injection round-trips**

[-```yaml - diagnose_with: gateway.stuckSessions({thresholdMs:60000}) returns processing sessions older than 60s, sorted by age. - manifest_via: debug.simulate.stuckSession({ageMs:120000}) injects a fake processing session aged 2 minutes; calling gateway.stuckSessions immediately after must include it. ```-]

### 5. **Manifest-injection round-trips**

[-The round-trip is one shell command. It is admin-scoped, so it cannot be abused. The pattern is documented for the other nine failure modes (M1–M9); each will inherit it as the matching `manifest_via:` RPC ships.-]

### 5. **Manifest-injection round-trips**

[-**Why this is a primitive and not a pattern:** because asymmetry of evidence about alarms (we know what the probes return, we don't know whether they fire when they should) is responsible for at least three bug-log entries that resolved as "we thought we'd catch it but didn't." The round-trip is the test that catches the test.-]

### 2. The fifth-primitive constraint: privacy dominates functionality

{+v0.3.1 adds a **constraint that primitives 2 and 3 operate under**:+}

### 2. The fifth-primitive constraint: privacy dominates functionality

{+> **Constraint P — Privacy dominates functionality.** When a verify command catches a privacy contract violation, no functional work proceeds until the violation is fixed. The PII boundary is not graded against functional delivery deadlines; it is a hard precondition for every push and every promotion. Bypasses exist (`PII_GUARD=off` for the maintainer's-own-byline case) but are emergency-only and require written justification.+}

### 2. The fifth-primitive constraint: privacy dominates functionality

{+This is the discipline's first explicit priority-axis constraint. Up to v0.3, all five primitives were notionally co-equal — failure of any meant the gate refused. v0.3.1 acknowledges that privacy failures are not interchangeable with functional failures:+}

### 2. The fifth-primitive constraint: privacy dominates functionality

{+- A bible verify that fails because a probe returned the wrong shape: refusable, fixable next session, no permanent damage. - A bible verify that fails because a PII pattern appeared in committed history: refusable, fixable next session, **but the public history still records the violation**, irreversibly.+}

### 2. The fifth-primitive constraint: privacy dominates functionality

{+Asymmetry of consequence ⇒ asymmetry of priority. The constraint formalises this.+}

### 3. Industry convergence

[-## 3. Industry convergence-]

### 3. Industry convergence

[-The RSC discipline did not start from any of the named frameworks below. It started from "what would let a multi-agent AI team work safely on a fork." The convergence is therefore evidence — different starting points reached the same shape.-]

### 3.1 Spec-Driven Development (SDD)

[-### 3.1 Spec-Driven Development (SDD)-]

### 3.1 Spec-Driven Development (SDD)

[-SDD, as articulated in 2026 by GitHub's spec-kit and the InfoQ piece on the topic, inverts the relationship between specifications and code: **specifications become authoritative, code becomes derivative, drift detection becomes mandatory**.-]

### 3.1 Spec-Driven Development (SDD)

[-This is the bible discipline almost verbatim. The bible files are the specification. The `verify:` blocks are the drift detection. The merge gate is the enforcement. The convergence runs deep enough that we could re-label the entire RSC discipline as "domain-specific SDD for AI-pair-coded forks" without changing any of the artifacts.-]

### 3.1 Spec-Driven Development (SDD)

[-The one place RSC goes further than SDD: **the spec is also indexed for AI navigation**. SDD's specifications are written for humans first, AI second. RSC's bible is written for AI first (audience: AI), humans second. The question-to-file routing in `INDEX.md` is the AI-navigation primitive; classical SDD does not have an equivalent.-]

### 3.2 Architecture Decision Records (ADRs)

[-### 3.2 Architecture Decision Records (ADRs)-]

### 3.2 Architecture Decision Records (ADRs)

[-ADRs capture single architectural decisions — context, the decision, consequences, status. The bible's narrative file (`bible.md`) and `bug-log.md` together carry this content, but not in the ADR shape. The 16 design principles in `design-principles.md` are the closest match — each is essentially an ADR for a meta-decision ("we choose folder-by-feature over folder-by-layer because…").-]

### 3.2 Architecture Decision Records (ADRs)

[-Where RSC currently lags ADR best practice: **decisions are not individually addressable**. ADR-001, ADR-002 are linkable; bible §5.66 is, but the slimmed narrative makes that harder, and the structural files (`tool-loop.md`, etc.) are organized by question class, not by decision. A v0.4 evolution may introduce a `decisions/` subdirectory inside the bible with one ADR per file, hyperlinked from the narrative.-]

### 3.3 The C4 model

[-### 3.3 The C4 model-]

### 3.3 The C4 model

[-C4 organizes architecture documentation hierarchically: **Context → Container → Component → Code**. The bible's existing files map cleanly:-]

### 3.3 The C4 model

[-- `topology.md` ≈ C4 L1 Context + L2 Containers (process tree, ports, plugins). - `flows.md` + `lifecycles.md` ≈ C4 dynamic diagrams (sequence + state). - Per-domain structural files (`tool-loop.md`, `wa-triggers.md`, `cc-bridge` provider mechanics) ≈ C4 L3 Components. - The source code itself is C4 L4.-]

### 3.3 The C4 model

[-We did not adopt C4 by name. We arrived at the same hierarchy because each level answers a distinct class of question, which is RSC's first primitive.-]

### 3.4 Domain-Driven Design (DDD) tactical patterns

[-### 3.4 Domain-Driven Design (DDD) tactical patterns-]

### 3.4 Domain-Driven Design (DDD) tactical patterns

[-DDD tactical patterns include **bounded contexts**, **aggregates**, **entities/value objects**, **repositories**, **domain events**. The bible's "single owner per fact" rule is the aggregate-root rule applied to documentation: one place owns one concept; everything else refers to it. The `single_owner: yes` claim in each file's frontmatter makes the bounded context explicit. The meta-verify enforces it.-]

### 3.4 Domain-Driven Design (DDD) tactical patterns

[-The `failures.md` M-entries are domain events under another name: each is a discrete occurrence that propagates through the system; each has a unique identity (M1..M10); each pairs with detection (diagnose_with) and now manifestation (manifest_via).-]

### 3.5 Capability-oriented design

[-### 3.5 Capability-oriented design-]

### 3.5 Capability-oriented design

[-Capability-oriented design grants discrete capabilities via unforgeable tokens. The fork's scope system (`READ_SCOPE`, `WRITE_SCOPE`, `ADMIN_SCOPE`, `APPROVALS_SCOPE`, `PAIRING_SCOPE`, `TALK_SECRETS_SCOPE`) is capability-oriented at the RPC layer. Every new probe RSC ships explicitly declares its scope. The new `debug.simulate.stuckSession` lives in ADMIN_SCOPE because injecting state requires write capability; `gateway.observability.snapshot` lives in READ_SCOPE because aggregation is inspection-only.-]

### 3.5 Capability-oriented design

[-The discipline RSC adds: **every fork-added scope entry has a paired verify** that confirms an unauthorized caller is rejected. We have not yet shipped this verify class; it is queued in §6.-]

### 3.6 CQRS (Command-Query Responsibility Segregation)

[-### 3.6 CQRS (Command-Query Responsibility Segregation)-]

### 3.6 CQRS (Command-Query Responsibility Segregation)

[-CQRS separates write paths (commands) from read paths (queries). The bible's probe-vs-write split is CQRS-shaped. The new `debug-flow-replay.ts` is in particular a CQRS read model — it reconstructs the operation's event history from a different source than the live write path, with different consistency guarantees (eventually consistent, journal-lagged, capped at 200 events).-]

### 3.6 CQRS (Command-Query Responsibility Segregation)

[-The CQRS frame suggests an evolution: a dedicated **events table** that holds every operation's structured event log, with `flow.replay` reading from it. We are not there yet (the current implementation reads journalctl text); the API is shaped so the source can swap underneath without breaking callers, per design-principles.md #4 (wrapper composition over bespoke closures).-]

### 3.7 Boring architecture

[-### 3.7 Boring architecture-]

### 3.7 Boring architecture

[-The "boring architecture" movement argues for well-known patterns over novel ones. RSC's convergence with five separate frameworks is the proof that RSC is boring in this strict sense: nothing it does is novel; everything it does has been done somewhere else under a different name. The novel part is the *combination* — six well-known patterns assembled into a single discipline that fits AI-pair coding specifically.-]

### 3.7 Boring architecture

[-This is the right kind of novel. It means an engineer who already knows ADRs, C4, SDD, DDD, capability-oriented design, and CQRS will recognize RSC in roughly two readings. Onboarding cost is bounded.-]

### 3. The new design principle (#17)

{+## 3. The new design principle (#17)+}

### 3. The new design principle (#17)

{+Codified in `TINKER_UI_DESIGN_BIBLE/design-principles.md` as principle #17 (the file was at 16 principles in v0.3; this is the first growth-by-incident):+}

### 3. The new design principle (#17)

{+> **17. Privacy precedes functionality.** > > **Why.** Privacy is not a co-equal axis with functionality; it dominates. A change that ships private data degrades trust in a way no later functional improvement can undo. The PII boundary is the contract; the leak-grep gate is the enforcement; both must run BEFORE main can advance and BEFORE the maintainer says "ship it." When sanitization is in tension with delivery speed, sanitization wins. > > **How to apply.** (a) Treat `PII_GUARD=off` bypass as emergency-only; every use requires written justification. (b) The pre-push hook scans TWO scopes from 2026-05-13: the push-range AND `origin/main..HEAD`. Pushing develop tests against main; pushing main is the final gate. (c) When auditing manually before a `develop → main` merge, run the canonical leak-grep over `origin/main..origin/develop` excluding self-referential files. Zero hits required, no exceptions. (d) Educational files use `<FirstName>` / `<owner-e164>` placeholder patterns so they don't trip their own grep.+}

### 3. The new design principle (#17)

{+The principle is the codification. The runtime enforcement is the gate-hardening below.+}

### 4. New abstractions, discovered in practice

[-## 4. New abstractions, discovered in practice-]

### 4. New abstractions, discovered in practice

[-These are concepts the discipline produced *after v0.2 shipped*. None were named in v0.1 or v0.2. All are now first-class.-]

### 4.1 Ownership zones

[-### 4.1 Ownership zones-]

### 4.1 Ownership zones

[-The bible folder pattern handles "who owns this *fact*?" but not "who owns this *code file*?" The latter became urgent when a parallel Jarvis session collided with the Architect session on `tinker-ui/src/app.ts` and again on the auto-generated FORK registry table.-]

### 4.1 Ownership zones

[-The new `ownership.md` file declares per-folder ownership: Architect-owned paths, Jarvis-owned paths, upstream-owned paths, **shared hotspots** (where both agents may write but must pull-before-push), and architect-only paths (the bible itself, scripts, git-hooks).-]

### 4.1 Ownership zones

[-The interesting part isn't the map — it's that the map's existence reframed the bug. The collision wasn't "two agents touched the same file"; it was "no policy declared who could touch it." The map didn't fix the collision; it made the collision *expected and resolvable*.-]

### 4.2 Design principles as a first-class file

[-### 4.2 Design principles as a first-class file-]

### 4.2 Design principles as a first-class file

[-The bible's prose contained many implicit rules ("don't put fork RPCs in the central registry", "prefer adding a new file over editing a central one", "every write surface has a probe"). They were folklore. New agents could re-derive them only by reading enough of the bible to internalize the patterns.-]

### 4.2 Design principles as a first-class file

[-The new `design-principles.md` codifies them: 16 numbered rules. Each principle has a "Why" paragraph (the rationale) and a "How to apply" paragraph (the concrete handle). Other bible files now cite principles by number ("#13 round-trip-test the symmetry").-]

### 4.2 Design principles as a first-class file

[-The structural shift: **rules are addressable**. When the meta-verify catches an orphan, the fix is to add a reference, which means anchoring it to a principle. This pushes the bible from a collection of facts toward a collection of *justified* facts.-]

### 4.3 Wrapper composition as a substrate

[-### 4.3 Wrapper composition as a substrate-]

### 4.3 Wrapper composition as a substrate

[-The fork has at least five hand-coded wrapper patterns (idle-timeout, heartbeat, retry, overlay-merge, PII guard), all of them roughly "given a function `next`, return a wrapped function that does X then calls next." The new `src/fork/pipeline.ts` factors out the shape: `compose(withTrace, withRetry, withTimeout)(doWork)` composes wrappers innermost-first, with three canned wrappers shipped from day one.-]

### 4.3 Wrapper composition as a substrate

[-This is straightforward middleware composition. The novelty is the discipline: **new wrappers go through `compose`; existing wrappers stay where they are (per design-principles.md #14, rule of three)**. The substrate exists for the next wrapper, not for retrofitting old ones. Refactoring a working wrapper to use the substrate would pay an immediate merge-conflict tax for no behavior change.-]

### 4.4 The pre-push gate (load-bearing)

[-### 4.4 The pre-push gate (load-bearing)-]

### 4.4 The pre-push gate (load-bearing)

[-The merge gate of v0.2 ran on demand. The pre-push gate of v0.3 runs **on every push**, as part of `git-hooks/pre-push`. It refuses pushes that fail the bible's verify checks. This is the change that makes the bible part of the build rather than part of the documentation.-]

### 4.4 The pre-push gate (load-bearing)

[-Empirical proof: in this session, the gate refused two commits that would have shipped with stale verify checks. Both pushes succeeded after the verify entries were corrected. Without the gate, neither would have been caught until a user noticed.-]

### 4.4 The pre-push gate (load-bearing)

[-The pre-push gate has bypasses (`PII_GUARD=off`, `BIBLE_GUARD=off`) for the WIP-push case, but they require explicit acknowledgement at push time. The discipline tolerates exceptional friction without normalizing it.-]

### 4.5 Bible meta-verify

[-### 4.5 Bible meta-verify-]

### 4.5 Bible meta-verify

[-Every per-file verify checks one file. The meta-verify checks **the bible as a corpus**: every `see_also:` resolves to a real file; every file is registered in `INDEX.md`; no two files share the same `single_owner:` domain; every probe named in `failures.md`'s `diagnose_with:` exists in `probes.md`'s Live table; `design-principles.md` is referenced from at least two other files (otherwise it's an orphaned principle set).-]

### 4.5 Bible meta-verify

[-The meta-verify is the bible doing what it asks every other system to do: **measure itself against its own contract**. Design-principles.md #16 ("the bible audits itself") is now operational rather than aspirational.-]

### 4.5 Bible meta-verify

[-In practice the meta-verify caught its first issue 30 minutes after shipping: `design-principles.md` was orphaned (only INDEX.md referenced it). Two cross-references in other bible files fixed it. The fix took 60 seconds; without the meta-verify it would have rotted silently.-]

### 4.6 Transient-state tolerance in the runner

[-### 4.6 Transient-state tolerance in the runner-]

### 4.6 Transient-state tolerance in the runner

[-The merge gate must distinguish **regression** (the contract is broken; refuse the push) from **transient state** (the gateway is briefly unreachable or running an older dist than HEAD; the contract may still be valid, we just can't evaluate it). v0.2's runner conflated the two; v0.3's runner classifies:-]

### 4.6 Transient-state tolerance in the runner

[-- `gateway down` patterns (`ECONNREFUSED`, `gateway timeout`, `1006 abnormal closure`, `connection refused`) → SKIP yellow, doesn't fail the gate. - `gateway stale` patterns (`unknown method`, `INVALID_REQUEST`, `unavailable during gateway startup`) → SKIP yellow with a distinct label ("restart to pick up latest dist"). - Real failures → FAIL red, blocks the push.-]

### 4.6 Transient-state tolerance in the runner

[-This is the third primitive's *fault-tolerance* dimension that v0.1 did not anticipate. A probe being temporarily unevaluable is not a regression; conflating them would make the gate so noisy nobody would trust it.-]

### 4. Gate hardening — accumulated-drift scope

{+## 4. Gate hardening — accumulated-drift scope+}

### 4. Gate hardening — accumulated-drift scope

{+`scripts/pii-pre-push.sh` now scans **two scopes** on every push:+}

### 4. Gate hardening — accumulated-drift scope

{+1. **Push-range** (existing): `${remote_sha}..${local_sha}` for each pushed ref. 2. **Accumulated-drift** (new 2026-05-13): `origin/main..${local_sha}` for each pushed ref where the local sha isn't already an ancestor of origin/main.+}

### 4. Gate hardening — accumulated-drift scope

{+The second scope catches PII that landed on develop in an earlier push (when individual gate scans were clean over their own ranges). It runs the same regex, on the same kind of unified diff, against the same exclusion list. It produces the same kind of report. The only difference is the range it inspects.+}

### 4. Gate hardening — accumulated-drift scope

{+Cost: one additional `git log -p` per pushed ref, scoped to commits not on main. In practice this is ~50 commits today, evaluating in ~200ms. Bounded.+}

### 4. Gate hardening — accumulated-drift scope

{+Bypass: same `PII_GUARD=off`. The bypass applies to BOTH scopes — there is no "scope 1 only" partial bypass. The bypass is a flag for "I have read the situation and am acknowledging," not for "this scope is too noisy."+}

### 5. The maturity curve

[-## 5. The maturity curve-]

### 5. The maturity curve

[-After 9 days, four version bumps, and 18 commits to public develop:-]

### 5. The maturity curve

[-| Capability | v0.1 (proposed) | v0.2 (1 week) | v0.3 (2 weeks) | |---|---|---|---| | Bible files | 7 proposed | 16 | 19 | | Verify checks | 0 | 32 | 91 | | Probes (live) | 0 | 6 | 14 | | Failure-modes documented | 0 | 10 | 10 (with M10 now round-trip) | | Merge-gate runner | proposed | manual | **on every push** | | Self-audit | none | none | **24 meta-checks** | | Multi-agent ownership | implicit | implicit | **explicit (ownership.md)** | | Design principles | implicit | implicit | **16 numbered (design-principles.md)** | | Wrapper substrate | n/a | n/a | **`src/fork/pipeline.ts` + 15 tests** | | Round-trip-tested faults | 0 | 0 | 1 (M10) | | Industry frameworks aligned | 0 | 0 | **6 (SDD, ADR, C4, DDD, capability, CQRS)** |-]

### 5. The maturity curve

[-The shape of this curve is the most interesting outcome of v0.3. Each capability builds on the previous one, but the **leverage compounds**. The bible files (v0.2's payoff) made the verifies possible. The verifies made the merge gate possible. The merge gate made the meta-verify worth writing. The meta-verify made design-principles a load-bearing file rather than aspirational prose.-]

### 5. The maturity curve

[-This is the right kind of pattern for a discipline: the early investments unlock progressively more powerful enforcement, and each level of enforcement makes the level below it cheaper to maintain.-]

### 5. Failure-mode generalisation: who else has this shape?

{+## 5. Failure-mode generalisation: who else has this shape?+}

### 5. Failure-mode generalisation: who else has this shape?

{+Reviewing v0.3's pending list through the new lens:+}

### 5. Failure-mode generalisation: who else has this shape?

{+- **Class C (negative-evidence logging)** — same shape. A per-call check that "the expected event fired within N seconds" is per-delta. The cumulative version is "across the operation's full graph, no expected event went unfired." Today's `withCompletionTracking` is the per-delta version. A cumulative variant — "every operation that started in the last 24h has a matching `done` event" — would be the accumulated-drift counterpart. - **Class F (SLOs + burn-rate)** — already in this shape by design. SLOs are absolute-state contracts (target: ≥95% over a window). The burn-rate computation evaluates the window, not each individual event. SLOs were the example v0.3 had right by accident. - **Class E (bug-pattern linter)** — currently per-delta (scans the full source tree but each rule fires on a local pattern). Generalisation: a rule could check the cumulative count of pattern instances in the tree, refusing PRs that introduce the Nth instance. Future enhancement.+}

### 5. Failure-mode generalisation: who else has this shape?

{+The lesson: every contract should be examined for the question "is the per-delta check sufficient, or do we need a cumulative-state check?" The answer is "cumulative" more often than "per-delta," but the implementation cost of cumulative checks is higher, so per-delta is the default. The discipline now flags this default as a *known shortcut*, not a complete solution.+}

### 6. Pending work, ordered by leverage

[-## 6. Pending work, ordered by leverage-]

### 6. Pending work, ordered by leverage

[-The brainstorm session of 2026-05-11 produced ten next-move candidates. Eight shipped. Two remain plus several new items that emerged. Ordered roughly by leverage (most-bang-for-buck first):-]

### Class A — Correlation IDs (highest leverage, highest implementation cost)

[-### Class A — Correlation IDs (highest leverage, highest implementation cost)-]

### Class A — Correlation IDs (highest leverage, highest implementation cost)

[-A single ID threading through every log line, probe event, plugin call, and outbound message for one operation. Without it, joining "what happened in turn X" requires correlating runId, sessionKey, openclawSessionId, sometimes a span ID. With it, one substring matches everything.-]

### Class A — Correlation IDs (highest leverage, highest implementation cost)

[-Implementation cost: high (touches every event site). Implementation strategy: introduce a `withCorrelationId(...)` wrapper in `pipeline.ts`, retrofit only new code, let existing code adopt via the rule of three. Estimated full rollout: 2–3 sessions of disciplined incremental adoption.-]

### Class B — Structured journal (JSON logs)

[-### Class B — Structured journal (JSON logs)-]

### Class B — Structured journal (JSON logs)

[-The gateway emits text log lines (`[diagnostic] stuck session: …`). Modern observability practice (OpenTelemetry, Uptrace, SigNoz) converges on JSON every line with consistent fields. The downstream win: `gateway.flow.replay` stops being journalctl grep and becomes a structured query.-]

### Class B — Structured journal (JSON logs)

[-Implementation cost: high (touches the gateway logging core). Implementation strategy: introduce a fork-side structured logger, route only new event sources through it, let upstream log lines stay text for now. Bridge: a parser layer that converts text events to structured ones at read time, so `flow.replay`'s API doesn't change.-]

### Class C — Negative-evidence logging

[-### Class C — Negative-evidence logging-]

### Class C — Negative-evidence logging

[-"X was supposed to happen but didn't" is responsible for at least 7 bug-log entries. Today we log positive events only. Negative-evidence logging records expected-but-missing events: "expected `lifecycle:end` for runId=Y within 30s, did not see it."-]

### Class C — Negative-evidence logging

[-Implementation cost: medium (in-memory map of pending operations, timer). Implementation strategy: ship as a `pipeline.ts` wrapper (`withCompletionTracking`); apply to new event sources first.-]

### Class D — More `manifest_via:` RPCs

[-### Class D — More `manifest_via:` RPCs-]

### Class D — More `manifest_via:` RPCs

[-M10 has its round-trip. M1 (cc-bridge SIGTERM), M5 (plugin native-deps missing), M6 (configSchema missing) are next priority. Each requires a fault-injection hook that's safe to call in production-like environments.-]

### Class D — More `manifest_via:` RPCs

[-Implementation cost: per-mode varies. M5 is easy (mark a plugin record as `error`); M1 requires injecting state into pi-agent-core's idle timer. Strategy: ship the easy ones first; the harder ones can wait.-]

### Class E — Bug-pattern linter

[-### Class E — Bug-pattern linter-]

### Class E — Bug-pattern linter

[-Today's bug-log taxonomy (`ui-state-clear ×7`, `event-ordering ×7`, `auth-token ×5`, `merge-wipe`, `lid-routing`) shows recurring code shapes. A static linter that recognizes the shapes refuses PRs that introduce another instance. Bug-log becomes preventive.-]

### Class E — Bug-pattern linter

[-Implementation cost: medium (one rule per pattern, AST-level). Strategy: start with one high-frequency class (`ui-state-clear`); add rules as bugs accumulate by class.-]

### Class F — SLOs + burn-rate alarms

[-### Class F — SLOs + burn-rate alarms-]

### Class F — SLOs + burn-rate alarms

[-Define service-level objectives for the high-leverage flows: chat reply latency, WA reply latency, plugin boot completion, cron success rate. Track burn-rate against the budget. The framework is documented (OpenTelemetry, Nobl9, BackendBytes); the implementation is small.-]

### Class F — SLOs + burn-rate alarms

[-Implementation cost: low–medium. Strategy: pick three SLOs to start, ship the computation as a new probe (`gateway.slo.burnRate`), wire alarms only after a week of baseline data.-]

### Class G — Self-registering server-methods

[-### Class G — Self-registering server-methods-]

### Class G — Self-registering server-methods

[-The central `server-methods.ts` registry is the highest-merge-friction file in the fork. Each new probe adds two lines; every upstream merge risks a wipe. The fix is a discoverable-handler pattern (handlers register via side-effect import).-]

### Class G — Self-registering server-methods

[-Implementation cost: medium–high (touches upstream's central pattern). Strategy: defer per the ownership.md rule that says upstream files get minimal-touch edits. Revisit after Class A–F are done.-]

### Class H — App.ts split

[-### Class H — App.ts split-]

### Class H — App.ts split

[-`tinker-ui/src/app.ts` carries 65 of 75 fork-UI anchors. Splitting it by domain (panels, chat, header, hud) would dramatically reduce collision risk with the parallel Jarvis session. **Explicitly user-deferred** ("don't change the UI"); listed here only because it remains the single largest structural lever the fork has not yet pulled.-]

### Open follow-ups carried from v0.2

[-### Open follow-ups carried from v0.2-]

### Open follow-ups carried from v0.2

[-- cc-bridge heartbeat stream events: **shipped** in v0.3 (the 600s overlay is now belt-and-suspenders, not load-bearing). - `self.lid` population from whatsmeow auth state: still pending. - Synchronous session-status transitions on surface_error: still pending.-]

### 6. Memory + agent updates

{+## 6. Memory + agent updates+}

### 6. Memory + agent updates

{+The new principle is durable across sessions only if BOTH AI agents (Architect Claude Code in its own repository, Jarvis cc-bridge runtime in `~/.openclaw/workspace/`) reach for it without prompting. Three updates landed alongside the principle:+}

### 6. Memory + agent updates

{+1. **Architect-side auto-memory** at the Architect's memory folder (`feedback_sanitization_before_push.md`) — describes the WHEN/HOW (sanitization-first sequencing, canonical command, "do not say 'pushed' until zero hits"). Registered at the top of `MEMORY.md`.+}

### 6. Memory + agent updates

{+2. **Jarvis-side workspace** at `~/.openclaw/workspace/AGENTS.md` — adds a bullet under Engineering Discipline: "Sanitization before push" plus the canonical command. Visible to Jarvis on every session because AGENTS.md is part of his standard load.+}

### 6. Memory + agent updates

{+3. **Jarvis-side knowledge note** at `~/.openclaw/workspace/memory/knowledge/tinkerclaw-bible.md` — extends the "Don't do these" section with "Don't push to tinkerclaw without checking sanitization first" plus the principle reference.+}

### 6. Memory + agent updates

{+The Architect's auto-memory is loaded automatically at session start. The Jarvis-side files are loaded by the Jarvis persona when his task touches fork code. The pre-push hook is the last line of defence; the memory entries make it the first thing the agents check unprompted.+}

### 7. Limitations

[-## 7. Limitations-]

### 7. Limitations

[-**The discipline has not been tested against an actual upstream merge regression yet.** The `daily-fork-sync` cron is still disabled; the bible's M3 (handler-wipe) verifies are correct but unfired. When the cron is re-enabled, we will see whether the gate's refusal cleanly rolls back the merge or merely flags it. Until then, the gate's most important behavior is theoretical.-]

### 7. Limitations

[-**The discipline has been validated by one operator over two weeks.** Generalizability claims require generalizability evidence. The convergence with six industry frameworks (§3) is one strong signal that the patterns are not idiosyncratic. The fact that two parallel AI sessions can work the bible at once without colliding (after ownership.md) is another. But the third independent operator hasn't tried it.-]

### 7. Limitations

[-**The meta-verify's heuristics are crude.** "Every backticked token of shape `domain.noun.verb` in failures.md must appear in probes.md" works in practice; it would miss a probe referenced by a non-standard format. A future iteration should derive the probe registry from `method-scopes.ts` directly (the authoritative source), not from prose pattern matching.-]

### 7. Limitations

[-**The bible is a documentation discipline, not a software design discipline.** RSC tells you how to *describe* the code; it does not tell you how to *write* the code. design-principles.md is a partial bridge — 16 rules that constrain how new code is structured — but writing new code that follows the rules still requires craftsmanship the bible cannot supply.-]

### 7. Updated maturity claim

{+## 7. Updated maturity claim+}

### 7. Updated maturity claim

{+v0.3 claimed: "the discipline now enforces itself … when a fork commit breaks one of its claims, the push is refused — by the bible, against the bible's own commit, at the gate the bible itself defined."+}

### 7. Updated maturity claim

{+v0.3.1 sharpens: *enforces itself within scope*. The scope of v0.3's gate was per-delta. The scope of v0.3.1's gate is per-delta AND accumulated-drift. The discipline still has scopes it doesn't cover (e.g., cross-repo cumulative state spanning tinkerclaw + jarvis-brain), but the most consequential within-fork scope is now covered.+}

### 7. Updated maturity claim

{+The honest framing: **the discipline catches what it scopes**. v0.3.1's main contribution is identifying that scoping itself is a primitive — what the discipline INTERROGATES is as important as what it asserts.+}

### 8. Conclusion

[-v0.1 was a thesis: AI pair coding at velocity needs intermediate abstractions between monolithic code and ad-hoc grepping.-]

### 8. Conclusion

[-v0.2 was a one-week report: the thesis is true, with caveats about scale and tooling.-]

### 8. Conclusion

[-v0.3 is a maturity report: **the discipline has crossed the threshold where it enforces itself**. The bible is no longer documentation that may or may not be current. It is part of the build. When a fork commit breaks one of its claims, the push is refused — by the bible, against the bible's own commit, at the gate the bible itself defined.-]

### 8. Conclusion

[-The fifth primitive — round-trip-tested symmetry between manifestation and diagnosis — is the discipline's first "the test that tests the test" mechanism. Without it, the bible's alarms are hopes. With it, they are contracts.-]

### 8. Conclusion

[-The industry convergence with SDD, ADRs, C4, DDD, capability-oriented design, and CQRS is unexpectedly comprehensive. RSC did not start from any of them. It arrived at all of them by following a single thread: *what would let multiple AI agents work this codebase safely at velocity?* The answer is six well-known patterns assembled in a specific way that fits the AI-pair-coding case better than any individual framework does on its own.-]

### 8. Conclusion

[-The most surprising empirical finding is the **leverage compounding** of the maturity curve. Bible files made verifies possible. Verifies made the gate possible. The gate made meta-verify worth writing. Meta-verify made design-principles a load-bearing file. Each unlock made the next one cheaper. The cost curve looks linear in effort and compound in capability — the right shape for a discipline meant to outlive any single session's attention budget.-]

### 8. Conclusion

[-The discipline is now mature enough to be **boring**. That is the goal.-]

### 8. Conclusion

{+A 24-hour addendum. One incident. One principle. One gate-hardening. The fix is tactical; the lesson is structural.+}

### 8. Conclusion

{+The structural lesson: **per-delta enforcement is necessary but not sufficient**. Any contract that holds over absolute state needs an absolute-state check, not just a delta check. The discipline up to v0.3 was implicitly per-delta everywhere; v0.3.1 names the shortcut and patches the highest-cost instance (privacy). The other instances (negative evidence, bug patterns) are now known-shortcut and queued for future cumulative-state extensions.+}

### 8. Conclusion

{+The constraint principle: **priority axes are not co-equal**. Privacy dominates functionality because asymmetry of consequence (irreversible vs reversible) demands asymmetry of priority. The discipline's first explicit priority constraint is codified as design-principle #17.+}

### 8. Conclusion

{+The trust principle (already in v0.3 but worth restating): **the gate is the last line of defence, not the first.** The first line is the writer being aware of the rule. The discipline keeps both — the principle is in the bible, the rule is in two AI agents' memory, the gate is in the hook. Each is necessary; none is sufficient.+}

### Appendix A — The five primitives (final form)

[-## Appendix A — The five primitives (final form)-]

### Appendix A — The five primitives (final form)

[-1. **Multi-optic atlas.** One file per question class. The AI loads one file, gets one optic, answers one class of question. 2. **Executable invariants.** Every load-bearing claim has a `verify:` block. Failure refuses the merge. 3. **Probe symmetry.** Every write surface has a paired read probe in the same PR. No asymmetry of evidence about live state. 4. **Commit-and-timestamp anchors.** Every section carries `last_verified` and `last_verified_commit`. Stale anchors flag re-verification. 5. **Manifest-injection round-trips.** Every documented failure mode has both `diagnose_with:` (read) and `manifest_via:` (write/admin) so the diagnosis path is end-to-end exercised, not just inspected.-]

### Appendix B — The 16 design principles (final form, v0.3)

[-## Appendix B — The 16 design principles (final form, v0.3)-]

### Appendix B — The 16 design principles (final form, v0.3)

[-Code organization: (1) one concern per file, named for the concern, (2) folders "scream" what the app does, (3) DRY at the seams not inside modules, (4) wrapper composition over bespoke closures, (5) validate at boundaries trust inside.-]

### Appendix B — The 16 design principles (final form, v0.3)

[-Concurrency + merge friction: (6) one-feature-per-file beats one-line-in-many-files, (7) pull before every push, (8) upstream files get minimal-touch edits only.-]

### Appendix B — The 16 design principles (final form, v0.3)

[-Observability + debugging: (9) observability is a design property not a bolt-on, (10) one correlation ID threads through everything, (11) probes paired with the write surface they shadow, (12) negative evidence is logged too, (13) round-trip-test the symmetry.-]

### Appendix B — The 16 design principles (final form, v0.3)

[-Process discipline: (14) defer abstraction until the second change, (15) don't over-do it, (16) the bible audits itself.-]

### Appendix C — Files mentioned in this paper

[-## Appendix C — Files mentioned in this paper-]

### Appendix C — Files mentioned in this paper

[-Source code: - `src/fork/pipeline.ts`, `src/fork/pipeline.test.ts` — wrapper composition substrate - `src/gateway/server-methods/debug-flow-replay.ts` — `gateway.flow.replay` probe - `src/gateway/server-methods/observability-snapshot.ts` — single-call aggregator - `src/gateway/server-methods/debug-simulate.ts` — admin-scope fault injector - `src/gateway/server-methods/gateway-probes.ts` — `gateway.stuckSessions`, `gateway.diagnosticSessionCount` - `src/gateway/server-methods/plugin-probes.ts` — `plugin.boot.status` - `src/gateway/server-methods/wa-probes.ts` — `wa.recentOutbound`, `wa.lastOutbound` - `scripts/test-invariants.mjs` — merge gate runner with meta-verify - `scripts/pii-pre-push.sh`, `git-hooks/pre-push` — push gates-]

### Appendix C — Files mentioned in this paper

[-Bible files (19 total): - `INDEX.md` — entry point + question-to-file routing - `bible.md` — narrative, decisions, don't-regress (now ~1500 lines, down from 3085) - `design-principles.md` — 16 numbered rules (new in v0.3) - `ownership.md` — folder-level ownership map (new in v0.3) - `branch-policy.md` — public-fork branch model (new in v0.3) - `wa-triggers.md` — WhatsApp trigger contract + LID rescue (new in v0.3) - `probes.md` — inspection primitives registry - `failures.md` — failure-mode propagation maps (M1–M10 with diagnose_with/manifest_via) - `flows.md` — sequence diagrams for top pipelines - `lifecycles.md` — state machines - `topology.md` — components/ports/plugins - `config-shape.md` — every openclaw.json key + override chain + dead-code trap registry - `tool-loop.md` — cc-bridge divergence (now with shipped heartbeat fix) - `auth-routing.md` — model rank, provider routing - `crons.md` — cron registry + auto-merge policy - `pii-boundary.md` — public-OK vs private-only + sanitization - `memory-layout.md` — workspace memory dir map - `subagents-and-recipes.md` — subagent spawn + recipe catalog - `unit-tests.md` — fork-side test strategy + bible-coherence rules - `bug-log.md` — historical bug-fix forensic timeline (with failure-class taxonomy) - `tinker-ui.md` — UI layout + visual language + auto-generated FORK registry-]

### Appendix D — Industry references for §3

[-## Appendix D — Industry references for §3-]

### Appendix D — Industry references for §3

[-Convergence with each named framework was independent. The references below are post-hoc evidence, not source material.-]

### Appendix D — Industry references for §3

[-- **Spec-Driven Development (SDD)**: GitHub spec-kit; InfoQ "Spec Driven Development: When Architecture Becomes Executable" (2026). - **Architecture Decision Records (ADRs)**: adr.github.io; AWS Architecture Blog "Master ADRs" (2025); joelparkerhenderson/architecture-decision-record on GitHub. - **C4 model**: Simon Brown's c4model.com; visual-c4.com. - **Domain-Driven Design tactical patterns**: Microsoft Azure Architecture Center "Use Tactical DDD"; Eric Evans original DDD. - **Capability-oriented design**: capability-based-security patterns; the OCaml/Pony tradition; Java's later "capability tokens" experiments. - **CQRS**: Greg Young's original formulation; microservices.io pattern catalog. - **Observability Driven Development**: OneUptime "How to Implement ODD with OpenTelemetry" (2026); Honeycomb's foundational writing on the topic. - **Boring architecture**: Dan McKinley's "Choose Boring Technology" (2015), still the canonical reference.-]

### Appendix E — Sources used in the writing of v0.3

[-## Appendix E — Sources used in the writing of v0.3-]

### Appendix E — Sources used in the writing of v0.3

[-Online research conducted 12 May 2026:-]

### Appendix E — Sources used in the writing of v0.3

[-- ["Architectural Decision Records (ADRs)" — adr.github.io](https://adr.github.io/) - ["Master architecture decision records (ADRs): Best practices" — AWS Architecture Blog](https://aws.amazon.com/blogs/architecture/master-architecture-decision-records-adrs-best-practices-for-effective-decision-making/) - ["Software Architecture: Architecture Decision Record & C4" — Decathlon Digital](https://medium.com/decathlondigital/software-architecture-architecture-decision-record-c4-11ceff211baf) - ["Spec Driven Development: When Architecture Becomes Executable" — InfoQ](https://www.infoq.com/articles/spec-driven-development/) - ["Spec-Driven Development" — github/spec-kit](https://github.com/github/spec-kit/blob/main/spec-driven.md) - ["What Is Spec-Driven Development? A Complete Guide" — Augment Code](https://www.augmentcode.com/guides/what-is-spec-driven-development) - ["Use Tactical DDD to Design Microservices" — Microsoft Azure Architecture Center](https://learn.microsoft.com/en-us/azure/architecture/microservices/model/tactical-domain-driven-design) - ["My LLM coding workflow going into 2026" — Addy Osmani](https://addyosmani.com/blog/ai-coding-workflow/) - ["The Code Agent Orchestra — what makes multi-agent coding work" — Addy Osmani](https://addyosmani.com/blog/code-agent-orchestra/) - ["Architecture Patterns for LLM Systems" — Zekeriya Besiroglu, Medium](https://medium.com/@zekeriyabesiroglu/architecture-patterns-for-llm-systems-83322b1dd537) - ["The State of AI Coding Agents (2026)" — Dave Patten, Medium](https://medium.com/@dave-patten/the-state-of-ai-coding-agents-2026-from-pair-programming-to-autonomous-ai-teams-b11f2b39232a) - ["How to Implement Observability-Driven Development with OpenTelemetry" — OneUptime](https://oneuptime.com/blog/post/2026-02-06-observability-driven-development-opentelemetry/view) - ["Distributed Tracing" — microservices.io pattern catalog](https://microservices.io/patterns/observability/distributed-tracing.html) - ["A Complete Guide to Error Budgets: Setting up SLOs, SLIs, and SLAs" — Nobl9](https://www.nobl9.com/resources/a-complete-guide-to-error-budgets-setting-up-slos-slis-and-slas-to-maintain-reliability)-]

### Appendix E — Sources used in the writing of v0.3

[-Plus internal artifacts (`TINKER_UI_DESIGN_BIBLE/*`, `src/fork/pipeline.ts`, `scripts/test-invariants.mjs`, public develop commits a52584c129..53762c47a0).-]

### Appendix A — The five primitives + one constraint (v0.3.1)

{+## Appendix A — The five primitives + one constraint (v0.3.1)+}

### Appendix A — The five primitives + one constraint (v0.3.1)

{+1. Multi-optic atlas. 2. Executable invariants. 3. Probe symmetry. 4. Commit-and-timestamp anchors. 5. Manifest-injection round-trips. 6. **Constraint P (new):** Privacy dominates functionality. Verify commands enforcing privacy contracts run with priority over verify commands enforcing functional contracts. The pre-push gate scans accumulated drift, not just per-delta. The bypass is emergency-only.+}

### Appendix B — Sanitization-first command

{+## Appendix B — Sanitization-first command+}

### Appendix B — Sanitization-first command

{+The canonical pre-push manual check:+}

### Appendix B — Sanitization-first command

{+``` git -C ~/src/tinkerclaw log -p origin/main..HEAD -- \ ':(exclude)scripts/pii-pre-push.sh' \ ':(exclude)TINKER_UI_DESIGN_BIBLE/pii-boundary.md' \ ':(exclude)CLAUDE.md' \ | grep -P '^\+[^+].*(<owner-first-name>|<colleague-name>|<private-name>|<owner-city>|/home/<user>|<employer>|<vendor>|glpat-|<owner-email>)' | wc -l ```+}

### Appendix B — Sanitization-first command

{+Zero hits required. Self-referential files (the pii-pre-push.sh script and the bible's pii-boundary.md) are excluded by `:(exclude)` because they intentionally contain the regex pattern.+}

### Appendix B — Sanitization-first command

{+Educational examples in other bible files now use `<FirstName>` and `<owner-e164>` placeholder syntax to illustrate the rule without tripping the grep.+}

### Appendix C — Sanitization sweep landed in this addendum

{+## Appendix C — Sanitization sweep landed in this addendum+}

### Appendix C — Sanitization sweep landed in this addendum

{+Eight committed-shippable PII instances were sanitized in commit (forthcoming):+}

### Appendix C — Sanitization sweep landed in this addendum

{+- `wa-triggers.md:121,141` — narrative chat-profile examples rewritten with anonymous patterns ("a paid-practice group", "a technical peer DM", "a very-large group") and "Oscar's invariant" → "the user's invariant"; "Oscar-driven" → "user-driven." - `bible.md:850,863,868,1145,1181` — five hits in narrative + educational use. Sanitized to placeholder syntax (`<FirstName>`, `<owner-e164>`) for educational sections; rewritten for narrative bug-log entries to use "the user." - `src/agents/main-session-restart-recovery.ts:123,330` — two code comments rewritten ("Oscar's directive" → "the user's directive"; "per Oscar" → "user directive"). - `decide-trigger.test.ts:24` — test fixture `<real-number>@s.whatsapp.net` replaced with `+34555111000@s.whatsapp.net` (clearly-fake number; E.164 shape preserved so the trigger logic still exercises the same code path).+}

### Appendix C — Sanitization sweep landed in this addendum

{+Self-referential files (`pii-pre-push.sh`, `pii-boundary.md`, `CLAUDE.md`) intentionally still contain the regex pattern and are excluded from the gate. Bible educational content uses `<FirstName>` placeholders for the same reason.+}

### Appendix C — Sanitization sweep landed in this addendum

{+Verified post-sanitization via `git log -p origin/main..HEAD … | grep -P …`: **zero hits**.+}
