@fingerskier/augment 0.4.0 → 0.5.1

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.
Files changed (54) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +494 -450
  3. package/dist/cli.js +5 -4
  4. package/dist/cli.js.map +1 -1
  5. package/dist/daemon/client.d.ts +6 -0
  6. package/dist/daemon/client.js +19 -0
  7. package/dist/daemon/client.js.map +1 -1
  8. package/dist/daemon/http.js +79 -9
  9. package/dist/daemon/http.js.map +1 -1
  10. package/dist/daemon/lifetime-lock.js +12 -12
  11. package/dist/db.js +107 -107
  12. package/dist/decoction.d.ts +51 -0
  13. package/dist/decoction.js +184 -0
  14. package/dist/decoction.js.map +1 -0
  15. package/dist/hooks.d.ts +8 -5
  16. package/dist/hooks.js +49 -20
  17. package/dist/hooks.js.map +1 -1
  18. package/dist/install.d.ts +14 -2
  19. package/dist/install.js +189 -1
  20. package/dist/install.js.map +1 -1
  21. package/dist/mcp/apps.js +480 -480
  22. package/dist/mcp/server.js +83 -0
  23. package/dist/mcp/server.js.map +1 -1
  24. package/dist/memory/files.js +21 -2
  25. package/dist/memory/files.js.map +1 -1
  26. package/dist/memory/project.d.ts +3 -0
  27. package/dist/memory/project.js +20 -0
  28. package/dist/memory/project.js.map +1 -1
  29. package/dist/pi/extension.d.ts +6 -0
  30. package/dist/pi/extension.js +74 -20
  31. package/dist/pi/extension.js.map +1 -1
  32. package/dist/proposals.js +16 -15
  33. package/dist/proposals.js.map +1 -1
  34. package/dist/service.d.ts +134 -2
  35. package/dist/service.js +578 -51
  36. package/dist/service.js.map +1 -1
  37. package/docs/FEATURES.md +771 -615
  38. package/docs/verify-memory-flow.md +4 -3
  39. package/integrations/claude/skills/augment-context/SKILL.md +74 -74
  40. package/integrations/claude/skills/augment-decoction/SKILL.md +36 -0
  41. package/integrations/claude/skills/augment-dream/SKILL.md +34 -0
  42. package/integrations/claude/skills/augment-dream/agents/openai.yaml +4 -0
  43. package/integrations/claude/skills/augment-sleep/SKILL.md +26 -26
  44. package/integrations/codex/SKILL.md +107 -74
  45. package/integrations/examples/claude-mcp-config.json +17 -17
  46. package/integrations/examples/codex-mcp-config.json +17 -17
  47. package/integrations/examples/grok-mcp-config.toml +18 -0
  48. package/integrations/grok/AGENTS.md +61 -0
  49. package/integrations/pi/skills/augment-decoction/SKILL.md +37 -0
  50. package/integrations/pi/skills/augment-dream/SKILL.md +36 -0
  51. package/package.json +85 -84
  52. package/dist/tally.d.ts +0 -46
  53. package/dist/tally.js +0 -94
  54. package/dist/tally.js.map +0 -1
package/README.md CHANGED
@@ -1,450 +1,494 @@
1
- # augment
2
-
3
- Local RAG memory for coding agents.
4
-
5
- ## Quickstart
6
-
7
- One package wires Augment into your agent. No clone, no build.
8
-
9
- **Claude Code:**
10
-
11
- ```powershell
12
- npx -y @fingerskier/augment install claude --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
13
- ```
14
-
15
- **Codex:**
16
-
17
- ```powershell
18
- npx -y @fingerskier/augment install codex --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
19
- ```
20
-
21
- **opencode:** add the plugin to `~/.config/opencode/opencode.json` or your repo's `opencode.json`:
22
-
23
- ```json
24
- {
25
- "$schema": "https://opencode.ai/config.json",
26
- "plugin": [
27
- [
28
- "@fingerskier/augment",
29
- {
30
- "memoryRoot": "C:\\Users\\you\\Dropbox\\augment-memories"
31
- }
32
- ]
33
- ]
34
- }
35
- ```
36
-
37
- **Both at once:**
38
-
39
- ```powershell
40
- npx -y @fingerskier/augment install all --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
41
- ```
42
-
43
- **Pi CLI:**
44
-
45
- ```powershell
46
- pi install npm:@fingerskier/augment
47
- ```
48
-
49
- Restart the agent and the `augment` memory tools appear. For opencode, quit and
50
- restart after saving config; config and plugins are loaded only at startup. Swap
51
- `--scope user` (your home dir) for `--scope repo` to install Claude/Codex into
52
- the current project. Add `--dry-run` to preview every file write first. Details:
53
- [Install Agent Integrations](#install-agent-integrations) and [Pi Package](#pi-package).
54
-
55
- ## CLI Commands
56
-
57
- Run any command without a clone via `npx -y @fingerskier/augment <command>`:
58
-
59
- | Command | What it does |
60
- | --- | --- |
61
- | `status` | Print the resolved config (memory root, state dir, daemon). Default command; `config` is an alias. |
62
- | `dashboard` | Start the daemon (if needed) and open the memory graph web UI. `--no-open` just prints the URL. |
63
- | `install <codex\|claude\|all>` | Wire Augment into an agent. See [Quickstart](#quickstart). |
64
- | `recall "<task>"` | Print the memory that would be recalled for a task (what the hooks auto-inject). |
65
- | `hook <event>` | Run a lifecycle hook over stdin JSON. Host-wired by `install`; you rarely call it directly. |
66
- | `help` | Show full usage (also `--help`, `-h`). |
67
-
68
- Examples:
69
-
70
- ```powershell
71
- npx -y @fingerskier/augment status
72
- npx -y @fingerskier/augment dashboard
73
- npx -y @fingerskier/augment dashboard --no-open
74
- npx -y @fingerskier/augment recall "fix the daemon reconnect bug" --project fingerskier/augment --limit 5
75
- ```
76
-
77
- `status`, `dashboard`, and `recall` honor `AUGMENT_MEMORY_ROOT` /
78
- `~/.augment/config.json`; `dashboard` also honors `AUGMENT_DAEMON_PORT`. Inside
79
- this repo use the compiled bin instead — see
80
- [Run Locally](#run-locally).
81
-
82
- ## Overview
83
-
84
- Augment is durable, local, project-scoped memory for coding agents.
85
- It stores memories as plain markdown files, maintains a rebuildable local index, and serves them over an MCP server backed by a shared local daemon —
86
- so several agents can share one memory folder without each running its own watcher/indexer.
87
- Your memories stay on disk; nothing leaves the machine.
88
-
89
- The point is to close the loop on every coding session:
90
- 1. **You prompt.** The agent starts a task and searches Augment for relevant prior context.
91
- 2. **Memories retrieved.** Governing specs, architecture decisions, known issues, and past work surface as direct context — no re-explaining what was already decided.
92
- 3. **Work done.** The agent implements against that context instead of guessing.
93
- 4. **Memories updated.** Durable outcomes — requirements (`SPEC`), decisions (`ARCH`), bugs (`ISSUE`), deferred work (`TODO`), milestones (`WORK`) — are written back and linked, ready for the next session.
94
-
95
- Installed integrations enforce this loop with lifecycle hooks: relevant memory is
96
- auto-injected at prompt and tool time, and a Stop hook prompts the end-of-turn
97
- write-back — no reliance on the agent remembering.
98
-
99
- Over time the memory folder becomes a project's institutional knowledge:
100
- queryable by semantic search, browsable as a graph in the [dashboard](#dashboard), and portable across machines via relative paths.
101
- For example, you could set your memory-root at a Dropbox folder and use them on multiple machines-
102
- paths and linkages are relative to that path so the search index is rebuildable and useable on multiple systems at once.
103
-
104
- Feature details live in [docs/FEATURES.md](docs/FEATURES.md).
105
- Remaining planned work lives in [ROADMAP.md](ROADMAP.md).
106
-
107
- ----
108
-
109
- ## Install From Source
110
-
111
- For development inside this repo:
112
-
113
- ```powershell
114
- npm install
115
- npm run build
116
- npm run check
117
- ```
118
-
119
- ---
120
-
121
- ## Configure Memory
122
-
123
- For quick local testing, set the memory root with an environment variable:
124
-
125
- ```powershell
126
- $env:AUGMENT_MEMORY_ROOT = "C:\Users\you\Dropbox\augment-memories"
127
- ```
128
-
129
- Or create `~/.augment/config.json`:
130
-
131
- ```json
132
- {
133
- "memoryRoot": "C:\\Users\\you\\Dropbox\\augment-memories",
134
- "stateDir": "C:\\Users\\you\\.augment\\state"
135
- }
136
- ```
137
-
138
- Defaults:
139
-
140
- - Memory root: `~/.augment/memories`
141
- - State directory: `~/.augment/state`
142
-
143
- Also honored: `AUGMENT_STATE_DIR` (state directory), `AUGMENT_DAEMON_PORT`
144
- (fixed daemon port; the default is dynamic), and `AUGMENT_GIT_AUTOCOMMIT` (set
145
- `0` to disable auto-committing memory writes when the memory root is a git repo;
146
- on by default). Full resolution order and defaults:
147
- [docs/FEATURES.md](docs/FEATURES.md#configuration).
148
-
149
- ## Run Locally
150
-
151
- Show all commands and options:
152
-
153
- ```powershell
154
- node .\dist\bin\augment.js help
155
- ```
156
-
157
- From the published package: `npx -y @fingerskier/augment help`.
158
-
159
- Run diagnostics:
160
-
161
- ```powershell
162
- node .\dist\bin\augment.js status
163
- ```
164
-
165
- Start the daemon manually:
166
-
167
- ```powershell
168
- node .\dist\bin\augment-daemon.js
169
- ```
170
-
171
- Normally you do not need to start the daemon yourself. `augment-mcp` starts or
172
- connects to the shared daemon automatically.
173
-
174
- Run the MCP server manually:
175
-
176
- ```powershell
177
- node .\dist\bin\augment-mcp.js
178
- ```
179
-
180
- It will appear idle in a terminal because it speaks MCP over stdio.
181
-
182
- Do not use `npx @fingerskier/augment` from inside this repository. npm resolves
183
- the current package first, but a package's own bins are not linked into its local
184
- `node_modules/.bin`, so Windows reports `augment` as not recognized. Use the
185
- compiled `node .\dist\bin\...` commands above while working in this repo.
186
-
187
- From another directory, the published package works:
188
-
189
- ```powershell
190
- npx @fingerskier/augment
191
- npm exec --yes --package @fingerskier/augment -- augment status
192
- ```
193
-
194
- ## Local MCP Config
195
-
196
- Use the compiled local MCP bin while dogfooding:
197
-
198
- ```json
199
- {
200
- "mcpServers": {
201
- "augment": {
202
- "command": "node",
203
- "args": ["C:\\dev\\fingerskier\\agent\\augment\\dist\\bin\\augment-mcp.js"],
204
- "env": {
205
- "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
206
- }
207
- }
208
- }
209
- }
210
- ```
211
-
212
- Alternative using npm from another working directory:
213
-
214
- ```json
215
- {
216
- "mcpServers": {
217
- "augment": {
218
- "command": "npm",
219
- "args": [
220
- "exec",
221
- "--prefix",
222
- "C:\\dev\\fingerskier\\agent\\augment",
223
- "--",
224
- "augment-mcp"
225
- ],
226
- "env": {
227
- "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
228
- }
229
- }
230
- }
231
- }
232
- ```
233
-
234
- Dogfooding instructions:
235
-
236
- - Codex: [integrations/codex/SKILL.md](integrations/codex/SKILL.md)
237
- - Claude: [integrations/claude/CLAUDE.md](integrations/claude/CLAUDE.md)
238
- - Pi: [integrations/pi/skills/augment-context/SKILL.md](integrations/pi/skills/augment-context/SKILL.md)
239
-
240
- ## Pi Package
241
-
242
- Augment ships as a first-class Pi package. Configure the shared memory root
243
- first (for example with `AUGMENT_MEMORY_ROOT` or `~/.augment/config.json`; see
244
- [Configure Memory](#configure-memory)), then install one of these ways.
245
-
246
- Install globally for your Pi user settings (`~/.pi/agent/settings.json`):
247
-
248
- ```powershell
249
- pi install npm:@fingerskier/augment
250
- ```
251
-
252
- Install for just the current repository (`.pi/settings.json`, useful when the
253
- team should share the package after trusting the project):
254
-
255
- ```powershell
256
- pi install -l npm:@fingerskier/augment
257
- ```
258
-
259
- Try it for one Pi run without changing settings:
260
-
261
- ```powershell
262
- pi -e npm:@fingerskier/augment
263
- ```
264
-
265
- While developing from this checkout, build first and load the local package path:
266
-
267
- ```powershell
268
- npm run build
269
- pi -e .
270
- ```
271
-
272
- After installing, restart Pi or run `/reload`. The package manifest loads
273
- `dist/pi/extension.js` and the Pi-specific `augment-context` skill. The extension
274
- keeps Claude/Codex behavior unchanged, does **not** run `augment install`, and
275
- adds namespaced Pi tools so it does not shadow built-ins like `read`:
276
-
277
- - `augment_init_project`, `augment_list_projects`
278
- - `augment_search`, `augment_project_context`, `augment_read_memory`
279
- - `augment_upsert`, `augment_link`, `augment_list_links`, `augment_unlink`
280
- - `augment_tally`, `augment_sleep_candidates`
281
- - `augment_memory_insights`, `augment_memory_graph`
282
-
283
- Pi slash commands:
284
-
285
- - `/augment-context [query]` — inject Augment project context into the session.
286
- - `/augment-persist [summary]` — ask the agent to persist completed work.
287
- - `/augment-dashboard [--no-open]` — open or print the daemon dashboard URL.
288
- - `/augment-tally [verdict] [--surface S] [--note ...]` — rate/show recall quality.
289
- - `/augment-sleep` — review read-only sleep consolidation candidates.
290
-
291
- A quick smoke test after install:
292
-
293
- 1. Run `/augment-context current project` and confirm an Augment context message appears.
294
- 2. Ask Pi to list available tools or inspect the prompt; `augment_read_memory`
295
- should exist and the built-in `read` tool should still be present.
296
- 3. Run `/augment-dashboard --no-open` and confirm it prints a localhost dashboard URL.
297
-
298
- By default the Pi extension injects task-level memory during `before_agent_start`
299
- and warns after non-trivial turns to persist durable work. Tune with
300
- `AUGMENT_PI_AUTO_CONTEXT=inject|reminder|off`,
301
- `AUGMENT_PI_AUTO_PERSIST=reminder|followup|off`,
302
- `AUGMENT_PI_CONTEXT_LIMIT`, and `AUGMENT_PI_CONTEXT_MAX_CHARS`. The first recall
303
- may take a moment while the daemon starts or the embedding model cache warms; if
304
- Augment shows `augment: offline`, verify `AUGMENT_MEMORY_ROOT` /
305
- `AUGMENT_STATE_DIR` and run `/augment-dashboard --no-open` to force a daemon
306
- connection.
307
-
308
- ## Install Agent Integrations
309
-
310
- Use Augment as an opencode plugin by adding it to opencode config:
311
-
312
- ```json
313
- {
314
- "$schema": "https://opencode.ai/config.json",
315
- "plugin": [
316
- ["@fingerskier/augment", { "memoryRoot": "C:\\Users\\you\\Dropbox\\augment-memories" }]
317
- ]
318
- }
319
- ```
320
-
321
- The opencode plugin registers the local `augment` MCP server, injects relevant
322
- memory into each user message, and adds Augment workflow guidance to the system
323
- prompt. It also honors `AUGMENT_MEMORY_ROOT` / `~/.augment/config.json`; the
324
- `memoryRoot` plugin option is just the config-file equivalent. Restart opencode
325
- after changing config.
326
-
327
- Install the Codex plugin and marketplace entry:
328
-
329
- ```powershell
330
- npm exec --yes --package @fingerskier/augment -- augment install codex --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
331
- ```
332
-
333
- Install the Claude plugin:
334
-
335
- ```powershell
336
- npm exec --yes --package @fingerskier/augment -- augment install claude --scope repo --memory-root "C:\Users\you\Dropbox\augment-memories"
337
- ```
338
-
339
- `install claude` does seven things:
340
-
341
- - Scaffolds a real Claude Code plugin at `<root>/plugins/augment/`
342
- (`.claude-plugin/plugin.json`, an auto-discovered `augment-context` skill, and a
343
- bundled `.mcp.json`).
344
- - Writes `hooks/hooks.json` into the plugin — lifecycle hooks (SessionStart /
345
- UserPromptSubmit / PreToolUse / Stop) that auto-inject recalled memory and
346
- prompt the end-of-turn memory write-back.
347
- - Provisions the hook runtime once (`npm install` into `~/.augment/npm-exec`) so
348
- hooks run via a direct `node` command instead of paying an npm bootstrap on
349
- every event.
350
- - Adds a marketplace entry at `<root>/.claude-plugin/marketplace.json`.
351
- - **Registers the MCP server directly** so it is active without the marketplace
352
- step: repo scope writes `<repo>/.mcp.json`; user scope merges into
353
- `~/.claude.json` (`mcpServers.augment`), preserving every other key.
354
- - **Best-effort registers the packaged plugin via Claude's own CLI** it runs
355
- `claude plugin marketplace add <root>` then
356
- `claude plugin install augment@<marketplace>` (user scope → `--scope user`;
357
- repo scope `--scope project`). If `claude` is not on PATH it skips this and
358
- prints the manual commands instead. Pass `--no-plugin` to skip it entirely.
359
- - Upserts the always-on memory-workflow guidance into `CLAUDE.md`.
360
-
361
- `<root>` is the repo (`--scope repo`) or your home directory (`--scope user`).
362
- The direct registration is enough on its own — restart Claude Code and the
363
- `augment` tools appear. The plugin registration is what adds the packaged
364
- `augment-context` skill to `/plugin list`. If you skipped it (or `claude` was not
365
- found), run the commands the installer prints, e.g.:
366
-
367
- ```text
368
- /plugin marketplace add .
369
- /plugin install augment@fingerskier-local
370
- ```
371
-
372
- Both the direct registration and the plugin register a server named `augment`;
373
- Claude's scope precedence resolves the duplicate to the higher-precedence one.
374
-
375
- Install both:
376
-
377
- ```powershell
378
- npm exec --yes --package @fingerskier/augment -- augment install all --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
379
- ```
380
-
381
- Preview writes before changing files:
382
-
383
- ```powershell
384
- npm exec --yes --package @fingerskier/augment -- augment install codex --scope user --dry-run
385
- ```
386
-
387
- The installer configures MCP commands with an isolated npm `--prefix` directory
388
- under `~/.augment/npm-exec` so they work even when launched from this repository.
389
- The same directory hosts the provisioned hook runtime; if npm was unavailable at
390
- install time, the installer prints the manual
391
- `npm install --prefix <prefix> @fingerskier/augment` command and hooks stay
392
- silent no-ops until it is run.
393
-
394
- Run these package commands from outside this repository. When developing inside
395
- this repo, use `node .\dist\bin\augment.js install ...` after `npm run build`.
396
-
397
- ## Dashboard
398
-
399
- A local web UI for browsing and editing memories as a graph:
400
-
401
- ```powershell
402
- npx -y @fingerskier/augment dashboard
403
- ```
404
-
405
- This starts the shared daemon (if needed) and opens the dashboard in your browser.
406
- It shows a graph of all projects; click a project to drill into its memory
407
- subgraph (nodes colored by kind, edges labeled by link type). You can run an ad
408
- hoc semantic search, create/edit/delete memories, and create/delete links all
409
- against the daemon's localhost API.
410
-
411
- - `augment dashboard` — start the daemon and open the UI.
412
- - `augment dashboard --no-open` — just print the URL (honors `AUGMENT_DAEMON_PORT`).
413
-
414
- The daemon binds `127.0.0.1` only and serves the dashboard and its API without
415
- auth — anyone who needs to expose it beyond localhost should front it with their
416
- own gateway. Developing inside this repo, use `node .\dist\bin\augment.js
417
- dashboard` after `npm run build`.
418
-
419
- ### Dashboard snippets in chat (MCP Apps)
420
-
421
- Hosts that support the [MCP Apps extension](https://github.com/modelcontextprotocol/ext-apps)
422
- (SEP-1865: Claude.ai / Claude Desktop, ChatGPT, Goose, VS Code, …) can render
423
- augment's dashboard snippets inline in the conversation. When a user asks for
424
- memory insights, the agent can call:
425
-
426
- - `memory_insights` an interactive stats snippet: memories by kind, links by
427
- type, top tags, 12-week activity, most-connected memories, and the
428
- recall-quality tally.
429
- - `memory_graph` an interactive Cytoscape view of the project's memory graph.
430
-
431
- Both tools degrade to a plain-text summary in hosts without MCP Apps support
432
- (the graph's node/edge payload is withheld there so it never burns model
433
- context). Older MCP-UI hosts that render embedded `ui://` HTML blocks but never
434
- negotiate the extension can opt in with `AUGMENT_MCP_UI_EMBED=1` in the MCP
435
- server's environment.
436
-
437
- ## Package Check
438
-
439
- Before publishing:
440
-
441
- ```powershell
442
- npm run check
443
- npm pack --dry-run
444
- ```
445
-
446
- The package exposes these bins:
447
-
448
- - `augment`
449
- - `augment-daemon`
450
- - `augment-mcp`
1
+ # augment
2
+
3
+ Local RAG memory for agentic work.
4
+ Memories are files story on your system (e.g. you could use a Dropbox directory for persistence).
5
+ The "retrieval" part is a local index used to find relevant memories when you need them.
6
+ Plugins for various agent tools so they know how to memorize and remember things.
7
+
8
+ ## Quickstart
9
+
10
+ One package wires Augment into your agent. No clone, no build.
11
+
12
+ **Claude Code:**
13
+
14
+ ```powershell
15
+ npx -y @fingerskier/augment install claude --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
16
+ ```
17
+
18
+ **Grok Build:**
19
+
20
+ ```powershell
21
+ npx -y @fingerskier/augment install grok --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
22
+ ```
23
+
24
+ **Codex:**
25
+
26
+ ```powershell
27
+ npx -y @fingerskier/augment install codex --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
28
+ ```
29
+
30
+ **opencode:** add the plugin to `~/.config/opencode/opencode.json` or your repo's `opencode.json`:
31
+
32
+ ```json
33
+ {
34
+ "$schema": "https://opencode.ai/config.json",
35
+ "plugin": [
36
+ [
37
+ "@fingerskier/augment",
38
+ {
39
+ "memoryRoot": "C:\\Users\\you\\Dropbox\\augment-memories"
40
+ }
41
+ ]
42
+ ]
43
+ }
44
+ ```
45
+
46
+ **Both at once:**
47
+
48
+ ```powershell
49
+ npx -y @fingerskier/augment install all --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
50
+ ```
51
+
52
+ **Pi CLI:**
53
+
54
+ ```powershell
55
+ pi install npm:@fingerskier/augment
56
+ ```
57
+
58
+ Restart the agent and the `augment` memory tools appear.
59
+ For opencode, quit and restart after saving config; config and plugins are loaded only at startup.
60
+ Swap `--scope user` (your home dir) for `--scope repo` to install Claude/Codex/Grok into the current project.
61
+ Add `--dry-run` to preview every file write first.
62
+ Details: [Install Agent Integrations](#install-agent-integrations) and [Pi Package](#pi-package).
63
+
64
+ ## CLI Commands
65
+
66
+ Run any command without a clone via `npx -y @fingerskier/augment <command>`:
67
+
68
+ | Command | What it does |
69
+ | --- | --- |
70
+ | `status` | Print the resolved config (memory root, state dir, daemon). Default command; `config` is an alias. |
71
+ | `dashboard` | Start the daemon (if needed) and open the memory graph web UI. `--no-open` just prints the URL. |
72
+ | `install <codex\|claude\|grok\|all>` | Wire Augment into an agent. See [Quickstart](#quickstart). |
73
+ | `recall "<task>"` | Print the memory that would be recalled for a task (what the hooks auto-inject). |
74
+ | `hook <event>` | Run a lifecycle hook over stdin JSON. Host-wired by `install`; you rarely call it directly. |
75
+ | `help` | Show full usage (also `--help`, `-h`). |
76
+
77
+ Examples:
78
+
79
+ ```powershell
80
+ npx -y @fingerskier/augment status
81
+ npx -y @fingerskier/augment dashboard
82
+ npx -y @fingerskier/augment dashboard --no-open
83
+ npx -y @fingerskier/augment recall "fix the daemon reconnect bug" --project fingerskier/augment --limit 5
84
+ ```
85
+
86
+ `status`, `dashboard`, and `recall` honor `AUGMENT_MEMORY_ROOT` /
87
+ `~/.augment/config.json`; `dashboard` also honors `AUGMENT_DAEMON_PORT`. Inside
88
+ this repo use the compiled bin instead — see
89
+ [Run Locally](#run-locally).
90
+
91
+ ## Overview
92
+
93
+ Augment is durable, local, project-aware memory for coding agents.
94
+ It stores memories as plain markdown files, maintains a rebuildable local index, and serves them over an MCP server backed by a shared local daemon —
95
+ so several agents can share one memory folder without each running its own watcher/indexer.
96
+ Your memories stay on disk; nothing leaves the machine.
97
+
98
+ The point is to close the loop on every coding session:
99
+ 1. **You prompt.** The agent starts a task and searches Augment for relevant prior context.
100
+ 2. **Memories retrieved.** Governing specs, architecture decisions, known issues, and past work surface as direct context no re-explaining what was already decided.
101
+ 3. **Work done.** The agent implements against that context instead of guessing.
102
+ 4. **Memories updated.** Durable outcomes requirements (`SPEC`), decisions (`ARCH`), bugs (`ISSUE`), deferred work (`TODO`), milestones (`WORK`) — are written back and linked, ready for the next session.
103
+
104
+ Installed integrations enforce this loop with lifecycle hooks: relevant memory is
105
+ auto-injected at prompt and tool time, and a Stop hook prompts the end-of-turn
106
+ write-back — no reliance on the agent remembering.
107
+
108
+ Over time the memory folder becomes a project's institutional knowledge:
109
+ queryable by semantic search, browsable as a graph in the [dashboard](#dashboard), and portable across machines via relative paths.
110
+ For example, you could set your memory-root at a Dropbox folder and use them on multiple machines-
111
+ paths and linkages are relative to that path so the search index is rebuildable and useable on multiple systems at once.
112
+
113
+ Generic memories live as ordinary files under `.generic/<KIND>/<name>.md`;
114
+ `decoction_glean` discovers recurring evidence and writes an agent-synthesized
115
+ SPEC or ARCH. The separately approved
116
+ `decoction_cleanup` can remove only the originals the user selects. Dream
117
+ workflows use normal global search — prioritizing the current project while
118
+ including generic and foreign inspiration — and keep speculative memories or
119
+ links in editable proposals until the user approves `dream_apply`.
120
+
121
+ Feature details live in [docs/FEATURES.md](docs/FEATURES.md).
122
+ Remaining planned work lives in [ROADMAP.md](ROADMAP.md).
123
+
124
+ ----
125
+
126
+ ## Install From Source
127
+
128
+ For development inside this repo:
129
+
130
+ ```powershell
131
+ npm install
132
+ npm run build
133
+ npm run check
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Configure Memory
139
+
140
+ For quick local testing, set the memory root with an environment variable:
141
+
142
+ ```powershell
143
+ $env:AUGMENT_MEMORY_ROOT = "C:\Users\you\Dropbox\augment-memories"
144
+ ```
145
+
146
+ Or create `~/.augment/config.json`:
147
+
148
+ ```json
149
+ {
150
+ "memoryRoot": "C:\\Users\\you\\Dropbox\\augment-memories",
151
+ "stateDir": "C:\\Users\\you\\.augment\\state"
152
+ }
153
+ ```
154
+
155
+ Defaults:
156
+
157
+ - Memory root: `~/.augment/memories`
158
+ - State directory: `~/.augment/state`
159
+
160
+ Also honored: `AUGMENT_STATE_DIR` (state directory), `AUGMENT_DAEMON_PORT`
161
+ (fixed daemon port; the default is dynamic), and `AUGMENT_GIT_AUTOCOMMIT` (set
162
+ `0` to disable auto-committing memory writes when the memory root is a git repo;
163
+ on by default). Full resolution order and defaults:
164
+ [docs/FEATURES.md](docs/FEATURES.md#configuration).
165
+
166
+ ## Run Locally
167
+
168
+ Show all commands and options:
169
+
170
+ ```powershell
171
+ node .\dist\bin\augment.js help
172
+ ```
173
+
174
+ From the published package: `npx -y @fingerskier/augment help`.
175
+
176
+ Run diagnostics:
177
+
178
+ ```powershell
179
+ node .\dist\bin\augment.js status
180
+ ```
181
+
182
+ Start the daemon manually:
183
+
184
+ ```powershell
185
+ node .\dist\bin\augment-daemon.js
186
+ ```
187
+
188
+ Normally you do not need to start the daemon yourself. `augment-mcp` starts or
189
+ connects to the shared daemon automatically.
190
+
191
+ Run the MCP server manually:
192
+
193
+ ```powershell
194
+ node .\dist\bin\augment-mcp.js
195
+ ```
196
+
197
+ It will appear idle in a terminal because it speaks MCP over stdio.
198
+
199
+ Do not use `npx @fingerskier/augment` from inside this repository. npm resolves
200
+ the current package first, but a package's own bins are not linked into its local
201
+ `node_modules/.bin`, so Windows reports `augment` as not recognized. Use the
202
+ compiled `node .\dist\bin\...` commands above while working in this repo.
203
+
204
+ From another directory, the published package works:
205
+
206
+ ```powershell
207
+ npx @fingerskier/augment
208
+ npm exec --yes --package @fingerskier/augment -- augment status
209
+ ```
210
+
211
+ ## Local MCP Config
212
+
213
+ Use the compiled local MCP bin while dogfooding:
214
+
215
+ ```json
216
+ {
217
+ "mcpServers": {
218
+ "augment": {
219
+ "command": "node",
220
+ "args": ["C:\\dev\\fingerskier\\agent\\augment\\dist\\bin\\augment-mcp.js"],
221
+ "env": {
222
+ "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
223
+ }
224
+ }
225
+ }
226
+ }
227
+ ```
228
+
229
+ Alternative using npm from another working directory:
230
+
231
+ ```json
232
+ {
233
+ "mcpServers": {
234
+ "augment": {
235
+ "command": "npm",
236
+ "args": [
237
+ "exec",
238
+ "--prefix",
239
+ "C:\\dev\\fingerskier\\agent\\augment",
240
+ "--",
241
+ "augment-mcp"
242
+ ],
243
+ "env": {
244
+ "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
245
+ }
246
+ }
247
+ }
248
+ }
249
+ ```
250
+
251
+ Dogfooding instructions:
252
+
253
+ - Codex: [integrations/codex/SKILL.md](integrations/codex/SKILL.md)
254
+ - Claude: [integrations/claude/CLAUDE.md](integrations/claude/CLAUDE.md)
255
+ - Pi: [augment-context](integrations/pi/skills/augment-context/SKILL.md),
256
+ [augment-decoction](integrations/pi/skills/augment-decoction/SKILL.md), and
257
+ [augment-dream](integrations/pi/skills/augment-dream/SKILL.md)
258
+
259
+ ## Pi Package
260
+
261
+ Augment ships as a first-class Pi package. Configure the shared memory root
262
+ first (for example with `AUGMENT_MEMORY_ROOT` or `~/.augment/config.json`; see
263
+ [Configure Memory](#configure-memory)), then install one of these ways.
264
+
265
+ Install globally for your Pi user settings (`~/.pi/agent/settings.json`):
266
+
267
+ ```powershell
268
+ pi install npm:@fingerskier/augment
269
+ ```
270
+
271
+ Install for just the current repository (`.pi/settings.json`, useful when the
272
+ team should share the package after trusting the project):
273
+
274
+ ```powershell
275
+ pi install -l npm:@fingerskier/augment
276
+ ```
277
+
278
+ Try it for one Pi run without changing settings:
279
+
280
+ ```powershell
281
+ pi -e npm:@fingerskier/augment
282
+ ```
283
+
284
+ While developing from this checkout, build first and load the local package path:
285
+
286
+ ```powershell
287
+ npm run build
288
+ pi -e .
289
+ ```
290
+
291
+ After installing, restart Pi or run `/reload`. The package manifest loads
292
+ `dist/pi/extension.js` and the Pi-specific `augment-context`,
293
+ `augment-decoction`, and `augment-dream` skills. The extension keeps
294
+ Claude/Codex behavior unchanged, does **not** run `augment install`, and adds
295
+ namespaced Pi tools so it does not shadow built-ins like `read`:
296
+
297
+ - `augment_init_project`, `augment_list_projects`
298
+ - `augment_search`, `augment_project_context`, `augment_read_memory`
299
+ - `augment_upsert`, `augment_link`, `augment_list_links`, `augment_unlink`
300
+ - `augment_decoction_glean`, `augment_decoction_cleanup`
301
+ - `augment_sleep_candidates`, `augment_sleep_propose`, `augment_sleep_proposals`,
302
+ `augment_sleep_apply`, `augment_sleep_reject`
303
+ - `augment_dream_propose`, `augment_dream_proposals`, `augment_dream_apply`,
304
+ `augment_dream_reject`
305
+ - `augment_memory_insights`, `augment_memory_graph`
306
+
307
+ Pi slash commands:
308
+
309
+ - `/augment-context [query]` — inject Augment project context into the session.
310
+ - `/augment-persist [summary]` ask the agent to persist completed work.
311
+ - `/augment-dashboard [--no-open]` — open or print the daemon dashboard URL.
312
+ - `/augment-sleep` — run the supervised sleep proposal workflow.
313
+ - `/augment-dream` — run the supervised dream proposal workflow.
314
+
315
+ A quick smoke test after install:
316
+
317
+ 1. Run `/augment-context current project` and confirm an Augment context message appears.
318
+ 2. Ask Pi to list available tools or inspect the prompt; `augment_read_memory`
319
+ should exist and the built-in `read` tool should still be present.
320
+ 3. Run `/augment-dashboard --no-open` and confirm it prints a localhost dashboard URL.
321
+
322
+ By default the Pi extension injects task-level memory during `before_agent_start`
323
+ and warns after non-trivial turns to persist durable work. Tune with
324
+ `AUGMENT_PI_AUTO_CONTEXT=inject|reminder|off`,
325
+ `AUGMENT_PI_AUTO_PERSIST=reminder|followup|off`,
326
+ `AUGMENT_PI_CONTEXT_LIMIT`, and `AUGMENT_PI_CONTEXT_MAX_CHARS`. The first recall
327
+ may take a moment while the daemon starts or the embedding model cache warms; if
328
+ Augment shows `augment: offline`, verify `AUGMENT_MEMORY_ROOT` /
329
+ `AUGMENT_STATE_DIR` and run `/augment-dashboard --no-open` to force a daemon
330
+ connection.
331
+
332
+ ## Install Agent Integrations
333
+
334
+ Use Augment as an opencode plugin by adding it to opencode config:
335
+
336
+ ```json
337
+ {
338
+ "$schema": "https://opencode.ai/config.json",
339
+ "plugin": [
340
+ ["@fingerskier/augment", { "memoryRoot": "C:\\Users\\you\\Dropbox\\augment-memories" }]
341
+ ]
342
+ }
343
+ ```
344
+
345
+ The opencode plugin registers the local `augment` MCP server, injects relevant
346
+ memory into each user message, and adds Augment workflow guidance to the system
347
+ prompt. It also honors `AUGMENT_MEMORY_ROOT` / `~/.augment/config.json`; the
348
+ `memoryRoot` plugin option is just the config-file equivalent. Restart opencode
349
+ after changing config.
350
+
351
+ Install the Codex plugin and marketplace entry:
352
+
353
+ ```powershell
354
+ npm exec --yes --package @fingerskier/augment -- augment install codex --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
355
+ ```
356
+
357
+ Install the Claude plugin:
358
+
359
+ ```powershell
360
+ npm exec --yes --package @fingerskier/augment -- augment install claude --scope repo --memory-root "C:\Users\you\Dropbox\augment-memories"
361
+ ```
362
+
363
+ Install Grok Build support:
364
+
365
+ ```powershell
366
+ npm exec --yes --package @fingerskier/augment -- augment install grok --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
367
+ ```
368
+
369
+ `install grok` does five things:
370
+
371
+ - Registers the `augment` MCP server in Grok's native TOML config
372
+ (`~/.grok/config.toml` for user scope, `<repo>/.grok/config.toml` for repo
373
+ scope), matching the shape of `grok mcp add`.
374
+ - Installs workflow skills under `~/.grok/skills/` (or `<repo>/.grok/skills/`).
375
+ - Writes lifecycle hooks to `~/.grok/hooks/augment.json` (or the repo equivalent).
376
+ - Upserts always-on memory-workflow guidance into `AGENTS.md`
377
+ (`~/.grok/AGENTS.md` for user scope, `<repo>/AGENTS.md` for repo scope).
378
+ - Provisions the shared hook runtime once (`npm install` into
379
+ `~/.augment/npm-exec`), same as Claude/Codex.
380
+
381
+ Restart Grok (or press `r` in `/mcps`) after install so MCP servers and hooks
382
+ reload.
383
+
384
+ `install claude` does seven things:
385
+
386
+ - Scaffolds a real Claude Code plugin at `<root>/plugins/augment/`
387
+ (`.claude-plugin/plugin.json`, auto-discovered context, sleep, decoction, and
388
+ dream skills, and a bundled `.mcp.json`).
389
+ - Writes `hooks/hooks.json` into the plugin lifecycle hooks (SessionStart /
390
+ UserPromptSubmit / PreToolUse / Stop) that auto-inject recalled memory and
391
+ prompt the end-of-turn memory write-back.
392
+ - Provisions the hook runtime once (`npm install` into `~/.augment/npm-exec`) so
393
+ hooks run via a direct `node` command instead of paying an npm bootstrap on
394
+ every event.
395
+ - Adds a marketplace entry at `<root>/.claude-plugin/marketplace.json`.
396
+ - **Registers the MCP server directly** so it is active without the marketplace
397
+ step: repo scope writes `<repo>/.mcp.json`; user scope merges into
398
+ `~/.claude.json` (`mcpServers.augment`), preserving every other key.
399
+ - **Best-effort registers the packaged plugin via Claude's own CLI** it runs
400
+ `claude plugin marketplace add <root>` then
401
+ `claude plugin install augment@<marketplace>` (user scope → `--scope user`;
402
+ repo scope `--scope project`). If `claude` is not on PATH it skips this and
403
+ prints the manual commands instead. Pass `--no-plugin` to skip it entirely.
404
+ - Upserts the always-on memory-workflow guidance into `CLAUDE.md`.
405
+
406
+ `<root>` is the repo (`--scope repo`) or your home directory (`--scope user`).
407
+ The direct registration is enough on its own restart Claude Code and the
408
+ `augment` tools appear. The plugin registration is what adds the packaged
409
+ Augment skills to `/plugin list`. If you skipped it (or `claude` was not found),
410
+ run the commands the installer prints, e.g.:
411
+
412
+ ```text
413
+ /plugin marketplace add .
414
+ /plugin install augment@fingerskier-local
415
+ ```
416
+
417
+ Both the direct registration and the plugin register a server named `augment`;
418
+ Claude's scope precedence resolves the duplicate to the higher-precedence one.
419
+
420
+ Install both:
421
+
422
+ ```powershell
423
+ npm exec --yes --package @fingerskier/augment -- augment install all --scope user --memory-root "C:\Users\you\Dropbox\augment-memories"
424
+ ```
425
+
426
+ Preview writes before changing files:
427
+
428
+ ```powershell
429
+ npm exec --yes --package @fingerskier/augment -- augment install codex --scope user --dry-run
430
+ ```
431
+
432
+ The installer configures MCP commands with an isolated npm `--prefix` directory
433
+ under `~/.augment/npm-exec` so they work even when launched from this repository.
434
+ The same directory hosts the provisioned hook runtime; if npm was unavailable at
435
+ install time, the installer prints the manual
436
+ `npm install --prefix <prefix> @fingerskier/augment` command and hooks stay
437
+ silent no-ops until it is run.
438
+
439
+ Run these package commands from outside this repository. When developing inside
440
+ this repo, use `node .\dist\bin\augment.js install ...` after `npm run build`.
441
+
442
+ ## Dashboard
443
+
444
+ A local web UI for browsing and editing memories as a graph:
445
+
446
+ ```powershell
447
+ npx -y @fingerskier/augment dashboard
448
+ ```
449
+
450
+ This starts the shared daemon (if needed) and opens the dashboard in your browser.
451
+ It shows a graph of all projects; click a project to drill into its memory
452
+ subgraph (nodes colored by kind, edges labeled by link type). You can run an ad
453
+ hoc semantic search, create/edit/delete memories, and create/delete links — all
454
+ against the daemon's localhost API.
455
+
456
+ - `augment dashboard` — start the daemon and open the UI.
457
+ - `augment dashboard --no-open` — just print the URL (honors `AUGMENT_DAEMON_PORT`).
458
+
459
+ The daemon binds `127.0.0.1` only and serves the dashboard and its API without
460
+ auth — anyone who needs to expose it beyond localhost should front it with their
461
+ own gateway. Developing inside this repo, use `node .\dist\bin\augment.js
462
+ dashboard` after `npm run build`.
463
+
464
+ ### Dashboard snippets in chat (MCP Apps)
465
+
466
+ Hosts that support the [MCP Apps extension](https://github.com/modelcontextprotocol/ext-apps)
467
+ (SEP-1865: Claude.ai / Claude Desktop, ChatGPT, Goose, VS Code, …) can render
468
+ augment's dashboard snippets inline in the conversation. When a user asks for
469
+ memory insights, the agent can call:
470
+
471
+ - `memory_insights` — an interactive stats snippet: memories by kind, links by
472
+ type, top tags, 12-week activity, and most-connected memories.
473
+ - `memory_graph` — an interactive Cytoscape view of the project's memory graph.
474
+
475
+ Both tools degrade to a plain-text summary in hosts without MCP Apps support
476
+ (the graph's node/edge payload is withheld there so it never burns model
477
+ context). Older MCP-UI hosts that render embedded `ui://` HTML blocks but never
478
+ negotiate the extension can opt in with `AUGMENT_MCP_UI_EMBED=1` in the MCP
479
+ server's environment.
480
+
481
+ ## Package Check
482
+
483
+ Before publishing:
484
+
485
+ ```powershell
486
+ npm run check
487
+ npm pack --dry-run
488
+ ```
489
+
490
+ The package exposes these bins:
491
+
492
+ - `augment`
493
+ - `augment-daemon`
494
+ - `augment-mcp`