@mrc2204/agent-smart-memo 5.1.0 → 5.1.2

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 (69) hide show
  1. package/README.md +209 -375
  2. package/bin/asm.mjs +365 -0
  3. package/bin/opencode-mcp-server.mjs +320 -0
  4. package/dist/core/contracts/adapter-contracts.d.ts +1 -1
  5. package/dist/core/contracts/adapter-contracts.d.ts.map +1 -1
  6. package/dist/core/contracts/change-overlay-contracts.d.ts +69 -0
  7. package/dist/core/contracts/change-overlay-contracts.d.ts.map +1 -0
  8. package/dist/core/contracts/change-overlay-contracts.js +2 -0
  9. package/dist/core/contracts/change-overlay-contracts.js.map +1 -0
  10. package/dist/core/contracts/feature-pack-contracts.d.ts +37 -0
  11. package/dist/core/contracts/feature-pack-contracts.d.ts.map +1 -0
  12. package/dist/core/contracts/feature-pack-contracts.js +8 -0
  13. package/dist/core/contracts/feature-pack-contracts.js.map +1 -0
  14. package/dist/core/contracts/project-query-contracts.d.ts +84 -0
  15. package/dist/core/contracts/project-query-contracts.d.ts.map +1 -0
  16. package/dist/core/contracts/project-query-contracts.js +2 -0
  17. package/dist/core/contracts/project-query-contracts.js.map +1 -0
  18. package/dist/core/graph/code-graph-model.d.ts +9 -0
  19. package/dist/core/graph/code-graph-model.d.ts.map +1 -0
  20. package/dist/core/graph/code-graph-model.js +70 -0
  21. package/dist/core/graph/code-graph-model.js.map +1 -0
  22. package/dist/core/graph/code-graph-populator.d.ts +20 -0
  23. package/dist/core/graph/code-graph-populator.d.ts.map +1 -0
  24. package/dist/core/graph/code-graph-populator.js +760 -0
  25. package/dist/core/graph/code-graph-populator.js.map +1 -0
  26. package/dist/core/graph/contracts.d.ts +29 -0
  27. package/dist/core/graph/contracts.d.ts.map +1 -0
  28. package/dist/core/graph/contracts.js +47 -0
  29. package/dist/core/graph/contracts.js.map +1 -0
  30. package/dist/core/ingest/contracts.d.ts +1 -1
  31. package/dist/core/ingest/contracts.d.ts.map +1 -1
  32. package/dist/core/ingest/ingest-pipeline.js +1 -1
  33. package/dist/core/ingest/ingest-pipeline.js.map +1 -1
  34. package/dist/core/ingest/semantic-block-extractor.d.ts.map +1 -1
  35. package/dist/core/ingest/semantic-block-extractor.js +36 -0
  36. package/dist/core/ingest/semantic-block-extractor.js.map +1 -1
  37. package/dist/core/usecases/default-memory-usecase-port.d.ts +35 -0
  38. package/dist/core/usecases/default-memory-usecase-port.d.ts.map +1 -1
  39. package/dist/core/usecases/default-memory-usecase-port.js +1578 -19
  40. package/dist/core/usecases/default-memory-usecase-port.js.map +1 -1
  41. package/dist/db/graph-db.d.ts +24 -0
  42. package/dist/db/graph-db.d.ts.map +1 -1
  43. package/dist/db/graph-db.js +81 -2
  44. package/dist/db/graph-db.js.map +1 -1
  45. package/dist/db/slot-db.d.ts +227 -1
  46. package/dist/db/slot-db.d.ts.map +1 -1
  47. package/dist/db/slot-db.js +700 -13
  48. package/dist/db/slot-db.js.map +1 -1
  49. package/dist/index.d.ts +7 -247
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +32 -119
  52. package/dist/index.js.map +1 -1
  53. package/dist/shared/asm-config.d.ts +82 -0
  54. package/dist/shared/asm-config.d.ts.map +1 -0
  55. package/dist/shared/asm-config.js +254 -0
  56. package/dist/shared/asm-config.js.map +1 -0
  57. package/dist/shared/slotdb-path.d.ts +4 -3
  58. package/dist/shared/slotdb-path.d.ts.map +1 -1
  59. package/dist/shared/slotdb-path.js +15 -6
  60. package/dist/shared/slotdb-path.js.map +1 -1
  61. package/dist/tools/graph-tools.d.ts.map +1 -1
  62. package/dist/tools/graph-tools.js +131 -0
  63. package/dist/tools/graph-tools.js.map +1 -1
  64. package/dist/tools/project-tools.d.ts.map +1 -1
  65. package/dist/tools/project-tools.js +476 -1
  66. package/dist/tools/project-tools.js.map +1 -1
  67. package/openclaw.plugin.json +5 -164
  68. package/package.json +61 -26
  69. package/scripts/init-openclaw.mjs +727 -0
package/README.md CHANGED
@@ -1,373 +1,270 @@
1
1
  # Agent Smart Memo
2
2
 
3
- > **ASM v5.1 super memory platform for OpenClaw agents** — unified memory for **conversation memory**, **project memory**, semantic retrieval, structured slots, graph knowledge, onboarding, and engineering context assembly.
3
+ > **ASM v5.1** is a super memory platform for coding agents: **conversation memory + project memory + retrieval/control plane**, delivered through a single package and a CLI-first install flow.
4
4
 
5
- Originally built as an OpenClaw memory plugin for conversation/runtime memory, `agent-smart-memo` has evolved into a broader **agent memory platform**:
5
+ `@mrc2204/agent-smart-memo` provides a project-aware memory layer that can be installed into multiple runtimes while keeping one shared memory/config model.
6
6
 
7
- - **conversation memory** for agent runtime continuity
8
- - **project memory** for repo-aware engineering context
9
- - **semantic memory** via vector retrieval
10
- - **structured slot memory** via SQLite
11
- - **graph memory** for entities/relationships
12
- - **operator onboarding** for project registration + Jira mapping + indexing
13
- - **CLI/setup flows** for OpenClaw installation and bootstrap
14
-
15
- This repo is still packaged for **OpenClaw first**, but its practical role is now:
7
+ Today ASM provides:
8
+ - conversation/runtime continuity
9
+ - structured slot memory
10
+ - semantic retrieval
11
+ - graph memory
12
+ - project registry + onboarding
13
+ - repo-aware indexing / reindexing
14
+ - lineage-aware engineering context retrieval
15
+ - CLI-based platform install flows for OpenClaw, Paperclip, and OpenCode
16
16
 
17
- - a **super memory layer** for agents
18
- - a **project-aware engineering memory system**
19
- - an **operator-friendly onboarding/runtime package**
17
+ This means ASM is best understood as:
20
18
 
21
- It is no longer accurate to describe ASM as only a small conversation-memory plugin.
19
+ > **a shared memory platform for coding agents, with OpenClaw as the primary runtime and Paperclip/OpenCode as supported adapters**
22
20
 
23
21
  ---
24
22
 
25
- ## 1) What ASM v5.1 is
23
+ ## 1) Core mental model
26
24
 
27
- ASM v5.1 combines two big memory domains.
25
+ ASM has 3 practical layers.
28
26
 
29
27
  ### A. Conversation memory
30
- Used for ongoing agent continuity and runtime recall:
31
- - semantic memory (`memory_search`, `memory_store`)
32
- - structured slot memory (`memory_slot_*`)
33
- - graph memory (`memory_graph_*`)
34
- - auto-capture / auto-recall support
35
- - namespace-aware memory behavior
28
+ Used for runtime continuity:
29
+ - `memory_search`
30
+ - `memory_store`
31
+ - `memory_slot_*`
32
+ - `memory_graph_*`
33
+ - auto-capture / auto-recall
36
34
 
37
35
  ### B. Project memory
38
- Used for engineering/project-aware workflows:
39
- - project registry and aliasing
36
+ Used for engineering context:
37
+ - project registry
40
38
  - repo root / repo remote identity
41
- - Jira mapping and tracker linkage
42
- - onboarding flows for new repos
43
- - project indexing / reindexing
44
- - hybrid retrieval with file / symbol / task lineage
45
-
46
- That is why ASM now acts as:
39
+ - project aliasing
40
+ - Jira linkage
41
+ - onboarding + index triggers
42
+ - lifecycle-aware retrieval boundaries
47
43
 
48
- > **conversation memory + project memory + retrieval/control plane in one agent-facing platform**
49
-
50
- ---
51
-
52
- ## 2) What ASM v5.1 provides today
53
-
54
- ASM-69 and follow-up waves expanded the system from memory-only into project-aware memory orchestration.
55
-
56
- ### Project-aware memory model
57
- Agents can now reason about:
58
- - `project_id`
59
- - project alias
60
- - `repo_root`
61
- - `repo_remote`
62
- - Jira space / epic mapping
63
- - registration / validation state
64
-
65
- ### Ingest + semantic block extraction
66
- Codebases can be transformed into retrievable structures using:
67
- - file planning
68
- - semantic block extraction
69
- - deterministic file/chunk/symbol IDs
70
- - diff-aware indexing primitives
71
-
72
- ### Incremental reindex
73
- Instead of rebuilding everything blindly, ASM now supports:
74
- - changed / unchanged / deleted diffing
75
- - watch-state snapshotting
76
- - checksum-driven reindex control
77
- - background-friendly trigger flow
78
-
79
- ### Hybrid retrieval + task lineage
80
- ASM is not just vector search anymore.
81
- It can combine:
44
+ ### C. Retrieval/control plane
45
+ Used to assemble better context for coding agents:
82
46
  - semantic recall
83
- - lexical/project filters
84
- - file/symbol/task context
85
- - parent/related/touched lineage context
47
+ - lexical/project filtering
48
+ - file/symbol/task lineage
49
+ - deterministic project-aware retrieval
50
+ - platform install / bootstrap flows
86
51
 
87
- ### Operator onboarding
88
- Operators can onboard a project with repo + alias + Jira mapping + optional index trigger using project-aware command flows.
52
+ If you only remember one sentence, remember this:
89
53
 
90
- ### Setup CLI
91
- OpenClaw setup is now easier through the global CLI:
92
- - `asm setup-openclaw`
93
- - `asm setup openclaw`
94
- - legacy-compatible `npm run init-openclaw`
54
+ > **ASM is a super memory platform for coding agents: conversation memory + project memory + runtime delivery in one package.**
95
55
 
96
56
  ---
97
57
 
98
- ## 3) Scope of this repository
58
+ ## 2) Runtime targets
99
59
 
100
- This repository now spans multiple practical layers.
60
+ ### OpenClaw
61
+ Primary target today.
101
62
 
102
- ### OpenClaw runtime/plugin layer
103
63
  Includes:
104
- - plugin entry
105
- - tool registration
106
- - runtime hooks
107
- - OpenClaw packaging/build flow
108
- - setup/bootstrap CLI flow
64
+ - OpenClaw plugin entry
65
+ - tools / hooks / runtime wiring
66
+ - CLI bootstrap flow
67
+ - shared ASM config integration
109
68
 
110
- ### Shared memory platform layer
111
- Includes:
112
- - SlotDB
113
- - semantic memory use-cases
114
- - graph/registry logic
115
- - shared contracts and runtime abstractions
116
-
117
- ### Project-aware engineering memory layer
118
- Includes:
119
- - project registry
120
- - onboarding use-cases
121
- - tracker mapping
122
- - indexing/reindexing primitives
123
- - lineage-aware retrieval
124
-
125
- So the best mental model is:
126
-
127
- > **an OpenClaw-delivered super memory platform with both conversation memory and project memory**
128
-
129
- ---
130
-
131
- ## 4) Runtime targets
132
-
133
- ### OpenClaw target
134
- Use this when you want ASM as the main OpenClaw memory/runtime plugin.
135
-
136
- Contains:
137
- - core memory platform
138
- - OpenClaw adapter
139
- - plugin entry / hooks / tool registration
140
- - operator onboarding command surfaces
141
-
142
- Artifact intent:
143
- - **OpenClaw plugin artifact**
144
-
145
- ### Paperclip target
146
- Use this when you want Paperclip to consume the same shared memory core/runtime behavior.
147
-
148
- Contains:
149
- - core memory platform
150
- - Paperclip adapter/runtime wrapper
151
- - compatibility mapping
152
-
153
- Artifact intent:
154
- - **Paperclip runtime package**
155
-
156
- ### Core target
157
- Use this when you want the shared contracts/use-cases without OpenClaw/Paperclip-specific delivery.
158
-
159
- Contains:
160
- - shared contracts
161
- - shared use-cases
162
- - shared memory/platform rules
69
+ Install:
70
+ ```bash
71
+ asm install openclaw
72
+ ```
163
73
 
164
- Artifact intent:
165
- - **runtime-agnostic shared memory core**
74
+ ### Paperclip
75
+ Uses the same shared memory core through a Paperclip adapter.
166
76
 
167
- ---
168
-
169
- ## 5) Main capability areas
77
+ Install:
78
+ ```bash
79
+ asm install paperclip
80
+ ```
170
81
 
171
- ### Conversation memory capabilities
172
- - `memory_search`
173
- - `memory_store`
174
- - `memory_slot_get`
175
- - `memory_slot_set`
176
- - `memory_slot_delete`
177
- - `memory_slot_list`
178
- - `memory_graph_*`
179
- - auto-capture / auto-recall
82
+ ### OpenCode
83
+ Uses the same package and shared config, with MCP/local runtime wiring.
180
84
 
181
- ### Project memory capabilities
182
- - `project.register`
183
- - `project.get`
184
- - `project.list`
185
- - `project.link_tracker`
186
- - `project.trigger_index`
187
- - `project.reindex_diff`
188
- - `project.index_watch_get`
189
- - `project.legacy_backfill`
190
- - Telegram/operator onboarding surfaces
191
-
192
- ### Retrieval/engineering context capabilities
193
- - semantic retrieval
194
- - lexical/project filtering
195
- - project-aware context assembly
196
- - file / symbol / task lineage
197
- - repo-aware indexing and reindexing
85
+ Install:
86
+ ```bash
87
+ asm install opencode
88
+ ```
198
89
 
199
90
  ---
200
91
 
201
- ## 6) CLI / setup UX
202
-
203
- The preferred setup path is the global CLI.
92
+ ## 3) Install ASM
204
93
 
205
- ### Install globally
94
+ ### Global install
206
95
  ```bash
207
96
  npm install -g @mrc2204/agent-smart-memo
208
97
  ```
209
98
 
210
- ### Preferred setup flow
99
+ ### Initialize shared ASM config
211
100
  ```bash
212
- asm setup-openclaw
101
+ asm init-setup --yes
213
102
  ```
214
103
 
215
- Also supported:
216
- ```bash
217
- asm setup openclaw
104
+ This creates or updates:
105
+ ```text
106
+ ~/.config/asm/config.json
218
107
  ```
219
108
 
220
- Legacy-compatible flow:
109
+ ### Install into a platform
221
110
  ```bash
222
- npm run init-openclaw
111
+ asm install openclaw
112
+ asm install paperclip
113
+ asm install opencode
223
114
  ```
224
115
 
225
- ### What `asm setup-openclaw` does
226
- 1. checks that `openclaw` CLI exists
227
- 2. installs `@mrc2204/agent-smart-memo` if missing
228
- 3. runs OpenClaw bootstrap/init flow
229
- 4. patches config with preview + backup behavior
230
- 5. prints next-step verification guidance
116
+ Legacy compatibility still exists for older OpenClaw flows, but the preferred path is now:
231
117
 
232
- This is the fastest path for operators who want ASM enabled in OpenClaw without manual config editing first.
118
+ ```text
119
+ asm init-setup -> asm install <platform>
120
+ ```
233
121
 
234
122
  ---
235
123
 
236
- ## 7) Quick start for OpenClaw
124
+ ## 4) Shared config source-of-truth
125
+
126
+ ASM now uses a shared config model.
127
+
128
+ ### Canonical shared config
129
+ ```text
130
+ ~/.config/asm/config.json
131
+ ```
132
+
133
+ ### What lives there
134
+ Core fields such as:
135
+ - `projectWorkspaceRoot`
136
+ - `storage.slotDbDir`
137
+ - `qdrantHost`
138
+ - `qdrantPort`
139
+ - `qdrantCollection`
140
+ - `qdrantVectorSize`
141
+ - `llmBaseUrl`
142
+ - `llmApiKey`
143
+ - `llmModel`
144
+ - `embedBaseUrl`
145
+ - `embedBackend`
146
+ - `embedModel`
147
+ - `embedDimensions`
148
+ - `autoCaptureEnabled`
149
+ - `autoCaptureMinConfidence`
150
+ - `contextWindowMaxTokens`
151
+ - `summarizeEveryActions`
152
+
153
+ ### Platform-local config
154
+ Platform config should stay minimal.
155
+
156
+ For OpenClaw, `~/.openclaw/openclaw.json` should mainly keep:
157
+ - `enabled`
158
+ - `asmConfigPath`
159
+ - adapter-local overrides only when truly needed
160
+
161
+ Example OpenClaw plugin entry:
162
+
163
+ ```json
164
+ {
165
+ "enabled": true,
166
+ "config": {
167
+ "asmConfigPath": "/Users/your-user/.config/asm/config.json",
168
+ "slotDbDir": "/Users/your-user/.openclaw/agent-memo",
169
+ "projectWorkspaceRoot": "/Users/your-user/Work/projects"
170
+ }
171
+ }
172
+ ```
173
+
174
+ This keeps `openclaw.json` from becoming a second core source-of-truth.
175
+
176
+ ---
237
177
 
238
- If your current goal is still “install and run ASM in OpenClaw”, use this section.
178
+ ## 5) OpenClaw quick start
239
179
 
240
- ### Install plugin directly
180
+ ### Install from npm
241
181
  ```bash
242
- openclaw plugins install @mrc2204/agent-smart-memo
182
+ npm install -g @mrc2204/agent-smart-memo
183
+ asm init-setup --yes
184
+ asm install openclaw --yes
243
185
  ```
244
186
 
245
- ### Or install locally from source
187
+ ### Install locally from source
246
188
  ```bash
247
189
  npm install
248
190
  npm run build
249
- openclaw plugins install -l .
191
+ node bin/asm.mjs init-setup --yes
192
+ node bin/asm.mjs install openclaw --yes
250
193
  ```
251
194
 
252
- ### Prerequisites
253
- You typically need:
254
-
255
- | Service | Purpose | Example |
256
- |---|---|---|
257
- | Qdrant | Semantic/vector memory | `docker run -d -p 6333:6333 qdrant/qdrant` |
258
- | Embedding backend | Embeddings for semantic recall | Ollama / OpenAI-compatible / docker adapter |
259
- | LLM endpoint | Fact extraction / auto-capture | OpenAI-compatible API |
260
-
261
- ### Example OpenClaw config
262
- Add to `~/.openclaw/openclaw.json`:
263
-
264
- ```json5
265
- {
266
- plugins: {
267
- allow: ["agent-smart-memo"],
268
- slots: {
269
- memory: "agent-smart-memo"
270
- },
271
- entries: {
272
- "agent-smart-memo": {
273
- enabled: true,
274
- config: {
275
- qdrantHost: "localhost",
276
- qdrantPort: 6333,
277
- qdrantCollection: "openclaw_memory",
278
-
279
- llmBaseUrl: "https://api.openai.com/v1",
280
- llmApiKey: "sk-...",
281
- llmModel: "gpt-4o-mini",
282
-
283
- embedBaseUrl: "http://localhost:11434",
284
- embedBackend: "ollama",
285
- embedModel: "qwen3-embedding:0.6b",
286
- embedDimensions: 1024,
287
-
288
- slotDbDir: "/Users/your-user/.openclaw/agent-memo"
289
- }
290
- }
291
- }
292
- }
293
- }
195
+ ### Verification
196
+ ```bash
197
+ npm run test:asm-cli
198
+ npx tsx tests/test-init-openclaw.ts
199
+ npm run build:openclaw
294
200
  ```
295
201
 
296
202
  ---
297
203
 
298
- ## 8) Project onboarding flow
204
+ ## 6) Project-aware onboarding flow
299
205
 
300
- For project-aware onboarding in OpenClaw/Telegram flows, the current slash command is:
206
+ ASM supports operator-friendly project onboarding.
301
207
 
208
+ ### Telegram/OpenClaw command
302
209
  ```text
303
210
  /project <repo_url>
304
211
  ```
305
212
 
306
- ### Current behavior summary
307
- - onboarding preview exposes resolved `repo_root` when derivable
308
- - preview/commit can report `repo_resolution` and `clone_policy`
309
- - if `repo_url` matches an already-registered remote, registration reuses the existing project identity / `repo_root`
310
- - if `repo_url` is a local path, it is treated as import without `git clone`
311
- - `project.trigger_index` is background-friendly and reports:
312
- - `accepted`
313
- - `enqueued`
314
- - `detached`
315
- - `job_id`
316
-
317
- ### Typical onboarding path
318
- 1. operator starts with `/project <repo_url>`
319
- 2. bot prepares preview
320
- 3. preview shows alias/Jira/index choices and repo resolution hints
321
- 4. operator confirms
322
- 5. flow bridges into:
323
- - `project_register_command`
324
- - `project_link_tracker`
325
- - `project_trigger_index`
326
-
327
- See also:
328
- - `docs/architecture/ASM-74-master-project-registration-ux-command-contract-jira-mapping-v5.1.md`
329
- - `tests/test-project-registry.ts`
213
+ ### Current behavior
214
+ - resolves repo path/identity when possible
215
+ - supports local path import without forced clone
216
+ - can reuse an already-registered remote/project identity
217
+ - can attach Jira mapping
218
+ - can trigger background index flow
330
219
 
331
- ---
220
+ Typical path:
221
+ 1. operator runs `/project <repo_url>`
222
+ 2. preview shows resolved repo + onboarding choices
223
+ 3. operator confirms
224
+ 4. ASM bridges into register / tracker-link / index flow
332
225
 
333
- ## 9) Quick start for Paperclip
226
+ Relevant areas in the repo include:
227
+ - project registry
228
+ - onboarding command flows
229
+ - background indexing hooks
230
+ - lineage-aware retrieval tests
334
231
 
335
- If your goal is to let **Paperclip** consume the same memory core:
232
+ ---
336
233
 
337
- ### Build the Paperclip target
338
- ```bash
339
- npm install
340
- npm run build:paperclip
341
- npm run package:paperclip
342
- npm run pack:paperclip
343
- ```
234
+ ## 7) Capability overview
344
235
 
345
- ### What Paperclip consumes
346
- Paperclip should consume:
347
- - shared core contracts/use-cases
348
- - Paperclip adapter runtime
349
- - no OpenClaw plugin metadata/runtime dependency unless explicitly needed
236
+ ### Memory capabilities
237
+ - `memory_search`
238
+ - `memory_store`
239
+ - `memory_slot_get`
240
+ - `memory_slot_set`
241
+ - `memory_slot_delete`
242
+ - `memory_slot_list`
243
+ - `memory_graph_*`
350
244
 
351
- ### Current maturity
352
- Paperclip path has:
353
- - adapter contracts
354
- - compatibility mapper
355
- - runtime wrapper
356
- - production-like smoke verification
245
+ ### Project capabilities
246
+ - project register / list / inspect flows
247
+ - project tracker linking
248
+ - project indexing / reindexing
249
+ - lifecycle-aware retrieval gating
250
+ - hybrid lineage context retrieval
357
251
 
358
- But README intentionally does **not** overclaim this as full production-grade multi-runtime completion.
252
+ ### Platform/operations capabilities
253
+ - shared config bootstrap
254
+ - OpenClaw install flow
255
+ - Paperclip install flow
256
+ - OpenCode install flow
257
+ - build/package/publish targets
359
258
 
360
259
  ---
361
260
 
362
- ## 10) Build targets
261
+ ## 8) Build targets
363
262
 
364
263
  ### Default build
365
264
  ```bash
366
265
  npm run build
367
266
  ```
368
267
 
369
- Default build remains **OpenClaw-compatible** for backward compatibility.
370
-
371
268
  ### Explicit targets
372
269
  ```bash
373
270
  npm run build:openclaw
@@ -390,141 +287,78 @@ npm run pack:paperclip
390
287
  npm run pack:core
391
288
  ```
392
289
 
393
- ### Publish targets
394
- ```bash
395
- npm run publish:openclaw
396
- npm run publish:paperclip
397
- npm run publish:core
398
- ```
399
-
400
- > Publish requires valid npm authentication. If `NPM_TOKEN` is missing, publish should be treated as not ready / dry-run only.
401
-
402
290
  ---
403
291
 
404
- ## 11) CI/CD model
405
-
406
- GitHub Actions workflow: `.github/workflows/publish.yml`
407
-
408
- Current flow:
409
- - matrix build for `openclaw`, `paperclip`, `core`
410
- - build → package → pack `.tgz` → upload artifact
411
- - target-aware tests
412
- - `workflow_dispatch` for manual publish
413
- - `dry_run` supported
414
- - real publish gated by `NPM_TOKEN`
292
+ ## 9) Verification
415
293
 
416
- ### Important distinction
417
- A `work/...` branch is for:
418
- - CI checks
419
- - PR review
420
- - dry-run readiness
421
-
422
- It is **not** the same as:
423
- - production deploy
424
- - final release approval
425
- - final npm publish approval
426
-
427
- Recommended flow:
428
-
429
- ```text
430
- work/... push -> CI checks -> PR review -> approve -> merge default branch -> publish/release/deploy
294
+ ### CLI / installer verification
295
+ ```bash
296
+ npm run test:asm-cli
297
+ npx tsx tests/test-init-openclaw.ts
431
298
  ```
432
299
 
433
- ---
434
-
435
- ## 12) Configuration notes
436
-
437
- ### Embedding backend mapping
438
- When `embedBackend` is set:
439
- - `ollama` → `/api/embeddings`
440
- - `docker` → `/engines/llama.cpp/v1/embeddings`
441
- - `openai` → `/v1/embeddings`
442
-
443
- If omitted, legacy auto behavior is preserved.
444
-
445
- ### SlotDB path resolution
446
- Resolution order:
447
- 1. `OPENCLAW_SLOTDB_DIR`
448
- 2. plugin config `slotDbDir`
449
- 3. `${OPENCLAW_STATE_DIR}/agent-memo`
450
-
451
- ---
452
-
453
- ## 13) Verification levels
454
-
455
- ### Build level
456
- Confirms code compiles:
457
-
300
+ ### OpenClaw verification
458
301
  ```bash
459
- npm run build
460
- npm run build:all
302
+ npm run test:openclaw
303
+ npm run build:openclaw
461
304
  ```
462
305
 
463
- ### Contract / integration level
306
+ ### Paperclip verification
464
307
  ```bash
465
- npm test
466
- npm run test:openclaw
467
308
  npm run test:paperclip
309
+ npm run build:paperclip
468
310
  ```
469
311
 
470
312
  ### Project-aware targeted verification
471
313
  ```bash
472
314
  npx tsx tests/test-project-registry.ts
473
- npx tsx tests/test-project-reindex-diff.ts
474
315
  npx tsx tests/test-project-hybrid-lineage.ts
475
- npx tsx tests/test-project-legacy-backfill.ts
476
316
  ```
477
317
 
478
- ### Production-like runtime verification
479
- Examples already added in this repo include:
480
- - Paperclip runtime E2E
481
- - OpenClaw anti-regression integration
482
- - production-like smoke parity harness
483
-
484
318
  ---
485
319
 
486
- ## 14) Repository layout (high level)
320
+ ## 10) Repository layout
487
321
 
488
322
  ```text
489
323
  src/
324
+ adapters/
325
+ openclaw/
326
+ paperclip/
490
327
  core/
491
328
  contracts/
492
329
  usecases/
493
330
  ingest/
494
- adapters/
495
- openclaw/
496
- paperclip/
497
- tools/
331
+ db/
498
332
  hooks/
499
- entries/
500
333
  services/
501
- db/
502
334
  shared/
335
+ tools/
503
336
 
337
+ bin/
504
338
  scripts/
339
+ docs/
505
340
  artifacts/
506
- docs/architecture/
341
+ tests/
507
342
  ```
508
343
 
509
344
  ---
510
345
 
511
- ## 15) Current mental model
346
+ ## 11) Current positioning
512
347
 
513
- If you only remember one thing, remember this:
348
+ A good public-facing description for this repo is:
514
349
 
515
- > **ASM v5.1 is a super memory platform for agents: conversation memory + project memory + retrieval/control-plane capabilities.**
350
+ > **Agent Smart Memo is a project-aware super memory platform for coding agents, shipped as one package with CLI-first installation for OpenClaw, Paperclip, and OpenCode.**
516
351
 
517
352
  It helps agents:
518
- - remember ongoing runtime/conversation context
519
- - store/retrieve structured and semantic knowledge
520
- - register and map projects
353
+ - remember conversation/runtime state
354
+ - store and retrieve structured + semantic knowledge
355
+ - onboard and map projects
521
356
  - index and reindex repos
522
- - retrieve engineering context with lineage
523
- - onboard projects with operator-friendly flows
524
- - bootstrap OpenClaw faster through the CLI
357
+ - assemble better engineering context
358
+ - reuse one shared config and one shared memory core across runtimes
525
359
 
526
360
  ---
527
361
 
528
- ## 16) License
362
+ ## 12) License
529
363
 
530
364
  MIT © [mrc2204](https://github.com/cong91)