Every Claude Code session starts blank. So I built the layer that makes it not start blank — a curated brain of facts, scars, rules, and narratives that loads at the right time, in the right amount, so each session opens already knowing my repos, my voice, my landmines, and how I like to work.
Think of it as a stack. The top layers are always loaded (cheap, tripwire-dense). The bottom layers are loaded on demand (deep, narrative). The whole design is a fight against one enemy: context is finite, so what's always-on must stay small.
MEMORY.md — the headline map. One line per fact, invariants (⚠) and open items (🔓) only. Pointers to everything deeper.
Behavioral law in ~/.claude/rules/*.md. How responses get shaped, how git is handled, my voice, the delegation policy.
Scar tissue. pitfalls_general.md — the mistakes made once, encoded so they're never made twice.
The narrative long-form. Per-client vaults with the why and the story, pulled in via /recall.
Scheduled jobs that turn the brain outward — weekly drafts, newsletters, client marketing reports, a daily brief.
A tiny always-loaded index points to a large on-demand corpus; strict rules keep the always-on part small; automation spends the accumulated knowledge on a schedule. That's the whole system.
Nothing here is magic. It's a plumbing loop: something happens in a session, it gets classified, written to the right home, and then surfaced again the next time it's relevant.
/recall (on-demand).| When this happens… | It becomes a… | Written to | Loaded |
|---|---|---|---|
| You correct me / give guidance | feedback | memory/feedback.md | always-on |
| A durable fact (schema, path, naming) | project / reference | memory file + MEMORY.md line | index always, detail on-demand |
| A mistake that cost time | pitfall | pitfalls_*.md | general always, detail on-demand |
| The story / why behind work | narrative | Obsidian vault (/obsidian write) | on-demand via /recall |
| Work to be tracked | task | Notion Work Tracker | queried on request |
| A behavioral norm ("always do X") | rule | ~/.claude/rules/*.md | always-on (or paths-scoped) |
/wrap sweeps a session for anything that slipped through · /recall <topic> pulls the right narrative efficiently · memory-lint.sh catches broken pointers and dead links. The old weekly-cron "audit → queue → maintain" machinery was retired — it manufactured busywork and drained nothing. Prompt-level discipline + these three deterministic checks replaced ~1,200 lines of shell.
One fact per file. A tiny always-loaded index (MEMORY.md) holds only headlines, invariants, and open items — and points to the deep files that load only when relevant.
Legend-driven shorthand keeps it dense. Each line is headline + invariant + open item + pointer. The full story lives in the pointer target, never in the index itself.
project_*.md · reference_*.md · feedback.md · user.md. Frontmatter tags each: user / feedback / project / reference. Linked to each other with [[wikilinks]].
This is why the index can carry an entire client's state in a few lines. ⚠ = a tripwire that must stay always-on. → = "the rest is one Read away, don't load it until you need it."
Granularity is what makes recall cheap. A big blob file forces a full read to check one detail; a per-fact file lets the description in frontmatter decide relevance before anything is loaded. It also makes deletion safe — a wrong fact is one file to remove, not a paragraph to surgically excise.
memory-lint.sh — deterministic, on-demand. Flags broken @-imports and pointers to deleted files. Run by hand, fix in place. No queue, no cron.Memory is what I know. Rules are how I act. A handful of files in ~/.claude/rules/ load every session and shape everything from response format to git safety to my voice.
Punch line → table → code. Estimates as Low / Realistic / High. Mirror my vocabulary. Preempt the "what about X." Audit before fixing.
One cleanup branch. Inspect stash before dropping. Grep read-sites before renaming keys. Verify infra before recommending teardown. Delegate by default.
Typos are misses, not texture. Each client's outputs use that client's design system. Personal tools stay unbranded & gated. Source files for image work, not prompts.
The five real databases, exact IDs, the 6-state status workflow, task-creation API shapes. Stops drift and ghost-DB mistakes.
The /execute-roadmap-phase machinery — parallel implementer + Codex verifier, score-gated auto-advance.
Worker → checker adversarial review on local Ollama models. The /local-llm-review path.
The files above load every session — that's the expensive tier. Repo-specific rules (one per project) are paths-scoped: they only load when I'm actually working in that repo. New rules default to scoped. Adding to the always-on tier requires shrinking it elsewhere first — see The One Law.
A pitfall is a mistake that cost time once, written down so it never costs time again. This is arguably the highest-leverage layer — each entry is a bug you'll never re-hit.
Git multi-account auth (token-leak traps), concurrent-agent worktree collisions, terminal-host death orphaning sessions, shell/zsh traps, stale-origin false negatives. The ⚠ lines you must never trip.
The dated incident write-ups — what happened, why, how it was recovered. Read only when you touch that surface. Keeps the always-on file short.
| Field | Purpose |
|---|---|
| The tripwire | What goes wrong, stated as a warning (⚠ X silently no-ops when…) |
| Why | The mechanism — so it generalizes to new cases, not just the one that bit |
| How to apply | The concrete defense: the exact command, the check to run, the thing to never do |
| → forensics | Pointer to the dated incident, kept out of the always-on tier |
Headline + invariant stays always-on (small, dense). The story moves to a _detail file behind a pointer. This is the same headline/detail split as memory — because the constraint is the same: what's always loaded must stay cheap.
Memory is terse facts. Obsidian is the long-form story — the why behind a decision, the shape of a domain, the running history of a client. Too big and prose-heavy to ever be always-on, so it's pulled in surgically.
[[wikilinks]]. Recall walks the graph — grabbing the ## Current View first, drilling deeper only when needed.A specialty-finance engagement — performance, pipeline, reporting narratives.
An operations-heavy business — records, costs, planning narratives.
Nektar itself — voice corpus, prospecting rules, tech stack.
Sports-analytics lab, editorial, newsletter voice.
Memory answers "what's the invariant?" in one line. Obsidian answers "walk me through how this client's reporting evolved" in five paragraphs. Different questions, different cost profiles, different homes. The ## Current View convention is the bridge — it lets recall be cheap even when the underlying page is long.
The first four layers accumulate knowledge. This layer turns it outward on a schedule — scheduled jobs and skills that produce real output from everything the brain knows about me and my clients.
| Job / skill | Cadence | Produces |
|---|---|---|
| /nektar-drafts | weekly · scheduled | ~4 LinkedIn drafts/wk in my voice, on-brand ICP |
| /pb-newsletter | 2×/wk · scheduled | Newsletter drafts, emailed for redline |
| cos-agent | daily · scheduled | Tasks → vault-grounded triage → ranked daily brief |
| /client-report | monthly | A client's website + social marketing report |
| /wiki-insights | on demand | Cross-vault insight synthesis |
Everything outbound is drafted, never auto-sent. Content lands as a draft for me to redline; email goes only on an explicit go. The automation spends the brain's knowledge — it doesn't spend my reputation without a human gate.
Newer than the rest of this page: six thin command wrappers that each do one repetitive thing correctly and log their own usage, so the brain can measure how much friction it actually removes.
| Tool | Freezes the repeated… |
|---|---|
| ghx | multi-account git-auth incantation — org-aware token injection, so plain git push just works |
| secret / gsecret | shell-meta-safe env / GCP Secret Manager value reads (never source a creds file) |
| bqx | data-warehouse schema lookup + query, one wrapper |
| test-runner | project-aware test run |
| nextfresh | clean Next.js dev restart |
A demand audit found the same fragile incantations being hand-rebuilt hundreds of times across a few weeks — each wrapper freezes the correct form once. mem-event → mem-value.sh then logs the payoff on a ledger, so the brain measures the friction it removes instead of assuming it. It's the same instinct as The One Law: don't trust that a control works — instrument it.
There's also a growing terminal cockpit — the ai-assistant / cos-agent life-OS, now with a ⌘J chief-of-staff dock and the NektarBee living-presence layer — which is where this whole brain is increasingly getting a face. That's a project in its own right; here it's just the newest consumer of the same underlying memory.
The system doesn't just remember — it routes work by judgment vs labor, not by "smart model vs dumb model." The failure mode being corrected: burning the most capable model as a bulk file-reader instead of as the judge.
Consulted only at the hard nodes — plan critique, "should we even do this," adjudicating the survivors of a review. Sees the distilled question, never the repo.
Decomposes, routes, cite-verifies what delegates claim, synthesizes the final answer. The only tier that talks to me.
Code-gen, file reads, mechanical fixes, repo-scale scans. Fallback chain: Sonnet → Codex → Antigravity → Haiku → local Ollama.
Cheap laborers fan out wide to find → Opus dedups & cite-verifies → Fable adjudicates the survivors. Same coverage, but the expensive judge sees a short candidate list, not the codebase. One caveat baked in: on money-path / correctness-critical code the finder floor is Sonnet — a cheap finder that misses a bug class means Fable never gets to judge it.
This is why the rules insist Claude delegates repo-scale reads to Codex and routes second opinions through /local-llm-review — it keeps the orchestrator's context clean for the one thing only it can do: hold the whole picture and synthesize.
Routing used to be model-only. Now the brain also exposes domain data as first-class tools: a read-only MCP server over one client's domain — 17 tools spanning records, lineage, and transaction history — registered to both Claude and Codex. A cross-app "which line actually outperforms?" question now reaches for a purpose-built tool before anyone hand-writes a database query. Same read, verified, every session — a capability that enters the always-on tier as a tool registration, not another rules file.
Every layer above wants to grow. Left alone, the always-on tier balloons until it eats the context window it was meant to preserve. One law holds the whole thing in check.
New knowledge lands paths-scoped or skill-loaded by default. Adding to the always-on tier — unscoped rules, MEMORY.md, pitfalls_general.md — requires shrinking something else in that tier by at least as much. Compress opportunistically when you're already editing a file; never as a batch maintenance pass.
The /memory-audit → queue → maintain cron (~1,200 lines) was killed after a review found its queue 60 entries deep, never drained, 43% reject rate. It manufactured labor and shipped nothing.
/wrap classifier sweep · /recall tiered retrieval · memory-lint.sh. On-demand, no queue, no busywork.
The docs say it plainly: prompt-level rules are not a primary control across thousands of turns. That's why the cap is a default, not a hope.
Diffs contain only what was asked for · bug fixes ship with a reproducing test · repo-scale reads go to Codex, not the orchestrator · first diagnoses land · wrap-up never sweeps dirty state. If a session ends without those signals, the rules became decorative — and the system says to flag that in-session and tighten the offending section.