@ainyc/canonry 2.0.0 → 2.2.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.
- package/assets/agent-workspace/skills/aero/references/memory-patterns.md +37 -18
- package/assets/assets/{index-DnlDoqE-.js → index-J73csS93.js} +75 -75
- package/assets/index.html +1 -1
- package/dist/{chunk-YZKLIUH4.js → chunk-2QNWFP6R.js} +567 -35
- package/dist/{chunk-GH6WGN5B.js → chunk-TAII35VC.js} +29 -1
- package/dist/cli.js +130 -3
- package/dist/index.js +2 -2
- package/dist/{intelligence-service-LHWXONQJ.js → intelligence-service-C5LAYDFM.js} +1 -1
- package/package.json +7 -7
|
@@ -1,47 +1,66 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memory-patterns
|
|
3
|
-
description:
|
|
3
|
+
description: When to remember vs. re-query — project state lives in canonry, only durable user-scoped facts go in Aero memory. Read when unsure whether to call remember or look up.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Memory Patterns
|
|
7
7
|
|
|
8
|
-
Canonry is the source of truth for project state. Do **not** maintain a parallel copy of project facts in
|
|
8
|
+
Canonry is the source of truth for project state. Do **not** maintain a parallel copy of project facts in Aero memory — it will drift from the DB and mislead the next session.
|
|
9
|
+
|
|
10
|
+
Aero now ships with a built-in durable notes store — the `remember`, `forget`, and `recall` tools — backed by the `agent_memory` table. The N most-recently-updated notes are injected into the system prompt at every session start, so you usually see relevant memory without calling `recall`.
|
|
9
11
|
|
|
10
12
|
## What belongs where
|
|
11
13
|
|
|
12
14
|
| Scope | Examples | Home |
|
|
13
15
|
|---|---|---|
|
|
14
|
-
| **Project state** | Baselines, historical regressions, citation rates per keyword/provider, recent insights, sweep history, audit trail | Canonry DB — query via CLI / API |
|
|
15
|
-
| **
|
|
16
|
-
| **Session scratch** | "I just tried X and it failed", intermediate reasoning |
|
|
16
|
+
| **Project state** | Baselines, historical regressions, citation rates per keyword/provider, recent insights, sweep history, audit trail | Canonry DB — query via CLI / API / read tools |
|
|
17
|
+
| **Operator facts** | Personal preferences, non-observable context ("content lead is Sarah", "migrating off Webflow next quarter"), tone/voice preferences the operator confirmed | Aero memory (`remember`) |
|
|
18
|
+
| **Session scratch** | "I just tried X and it failed", intermediate reasoning, turn-local state | Nowhere — let it die with the session |
|
|
17
19
|
|
|
18
20
|
## How to read project state from canonry
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Prefer Aero's read tools (`get_status`, `get_health`, `get_timeline`, `get_insights`, `list_keywords`, `list_competitors`, `get_run`) over shelling out, but the CLI exists for operators too:
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
# Current health + latest run summary
|
|
24
25
|
canonry status <project> --format json
|
|
25
26
|
canonry health <project> --format json
|
|
26
|
-
|
|
27
|
-
# Historical trend
|
|
28
27
|
canonry timeline <project> --since <YYYY-MM-DD> --format json
|
|
29
|
-
canonry history <project> --format json
|
|
30
|
-
|
|
31
|
-
# Insights already surfaced (don't regenerate — query)
|
|
32
28
|
canonry insights <project> --format json
|
|
33
|
-
|
|
34
|
-
# Raw evidence from the most recent sweep
|
|
35
29
|
canonry evidence <project> --format json
|
|
36
|
-
|
|
37
|
-
# Audit log — who changed what and when
|
|
38
30
|
canonry audit <project> --format json
|
|
39
31
|
```
|
|
40
32
|
|
|
41
|
-
If the data you need isn't reachable with a single CLI call, that's a bug in canonry's API surface — file it rather than working around it in memory.
|
|
33
|
+
If the data you need isn't reachable with a single read tool or CLI call, that's a bug in canonry's API surface — file it rather than working around it in memory.
|
|
42
34
|
|
|
43
35
|
## Regenerate, don't remember
|
|
44
36
|
|
|
45
37
|
Derived interpretations (trend summaries, correlations between events) are cheap to recompute from the underlying DB rows. Prefer running the analysis again on fresh data over recalling what you concluded last session — conclusions age, the data doesn't.
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
## Using `remember` / `forget` / `recall`
|
|
40
|
+
|
|
41
|
+
- `remember(key, value)` — upsert a project-scoped note. Capped at 2 KB per value. Same key replaces the prior value, so use stable keys (e.g. `operator-pref.reporting-tone`, not `note-2026-04-17`).
|
|
42
|
+
- `forget(key)` — remove a single note. Returns `status: missing` when the key never existed (non-fatal).
|
|
43
|
+
- `recall(limit?)` — read notes newest-first. Usually unnecessary — the top 20 are already in the system prompt under `<memory>`. Reach for it when you need older context or the full value of a note that's been summarized.
|
|
44
|
+
|
|
45
|
+
**Reserved prefix.** Keys starting with `compaction:` are reserved for LLM-summarized transcript slices. `remember` and `forget` both reject them. Compaction notes are pruned automatically — you can `recall` them but never write or delete them by hand.
|
|
46
|
+
|
|
47
|
+
**CLI parity.** Operators can manage memory without talking to you:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
canonry agent memory list <project> --format json
|
|
51
|
+
canonry agent memory set <project> --key <k> --value <v>
|
|
52
|
+
canonry agent memory forget <project> --key <k>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Good remember candidates
|
|
56
|
+
|
|
57
|
+
- Operator-confirmed facts canonry can't observe (team names, migration plans, vendor lock-in, upcoming content bets).
|
|
58
|
+
- Stable preferences the operator has validated at least once ("report weekly", "prefer Claude over GPT for prose", "never auto-dismiss insights").
|
|
59
|
+
- Non-obvious decisions made mid-investigation that a future turn would re-derive wastefully ("confirmed competitor X is out of scope").
|
|
60
|
+
|
|
61
|
+
## Bad remember candidates
|
|
62
|
+
|
|
63
|
+
- Anything canonry already tracks (runs, insights, citation rates, schedules). Query it.
|
|
64
|
+
- Turn-local state that's useful for one follow-up and then noise ("user just asked about keyword Y").
|
|
65
|
+
- Raw evidence or long transcripts — persist a conclusion, not a dump.
|
|
66
|
+
- Unvalidated guesses. Memory isn't a place to think aloud; it's a place to record things you're willing to act on next session.
|