threadnote 0.1.0
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/.threadnoteignore +33 -0
- package/LICENSE +674 -0
- package/README.md +205 -0
- package/bin/threadnote-mcp-server.cjs +3 -0
- package/bin/threadnote.cjs +3 -0
- package/config/launchd/io.threadnote.openviking.plist.template +31 -0
- package/config/ov.conf.template.json +14 -0
- package/config/ovcli.conf.template.json +7 -0
- package/config/seed-manifest.example.yaml +15 -0
- package/dist/mcp_server.cjs +31195 -0
- package/dist/threadnote.cjs +7930 -0
- package/docs/agent-instructions.md +58 -0
- package/docs/demo.md +279 -0
- package/docs/migration.md +218 -0
- package/docs/rollout.md +24 -0
- package/docs/security.md +30 -0
- package/docs/troubleshooting.md +107 -0
- package/package.json +67 -0
- package/scripts/install.sh +128 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
Threadnote installs this as user-level agent guidance for Codex and Claude.
|
|
4
|
+
|
|
5
|
+
## Shared Context
|
|
6
|
+
|
|
7
|
+
Use OpenViking through Threadnote as a shared local context and memory layer. Repo files remain authoritative: always
|
|
8
|
+
follow the nearest `AGENTS.md`, `CLAUDE.md`, or other checked-in instruction file first.
|
|
9
|
+
|
|
10
|
+
When OpenViking MCP tools are available, use them directly. If MCP is unavailable, use the `threadnote` CLI fallback.
|
|
11
|
+
|
|
12
|
+
## Recall
|
|
13
|
+
|
|
14
|
+
At the start of a non-trivial task, recall relevant context before making changes. Search for:
|
|
15
|
+
|
|
16
|
+
- the current repo and branch;
|
|
17
|
+
- recent handoffs;
|
|
18
|
+
- task-specific skills or workflow guidance;
|
|
19
|
+
- user or team preferences that may affect the work.
|
|
20
|
+
|
|
21
|
+
Skip proactive recall for tiny one-shot questions where context would add noise.
|
|
22
|
+
|
|
23
|
+
Search results are not the final payload. Treat returned `viking://` URIs as pointers: read the relevant URI, or list a
|
|
24
|
+
directory when the result is an abstract/overview node.
|
|
25
|
+
|
|
26
|
+
## Remember
|
|
27
|
+
|
|
28
|
+
When the user asks you to remember something, store it unless it contains secrets, credentials, customer data, production
|
|
29
|
+
logs, or other sensitive data.
|
|
30
|
+
|
|
31
|
+
Also remember durable workflow facts you discover during work when they would help future agents and are not already in
|
|
32
|
+
canonical docs. Prefer updating checked-in docs for canonical repo rules.
|
|
33
|
+
|
|
34
|
+
## Handoff
|
|
35
|
+
|
|
36
|
+
Before pausing, switching agents, or ending meaningful work with local changes, store a concise handoff. Include:
|
|
37
|
+
|
|
38
|
+
- repo and branch;
|
|
39
|
+
- files touched;
|
|
40
|
+
- current status;
|
|
41
|
+
- tests or checks run;
|
|
42
|
+
- blockers;
|
|
43
|
+
- next suggested step.
|
|
44
|
+
|
|
45
|
+
Do not store long diffs, secrets, raw logs, or customer data in handoffs.
|
|
46
|
+
|
|
47
|
+
## CLI Fallback
|
|
48
|
+
|
|
49
|
+
Use these only when MCP tools are not available:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
threadnote start
|
|
53
|
+
threadnote recall --query "last handoff for this branch"
|
|
54
|
+
threadnote read viking://agent/threadnote/memories/.abstract.md
|
|
55
|
+
threadnote list viking://agent/threadnote/memories --all --recursive
|
|
56
|
+
threadnote remember --text "Durable engineering note..."
|
|
57
|
+
threadnote handoff --task "short task summary" --tests "checks run" --next-step "what to do next"
|
|
58
|
+
```
|
package/docs/demo.md
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# Demo: Cross-Agent Development Context
|
|
2
|
+
|
|
3
|
+
This demo shows `threadnote` as a shared local memory layer for engineering work. The story is intentionally simple:
|
|
4
|
+
one agent starts a task in a worktree, stores a handoff, and another agent or worktree recalls it without the
|
|
5
|
+
developer copy-pasting chat history, PR notes, or terminal output.
|
|
6
|
+
|
|
7
|
+
## Demo Goal
|
|
8
|
+
|
|
9
|
+
Show engineers that:
|
|
10
|
+
|
|
11
|
+
- repo instructions still live in `AGENTS.md`, `CLAUDE.md`, and checked-in docs;
|
|
12
|
+
- OpenViking adds durable, searchable context across agent sessions, worktrees, and repos;
|
|
13
|
+
- agents should use MCP directly, while `threadnote` is the human-readable fallback and diagnostic path;
|
|
14
|
+
- memories survive branch merges and worktree deletion because they live under the developer's OpenViking home, not in
|
|
15
|
+
the git worktree;
|
|
16
|
+
- `repair` fixes the common stale-worktree and MCP launcher problems that show up during real local development.
|
|
17
|
+
|
|
18
|
+
## Use Case
|
|
19
|
+
|
|
20
|
+
Use "continue a PR after switching agents" as the live scenario.
|
|
21
|
+
|
|
22
|
+
The engineer has a PR that updates a local tool. Codex has already done some work and creates a handoff. The engineer
|
|
23
|
+
opens Claude, or a fresh Codex session from another repo/worktree, and asks it to continue. The new agent
|
|
24
|
+
recalls the handoff, reads the relevant `viking://` memory, discovers repo guidance, and stores an updated handoff when
|
|
25
|
+
it finishes.
|
|
26
|
+
|
|
27
|
+
This is the highest-signal demo because it exercises the behavior engineers actually feel every day: context transfer,
|
|
28
|
+
stale local setup, and "what did the previous agent already learn?"
|
|
29
|
+
|
|
30
|
+
## Prep Checklist
|
|
31
|
+
|
|
32
|
+
Run these before the meeting from this checkout:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install
|
|
36
|
+
npm run doctor -- --dry-run
|
|
37
|
+
npm run threadnote -- install
|
|
38
|
+
threadnote start
|
|
39
|
+
threadnote doctor --dry-run
|
|
40
|
+
threadnote init-manifest --repo "$(pwd)"
|
|
41
|
+
threadnote seed --dry-run
|
|
42
|
+
threadnote seed
|
|
43
|
+
threadnote seed-skills --dry-run
|
|
44
|
+
threadnote seed-skills
|
|
45
|
+
threadnote mcp-install codex --apply
|
|
46
|
+
threadnote mcp-install claude --apply
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Open a fresh Codex or Claude session after installing MCP. Existing sessions may not pick up newly registered MCP
|
|
50
|
+
servers.
|
|
51
|
+
|
|
52
|
+
Optional: create a deterministic demo handoff so the search result is easy to find.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
threadnote handoff \
|
|
56
|
+
--task "Demo PR: continue the threadnote rollout after adding repair and docs" \
|
|
57
|
+
--tests "doctor --dry-run, mcp-install dry runs, local TypeScript checks" \
|
|
58
|
+
--next-step "Recall this handoff, read the most relevant viking URI, then summarize what changed and what to do next"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Live Script
|
|
62
|
+
|
|
63
|
+
### 1. Open With The Problem
|
|
64
|
+
|
|
65
|
+
Say:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
When we switch from one agent session to another, we usually lose the useful middle: what was tried, what failed, what
|
|
69
|
+
the branch is about, and what the next agent should avoid re-discovering. This tool gives agents a shared local context
|
|
70
|
+
layer without replacing repo instructions or indexing entire repos.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Show that the repo still has normal instructions:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
ls AGENTS.md CLAUDE.md
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 2. Show Local Health
|
|
80
|
+
|
|
81
|
+
Run:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
threadnote doctor --dry-run
|
|
85
|
+
threadnote start
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Say:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
The server is local. The default is 127.0.0.1:1933, so it does not conflict with apps running on localhost:80 or
|
|
92
|
+
localhost:443. If the exact port is taken, we can set THREADNOTE_PORT.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 3. Show MCP Is Installed
|
|
96
|
+
|
|
97
|
+
Run the client-specific check you want to demo:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
codex mcp list
|
|
101
|
+
claude mcp list
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Say:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
MCP is the expected agent path. The CLI exists so humans can inspect, repair, and reproduce what the agent is doing.
|
|
108
|
+
Claude installs at user scope by default, so it works from other repos and worktrees.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If the MCP server does not appear in an already-open agent session, restart that session after `mcp-install --apply`.
|
|
112
|
+
|
|
113
|
+
### 4. Recall The Previous Handoff
|
|
114
|
+
|
|
115
|
+
In the agent UI, ask:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
Before touching code, recall recent OpenViking context for this branch and read the most relevant handoff.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For a terminal fallback, run:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
threadnote recall --query "last handoff for threadnote rollout"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Point out that recall returns candidate `viking://` URIs and abstracts. Then read the best match:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
threadnote read "<paste the most relevant viking:// URI>"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Say:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
Search is intentionally a pointer step. The agent should read or list the selected URI before treating it as context.
|
|
137
|
+
That keeps recall cheap and makes the result auditable.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 5. Discover Repo Guidance
|
|
141
|
+
|
|
142
|
+
Ask the agent:
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
Find any repo guidance or skills that matter for this task before you continue.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Terminal fallback:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
threadnote recall --query "repo agent instructions testing guidance"
|
|
152
|
+
threadnote recall --query "skills for this repo"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Say:
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
This is not source navigation. It is a curated catalog of instructions, skills, and durable notes that helps the agent
|
|
159
|
+
start in the right neighborhood.
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 6. Show Cross-Repo Or Cross-Worktree Continuity
|
|
163
|
+
|
|
164
|
+
Switch to another repo or worktree and run the same recall:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
cd ~/work/another-repo
|
|
168
|
+
threadnote recall --query "last handoff for threadnote rollout"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Or ask a fresh Claude session from another repo:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
Use OpenViking to recall the latest handoff for the threadnote rollout and summarize the next step.
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Say:
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
The repo list is developer-local and manifest-driven. Nothing assumes a fixed source path. Memories are stored in the
|
|
181
|
+
local OpenViking home, so deleting a worktree removes launcher paths, not the remembered handoff.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 7. Remember A Durable Fact
|
|
185
|
+
|
|
186
|
+
Ask the agent:
|
|
187
|
+
|
|
188
|
+
```text
|
|
189
|
+
Remember this workflow fact: threadnote MCP for Claude should be installed at user scope so it works from any repo or
|
|
190
|
+
worktree.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Terminal fallback:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
threadnote remember \
|
|
197
|
+
--text "Workflow fact: install Claude OpenViking MCP at user scope so it works from any repo or worktree."
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Say:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
The rule is: remember durable workflow facts, not secrets, customer data, raw logs, or long diffs. Canonical repo rules
|
|
204
|
+
should still be checked in.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### 8. Create The Next Handoff
|
|
208
|
+
|
|
209
|
+
Ask the agent:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
Create a handoff for the next agent with the current status, tests run, blockers, and next step.
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Terminal fallback:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
threadnote handoff \
|
|
219
|
+
--task "Demo: verified cross-agent recall for the threadnote rollout" \
|
|
220
|
+
--tests "doctor --dry-run, recall, read, remember, handoff" \
|
|
221
|
+
--next-step "Open a fresh agent session and ask it to recall this handoff before continuing"
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Say:
|
|
225
|
+
|
|
226
|
+
```text
|
|
227
|
+
This is the part we want agents to do automatically before pausing or finishing meaningful code changes.
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### 9. Show Repair
|
|
231
|
+
|
|
232
|
+
Run:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
threadnote repair --dry-run
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Say:
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
This catches the ugly local cases: stale command shims, MCP launchers pointing at deleted worktrees, missing manifests,
|
|
242
|
+
and a stopped local server. Repair rewrites paths from the current checkout.
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### 10. Close
|
|
246
|
+
|
|
247
|
+
Say:
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
The important design choice is that this does not replace the repo. It makes the useful working memory around the repo
|
|
251
|
+
available to whichever agent session picks up the task next.
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Expected Signals
|
|
255
|
+
|
|
256
|
+
- `doctor --dry-run` reports no failures or prints concrete repair steps.
|
|
257
|
+
- `recall` returns `memory`, `resource`, or `skill` rows with `viking://` URIs.
|
|
258
|
+
- `read` turns a selected URI into actual handoff or memory content.
|
|
259
|
+
- A fresh agent session can use the OpenViking MCP tools after MCP install.
|
|
260
|
+
- `repair --dry-run` explains what it would fix without mutating anything.
|
|
261
|
+
|
|
262
|
+
## Recovery Branches
|
|
263
|
+
|
|
264
|
+
- MCP is installed but the current agent says no OpenViking tools are registered: open a fresh agent session.
|
|
265
|
+
- `claude mcp list` does not show OpenViking: run `threadnote mcp-install claude --apply`; the default scope is
|
|
266
|
+
`user`.
|
|
267
|
+
- `/health` is OK but `/mcp` fails: this is expected for OpenViking `0.3.12`; use the default stdio adapter instead of
|
|
268
|
+
`--native-http`.
|
|
269
|
+
- The old checkout or worktree was deleted: run
|
|
270
|
+
`npm run threadnote -- repair` from any fresh checkout.
|
|
271
|
+
- Recall returns only overview nodes: read the URI, or list the directory with
|
|
272
|
+
`threadnote list <uri> --all --recursive`.
|
|
273
|
+
|
|
274
|
+
## What Not To Demo
|
|
275
|
+
|
|
276
|
+
- Do not seed an entire repo.
|
|
277
|
+
- Do not store secrets, tokens, customer data, raw production logs, or long diffs.
|
|
278
|
+
- Do not present CLI commands as the ideal daily workflow. For normal work, the developer should ask the agent in
|
|
279
|
+
natural language and the agent should use MCP directly.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Migration
|
|
2
|
+
|
|
3
|
+
This guide explains how to switch a developer workflow to `threadnote` without losing the repo-local instruction
|
|
4
|
+
model that current agents rely on.
|
|
5
|
+
|
|
6
|
+
## Short Answer
|
|
7
|
+
|
|
8
|
+
Do not remove `AGENTS.md`, `CLAUDE.md`, `.claude/`, or `.agents/` as part of the migration.
|
|
9
|
+
|
|
10
|
+
Those files remain the versioned source of truth for repo-local behavior. OpenViking becomes a shared, searchable
|
|
11
|
+
context and memory layer on top of them. It helps agents recall handoffs, skills, and curated guidance across tools,
|
|
12
|
+
but it should not replace the files that fresh agents read directly from the working tree.
|
|
13
|
+
|
|
14
|
+
## Authority Model
|
|
15
|
+
|
|
16
|
+
- `AGENTS.md` and `CLAUDE.md`: canonical repo instructions. Keep these small, current, and checked in.
|
|
17
|
+
- Nested `AGENTS.md` and `CLAUDE.md`: canonical module-specific overrides. Keep them next to the code they govern.
|
|
18
|
+
- `.claude/commands` and `.claude/skills`: executable or tool-specific workflows. Keep them where Claude and other
|
|
19
|
+
local tools can discover them.
|
|
20
|
+
- `.agents/`: agent/plugin metadata or repo-local automation config. Keep it unless the owning tool no longer uses it.
|
|
21
|
+
- OpenViking: durable memory, cross-agent handoffs, searchable snapshots of curated guidance, and seeded skill
|
|
22
|
+
catalogs.
|
|
23
|
+
|
|
24
|
+
When these sources disagree, the checked-in repo instruction file wins. Update the source file first, then refresh the
|
|
25
|
+
OpenViking context.
|
|
26
|
+
|
|
27
|
+
## DX Model
|
|
28
|
+
|
|
29
|
+
Developers should not need to run `recall`, `remember`, or `handoff` as a normal habit.
|
|
30
|
+
|
|
31
|
+
The intended workflow has three layers:
|
|
32
|
+
|
|
33
|
+
- Agent-first: Codex, Claude, or another MCP-enabled agent calls OpenViking tools when the task calls for shared
|
|
34
|
+
context.
|
|
35
|
+
- Short CLI fallback: humans and scripts can run `threadnote recall`, `threadnote remember`, or
|
|
36
|
+
`threadnote handoff` from any repo.
|
|
37
|
+
- Checkout-local command: `npm run threadnote -- ...` is the bootstrap and debugging path before the short command shim
|
|
38
|
+
is installed.
|
|
39
|
+
|
|
40
|
+
After MCP install, developers can use natural language:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
Recall the last handoff for this branch.
|
|
44
|
+
Remember that this repo uses <durable workflow fact>.
|
|
45
|
+
Create a handoff for the next agent before you stop.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For better continuity, run `threadnote install` so it can add the agent-side guidance from `docs/agent-instructions.md`
|
|
49
|
+
to the user-level `~/.codex/AGENTS.md` and `~/.claude/CLAUDE.md` files. That guidance tells agents to recall context at
|
|
50
|
+
task start, store durable memories when explicitly asked or when a reusable workflow fact is learned, and create
|
|
51
|
+
handoffs automatically before stopping meaningful work.
|
|
52
|
+
|
|
53
|
+
## Migration Steps
|
|
54
|
+
|
|
55
|
+
Run install commands from any working directory. Run manifest commands from a repo root, or pass explicit `--repo`
|
|
56
|
+
paths.
|
|
57
|
+
|
|
58
|
+
1. Check prerequisites:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
curl -fsSL https://raw.githubusercontent.com/Kashkovsky/threadnote/main/scripts/install.sh | sh
|
|
62
|
+
threadnote doctor --dry-run
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To force Bun or Deno:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
curl -fsSL https://raw.githubusercontent.com/Kashkovsky/threadnote/main/scripts/install.sh | THREADNOTE_RUNTIME=bun sh
|
|
69
|
+
curl -fsSL https://raw.githubusercontent.com/Kashkovsky/threadnote/main/scripts/install.sh | THREADNOTE_RUNTIME=deno sh
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
2. Install or repair local OpenViking. This also installs the short `threadnote` command shim to `~/.local/bin` and
|
|
73
|
+
upserts user-level agent instructions by default. The one-line installer already runs `threadnote install`; run these
|
|
74
|
+
only when doing the manual install flow or previewing changes:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
threadnote install --dry-run
|
|
78
|
+
threadnote install
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If `threadnote` is not found after install, add `~/.local/bin` to `PATH` or rerun install with
|
|
82
|
+
`THREADNOTE_BIN_DIR=<dir-on-path>`.
|
|
83
|
+
|
|
84
|
+
3. Create the developer-local manifest for the repos this machine actually uses:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
threadnote init-manifest --repo ~/src/my-service --repo ~/work/mobile-app
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`--repo` can be repeated. Paths may be anywhere on the machine. If no `--repo` is provided, the current git repo is
|
|
91
|
+
used. The manifest is written to `~/.openviking/seed-manifest.yaml` by default and is intentionally not checked in.
|
|
92
|
+
|
|
93
|
+
4. Start the local service:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
threadnote start
|
|
97
|
+
threadnote doctor --dry-run
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
5. Inspect curated repo imports:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
threadnote seed --dry-run
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
6. Seed curated repo guidance after reviewing the dry-run output:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
threadnote seed
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
7. Inspect and seed shared skills:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
threadnote seed-skills --dry-run
|
|
116
|
+
threadnote seed-skills
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
8. Wire one agent at a time:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
threadnote mcp-install codex
|
|
123
|
+
threadnote mcp-install codex --apply
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Then repeat for Claude:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
threadnote mcp-install claude
|
|
130
|
+
threadnote mcp-install claude --apply
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Claude installs at user scope by default so it works from every repo/worktree. Use `--scope local` only when a
|
|
134
|
+
repo-specific Claude MCP entry is intentional.
|
|
135
|
+
|
|
136
|
+
Later, if the checkout that installed the MCP adapter is deleted or moved, repair it from any fresh checkout:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
threadnote repair
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
9. Validate recall:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
threadnote recall --query "repo testing guidance"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Daily Workflow
|
|
149
|
+
|
|
150
|
+
At the start of a task, agents should still read the nearest `AGENTS.md` or `CLAUDE.md` files from the repo. OpenViking
|
|
151
|
+
is the cross-session layer.
|
|
152
|
+
|
|
153
|
+
Preferred developer behavior is conversational:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Recall anything relevant for this branch before you start.
|
|
157
|
+
Remember this workflow note for future agents: ...
|
|
158
|
+
Create a handoff now.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Preferred agent behavior is automatic after `threadnote install` has updated the user-level Codex and Claude instruction
|
|
162
|
+
files:
|
|
163
|
+
|
|
164
|
+
- On non-trivial task start, search OpenViking for recent handoffs and relevant repo guidance.
|
|
165
|
+
- When the user says "remember", store the memory after checking that it contains no secret or customer data.
|
|
166
|
+
- Before pausing, switching agents, or finishing meaningful code changes, store a concise handoff with status, tests,
|
|
167
|
+
blockers, and next steps.
|
|
168
|
+
|
|
169
|
+
Manual CLI remains available for scripts and emergencies:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
threadnote recall --query "last handoff for this branch"
|
|
173
|
+
threadnote remember --text "Durable engineering note..."
|
|
174
|
+
threadnote handoff --task "short task summary" --tests "checks run" --next-step "what the next agent should do"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Repo Paths
|
|
178
|
+
|
|
179
|
+
The workflow is not tied to any fixed repo list. Repo discovery is manifest-driven:
|
|
180
|
+
|
|
181
|
+
- `~/.openviking/seed-manifest.yaml`: developer-local default manifest, created by `threadnote init-manifest`.
|
|
182
|
+
- `THREADNOTE_MANIFEST`: override for custom teams, experiments, or CI.
|
|
183
|
+
- `--manifest <path>`: one-off override for `seed` and `seed-skills`.
|
|
184
|
+
- `config/seed-manifest.example.yaml`: checked-in example only.
|
|
185
|
+
|
|
186
|
+
Use `threadnote init-manifest --repo <path>` whenever a developer adds a new repo they want included. The command
|
|
187
|
+
derives a stable `viking://resources/repos/<repo-name>` URI and keeps the seed patterns conservative.
|
|
188
|
+
|
|
189
|
+
## Refreshing Context
|
|
190
|
+
|
|
191
|
+
OpenViking stores imported context as durable resources. For v1, treat `seed` as a first-ingest operation. When a
|
|
192
|
+
seeded instruction file changes, update the checked-in source first, then refresh the relevant `viking://` resource.
|
|
193
|
+
|
|
194
|
+
Current practical options:
|
|
195
|
+
|
|
196
|
+
- Remove the old resource with `forget`, then re-run a scoped seed manifest.
|
|
197
|
+
- Use `remember` for short corrections that should be available immediately.
|
|
198
|
+
- Export/import packs only for moving a known-good local context between machines.
|
|
199
|
+
|
|
200
|
+
Do not edit OpenViking directly and leave the repo instruction file stale.
|
|
201
|
+
|
|
202
|
+
## What To Remove
|
|
203
|
+
|
|
204
|
+
Remove nothing during the initial migration.
|
|
205
|
+
|
|
206
|
+
After the workflow is proven, teams may delete or consolidate only content that has a clear owner-approved replacement.
|
|
207
|
+
Good candidates are stale handoff notes, obsolete duplicate docs, or abandoned per-agent experiments. Bad candidates are
|
|
208
|
+
canonical instructions, active commands, active skills, MCP config, or anything required by existing tools.
|
|
209
|
+
|
|
210
|
+
## Cutover Checklist
|
|
211
|
+
|
|
212
|
+
- `doctor --dry-run` reports a healthy OpenViking server.
|
|
213
|
+
- `threadnote` works from a different repo or subdirectory.
|
|
214
|
+
- `mcp-install` has been applied for the agent the developer actually uses.
|
|
215
|
+
- `recall` returns seeded guidance.
|
|
216
|
+
- A test `handoff` can be stored and recalled by another agent.
|
|
217
|
+
- `AGENTS.md` and `CLAUDE.md` still describe the source-of-truth repo rules.
|
|
218
|
+
- The team has agreed on which seeded paths are allowed and which sensitive paths stay excluded.
|
package/docs/rollout.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Rollout
|
|
2
|
+
|
|
3
|
+
Start with a local-only pilot.
|
|
4
|
+
|
|
5
|
+
## Pilot Steps
|
|
6
|
+
|
|
7
|
+
1. Run `doctor --dry-run`.
|
|
8
|
+
2. Run `install --dry-run`, review paths, then run `install`.
|
|
9
|
+
3. For a solo pilot, use the default local embedding backend; for broader rollout, configure a company-approved
|
|
10
|
+
embedding and summary provider in `~/.openviking/ov.conf`.
|
|
11
|
+
4. Run `start` and confirm `doctor` reports a healthy server.
|
|
12
|
+
5. Run `seed --dry-run` and inspect every planned import.
|
|
13
|
+
6. Run `seed`.
|
|
14
|
+
7. Run `seed-skills --dry-run`, then `seed-skills`.
|
|
15
|
+
8. Install MCP for one agent, validate recall, then install the second.
|
|
16
|
+
|
|
17
|
+
## Acceptance Criteria
|
|
18
|
+
|
|
19
|
+
- Install completes in under 10 minutes after prerequisites.
|
|
20
|
+
- `doctor` reports clear actionable checks.
|
|
21
|
+
- Codex and Claude can both store and recall a shared handoff.
|
|
22
|
+
- Seeding curated guidance does not import known secret patterns.
|
|
23
|
+
- Fresh agents can recall repo testing guidance and discover relevant skills.
|
|
24
|
+
- Removing OpenViking leaves agent configs in a known state.
|
package/docs/security.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
`threadnote` treats OpenViking as durable local memory, so the default workflow is conservative.
|
|
4
|
+
|
|
5
|
+
## Do Not Ingest
|
|
6
|
+
|
|
7
|
+
- Credentials, access tokens, API keys, certificates, private keys, or shell history.
|
|
8
|
+
- Customer data, production data, HIPAA data, or production logs without explicit approval and scrubbing.
|
|
9
|
+
- Local auth files such as `~/.codex/auth.json` or `~/.claude/.credentials.json`.
|
|
10
|
+
- Local settings files that may contain secrets unless they go through redaction.
|
|
11
|
+
|
|
12
|
+
## Built-In Controls
|
|
13
|
+
|
|
14
|
+
- `.threadnoteignore` excludes common secret and build-output paths.
|
|
15
|
+
- `.mcp.json`, `config.toml`, and settings JSON are redacted before import.
|
|
16
|
+
- Files are skipped if common secret patterns remain after redaction.
|
|
17
|
+
- `mcp-install` requires `--apply` before it changes Codex or Claude config.
|
|
18
|
+
- `install` updates user-level Codex and Claude instruction files through a managed Markdown block. Existing personal
|
|
19
|
+
instructions outside that block are preserved.
|
|
20
|
+
- Config files created under `THREADNOTE_HOME` are written with user-only permissions.
|
|
21
|
+
|
|
22
|
+
## Rollout Requirements
|
|
23
|
+
|
|
24
|
+
Before team-wide use, get explicit legal and security review for:
|
|
25
|
+
|
|
26
|
+
- OpenViking licensing and operational use.
|
|
27
|
+
- Approved embedding and summary model providers.
|
|
28
|
+
- At-rest encryption settings.
|
|
29
|
+
- Local API key requirements.
|
|
30
|
+
- Forget/removal expectations for stale or sensitive context.
|