Skip to content

agents: membrane-tier doctrine + T1/T2 and T2/T3 wardens - #1174

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/membrane-tiers-bbb-fence
Sep 4, 2026
Merged

agents: membrane-tier doctrine + T1/T2 and T2/T3 wardens#1174
AdaWorldAPI merged 1 commit into
mainfrom
claude/membrane-tiers-bbb-fence

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Formalises the 3+ layer abstraction law the workspace already runs piecemeal — the ndarray polyfill at T0/T1, the lance-graph-java mask-native invariant at T2/T3 — as one pattern, inherited by every consumer of the fork. Markdown only, no code.

The principle: a tier may only know the vocabulary of the membrane directly beneath it; nothing crosses a membrane except by name.

Tier May know Crosses UP as Gate
T0 substrate strides, offsets, intrinsics
T1 primitive (ndarray::simd, kernels.rs) &[u64], (offset,stride), IMM mask, count, descriptor polyfill rule (simd-savant)
T2 selection (exports, where/hop) handles, classid, field names, version handle, count, status no hand-composed op / no computed geometry (kernel-membrane-warden)
T3 intent (Java facade, R2IL) names only an outcome no byte position (bbb-warden + ApiSurfaceTest)

Files

  • .claude/knowledge/membrane-tiers.md — the doctrine, the compile-through/entropy rule (old code is re-admitted only by compiling through a membrane, not around it), the agent→membrane map, and an append-only T2→T3 leak ledger (L1–L7). Includes an honest statement of what the gate cannot catch (int classid vs int facet are the same type — reflection can't tell them apart; the warden reviews what the gate can't).
  • kernel-membrane-warden (T1/T2, opus) — NAMED / HAND-COMPOSED / GEOMETRY-LEAK. Catches T2 spelling a T1 op out of smaller ops (two mask_and vs one AND3 ternlog) or computing geometry it should read from a lane accessor.
  • bbb-warden (T2/T3, opus) — HANDLE-CLEAN / BYTE-POSITION / UNNAMED-BREACH. The blood-brain barrier.
  • simd-savant gains its T0/T1 membrane section; preflight-drift-auditor gains a spec-vs-membrane drift check.
  • CLAUDE.md knowledge-base list points at the doctrine.

Provenance

The two fixes landed the same day are the membranes working: the 7.5→1.1 ms lgj_hop (T0/T1 — a primitive gathered a contiguous lane) and the ternlog conjunction (T1/T2 — T2 hand-composed a T1 op). Both in ndarray#301 + lance-graph-java#73.

Paired enforcement PR: AdaWorldAPI/lance-graph-java# (ApiSurfaceTest fence).

🤖 Generated with Claude Code

https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv


Generated by Claude Code

Formalises the 3+ layer abstraction law the workspace already runs
piecemeal (the ndarray polyfill at T0/T1, the lance-graph-java mask-native
invariant at T2/T3) as ONE pattern, inherited by every consumer.

- .claude/knowledge/membrane-tiers.md — the doctrine: five tiers
  (T0 substrate / T1 primitive / T2 selection / T3 intent / R2IL), the rule
  "a tier may only know the vocabulary of the membrane beneath it; nothing
  crosses except by NAME", the compile-through/entropy rule (old code is
  re-admitted only by compiling THROUGH a membrane, not around it), the
  agent->membrane map, and an append-only T2->T3 leak ledger (L1..L7) with
  the honest statement of what the gate cannot catch (int classid vs int
  facet are the same type; the warden reviews what reflection can't).
- kernel-membrane-warden (T1/T2, opus): NAMED / HAND-COMPOSED / GEOMETRY-LEAK.
  Catches T2 spelling a T1 op out of smaller ops (the two-AND vs one AND3
  ternlog) or computing geometry T2 should read from a lane accessor.
- bbb-warden (T2/T3, opus): HANDLE-CLEAN / BYTE-POSITION / UNNAMED-BREACH.
  The blood-brain barrier: names cross, byte positions never do.
- simd-savant gains its T0/T1 membrane section (POLYFILL-CLEAN /
  RAW-INTRINSIC / SHADOW-KERNEL); preflight-drift-auditor gains a
  spec-vs-membrane drift check (a brief must not hand a worker wrong-tier
  vocabulary for the file it edits).
- CLAUDE.md knowledge-base list points at the doctrine.

Markdown only; no code. Provenance: the 7.5->1.1 ms lgj_hop (T0/T1) and the
ternlog conjunction (T1/T2) landed the same day are the membranes working.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_852adfe9-a2a8-482b-8e6f-aac97935875f)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 4, 2026 21:34
@AdaWorldAPI
AdaWorldAPI merged commit 9f8aa77 into main Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants