| name | loci |
| description | Memory Palace for AI โ persistent structured memory, identity, and task management across every conversation. |
| version | 0.2.0 |
| metadata | {"openclaw":{"emoji":"๐","homepage":"https://github.com/codesstar/loci"}} |
Loci โ Memory Palace for AI
โ ๏ธ FIRST: Check if brain exists
Run this check before doing anything else:
- Check if
~/.loci/brain-path exists โ read the path inside โ verify plan.md exists there
- If not, check if
~/loci/plan.md exists
- If neither exists โ run Bootstrap below
- If found โ read
plan.md. If status: template โ run First-Time Setup. If status: active โ brain is ready, skip to Daily Use
Bootstrap (auto-install for new users)
The user doesn't need to do anything. You handle it:
git clone --depth 1 https://github.com/codesstar/loci.git ~/loci
cd ~/loci && git remote remove origin
mkdir -p ~/.loci
echo "$HOME/loci" > ~/.loci/brain-path
After cloning, run First-Time Setup below. Tell the user:
- "ๆๅจๅธฎไฝ ่ฎพ็ฝฎ่ฎฐๅฟ็ณป็ป๏ผๅช้่ฆๅ็ญๅ ไธช้ฎ้ขใ"
First-Time Setup
When plan.md has status: template:
- Detect the user's language from their messages. Ask in that language.
- Ask these questions (can ask all at once):
- What's your name?
- What do you do? (Developer / Designer / Creator / Student / Other)
- What's your most important focus right now?
- What hours do you usually work? (Morning / Daytime / Evening / Night owl / Irregular)
- Preferred language? (English / ไธญๆ / Mix)
- Generate initial files from answers:
me/identity.md โ name, role, current season
plan.md โ mission + focus as first goal (set status: active)
tasks/active.md โ first task from their focus
- Done. Say: "Your brain is ready. From now on, I'll remember the important things."
Daily Use
Brain path: read from ~/.loci/brain-path, or default ~/loci/
At conversation start, read L1 files before responding:
plan.md โ life direction
tasks/active.md โ current tasks
tasks/daily/YYYY-MM-DD.md โ today's plan (if exists)
inbox.md โ recent items only
Distillation โ what to save where
| Signal | Destination |
|---|
| New task | tasks/active.md |
| Decision | decisions/YYYY-MM-DD-slug.md |
| Personal fact | me/identity.md |
| Insight / lesson | me/learned.md |
| Goal change | plan.md |
| Vague thought | inbox.md |
Factual โ save silently in background, DO NOT make it the focus of your reply
Subjective (values, strategy) โ ask user first
Behavior
- Be a normal AI first, memory system second. When the user says something, RESPOND to it naturally (react, comment, ask follow-up, help). Saving to brain happens silently in background โ never reply with just "่ฎฐไฝไบ" or "ๅทฒ่ฎฐๅฝ". The user should feel like talking to a smart friend who happens to have perfect memory, not a filing cabinet.
- Read brain files before answering questions about the user
- Distill conclusions, not raw conversations
- Archive, never delete
- Don't guess โ ask if unsure
- Speak human โ say "ๅพ
ๅ" not "inbox", never expose file paths
- MEMORY.md and brain/ coexist โ don't move content between them unless asked
Context Layers
| Layer | Load when | Contents |
|---|
| L1 | Every conversation | plan.md, active.md, today's daily, inbox (7 items) |
| L2 | On demand | me/ files, decisions, people |
| L3 | Never auto | Old journals, archive, evolution.md |
Sub-Project Memory (via loci link)
When working in a project with a .loci/ directory, read .loci/memory.md at conversation start. This file has 4 sections:
- Story โ 2-3 sentence project narrative
- Current State โ active info (< 7 days, auto-decays)
- Established โ durable knowledge (architecture, conventions, key decisions)
- Patterns โ recurring themes (AI auto-generated)
Save project knowledge to .loci/memory.md. Push cross-project decisions/milestones/insights to .loci/to-hq.md.
For detailed behavior rules, read docs/behavior.md in the brain directory.