# CLAUDE.md

Canonical project context is in `AGENTS.md`. This file exists for Claude Code compatibility.

## Snipara

Use Snipara Hosted MCP before answering project-specific questions.

- Endpoint: `https://api.snipara.com/mcp/YOUR_PROJECT_SLUG`
- If the client supports native skills, install the generated Snipara skill pack from `.snipara/templates/skills`. Keep `AGENTS.md` as the shared fallback for clients without native skill support.
- Start substantial work with `snipara_recall` and a targeted `snipara_context_query`.
- Use `snipara_context_query` for source truth and `snipara_get_chunk` for exact cited sections.
- When `snipara_context_query` returns `answer_pack`, use its facts, caveats, source map, and verification checklist before drafting claims.
- Use `snipara_code_callers`, `snipara_code_imports`, `snipara_code_neighbors`, or `snipara_code_shortest_path` for canonical structural code questions.
- For code impact and structural code questions, use `snipara-companion code callers/imports/neighbors/shortest-path/impact` first when `snipara-companion` is installed; it auto-selects hosted MCP for clean indexed code or the local overlay for dirty/ahead worktrees and reports `sourceSelection`. Use hosted `snipara_code_impact` only when companion is unavailable or after push/reindex for canonical graph impact.
- Use `snipara_code_symbol_card` before editing important symbols within plan capacity.
- When the plan is visible and `snipara-companion` is installed, keep the machine plan in JSON, use `snipara-companion workflow start`, `phase-start`, and `phase-commit` per phase, and after `workflow resume` rerun `workflow phase-start` before editing again.
- Use Snipara Sandbox only when sandboxed execution or repeatable validation materially helps. For runtime-bound phases, capture compact rehydratable state with `workflow runtime-checkpoint <phase_id> --summary "<state>" --rehydrate-file <state.json>`. Then `workflow resume` restores workflow and memory continuity plus the recorded Sandbox binding and prints a reattach or rehydrate plan. It does not snapshot or exactly restore a live Snipara Sandbox or REPL process.
- End substantial work with `snipara_end_of_task_commit` when available; for managed workflows, end every phase with `snipara-companion workflow phase-commit` and the task with `snipara-companion final-commit`.
- Use `snipara_remember_if_novel` or `snipara_remember` only for narrow durable memories.
- When remembered knowledge is obsolete or replaced and `snipara-companion` is installed, use `snipara-companion memory invalidate <memory-id>` or `snipara-companion memory supersede <old-memory-id> <new-memory-id>`; otherwise use hosted `snipara_memory_invalidate` or `snipara_memory_supersede`.
- Do not store secrets, one-off command output, raw logs, or unreviewed guesses in memory.
- Use the Snipara Claude Code plugin only when slash commands, skills, or hooks are helpful; Hosted MCP remains the normal agent path.
