Skip to content

Commit 77a5111

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/teleport-session-setup-wMZfb
# Conflicts: # .claude/board/EPIPHANIES.md # .claude/settings.json # crates/cognitive-shader-driver/src/driver.rs # crates/lance-graph-contract/src/lib.rs # crates/lance-graph-contract/src/property.rs
2 parents 6d3016c + 30de0e6 commit 77a5111

33 files changed

Lines changed: 2818 additions & 443 deletions

.claude/AGENT_COORDINATION.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Agent Coordination — Architectural Governance
2+
3+
> **Committed governance doc.** Read-through, not append-to. Describes HOW
4+
> agents coordinate in this workspace. The per-session activity log that
5+
> was briefly in `.claude/board/AGENT_LOG.md` is now **gitignored** (local
6+
> blackboard, ephemeral by design) because agent-by-agent appends kept
7+
> producing merge conflicts between parallel branches.
8+
>
9+
> The durable record of what agents did lives in:
10+
> - **Git log** — commit messages on each agent's branch
11+
> - **PR descriptions** — what the agent shipped, tests, verdict
12+
> - **EPIPHANIES.md** — findings that outlive a single PR
13+
> - **`.claude/board/CROSS_SESSION_BROADCAST.md`** — intentional cross-session messages (committed, rare)
14+
15+
---
16+
17+
## Three Coordination Layers
18+
19+
All three use the **same structured-entry format**. Only the transport differs.
20+
21+
### Layer A — Teleportation (in-context role switch)
22+
23+
**Transport:** None (same context window).
24+
**Latency:** Instant. **Context loss:** Zero.
25+
26+
The model loads an agent card (`.claude/agents/*.md`), adopts its role
27+
and knowledge, does the work, and switches back. No process boundary,
28+
no serialization. The 19 specialist + 5 meta-agent cards in this
29+
workspace are **teleportation roles**, not delegation targets. The
30+
agent IS the main thread wearing a different hat.
31+
32+
```
33+
[main thread] → load @family-codec-smith card → do codec work
34+
→ load @truth-architect card → review with full context
35+
→ back to main thread (nothing lost)
36+
```
37+
38+
### Layer B — Per-session file blackboard (in-session, between agents)
39+
40+
**Transport:** Local filesystem (`.claude/board/AGENT_LOG.md`, gitignored).
41+
**Latency:** Instant. **Context loss:** File-level.
42+
43+
Agents spawned via `Agent()` in the SAME session share a working tree.
44+
They can read each other's AGENT_LOG.md entries to see what's been done,
45+
same as Layer-1 experts reading prior `BlackboardEntry` rounds.
46+
47+
**Critical:** AGENT_LOG.md is **gitignored**. It does NOT travel between
48+
sessions or branches. It's pure local blackboard state. Each new session
49+
starts with an empty log.
50+
51+
Why gitignored: every branch that ended up with appended entries from
52+
parallel agents generated merge conflicts when its PR rebased against
53+
other merged PRs. The durable record was already preserved in git log
54+
+ PR description; the log was pure redundant metadata causing friction.
55+
56+
### Layer C — Cross-session broadcast (between sessions)
57+
58+
**Transport:** `.claude/board/CROSS_SESSION_BROADCAST.md` (committed,
59+
append-only but curated) + `git push` + `subscribe_pr_activity` webhook.
60+
61+
**Latency:** Minutes. **Context loss:** Entry-level.
62+
63+
When two sessions genuinely need to talk across the boundary, they:
64+
65+
1. Open a coordination PR (or use an existing long-running one).
66+
2. Subscribe via `mcp__github__subscribe_pr_activity`.
67+
3. Append to `CROSS_SESSION_BROADCAST.md` (curated — small, intentional).
68+
4. Push; the webhook notifies subscribers.
69+
70+
**Do NOT append here carelessly.** Unlike the gitignored AGENT_LOG.md,
71+
every entry here is a durable commit that travels with the repo. Think
72+
of it as a system-wide announcement channel. Most coordination should
73+
stay in Layer A (teleport) or Layer B (local log). Use Layer C only for:
74+
75+
- Findings another session MUST see before starting work
76+
- Architectural decisions that change what future sessions can assume
77+
- Urgent corrections that can't wait for the next PR to merge
78+
79+
Everything else is either Layer B (don't leave the session) or belongs
80+
in `EPIPHANIES.md` as a findings-of-record.
81+
82+
### Summary
83+
84+
| Layer | Scope | Transport | Committed? | Conflict risk |
85+
|---|---|---|---|---|
86+
| **A: Teleport** | In-context | None | N/A | None |
87+
| **B: File** | In-session | `AGENT_LOG.md` | **No (gitignored)** | None |
88+
| **C: Broadcast** | Cross-session | `CROSS_SESSION_BROADCAST.md` | Yes | Low (curated) |
89+
90+
All three share one invariant: **append-only, structured entries,
91+
newest-first.** A `BlackboardEntry` by any other transport.
92+
93+
---
94+
95+
## Canonical Append Pattern
96+
97+
For AGENT_LOG.md (local, gitignored) and CROSS_SESSION_BROADCAST.md
98+
(committed), use the `cat >>` heredoc — no Read required, no overwrite
99+
risk, pre-allowed in `.claude/settings.json`:
100+
101+
```bash
102+
cat >> .claude/board/AGENT_LOG.md <<'EOF'
103+
104+
## YYYY-MM-DDTHH:MM — description (model, branch)
105+
106+
**D-ids:** ...
107+
**Commit:** `abc1234`
108+
**Tests:** N pass (M new)
109+
**Outcome:** One-line summary.
110+
EOF
111+
```
112+
113+
This is the ONLY sanctioned write pattern for both logs. Do not use
114+
`Edit` or `Write` tools on them — they risk overwriting prior entries.
115+
`cat >>` is append-only by construction.
116+
117+
---
118+
119+
## Durable Record (not ephemeral blackboard)
120+
121+
For findings, architectural changes, and PR outcomes that need to survive
122+
beyond the session:
123+
124+
| What | Where | Format |
125+
|---|---|---|
126+
| Multi-source insight / "aha" / correction | `.claude/board/EPIPHANIES.md` | PREPEND dated entry |
127+
| Tech-debt observation | `.claude/board/TECH_DEBT.md` | PREPEND |
128+
| Unresolved blocker | `.claude/board/ISSUES.md` | PREPEND |
129+
| Contract type added | `.claude/board/LATEST_STATE.md` | Edit inventory |
130+
| Merged PR | PR description + git log | Automatic |
131+
| New D-id / deliverable | `.claude/board/STATUS_BOARD.md` | Row entry |
132+
| Plan version | `.claude/plans/<name>-v<N>.md` + `INTEGRATION_PLANS.md` PREPEND | New file |
133+
134+
Do NOT put findings in AGENT_LOG.md — it's local-only and will be lost
135+
when the session ends. Findings go in EPIPHANIES.md.
136+
137+
---
138+
139+
## The Rule of Thumb
140+
141+
> "Would a future session need to read this?"
142+
>
143+
> **Yes** → EPIPHANIES.md / LATEST_STATE.md / CROSS_SESSION_BROADCAST.md (committed)
144+
>
145+
> **No, just this session** → AGENT_LOG.md (gitignored)
146+
>
147+
> **Automatic from git** → nothing to write — commit messages and PR
148+
> descriptions already capture it
149+
150+
This is the split that was forced by three merge conflicts in one
151+
session (2026-04-24): the architectural governance survives, the
152+
ephemeral per-run log doesn't.

.claude/board/AGENT_LOG.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Cross-Session Broadcast — Committed, Curated Append-Only
2+
3+
> **This IS committed.** Unlike AGENT_LOG.md (gitignored, ephemeral),
4+
> every entry here travels with the repo. Use ONLY for messages another
5+
> session MUST see before starting work — architectural decisions,
6+
> urgent corrections, findings that can't wait for the next PR merge.
7+
>
8+
> Most coordination belongs in Layer A (teleport role switch) or Layer B
9+
> (local AGENT_LOG.md). See `.claude/AGENT_COORDINATION.md` §Layer C for
10+
> when to use this channel instead.
11+
>
12+
> **Append via `cat >>` heredoc** — no Read, no overwrite, pre-allowed.
13+
14+
---
15+
16+
## Entries (reverse chronological)
17+
18+
## 2026-04-24 — AGENT_LOG.md gitignored; architecture moved to .claude/AGENT_COORDINATION.md
19+
20+
After 3 merge conflicts in one session from parallel agents appending
21+
to a committed AGENT_LOG.md, the split landed: architectural docs
22+
(three coordination layers, canonical append pattern) moved to
23+
`.claude/AGENT_COORDINATION.md` (committed). Per-session log is now
24+
gitignored. Durable findings continue in EPIPHANIES.md. See
25+
`.claude/AGENT_COORDINATION.md` for the new governance.

.claude/board/EPIPHANIES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ encode (meta_prefilter + cascade)
9090

9191
Cross-ref: 2026-04-24 paradigm-shift gestalt entry (Berge + Piaget + metacognition); 2026-04-24 systemic-wiring-gaps TECH_DEBT log; CLAUDE.md §The Click §Three things that must never be complicated; commits `474d3eb` (TD-INT-1 + LF-1/6/7/8) and `b7787cf` (TD-INT-2 + TD-INT-4) on `claude/teleport-session-setup-wMZfb`.
9292

93+
## 2026-04-24 — SMB as cognitive-stack testbed: PropertyKind + Schema builder + 6 trait files
94+
95+
**Status:** FINDING
96+
**Owner scope:** @truth-architect, @family-codec-smith
97+
98+
The bardioc Required/Optional/Free property concept maps 1:1 to the I1 Codec Regime Split (ADR-0002): Required = Passthrough (Index), Optional = configurable, Free = CamPq (Argmax). The `Schema` builder wraps this so SMB tenants define entity schemas in 10 lines — `.required("tax_id").searchable("industry").free("note")` — and the codec routing, NARS truth floors, and FailureTicket escalation happen automatically. Missing Required properties don't fail validation — they generate free energy, which the active-inference loop resolves. This makes the SMB domain a free testbed for the entire cognitive stack: SPO triples, episodic memory, CAM-PQ similarity, NARS truth, and FreeEnergy → Resolution pipeline, all exercised on real messy Steuerberater data.
99+
100+
Cross-ref: `contract::property` (PropertyKind, PropertySpec, Schema, SchemaBuilder), `contract::cam::CodecRoute`, smb-office-rs `lance-graph-contract-proposal.md`.
101+
93102
## 2026-04-24 — FINDING: subscribe() wired; LanceVersionWatcher delivers always-latest CognitiveEventRow to subscribers (DM-4/6)
94103

95104
`LanceMembrane::subscribe()` now returns a `tokio::sync::watch::Receiver<CognitiveEventRow>` under the `[realtime]` feature gate — supabase-shape always-latest semantics. `project()` calls `watcher.bump(row)` after building the scalar row; subscribers observe the latest committed event without polling. `DrainTask` scaffold ships unconditionally (no feature gate) as a `Future` shell for the follow-up `steering_intent` drain loop. Tokio was already an optional dep in `lance-graph-callcenter/Cargo.toml` under `[realtime]` — no new deps required.
@@ -2784,6 +2793,8 @@ a CURVE, not a POINT: does accuracy increase over the course of a
27842793
single document without retraining? That's the measurement. One
27852794
book. One metric. One curve. Rising = AGI. Flat = broken wire.
27862795

2796+
2797+
27872798
## 2026-04-24 — Jirak noise floor calibrated for DeepNSM-tiled 16K-bit fingerprints
27882799

27892800
**Status:** FINDING

.claude/board/INTEGRATION_PLANS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@
3636

3737
---
3838

39+
## v1 — Q2 Foundry-Equivalent Integration (authored 2026-04-24)
40+
41+
**Author:** main thread (Opus 4.7 1M), session 2026-04-24
42+
**Status:** Proposed
43+
**Scope:** Q2 = user interface (Gotham/Workshop/Vertex equivalent) + SMB = first tenant testbed. 4 phases: demo-able → operational → intelligent → fly. Firefly stack: Ballista + Dragonfly + GEL.
44+
**Path:** `.claude/plans/q2-foundry-integration-v1.md`
45+
**Deliverables:** Q2-1.1..1.7 (Phase 1 MVP), Q2-2.1..2.7 (Phase 2 workflows), Q2-3.1..3.7 (Phase 3 reasoning), Q2-4.1..4.7 (Phase 4 scale). 28 deliverables total.
46+
**Foundation:** 8 PRs merged this session (#253-#260) provide substrate.
47+
**Key differentiators vs Palantir Foundry:** active inference as dispatch, NARS truth as primary data, CausalEdge64 Pearl 2³ masks, JIT-compiled lenses, zero-dep contract crate.
48+
49+
---
50+
3951
## v1 — Supabase Subscriber Wire-up (authored 2026-04-24)
4052

4153
**Author:** sonnet agent, session 2026-04-24 (branch claude/supabase-subscriber-wire-up)

.claude/board/LATEST_STATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ Types live in `crates/cognitive-shader-driver/src/wire.rs` behind `--features se
5858

5959
**`container`**: `Container = [u64; 256]` (16Kbit = 2KB), `CogRecord`.
6060

61+
**`property`** (new, SMB domain): `PropertyKind` (Required / Optional / Free), `PropertySpec` (predicate + kind + `CodecRoute` + NARS floor), `PropertySchema` (`&'static`-based, const schemas), `Schema` + `SchemaBuilder` (runtime builder: `.required()` / `.optional()` / `.searchable()` / `.free()` / `.validate()`), `CUSTOMER_SCHEMA`, `INVOICE_SCHEMA`. Maps bardioc Required/Optional/Free to I1 Codec Regime Split (ADR-0002).
62+
63+
**`repository`** (new, SMB domain): `EntityStore` + `EntityWriter` + `Batch` + `EntityKey` — Arrow-agnostic row store contract.
64+
65+
**`mail`** (new, SMB domain): `MailParser` + `ThreadLinker` + `ParseHints` + `AttachmentRef` + `PartRef`.
66+
67+
**`ocr`** (new, SMB domain): `OcrProvider` + `PageImage` + `OcrOpts` + `Bbox` + `BlockKind` + `LayoutBlock`.
68+
69+
**`tax`** (new, SMB domain): `TaxEngine` + `TaxPeriod` + `PeriodKind` + `Jurisdiction` + `PostingBatchRef` + `RuleBundle`.
70+
71+
**`reasoning`** (new, SMB domain): `Reasoner` + `ReasoningKind` + `ReasoningContext` + `EvidenceRef` + `Budget`.
72+
6173
**`cam`** (extended by PR #225): `CodecRoute` + `route_tensor` (existing), `CamByte`, `CamStrategy`, `DistanceTableProvider` trait, `CamCodecContract` trait, `IvfContract` trait, plus codec-sweep parameter shape — `LaneWidth` (F32x16 / U8x64 / F64x8 / BF16x32), `Distance` (AdcU8 / AdcI8), `Rotation` (Identity / Hadamard{dim} / Opq{matrix_blob_id, dim}), `ResidualSpec {depth, centroids}`, `CodecParams {subspaces, centroids, residual, lane_width, pre_rotation, distance, calibration_rows, measurement_rows, seed}` with `kernel_signature() -> u64` + `is_matmul_heavy() -> bool`, `CodecParamsBuilder` fluent API, `CodecParamsError {ZeroDimension, OpqRequiresBf16, HadamardDimNotPow2, CalibrationEqualsMeasurement}`**precision-ladder validation fires at `.build()` BEFORE any JIT compile**.
6274

6375
**`a2a_blackboard`**, **`collapse_gate`**, **`exploration`**, **`literal_graph`**, **`orchestration_mode`**, **`jit`**, **`nars`**, **`plan`**, **`orchestration`**, **`thinking`** (36 styles, 6 clusters), **`mul`**, **`sensorium`**, **`high_heel`**.

0 commit comments

Comments
 (0)