@vib795/agent-memory 0.7.3 → 0.7.5

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
@@ -440,7 +440,7 @@ equivalent and is not: npm links the global install to that folder rather than c
440
440
  it, which shows up as an arrow in `npm list -g`:
441
441
 
442
442
  ```
443
- `-- @vib795/agent-memory@0.6.5 -> .\..\..\..\agent-memory
443
+ `-- @vib795/agent-memory@0.7.5 -> .\..\..\..\agent-memory
444
444
  ```
445
445
 
446
446
  Move or delete the clone afterwards and the global install points at nothing — the same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vib795/agent-memory",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Durable cross-repo knowledge graph for GitHub Copilot and Claude Code. Markdown source of truth, disposable SQLite index, zero runtime dependencies.",
5
5
  "keywords": [
6
6
  "github-copilot",
@@ -26,6 +26,22 @@ Every extra request costs the user credits, which is the reason this skill exist
26
26
 
27
27
  ---
28
28
 
29
+ ## Scope
30
+
31
+ Bare `/handoff`: you decide what the working state is.
32
+
33
+ `/handoff <focus>` — "just the auth work", "the migration, skip the CI detour" — names
34
+ which thread of a braided conversation to carry forward. Treat it as a filter on Step 2
35
+ and Step 3, not as a title. Work outside that focus stays out of Orientation, Decisions
36
+ and Current task state even when it was the more recent work: a long conversation
37
+ usually holds more than one thread, and carrying both is how a handoff becomes the
38
+ transcript summary this skill exists to avoid.
39
+
40
+ If the focus names a thread you cannot find in the conversation, say so in one line and
41
+ hand off what you did find. Do not invent a thread to match the words.
42
+
43
+ ---
44
+
29
45
  ## Step 0 — Resolve the store path
30
46
 
31
47
  | Platform | Store |
@@ -59,6 +59,10 @@ are the router. There is no keyword matching underneath this and there should no
59
59
  be: a title is a sentence, and matching sentences to a question is what you do well
60
60
  and what a regex does badly.
61
61
 
62
+ When the user typed `/recall <topic>`, `<topic>` is the question. Route on it, and carry
63
+ it into Step 5 — a cold `/recall deploy ordering` is someone asking what the store knows
64
+ about deploy ordering, not asking for a tour of the store.
65
+
62
66
  - Pick 1 to 3 ids. More than 3 means the question is really several questions.
63
67
  - Always include a `constraint` that touches the subject, even when the user did not
64
68
  ask about limits. Constraints are what stop an approach that cannot ship.
@@ -115,7 +119,10 @@ Rules that separate a useful recall from a confident wrong one:
115
119
  right now, trust the repository, say which note is wrong, and suggest
116
120
  `/remember` to correct it. A store that quietly rots is worse than no store.
117
121
  4. **Never present an `inferred` note as established.** The note says which it is.
118
- 5. Answer the question. Do not summarize the store.
122
+ 5. **Answer the question.** An explicit `/recall <topic>` is the target whenever one
123
+ was given, and it wins over a different question already in the conversation —
124
+ the user narrowed it on purpose. Fall back to the conversation's own question only
125
+ for a bare `/recall`. Either way, do not summarize the store.
119
126
 
120
127
  ---
121
128
 
@@ -107,6 +107,13 @@ Skip this step only when the user named exactly what to write and it is plainly
107
107
 
108
108
  ## Step 1 — Select what is durable
109
109
 
110
+ When the user typed `/remember <what>`, `<what>` is both a filter and a mandate: select
111
+ only what bears on it, and select that even if you would otherwise have ranked something
112
+ else higher. It does not suspend the durability test below. If the named thing is task
113
+ state, write nothing and say so in one line — `that reads as task state, not durable;
114
+ nothing written`. Writing nothing *silently* after an explicit request is the failure
115
+ that matters here, because the user leaves believing it was captured.
116
+
110
117
  <!-- extraction-rules:start -->
111
118
  - A node is durable only if it will still be true next month. Task state is not
112
119
  durable and belongs in a handoff file, not in the graph.
package/src/digest.js CHANGED
@@ -3,22 +3,25 @@ import { createHash } from 'node:crypto';
3
3
  import { captureGap, currentRepo } from './staleness.js';
4
4
 
5
5
  /**
6
- * Two-tier routing.
6
+ * Tiers 1 and 2 of a three-tier ladder.
7
7
  *
8
- * Tier 1 is the `recall` skill's description, which is loaded into every chat
9
- * whether or not memory is ever used. It is standing cost, so it has to read like
10
- * a description rather than a document.
8
+ * Tier 1 is a skill description, loaded into every chat whether or not memory is ever
9
+ * used. It is standing cost, so it has to read like a description rather than a
10
+ * document. It has two occupants, not one: `recall`'s description advertises what the
11
+ * store knows; `remember`'s advertises what it is missing. Both are the same mechanism
12
+ * — a line of frontmatter that code regenerates and every conversation loads —
13
+ * pointed at opposite halves of the same problem.
11
14
  *
12
- * Tier 2 is the tree, printed only when `recall` actually fires. Per-invocation
13
- * cost, paid once, and only when someone is already looking something up.
15
+ * Tier 2 is printed only when a skill actually fires: the tree for `recall`, the
16
+ * capture brief for `remember`. Per-invocation cost, paid once, and only when someone
17
+ * is already looking something up or about to write one down.
14
18
  *
15
- * Neither tier costs a premium request. A request is charged per prompt, not per
16
- * tool call, so both of these ride inside a turn that was already paid for.
19
+ * Tier 3 — note bodies, and the colliding note that `write` hands back — lives
20
+ * outside this module, because by then the question is which note rather than which
21
+ * of them.
17
22
  *
18
- * Tier 1 has two occupants, not one. `recall`'s description advertises what the store
19
- * knows; `remember`'s advertises what it is missing. Both are the same mechanism — a
20
- * line of frontmatter that code regenerates and every conversation loads — pointed at
21
- * opposite halves of the same problem.
23
+ * Neither tier here costs a premium request. A request is charged per prompt, not per
24
+ * tool call, so both of these ride inside a turn that was already paid for.
22
25
  */
23
26
 
24
27
  // Never dropped from either tier. A constraint is what stops an agent from burning