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

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

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

---

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

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

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

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

v0.3.1 is the smallest possible update that captures this.

---

## 1. The accumulated-drift failure pattern

### 1.1 What happened

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

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

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

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

### 1.2 The pattern in one sentence

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

### 1.3 Generalisation beyond PII

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

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

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

---

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

v0.3 named five primitives:

1. Multi-optic atlas
2. Executable invariants
3. Probe symmetry
4. Commit-and-timestamp anchors
5. Manifest-injection round-trips

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

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

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

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

Asymmetry of consequence ⇒ asymmetry of priority. The constraint formalises this.

---

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

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

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

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

---

## 4. Gate hardening — accumulated-drift scope

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

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

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

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

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

---

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

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

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

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

---

## 6. Memory + agent updates

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

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

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

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

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

---

## 7. Updated maturity claim

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

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

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

---

## 8. Conclusion

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

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

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

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

---

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

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

## Appendix B — Sanitization-first command

The canonical pre-push manual check:

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

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

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

## Appendix C — Sanitization sweep landed in this addendum

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

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

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

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