threadnote 0.3.5 → 0.3.7

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.
@@ -36,8 +36,30 @@ logs, or other sensitive data.
36
36
  Also remember durable workflow facts you discover during work when they would help future agents and are not already in
37
37
  canonical docs. Prefer updating checked-in docs for canonical repo rules.
38
38
 
39
+ Use lifecycle metadata when storing memories:
40
+
41
+ - `kind: durable` for facts future agents should use by default.
42
+ - `kind: handoff` for current work logs and next steps.
43
+ - `project` for the repo/product namespace.
44
+ - `topic` for the active issue or stable fact. Reusing the same project/topic keeps one current memory updated.
45
+
46
+ Archived handoffs are provenance, not default working context. Read them only when current durable memories or active
47
+ handoffs are insufficient.
48
+
39
49
  ## Memory Compaction
40
50
 
51
+ When working on the same active issue, prefer keeping one current-state memory updated instead of creating many small
52
+ progress memories. If an existing memory is clearly the current state for the issue, store the updated version with
53
+ `remember_context({"text":"...","replaceUri":"<uri>"})`, `threadnote remember --replace <uri>`, or
54
+ `threadnote handoff --replace <uri>` so the old memory is removed only after the replacement is stored.
55
+
56
+ When the issue has a stable name, prefer project/topic storage over timestamped memories:
57
+
58
+ ```bash
59
+ threadnote remember --kind durable --project my-repo --topic test-workflow --text "..."
60
+ threadnote handoff --project my-repo --topic active-bug --task "..." --tests "..."
61
+ ```
62
+
41
63
  When recall/read surfaces several memories that describe the same durable fact, incident, branch, or handoff, compact
42
64
  them when it is safe:
43
65
 
@@ -45,6 +67,8 @@ them when it is safe:
45
67
  URIs you merged.
46
68
  - Remove superseded duplicates with `threadnote forget <uri>` only when they are clearly redundant or stale and contain
47
69
  no unique useful detail.
70
+ - Use `threadnote archive <uri>` instead of `forget` when the old handoff still has provenance value but should no
71
+ longer be treated as current context.
48
72
  - If the memories disagree or you are not sure what can be deleted, keep them and mention the possible cleanup instead.
49
73
 
50
74
  Never compact secrets, credentials, customer data, raw production logs, or checked-in canonical docs into memory.
@@ -71,7 +95,9 @@ threadnote start
71
95
  threadnote recall --query "last handoff for this branch"
72
96
  threadnote read viking://agent/threadnote/memories/.abstract.md
73
97
  threadnote list viking://agent/threadnote/memories --all --recursive
74
- threadnote remember --text "Durable engineering note..."
98
+ threadnote remember --kind durable --project example --topic workflow --text "Durable engineering note..."
99
+ threadnote remember --replace viking://user/example/memories/durable/projects/example/workflow.md --text "Updated durable engineering note..."
100
+ threadnote archive viking://user/example/memories/handoffs/active/example/old-issue.md
75
101
  threadnote forget viking://user/example/memories/events/duplicate.md
76
- threadnote handoff --task "short task summary" --tests "checks run" --next-step "what to do next"
102
+ threadnote handoff --project example --topic active-issue --task "short task summary" --tests "checks run" --next-step "what to do next"
77
103
  ```
package/docs/migration.md CHANGED
@@ -170,6 +170,8 @@ Preferred agent behavior is automatic after `threadnote install` has updated the
170
170
 
171
171
  - On non-trivial task start, search OpenViking for recent handoffs and relevant repo guidance.
172
172
  - When the user says "remember", store the memory after checking that it contains no secret or customer data.
173
+ - When continuing the same active issue, update the current-state memory with `remember --replace <uri>` or
174
+ `handoff --replace <uri>` instead of creating another near-duplicate progress memory.
173
175
  - When recall surfaces clearly duplicate or stale memories, store one concise replacement memory and forget only the
174
176
  redundant originals.
175
177
  - Before pausing, switching agents, or finishing meaningful code changes, store a concise handoff with status, tests,
@@ -180,6 +182,7 @@ Manual CLI remains available for scripts and emergencies:
180
182
  ```bash
181
183
  threadnote recall --query "last handoff for this branch"
182
184
  threadnote remember --text "Durable engineering note..."
185
+ threadnote remember --replace viking://user/example/memories/events/current.md --text "Updated durable engineering note..."
183
186
  threadnote handoff --task "short task summary" --tests "checks run" --next-step "what the next agent should do"
184
187
  ```
185
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "threadnote",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "type": "commonjs",
5
5
  "main": "dist/threadnote.cjs",
6
6
  "description": "Shared local context and handoffs for development agents",