Repository navigation
Description
Problem
Tier 3 produces live agents with no long-term memory: no observations, no reflections, no era summaries, no context injection, no recall. Nothing in the Deck repo mentions installing the brain, and the leak gate lists the memory-layer repository's name as a forbidden term (scripts/leak-gate.mjs:211), so Deck's docs cannot even link it today. The brain is its own public repository (inkie-the-brain, v0.3.0) with a QUICKSTART, but that is written for a single Claude Code user, not for Deck's multi-agent layout.
Evidence
Seen in test: a full search of the tree found nothing wiring memory into Deck's install path. Background: an internal integration plan (2026-08-14) recommended a packages/brain inside this monorepo; the memory-layer project has since shipped as its own public repo, so this issue assumes that shape instead.
Things found while reading the memory-layer repo that this issue depends on:
- Deck's
create-agent.shalready writesAGENT_NAMEinto each agent's.claude/settings.json, which is tier 1 of the memory repo's silo resolution. So once hooks are wired, each agent lands in its own memory silo with no extra routing. Missing: the hooks, aUSER_NAMEvalue, and the seed kit that the memory repo'sagent init <name>command creates. - Paths disagree:
create-agent.shdefaultsINBOX_ROOTto~/.the-vault/agents, INSTALL.md uses~/deck/inbox, the memory repo uses~/.the-brain/agents. The memory repo's persona-inject hook reads~/agents/<name>/CORE.md, which Deck's templates do not ship. - The memory repo's own setup helper expects the checkout at a fixed path and greps settings for a matching build path; a clone named differently does not match. Its systemd units make the same assumption.
Proposed fix (Deck repo)
This is the Deck-side half of a two-repo fix; see the linked brain-repo issue for the prerequisite work there (memory-loop config, corrected docs, non-interactive install command). Deck-side, once that lands:
- M1, memory loop, on by default for tier-3 agents. INSTALL.md tier 3 gains a "memory" step that runs the brain repo's install command;
create-agent.shwires the hooks into the agent's own.claude/settings.json(per agent, not global), setsUSER_NAME, and calls the memory repo'sagent init <name>to seed the silo. If the brain is not installed,create-agent.shsays so and continues (memory off), never fails. - M2, semantic search, guided. INSTALL.md gets a "give your agents recall" section: a vector-DB dependency (Docker; on WSL, Docker Desktop's WSL integration or Docker Engine in Ubuntu), an embeddings API key in the brain's own env file, a first index build, and
create-agent.shadds the recall MCP server to each agent's settings when M2 is detected. Mark the paid-key boundary the same way tier 3 marks the model CLI. - M3, watcher daemon, guided. One INSTALL.md subsection pointing at the brain repo's systemd units; tie in with issue 8 and requirement A so the watcher starts with Deck.
- Skills and tools for agents.
packages/base/templates/TOOLS.mdnames the memory layer concretely instead of "if you have a memory/recall system";create-agent.shinstalls the brain repo's recall instruction into each agent home. - Deck seam. Relax the leak-gate rule so the public memory-layer repo's name and URL are allowed (with a self-test proving the internal variants still fail); document the path convention (persona in
~/agents/<name>/, memory in~/.the-brain/agents/<name>/, inbox underINBOX_ROOT) inpackages/base/docs; decide whether templates ship aCORE.mdfor the persona-inject hook. No Deck code imports the brain; integration stays files on disk.
Acceptance criteria
- A fresh user following only Deck's INSTALL.md (including the WSL section) ends with tier-3 agents that write observations to their own silo after a
/compact, and, with M2 done, can find that observation via recall search. - Deck still boots, and tiers 1 to 3 still pass, with no brain installed;
create-agent.shreports memory as off rather than failing. pnpm check:leaksand its self-test pass with the brain linked from Deck's docs.
From the 2026-09-27 Windows/WSL install test.
Activity
simon-inkie commentedon Sep 27, 2026
Brain-repo companion issue (prerequisite work): simon-inkie/inkie-the-brain#11
fix(base): pre-check the memory build and wire memory after the probe (…
Merge origin/main into claude/dazzling-davinci-h66qwp-issue-21 (#21)
fix(base): harden memory wiring against identity, symlink and partial…
fix(base): refuse memory on any symlink in the agent's .claude and cl…
docs(specs): record commit ids in REVIEW.md (#21)
docs(specs): keep commit ids out of REVIEW.md prose for the leak gate (…
fix(base): refuse memory on hard links and a symlinked agent home, re…
docs(specs): record the round 5 commit id in REVIEW.md (#21)
docs(specs): split commit-id rows in REVIEW.md for the leak gate (#21)
fix(base): fail-closed containment in node, hard-linked settings, sta…
docs(specs): record the round 6 commit id in REVIEW.md (#21)
fix(base): keep the saved stdout out of children and refuse .. in the…
docs(specs): record the round 7 commit id in REVIEW.md (#21)
test(base): use neutral names and make the detached-child test prove …
docs(specs): record the round 8 commit id in REVIEW.md (#21)
feat(base): wire the memory loop in create-agent when a checkout is p…
fix(setup): require jq and never rebuild over installed memory hooks (#…
feat(setup): opt-in Brain install, wired after the persona check (#21)
simon-inkie commentedon Nov 19, 2026
Slice 1 merged (PR 230): opt-in setup.sh --memory, pinned build, jq and Node 22 checks. Still open: the recall template and a verified real Brain build with a signed-in compaction.