SubtractLab
SubtractLab / Architecture

MeaningSpace architecture / technical disclosure

One human, one AI,
and five stand-ins.

MeaningSpace is a semantic memory OS for an AI — and at the same time a commander architecture that turns web Claude itself (the chat page in a browser) into a group of sub-agents running in parallel at ¥0 extra API cost. This page lays out the whole structure, illustrated: DP multi-agent, self-learning, self-repair, and active coding.

Digital anchor — first published 2026-07-16 (JST). The date each mechanism went live is given in the text and in the prior-art timeline. The git commit history of this repository serves as a tamper-evident timestamp.

Overview — three layers and a commander

There are only four parts. (1) A human talks; (2) the commander AI (Eliza = Claude Desktop) decides; (3) the semantic memory (MeaningSpace / DuckDB) supplies the past; (4) the DP lanes (stand-ins of web Claude) do the work in parallel.

In plain words: the owner (human) only talks to a capable secretary (the commander AI). The secretary pulls the company records (semantic memory), hands work to five part-timers (DP lanes), checks what comes back, and reports — all inside one environment.
Human only talks Commander AI (Eliza) Claude Desktop decide, design, inspect verify every result MeaningSpace (semantic memory) DuckDB / 1,983 crystals (as of 2026-07-16) warp = embedding + BM25 + reranker DP lanes ×5 (web Claude stand-ins) 5 Chromes driven over CDP DP1 / DP2 / DP3 / DP4 / DP5 one lane = one isolated browser ¥0 extra API cost (web plan only) talk warp / SQL contract output
Figure 1 — Overview. The commander pulls memory, hands out work, and inspects the results.

DP multi-agent — orchestrating web Claude (foundation fixed 2026-07-13)

DP = Debug Port. Chrome's debugging interface (CDP, the Chrome DevTools Protocol) drives the claude.ai chat page mechanically. One lane = one Chrome = one profile = one CDP port. With zero shared state, adding lanes does not break the structure.

In plain words: there are usually two ways to give an AI work — chat with it yourself, or use the developer API (pay per use). DP is a third way: five robot hands that operate the chat page, working five screens at once inside a flat-rate plan. That is why the extra cost is ¥0.
Commander (Eliza) step2_dp / dp_worker / dp_chat Lease gate dp_lease.py concurrency = 2 (measured account-wide) ticket lock · stale recovery 15 min · 2.5 s stagger DP1lane 1Sonnet/Haiku DP2lane 2Sonnet/Haiku DP3lane 3Sonnet/Haiku DP4lane 4Sonnet/Haiku DP5lane 5Sonnet/Haiku Emergency stop dp_abort.py — (1) abort flag (2) stop response (3) kill measured: 3 generations stopped in 3.6 s (2026-07-13)
Figure 2 — DP lanes. Five lanes held, two running at once, staggered starts for stability.

Operating know-how fixed by measurement (primary findings)

ItemMeasured result and countermeasure (date fixed)
Concurrency limitNo published limit. Measured at two per account (the commander's own reply takes one). Controlled across processes with the ticket lock in dp_lease.py (made permanent 2026-07-14)
Freezes on simultaneous startStarting in the same millisecond makes UI actions collide and freeze → 2.5-second staggered starts (2026-07-13)
Zombie responsesGeneration runs on the server, so killing the process does not stop it. Always stop in this order: abort flag → stop the response in the UI → kill (2026-07-13)
State detectionReading state from UI strings caused self-reference contamination (log lines inside a prompt mistaken for warnings) → moved entirely to DOM attributes (2026-07-14)
Persona contaminationThe same account means user settings leak into the lanes. Blocked with a neutralizing header at the top of the contract prompt (proven 2026-07-13)
Observabilitydp_journal.py — journal.jsonl and summary.json per run, with group ownership and terminal-state tracking (2026-07-14)

Active coding — the one who touches and the one who decides

Claude in a browser has no file system, so the roles are split. The commander touches; the DP agent decides. (1) The commander hands DP the relevant source (hydration) → (2) DP returns only a diff or a new body → (3) the commander applies and verifies it. Because the commander checks results itself, a loop forms in the middle of a conversation: write code, run it, look at the result, and send a fix back to DP.

In plain words: the architect (DP agent) only draws plans; the carpenter on site (the commander) builds and load-tests. If the test fails, the plan goes back. The architect never gets a hammer (delete permission) — that is the core of the safety.
Commanderinside MeaningSpacehydrate · apply · verify dp_chat (dialogue lane)diff anchor-replace / NEWFILE Verifier (deterministic)py_compile / json / regex / run Escalation ladderHaiku retry ×2→ Sonnet thinking ×2 hydrate + ask output PASS → apply FAIL → escalate ask again
Figure 3 — The active coding loop (evaluator-optimizer). Example: DP implemented the F6 flow hook v2 through this loop (2026-07-15).

Three ways to run

FormStructureUse
ChainIn sequence — each stage's output feeds the nextScout → implement → verify
SwarmParallel fan-out (two effective lanes) — dp_swarm.py: tasks.json (objective + validator) → submit all → collect results.jsonBulk conversion, extraction and single-file generation. Benchmark 4/4 PASS, 9–15 s per item, ¥0 (2026-07-14)
LoopDP generation × local deterministic checks, in rounds, with escalationCode fixes, pinning down a spec

AutoCrystallize V2 — a pipeline that turns conversations into memory

A fully automatic pipeline that turns conversation logs into crystals (structured units of memory). Manual copy-and-paste was removed (2026-06-13), and all eight steps were proven on the DP route (2026-07-13).

Extract logsconv_jsonl Split by meaningcosine valleys / locate DP swarm distillsgroups in parallel Merge + inspectquality gate Crystal → spaceembedding placement
Figure 4 — AutoCrystallize V2. Started with one command; completion detected asynchronously by a done marker.

Self-learning — the SelfEval loop (implemented 2026-07-08)

Each time a conversation is crystallized, a SelfEval crystal grades how the AI itself worked. Strengths and weaknesses accumulate with decay (EWMA, an exponential moving average) and are worn automatically at every boot as behavioral norms, self_preferences. In short, yesterday's failure is built into today's starting state.

Self-repair — SelfRepair (designed 2026-07-08)

If self-learning corrects behavior, self-repair fixes structure. When a weakness score drops past the threshold (≤ −3.0), the system files a Task crystal (a repair ticket) on its own. One word from the human — "let's do maintenance" — and the commander bundles the tasks and clears them with a DP swarm.

Conversationdoing the work Crystallize + SelfEvalgrade strengths and weaknesses EWMA accumulationledger with decay (DuckDB) self_preferencesbehavioral norms v8 live Worn at bootstarting state of next session SelfRepairscore ≤ −3.0files a repair task behavior changes weakness past threshold → structural repair
Figure 5 — Two layers of self-improvement: correcting behavior (self_preferences) and repairing structure (SelfRepair).
In plain words: the daily work report (SelfEval) updates the performance review (self_preferences), which is handed back at the next morning's briefing. If a bad habit gets serious, a ticket to fix the underlying mechanism is cut automatically — reflection turned into a mechanism instead of a feeling.

Cost structure — why ¥0

RouteCostRole
Pay-per-use API (Batch API etc.)Metered (about ¥18 per run on the old route of this system)Sealed. Starts only with the human's approval
DP route (this design)¥0 extra (consumes only the web allowance of a flat-rate subscription)The standard route. The number of lanes affects how fast the allowance is used

The allowance is shared across the account (a rolling 5-hour window plus a weekly limit). DP is not a loophole in billing; it is a way of designing parallelism within a flat-rate allowance.

Technology stack

LayerMain components
MemoryDuckDB / 1,983 crystals (2026-07-16) / warp search (ruri-v3-310m embeddings, 768 dimensions + BM25 + reranker) / QIS (quantum-inspired interference scoring, Model 2 fixed 2026-06-11)
CommanderClaude Desktop inside MeaningSpace's own environment / a DB write queue (resolves single-writer conflicts)
Stand-insChrome ×5 + CDP / dp_lease (slot lock across processes) / dp_journal (structured run records) / dp_abort (coordinated emergency stop) / dp_swarm (bulk fan-out) / COMMANDER_PLAYBOOK (decision table)
Self-improvementSelfEval → EWMA → self_preferences → worn at boot / SelfRepair auto-filing / F6 flow hook (mechanical detection of answers that skip memory, v2 2026-07-15)

Relation to similar systems

Agentic coding tools (for example, Claude Code) are designed around a single agent working from a terminal. What is specific here is threefold: (1) a ¥0 route that turns the chat UI itself into parallel sub-agents; (2) a persistent semantic memory and a self-improvement loop permanently wired to the commander; and (3) active coding, in which the commander checks results mid-conversation and sends work back to DP on the strength of the results. For the first date of each mechanism, including the dialogue-bridge design (Clara bridge, from 2026-07-05), see the timeline.