Locus memory palace navigation and management. Use when you need to read from or write to the agent's memory palace: querying what is known about a topic, recording findings from the current session, updating canonical facts, navigating to a specific room, or checking whether consolidation is needed. Also use at the end of any session that produced new knowledge worth retaining.
Locus is a hierarchical markdown-based memory system. Directories are rooms, files are knowledge. The goal is always: minimal context loaded, maximum precision retrieved.
Always start here, regardless of the task.
.locus/ directory~/.locus/ for the global palaceINDEX.md from the palace root using a shell command or file read:
cat <palace-root>/INDEX.md
Do not read any other files yet.
For each relevant room:
cat <palace-root>/<room-path>/<room-name>.md
Report (internally):
Use when recording a durable, verified fact that persists across sessions.
# Use your editor or patch tool to make a targeted edit
INDEX.md still accurately describes the room. Update if needed.Use for ephemeral findings or anything not yet confirmed as durable. Always write a session log at the end of any session that touched a room.
<room-name>/sessions/YYYY-MM-DD.md (today's date).
If the file exists, append. If multiple sessions in one day: YYYY-MM-DD-2.md.## <HH:MM> — <brief task description>
### Findings
<Specific facts learned.>
### Actions Taken
<What was written or changed, with file references.>
### Consolidation Notes
<What to promote to a canonical file. Be explicit. Leave blank if nothing.>
Only when no existing room fits the information to be stored.
mkdir -p <palace-root>/<layer>/<room-name>/sessions
# layer is "global" or "projects/<project-name>"
templates/room/room-name.md.INDEX.md with a one-line description and path.INDEX.md remains under 50 lines.After any write, check:
| Condition | Action |
|---|---|
| Room main file > 150 lines | Extract a section into a specialty file |
| Room main file > 200 lines | Must extract before further writes |
sessions/ has > 5 unprocessed logs | Run locus-consolidate |
| Same room accessed 3+ consecutive sessions | Run locus-consolidate |
| INDEX.md > 40 lines | Consider splitting into sub-indices |
At the end of every Locus operation, emit:
Locus: read <N> files (<M> lines). Wrote to <file(s)>. [Consolidation needed: yes/no]
Copy or symlink to your Codex skills directory:
cp skills/codex/locus/SKILL.md ~/.codex/skills/locus/SKILL.md