Session 2 of the four-session plan. Lands two operational pieces:
the Claude Code slash command that makes AtoCore reachable from
inside any Claude Code session, and the full backup/restore
procedure doc that turns the backup endpoint code into a real
operational drill.
Slash command (.claude/commands/atocore-context.md)
---------------------------------------------------
- Project-level slash command following the standard frontmatter
format (description + argument-hint)
- Parses the user prompt and an optional trailing project id, with
case-insensitive matching against the registered project ids
(atocore, p04-gigabit, p05-interferometer, p06-polisher and
their aliases)
- Calls POST /context/build on the live AtoCore service, defaulting
to http://dalidou:8100 (overridable via ATOCORE_API_BASE env var)
- Renders the formatted context pack inline so the user can see
exactly what AtoCore would feed an LLM, plus a stats banner and a
per-chunk source list
- Includes graceful failure handling for network errors, 4xx, 5xx,
and the empty-result case
- Defines a future capture path that POSTs to /interactions for the
Phase 9 reflection loop. The current command leaves capture as
manual / opt-in pending a clean post-turn hook design
.gitignore changes
------------------
- Replaced wholesale .claude/ ignore with .claude/* + exceptions
for .claude/commands/ so project slash commands can be tracked
- Other .claude/* paths (worktrees, settings, local state) remain
ignored
Backup-restore procedure (docs/backup-restore-procedure.md)
-----------------------------------------------------------
- Defines what gets backed up (SQLite + registry always, Chroma
optional under ingestion lock) and what doesn't (sources, code,
logs, cache, tmp)
- Documents the snapshot directory layout and the timestamp format
- Three trigger paths in priority order:
- via POST /admin/backup with {include_chroma: true|false}
- via the standalone src/atocore/ops/backup.py module
- via cold filesystem copy with brief downtime as last resort
- Listing and validation procedure with the /admin/backup and
/admin/backup/{stamp}/validate endpoints
- Full step-by-step restore procedure with mandatory pre-flight
safety snapshot, ownership/permission requirements, and the
post-restore verification checks
- Rollback path using the pre-restore safety copy
- Retention policy (last 7 daily / 4 weekly / 6 monthly) and
explicit acknowledgment that the cleanup job is not yet
implemented
- Drill schedule: quarterly full restore drill, post-migration
drill, post-incident validation
- Common failure mode table with diagnoses
- Quickstart cheat sheet at the end for daily reference
- Open follow-ups: cleanup script, off-Dalidou target,
encryption, automatic post-backup validation, incremental
Chroma snapshots
The procedure has not yet been exercised against the live Dalidou
instance — that is the next step the user runs themselves once
the slash command is in place.