feat: substrate wins — harness injection, Grok Build default memory (0.5.0)#29
Merged
Merged
Conversation
…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)
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_startcall 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)
.cursor/mcp.json,.cursor/rules/engram.md,scripts/cursor-engram-preflight.sh, KI bake path forengram-wake.mdtile_draft.rs—draft_tile_from_chain, condensation hints withdraft_payloadprocess_metrics.rs+mcp_engram_process_metricsdocs/schemas/verified_sequence_v0.json, tile-draft + execute slash commandssub-agent-launch,sub-agent-relay,sub-agent.subvisor,sub_agent_relay_v1workflowRuntime / harness
harness_injection.rs—suggested_actions,trusted_tiles,condensation_hints,format_suggested_actions_markdownmcp.rs—process_context→realized_by; new MCP tools; lean wake (no mandatorywatch_workspace)tools/test-harness/python/mcp_test_client.py— harness_injection gate + tool registration checksPlugin / docs
grok-plugin-engram/commands/)docs/AGENT_MEMORY_CONTRACT.md,docs/GROK_BUILD_MEMORY.md,docs/HARNESS_INJECTION.md,docs/SUBSTRATE_WINS_PLAN.md,docs/skills/*CI
27369833956)Local verification:
cargo fmt -- --check,cargo clippy -- -D warnings,cargo test, harness--suite agent-memory.Version:
0.5.0—cargo build -p engram-server && target/debug/engram --versionQuickstart (reviewer)
Load
docs/GROK_BUILD_MEMORY.md+docs/AGENT_MEMORY_CONTRACT.mdinto agent instructions.Comparison (why not flat RAG / .md files)
verify_*, scars, CRS ≥ 0.74session_endhandoff + continuation bundlecontext_for_edit+ spatial AABBFollow-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/)docs/GITHUB_MVP_PREP_PLAN.md(~3.3k lines)docs/SESSION_END_2026-05-27.mddocs/item1.5_closeout_draft.md,item1.5_closeout_records.mddocs/phase_c_*.mddocs/post_rebuild_formal_logging_checklist.mddocs/OptiX_TUI_Update_Plan.mddocs/Engram_Build_Launch_Configuration.mdIMPLEMENTATION-PLAN.md.gitignorebut still tracked —git rm --cachedsem_search.rs(repo root)design/processes/*.tomlprocesses/🟡 Archive or gate (speculative / one-off)
processes/meta/*(7 loops: x_ai_intel, consciousness, world_state, etc.)processes/workflow/complete-gemma-integration.tomlprocesses/monitor/gemma-integration.subvisor.tomlscripts/launch-leg-browser-review.sh,scripts/item1.5_bootstrap_commands.mddocs/ego_intent_logophysics_memory_palace_framework.mddocs/praxis_as_protocol_spec.md,reasoning_functors_as_praxis_extension.mdDOCUMENTATION_GAP_WAKE_UP_CONCEPT_MAPPING.md🟢 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.mddocs/skills/*,examples/*,grok-plugin-engram/,integrations/, coreprocesses/(ritual, harness, monitor, workflow minus meta/gemma)HOW_WE_ACTUALLY_USE_THIS_IN_2026.md— keep but trim spouse/Mac-specific framing for publicdesign/agent_memory_mvp_plan.md,design/GROK_MARKETPLACE_EXCELLENCE_PLAN.md— linked from public docs; OK as design refsREADME link hygiene
Replace 6×
GITHUB_MVP_PREP_PLAN.mdlinks inREADME.mdwithSUBSTRATE_WINS_PLAN.md+GROK_BUILD_MEMORY.md.Checklist
session_startGoal:
goal:mvp_gap_closure_v1· Plan:docs/SUBSTRATE_WINS_PLAN.md