# AtoCore — sanctioned capture surfaces **Scope statement**: AtoCore captures conversations from **two surfaces only**. Everything else is intentionally out of scope. | Surface | Hooks | Status | |---|---|---| | **Claude Code** (local CLI) | `Stop` (capture) + `UserPromptSubmit` (context injection) | both installed | | **OpenClaw** (agent framework on T420) | `before_agent_start` (context injection) + `llm_output` (capture) | both installed (v0.2.0 plugin, Phase 7I) | Both surfaces are **symmetric** — push (capture) and pull (context injection on prompt submit) — so AtoCore learns from every turn AND every turn is grounded in what AtoCore already knows. ## Why these two? - **Stable hook APIs.** Claude Code exposes `Stop` and `UserPromptSubmit` lifecycle hooks with documented JSON contracts. OpenClaw exposes `before_agent_start` and `llm_output`. Both run locally where we control the process. - **Passive from the user's perspective.** No paste, no manual capture command, no "remember this" prompt. You just use the tool and AtoCore absorbs everything durable. - **Failure is graceful.** If AtoCore is down, hooks exit 0 with no output — the user's turn proceeds uninterrupted. ## Why not Claude Desktop / Claude.ai web / Claude mobile / ChatGPT / …? - Claude Desktop has MCP but no `Stop`-equivalent hook for auto-capture; auto-capture would require system-prompt coercion ("call atocore_remember every turn"), which is fragile. - Claude.ai web has no hook surface — would need a browser extension (real project, not shipped). - Claude mobile app has neither hooks nor MCP — nothing to wire into. - ChatGPT etc. — same as above. **Anthropic API log polling is explicitly prohibited.** If you find yourself wanting to capture from one of these, the real answer is: use Claude Code or OpenClaw for the work that matters. Don't paste chat transcripts into AtoCore — that contradicts the whole design principle of passive capture. A `/wiki/capture` fallback form still exists (the endpoint `/interactions` is public) but it is **not promoted in the UI** and is documented as a last-resort escape hatch. If you're reaching for it, something is wrong with your workflow, not with AtoCore. ## Hook files - `deploy/hooks/capture_stop.py` — Claude Code Stop → POSTs `/interactions` - `deploy/hooks/inject_context.py` — Claude Code UserPromptSubmit → POSTs `/context/build`, returns pack via `hookSpecificOutput.additionalContext` - `openclaw-plugins/atocore-capture/index.js` — OpenClaw plugin v0.2.0: capture + context injection Both Claude Code hooks share a `_infer_project` table mapping cwd to project slug. Keep them in sync when adding a new project path. ## Kill switches - `ATOCORE_CAPTURE_DISABLED=1` → skip Stop capture - `ATOCORE_CONTEXT_DISABLED=1` → skip UserPromptSubmit injection - OpenClaw plugin config `injectContext: false` → skip context injection (capture still fires) All three are documented in the respective hook/plugin files.