Primary Objective: goal:engram_mvp_v1 (harness continuity; operationalize "Against Flat Knowledge" via geometric sheaf replacing flat weights/text/vec DBs).
This file + CLAUDE.md + docs/ + docs/skills/ + processes/*.toml define the contract for any agent editing the Engram substrate or its representation.
Read first: docs/AGENT_MEMORY_CONTRACT.md · All 87 tools: docs/TOOL_DECISION_MAP.md · JIT deformation: docs/DEFORMATION_PLAYBOOKS.md · Harness injection: docs/HARNESS_INJECTION.md · Harness (shipped): docs/HARNESS_INJECTION.md · docs/SUBSTRATE_WINS_PLAN.md (historical)
| Phase | Tools |
|---|---|
| Wake | mcp_engram_session_start(intent) — one call, inline continuation bundle + backend readiness; execute suggested_actions → mcp_engram_ack_wake_queue(executed=true) before edits (hard gate default for ENGRAM_PROFILE=agent) |
| Edit prep | mcp_engram_context_for_edit(absolute_path) — code atlas v2.1 + post_edit_palette (replaces mandatory watch_workspace at wake) |
| Read | mcp_engram_recall(query, scope="anchors") — goals/traces/rituals before episodic noise |
| Decide / write | mcp_engram_quick_trace at forks; mcp_engram_remember for new concepts only (recall first; use update if match > 0.85) |
| Handoff | mcp_engram_session_end(summary, prepare_compression=true) — structured packet + rehydration_manifest for next wake |
| Continuity nudges | Sentinel soft rehydrate_suggested (~30 turns / ~120 min); scar(uncertainty_status=…) for withheld memory claims; A/D/R soft hint on significant forks only |
| Probe / mode | mcp_engram_get_backend_readiness; `mcp_engram_set_memory_mode("lean" |
Lean by default. Do not call watch_workspace, rebuild_bvh, summarize, or query_with_momentum at wake unless deep mode or a specific task requires it. See docs/MCP_TOOLS_REFERENCE.md for Essential / Power / Lean-avoid tiers.
MCP config: ENGRAM_PROFILE=agent via scripts/engram-grok (two env vars only). See integrations/README.md for Grok, Cursor, Claude, Antigravity, Codex.
Load public skills: SKILLS.md + docs/skills/engram-wake-up.md, engram-working-memory.md, engram-session-end.md.
Escalate with set_memory_mode("deep") when lean bundle is insufficient (meta arcs, lawfulness audits, relation-graph navigation).
Dogfooding note: "Dogfood" means using Engram's MCP tools and rituals to record and evolve the current task as living geometry.
- Deep geometric entry (cost-aware):
mcp_engram_query_with_momentum(directional/trending only at entry or long-horizon).mcp_engram_search_by_relation(seed, direction="both")+visualize.- For code:
mcp_engram_context_for_editormcp_engram_context_for_file(absolute path);mcp_engram_recall_in_file(AABB). Addwatch_workspaceonly if passive daemon ingest is needed. - Anchor first: ritual:, goal:, trace:, process:engram. .
- Recall before derive.
mcp_engram_updatepreferred (Lyapunov drift); neverforget+remember. - Every significant decision/fork/edit:
mcp_engram_record_reasoning_trace(orquick_trace) withdecision_point,justification,alternatives_considered,falsifiability,spatial_context,goal_context,prev_trace(chain),related_entities. - Code Edit Ritual v1 (mandatory for crates/, docs/skills/, mcp.rs, store.rs, daemon, processes/, integrations/):
- Pre:
context_for_edit+ recall_in_file + intent trace. - Edit (search_replace/write after read).
- Post: re-context, delta trace (chained), relate edit to goal/arc,
remember_solutionorscar.
- Pre:
- Scar immediately on ruled-out approaches, friction, dead-ends, repetition, doom loops.
- Goals: Use
engram-goalskill / mcp goal_* ; set primary; decompose; status updates with traces. - Spatial (Item 1.5): Lean path uses
context_for_editper file. Deep may addwatch_workspaceonce per project.force_spatial_ingestfor recovery only. - Sub-agent governance: Narrow one-shot prompts only (~20 calls max). Kill on "doom loop detected". See
processes/monitor.subvisor.toml. - Meta-work escalation: For design:/progress: arcs, recall relevant helpers and living anchors from the wake bundle; mint tiles at arc boundaries.
When editing public surface (README, docs/, .github/, examples/, Cargo, CHANGELOG, SECURITY, AGENTS/CLAUDE):
- Lead with 8-tool contract + Grok Build story (docs/GROK_BUILD_MEMORY.md).
- Highlight uniques: geometric/non-flat (q/p/CRS/Merkle/sheaf/H¹/VSA/spatial/continuation/lawfulness/rituals/subvisor/process tomls) vs flat vector/RAG.
- Emulate popular (badges, quickstarts, comparison tables, examples/cookbooks, .github templates with checklists, AGENTS/CLAUDE, CHANGELOG, CI matrix).
- Dogfood: every edit records trace/remember/relate/update to active goal; spatial where applicable.
- Current build:
cargo build && target/debug/engram --version(use target/debug, not stale ~/.local/bin). - Link: AGENT_MEMORY_CONTRACT.md, GEOMETRIC_MEMORY.md, RITUALS.md, MCP_TOOLS_REFERENCE.md, GROK_BUILD_MEMORY.md.
Declarative first-class: processes/*.toml loaded at session_start. Subvisor uses OP_INVERT/H¹ for tool-graph oversight.
See processes/, mcp.rs, docs/RITUALS.md.
mcp_engram_verify_manifold_integrity(min_crs=0.74, sample),verify_block_lawfulness,genesis,spatial_status.- CRS >=0.74 grounded; pinned for axioms.
- Use todo_write for complex multi-step.
- For MCP in harnesses: ALWAYS
search_toolfirst (exact schema), thenuse_tool(qualified name e.g. engram__mcp_engram_...). - Hot promotion for high-value artifacts:
promote_hot. - Do not delete MCP tools — tier in documentation only; 87 tools remain for power users (83
mcp_engram_*+ 4 linguistic).
Documentation alone does not create memory. Every session:
mcp_engram_session_start(intent)— first call, every chat/restart.mcp_engram_context_for_edit(path)— before editing any file incrates/,processes/,docs/,grok-plugin-engram/.mcp_engram_quick_trace— at every significant fork (design choice, commit boundary).mcp_engram_session_end(summary, prepare_compression=true)— end of every work block.
If you completed substantive work without calling these tools, the substrate has no geometric record — treat that as a contract violation. Slash commands (/engram-wake, /engram-edit, /engram-trace, /engram-session-end) exist to make invocation habitual.
See also:
- Public agent rituals: SKILLS.md +
docs/skills/(canonical skill protocols) - Grok Build pitch: docs/GROK_BUILD_MEMORY.md
- 8-tool contract: docs/AGENT_MEMORY_CONTRACT.md
- Full cycle:
docs/examples/full_ritual_cycle.md,examples/hello-engram-agent.py - docs/RITUALS.md, docs/HARNESS_INJECTION.md, docs/DEFORMATION_PLAYBOOKS.md, docs/MCP_TOOLS_REFERENCE.md, docs/GEOMETRIC_MEMORY.md
- MANIFESTO.md, CONTRIBUTING.md, .github/PULL_REQUEST_TEMPLATE.md
Violations of this contract are scarred immediately. The manifold will deflect future attempts.