Elnor Repo Reader

CLAUDE.md

CLAUDE.md

Generated 2026-06-09T01:23:58.539Z from commit dbaa25962edc11ab30e8d4ca1715f9ae5bf77331. Worktree: clean.

Open text page · Open raw txt · Open path URL

# Memory

<!-- AUTO-MAINTAINED:last-updated -->
**Last refreshed: 2026-05-29 (manual seed). Auto-maintained sections below are refreshed nightly by `elnor-nightly-spec-sync`. Supersedes the legacy CLAUDE.md at `/Users/OpenClaw1/Documents/Elnor Docs Folder/Q and EC Build Working/ECQ Development/CLAUDE.md` (kept for historical reference but stale on architecture and paths).**
<!-- /AUTO-MAINTAINED -->

## Me
**Will Brody** (wbrody@gmail.com) — Securities litigator at a law firm. Principal architect of **ELNOR**. Not an engineer; relies on AI to surface tradeoffs and make architectural recommendations while reserving final decisions. Prefers direct, honest assessment without hedging.

## What ELNOR Is
Local-first AI orchestration platform built on **OpenClaw** (Node.js/npm). Single M4 Pro MacBook, isolated macOS user account "OpenClaw1". Currently in spec completion / red-team / design-hardening phase — nothing implemented yet. The goal is specs complete enough that future implementation does not drift, guess, or recreate "phantom button / phantom memory / phantom wiring" failures. Domain-agnostic core, legal is one profile.

## Three Systems (Body / Operations / Knowledge)
- **Knowledge** (the brain): DOC72, DOC73, DOC25, DOC1, DOC8 (legacy — see DOC80 family below)
- **Operations** (the nervous system): DOC24, DOC15, DOC10, DOC11, DOC4
- **Body** (the muscles): DOC23, DOC12, DOC16, DOC18, DOC20, DOC14, DOC17

## DOC80 Family (the memory control plane being flattened — 8 members per ADQ-220)
- **DOC80** — Core / Memory Control Plane (charter E0 — adjudication + confirmation complete; R2+R3 patch package NOT yet applied to `DOC80_Core_Charter_Draft.md`, not ratified)
- **DOC81** — Scope & Policy (charter E1+E2 lockstep)
- **DOC82** — Canonical Knowledge / Source / Evidence (charter E3+E4 lockstep)
- **DOC83** — Extraction Spine / Temporal / Working-State (charter E5+E6)
- **DOC84** — Delivery / Prompt / Proof (charter E7+E8 lockstep; contains DAMS substrate per ADQ-210/SM-020)
- **DOC85** — Learning Architecture (charter E9; two-phase per ADQ-221)
- **DOC86** — UI / Inspector / Search (charter E10)
- **DOC87** — Organization & Membership (charter E_org; sits between E6 and E7)

## Key Terms
| Term | Meaning |
|------|---------|
| **EC** | Elnor Core — deterministic orchestrator and SOLE durable writer. Owns SQLite + JSONL audit. `dependency_status = partial / moving` per ECSeamContract (OPA-031). |
| **Q** | Q Dashboard — Electron desktop UI control surface. NOT a second brain. React + Vite + TypeScript + Tailwind. |
| **OpenClaw** | Native runtime; owns native prompt/session/workspace truth. Releases tracked through v2026.4.23. |
| **PBE** | Positronic Brain Enhancement — DOC73, additive layer over DOC72. **Operative as of V1.6 (CSA extracted into DOC73 V1.6 on 2026-05-04).** |
| **CU** | ConsolidatedUnderstanding — DOC73 source-bound synthesis only (per ADQ-219). NOT canonical reusable truth — that flows through AssertionCandidate → Assertion pipeline. |
| **BDSM** | Big Dynamic Satisfaction Machine — DOC24 Addendum A. **v6.5 Draft v0.3.1 is the operative source** (per ADQ-221). `dependency_status = partial`. |
| **KDA** | Knowledge Delivery Architecture — DOC24 Addendum B R3. Schemas, tiered rendering, DeliveryDirective. |
| **DAMS** | Substrate inside DOC84 (per ADQ-210 / SM-020) — NOT an independent owner doc. |
| **GIE** | Graph Intelligence Enhancement — V2.2 ABSORBED into DOC72 R5.73 §42A (2026-04-26). Archived. |
| **KIE** | Knowledge Intelligence Enhancement — R2 ABSORBED into DOC72 §34A. Archived. |
| **PropA** | MultiDoc Proposal A R6.3 — Knowledge Pipeline Sensitivity & Self-Improvement. **Whole-section retargeted to DOC81 in OPA V4.** |
| **CIL** | Cognitive Infrastructure Layer — DOC15. |
| **CANDOR** | Universal adversarial review engine — DOC14. |
| **DeliveryDirective** | Three-dim tag model: primary_tag + hedge_mode + force_level. ONE tag vocabulary, no second prompt-control language. |
| **ELNOR_MEMORY/** | EC's durable file-based state location. |
| **ClawHub** | OpenClaw plugin/tool hub surfaced via Q. |
| **DOC8** | Legacy learning doc — **capability-mining input only** per ADQ-221, NOT a runtime owner. Runtime learning lives at DOC85. |

<!-- AUTO-MAINTAINED:current-operative-versions -->
## Current Operative Spec Versions (May 2026)
- DOC72 R5.73 (2026-04-26, supersedes R5.72 — V2.2 absorbed into §42A)
- DOC73 V1.6 (2026-05-04 — CSA extracted; supersedes V1.4.1)
- DOC25 V1.0 Draft (2026-04-11)
- DOC24 R3.1.1 (operative)
- EC Core Addendum A V3.3 (2026-04-16)
- BDSM V6.5 Draft v0.3.1 (per ADQ-221, partial substrate)
- KDA R3 v0.3.1
- DOC11 R14 + R15 amendment proposal (2026-04-13)
- SUBAGENT V5.2 (Sub-Agent Architecture)
- MultiDoc PropA R6.3
- **OPA V4** (operative cross-doc obligation tracker — Stage 5R3 Pass 2 retarget published 2026-05-28; supersedes V3.18)
- **DOC80 family (in-flight via charter authoring)** — Skeletal Target Baseline + Owner Map + Import Graph + Retired Names operative since Stage 5R2c (2026-05-28)
<!-- /AUTO-MAINTAINED -->

## Architectural Invariants (post-flatten — never casually undo)
EC sole writer · DOC82 owns Assertion family schema; DOC72 stores graph payload (post-flatten per ADQ-001) · DOC24 owns packet assembly · **DOC85 owns learning architecture; BDSM is partial substrate; DOC8 is capability-mining only (per ADQ-221)** · DOC73 owns CU as source-bound synthesis only (per ADQ-219) · DOC25 owns ingestion contracts · DAMS is substrate inside DOC84 (per ADQ-210) · DOC87 owns membership / organization / Library-as-container (per ADQ-220) · No hot-path LLM calls in Matrix · One tag vocabulary · Semantic intent not mechanical replay · Domain-agnostic core · Project-agnostic routing · Tools are learnable entities · Q is UI only · OpenClaw owns native runtime · LlamaIndex is sidecar · Authority hard to create accidentally · Transient instructions stay transient · Entity graph is durable not derived · Embedding model is locked infra (Qwen3-Embedding-0.6B via MLX) · Learn only from user ACTIONS · Single-file consolidated drafts preferred · PBE living memory has carve-outs · Post-absorption versioning rule (archive absorbed addenda) · **V5 is local-first, single-principal, single-node, single-EC-writer (Skeletal §10.1)**.

## Will's Failure Modes To Watch For
Phantom buttons · phantom memories · over-aggressive ingestion · silent auto-promotion of weak signals · missing empty/degraded/error states · under-specified schemas · cross-doc seams that sound good but aren't wired · magical context behavior · version sprawl · unregistered content types (DOC20 §6.18.2) · unregistered UI surfaces (DOC21/DOC22) · injected knowledge that shouldn't be / missing when needed · system feeling like a search engine instead of a personal OS · DOC73/DOC1 boundary erosion · living memory eroding static facts · silent PBE-lite degradation.

## Will's Working Style
- Direct honest assessment, no hedging
- Discussion + explicit approval BEFORE any file is created or modified
- **GitHub-tracked repo with no-version-suffix filename convention.** Git history is the version record. Pre-existing version-suffixed files are legacy.
- Comprehensive spec-level solutions (TS schemas, algorithms, configs) over problem identification
- Paste-ready code over descriptions
- Red-teams via fresh chat windows in multiple AI models — context must be self-contained; prompts reference the repo by path, not by attachment
- Cite section numbers when reviewing
- Type findings as **BUG / GAP / SUGGESTION / CONFIRMED / BETTER_IDEA / ARCHITECT_STOP**
- Think simultaneously as Coder + Product Designer + Integration Architect
- **Synthesis discipline:** when synthesizing reviews, include ALL fixes with positive net value, not just must-fix. Only exclude low-value AND high-cost items. Use a value-tiered structure (Critical / Substantive / Minor / Considered and declined).

## File Organization (post-migration 2026-05-27)
**Repo root:** `/Users/OpenClaw1/Elnor/Elnor Specs/` (GitHub-tracked, branch `main`).

Key folders:
- `Current Specs/DOC#/` — operative specs per DOC (DOC1 through DOC25 + DOC26 + DOC80 Memory Control Plane). One subfolder per DOC.
- `Memory Rebuild Docs/` — the flattening project working area:
  - `Flattening/Current Flattening Plan/Flatten_and_Unify_Plan_V2_1c.md` — governing plan
  - `Flattening/Execution Ledger/` — ADQ Queue, Conflict Register, OP-A Disposition, Stage_5R3 deliverables
  - `Flattening/Supersession Matrix/Supersession_Matrix.md`
  - `Flattening/Reviews/` — red-team review outputs (incl. the Stage 5R synthesis benchmark)
  - `DOC80 Target Baseline/{Skeletal Spec, Owner Map, Import Graph, Retired Names}/` — architecture baseline
  - `Stage_6_Charters/E0_DOC80_Core/` — **current charter work**
- `OP-A and Operations and Trackers/` — operative cross-doc obligation tracker + state files:
  - `OPA_V4.md` — operative OP-A (538 OBL rows)
  - `MASTER_SPEC_DOCUMENT_LIST.md` — front-door registry (canonical, no version suffix; R3.62 legacy file also present)
  - `SPEC_STATE.md`, `ADDENDA_STATE.md`, `DRIFT_LOG.md`, `dashboard.html`, `OPA_FREEZE.md`
  - `Archived DOC OP-A and Operations DOCS/` — OPA V3.x history
- `Active Working and Red Team/` — in-progress reviews + unified carryover prompt
- `Archived and Subsumed Specs and Lineage/` — out of active scope; reference-on-demand

**Legacy pre-migration tree** at `/Users/OpenClaw1/Documents/Elnor Docs Folder/Q and EC Build Working/ECQ Development/` is mostly stale. Active subfolders: `Stage_6_E0_Red_Team_Gemini_Upload/` (file copies for Gemini reviewers).

## Models In Use
- Claude Opus 4.8 — primary architectural reasoning (Cowork sessions + red-team reviews)
- ChatGPT 5 Pro — secondary red-team reviewer (repo-access capable)
- Gemini 2.5 Pro — red-team reviewer (no repo access; needs file copies via `ECQ Development/Stage_6_E0_Red_Team_Gemini_Upload/` template)
- Codex — opportunistic red-team + bulk detection
- Claude Code (CLI) — first-draft generation and mechanical retargeting in repo working dir
- Qwen3-Embedding-0.6B via MLX — embedding (LOCKED infrastructure, migration would be a separate ADQ)

## Nightly Automation (6 scheduled tasks; all running)
- **3:03 AM** `elnor-nightly-spec-sync` — maintains MASTER_SPEC_DOCUMENT_LIST + SPEC_STATE + ADDENDA_STATE + dashboard + DRIFT_LOG; includes drift detection (Piece 1).
- **3:22 AM** `elnor-new-chat-context-sync` — refreshes drag-and-drop New Chat Context bundle folders.
- **3:40 AM** `elnor-openclaw-release-tracker` — tracks OpenClaw release alignment.
- **3:55 AM** `elnor-recent-work-summary` — maintains RECENT_WORK_SUMMARY.md.
- **4:16 AM** `elnor-onedrive-backup` — 48-hour OneDrive backup.
- **Monday 5 AM** `elnor-weekly-maintenance-pass` — Will Review Packet of drift queue + freeze status.

Three obsolete `~/.claude/scheduled-tasks/` tasks (spec-registry-update + 2 sibling master-spec-list tasks) were retired 2026-05-29 — archived in `~/.claude/scheduled-tasks-disabled/`.

## See Also (post-migration paths)
- `Memory Rebuild Docs/Flattening/Current Flattening Plan/Flatten_and_Unify_Plan_V2_1c.md` — governing plan (§12 slice list; §18 golden scenario E2E test)
- `Memory Rebuild Docs/Flattening/Execution Ledger/Open_Issues_Map.md` — single-page map of where every Stage 5R issue landed
- `Memory Rebuild Docs/Flattening/Reviews/Red Team Responses/DOC80_Stage_5R_Red_Team_Reviews_and_Synthesis.md` — the multi-day, multi-reviewer synthesis (the depth/tone benchmark for review work)
- `Memory Rebuild Docs/DOC80 Target Baseline/Skeletal Spec/DOC80_Skeletal_Target_Baseline.md` — DOC80 family architecture; §10 + §11 are the substantive build-plan content
- `Memory Rebuild Docs/Stage_6_Charters/E0_DOC80_Core/` — current charter folder (DOC80_Core_Charter_Draft.md + Charter_Opening_Brief.md + Charter_Input_Deck.md + reviews)
- `Memory Rebuild Docs/Stage_6_Charters/E0_DOC80_Core/Stage_6_Cowork_Carryover_Prompt.md` — comprehensive carryover for fresh Cowork sessions
- `OP-A and Operations and Trackers/OPA_V4.md` — operative cross-doc obligation tracker
- `OP-A and Operations and Trackers/dashboard.html` — visual rendering of state files (open in browser)
- `OP-A and Operations and Trackers/SPEC_STATE.md` — per-spec workflow state
- `OP-A and Operations and Trackers/ADDENDA_STATE.md` — per-addendum disposition tracker
- `OP-A and Operations and Trackers/OPA_FREEZE.md` — current freeze manifest (active 2026-05-27 → 2026-06-17)
- `Memory Rebuild Docs/Flattening/Execution Ledger/Architect Decision Queue/Architect_Decision_Queue.md` — 47 ADQs (46 resolved + 1 open)

<!-- AUTO-MAINTAINED:where-we-are -->
## Where We Are (snapshot — refreshed nightly from state files)
- **Stages 0–5R3 Pass 2c CLOSED.** All architecture decisions through OPA V4 publication are settled.
- **Stage 6 charter authoring OPEN.** Charter **E0 (DOC80 core): adjudication + confirmation complete, NOT yet applied or ratified.** The R2 (~80 edits) + R3 (§22 + non-egress) patch package has NOT been applied to `DOC80_Core_Charter_Draft.md`. Next: apply the package → §15.5 regression → `Ratification.md` → discharge sweep. After E0 ratifies, the next charter is **E1/E2** (Scope/Policy lockstep).
- **Open seams (non-blocking for Stage 6):** ADQ-222 Phase-1 networking (gates Stage 7 schema bodies only); OPA-024 RecentActivityRollup E6 lint; OPA-032 DOC83↔DOC87 TopicIdentityContract; OPA-035 SourceBoundSynthesisAdapter convergence; DOC85 E9 two-phase per ADQ-221.
- **Deferred entirely:** 33 DOC23 Addenda B IDs (Stage 5R3 Pass 1 D3b); 17 OPA V4 §8 deferred rows (inherited verbatim from archived V3.18 §8).
<!-- /AUTO-MAINTAINED -->

## Master Spec List Status
- Live registry: `OP-A and Operations and Trackers/MASTER_SPEC_DOCUMENT_LIST.md` (canonical, no version suffix going forward).
- Legacy `MASTER_SPEC_DOCUMENT_LIST_R3.62.md` also present but stale post-migration.
- Maintained nightly by `elnor-nightly-spec-sync`. The three obsolete `~/.claude/scheduled-tasks/` master-spec-list tasks were retired 2026-05-29.