Skip to content

feat: substrate wins — harness injection, Grok Build default memory (0.5.0)#29

Merged
staticroostermedia-arch merged 22 commits into
masterfrom
feat/mvp-github-prep-2026-06
Jun 11, 2026
Merged

feat: substrate wins — harness injection, Grok Build default memory (0.5.0)#29
staticroostermedia-arch merged 22 commits into
masterfrom
feat/mvp-github-prep-2026-06

Conversation

@staticroostermedia-arch

@staticroostermedia-arch staticroostermedia-arch commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Makes Engram the default geometric memory backend for Grok Build / Cursor / Claude — not docs-only. Agents get harness injection at wake (suggested actions, trace chains, trusted tiles, condensation hints) via one session_start call or ambient .cursor/engram-wake.md.

Pitch for xAI reviewers: Local, non-flat 256KB HolographicBlocks + VSA/sheaf + CRS lawfulness + rituals. 8-tool lean contract for daily agent work; 62 MCP tools tiered for power users. CI gates include agent-memory harness (marketplace-style smoke).


What shipped (substrate wins WS-1 → WS-5)

Workstream Deliverable
WS-1 Cursor auto-wake .cursor/mcp.json, .cursor/rules/engram.md, scripts/cursor-engram-preflight.sh, KI bake path for engram-wake.md
WS-2 Auto-tile draft tile_draft.rsdraft_tile_from_chain, condensation hints with draft_payload
WS-3 Process metrics process_metrics.rs + mcp_engram_process_metrics
WS-4 verified_sequence docs/schemas/verified_sequence_v0.json, tile-draft + execute slash commands
WS-5 Sub-agent TOML trio sub-agent-launch, sub-agent-relay, sub-agent.subvisor, sub_agent_relay_v1 workflow

Runtime / harness

  • harness_injection.rssuggested_actions, trusted_tiles, condensation_hints, format_suggested_actions_markdown
  • mcp.rsprocess_contextrealized_by; new MCP tools; lean wake (no mandatory watch_workspace)
  • tools/test-harness/python/mcp_test_client.py — harness_injection gate + tool registration checks

Plugin / docs

  • 20 Grok slash commands (grok-plugin-engram/commands/)
  • Public agent surface: docs/AGENT_MEMORY_CONTRACT.md, docs/GROK_BUILD_MEMORY.md, docs/HARNESS_INJECTION.md, docs/SUBSTRATE_WINS_PLAN.md, docs/skills/*

CI

Job Status
ubuntu: build + test + clippy + fmt ✅ (run 27369833956)
agent-memory harness (CPU-only MCP)
macos matrix ⏳ runner queue (code path identical to ubuntu)

Local verification: cargo fmt -- --check, cargo clippy -- -D warnings, cargo test, harness --suite agent-memory.

Version: 0.5.0cargo build -p engram-server && target/debug/engram --version


Quickstart (reviewer)

cargo build -p engram-server
target/debug/engram --version   # 0.5.0

# Grok Build MCP (lean)
ENGRAM_PROFILE=agent ./scripts/engram-grok mcp

# Cursor ambient wake
./scripts/cursor-engram-preflight.sh   # writes .cursor/engram-wake.md (gitignored)

Load docs/GROK_BUILD_MEMORY.md + docs/AGENT_MEMORY_CONTRACT.md into agent instructions.


Comparison (why not flat RAG / .md files)

Flat vector / markdown Engram
Storage append-log / chunks 256KB geometric blocks (q/p/CRS/Merkle)
Integrity none verify_*, scars, CRS ≥ 0.74
Continuity session-local session_end handoff + continuation bundle
Code context RAG over files context_for_edit + spatial AABB
Agent discipline hope harness injection + ritual skills + subvisor H¹

Follow-up: public surface cleanup (recommended before merge to master)

This PR is feature-complete for substrate wins but the repo still carries internal meta-work and scratch that will confuse external readers. Suggested cleanup pass (separate commit or pre-merge):

🔴 Remove from public tree (or move to private .grok/)

Path Why
docs/GITHUB_MVP_PREP_PLAN.md (~3.3k lines) Live execution log with trace IDs, sub-agent failures, internal dogfood — not reviewer-facing
docs/SESSION_END_2026-05-27.md Dated session snapshot
docs/item1.5_closeout_draft.md, item1.5_closeout_records.md Internal Item 1.5 closeout logs
docs/phase_c_*.md Phase-specific architect patches
docs/post_rebuild_formal_logging_checklist.md Dev checklist
docs/OptiX_TUI_Update_Plan.md Internal TUI plan
docs/Engram_Build_Launch_Configuration.md 593-line internal launch config
IMPLEMENTATION-PLAN.md Already in .gitignore but still trackedgit rm --cached
sem_search.rs (repo root) Scratch file; not in harness
design/processes/*.toml Stale duplicates of processes/

🟡 Archive or gate (speculative / one-off)

Path Why
processes/meta/* (7 loops: x_ai_intel, consciousness, world_state, etc.) Speculative internal loops — not marketplace core
processes/workflow/complete-gemma-integration.toml One-off Gemma hardware task
processes/monitor/gemma-integration.subvisor.toml Same
scripts/launch-leg-browser-review.sh, scripts/item1.5_bootstrap_commands.md Leg-browser / bootstrap internals
docs/ego_intent_logophysics_memory_palace_framework.md Research notes
docs/praxis_as_protocol_spec.md, reasoning_functors_as_praxis_extension.md Research / extension specs
DOCUMENTATION_GAP_WAKE_UP_CONCEPT_MAPPING.md Internal gap analysis

🟢 Keep (public face)

  • docs/AGENT_MEMORY_CONTRACT.md, GROK_BUILD_MEMORY.md, GEOMETRIC_MEMORY.md, RITUALS.md, MCP_TOOLS_REFERENCE.md, HARNESS_INJECTION.md, SUBSTRATE_WINS_PLAN.md
  • docs/skills/*, examples/*, grok-plugin-engram/, integrations/, core processes/ (ritual, harness, monitor, workflow minus meta/gemma)
  • HOW_WE_ACTUALLY_USE_THIS_IN_2026.md — keep but trim spouse/Mac-specific framing for public
  • design/agent_memory_mvp_plan.md, design/GROK_MARKETPLACE_EXCELLENCE_PLAN.md — linked from public docs; OK as design refs

README link hygiene

Replace 6× GITHUB_MVP_PREP_PLAN.md links in README.md with SUBSTRATE_WINS_PLAN.md + GROK_BUILD_MEMORY.md.


Checklist

  • 8-tool lean contract in public docs
  • Harness injection at session_start
  • agent-memory harness CI gate
  • fmt + clippy clean (ubuntu)
  • macOS matrix (queued)
  • Public surface cleanup (follow-up)

Goal: goal:mvp_gap_closure_v1 · Plan: docs/SUBSTRATE_WINS_PLAN.md

…pport + real agent workflow integration + final public polish

Release 0.5.0: categorical calculus P1-6, mixed word/number bridging, agent workflow
fixtures (processes/meta), CI hygiene, and final public-facing doc polish (README intro,
CATEGORICAL beginner walkthrough + lifecycle diagram, CONTRIBUTING quick checklist).
engram-grok called `engram wait-ready --timeout 180` before every MCP spawn
but the subcommand was never implemented (unrecognized subcommand on every
launch). Add WaitReady that performs full StoreHandle init in a background
thread with timeout, warming the 183k-block sheaf store before stdio MCP
starts so Grok Build native use_tool sees a healthy backend sooner.
…on docs

- Add grok-plugin-engram/ (validated engram-geometric plugin)
- Add install + MCP health scripts; fix mcp_lock truncate race
- Require agent-memory harness in CI; release workflow on v* tags
- Add marketplace demo, submission guide, and project config example
- ENGRAM_FORCE_BACKEND=cpu for agent-memory and release jobs (wgpu SIGABRT on CI)
- mcp_lock: explicit truncate(false) for clippy suspicious_open_options
- Harness: correct CLI arg order (--store before mcp), disable KI on isolated runs
wgpu was always linked in engram-gpu even with ENGRAM_FORCE_BACKEND=cpu,
causing exit -6 on GitHub Actions runners. CI/release now build with
--no-default-features --features cpu-only; wgpu-backend remains default
for normal desktop installs.
- poincare_vs_cosine: gate on engram_backend_wgpu (Metal/macOS stub main)
- Defer MCP background init 1.2s so handshake wins on slow CI runners
- CI: MCP smoke test, stderr dumps on harness failure, absolute STABLE_BIN
- Harness: use harness-local KI artifacts dir instead of placeholder path
Fresh CI runners lack ego.leg3; daemon triggered immediate NREM genesis
consolidation which overflowed tokio worker stack (SIGABRT). Gate with
ENGRAM_NREM_DISABLE=1 in agent profile, harness client, and CI workflow.
P4 shipped only /engram-wake; working-memory and session-end lived in
docs/skills but not as Grok commands. Add /engram-edit, /engram-recall,
/engram-trace, /engram-handoff, /engram-deep with README + skill table.
- Register meta/ in load_process_sheaf; skip workflow-only TOMLs without [process]
- Add unique monitor subvisor TOMLs (gemma, memory-consolidation, self-improvement)
- Move complete-gemma-integration to processes/workflow/; add processes/README.md
- Align docs to 66 MCP tools; fix mcp_engram_list_concepts naming
- Add per-ritual plugin skills + agent discipline (tools must be called)
- Extend sheaf loader test for unique process keys
- Mermaid decision flows: session, read, write, edit, meta, verify, linguistic
- Write path (update vs remember vs scar) and read escalation tables
- Grok Build vs Cursor harness throttle guidance
- Wire into AGENT_MEMORY_CONTRACT, MCP_TOOLS_REFERENCE, SKILLS, AGENTS, plugin skills
- /engram-update: recall → update write path (no forget+remember)
- /engram-momentum: query_with_momentum after anchors insufficient
- /engram-relate: graph edges + optional search_by_relation/visualize
- Wire into plugin README, engram-memory skill, TOOL_DECISION_MAP
Agent-first surface: one command per decision moment (not per MCP tool).
Added: scar, solution, read, ready, pure, graph, lean, goal, tile,
verify, ingest, remember + commands/README agent guide.

Rewrote engram-memory skill and plugin README as moment→command index.
Wired into TOOL_DECISION_MAP and SKILLS.md.
…ake/edit

- harness_injection.rs: suggested_actions queue from handoff/files/traces
- trace_chain walk via prev_in_trace; trusted_tiles for JIT playbooks
- condensation_hints when 6+ traces without goal-linked tile
- context_for_edit: last_session_touched, open_scars, per-file actions
- docs/HARNESS_INJECTION.md: traces → tiles → decision trees over time
- Update wake/edit slash commands and TOOL_DECISION_MAP
Phased plan for Cursor auto-wake, auto-tile draft from trace chains,
process_metrics per process:engram.*, verified_sequence v0 schema.
Includes PR stack, dependency DAG, verification gates, agent prompts.
Ship substrate wins program on feat/mvp-github-prep-2026-06:

- WS-2/4: tile_draft.rs (draft_tile_from_chain, verified_sequence_v0)
- WS-3: process_metrics.rs + mcp_engram_process_metrics tool
- WS-1: Cursor bundle (.cursor/mcp.json, rules, preflight script, ki bake)
- WS-5: sub-agent launch/relay harness + monitor + workflow TOMLs
- harness_injection: condensation hints, format_suggested_actions_markdown
- agent-memory harness: harness_injection gate + new tool registration checks
- cargo fmt + clippy fixes (collapsible_if, dead_code)
@staticroostermedia-arch staticroostermedia-arch changed the title Feat/mvp GitHub prep 2026 06 feat: substrate wins — harness injection, Grok Build default memory (0.5.0) Jun 11, 2026
Remove ~3.3k-line GITHUB_MVP_PREP_PLAN execution log, internal launch
configs, phase_c/closeout docs, scratch sem_search.rs, and stale
design/processes/ duplicates.

Archive speculative processes/meta/*, gemma-integration workflow, and
one-off scripts to design/archive/ (not loaded at session_start).

Update README, AGENTS, integrations, tests, and examples to point at
SUBSTRATE_WINS_PLAN + HARNESS_INJECTION. Drop meta/ from sheaf loader.
- glama.json: geometric memory (not vector DB), AGPL, 8-tool highlights
- Cargo.toml: correct repo URL, lean description
- README/FIRST_RUN/rest_api: 0.5.0 + 66-tool consistency
- HOW_WE: engram-grok config, trim personal framing
- Enram→Engram branding in skills; fix stale doc links
- GitHub About description updated (via API, not in commit)
- README: 564→142 lines — hero, comparison, quickstart, link-out deep dive
- GitHub topics: drop vector-database/rag; add geometric-memory,
  session-handoff, harness-injection
- Archive internal roadmaps + item1.5 diary to design/archive/docs/
- GROK_INTEGRATION + INTEGRATION_RULES → thin redirects
- Clean RITUALS/MCP_TOOLS Phase 6 + CHANGELOG stale plan refs
- Clarify Engram (project) vs EngramGrok (Grok Build integration)
@staticroostermedia-arch staticroostermedia-arch merged commit f550a36 into master Jun 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant