The ~/.claude/ directory was previously local-only — a machine wipe
would have lost the accumulated memory, custom skills, and settings.
This commit moves the durable parts into dotfiles with the same
symlink-to-home pattern used for CLAUDE.md, PENDING.md, REVIEWED.md,
and L2-BOOTSTRAP.md.
Preserved (symlinked from ~/.claude/* into here):
skills/audit/ — thinking-folder drift scanner
skills/symmetria/ — practice-of-return discipline
skills/vault-update-people/ — Obsidian People-file maintainer
skills/wake-up/ — session restoration
skills/wrap-up/ — session state capture
memory/ — 55+ memory files (MEMORY.md, sessions,
ledgers, project state, feedback, etc.)
settings/settings.json — user preferences (hooks, flags, no secrets)
Deliberately NOT backed up:
settings.local.json — contains operational secrets (HF_TOKEN,
SSH password in expect scripts); by naming
convention, *.local.* is not synced.
Needs separate review and probable rotation.
sessions/, history.jsonl, caches, telemetry — ephemeral
plugins/, marketplace skills and agents — reinstallable
The working copies at ~/.claude/skills/* and
~/.claude/projects/-Users-davidglidden/memory are symlinks into this
directory, so every write flows here automatically. install.sh
recreates the symlinks on a fresh machine.
FOLLOW-ON (flagged, not in this commit):
settings.local.json contains a HuggingFace token and an SSH password
as plaintext strings inside allowed Bash command patterns. These
should be rotated and moved to secure storage (keychain / pass /
env file outside the settings file).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
88 lines
5.5 KiB
Markdown
88 lines
5.5 KiB
Markdown
---
|
|
name: Session 2026-03-21 — L1 reliability PR + audit + governance evolution
|
|
description: Major session establishing three-party governance model, four L1 bug fixes, 43-finding silent degradation audit, executor agency directives. Replay running overnight for canary test.
|
|
type: project
|
|
---
|
|
|
|
# Session 2026-03-21
|
|
|
|
## What Happened
|
|
|
|
### Governance Evolution
|
|
- Three-party model (steward/jurist/executor) formalized in CLAUDE.md
|
|
- Authorization taxonomy: [FIX], [HARDENING], [PROPOSAL], [ESCALATE]
|
|
- Executor Agency Directives added — contamination-aware operational obligations
|
|
- PENDING.md / REVIEWED.md protocol established
|
|
- Session protocol: read CLAUDE.md → seed → REVIEWED → PENDING → empirical log before touching code
|
|
|
|
### Four Bug Fixes (branch: fix/replay-durability-contracts)
|
|
- **Bug A** — Vector reprobe condition mismatch: `startsWith('stub:')` → broadened to any degraded state. Added storage degradation recovery via SurrealDB probe.
|
|
- **Bug B** — Schema migration non-idempotency: `defineIdempotent()` wrapper applied to job-store.ts, checkpoint.ts, dedup.ts. Root cause was checkpoint.ts (bare `DEFINE FIELD` without `IF NOT EXISTS`), not job-store.ts as originally diagnosed.
|
|
- **Bug C** — Teacher worker retry storm: Terminal error detection (credit exhaustion → suspend), exponential backoff on transient failures, log rate limiting. Confirmed: 1 log line instead of 586.
|
|
- **Bug D (Option 2)** — Batch embedding during replay: Coalescing buffer in OllamaEmbeddingProvider + batched Phase 1 loop in replay coordinator. 16 events processed concurrently. ~2-3x speedup observed.
|
|
|
|
### Silent Degradation Audit
|
|
- 43 instances across 5 structural patterns
|
|
- 5 CRITICAL, 18 HIGH, 20 MEDIUM
|
|
- Root causes: fire-and-forget (22 instances), fixed-interval retry, recovery/degradation mismatch, state transitions that freeze, silent persistence failure
|
|
- Key finding: 4,974 vector-relevant events in logchain (not 221) — Phase 1 at single-event embedding takes ~83 hours
|
|
- Bug D (idle stall) identified as root cause of replay freezing every 5 minutes
|
|
|
|
### Key Discovery
|
|
- Logchain has 221 top-level events but payloads contain nested connector batch events
|
|
- Vector module processes each nested event → 4,974 total
|
|
- This was invisible without the audit — confirms executor agency directive is load-bearing
|
|
|
|
## Files Changed (BetterMemories.io)
|
|
- `src/modules/vector/index.ts` — Bug A fix (reprobe broadening + storage degradation)
|
|
- `src/factory/job-store.ts` — Bug B fix (defineIdempotent)
|
|
- `src/factory/checkpoint.ts` — Bug B fix (defineIdempotent)
|
|
- `src/factory/dedup.ts` — Bug B fix (defineIdempotent)
|
|
- `src/inference/teacher-enrichment.ts` — Bug C fix (suspension + backoff)
|
|
- `src/inference/ollama-embeddings.ts` — Bug D fix (coalescing buffer)
|
|
- `src/core/keystone/readiness/replay-coordinator.ts` — Bug D fix (batched Phase 1 loop)
|
|
|
|
## Files Created (CapableMind-AI)
|
|
- `docs/thinking/David/l1-reliability/` — all L1 reliability artifacts
|
|
- `docs/thinking/David/l1-reliability/l1-silent-degradation-audit-2026-03-21.md` — 43-finding audit
|
|
- `docs/thinking/David/l1-reliability/l1-session-seed-pr.md` — active seed from Claude.app
|
|
- `docs/thinking/David/l1-reliability/l1-gh-issue-bug-a.md` — GH issue template
|
|
- `docs/thinking/David/l1-reliability/l1-gh-issue-bug-b.md` — GH issue template
|
|
- `docs/thinking/David/l1-reliability/l1-gh-issue-bug-c.md` — GH issue template
|
|
- `docs/thinking/David/l1-reliability/l1-pipeline-full-picture-2026-03-21.md` — full pipeline analysis
|
|
- `docs/thinking/David/l1-reliability/l1-pr-description.md` — PR template
|
|
- `docs/thinking/David/l1-reliability/l1-claude-md-executor-agency-proposal.md` — PENDING-1
|
|
|
|
## PENDING Items (~/PENDING.md)
|
|
- PENDING-1: Executor Agency Directive — AUTHORIZED, integrated
|
|
- PENDING-2: Silent degradation audit — COMPLETE, authorized for follow-on
|
|
- PENDING-3: Factory schema scope extension — ACKNOWLEDGED
|
|
- PENDING-4: Bug D idle stall — AUTHORIZED, next PR
|
|
- PENDING-5 through PENDING-9: from audit findings (transport backoff, manifest persistence, Phase 2 handling, fire-and-forget replacement, hysteresis)
|
|
- PENDING-10: Option 1 (skip embedding during replay) — authorized for next PR
|
|
|
|
## Current State
|
|
- BMF running (PID 53403) with all 4 fixes
|
|
- caffeinate (PID 54925) preventing sleep for 12h
|
|
- nohup keepalive (PID 54926) sending MCP observe every 4 min
|
|
- nohup monitor (PID 54927) logging to ~/.capablemind/logs/replay-monitor.log every 10 min
|
|
- Vector cursor at 114 of ~4,974 at last check — advancing in bursts
|
|
- Phase 1 not yet complete — expected overnight
|
|
- MCP disabled in Claude Code to prevent BMF restart
|
|
|
|
## Next Session
|
|
1. Check `cat ~/.capablemind/logs/replay-monitor.log`
|
|
2. If Phase 1 complete: confirm canary, test recall, complete PR artifacts per seed instructions
|
|
3. If not complete: assess whether Bug D (idle stall) or volume is the bottleneck, consider reducing Phase 1 window
|
|
4. File GH issues A, B, C, D
|
|
5. Submit PR
|
|
6. Update PENDING.md with SESSION-LOG
|
|
|
|
## Seb Context (from thinking folder exploration)
|
|
- Spec-first methodology, 97 docs, 85k lines — runtime not yet held to same standard
|
|
- Architecture + historiography background — audit findings will be recognized as same discipline applied to runtime
|
|
- Giving-back document, public debt framing — this is a calling, not a job
|
|
- His biggest unknown: whether training flywheel produces meaningful quality improvement
|
|
- Three-entity structure (Skemantix, CapableMind Inc, WhySo Ltd) — long-term thinking
|
|
- Cold start, forgetting, multi-user, L1/L2 boundary — all have design-level answers in his specs
|