threadnote 0.3.6 → 0.3.8

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.
@@ -1,6 +1,6 @@
1
1
  # Agent Instructions
2
2
 
3
- Threadnote installs this as user-level agent guidance for Codex, Claude, and Cursor.
3
+ Threadnote installs this as user-level agent guidance for Codex, Claude, Cursor, and Copilot.
4
4
 
5
5
  ## Shared Context
6
6
 
@@ -20,9 +20,14 @@ At the start of a non-trivial task, recall relevant context before making change
20
20
 
21
21
  - the current repo and branch;
22
22
  - recent handoffs;
23
+ - durable feature memories for the branch, feature name, project/topic, or issue;
23
24
  - task-specific skills or workflow guidance;
24
25
  - user or team preferences that may affect the work.
25
26
 
27
+ When a recalled handoff describes an active branch or feature, do a second recall for durable memories about that
28
+ feature before coding. The handoff tells you the current work state; durable feature memories tell you the design,
29
+ decisions, invariants, interfaces, and gotchas that should survive beyond one session.
30
+
26
31
  Skip proactive recall for tiny one-shot questions where context would add noise.
27
32
 
28
33
  Search results are not the final payload. Treat returned `viking://` URIs as pointers: read the relevant URI, or list a
@@ -36,6 +41,30 @@ logs, or other sensitive data.
36
41
  Also remember durable workflow facts you discover during work when they would help future agents and are not already in
37
42
  canonical docs. Prefer updating checked-in docs for canonical repo rules.
38
43
 
44
+ During feature work on a branch, maintain durable feature knowledge in addition to handoffs. Store or update a durable
45
+ memory when you learn something future agents should know about the feature itself: the intended behavior, design
46
+ decisions, API contracts, data flow, migration semantics, edge cases, known limitations, or why an implementation choice
47
+ was made. Do not wait until the end of the branch; update the feature memory whenever a valuable change lands or a
48
+ decision becomes clear.
49
+
50
+ Use lifecycle metadata when storing memories:
51
+
52
+ - `kind: durable` for facts future agents should use by default.
53
+ - `kind: handoff` for current work logs and next steps.
54
+ - `project` for the repo/product namespace.
55
+ - `topic` for the active issue or stable fact. Reusing the same project/topic keeps one current memory updated.
56
+
57
+ Archived handoffs are provenance, not default working context. Read them only when current durable memories or active
58
+ handoffs are insufficient.
59
+
60
+ For branch feature work, prefer two stable memories with the same project and topic:
61
+
62
+ - `kind: durable` for the feature knowledge that should remain useful after the current agent session.
63
+ - `kind: handoff` for current status, files touched, tests, blockers, and next step.
64
+
65
+ If a durable feature memory already exists, update it in place with the same project/topic or with `--replace <uri>` /
66
+ `replaceUri`. Avoid creating a new timestamped durable memory for every small progress note.
67
+
39
68
  ## Memory Compaction
40
69
 
41
70
  When working on the same active issue, prefer keeping one current-state memory updated instead of creating many small
@@ -43,6 +72,14 @@ progress memories. If an existing memory is clearly the current state for the is
43
72
  `remember_context({"text":"...","replaceUri":"<uri>"})`, `threadnote remember --replace <uri>`, or
44
73
  `threadnote handoff --replace <uri>` so the old memory is removed only after the replacement is stored.
45
74
 
75
+ When the issue has a stable name, prefer project/topic storage over timestamped memories:
76
+
77
+ ```bash
78
+ threadnote recall --query "my-repo active-bug durable feature knowledge"
79
+ threadnote remember --kind durable --project my-repo --topic active-bug --text "Feature knowledge: ..."
80
+ threadnote handoff --project my-repo --topic active-bug --task "..." --tests "..."
81
+ ```
82
+
46
83
  When recall/read surfaces several memories that describe the same durable fact, incident, branch, or handoff, compact
47
84
  them when it is safe:
48
85
 
@@ -50,6 +87,8 @@ them when it is safe:
50
87
  URIs you merged.
51
88
  - Remove superseded duplicates with `threadnote forget <uri>` only when they are clearly redundant or stale and contain
52
89
  no unique useful detail.
90
+ - Use `threadnote archive <uri>` instead of `forget` when the old handoff still has provenance value but should no
91
+ longer be treated as current context.
53
92
  - If the memories disagree or you are not sure what can be deleted, keep them and mention the possible cleanup instead.
54
93
 
55
94
  Never compact secrets, credentials, customer data, raw production logs, or checked-in canonical docs into memory.
@@ -59,6 +98,7 @@ Never compact secrets, credentials, customer data, raw production logs, or check
59
98
  Before pausing, switching agents, or ending meaningful work with local changes, store a concise handoff. Include:
60
99
 
61
100
  - repo and branch;
101
+ - related durable feature memory URI or topic, when known;
62
102
  - files touched;
63
103
  - current status;
64
104
  - tests or checks run;
@@ -74,10 +114,13 @@ Use these only when MCP tools are not available:
74
114
  ```bash
75
115
  threadnote start
76
116
  threadnote recall --query "last handoff for this branch"
117
+ threadnote recall --query "durable feature knowledge for this branch"
77
118
  threadnote read viking://agent/threadnote/memories/.abstract.md
78
119
  threadnote list viking://agent/threadnote/memories --all --recursive
79
- threadnote remember --text "Durable engineering note..."
80
- threadnote remember --replace viking://user/example/memories/events/current.md --text "Updated durable engineering note..."
120
+ threadnote remember --kind durable --project example --topic workflow --text "Durable engineering note..."
121
+ threadnote remember --kind durable --project example --topic active-issue --text "Feature knowledge..."
122
+ threadnote remember --replace viking://user/example/memories/durable/projects/example/workflow.md --text "Updated durable engineering note..."
123
+ threadnote archive viking://user/example/memories/handoffs/active/example/old-issue.md
81
124
  threadnote forget viking://user/example/memories/events/duplicate.md
82
- threadnote handoff --task "short task summary" --tests "checks run" --next-step "what to do next"
125
+ threadnote handoff --project example --topic active-issue --task "short task summary" --tests "checks run" --next-step "what to do next"
83
126
  ```
package/docs/migration.md CHANGED
@@ -30,8 +30,8 @@ Developers should not need to run `recall`, `remember`, or `handoff` as a normal
30
30
 
31
31
  The intended workflow has three layers:
32
32
 
33
- - Agent-first: Codex, Claude, or another MCP-enabled agent calls OpenViking tools when the task calls for shared
34
- context.
33
+ - Agent-first: Codex, Claude, Copilot, or another MCP-enabled agent calls OpenViking tools when the task calls for
34
+ shared context.
35
35
  - Short CLI fallback: humans and scripts can run `threadnote recall`, `threadnote remember`, or
36
36
  `threadnote handoff` from any repo.
37
37
  - Checkout-local command: `npm run threadnote -- ...` is the bootstrap and debugging path before the short command shim
@@ -46,8 +46,8 @@ Create a handoff for the next agent before you stop.
46
46
  ```
47
47
 
48
48
  For better continuity, run `threadnote install` so it can add the agent-side guidance from `docs/agent-instructions.md`
49
- to user-level Codex, Claude, and Cursor instruction files. That guidance tells agents to recall context at task start,
50
- store durable memories when explicitly asked or when a reusable workflow fact is learned, and create handoffs
49
+ to user-level Codex, Claude, Cursor, and Copilot instruction files. That guidance tells agents to recall context at task
50
+ start, store durable memories when explicitly asked or when a reusable workflow fact is learned, and create handoffs
51
51
  automatically before stopping meaningful work.
52
52
 
53
53
  ## Migration Steps
@@ -141,6 +141,16 @@ paths.
141
141
 
142
142
  Cursor installs by updating the global `~/.cursor/mcp.json` file.
143
143
 
144
+ For GitHub Copilot in VS Code:
145
+
146
+ ```bash
147
+ threadnote mcp-install copilot
148
+ threadnote mcp-install copilot --apply
149
+ ```
150
+
151
+ Copilot installs by updating the VS Code user-profile `mcp.json` file. If VS Code uses a custom profile path, set
152
+ `THREADNOTE_COPILOT_MCP_CONFIG` to that `mcp.json` path before running `mcp-install copilot`.
153
+
144
154
  Later, if the checkout that installed the MCP adapter is deleted or moved, repair it from any fresh checkout:
145
155
 
146
156
  ```bash
@@ -162,16 +172,21 @@ Preferred developer behavior is conversational:
162
172
 
163
173
  ```text
164
174
  Recall anything relevant for this branch before you start.
165
- Remember this workflow note for future agents: ...
175
+ Remember this feature decision for future agents: ...
166
176
  Create a handoff now.
167
177
  ```
168
178
 
169
179
  Preferred agent behavior is automatic after `threadnote install` has updated the user-level instruction files:
170
180
 
171
- - On non-trivial task start, search OpenViking for recent handoffs and relevant repo guidance.
181
+ - On non-trivial task start, search OpenViking for recent handoffs, durable feature memories for the branch/topic, and
182
+ relevant repo guidance.
172
183
  - 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.
184
+ - When continuing the same active issue, keep two current-state records when useful: a durable feature memory for design,
185
+ decisions, interfaces, and gotchas, plus a handoff for status, tests, blockers, and next steps.
186
+ - When valuable feature knowledge changes, update the durable feature memory with the same project/topic or
187
+ `remember --replace <uri>` instead of burying that knowledge only in a handoff.
188
+ - When current status changes, update the active handoff with the same project/topic or `handoff --replace <uri>` instead
189
+ of creating another near-duplicate progress memory.
175
190
  - When recall surfaces clearly duplicate or stale memories, store one concise replacement memory and forget only the
176
191
  redundant originals.
177
192
  - Before pausing, switching agents, or finishing meaningful code changes, store a concise handoff with status, tests,
@@ -181,9 +196,10 @@ Manual CLI remains available for scripts and emergencies:
181
196
 
182
197
  ```bash
183
198
  threadnote recall --query "last handoff for this branch"
184
- threadnote remember --text "Durable engineering note..."
199
+ threadnote recall --query "durable feature knowledge for this branch"
200
+ threadnote remember --kind durable --project example --topic active-feature --text "Feature knowledge..."
185
201
  threadnote remember --replace viking://user/example/memories/events/current.md --text "Updated durable engineering note..."
186
- threadnote handoff --task "short task summary" --tests "checks run" --next-step "what the next agent should do"
202
+ threadnote handoff --project example --topic active-feature --task "short task summary" --tests "checks run" --next-step "what the next agent should do"
187
203
  ```
188
204
 
189
205
  ## Repo Paths
package/docs/rollout.md CHANGED
@@ -18,7 +18,7 @@ Start with a local-only pilot.
18
18
 
19
19
  - Install completes in under 10 minutes after prerequisites.
20
20
  - `doctor` reports clear actionable checks.
21
- - Codex, Claude, or Cursor can store and recall a shared handoff after MCP setup.
21
+ - Codex, Claude, Cursor, or Copilot can store and recall a shared handoff after MCP setup.
22
22
  - Seeding curated guidance does not import known secret patterns.
23
23
  - Fresh agents can recall repo testing guidance and discover relevant skills.
24
24
  - `uninstall --dry-run` previews removal, and `uninstall` leaves memories intact unless `--erase-memories` is explicit.
package/docs/security.md CHANGED
@@ -6,7 +6,8 @@
6
6
 
7
7
  - Credentials, access tokens, API keys, certificates, private keys, or shell history.
8
8
  - Customer data, production data, HIPAA data, or production logs without explicit approval and scrubbing.
9
- - Local auth files such as `~/.codex/auth.json`, `~/.claude/.credentials.json`, or Cursor account/session files.
9
+ - Local auth files such as `~/.codex/auth.json`, `~/.claude/.credentials.json`, Cursor account/session files, or VS Code
10
+ Copilot account/session files.
10
11
  - Local settings files that may contain secrets unless they go through redaction.
11
12
 
12
13
  ## Built-In Controls
@@ -14,9 +15,9 @@
14
15
  - `.threadnoteignore` excludes common secret and build-output paths.
15
16
  - `.mcp.json`, `config.toml`, and settings JSON are redacted before import.
16
17
  - Files are skipped if common secret patterns remain after redaction.
17
- - `mcp-install` requires `--apply` before it changes Codex, Claude, or Cursor config.
18
- - `install` updates user-level Codex, Claude, and Cursor instruction files through a managed Markdown block. Existing
19
- personal instructions outside that block are preserved.
18
+ - `mcp-install` requires `--apply` before it changes Codex, Claude, Cursor, or Copilot config.
19
+ - `install` updates user-level Codex, Claude, Cursor, and Copilot instruction files through managed Threadnote content.
20
+ Existing personal instructions outside managed blocks are preserved.
20
21
  - `uninstall` preserves local memories by default. `--erase-memories` is required before deleting `THREADNOTE_HOME`.
21
22
  - Config files created under `THREADNOTE_HOME` are written with user-only permissions.
22
23
 
@@ -147,7 +147,7 @@ threadnote repair
147
147
  ```
148
148
 
149
149
  `repair` reinstalls the `threadnote` shim, repairs generated config files, starts OpenViking if needed, and rewrites
150
- Codex/Claude/Cursor MCP configs to point at the current checkout.
150
+ Codex/Claude/Cursor/Copilot MCP configs to point at the current checkout.
151
151
 
152
152
  ## MCP Install Is Only Printing Commands
153
153
 
@@ -166,6 +166,16 @@ threadnote mcp-install cursor --apply
166
166
  This updates the global `~/.cursor/mcp.json` file. Restart Cursor or open a fresh agent session after changing MCP
167
167
  config.
168
168
 
169
+ For GitHub Copilot in VS Code:
170
+
171
+ ```bash
172
+ threadnote mcp-install copilot --apply
173
+ ```
174
+
175
+ This updates the VS Code user-profile `mcp.json` file. Restart VS Code or run `MCP: List Servers` from the Command
176
+ Palette after changing MCP config. If VS Code uses a custom profile path, set `THREADNOTE_COPILOT_MCP_CONFIG` to that
177
+ `mcp.json` path before running the command.
178
+
169
179
  ## Cursor MCP Tool Says Query Is Missing
170
180
 
171
181
  If Cursor shows an error like `expected string, received undefined` for Threadnote `search`, the MCP server started but
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "threadnote",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "type": "commonjs",
5
5
  "main": "dist/threadnote.cjs",
6
6
  "description": "Shared local context and handoffs for development agents",