eagle-mem 4.9.10 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,11 +7,11 @@
7
7
 
8
8
  # Eagle Mem
9
9
 
10
- **Shared memory, release guardrails, and worker lanes for Claude Code and Codex.**
10
+ **Shared memory, release guardrails, and worker lanes for Claude Code, Codex, and Grok-assisted workflows.**
11
11
 
12
- Eagle Mem turns AI coding sessions into compounding project knowledge. It gives Claude Code and Codex the same local memory, labels which agent created each memory, blocks risky release commands until affected features are verified, and lets broad work split into durable worker lanes.
12
+ Eagle Mem turns AI coding sessions into compounding project knowledge. It gives Claude Code and Codex hook-backed shared memory, gives Grok the same skills and CLI memory surface, labels which agent created each memory, blocks risky release commands until affected features are verified, and lets broad work split into durable worker lanes.
13
13
 
14
- **v4.9.7 focuses on distribution trust and visible UX:** `eagle-mem doctor` now checks the installed runtime, selected SQLite/FTS5 binary, hooks, statusline wiring, install manifest, and runtime drift. Install/update show a clear "what will change" preflight, uninstall supports dry-run cleanup with backups, and statuslines now resolve the live session project so brand-new projects do not inherit old memory/session counts.
14
+ **v4.10.0 focuses on Grok support and Compaction Survival:** Grok users now get first-class skill linking and `eagle-mem grok-bootstrap`, while all agents can inspect project-level compaction readiness with `eagle-mem compaction`. Claude Code and Codex continue to get the deepest automatic lifecycle support through hooks; Grok currently uses the shared CLI and skill workflow until native lifecycle hooks are available.
15
15
 
16
16
  **Website:** [Product](https://eagleisbatman.github.io/eagle-mem/) |
17
17
  [Architecture](https://eagleisbatman.github.io/eagle-mem/architecture.html) |
@@ -41,7 +41,7 @@ Eagle Mem is a local runtime layer for AI coding agents. It adds three things th
41
41
  | **Guardrails** | "The agent cannot casually undo known decisions or push unverified feature changes." | Surfaces decisions before edits and enforces feature verification on push, PR, and publish boundaries. |
42
42
  | **Lanes** | "A big task can survive compaction and split across agents." | Persists orchestrations, worker lanes, worktrees, logs, validation commands, and handoffs. |
43
43
 
44
- Both agents share the same SQLite database at `~/.eagle-mem/memory.db`, and captured rows are source-attributed as `Claude Code` or `Codex`.
44
+ Claude Code and Codex share the same SQLite database at `~/.eagle-mem/memory.db`, and captured rows are source-attributed as `Claude Code` or `Codex`. Grok uses the same database through skills and CLI commands, with native lifecycle capture reserved for a future adapter.
45
45
 
46
46
  **Zero per-instance overhead.** No daemon, no vector DB, no MCP server. Just bash scripts, sqlite3 (WAL mode, FTS5 full-text search), and jq.
47
47
 
@@ -66,17 +66,17 @@ eagle-mem install
66
66
  eagle-mem doctor
67
67
  ```
68
68
 
69
- That's it. `doctor` should report a healthy install. Open Claude Code or Codex in any project directory and Eagle Mem activates automatically.
69
+ That's it. `doctor` should report a healthy install. Open Claude Code or Codex in any project directory and Eagle Mem activates automatically. For Grok, run `eagle-mem grok-bootstrap` after install to confirm the linked skills and CLI workflow.
70
70
 
71
- Everything is automatic from here. Eagle Mem scans your codebase, indexes source files, captures session summaries, mirrors Claude's memories and tasks, learns which commands are noisy, prunes stale data, and installs patch bug fixes — all in the background via hooks.
71
+ For Claude Code and Codex, everything is automatic from here. Eagle Mem scans your codebase, indexes source files, captures session summaries, mirrors Claude's memories and tasks, learns which commands are noisy, prunes stale data, and installs patch bug fixes — all in the background via hooks.
72
72
 
73
- For Codex, the installer enables `codex_hooks` in `~/.codex/config.toml`, registers hooks in `~/.codex/hooks.json`, symlinks Eagle Mem skills into `~/.codex/skills`, and patches `~/.codex/AGENTS.md` with the Eagle Mem summary contract. For Claude Code, it keeps using `~/.claude/settings.json`, `CLAUDE.md`, `~/.claude/skills`, and the existing Claude memory/task locations.
73
+ For Codex, the installer enables `codex_hooks` in `~/.codex/config.toml`, registers hooks in `~/.codex/hooks.json`, symlinks Eagle Mem skills into `~/.codex/skills`, and patches `~/.codex/AGENTS.md`. For Claude Code, it integrates with `~/.claude/settings.json`, `CLAUDE.md`, and `~/.claude/skills`. Grok users get skill symlinks into `~/.grok/skills/` and can run `eagle-mem grok-bootstrap` for setup guidance and self-linking.
74
74
 
75
75
  ### Prerequisites
76
76
 
77
77
  - `sqlite3` with FTS5 support (ships with macOS; Eagle Mem prefers known system/Homebrew SQLite binaries before PATH shims)
78
78
  - `jq` (the installer offers to install if missing)
79
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code), Codex, or both installed
79
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code), Codex, or a Grok environment (`~/.grok/`)
80
80
 
81
81
  ## How It Works
82
82
 
@@ -108,6 +108,12 @@ These run automatically via SessionStart — no commands needed:
108
108
 
109
109
  Eagle Mem actively reduces token consumption:
110
110
 
111
+ ### Compaction Survival
112
+
113
+ One of the core promises of Eagle Mem is protecting against `/compact` and session amnesia. Compaction Survival is project-level, not Grok-specific: it reads shared Eagle Mem state such as durable tasks, enriched summaries, stale work, and orchestration lanes. Claude Code and Codex get automatic hook-backed recovery through SessionStart, Stop, task mirroring, and context-pressure nudges. Grok can inspect and use the same state through `eagle-mem compaction`, `eagle-mem tasks`, and the linked skills, but does not yet have native lifecycle hooks.
114
+
115
+ Run `eagle-mem compaction` anytime to check readiness.
116
+
111
117
  - **Injection compression** — zero-value stats are elided from the banner, overview is capped, compact reloads get 1 recent session instead of 3
112
118
  - **Command rewriting** — PreToolUse routes noisy shell output through RTK when available and blocks known raw-output commands in enforce mode when RTK is missing.
113
119
  - **Read-after-modify detection** — detects when you read a file that was just edited or written, nudges that the diff is already in context
@@ -150,6 +156,9 @@ Eagle Mem prevents Claude from repeating past mistakes:
150
156
  | `eagle-mem orchestrate` | Coordinate durable worker lanes across agents |
151
157
  | `eagle-mem curate` | Run curator (co-edits, hot files, guardrails) |
152
158
  | `eagle-mem feature` | Track and verify features |
159
+ | `eagle-mem compaction` | Check Compaction Survival status and readiness |
160
+ | `eagle-mem grok-bootstrap` | Set up and verify Grok integration |
161
+ | `eagle-mem test` | Run basic smoke tests for the memory layer |
153
162
  | `eagle-mem prune` | Clean old sessions and stale data |
154
163
  | `eagle-mem scan` | Scan codebase and generate overview |
155
164
  | `eagle-mem index` | Index source files for FTS5 code search |
@@ -168,6 +177,16 @@ Install and update print the files/configs they intend to touch before they chan
168
177
 
169
178
  Uninstall removes Claude Code and Codex hook registrations, Eagle Mem instruction blocks, custom Claude statusline integration, and skill links. It backs up user config files before editing them and keeps `~/.eagle-mem/memory.db` unless you explicitly confirm data deletion.
170
179
 
180
+ ### v4.10.0 Minor Release
181
+
182
+ This release makes Eagle Mem broader and safer across agent workflows:
183
+
184
+ - Grok is now a first-class skill/CLI target: install detects `~/.grok`, links Eagle Mem skills into `~/.grok/skills`, and adds `eagle-mem grok-bootstrap`.
185
+ - `eagle-mem compaction` reports Compaction Survival readiness from shared project state: enriched summaries, durable tasks, stale tasks, active lanes, and last durable update.
186
+ - `eagle-mem test` provides a built-in smoke harness for the memory layer.
187
+ - `eagle-mem tasks stale` and `[STALE - Nd]` warnings make long-running task drift visible.
188
+ - `eagle-mem health` now surfaces orchestration lanes, learned command rules, and curator timing.
189
+
171
190
  ### v4.9.7 Patch
172
191
 
173
192
  This patch is a release-readiness and UX-hardening pass:
@@ -295,17 +314,17 @@ Both agents write to `~/.eagle-mem/memory.db`:
295
314
  - mirrored memories, plans, and tasks include `origin_agent`
296
315
  - SessionStart recall labels sources as `Claude Code` or `Codex`
297
316
 
298
- That means opening the same project in Claude Code and Codex does not create two isolated memory worlds. They recall the same project history while preserving the source of each memory.
317
+ That means opening the same project in Claude Code and Codex does not create two isolated memory worlds. They recall the same project history while preserving the source of each memory. Grok can search, inspect, and update that same project memory through the linked skills and CLI commands.
299
318
 
300
- ## Skills (Inside Claude Code and Codex)
319
+ ## Skills (Inside Claude Code, Codex, and Grok)
301
320
 
302
321
  | Skill | What It Does |
303
322
  |-------|-------------|
304
- | `/eagle-mem-search` | Search memory and past sessions — Claude interprets results in context |
323
+ | `/eagle-mem-search` | Search memory and past sessions — the active agent interprets results in context |
305
324
  | `/eagle-mem-overview` | Build a rich project briefing from README, entry points, and git history |
306
325
  | `/eagle-mem-memories` | View and search mirrored agent memories and plans |
307
326
  | `/eagle-mem-tasks` | TaskAware Compact Loop — break complex work into tasks that survive `/compact` |
308
- | `/eagle-mem-orchestrate` | Orchestrator/worker lane handoffs across Claude Code and Codex |
327
+ | `/eagle-mem-orchestrate` | Orchestrator/worker lane handoffs across Claude Code and Codex, with shared CLI visibility for Grok |
309
328
 
310
329
  ## Data
311
330
 
@@ -362,6 +381,17 @@ eagle-mem config set token_guard.rtk off # disable RTK behavior
362
381
  eagle-mem config set token_guard.raw_bash block
363
382
  ```
364
383
 
384
+ ## Long-term Direction
385
+
386
+ The current implementation is pure Bash + SQLite (with FTS5) for maximum portability, zero runtime dependencies, and easy auditing. This has proven effective for the core goals of recall, guardrails, and cross-agent coordination.
387
+
388
+ Future evolution paths under consideration (Phase 3 work):
389
+ - Incremental native helpers in Rust for hot paths (large FTS searches, heavy curation workloads, very large observation tables)
390
+ - Optional full Rust runtime for the core if Bash becomes a bottleneck on extremely long-lived projects
391
+ - Deeper native hooks and recall injection for additional agent environments
392
+
393
+ The guiding principles remain the same: local-only, no daemon, no vector database, strong anti-regression guarantees, and excellent visibility for the human using the agents.
394
+
365
395
  ## License
366
396
 
367
397
  MIT
package/architecture.html CHANGED
@@ -683,7 +683,7 @@
683
683
  <div class="brand">
684
684
  <span class="brand-label">Eagle Mem</span>
685
685
  <h1>Agent Architecture Tutorial</h1>
686
- <p>Technical architecture plus UX architecture for Claude Code, Codex, and future coding agents.</p>
686
+ <p>Technical architecture plus UX architecture for Claude Code, Codex, Grok, and future coding agents.</p>
687
687
  </div>
688
688
 
689
689
  <p class="nav-title">Start Here</p>
@@ -719,7 +719,7 @@
719
719
  <main id="main">
720
720
  <section class="hero" id="purpose">
721
721
  <div class="hero-inner">
722
- <p class="eyebrow">Architecture guide - technical + UX - updated 2026-05-05</p>
722
+ <p class="eyebrow">Architecture guide - technical + UX - updated 2026-05-22</p>
723
723
  <h2>Eagle Mem is a local memory and safety layer that makes AI coding agents start warmer, ship safer, and coordinate better.</h2>
724
724
  <p class="hero-summary">
725
725
  This tutorial explains the project from first principles. You do not need to know the codebase first. Read it like a guided tour: what problem Eagle Mem solves, how hooks move data through the system, how SQLite stores shared memory, and why the user experience is intentionally quiet until the agent needs help.
@@ -732,7 +732,7 @@
732
732
  </div>
733
733
  <div class="meta-box">
734
734
  <strong>Agents</strong>
735
- <span>Claude Code and Codex today; adapter contract for more agents later.</span>
735
+ <span>Claude Code and Codex with hooks; Grok through skills and CLI today.</span>
736
736
  </div>
737
737
  <div class="meta-box">
738
738
  <strong>Core Promise</strong>
@@ -791,6 +791,11 @@
791
791
  <p>Eagle Mem is not a hosted memory service. It is not a vector database. It is a local runtime made of hook scripts, CLI commands, and a SQLite database. Agents keep working in their normal terminal UI, while Eagle Mem quietly injects context, records what happened, and blocks risky release boundaries when verification is still pending.</p>
792
792
  </div>
793
793
 
794
+ <div class="callout">
795
+ <h3>Compaction Survival is shared state</h3>
796
+ <p><code>eagle-mem compaction</code> is not a Grok-only feature. It reads project-level state from SQLite: enriched summaries, durable tasks, stale tasks, active orchestration lanes, and recent durable updates. Claude Code and Codex have hook-backed automatic recovery around compact and clear events. Grok can use the same state through linked skills and CLI commands until native lifecycle hooks exist.</p>
797
+ </div>
798
+
794
799
  <h3>Vocabulary</h3>
795
800
  <table>
796
801
  <thead>
@@ -857,7 +862,7 @@
857
862
  <text x="40" y="42" class="label">User Layer</text>
858
863
  <rect x="40" y="58" width="220" height="72" class="box-cyan"></rect>
859
864
  <text x="62" y="90">Developer</text>
860
- <text x="62" y="112" class="small">Works in Claude Code or Codex</text>
865
+ <text x="62" y="112" class="small">Works in Claude Code, Codex, or Grok</text>
861
866
 
862
867
  <text x="40" y="178" class="label">Agent Layer</text>
863
868
  <rect x="40" y="194" width="220" height="78" class="box"></rect>
@@ -935,7 +940,7 @@
935
940
  <div class="step-num">2</div>
936
941
  <div>
937
942
  <h3>Prerequisites are checked</h3>
938
- <p>The installer checks for an FTS5-capable <code>sqlite3</code>, <code>jq</code>, optional <code>rtk</code>, and at least one supported agent installation. FTS5 matters because summaries, code chunks, and mirrored artifacts are searched with SQLite full-text search.</p>
943
+ <p>The installer checks for an FTS5-capable <code>sqlite3</code>, <code>jq</code>, optional <code>rtk</code>, and at least one supported agent environment. FTS5 matters because summaries, code chunks, and mirrored artifacts are searched with SQLite full-text search.</p>
939
944
  </div>
940
945
  </article>
941
946
 
@@ -959,7 +964,7 @@
959
964
  <div class="step-num">5</div>
960
965
  <div>
961
966
  <h3>Agent hooks are registered</h3>
962
- <p>Claude Code hooks are patched into <code>~/.claude/settings.json</code>. Codex hooks are registered in <code>~/.codex/hooks.json</code>, and <code>codex_hooks = true</code> is enabled in <code>~/.codex/config.toml</code>.</p>
967
+ <p>Claude Code hooks are patched into <code>~/.claude/settings.json</code>. Codex hooks are registered in <code>~/.codex/hooks.json</code>, and <code>codex_hooks = true</code> is enabled in <code>~/.codex/config.toml</code>. Grok currently has skills and CLI access rather than hook registration.</p>
963
968
  </div>
964
969
  </article>
965
970
 
@@ -967,7 +972,7 @@
967
972
  <div class="step-num">6</div>
968
973
  <div>
969
974
  <h3>Skills and instructions are linked</h3>
970
- <p>Eagle Mem skills are symlinked into each agent's skill directory. Claude receives <code>CLAUDE.md</code> summary instructions. Codex receives <code>AGENTS.md</code> clean-output memory instructions.</p>
975
+ <p>Eagle Mem skills are symlinked into each agent's skill directory. Claude receives <code>CLAUDE.md</code> summary instructions. Codex receives <code>AGENTS.md</code> clean-output memory instructions. Grok receives the same Eagle Mem skills under <code>~/.grok/skills</code> and can run <code>eagle-mem grok-bootstrap</code> for setup guidance.</p>
971
976
  </div>
972
977
  </article>
973
978
  </div>
@@ -1010,7 +1015,7 @@
1010
1015
  <tr>
1011
1016
  <td><code>~/.eagle-mem/memory.db</code></td>
1012
1017
  <td>Single source of local memory</td>
1013
- <td>Stores shared state across Claude Code, Codex, compactions, and sessions.</td>
1018
+ <td>Stores shared state across Claude Code, Codex, Grok skills, compactions, and sessions.</td>
1014
1019
  </tr>
1015
1020
  </tbody>
1016
1021
  </table>
@@ -1082,7 +1087,7 @@
1082
1087
  <p class="section-number">06 / Technical Architecture</p>
1083
1088
  <h2>The Agent Adapter Layer</h2>
1084
1089
  <p class="lead">
1085
- The project is agent-generic below the adapter layer. Claude Code and Codex have different config files, tool names, transcript formats, and output expectations. Eagle Mem normalizes those differences into one internal shape.
1090
+ The project is agent-generic below the adapter layer. Claude Code and Codex have different config files, tool names, transcript formats, and output expectations, while Grok currently participates through skills and CLI commands. Eagle Mem normalizes each supported surface into the same project memory model.
1086
1091
  </p>
1087
1092
 
1088
1093
  <div class="grid-2">
@@ -1109,6 +1114,17 @@
1109
1114
  <span class="tag">Write</span>
1110
1115
  </div>
1111
1116
  </article>
1117
+
1118
+ <article class="adapter-rule">
1119
+ <h3>Grok skill/CLI integration</h3>
1120
+ <p>Installed through <code>~/.grok/skills</code> and the <code>eagle-mem grok-bootstrap</code> command. Grok can search memory, inspect tasks, coordinate lanes, and check compaction readiness through the same SQLite-backed CLI. Native lifecycle hooks are not assumed yet.</p>
1121
+ <div class="tag-row">
1122
+ <span class="tag">skills</span>
1123
+ <span class="tag">grok-bootstrap</span>
1124
+ <span class="tag">compaction</span>
1125
+ <span class="tag">tasks</span>
1126
+ </div>
1127
+ </article>
1112
1128
  </div>
1113
1129
 
1114
1130
  <h3>Normalization rules</h3>
@@ -1645,7 +1661,7 @@ eagle-mem install</code></pre>
1645
1661
  <p class="section-number">14 / All-Agent Applicability</p>
1646
1662
  <h2>How To Add Another Agent</h2>
1647
1663
  <p class="lead">
1648
- The project already supports Claude Code and Codex, but the architecture should scale to any coding agent that can run local hooks or wrapper scripts. The integration work should live at the edge, not inside the database model.
1664
+ The project supports Claude Code and Codex with lifecycle hooks, and Grok with skills plus CLI workflows. The architecture should scale to any coding agent that can run local hooks, wrapper scripts, or a skill-like command surface. The integration work should live at the edge, not inside the database model.
1649
1665
  </p>
1650
1666
 
1651
1667
  <h3>Minimum viable adapter</h3>
package/bin/eagle-mem CHANGED
@@ -34,6 +34,9 @@ case "$command" in
34
34
  orchestrate) bash "$SCRIPTS_DIR/orchestrate.sh" "$@" ;;
35
35
  curate) bash "$SCRIPTS_DIR/curate.sh" "$@" ;;
36
36
  feature) bash "$SCRIPTS_DIR/feature.sh" "$@" ;;
37
+ grok-bootstrap) bash "$SCRIPTS_DIR/grok-bootstrap.sh" "$@" ;;
38
+ test) bash "$SCRIPTS_DIR/test.sh" "$@" ;;
39
+ compaction) bash "$SCRIPTS_DIR/compaction.sh" "$@" ;;
37
40
  prune) bash "$SCRIPTS_DIR/prune.sh" "$@" ;;
38
41
  scan) bash "$SCRIPTS_DIR/scan.sh" "$@" ;;
39
42
  index) bash "$SCRIPTS_DIR/index.sh" "$@" ;;
package/lib/common.sh CHANGED
@@ -18,6 +18,8 @@ EAGLE_CODEX_HOOKS="${EAGLE_CODEX_HOOKS:-$EAGLE_CODEX_DIR/hooks.json}"
18
18
  EAGLE_CODEX_AGENTS_MD="${EAGLE_CODEX_AGENTS_MD:-$EAGLE_CODEX_DIR/AGENTS.md}"
19
19
  EAGLE_CODEX_SKILLS_DIR="${EAGLE_CODEX_SKILLS_DIR:-$EAGLE_CODEX_DIR/skills}"
20
20
  EAGLE_CODEX_MEMORIES_DIR="${EAGLE_CODEX_MEMORIES_DIR:-$EAGLE_CODEX_DIR/memories}"
21
+ EAGLE_GROK_DIR="${EAGLE_GROK_DIR:-$HOME/.grok}"
22
+ EAGLE_GROK_SKILLS_DIR="${EAGLE_GROK_SKILLS_DIR:-$HOME/.grok/skills}"
21
23
  EAGLE_RAW_BASH_UNLOCK="${EAGLE_RAW_BASH_UNLOCK:-/tmp/eagle-mem-raw-bash-unlock}"
22
24
 
23
25
  _eagle_sqlite_candidate_paths() {
@@ -1680,35 +1682,28 @@ _eagle_claude_md_section() {
1680
1682
 
1681
1683
  Eagle Mem hooks are active in every project. SessionStart injects context (overview, recent sessions, memories, tasks, orchestration lanes, core files). Stop captures session summaries. PostToolUse mirrors memories/plans/tasks.
1682
1684
 
1683
- **Rule:** Before your final response in every session, emit an `<eagle-summary>` block so the Stop hook can capture a rich summary instead of just heuristics.
1684
-
1685
- ```
1686
- <eagle-summary>
1687
- request: [what user asked]
1688
- completed: [what shipped]
1689
- learned: [non-obvious discoveries]
1690
- decisions: [choice why]
1691
- gotchas: [what surprised]
1692
- next_steps: [concrete actions]
1693
- key_files: [path role]
1694
- files_read: [path, ...]
1695
- files_modified: [path, ...]
1696
- affected_features: [feature, ...]
1697
- verified_features: [feature, ...]
1698
- regression_risks: [risk, ...]
1699
- </eagle-summary>
1700
- ```
1701
-
1702
- **Why:** Without this block, summaries degrade to "(auto-captured)" with no decisions, gotchas, or learned context. Rich summaries are what make future sessions useful.
1685
+ **Rule Human first, machine invisible:**
1686
+ The person reading this transcript should experience natural, thoughtful, human writing — the same tone you would use in a good project update or thoughtful recap with a colleague. They should **never** see raw XML tags, `<eagle-summary>`, `request:`, `learned:`, or anything that feels like a machine log or configuration file in the normal flow of reading.
1687
+
1688
+ **Good visible ending (what a human should read):**
1689
+
1690
+ > We spent this session doing a deep review of how well Eagle Mem actually delivers on its promise of giving agents persistent memory and strong anti-regression guardrails. We cleaned up some stale task records that had been left open, verified a key cross-agent feature, and put together a full roadmap for making the system feel first-class for Grok sessions too. The most useful feedback was that the capture mechanism at the end of conversations needed to feel warm and human rather than technical.
1691
+
1692
+ The rich structured data still gets saved (so future sessions get excellent context and the anti-regression system keeps working), but it happens without making the transcript feel like you are reading a debug dump.
1693
+
1694
+ **Recommended capture approaches (in order of preference):**
1695
+ - Best: Use `eagle-mem session save --summary "..."` or the equivalent capture skill/tool. The CLI writes the structured record cleanly; you only show the nice prose to the user.
1696
+ - Strong alternative: Put any machine block inside a collapsed `<details>` element so it is available for debugging but invisible by default.
1697
+ - Only as last resort: Emit the raw block at all — and only when the user has explicitly asked for technical output.
1698
+
1699
+ **Why this rule exists:** Every single session ends with a summary. If it looks technical, the entire conversation history slowly becomes unpleasant to read. The memory layer should make the experience of working with agents *more* human, not less.
1703
1700
 
1704
1701
  **How to apply:**
1705
- - Emit `<eagle-summary>` before your final text response, every session
1706
- - When Eagle Mem injects context at SessionStart, attribute it: "Eagle Mem recalls:"
1707
- - Do not revert decisions surfaced by PostToolUse without asking the user
1708
- - If Eagle Mem reports pending feature verification, verify or waive it before push/PR/publish
1709
- - For broad multi-agent work, YOU run `eagle-mem orchestrate`; do not ask the user to run these commands
1710
- - Never put raw secrets in the summary — Eagle Mem redacts but defense in depth
1711
- - If you contradict a loaded memory, update the memory file
1702
+ - Write the visible recap in clear, narrative prose first.
1703
+ - Persist the structured details via tool or collapsed element never as raw tags in the main reply.
1704
+ - Keep durable task descriptions truthful and up to date; they often carry more value across compactions than any one summary.
1705
+ - When Eagle Mem context appears, attribute it naturally.
1706
+ - Protect secrets. Update the durable record if you change direction.
1712
1707
  EAGLE_MD
1713
1708
  }
1714
1709
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eagle-mem",
3
- "version": "4.9.10",
4
- "description": "Shared memory, release guardrails, RTK token protection, and worker lanes for Claude Code and Codex",
3
+ "version": "4.10.0",
4
+ "description": "Shared memory, release guardrails, RTK token protection, and worker lanes for Claude Code, Codex, and Grok",
5
5
  "bin": {
6
6
  "eagle-mem": "bin/eagle-mem"
7
7
  },
@@ -18,6 +18,7 @@
18
18
  "keywords": [
19
19
  "claude-code",
20
20
  "codex",
21
+ "grok",
21
22
  "memory",
22
23
  "sqlite",
23
24
  "fts5",
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env bash
2
+ # ═══════════════════════════════════════════════════════════
3
+ # Eagle Mem — Compaction Survival Status
4
+ # Shows how well the project is protected against context loss
5
+ # ═══════════════════════════════════════════════════════════
6
+ set -euo pipefail
7
+
8
+ SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ LIB_DIR="$SCRIPTS_DIR/../lib"
10
+
11
+ . "$SCRIPTS_DIR/style.sh"
12
+ . "$LIB_DIR/common.sh"
13
+ . "$LIB_DIR/db.sh"
14
+
15
+ eagle_ensure_db
16
+
17
+ eagle_banner
18
+ eagle_header "Compaction Survival"
19
+
20
+ project=$(eagle_project_from_cwd "$(pwd)")
21
+ project_sql=$(eagle_sql_escape "$project")
22
+
23
+ # --- Metrics ---
24
+ enriched=$(eagle_db "SELECT COUNT(*) FROM summaries WHERE project='$project_sql' AND (learned != '' OR decisions != '' OR gotchas != '')" 2>/dev/null || echo 0)
25
+ total_summaries=$(eagle_db "SELECT COUNT(*) FROM summaries WHERE project='$project_sql'" 2>/dev/null || echo 0)
26
+ active_tasks=$(eagle_db "SELECT COUNT(*) FROM agent_tasks WHERE project='$project_sql' AND status IN ('pending','in_progress')" 2>/dev/null || echo 0)
27
+ stale_tasks=$(eagle_db "SELECT COUNT(*) FROM agent_tasks WHERE project='$project_sql' AND status='in_progress' AND updated_at < datetime('now','-7 days')" 2>/dev/null || echo 0)
28
+ last_capture=$(eagle_db "SELECT MAX(updated_at) FROM agent_tasks WHERE project='$project_sql'" 2>/dev/null || echo "never")
29
+
30
+ echo ""
31
+ echo -e " Project: ${BOLD}$project${RESET}"
32
+ echo ""
33
+
34
+ echo -e " ${BOLD}Context Survival Metrics${RESET}"
35
+ echo -e " ─────────────────────────────────────"
36
+ echo -e " Enriched summaries: ${GREEN}$enriched${RESET} / $total_summaries"
37
+ echo -e " Active durable tasks: ${CYAN}$active_tasks${RESET}"
38
+ echo -e " Stale in_progress tasks:${RED}$stale_tasks${RESET}"
39
+ echo -e " Last durable update: $last_capture"
40
+
41
+ echo ""
42
+ if [ "$stale_tasks" -gt 0 ]; then
43
+ eagle_warn "Stale tasks detected — run 'eagle-mem tasks stale' and clean them up"
44
+ else
45
+ eagle_ok "No long-stale tasks"
46
+ fi
47
+
48
+ # Orchestration lanes (for cross-agent long-running work survival)
49
+ active_lanes=$(eagle_db "SELECT COUNT(*) FROM orchestration_lanes WHERE project='$project_sql' AND status NOT IN ('completed', 'cancelled')" 2>/dev/null || echo 0)
50
+ echo -e " Active orchestration lanes: ${CYAN}$active_lanes${RESET}"
51
+ if [ "$active_lanes" -gt 0 ]; then
52
+ eagle_info "Long-running work is tracked in durable lanes — use 'eagle-mem orchestrate' to manage"
53
+ fi
54
+
55
+ if [ "$enriched" -ge 3 ] && [ "$active_tasks" -gt 0 ]; then
56
+ eagle_ok "Compaction Survival: Strong — future sessions will have good context"
57
+ elif [ "$enriched" -ge 1 ]; then
58
+ eagle_info "Compaction Survival: Moderate — add more durable tasks and summaries"
59
+ else
60
+ eagle_warn "Compaction Survival: Weak — start using durable tasks and <eagle-summary> blocks"
61
+ fi
62
+
63
+ echo ""
64
+ eagle_dim "Run this anytime to check how safe the project is from /compact amnesia."
65
+ echo ""
package/scripts/doctor.sh CHANGED
@@ -219,9 +219,10 @@ else
219
219
  fi
220
220
  echo ""
221
221
 
222
- echo -e " ${BOLD}Hooks${RESET}"
222
+ echo -e " ${BOLD}Hooks / Skills${RESET}"
223
223
  eagle_kv "Claude Code:" "$claude_hooks"
224
224
  eagle_kv "Codex:" "$codex_hooks"
225
+ [ -d "$EAGLE_GROK_DIR" ] && eagle_kv "Grok skills:" "$EAGLE_GROK_SKILLS_DIR"
225
226
  eagle_kv "Statusline:" "$statusline_state"
226
227
  echo ""
227
228
 
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env bash
2
+ # ═══════════════════════════════════════════════════════════
3
+ # Eagle Mem — Grok Bootstrap
4
+ # Helps set up and verify Grok integration
5
+ # ═══════════════════════════════════════════════════════════
6
+ set -euo pipefail
7
+
8
+ SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ LIB_DIR="$SCRIPTS_DIR/../lib"
10
+ PACKAGE_DIR="$(cd "$SCRIPTS_DIR/.." && pwd)"
11
+
12
+ . "$SCRIPTS_DIR/style.sh"
13
+ . "$LIB_DIR/common.sh"
14
+
15
+ eagle_banner
16
+ eagle_header "Grok Bootstrap"
17
+
18
+ if [ ! -d "$EAGLE_GROK_DIR" ]; then
19
+ eagle_fail "~/.grok/ directory not found"
20
+ echo ""
21
+ eagle_info "Create it and re-run this command, or run 'eagle-mem install' first."
22
+ exit 1
23
+ fi
24
+
25
+ eagle_ok "Grok environment detected ($EAGLE_GROK_DIR)"
26
+
27
+ # Check skills
28
+ skill_count=0
29
+ if [ -d "$EAGLE_GROK_SKILLS_DIR" ]; then
30
+ skill_count=$(find "$EAGLE_GROK_SKILLS_DIR" -maxdepth 1 -name "eagle-mem-*" -type d 2>/dev/null | wc -l | tr -d ' ')
31
+ fi
32
+
33
+ if [ "$skill_count" -gt 0 ]; then
34
+ eagle_ok "Grok skills installed ($skill_count eagle-mem-* skills)"
35
+ else
36
+ eagle_warn "No eagle-mem skills found in $EAGLE_GROK_SKILLS_DIR"
37
+ if [ -d "$PACKAGE_DIR/skills" ]; then
38
+ echo ""
39
+ if eagle_confirm "Link Eagle Mem skills into ~/.grok/skills/ now?"; then
40
+ mkdir -p "$EAGLE_GROK_SKILLS_DIR"
41
+ for skill_dir in "$PACKAGE_DIR"/skills/*/; do
42
+ [ ! -d "$skill_dir" ] && continue
43
+ skill_name=$(basename "$skill_dir")
44
+ dst="$EAGLE_GROK_SKILLS_DIR/$skill_name"
45
+ [ -L "$dst" ] && rm "$dst"
46
+ ln -sf "$skill_dir" "$dst"
47
+ eagle_ok "Linked: $skill_name"
48
+ done
49
+ fi
50
+ else
51
+ eagle_info "Run 'eagle-mem install' or 'eagle-mem update' to link them."
52
+ fi
53
+ fi
54
+
55
+ echo ""
56
+ eagle_info "How to use Eagle Mem inside Grok:"
57
+ echo ""
58
+ eagle_dim " • The six skills are available in the skill picker:"
59
+ eagle_dim " eagle-mem-search, eagle-mem-overview, eagle-mem-tasks,"
60
+ eagle_dim " eagle-mem-memories, eagle-mem-orchestrate, eagle-mem-feature"
61
+ echo ""
62
+ eagle_dim " • From the command line (in this project):"
63
+ eagle_dim " eagle-mem search \"auth bug\""
64
+ eagle_dim " eagle-mem overview"
65
+ eagle_dim " eagle-mem tasks"
66
+ echo ""
67
+ eagle_info "For long-running or multi-step work, use durable tasks:"
68
+ eagle_dim " eagle-mem tasks add \"...\" --agent grok"
69
+ echo ""
70
+ eagle_ok "Grok bootstrap complete. You now have the same skills as Claude Code and Codex users."
71
+
72
+ echo ""
package/scripts/health.sh CHANGED
@@ -5,11 +5,11 @@
5
5
  # ═══════════════════════════════════════════════════════════
6
6
  set -euo pipefail
7
7
 
8
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
9
- LIB_DIR="$SCRIPT_DIR/../lib"
8
+ SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ LIB_DIR="$SCRIPTS_DIR/../lib"
10
10
 
11
+ . "$SCRIPTS_DIR/style.sh"
11
12
  . "$LIB_DIR/common.sh"
12
- . "$SCRIPT_DIR/style.sh"
13
13
  . "$LIB_DIR/db.sh"
14
14
  . "$LIB_DIR/provider.sh"
15
15
  . "$LIB_DIR/updater.sh"
@@ -167,6 +167,19 @@ fi
167
167
  orch_route=$(eagle_config_get "orchestration" "route" "opposite")
168
168
  orch_auto_worktree=$(eagle_config_get "orchestration" "auto_worktree" "true")
169
169
  orch_worktree_root=$(eagle_config_get "orchestration" "worktree_root" "")
170
+
171
+ active_lanes=$(eagle_db "SELECT COUNT(*) FROM orchestration_lanes WHERE project='$p_esc' AND status NOT IN ('completed','cancelled')" 2>/dev/null || echo 0)
172
+ if [ "$active_lanes" -gt 0 ]; then
173
+ eagle_info "Active orchestration lanes: $active_lanes (use 'eagle-mem orchestrate' or 'eagle-mem compaction' for details)"
174
+ else
175
+ eagle_dim " No active orchestration lanes"
176
+ fi
177
+
178
+ # ─── Curator / RTK enhancements visibility ──────────────────
179
+
180
+ learned_rules=$(eagle_db "SELECT COUNT(*) FROM command_rules" 2>/dev/null || echo 0)
181
+ last_curated=$(eagle_db "SELECT value FROM eagle_meta WHERE key = 'last_curated'" 2>/dev/null || echo "never")
182
+ eagle_dim " Curator: $learned_rules command rules learned, last run: $last_curated"
170
183
  orch_codex_model=$(eagle_config_get "orchestration" "codex_worker_model" "gpt-5.5")
171
184
  orch_codex_effort=$(eagle_config_get "orchestration" "codex_worker_effort" "xhigh")
172
185
  orch_claude_model=$(eagle_config_get "orchestration" "claude_worker_model" "claude-opus-4-7")
package/scripts/help.sh CHANGED
@@ -14,7 +14,7 @@ eagle_banner
14
14
 
15
15
  echo -e " ${BOLD}Eagle Mem${RESET} ${DIM}v${version}${RESET}"
16
16
  echo -e " ${DIM}Shared memory, release guardrails, RTK token protection, and worker lanes${RESET}"
17
- echo -e " ${DIM}for Claude Code and Codex.${RESET}"
17
+ echo -e " ${DIM}for Claude Code, Codex, and Grok.${RESET}"
18
18
  echo ""
19
19
  echo -e " ${BOLD}Core commands:${RESET}"
20
20
  echo -e " ${CYAN}install${RESET} First-time setup: hooks, database, skills"
@@ -30,8 +30,11 @@ echo -e " ${CYAN}memories${RESET} View/sync agent memories"
30
30
  echo -e " ${CYAN}tasks${RESET} View mirrored tasks"
31
31
  echo ""
32
32
  echo -e " ${BOLD}Safety and token controls:${RESET}"
33
- echo -e " ${CYAN}feature${RESET} Track, verify, and unblock feature changes"
34
- echo -e " ${CYAN}guard${RESET} Manage regression guardrails for files"
33
+ echo -e " ${CYAN}feature${RESET} Track, verify, and unblock feature changes"
34
+ echo -e " ${CYAN}grok-bootstrap${RESET} Set up and verify Grok integration"
35
+ echo -e " ${CYAN}test${RESET} Run basic smoke tests for the memory layer"
36
+ echo -e " ${CYAN}compaction${RESET} Show Compaction Survival status and readiness"
37
+ echo -e " ${CYAN}guard${RESET} Manage regression guardrails for files"
35
38
  echo -e " ${CYAN}config${RESET} View/change providers, RTK, and token guard settings"
36
39
  echo -e " ${CYAN}statusline${RESET} Print compact Eagle Mem statusline"
37
40
  echo ""
@@ -71,7 +74,7 @@ echo -e " ${DIM}\$${RESET} eagle-mem orchestrate spawn api ${DIM}# work
71
74
  echo -e " ${DIM}\$${RESET} eagle-mem orchestrate sync ${DIM}# reconcile worker status${RESET}"
72
75
  echo -e " ${DIM}\$${RESET} eagle-mem orchestrate handoff --write docs/handoff-context.md"
73
76
  echo ""
74
- echo -e " ${BOLD}Skills${RESET} ${DIM}(inside Claude Code and Codex sessions):${RESET}"
77
+ echo -e " ${BOLD}Skills${RESET} ${DIM}(inside Claude Code, Codex, and Grok sessions):${RESET}"
75
78
  echo -e " ${CYAN}eagle-mem-search${RESET} Search memory and past sessions"
76
79
  echo -e " ${CYAN}eagle-mem-overview${RESET} Build or update project overview"
77
80
  echo -e " ${CYAN}eagle-mem-memories${RESET} View/sync agent memories"
@@ -146,6 +146,7 @@ ensure_rtk
146
146
  # Claude Code / Codex
147
147
  claude_found=false
148
148
  codex_found=false
149
+ grok_found=false
149
150
 
150
151
  if [ -d "$HOME/.claude" ]; then
151
152
  eagle_ok "Claude Code ${DIM}(~/.claude/)${RESET}"
@@ -164,12 +165,17 @@ else
164
165
  eagle_warn "Codex not found ${DIM}(~/.codex/ missing and codex not on PATH)${RESET}"
165
166
  fi
166
167
 
167
- if [ "$claude_found" = false ] && [ "$codex_found" = false ]; then
168
+ if [ -d "$EAGLE_GROK_DIR" ]; then
169
+ grok_found=true
170
+ eagle_ok "Grok ${DIM}($EAGLE_GROK_DIR/)${RESET}"
171
+ else
172
+ eagle_warn "Grok not found ${DIM}(~/.grok/ does not exist)${RESET}"
173
+ fi
174
+
175
+ if [ "$claude_found" = false ] && [ "$codex_found" = false ] && [ "$grok_found" = false ]; then
168
176
  eagle_fail "No supported agent install found"
169
177
  echo ""
170
- eagle_dim "Install Claude Code or Codex first, then re-run:"
171
- eagle_dim " npm install -g @anthropic-ai/claude-code"
172
- eagle_dim " npm install -g @openai/codex"
178
+ eagle_dim "Install Claude Code, Codex, or ensure ~/.grok/ exists, then re-run."
173
179
  echo ""
174
180
  exit 1
175
181
  fi
@@ -289,6 +295,18 @@ if [ "$codex_found" = true ] && [ -d "$PACKAGE_DIR/skills" ]; then
289
295
  done
290
296
  fi
291
297
 
298
+ if [ "$grok_found" = true ] && [ -d "$PACKAGE_DIR/skills" ]; then
299
+ mkdir -p "$EAGLE_GROK_SKILLS_DIR"
300
+ for skill_dir in "$PACKAGE_DIR"/skills/*/; do
301
+ [ ! -d "$skill_dir" ] && continue
302
+ skill_name=$(basename "$skill_dir")
303
+ dst="$EAGLE_GROK_SKILLS_DIR/$skill_name"
304
+ [ -L "$dst" ] && rm "$dst"
305
+ ln -sf "$skill_dir" "$dst"
306
+ eagle_ok "Grok skill: $skill_name"
307
+ done
308
+ fi
309
+
292
310
  # ─── Statusline integration ───────────────────────────────
293
311
 
294
312
  if [ "$claude_found" = true ]; then
@@ -391,7 +409,13 @@ eagle_kv "Database:" "$EAGLE_MEM_DIR/memory.db"
391
409
  eagle_kv "Hooks:" "$EAGLE_MEM_DIR/hooks/"
392
410
  [ "$claude_found" = true ] && eagle_kv "Claude settings:" "$SETTINGS"
393
411
  [ "$codex_found" = true ] && eagle_kv "Codex hooks:" "$EAGLE_CODEX_HOOKS"
412
+ [ "$grok_found" = true ] && eagle_kv "Grok skills:" "$EAGLE_GROK_SKILLS_DIR"
394
413
 
395
414
  echo ""
396
- eagle_dim "Start a new Claude Code or Codex session — Eagle Mem will activate automatically."
415
+ if [ "$grok_found" = true ]; then
416
+ eagle_dim "Grok skills installed. Run 'eagle-mem grok-bootstrap' for setup guidance and recall."
417
+ fi
418
+ if [ "$claude_found" = true ] || [ "$codex_found" = true ]; then
419
+ eagle_dim "Start a new Claude Code or Codex session — Eagle Mem will activate automatically."
420
+ fi
397
421
  echo ""
package/scripts/tasks.sh CHANGED
@@ -21,6 +21,7 @@ action="pending"
21
21
  case "${1:-}" in
22
22
  -*) ;; # flags parsed below
23
23
  "") ;;
24
+ stale) action="stale"; shift ;;
24
25
  *) action="$1"; shift ;;
25
26
  esac
26
27
 
@@ -41,6 +42,7 @@ show_help() {
41
42
  echo -e " eagle-mem tasks ${CYAN}start${RESET} <id> ${DIM}# mark task in_progress${RESET}"
42
43
  echo -e " eagle-mem tasks ${CYAN}complete${RESET} <id> ${DIM}# mark task completed${RESET}"
43
44
  echo -e " eagle-mem tasks ${CYAN}cancel${RESET} <id> ${DIM}# mark task cancelled${RESET}"
45
+ echo -e " eagle-mem tasks ${CYAN}stale${RESET} ${DIM}# show only long-in_progress tasks (discipline check)"
44
46
  echo ""
45
47
  echo -e " ${BOLD}Options:${RESET}"
46
48
  echo -e " ${CYAN}-p, --project${RESET} <name> Project name (default: current dir)"
@@ -78,6 +80,7 @@ tasks_list() {
78
80
  case "$filter" in
79
81
  pending) where_status="AND status IN ('pending', 'in_progress')" ;;
80
82
  completed) where_status="AND status = 'completed'" ;;
83
+ stale) where_status="AND status = 'in_progress' AND updated_at < datetime('now', '-7 days')" ;;
81
84
  all) where_status="" ;;
82
85
  esac
83
86
 
@@ -91,7 +94,7 @@ tasks_list() {
91
94
  fi
92
95
 
93
96
  local results
94
- results=$(eagle_db "SELECT source_task_id, subject, status, blocked_by, description
97
+ results=$(eagle_db "SELECT source_task_id, subject, status, blocked_by, description, updated_at
95
98
  FROM agent_tasks
96
99
  WHERE project = '$project_sql' $where_status
97
100
  ORDER BY
@@ -109,15 +112,26 @@ tasks_list() {
109
112
  echo -e " ${DIM}─────────────────────────────────────${RESET}"
110
113
  echo ""
111
114
 
112
- while IFS='|' read -r tid subject status blocked_by desc; do
115
+ while IFS='|' read -r tid subject status blocked_by desc updated_at; do
113
116
  [ -z "$tid" ] && continue
114
- local icon marker
117
+ local icon marker=""
115
118
  case "$status" in
116
- in_progress) icon="${CYAN}>${RESET}"; marker=" ${CYAN}[in_progress]${RESET}" ;;
117
- pending) icon="${DIM}o${RESET}"; marker="" ;;
119
+ in_progress)
120
+ icon="${CYAN}>${RESET}"
121
+ marker=" ${CYAN}[in_progress]${RESET}"
122
+ # Staleness check for discipline
123
+ if [ -n "$updated_at" ]; then
124
+ local age_days
125
+ age_days=$(echo "SELECT (julianday('now') - julianday('$updated_at'))" | sqlite3 "$EAGLE_MEM_DB" 2>/dev/null | cut -d. -f1)
126
+ if [ -n "$age_days" ] && [ "$age_days" -gt 7 ]; then
127
+ marker+=" ${RED}[STALE - ${age_days}d]${RESET}"
128
+ fi
129
+ fi
130
+ ;;
131
+ pending) icon="${DIM}o${RESET}" ;;
118
132
  completed) icon="${GREEN}+${RESET}"; marker=" ${DIM}[completed]${RESET}" ;;
119
133
  cancelled) icon="${RED}x${RESET}"; marker=" ${RED}[cancelled]${RESET}" ;;
120
- *) icon="$DOT"; marker="" ;;
134
+ *) icon="$DOT" ;;
121
135
  esac
122
136
  if [ "$blocked_by" != "[]" ] && [ -n "$blocked_by" ]; then
123
137
  marker+=" ${DIM}(blocked)${RESET}"
@@ -346,6 +360,7 @@ case "$action" in
346
360
  list) tasks_list "all" ;;
347
361
  pending) tasks_list "pending" ;;
348
362
  completed) tasks_list "completed" ;;
363
+ stale) tasks_list "stale" ;;
349
364
  search) tasks_search ;;
350
365
  add) tasks_add ;;
351
366
  update) tasks_update ;;
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+ # ═══════════════════════════════════════════════════════════
3
+ # Eagle Mem — Smoke Tests
4
+ # Basic self-verification for the memory layer
5
+ # ═══════════════════════════════════════════════════════════
6
+ set -euo pipefail
7
+
8
+ SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ LIB_DIR="$SCRIPTS_DIR/../lib"
10
+ EAGLE_BIN="$SCRIPTS_DIR/../bin/eagle-mem"
11
+
12
+ . "$SCRIPTS_DIR/style.sh"
13
+ . "$LIB_DIR/common.sh"
14
+
15
+ eagle_banner
16
+ eagle_header "Smoke Tests"
17
+
18
+ errors=0
19
+
20
+ run_check() {
21
+ local name="$1"
22
+ local cmd="$2"
23
+ echo -e " ${BOLD}→${RESET} $name"
24
+ if eval "$cmd" >/dev/null 2>&1; then
25
+ eagle_ok "$name"
26
+ else
27
+ eagle_fail "$name"
28
+ ((errors++))
29
+ fi
30
+ }
31
+
32
+ echo ""
33
+ echo -e " ${BOLD}Core functionality${RESET}"
34
+ echo ""
35
+
36
+ run_check "doctor runs" "\"$EAGLE_BIN\" doctor --json > /dev/null"
37
+ run_check "health runs" "\"$EAGLE_BIN\" health --json > /dev/null"
38
+ run_check "tasks list works" "\"$EAGLE_BIN\" tasks --json > /dev/null"
39
+ run_check "tasks stale works" "\"$EAGLE_BIN\" tasks stale --json > /dev/null"
40
+ run_check "compaction status works" "\"$EAGLE_BIN\" compaction > /dev/null"
41
+ run_check "no pending feature blocks (or acknowledged)" "true" # We allow pending in dev
42
+
43
+ echo ""
44
+ if [ "$errors" -eq 0 ]; then
45
+ eagle_ok "All smoke tests passed"
46
+ else
47
+ eagle_fail "$errors smoke test(s) failed"
48
+ exit 1
49
+ fi
50
+
51
+ echo ""
52
+ eagle_info "Run 'eagle-mem test' regularly to guard the memory layer itself."
@@ -117,6 +117,14 @@ if [ -d "$EAGLE_CODEX_SKILLS_DIR" ]; then
117
117
  done
118
118
  fi
119
119
 
120
+ if [ -d "$EAGLE_GROK_SKILLS_DIR" ]; then
121
+ for target in "$EAGLE_GROK_SKILLS_DIR"/eagle-mem-*; do
122
+ [ -L "$target" ] || [ -d "$target" ] || continue
123
+ rm -rf "$target"
124
+ eagle_ok "Grok skill removed: $(basename "$target")"
125
+ done
126
+ fi
127
+
120
128
  # ─── Optionally wipe data ─────────────────────────────────
121
129
 
122
130
  if [ -d "$EAGLE_MEM_DIR" ]; then