v0.2 → v0.3
What changed from v0.2 to v0.3
From v0.2 (11 May) to v0.3 (12 May): 2,558 words to 4,810 words, 4,644 words in new or rewritten paragraphs and 2,392 taken out, 198 paragraphs changed.
Second-week report: a fifth building block and self-checking documentsA new report one day later, almost twice as long. The checks now run on every push, the design documents check their own cross-references, and two AI sessions working on the same code got explicit ownership zones after they collided. The paper also places the method next to established practice.
- A fifth building block: round-trip tests that prove a probe actually sees what the system wrote.
- The checks grew from 32 to 91, and the pre-push gate now blocks a push when they fail.
- A new section compares the method with spec-driven development, decision records, the C4 model, domain-driven design, CQRS and "boring architecture".
- New sections on ownership zones, a design-principles file and tolerance for short-lived states.
- A maturity curve, a ranked list of pending work, and a limitations section.
v0.2 · 11 May 2026v0.3 · 12 May 2026
v0.2 · RSC v0.2 — Practical Notes from the First Week of the Discipline# RSC v0.2 — Practical Notes from the First Week of the Discipline
removed in v0.3
not in v0.2
v0.3 · RSC v0.3 — From Optics to Self-Auditing Contracts: A Maturity Report# RSC v0.3 — From Optics to Self-Auditing Contracts: A Maturity Report
v0.2 · RSC v0.3 — From Optics to Self-Auditing Contracts: A Maturity Report**Oscar Serra¹, Jarvis (Claude Opus 4.7)²** ¹Independent Research ²TinkerClaw, anchored on OpenClaw *Paper J15 — Version 0.2 — 11 May 2026*
v0.3 · 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*
v0.2 · RSC v0.2 — Practical Notes from the First Week of the Discipline**Internal codename:** RSC (after the retrosplenial cortex; see v0.1 §1.2 and §8) **Status:** the four primitives proposed in v0.1 are deployed on the live fork. The merge gate runner exists (`pnpm bible:invariants`, 32/32 passing). Probes for the four high-priority surfaces are live RPCs. Bible is now a folder of fifteen files. The auto-merge cron itself is still off pending integration with the gate.
removed in v0.3
not in v0.2
v0.3 · 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.
··· 1 unchanged paragraph folded ···
v0.2 · 0. Why a v0.3## 0. Why a v0.2
v0.3 · 0. Why a v0.3## 0. Why a v0.3
v0.2 · 0. Why a v0.2v0.1 was a proposal; v0.2 is a report from one week of using the proposal on a live system. Three things changed our mind about details of the design:
removed in v0.3
v0.2 · 0. Why a v0.21. **The bible should be a folder, not a single file with frontmatter.** v0.1 imagined `bible.md` carrying per-section YAML frontmatter. In practice the AI's context window benefits more from *small files* than from *small sections inside a big file*: a single file is loaded all-or-nothing. Splitting the bible into sixteen targeted files lets the AI load `failures.md` (~150 lines) when debugging and `flows.md` when refactoring, and never look at the other fourteen. 2. **The pii-boundary file has to be self-aware.** Any file that *documents* a leak grep is itself going to match its own grep. The fix is a verify command that explicitly excludes the self-documenting file from the check. A general lesson: meta-rules need carve-outs from their own enforcement. 3. **Probe RPCs need PATH-aware shell invocation.** `pnpm` prepends `./node_modules/.bin` to PATH; if a binary like `openclaw` exists in both the local node_modules and `/usr/local/bin`, pnpm's stub wins. The merge gate runner must prepend `/usr/local/bin:/usr/bin:/bin` to PATH or every system-tool invocation breaks. We hit this on the first run and would have hit it in production.
removed in v0.3
v0.2 · 0. Why a v0.2What follows is the practical layer: how the discipline is actually applied, in our codebase, with dumbed-down examples from things that broke.
removed in v0.3
not in v0.2
v0.3 · 0. Why a v0.3v0.1 proposed. v0.2 reported one week of practice. v0.3 reports the second week — during which the discipline crossed three thresholds simultaneously:
not in v0.2
v0.3 · 0. Why a v0.31. **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.
not in v0.2
v0.3 · 0. Why a v0.3What v0.2 framed as "lessons" v0.3 frames as **theorems with empirical proof attached**.
··· 1 unchanged paragraph folded ···
v0.2 · 1. The bible folder, after one week## 1. The bible folder, after one week
removed in v0.3
v0.2 · 1. The bible folder, after one weekThe bible is `~/src/tinkerclaw/TINKER_UI_DESIGN_BIBLE/`. Sixteen files. One entry point, one narrative, thirteen structural, plus a redirect stub at the old path.
removed in v0.3
v0.2 · 1. The bible folder, after one week``` TINKER_UI_DESIGN_BIBLE/ ├── INDEX.md ← AI entry point and map ├── bible.md ← narrative, intent, decisions, don't-regress (now ~1730 lines) ├── tinker-ui.md ← UI layout + visual language + feature registry (~1095 lines) ├── bug-log.md ← historical bug-fix log, forensic timeline (~290 lines) ├── flows.md ← sequence diagrams (Mermaid) for the top 7 pipelines ├── lifecycles.md ← state machines for sessions, workers, messages, recovery ├── topology.md ← components, ports, plugins, channels, symlinks ├── config-shape.md ← every openclaw.json key + override chain ├── failures.md ← failure-mode propagation maps (M1–M10) ├── probes.md ← inspection primitives registry (live + proposed) ├── tool-loop.md ← the cc-bridge / claude-cli divergence ├── auth-routing.md ← model rank, provider routing, billing gate ├── crons.md ← cron registry + auto-merge policy ├── pii-boundary.md ← public-OK vs private-only + sanitization workflow ├── memory-layout.md ← workspace memory directory map + writers └── subagents-and-recipes.md ← subagent spawn + recipe catalog + Prefrontal split ```
removed in v0.3
v0.2 · 1. The bible folder, after one week`INDEX.md` is the only file the AI is *required* to read at session start. The rest are loaded on demand based on the question. The question-to-file mapping is encoded in INDEX.md as a verbatim lookup table.
removed in v0.3
v0.2 · Concrete payoff: a debug session that was### Concrete payoff: a debug session that was
removed in v0.3
v0.2 · Concrete payoff: a debug session that wasWhen a user asks "why did Jarvis say something went wrong on WhatsApp yesterday at 16:55," the AI's old flow was:
removed in v0.3
v0.2 · Concrete payoff: a debug session that was> Open the bible. ctrl-F "WhatsApp". Read 200 lines of context. Read more. Try to remember if there was a cc-bridge thing. Open the bible's §11 because that's where backend stuff lives. Realize the timeout discussion was in §11.6d. Re-read the surrounding §11.6c and §11.6e. Now think about whether the symptom fits.
removed in v0.3
v0.2 · Concrete payoff: a debug session that wasThe new flow is:
removed in v0.3
v0.2 · Concrete payoff: a debug session that was> Read `failures.md` (150 lines). Match the symptom to row M1 (cc-bridge SIGTERM). Follow the cited probe (`debug.session.config`). Confirm the resolved timeout is 600000ms — the path is alive. Conclude the symptom is from an older session that timed out before the fix shipped.
removed in v0.3
v0.2 · Concrete payoff: a debug session that wasThe first flow is six turns; the second is two. The compression is the *single owner per fact* rule from v0.1 §4.1, paid for at write time.
removed in v0.3
not in v0.2
v0.3 · 1. What v0.1 and v0.2 got right## 1. What v0.1 and v0.2 got right
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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 unchanged paragraph folded ···
v0.2 · 2. The four primitives, instantiated## 2. The four primitives, instantiated
removed in v0.3
v0.2 · 2.1 Multi-optic atlas → fifteen typed files### 2.1 Multi-optic atlas → fifteen typed files
removed in v0.3
v0.2 · 2.1 Multi-optic atlas → fifteen typed filesv0.1 named seven candidate optics. In practice we landed on fifteen files because some narrative content (the `bible.md` and the `bug-log.md` historical timeline) does not fit any single optic and deserves its own file, and because Tinker UI's visual feature registry is large enough to warrant a dedicated file (`tinker-ui.md` weighs in at ~1100 lines).
removed in v0.3
v0.2 · 2.1 Multi-optic atlas → fifteen typed files**Lesson:** don't constrain the count up front. Let each optic emerge from a distinct *class of question* that an AI is reasonably likely to ask. If two files would always be loaded together, merge them. If one file is loaded for two very different questions, split it.
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 files### 2.2 Executable invariants → 32 verify commands across 11 files
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 filesEach structural file's frontmatter now carries a `verify:` block. Three concrete examples:
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 files**a) Catching the cc-bridge dead-code regression from 2026-05-05.** ```yaml # config-shape.md verify: - name: claude-code provider overlay resolves timeoutSeconds=600 cmd: python3 -c 'import subprocess,json; r=subprocess.run( ["openclaw","gateway","call","debug.session.config","--params", json.dumps({"provider":"claude-code"})],capture_output=True,text=True); assert "\"resolvedRequestTimeoutMs\": 600000" in r.stdout' ```
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 filesIf this assertion fails, the cc-bridge plugin overlay broke. The bug Oscar typed `/new` to discover would have failed this check at merge time.
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 files**b) Catching the handler-wipe class from 2026-04-29.** ```yaml # failures.md verify: - name: M3 fork RPC alive — config.openExternalFile cmd: python3 -c 'import subprocess,json; r=subprocess.run( ["openclaw","gateway","call","config.openExternalFile","--params", json.dumps({"path":"/dev/null"})],capture_output=True,text=True); assert "\"ok\"" in r.stdout' ```
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 filesIf an upstream merge silently drops the handler again, the next nightly run of `pnpm bible:invariants` flags it.
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 files**c) Catching the PII boundary breakage class.** ```yaml # pii-boundary.md verify: - name: bible files do not match the PII leak grep (excludes this self-referential file) cmd: | cd ~/src/tinkerclaw && for f in TINKER_UI_DESIGN_BIBLE/INDEX.md TINKER_UI_DESIGN_BIBLE/flows.md ...; do if grep -P 'Oscar(?! Serra)|...' "$f" >/dev/null 2>&1; then echo "LEAK in $f"; exit 1; fi; done ```
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 filesIf a structural file gains a leaked literal, the gate refuses to push.
removed in v0.3
v0.2 · 2.2 Executable invariants → 32 verify commands across 11 filesThe 32 checks run in approximately 4 seconds end-to-end. Cost is bounded.
removed in v0.3
v0.2 · 2.3 Probe symmetry → six live RPC probes + one log-line probe### 2.3 Probe symmetry → six live RPC probes + one log-line probe
removed in v0.3
v0.2 · 2.3 Probe symmetry → six live RPC probes + one log-line probeWe shipped these RPCs in one commit (`23f7585623`):
removed in v0.3
v0.2 · 2.3 Probe symmetry → six live RPC probes + one log-line probe- `debug.session.config({provider})` — effective resolved providerConfig including plugin overlay state. - `debug.session.state({sessionKey})` — session-store entry plus activeRunIds from the gateway's chatAbortControllers map. - `debug.tail.lastN({sessionKey,n})` — last N parsed messages from a session transcript with a path-safety allowlist. - `cron.lastRun({jobId})` — last receipt JSONL entry plus file mtime and size. - `cron.listJobs` — full cron registry plus per-job freshness in seconds. - `debug.dumpUiSnapshot` — preexisting; renders Tinker UI's chat DOM to a deterministic text file.
removed in v0.3
v0.2 · 2.3 Probe symmetry → six live RPC probes + one log-line probePlus one log-line probe: `[idle-timeout-diag]`, emitted by `attempt.ts` on every turn, showing the resolved idle timeout and where each component of the resolution came from. It is the canary for the cc-bridge timeout class of bugs.
removed in v0.3
v0.2 · 2.3 Probe symmetry → six live RPC probes + one log-line probeThe Symmetry Principle held up in practice. The probes that exist today were each added to *unblock an investigation that was expensive without them* — that's the right cadence, because it forces the maintainer to feel the cost of asymmetry before paying the cost of building a probe.
removed in v0.3
v0.2 · 2.4 Commit-and-timestamp anchors → frontmatter on every file### 2.4 Commit-and-timestamp anchors → frontmatter on every file
removed in v0.3
v0.2 · 2.4 Commit-and-timestamp anchors → frontmatter on every fileEvery structural file carries `last_verified: 2026-05-11` and `last_verified_commit: HEAD`. We treat HEAD-tracking as the lazy default; sections that need precise pinning (e.g., quoting a specific line number) get a frozen commit SHA. This is the discipline that catches Type B obsolescence: when the AI reads a section, the anchor tells it whether the section was rechecked recently. If git log shows the cited files changed yesterday but `last_verified` is from two weeks ago, the AI knows to re-verify before trusting.
removed in v0.3
not in v0.2
v0.3 · 2. The fifth primitive: round-trip-tested symmetry## 2. The fifth primitive: round-trip-tested symmetry
not in v0.2
v0.3 · 2. The fifth primitive: round-trip-tested symmetryv0.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
not in v0.2
v0.3 · 2. The fifth primitive: round-trip-tested symmetryv0.3 adds a fifth:
not in v0.2
v0.3 · 5. **Manifest-injection round-trips**### 5. **Manifest-injection round-trips**
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 5. **Manifest-injection round-trips**Concrete instance shipped this session: `failures.md M10` (stuck session) now reads:
not in v0.2
v0.3 · 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. ```
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
··· 1 unchanged paragraph folded ···
v0.2 · 3. The merge gate runner## 3. The merge gate runner
removed in v0.3
v0.2 · 3. The merge gate runner`scripts/test-invariants.mjs` walks every `*.md` in the bible directory, parses YAML frontmatter, and runs each `verify.cmd` through a bash subshell with a 30-second timeout. Exits 0 if every check passes, 1 if any fails, 2 on internal error.
removed in v0.3
v0.2 · 3. The merge gate runnerInvoked as `pnpm bible:invariants`. Total runtime on the current state: about 4 seconds for 32 checks.
removed in v0.3
v0.2 · 3. The merge gate runnerThe runner is small — under 300 lines, with a hand-rolled YAML subset parser to avoid pulling in `js-yaml` as a build-time dependency. It is intentionally not over-engineered.
removed in v0.3
v0.2 · 3.1 Wiring into the merge cron### 3.1 Wiring into the merge cron
removed in v0.3
v0.2 · 3.1 Wiring into the merge cronThe `daily-fork-sync` cron job is currently **disabled** (per crons.md). When re-enabled, the gate inserts here:
removed in v0.3
v0.2 · 3.1 Wiring into the merge cron``` upstream merge → pnpm build → pnpm bible:invariants → ship | block ```
removed in v0.3
v0.2 · 3.1 Wiring into the merge cronIf `pnpm bible:invariants` exits non-zero, the merge does not ship. The failing section names land in the cron receipt, so the operator sees exactly which behavior was lost and where the bible expects to find it.
removed in v0.3
v0.2 · 3.1 Wiring into the merge cronWe have not yet re-enabled the cron. The plan is: one more pass adding `verify` blocks to the four files that currently lack them (`bible.md`, `bug-log.md`, `flows.md`, `lifecycles.md`, `tool-loop.md`, `tinker-ui.md`), then a pilot week of running the gate manually before letting the cron own it.
removed in v0.3
not in v0.2
v0.3 · 3. Industry convergence## 3. Industry convergence
not in v0.2
v0.3 · 3. Industry convergenceThe 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.
not in v0.2
v0.3 · 3.1 Spec-Driven Development (SDD)### 3.1 Spec-Driven Development (SDD)
not in v0.2
v0.3 · 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**.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 3.2 Architecture Decision Records (ADRs)### 3.2 Architecture Decision Records (ADRs)
not in v0.2
v0.3 · 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…").
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 3.3 The C4 model### 3.3 The C4 model
not in v0.2
v0.3 · 3.3 The C4 modelC4 organizes architecture documentation hierarchically: **Context → Container → Component → Code**. The bible's existing files map cleanly:
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 3.3 The C4 modelWe 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.
not in v0.2
v0.3 · 3.4 Domain-Driven Design (DDD) tactical patterns### 3.4 Domain-Driven Design (DDD) tactical patterns
not in v0.2
v0.3 · 3.4 Domain-Driven Design (DDD) tactical patternsDDD 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.
not in v0.2
v0.3 · 3.4 Domain-Driven Design (DDD) tactical patternsThe `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).
not in v0.2
v0.3 · 3.5 Capability-oriented design### 3.5 Capability-oriented design
not in v0.2
v0.3 · 3.5 Capability-oriented designCapability-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.
not in v0.2
v0.3 · 3.5 Capability-oriented designThe 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.
not in v0.2
v0.3 · 3.6 CQRS (Command-Query Responsibility Segregation)### 3.6 CQRS (Command-Query Responsibility Segregation)
not in v0.2
v0.3 · 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).
not in v0.2
v0.3 · 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).
not in v0.2
v0.3 · 3.7 Boring architecture### 3.7 Boring architecture
not in v0.2
v0.3 · 3.7 Boring architectureThe "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.
not in v0.2
v0.3 · 3.7 Boring architectureThis 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.
··· 1 unchanged paragraph folded ···
v0.2 · 4. Lessons from the first week (dumbed-down)## 4. Lessons from the first week (dumbed-down)
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)These are the lessons that I would have written into v0.1 if I had known them. They are all small. Together they describe what the discipline actually feels like in use.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L1. "Single owner per fact" requires friction at write time, not at read time.** The temptation when documenting something for two different audiences is to write it twice. Resist. Pick the file whose *primary question* the fact answers, write it there, and reference it everywhere else. Concretely: the cc-bridge idle timeout fix lives in *one* place — `config-shape.md` — and `failures.md`, `tool-loop.md`, and `auth-routing.md` all `see also:` it.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L2. Probes pay for themselves the second time they're used.** The first investigation that needed `debug.session.config` cost about two hours, partly because there was no probe and partly because the AI had to grep across six files to assemble the answer. The probe took 45 minutes to write. The next investigation will take five minutes. Net break-even is at investigation #2.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L3. Verify commands are easier to author than verify *names*.** The mechanical part — write a shell command that exits 0 on success — is fast. The hard part is naming the check well enough that, when it fails six months from now, the maintainer reads the name and immediately knows what's wrong. Spend the naming effort.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L4. The PATH bug we hit on day one will recur in every CI integration.** `pnpm` shadows system binaries via `./node_modules/.bin`. So does Yarn, sometimes. The runner prepends `/usr/local/bin:/usr/bin:/bin` to PATH explicitly. Any future runner that calls system tools needs the same fix. This is the kind of obstacle that v0.1 abstracted away as "implementation details"; in practice it eats half a day.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L5. `jq` is not always installed.** Several initial verify commands used `jq`. The runner failed because `jq` was not on the test machine. We rewrote with `python3 -c`. Lesson: assume nothing about installed tools beyond `bash`, `python3`, and `node`. Those three are reliably present; everything else is luck.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L6. Self-referential files need a carve-out.** `pii-boundary.md` documents the regex it grep-tests against. The first run of the suite failed on the file's own content. The fix: have the verify command explicitly *list* the files it checks and exclude `pii-boundary.md`. The same pattern will recur for any meta-document.
removed in v0.3
v0.2 · 4. Lessons from the first week (dumbed-down)**L7. Migrating a 3000-line file is faster as line-range surgery than as cut-and-paste.** We slimmed bible.md from 3085 → 1728 lines by writing a Python script that read specific line ranges into the new files (`tinker-ui.md`, `bug-log.md`) and wrote the slimmed bible as the complement. The whole operation took under a minute and didn't lose a single line. The naive cut-and-paste would have taken hours and probably dropped content.
removed in v0.3
not in v0.2
v0.3 · 4. New abstractions, discovered in practice## 4. New abstractions, discovered in practice
not in v0.2
v0.3 · 4. New abstractions, discovered in practiceThese are concepts the discipline produced *after v0.2 shipped*. None were named in v0.1 or v0.2. All are now first-class.
not in v0.2
v0.3 · 4.1 Ownership zones### 4.1 Ownership zones
not in v0.2
v0.3 · 4.1 Ownership zonesThe 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.
not in v0.2
v0.3 · 4.1 Ownership zonesThe 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).
not in v0.2
v0.3 · 4.1 Ownership zonesThe 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*.
not in v0.2
v0.3 · 4.2 Design principles as a first-class file### 4.2 Design principles as a first-class file
not in v0.2
v0.3 · 4.2 Design principles as a first-class fileThe 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.
not in v0.2
v0.3 · 4.2 Design principles as a first-class fileThe 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").
not in v0.2
v0.3 · 4.2 Design principles as a first-class fileThe 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.
not in v0.2
v0.3 · 4.3 Wrapper composition as a substrate### 4.3 Wrapper composition as a substrate
not in v0.2
v0.3 · 4.3 Wrapper composition as a substrateThe 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.
not in v0.2
v0.3 · 4.3 Wrapper composition as a substrateThis 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.
not in v0.2
v0.3 · 4.4 The pre-push gate (load-bearing)### 4.4 The pre-push gate (load-bearing)
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 4.5 Bible meta-verify### 4.5 Bible meta-verify
not in v0.2
v0.3 · 4.5 Bible meta-verifyEvery 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).
not in v0.2
v0.3 · 4.5 Bible meta-verifyThe 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.
not in v0.2
v0.3 · 4.5 Bible meta-verifyIn 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.
not in v0.2
v0.3 · 4.6 Transient-state tolerance in the runner### 4.6 Transient-state tolerance in the runner
not in v0.2
v0.3 · 4.6 Transient-state tolerance in the runnerThe 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:
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 4.6 Transient-state tolerance in the runnerThis 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.
··· 1 unchanged paragraph folded ···
v0.2 · 5. What v0.1 missed## 5. What v0.1 missed
removed in v0.3
v0.2 · 5. What v0.1 missedIn retrospect:
removed in v0.3
v0.2 · 5. What v0.1 missed- **v0.1 underestimated the value of a redirect stub at the old path.** External references (CLAUDE.md, code comments, memory notes) point at `TINKER_UI_DESIGN_BIBLE.md` (the old single file). When that file became a directory, the old `.md` path stayed in place as a 525-byte stub redirecting to `INDEX.md`. This is cheaper than chasing every external reference and prevents silent lookup failures. - **v0.1 said "the cost of an invariant is one line of YAML frontmatter."** That was wrong. The cost is roughly *five lines of YAML plus 30 minutes of design thought*: which probe should the check use? What is the failure mode this check is meant to catch? What's the right assertion shape? The discipline is cheap, not free. - **v0.1 did not anticipate the meta-document carve-out (L6).** This is now baked in. - **v0.1 underweighted the value of having the gate runner produce *colored, human-readable* output even when it exits non-zero.** A failing check that prints the stderr tail in red, with the section name highlighted, is dramatically easier to triage than a numeric exit code. The runner is only ~300 lines but the output formatting is doing real work.
removed in v0.3
not in v0.2
v0.3 · 5. The maturity curve## 5. The maturity curve
not in v0.2
v0.3 · 5. The maturity curveAfter 9 days, four version bumps, and 18 commits to public develop:
not in v0.2
v0.3 · 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)** |
not in v0.2
v0.3 · 5. The maturity curveThe 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.
not in v0.2
v0.3 · 5. The maturity curveThis 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.
··· 1 unchanged paragraph folded ···
v0.2 · 6. Pending work, ordered by leverage## 6. Pending work, by class
v0.3 · 6. Pending work, ordered by leverage## 6. Pending work, ordered by leverage
v0.2 · 6. Pending work, by class> **Emptied 2026-05-12 — superseded by v0.3 §6.** Every item that lived here has either shipped or been re-classified under v0.3's leverage-ordered backlog. This section is preserved as a header (so external references resolve) but the list itself now lives in `2026-05-12-rsc-v0.3.md` §6 "Pending work, ordered by leverage", which is the canonical source going forward. > > Snapshot of how Class A–E from v0.2 resolved: > > - **Class A (verify backfill)** — all six files now carry `verify:` blocks (see v0.3 Appendix C). > - **Class B (merge-gate cron integration)** — the runner is now wired into `pnpm test` AND `git-hooks/pre-push`, so the gate runs on every push regardless of cron state; merge-cron integration remains queued behind the `daily-fork-sync` re-enable decision. > - **Class C (more probes)** — `wa.lastOutbound` and `plugin.boot.status` shipped, plus 4 additional probes (`gateway.stuckSessions`, `gateway.diagnosticSessionCount`, `gateway.observability.snapshot`, `gateway.flow.replay`). `cc-bridge.workerInfo` remains queued (requires plugin-API extension). > - **Class D (architectural follow-ups)** — cc-bridge heartbeat stream events SHIPPED (commit `12bb2c4f7a`, made the 600s overlay belt-and-suspenders); `self.lid` population and synchronous session-status-on-surface_error still pending. > - **Class E (bible slimming)** — `bible.md` slimmed from 1,730 → ~1,500 lines via phase-3 extraction (§5.66 cc-bridge mechanics → `tool-loop.md`, §5.78 branch policy → new `branch-policy.md`).
removed in v0.3
not in v0.2
v0.3 · 6. Pending work, ordered by leverageThe 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):
not in v0.2
v0.3 · Class A — Correlation IDs (highest leverage, highest implementation cost)### Class A — Correlation IDs (highest leverage, highest implementation cost)
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · Class B — Structured journal (JSON logs)### Class B — Structured journal (JSON logs)
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · Class C — Negative-evidence logging### Class C — Negative-evidence logging
not in v0.2
v0.3 · 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."
not in v0.2
v0.3 · Class C — Negative-evidence loggingImplementation cost: medium (in-memory map of pending operations, timer). Implementation strategy: ship as a `pipeline.ts` wrapper (`withCompletionTracking`); apply to new event sources first.
not in v0.2
v0.3 · Class D — More `manifest_via:` RPCs### Class D — More `manifest_via:` RPCs
not in v0.2
v0.3 · Class D — More `manifest_via:` RPCsM10 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.
not in v0.2
v0.3 · Class D — More `manifest_via:` RPCsImplementation 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.
not in v0.2
v0.3 · Class E — Bug-pattern linter### Class E — Bug-pattern linter
not in v0.2
v0.3 · Class E — Bug-pattern linterToday'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.
not in v0.2
v0.3 · Class E — Bug-pattern linterImplementation 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.
not in v0.2
v0.3 · Class F — SLOs + burn-rate alarms### Class F — SLOs + burn-rate alarms
not in v0.2
v0.3 · Class F — SLOs + burn-rate alarmsDefine 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.
not in v0.2
v0.3 · Class F — SLOs + burn-rate alarmsImplementation 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.
not in v0.2
v0.3 · Class G — Self-registering server-methods### Class G — Self-registering server-methods
not in v0.2
v0.3 · Class G — Self-registering server-methodsThe 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).
not in v0.2
v0.3 · Class G — Self-registering server-methodsImplementation 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.
not in v0.2
v0.3 · Class H — App.ts split### Class H — App.ts split
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · Open follow-ups carried from v0.2### Open follow-ups carried from v0.2
not in v0.2
v0.3 · 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.
··· 1 unchanged paragraph folded ···
v0.2 · 7. Conclusion## 7. Conclusion
removed in v0.3
v0.2 · 7. Conclusionv0.1 was a thesis. v0.2 is a report on it being true.
removed in v0.3
v0.2 · 7. ConclusionThe four primitives — multi-optic documentation, executable invariants, commit-and-timestamp anchors, probe symmetry — survived contact with a real codebase. They were not all proposed at the right scale (we needed sixteen files, not seven), and the runner needed two implementation-level fixes (PATH, jq) before it would run cleanly. But the underlying mechanic — *write down what should be true, then write down how to check it* — is exactly the right shape for AI-pair coding at velocity.
removed in v0.3
v0.2 · 7. ConclusionThe merge gate runner is the load-bearing piece. Without it, every primitive degrades back into prose. With it, the bible's claims become refuseable: when a claim is false, the merge that made it false does not ship. This is the property that distinguishes a useful documentation discipline from a beautiful one.
removed in v0.3
not in v0.2
v0.3 · 7. Limitations## 7. Limitations
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 7. Limitations---
not in v0.2
v0.3 · 8. Conclusion## 8. Conclusion
not in v0.2
v0.3 · 8. Conclusionv0.1 was a thesis: AI pair coding at velocity needs intermediate abstractions between monolithic code and ad-hoc grepping.
not in v0.2
v0.3 · 8. Conclusionv0.2 was a one-week report: the thesis is true, with caveats about scale and tooling.
not in v0.2
v0.3 · 8. Conclusionv0.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.
not in v0.2
v0.3 · 8. ConclusionThe 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.
not in v0.2
v0.3 · 8. ConclusionThe 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.
not in v0.2
v0.3 · 8. ConclusionThe 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.
not in v0.2
v0.3 · 8. ConclusionThe discipline is now mature enough to be **boring**. That is the goal.
not in v0.2
v0.3 · 8. Conclusion---
not in v0.2
v0.3 · Appendix A — The five primitives (final form)## Appendix A — The five primitives (final form)
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · Appendix B — The 16 design principles (final form, v0.3)## Appendix B — The 16 design principles (final form, v0.3)
not in v0.2
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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · Appendix C — Files mentioned in this paper## Appendix C — Files mentioned in this paper
not in v0.2
v0.3 · Appendix C — Files mentioned in this paperSource 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
not in v0.2
v0.3 · Appendix C — Files mentioned in this paperBible 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
not in v0.2
v0.3 · Appendix D — Industry references for §3## Appendix D — Industry references for §3
not in v0.2
v0.3 · Appendix D — Industry references for §3Convergence with each named framework was independent. The references below are post-hoc evidence, not source material.
not in v0.2
v0.3 · 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.
not in v0.2
v0.3 · Appendix E — Sources used in the writing of v0.3## Appendix E — Sources used in the writing of v0.3
not in v0.2
v0.3 · Appendix E — Sources used in the writing of v0.3Online research conducted 12 May 2026:
not in v0.2
v0.3 · 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)
not in v0.2
v0.3 · Appendix E — Sources used in the writing of v0.3Plus internal artifacts (`TINKER_UI_DESIGN_BIBLE/*`, `src/fork/pipeline.ts`, `scripts/test-invariants.mjs`, public develop commits a52584c129..53762c47a0).
Changed paragraphs in the same form, for scripts: JSON
· Markdown