Most repositories should start with internal memory under <repo>/ar-memory/. Use external memory when you intentionally want durable memory in a separate repository.
External memory is useful when:
c-12-closeout worktree closeout should record code-memory ledger mappingsprojects/
agents-remember/
ar-coordination/
AGENTS.md
skills/
memory-repos/
ar-my-app/
memory.md
onboarding/
docs/
system/
my-app/
Each selected code repository gets one memory repo:
ar-coordination/memory-repos/ar-<repo-name>/
Install the runtime first through the MCP server:
runtime_install()
Then ask the agent to run c-00-initialize-memory-repo in external-memory mode for the target repository. External mode should be explicit; the c-00-initialize-memory-repo skill defaults to internal memory.
External memory uses memory-repo storage:
{
"version": 2,
"onboarding": {
"storage": {
"mode": "memory-repo"
},
"pathRules": {
"include": {
"paths": ["README.md", "docs/**", "src/**"],
"fileTypes": [".md", ".py", ".ts", ".tsx"]
},
"exclude": {
"paths": ["node_modules/**", "vendor/**", "dist/**", "build/**", ".env", ".env.*"],
"fileTypes": [".png", ".zip"]
}
}
},
"crossRepo": {
"allow": []
}
}
In a one-repo memory repo, unscoped path rules are fine. In shared coordinator settings, scope rules by repository path when one settings file covers more than one repo.
The c-08-ar-coordination-context-resolver skill checks internal memory first, then external memory:
<repo>/ar-memory/
<ar-coordination>/memory-repos/ar-<repo>/
An external memory repo does not force sibling repositories into external mode. Resolution is per target repository.
External-memory changes need code and memory to stay mapped. c-12-closeout handles that sequence for both direct edits in the current checkout and worktree-backed tasks:
memory.mdDo not manually update the ledger unless you are deliberately repairing memory history.