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

**Oscar Serra¹, Architect (Claude Opus 4.7)²**
¹Independent Research
²TinkerClaw, anchored on OpenClaw
*Paper J15 — Version 0.3 — 12 May 2026*

**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.

---

## 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:

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.

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

---

## 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.

**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.

**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.

**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.

**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.

---

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

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

v0.3 adds a fifth:

### 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.

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.

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

```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.
```

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.

**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.

---

## 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)

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**.

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.

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)

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…").

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

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

- `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.

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

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.

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

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.

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)

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).

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

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.

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.

---

## 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

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.

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).

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

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.

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").

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

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.

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)

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.

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.

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

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).

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.

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

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:

- `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.

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.

---

## 5. The maturity curve

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

| 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)** |

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.

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.

---

## 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)

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.

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)

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.

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

"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."

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

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.

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

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.

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

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.

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

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).

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

`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

- 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.

---

## 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.

**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.

**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.

**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.

---

## 8. Conclusion

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

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

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.

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.

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.

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.

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

---

## 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)

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.

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.

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.

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

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

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

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

- **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

Online research conducted 12 May 2026:

- ["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)

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