@tyroneross/bookmark 0.2.0 → 0.3.2
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/.claude-plugin/marketplace.json +29 -12
- package/.claude-plugin/plugin.json +12 -8
- package/.codex-plugin/plugin.json +31 -0
- package/.mcp.json +8 -0
- package/CLAUDE.md +82 -38
- package/LICENSE +202 -21
- package/README.md +150 -57
- package/agents/snapshot-analyst.md +1 -1
- package/commands/bookmark.md +29 -0
- package/commands/feedback.md +37 -0
- package/commands/restore.md +14 -4
- package/commands/snapshot.md +19 -7
- package/commands/status.md +1 -1
- package/dist/cli/index.js +600 -66
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/snapshot-resolution.d.ts +15 -0
- package/dist/cli/snapshot-resolution.d.ts.map +1 -0
- package/dist/cli/snapshot-resolution.js +21 -0
- package/dist/cli/snapshot-resolution.js.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +150 -19
- package/dist/config.js.map +1 -1
- package/dist/context/freshness.d.ts +3 -0
- package/dist/context/freshness.d.ts.map +1 -0
- package/dist/context/freshness.js +29 -0
- package/dist/context/freshness.js.map +1 -0
- package/dist/context/handoff-prompt.d.ts +12 -0
- package/dist/context/handoff-prompt.d.ts.map +1 -0
- package/dist/context/handoff-prompt.js +29 -0
- package/dist/context/handoff-prompt.js.map +1 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +85 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +97 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +304 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/registry.d.ts +40 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +134 -0
- package/dist/registry.js.map +1 -0
- package/dist/restore/index.d.ts +13 -1
- package/dist/restore/index.d.ts.map +1 -1
- package/dist/restore/index.js +154 -256
- package/dist/restore/index.js.map +1 -1
- package/dist/setup/auto-setup.d.ts +8 -2
- package/dist/setup/auto-setup.d.ts.map +1 -1
- package/dist/setup/auto-setup.js +281 -66
- package/dist/setup/auto-setup.js.map +1 -1
- package/dist/setup/configure-hooks.d.ts +14 -3
- package/dist/setup/configure-hooks.d.ts.map +1 -1
- package/dist/setup/configure-hooks.js +156 -24
- package/dist/setup/configure-hooks.js.map +1 -1
- package/dist/snapshot/capture.d.ts +12 -10
- package/dist/snapshot/capture.d.ts.map +1 -1
- package/dist/snapshot/capture.js +36 -48
- package/dist/snapshot/capture.js.map +1 -1
- package/dist/snapshot/compress.d.ts +3 -3
- package/dist/snapshot/compress.d.ts.map +1 -1
- package/dist/snapshot/compress.js +16 -51
- package/dist/snapshot/compress.js.map +1 -1
- package/dist/snapshot/storage.d.ts +1 -0
- package/dist/snapshot/storage.d.ts.map +1 -1
- package/dist/snapshot/storage.js +7 -6
- package/dist/snapshot/storage.js.map +1 -1
- package/dist/threshold/state.d.ts +5 -0
- package/dist/threshold/state.d.ts.map +1 -1
- package/dist/threshold/state.js +28 -2
- package/dist/threshold/state.js.map +1 -1
- package/dist/threshold/token-usage.d.ts +29 -0
- package/dist/threshold/token-usage.d.ts.map +1 -0
- package/dist/threshold/token-usage.js +128 -0
- package/dist/threshold/token-usage.js.map +1 -0
- package/dist/trails/identity.d.ts +76 -0
- package/dist/trails/identity.d.ts.map +1 -0
- package/dist/trails/identity.js +117 -0
- package/dist/trails/identity.js.map +1 -0
- package/dist/trails/reader.d.ts +1 -1
- package/dist/trails/reader.js +2 -2
- package/dist/trails/reader.js.map +1 -1
- package/dist/trails/writer.d.ts +2 -8
- package/dist/trails/writer.d.ts.map +1 -1
- package/dist/trails/writer.js +33 -191
- package/dist/trails/writer.js.map +1 -1
- package/dist/transcript/extractor.d.ts +8 -9
- package/dist/transcript/extractor.d.ts.map +1 -1
- package/dist/transcript/extractor.js +97 -360
- package/dist/transcript/extractor.js.map +1 -1
- package/dist/types.d.ts +34 -41
- package/dist/types.d.ts.map +1 -1
- package/hooks/hooks.json +12 -14
- package/package.json +13 -7
- package/scripts/install-plugin.sh +48 -0
- package/skills/context-continuity/SKILL.md +43 -24
- package/commands/activate.md +0 -20
- package/dist/transcript/estimator.d.ts +0 -20
- package/dist/transcript/estimator.d.ts.map +0 -1
- package/dist/transcript/estimator.js +0 -95
- package/dist/transcript/estimator.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,121 +21,146 @@ This creates a painful pattern: every new session starts with you re-explaining
|
|
|
21
21
|
|
|
22
22
|
## How Bookmark Works
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Bookmark runs as an external process — zero tokens consumed from your context window. Four hooks handle everything automatically:
|
|
24
|
+
Bookmark runs as a small external process. Four hooks keep a durable handoff current:
|
|
27
25
|
|
|
28
26
|
| Hook | When | What |
|
|
29
27
|
|------|------|------|
|
|
30
|
-
| **PreCompact** | Before context compaction | Captures
|
|
28
|
+
| **PreCompact** | Before context compaction | Captures a mechanical file/tool checkpoint |
|
|
31
29
|
| **SessionStart** | New session begins | Restores prior context so Claude knows what you were doing |
|
|
32
|
-
| **UserPromptSubmit** | Every user message | Checks
|
|
33
|
-
| **Stop** | Session ends |
|
|
30
|
+
| **UserPromptSubmit** | Every user message | Checks time and token thresholds; alerts at 75% used |
|
|
31
|
+
| **Stop** | Session ends | Captures files and requires a fresh semantic handoff |
|
|
34
32
|
|
|
35
33
|
When you open a new terminal and run `claude`, Bookmark restores your prior context. Claude greets you knowing what you were working on, what decisions were made, and what's left to do.
|
|
36
34
|
|
|
37
35
|
## What Gets Captured
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
Bookmark separates reliable mechanical evidence from semantic judgment:
|
|
38
|
+
|
|
39
|
+
- **`bookmark.context.md`** — Claude writes the current task, status, remaining work,
|
|
40
|
+
decisions, risks, open questions, sources of truth, and next steps.
|
|
41
|
+
- **JSON snapshots and `LATEST.md`** — Bookmark extracts file changes, tool counts,
|
|
42
|
+
capture reason, model, and measured context usage from the transcript.
|
|
43
|
+
|
|
44
|
+
The per-prompt threshold check makes no API call and reads only the transcript tail. Full
|
|
45
|
+
transcript parsing runs only when an interval or threshold capture is due. The semantic handoff
|
|
46
|
+
is capped at 800 tokens and points to source files instead of copying them.
|
|
40
47
|
|
|
41
|
-
|
|
42
|
-
- **Current status** — what was being worked on when the session ended
|
|
43
|
-
- **Open items** — TODOs, next steps, unfinished work
|
|
44
|
-
- **Unknowns and blockers** — things that were unclear or blocking progress
|
|
45
|
-
- **Files changed** — which files were created, edited, or read
|
|
46
|
-
- **Errors encountered** — what broke and whether it was resolved
|
|
47
|
-
- **Tool usage** — aggregate counts of Read, Edit, Bash, etc.
|
|
48
|
+
### File paths in snapshots are now project-relative
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
As of v0.3.3, file paths in `.bookmark/snapshots/SNAP_*.json` are stored
|
|
51
|
+
relative to `project_path` (e.g. `src/foo.ts` instead of
|
|
52
|
+
`/Users/me/dev/git-folder/myapp/src/foo.ts`). Older snapshots may carry
|
|
53
|
+
pre-move absolute paths that went stale when a project was relocated
|
|
54
|
+
(e.g. `~/Desktop/git-folder/...` → `~/dev/git-folder/...`); those are not
|
|
55
|
+
auto-rewritten — they're left intact so the historical record stays
|
|
56
|
+
honest. Going forward, a project move only invalidates `project_path`
|
|
57
|
+
itself, not the per-file entries inside each snapshot.
|
|
50
58
|
|
|
51
59
|
## Install
|
|
52
60
|
|
|
53
|
-
**
|
|
61
|
+
**Via Claude Code plugin marketplace (recommended):**
|
|
54
62
|
|
|
55
63
|
```bash
|
|
56
|
-
|
|
64
|
+
/plugin marketplace add tyroneross/bookmark
|
|
65
|
+
/plugin install bookmark@bookmark
|
|
57
66
|
```
|
|
58
67
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
**Globally:**
|
|
68
|
+
**Via npm (in a project):**
|
|
62
69
|
|
|
63
70
|
```bash
|
|
64
|
-
npm install
|
|
71
|
+
npm install @tyroneross/bookmark
|
|
65
72
|
```
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
Hooks are configured automatically. Start a Claude Code session and you're covered.
|
|
68
75
|
|
|
69
|
-
**
|
|
76
|
+
**Via npm (globally):**
|
|
70
77
|
|
|
71
78
|
```bash
|
|
72
|
-
|
|
79
|
+
npm install -g @tyroneross/bookmark
|
|
73
80
|
```
|
|
74
81
|
|
|
82
|
+
Then activate in any project by running `bookmark setup` in your project directory.
|
|
83
|
+
|
|
75
84
|
## Commands
|
|
76
85
|
|
|
77
86
|
Use these inside Claude Code:
|
|
78
87
|
|
|
79
88
|
| Command | What it does |
|
|
80
89
|
|---------|-------------|
|
|
90
|
+
| `/bookmark` | Show current session context and bookmark status; forwards any arguments to the bookmark CLI |
|
|
81
91
|
| `/bookmark:snapshot` | Take a manual snapshot right now |
|
|
82
92
|
| `/bookmark:restore` | Restore from latest or a specific snapshot |
|
|
83
93
|
| `/bookmark:status` | Show snapshot count, compaction cycles, last snapshot time |
|
|
84
94
|
| `/bookmark:list` | List available snapshots with details |
|
|
85
|
-
| `/bookmark:activate` | Set up Bookmark for the current project |
|
|
86
95
|
|
|
87
96
|
## CLI
|
|
88
97
|
|
|
89
98
|
```bash
|
|
90
99
|
bookmark status # Show stats
|
|
100
|
+
bookmark snapshot # Take a manual snapshot now
|
|
91
101
|
bookmark list # List snapshots
|
|
92
102
|
bookmark show --latest # Show latest snapshot content
|
|
93
103
|
bookmark show SNAP_ID # Show specific snapshot
|
|
94
104
|
bookmark config # Show current configuration
|
|
95
105
|
bookmark config --interval 15 # Change snapshot interval to 15 minutes
|
|
106
|
+
bookmark config --token-threshold 75 # Capture and alert at 75% used
|
|
107
|
+
bookmark config --context-limit 500000 # Override model context limit
|
|
96
108
|
bookmark setup # Interactive configuration
|
|
97
109
|
```
|
|
98
110
|
|
|
99
|
-
##
|
|
111
|
+
## Token Threshold Capture
|
|
100
112
|
|
|
101
|
-
Bookmark
|
|
113
|
+
Bookmark reads the latest model-reported usage from the Claude Code transcript. It counts input,
|
|
114
|
+
cache-read, cache-write, output, and the pending prompt against the active model's context limit.
|
|
115
|
+
At 75% used, Bookmark captures a `token_threshold` snapshot, shows a warning, asks Claude to
|
|
116
|
+
refresh `bookmark.context.md`, and recommends a new session. It alerts once until a new session
|
|
117
|
+
or lower post-compaction usage re-arms the threshold.
|
|
102
118
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
119
|
+
Bookmark resolves context limits only for model IDs documented by Anthropic. If the transcript
|
|
120
|
+
reports an unknown model, Bookmark pauses token-threshold capture, asks the user for the verified
|
|
121
|
+
limit, and keeps manual and periodic snapshots active. It never guesses a context limit. The
|
|
122
|
+
mapping follows Anthropic's
|
|
123
|
+
[context-window documentation](https://platform.claude.com/docs/en/build-with-claude/context-windows).
|
|
124
|
+
Override either value when needed:
|
|
109
125
|
|
|
110
|
-
|
|
126
|
+
```bash
|
|
127
|
+
bookmark config --token-threshold 75
|
|
128
|
+
bookmark config --context-limit 500000
|
|
129
|
+
```
|
|
111
130
|
|
|
112
|
-
##
|
|
131
|
+
## Hooks
|
|
113
132
|
|
|
114
|
-
|
|
133
|
+
Bookmark installs four hooks because each protects a separate lifecycle boundary:
|
|
115
134
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
135
|
+
| Hook | Needed for |
|
|
136
|
+
|------|------------|
|
|
137
|
+
| `SessionStart` | Restore the latest durable handoff into a new session |
|
|
138
|
+
| `UserPromptSubmit` | Run periodic capture and model-aware token-threshold checks |
|
|
139
|
+
| `PreCompact` | Save a final mechanical checkpoint before compaction |
|
|
140
|
+
| `Stop` | Save at exit and require a complete semantic handoff once |
|
|
120
141
|
|
|
121
|
-
|
|
142
|
+
`UserPromptSubmit` is the only hook required for periodic and token-threshold capture. The other
|
|
143
|
+
three complete the restore, pre-compaction, and exit continuity path.
|
|
122
144
|
|
|
123
|
-
|
|
145
|
+
Manual capture does not require another hook: run `/bookmark:snapshot` or `bookmark snapshot`.
|
|
124
146
|
|
|
125
|
-
|
|
147
|
+
## Time-Based Snapshots
|
|
148
|
+
|
|
149
|
+
Default: every **5 minutes** of active session time. Configurable:
|
|
126
150
|
|
|
127
151
|
```bash
|
|
128
|
-
bookmark config --
|
|
152
|
+
bookmark config --interval 10 # Every 10 minutes
|
|
153
|
+
bookmark config --interval 30 # Every 30 minutes
|
|
129
154
|
```
|
|
130
155
|
|
|
131
|
-
|
|
156
|
+
Or set via environment: `BOOKMARK_INTERVAL=15`
|
|
132
157
|
|
|
133
158
|
## Storage
|
|
134
159
|
|
|
135
|
-
All data lives in your project at `.
|
|
160
|
+
All data lives in your project at `.bookmark/`:
|
|
136
161
|
|
|
137
162
|
```
|
|
138
|
-
.
|
|
163
|
+
.bookmark/
|
|
139
164
|
├── LATEST.md # Hot context — what gets restored on SessionStart
|
|
140
165
|
├── index.json # Snapshot index with stats
|
|
141
166
|
├── state.json # Plugin state (compaction count, thresholds, timing)
|
|
@@ -146,13 +171,69 @@ All data lives in your project at `.claude/bookmarks/`:
|
|
|
146
171
|
|
|
147
172
|
Automatically added to `.gitignore` — snapshot data never gets committed.
|
|
148
173
|
|
|
149
|
-
##
|
|
174
|
+
## Identity Block (v0.4+)
|
|
175
|
+
|
|
176
|
+
Every `bookmark.context.md` should start with an `BOOKMARK_IDENTITY` HTML comment that
|
|
177
|
+
declares which project and git state the summary belongs to. This makes cross-session
|
|
178
|
+
restoration unambiguous — a bookmark can't be mistaken for a different repo's context.
|
|
150
179
|
|
|
151
|
-
|
|
180
|
+
```markdown
|
|
181
|
+
# Session Context — Travel Planner
|
|
182
|
+
|
|
183
|
+
<!-- BOOKMARK_IDENTITY
|
|
184
|
+
scope: repo
|
|
185
|
+
project: travel-planner
|
|
186
|
+
repo_path: /Users/me/dev/git-folder/Travel Planner
|
|
187
|
+
branch: feature/summer-camps
|
|
188
|
+
head: 4988383
|
|
189
|
+
written: 2026-04-11
|
|
190
|
+
-->
|
|
191
|
+
|
|
192
|
+
## Current Task
|
|
193
|
+
...
|
|
194
|
+
```
|
|
152
195
|
|
|
153
|
-
|
|
196
|
+
Supported fields: `scope` (`repo` or `home`), `project`, `repo_path`, `repo_name`, `branch`,
|
|
197
|
+
`head`, `base`, `written`, `written_by`. Unknown keys are preserved for forward compatibility.
|
|
154
198
|
|
|
155
|
-
|
|
199
|
+
### Path validation
|
|
200
|
+
|
|
201
|
+
At restore time, bookmark compares the identity's `repo_path` to the CWD it was invoked in.
|
|
202
|
+
Mismatch → the restored content is prefixed with an "identity mismatch" warning, so the new
|
|
203
|
+
session can verify the bookmark belongs to the project before acting on it.
|
|
204
|
+
|
|
205
|
+
### Home-scope pointers
|
|
206
|
+
|
|
207
|
+
A `scope: home` bookmark at `~/.bookmark/bookmark.context.md` is a **pointer**, not a
|
|
208
|
+
session context. It contains `points_to_canonical` naming the real repo-scoped file:
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
<!-- BOOKMARK_IDENTITY
|
|
212
|
+
scope: home
|
|
213
|
+
project: POINTER_ONLY
|
|
214
|
+
points_to_project: travel-planner
|
|
215
|
+
points_to_canonical: /Users/me/dev/git-folder/Travel Planner/.bookmark/bookmark.context.md
|
|
216
|
+
-->
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
SessionStart automatically follows the pointer — a session launched from `~/` now gets
|
|
220
|
+
routed to the canonical project bookmark without manual `cd`. Previously, the home
|
|
221
|
+
bookmark would be served as if it were the active context (with potentially stale or
|
|
222
|
+
wrong-project content).
|
|
223
|
+
|
|
224
|
+
## Hard Staleness Block (v0.4+)
|
|
225
|
+
|
|
226
|
+
Stale auto-restore is worse than no auto-restore: a 14-day-old bookmark prefixed with a
|
|
227
|
+
soft warning still creates "confident wrong starts" because the warning reads as noise.
|
|
228
|
+
Bookmark now **hard-blocks** auto-restore at **72 hours** — past that threshold, the
|
|
229
|
+
restored content is replaced with a message telling you to pick a specific snapshot via
|
|
230
|
+
`/bookmark:list` or read the file manually if you actually want it. Soft warnings still
|
|
231
|
+
apply between 24h and 72h.
|
|
232
|
+
|
|
233
|
+
## Small Context Footprint
|
|
234
|
+
|
|
235
|
+
Bookmark performs mechanical capture outside the model context. It injects only the compact
|
|
236
|
+
handoff on SessionStart and one short instruction when a token threshold is crossed.
|
|
156
237
|
|
|
157
238
|
## Configuration
|
|
158
239
|
|
|
@@ -160,11 +241,10 @@ All the heavy lifting happens outside the context window.
|
|
|
160
241
|
|
|
161
242
|
| Variable | Default | Description |
|
|
162
243
|
|----------|---------|-------------|
|
|
163
|
-
| `BOOKMARK_INTERVAL` | `
|
|
164
|
-
| `
|
|
165
|
-
| `BOOKMARK_CONTEXT_LIMIT` |
|
|
166
|
-
| `
|
|
167
|
-
| `BOOKMARK_STORAGE_PATH` | `.claude/bookmarks` | Storage directory |
|
|
244
|
+
| `BOOKMARK_INTERVAL` | `5` | Snapshot interval in minutes |
|
|
245
|
+
| `BOOKMARK_TOKEN_THRESHOLD` | `0.75` | Context-used fraction that captures and alerts |
|
|
246
|
+
| `BOOKMARK_CONTEXT_LIMIT` | model-aware | Explicit context-window override in tokens |
|
|
247
|
+
| `BOOKMARK_STORAGE_PATH` | `.bookmark` | Storage directory |
|
|
168
248
|
| `BOOKMARK_VERBOSE` | `false` | Enable verbose logging |
|
|
169
249
|
| `BOOKMARK_SKIP_SETUP` | `false` | Skip postinstall auto-setup |
|
|
170
250
|
|
|
@@ -175,4 +255,17 @@ All the heavy lifting happens outside the context window.
|
|
|
175
255
|
|
|
176
256
|
## License
|
|
177
257
|
|
|
178
|
-
|
|
258
|
+
Apache-2.0
|
|
259
|
+
|
|
260
|
+
## Codex
|
|
261
|
+
|
|
262
|
+
This package now ships an additive Codex plugin surface alongside the existing Claude Code package. The Claude package remains authoritative for Claude behavior; the Codex package adds a parallel `.codex-plugin/plugin.json` install surface without changing the Claude runtime.
|
|
263
|
+
|
|
264
|
+
Package root for Codex installs:
|
|
265
|
+
- the repository root (`.`)
|
|
266
|
+
|
|
267
|
+
Primary Codex surface:
|
|
268
|
+
- skills from `./skills` when present
|
|
269
|
+
- MCP config from `./.mcp.json` when present
|
|
270
|
+
|
|
271
|
+
Install the package from this package root using your current Codex plugin install flow. The Codex package is additive only: Claude-specific hooks, slash commands, and agent wiring remain unchanged for Claude Code.
|
|
@@ -18,7 +18,7 @@ You analyze context snapshots to help users understand session history.
|
|
|
18
18
|
|
|
19
19
|
## Data Location
|
|
20
20
|
|
|
21
|
-
All bookmark data is in `.
|
|
21
|
+
All bookmark data is in `.bookmark/`:
|
|
22
22
|
- `LATEST.md` — Latest compressed summary
|
|
23
23
|
- `index.json` — Snapshot index with stats
|
|
24
24
|
- `state.json` — Plugin state (compaction count, thresholds)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Show current session context and bookmark status"
|
|
3
|
+
allowed-tools: Bash, Read
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Show the current bookmark state for this project.
|
|
7
|
+
|
|
8
|
+
{{#if ARGUMENTS}}
|
|
9
|
+
Pass arguments to the bookmark CLI:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @tyroneross/bookmark {{ARGUMENTS}}
|
|
13
|
+
```
|
|
14
|
+
{{else}}
|
|
15
|
+
Run status and show current context:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx @tyroneross/bookmark status
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Then check if `.bookmark/bookmark.context.md` exists in the current project and read it to show the user their last session context.
|
|
22
|
+
|
|
23
|
+
Present:
|
|
24
|
+
- Snapshot count and last snapshot time
|
|
25
|
+
- Current session context summary (from bookmark.context.md) if it exists
|
|
26
|
+
- Available commands: `/bookmark:snapshot`, `/bookmark:status`, `/bookmark:list`, `/bookmark:restore`
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
29
|
+
*bookmark — session continuity*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feedback
|
|
3
|
+
description: Report a bug or send feedback about the bookmark plugin
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Report bookmark feedback
|
|
7
|
+
|
|
8
|
+
File the user's report as a GitHub issue on `tyroneross/bookmark`. Issues are this plugin's
|
|
9
|
+
support channel — the manifest carries no contact address by design.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Ask what went wrong, if the user has not already said. One question, not a form.
|
|
14
|
+
2. Gather the context that makes a report actionable, without interrogating the user:
|
|
15
|
+
- plugin version from `.claude-plugin/plugin.json`
|
|
16
|
+
- `claude --version`
|
|
17
|
+
- `uname -sm`
|
|
18
|
+
- which command or skill misbehaved, and what it did instead
|
|
19
|
+
3. Show the user the exact title and body you intend to file. Their report, their words.
|
|
20
|
+
4. Create it:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
gh issue create --repo tyroneross/bookmark \
|
|
24
|
+
--title "<one line: what broke>" \
|
|
25
|
+
--body "<what happened / what was expected / steps / versions>"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
5. If `gh` is missing or unauthenticated, do not fail — print the URL so the user
|
|
29
|
+
can open it in a browser: https://github.com/tyroneross/bookmark/issues/new
|
|
30
|
+
|
|
31
|
+
6. Report the resulting issue URL back to the user.
|
|
32
|
+
|
|
33
|
+
## Rules
|
|
34
|
+
|
|
35
|
+
- A GitHub issue is public. Redact secrets, tokens, absolute home paths, and any
|
|
36
|
+
file contents the user has not seen before sending.
|
|
37
|
+
- Never file without showing the user the body first.
|
package/commands/restore.md
CHANGED
|
@@ -5,25 +5,35 @@ argument-hint: "[SNAP_ID]"
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
{{#if ARGUMENTS}}
|
|
8
|
-
Load and display the full context from a specific snapshot
|
|
8
|
+
Load and display the full context from a specific snapshot. If the ID lives in a
|
|
9
|
+
different project, `show` will resolve it via the global registry.
|
|
9
10
|
|
|
10
11
|
```bash
|
|
11
12
|
npx @tyroneross/bookmark show {{ARGUMENTS}}
|
|
12
13
|
```
|
|
13
14
|
|
|
14
|
-
Read the snapshot and present the decisions, status, open items, and unknowns to the user.
|
|
15
|
+
Read the snapshot and present the decisions, status, open items, and unknowns to the user.
|
|
15
16
|
|
|
16
17
|
{{else}}
|
|
17
|
-
|
|
18
|
+
Restore the most relevant context, using the same resolution chain as session startup
|
|
19
|
+
(current project → home-scope pointer → last-active project via registry):
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
npx @tyroneross/bookmark
|
|
22
|
+
npx @tyroneross/bookmark restore --session-source clear
|
|
21
23
|
```
|
|
22
24
|
|
|
25
|
+
If you want to pick a different snapshot, list recent ones:
|
|
26
|
+
|
|
23
27
|
```bash
|
|
24
28
|
npx @tyroneross/bookmark list --limit 5
|
|
25
29
|
```
|
|
26
30
|
|
|
31
|
+
Or view snapshots across all projects:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx @tyroneross/bookmark list --all --limit 10
|
|
35
|
+
```
|
|
36
|
+
|
|
27
37
|
Present the restored context and ask the user which open item to continue with.
|
|
28
38
|
{{/if}}
|
|
29
39
|
|
package/commands/snapshot.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Take a manual context snapshot"
|
|
3
|
-
allowed-tools: Bash
|
|
4
|
-
argument-hint: "[--smart]"
|
|
2
|
+
description: "Take a manual context snapshot and write session summary"
|
|
3
|
+
allowed-tools: Bash, Write
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
Take a manual context snapshot
|
|
6
|
+
Take a manual context snapshot. This captures file changes and tool usage from the current session transcript.
|
|
8
7
|
|
|
9
8
|
{{#if ARGUMENTS}}
|
|
10
9
|
```bash
|
|
@@ -18,9 +17,22 @@ npx @tyroneross/bookmark snapshot --trigger manual
|
|
|
18
17
|
|
|
19
18
|
After the snapshot is taken, confirm to the user with:
|
|
20
19
|
- The snapshot ID
|
|
21
|
-
- Number of decisions captured
|
|
22
20
|
- Number of files tracked
|
|
23
|
-
- Number of
|
|
24
|
-
|
|
21
|
+
- Number of tools tracked
|
|
22
|
+
|
|
23
|
+
Then write the semantic handoff to the absolute path for `.bookmark/bookmark.context.md`.
|
|
24
|
+
Start with `BOOKMARK_IDENTITY` and include these sections:
|
|
25
|
+
|
|
26
|
+
- `## Current task`
|
|
27
|
+
- `## Status`
|
|
28
|
+
- `## Remaining work`
|
|
29
|
+
- `## Decisions`
|
|
30
|
+
- `## Risks and open questions`
|
|
31
|
+
- `## Sources of truth`
|
|
32
|
+
- `## Next steps`
|
|
33
|
+
|
|
34
|
+
Separate completed, validated, committed, pushed, and deployed status. Use absolute paths in
|
|
35
|
+
Sources of truth and Next steps. Point to durable files instead of copying long content, state
|
|
36
|
+
unknowns explicitly, and keep the handoff under 800 tokens.
|
|
25
37
|
|
|
26
38
|
*bookmark — context snapshot*
|
package/commands/status.md
CHANGED
|
@@ -13,7 +13,7 @@ Display the results including:
|
|
|
13
13
|
- Number of snapshots
|
|
14
14
|
- Compaction cycle count
|
|
15
15
|
- Last snapshot time
|
|
16
|
-
- Current
|
|
16
|
+
- Current token threshold, measured usage, and active model when available
|
|
17
17
|
- Time until next scheduled snapshot
|
|
18
18
|
|
|
19
19
|
*bookmark — context snapshot*
|