artshelf 0.6.0 โ 0.8.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/CHANGELOG.md +21 -3
- package/README.md +146 -219
- package/SPEC.md +56 -6
- package/dist/src/cli.js +258 -19
- package/docs/agent-clean.html +108 -0
- package/docs/agent-create.html +98 -0
- package/docs/agent-monitor.html +151 -0
- package/docs/agent-purge.html +111 -0
- package/docs/agent-review.html +120 -0
- package/docs/agent-usage.html +114 -402
- package/docs/agent-usage.md +52 -474
- package/docs/index.html +165 -152
- package/docs/install.html +214 -110
- package/docs/quickstart.html +105 -106
- package/docs/reference.html +239 -164
- package/docs/site.css +675 -490
- package/docs/site.js +398 -0
- package/package.json +1 -1
- package/skills/artshelf/SKILL.md +133 -333
- package/skills/artshelf/scripts/render-review-report.mjs +160 -0
- package/docs/theme.js +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -51,9 +51,27 @@
|
|
|
51
51
|
available below the lead.
|
|
52
52
|
- Tightened the portable agent skill description so the completion-gate trigger
|
|
53
53
|
is visible before final responses, status updates, handoffs, and done reports.
|
|
54
|
-
- Added packaged `ArtshelfReviewReport` schema
|
|
55
|
-
deterministic agent review reports, plus
|
|
56
|
-
`artshelf put --json` registrations.
|
|
54
|
+
- Added packaged `ArtshelfReviewReport` schema, canonical example files, and a
|
|
55
|
+
portable renderer script for deterministic agent review reports, plus
|
|
56
|
+
deterministic footnote guidance for `artshelf put --json` registrations.
|
|
57
|
+
- Split the agent docs into Create, Monitor, Review, Clean, and Purge workflow
|
|
58
|
+
pages backed by shared docs-site chrome, search, and navigation.
|
|
59
|
+
- Added `artshelf update` plus cached npm update notices, with
|
|
60
|
+
`ARTSHELF_NO_UPDATE_CHECK=1` for no-network scheduled jobs.
|
|
61
|
+
|
|
62
|
+
## [0.8.0](https://github.com/calvinnwq/artshelf/compare/artshelf-v0.7.0...artshelf-v0.8.0) (2026-06-11)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
* **cli:** add update command ([#35](https://github.com/calvinnwq/artshelf/issues/35)) ([c55f689](https://github.com/calvinnwq/artshelf/commit/c55f689d1a58a10430d1ea00a1dea5de408e5ac2))
|
|
68
|
+
|
|
69
|
+
## [0.7.0](https://github.com/calvinnwq/artshelf/compare/artshelf-v0.6.0...artshelf-v0.7.0) (2026-06-10)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Features
|
|
73
|
+
|
|
74
|
+
* **docs:** adopt Ledger redesign for docs site ([#32](https://github.com/calvinnwq/artshelf/issues/32)) ([155aaab](https://github.com/calvinnwq/artshelf/commit/155aaab8c44d1e1a2f373cd47e704dde301fc308))
|
|
57
75
|
|
|
58
76
|
## [0.6.0](https://github.com/calvinnwq/artshelf/compare/artshelf-v0.5.0...artshelf-v0.6.0) (2026-06-07)
|
|
59
77
|
|
package/README.md
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
somewhere accountable, with an expiry tag and a cleanup plan.
|
|
3
|
+
# ๐๏ธ Artshelf
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
created in `tmp/`, repo folders, or backup locations and then forgotten. Artshelf
|
|
8
|
-
records why an artifact exists at creation time, then makes later cleanup
|
|
9
|
-
visible and reviewable.
|
|
5
|
+
**Accountable retention for the temporary files agents leave behind.**
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
moment it is created, **review everything safely** before anything moves,
|
|
13
|
-
**approve cleanup safely** from a reviewed plan, and **purge old trash
|
|
14
|
-
explicitly** from a separate reviewed plan. The reference sections further down
|
|
15
|
-
stay out of the way until you need them.
|
|
7
|
+
[](https://www.npmjs.com/package/artshelf) [](https://www.npmjs.com/package/artshelf) [](https://github.com/calvinnwq/artshelf/actions/workflows/ci.yml) [](https://calvinnwq.github.io/artshelf/) [](LICENSE) [](https://x.com/calvinnwq)
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
[**Docs**](https://calvinnwq.github.io/artshelf/) ยท [Quickstart](#quickstart) ยท [Spec](SPEC.md) ยท [Agent setup](INSTALL.md)
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
`artshelf` package name. The existing local/source install path remains supported
|
|
21
|
-
as a fallback.
|
|
11
|
+
</div>
|
|
22
12
|
|
|
23
|
-
|
|
13
|
+
Agents make a mess. Coding agents, workflow runners, and review bots scatter
|
|
14
|
+
debug dumps, backups, and run outputs across `tmp/` and your repo โ then forget
|
|
15
|
+
them. The clutter piles up, and nobody remembers what's safe to delete.
|
|
24
16
|
|
|
25
|
-
|
|
17
|
+
Artshelf makes that mess accountable. Every artifact is logged with a reason, an
|
|
18
|
+
expiry, and a cleanup plan the moment it's created. Later you review the ledger,
|
|
19
|
+
preview a cleanup, and execute only an approved plan โ approval-first, trash
|
|
20
|
+
before delete, `--json` everywhere. No daemon, no surprise deletions, no guessing
|
|
21
|
+
from a filesystem scan.
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
artshelf doctor
|
|
31
|
-
```
|
|
23
|
+
> **Status:** early v1 MVP, published to npm as the unscoped `artshelf` package.
|
|
24
|
+
|
|
25
|
+
## Quickstart
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
Install globally โ all methods end with the same `artshelf` command (requires
|
|
28
|
+
Node.js 22+):
|
|
34
29
|
|
|
35
30
|
```bash
|
|
31
|
+
# npm
|
|
32
|
+
npm install -g artshelf
|
|
33
|
+
|
|
34
|
+
# pnpm
|
|
36
35
|
pnpm add -g artshelf
|
|
36
|
+
|
|
37
|
+
# verify
|
|
37
38
|
artshelf --version
|
|
38
39
|
artshelf doctor
|
|
40
|
+
|
|
41
|
+
# later, for npm installs
|
|
42
|
+
artshelf update
|
|
39
43
|
```
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
<details>
|
|
46
|
+
<summary>Install from source</summary>
|
|
43
47
|
|
|
44
48
|
```bash
|
|
45
49
|
git clone https://github.com/calvinnwq/artshelf.git
|
|
@@ -52,179 +56,83 @@ artshelf --version
|
|
|
52
56
|
artshelf doctor
|
|
53
57
|
```
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
`npm link` connects the checkout to your global npm bin, so later rebuilds update
|
|
60
|
+
the command. Remove an npm install with `npm uninstall -g artshelf`; a source
|
|
61
|
+
install with `npm unlink -g artshelf`.
|
|
62
|
+
</details>
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
npm
|
|
60
|
-
|
|
64
|
+
Artshelf checks npm occasionally and prints a non-blocking notice to stderr when
|
|
65
|
+
a newer published version is available. Run `artshelf update` only for npm
|
|
66
|
+
global installs; it upgrades with `npm install -g artshelf@latest`. pnpm global
|
|
67
|
+
installs should update with `pnpm add -g artshelf@latest`, and source installs
|
|
68
|
+
still update by pulling, rebuilding, and linking the checkout. Set
|
|
69
|
+
`ARTSHELF_NO_UPDATE_CHECK=1` for scheduled jobs that must avoid network and
|
|
70
|
+
update-cache writes.
|
|
61
71
|
|
|
62
|
-
|
|
72
|
+
### Recommended agent setup
|
|
63
73
|
|
|
64
|
-
Artshelf is
|
|
65
|
-
|
|
74
|
+
Artshelf is agent-operated, so let your agent finish the job. Paste this one line
|
|
75
|
+
into your coding agent:
|
|
66
76
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Record an artifact the moment it is created, while the reason is still fresh:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
artshelf put tmp/run-output --reason "debug parser output" --ttl 3d --kind scratch --cleanup trash
|
|
77
|
+
```text
|
|
78
|
+
Follow the instructions in https://github.com/calvinnwq/artshelf/blob/main/INSTALL.md to set up Artshelf in this workspace.
|
|
73
79
|
```
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
It will install the CLI, copy the portable skill (with its bundled review-report
|
|
82
|
+
renderer), register any existing project ledgers, and โ only with your approval โ
|
|
83
|
+
schedule a **read-only** daily review. Scheduled jobs review and report only;
|
|
84
|
+
cleanup and purge execution always come back to you. See [INSTALL.md](INSTALL.md)
|
|
85
|
+
for the full steps.
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
## How it works
|
|
78
88
|
|
|
79
|
-
|
|
89
|
+
The whole lifecycle is five steps, and every step that touches files is gated on
|
|
90
|
+
a reviewed plan a human approved:
|
|
80
91
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
artshelf
|
|
84
|
-
artshelf due
|
|
85
|
-
artshelf cleanup --dry-run
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Because this example keeps the artifact for three days, an immediate dry-run
|
|
89
|
-
reports `not-created` and writes no plan. A dry-run returns a real plan id only
|
|
90
|
-
after `due` shows cleanup entries.
|
|
91
|
-
|
|
92
|
-
### 3. Approve cleanup safely
|
|
93
|
-
|
|
94
|
-
Execute only from a reviewed plan id, and only after a human approves it:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
artshelf cleanup --execute --plan-id plan_20260601_120000_ab12
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
There is no auto-execute, no global execute, and no fresh-plan-then-execute
|
|
101
|
-
shortcut. Execution writes a receipt and updates the touched ledger records.
|
|
92
|
+
| Step | What happens | Command |
|
|
93
|
+
|------|--------------|---------|
|
|
94
|
+
| **1. Register** | Record an artifact the moment it is created, while the reason is fresh. Returns an id. | `artshelf put <path> --reason "โฆ" --ttl 3d --kind scratch --cleanup trash` |
|
|
95
|
+
| **2. Monitor** | Read-only checks across all known ledgers โ moves nothing. | `artshelf status --all --json` ยท `artshelf due --all` |
|
|
96
|
+
| **3. Review** | Preview a cleanup plan. A real plan id appears only once entries are due. | `artshelf review --all` ยท `artshelf cleanup --dry-run` |
|
|
97
|
+
| **4. Clean** | Execute exactly the reviewed plan id, after approval. Trashes, never deletes. | `artshelf cleanup --execute --plan-id <id>` |
|
|
98
|
+
| **5. Purge** | Permanently remove old trashed artifacts via a *separate* reviewed plan. | `artshelf trash purge --older-than 30d --dry-run` โ `--execute --plan-id <id>` |
|
|
102
99
|
|
|
103
|
-
|
|
100
|
+
Trash is the holding area between steps 4 and 5: cleanup quarantines artifacts
|
|
101
|
+
into Artshelf's local trash (`artshelf trash list`), and only a separately
|
|
102
|
+
reviewed purge removes them for good โ a second approval boundary before
|
|
103
|
+
destructive deletion.
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
folder. Those trashed records remain discoverable (`artshelf trash list`) for review
|
|
107
|
-
and should only be physically removed through a separately reviewed trash purge
|
|
108
|
-
plan:
|
|
105
|
+
## Safety model
|
|
109
106
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
- **Ledger-first**, not filesystem-scan-first โ every artifact is a recorded decision.
|
|
108
|
+
- **Dry-run before mutation**, and execute only from a reviewed plan id.
|
|
109
|
+
- **No daemon, no auto-execute, no global execute** โ `--all` is read-only or
|
|
110
|
+
dry-run reporting; cleanup and purge refuse it.
|
|
111
|
+
- **No fresh-plan-then-execute shortcut** โ review the plan, then run that plan.
|
|
112
|
+
- **Trash before delete** โ `cleanup=delete` stays refused; physical deletion
|
|
113
|
+
needs its own reviewed trash purge. No silent deletion, ever.
|
|
114
|
+
- **`--json` on every command**, so agents can act on structured output.
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
## Reference
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
By default, Artshelf writes repo-local `.artshelf/ledger.jsonl` inside a git repo and
|
|
120
|
-
`~/.artshelf/ledger.jsonl` outside one. Use `--ledger <path>` and an isolated
|
|
121
|
-
`--registry <path>` for tests, demos, and unusual workflows:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
artshelf put /tmp/parser-output --reason "parser fixture" --ttl 1d --ledger /tmp/artshelf-ledger.jsonl --registry /tmp/artshelf-registry.json --json
|
|
125
|
-
artshelf list --ledger /tmp/artshelf-ledger.jsonl
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Artshelf also keeps a small global registry of known ledgers at
|
|
129
|
-
`~/.artshelf/ledgers.json`. Override it with `--registry <path>` or
|
|
130
|
-
`ARTSHELF_REGISTRY`; renamed installs still honor legacy `SHELF_REGISTRY` when
|
|
131
|
-
`ARTSHELF_REGISTRY` is unset. `put` registers its ledger automatically, and you
|
|
132
|
-
can register an existing ledger explicitly:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
artshelf ledgers list
|
|
136
|
-
artshelf ledgers add --ledger /path/to/repo/.artshelf/ledger.jsonl --name my-repo
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Renamed installs before `0.5.0` used `.shelf` storage paths. Migrate by copying
|
|
140
|
-
each ledger directory to `.artshelf`, rewriting registry paths to the copied
|
|
141
|
-
ledgers, validating with `artshelf ledgers list --json`, and keeping the old
|
|
142
|
-
`.shelf` directories until rollback is no longer needed.
|
|
143
|
-
|
|
144
|
-
`artshelf ledgers list` validates each registered ledger by default โ reporting
|
|
145
|
-
ok/missing/invalid status with entry counts, and exiting non-zero when the
|
|
146
|
-
registry or any ledger is broken โ so it doubles as a stale-entry check. Add
|
|
147
|
-
`--plain` for the fast listing that skips validation.
|
|
148
|
-
|
|
149
|
-
Use `--all` for one read-only discovery entry point across registered ledgers:
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
artshelf review --all --json
|
|
153
|
-
artshelf status --all --json
|
|
154
|
-
artshelf due --all --json
|
|
155
|
-
artshelf trash list --all --json
|
|
156
|
-
artshelf find --all --owner <agent-or-runtime> --json
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
`artshelf review --all` adds an aggregate triage summary (affected ledgers, due,
|
|
160
|
-
manual-review, missing-path, executable, and skipped counts plus preview plan
|
|
161
|
-
ids) and states the next safe action, while staying read-only.
|
|
162
|
-
|
|
163
|
-
Use global dry-run cleanup when you want Artshelf to write cleanup plans for
|
|
164
|
-
registered ledgers with cleanup entries, without moving files:
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
artshelf cleanup --dry-run --all --json
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Global execution is intentionally refused. To mutate files, review a dry-run
|
|
171
|
-
plan, then execute it against the specific ledger that produced it.
|
|
172
|
-
Repeated dry-runs with the same executable cleanup entries reuse the existing
|
|
173
|
-
plan id and refresh its timestamp instead of creating duplicate plan files.
|
|
174
|
-
|
|
175
|
-
## Safety Model
|
|
176
|
-
|
|
177
|
-
- Ledger-first, not filesystem-scan-first.
|
|
178
|
-
- Dry-run before mutation.
|
|
179
|
-
- Execute only from a reviewed plan id.
|
|
180
|
-
- No daemon or auto-execute path.
|
|
181
|
-
- No global execute; cleanup execute and trash purge refuse `--all`.
|
|
182
|
-
`--all` is read-only or dry-run reporting only.
|
|
183
|
-
- No fresh-plan-then-execute shortcut.
|
|
184
|
-
- Trash/review by default, not delete.
|
|
185
|
-
- No silent deletion; `cleanup=delete` stays refused, and trash purge needs its own reviewed plan.
|
|
186
|
-
- Agent-friendly JSON output from every command.
|
|
187
|
-
- Small enough to actually use.
|
|
188
|
-
|
|
189
|
-
V1 only moves `cleanup=trash` entries into Artshelf's local trash folder. Entries
|
|
190
|
-
marked `cleanup=review` become `review-required`, and `cleanup=delete` is
|
|
191
|
-
refused as `cleanup-refused`; physical deletion only happens through a separate
|
|
192
|
-
reviewed `artshelf trash purge --execute` plan.
|
|
193
|
-
|
|
194
|
-
Dry-run cleanup writes a plan only when there are executable cleanup entries.
|
|
195
|
-
No-op dry-runs report `not-created` and avoid writing plan files. When Artshelf does
|
|
196
|
-
write a plan, it also records that plan in the ledger as an Artshelf-owned artifact.
|
|
197
|
-
|
|
198
|
-
After `cleanup --execute`, Artshelf writes a receipt, records the receipt as a
|
|
199
|
-
Artshelf-owned artifact, and updates touched ledger records. Handled records stop
|
|
200
|
-
appearing in `due` and future dry-run cleanup plans, while `artshelf list` still
|
|
201
|
-
keeps the audit trail visible.
|
|
202
|
-
|
|
203
|
-
## Commands
|
|
118
|
+
<details>
|
|
119
|
+
<summary>All commands</summary>
|
|
204
120
|
|
|
205
121
|
```bash
|
|
206
122
|
artshelf put <path> --reason "debug parser output" --ttl 3d --kind scratch
|
|
207
|
-
artshelf ledgers list
|
|
208
|
-
artshelf ledgers list --plain
|
|
123
|
+
artshelf ledgers list [--plain]
|
|
209
124
|
artshelf ledgers add --ledger <path>
|
|
210
|
-
artshelf list
|
|
211
|
-
artshelf list --all
|
|
212
|
-
artshelf list --status active
|
|
125
|
+
artshelf list [--all] [--status active]
|
|
213
126
|
artshelf find --path <path> --owner <agent-or-runtime> --label <task-or-run-id>
|
|
214
127
|
artshelf find --all --owner <agent-or-runtime>
|
|
215
|
-
artshelf get <id>
|
|
216
|
-
artshelf
|
|
217
|
-
artshelf
|
|
218
|
-
artshelf
|
|
219
|
-
artshelf
|
|
220
|
-
artshelf validate --all
|
|
221
|
-
artshelf review
|
|
222
|
-
artshelf review --all
|
|
128
|
+
artshelf get <id> [--all]
|
|
129
|
+
artshelf due [--all]
|
|
130
|
+
artshelf validate [--all]
|
|
131
|
+
artshelf review [--all]
|
|
132
|
+
artshelf status [--all]
|
|
223
133
|
artshelf doctor
|
|
224
|
-
artshelf
|
|
225
|
-
artshelf
|
|
226
|
-
artshelf cleanup --dry-run
|
|
227
|
-
artshelf cleanup --dry-run --all
|
|
134
|
+
artshelf update [--json]
|
|
135
|
+
artshelf cleanup --dry-run [--all]
|
|
228
136
|
artshelf cleanup --execute --plan-id <id>
|
|
229
137
|
artshelf trash list [--all] [--ledger <path>] [--json]
|
|
230
138
|
artshelf trash purge --older-than <ttl> --dry-run [--ledger <path>] [--json]
|
|
@@ -232,67 +140,86 @@ artshelf trash purge --execute --plan-id <id> [--ledger <path>] [--json]
|
|
|
232
140
|
artshelf resolve <id> --status resolved --reason "inspected and no longer needed"
|
|
233
141
|
```
|
|
234
142
|
|
|
235
|
-
Use `artshelf help` or `artshelf help <command>` for
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
See the [docs site](https://calvinnwq.github.io/artshelf/) for install,
|
|
239
|
-
quickstart, agent usage, and CLI reference. The source repo also keeps the
|
|
240
|
-
[v1 spec](SPEC.md) and [agent usage guide](docs/agent-usage.md).
|
|
143
|
+
Use `artshelf help` or `artshelf help <command>` for details. All core commands
|
|
144
|
+
support `--json`.
|
|
145
|
+
</details>
|
|
241
146
|
|
|
242
|
-
|
|
147
|
+
<details>
|
|
148
|
+
<summary>Explicit ledgers and <code>--all</code> discovery</summary>
|
|
243
149
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
registration, why `artshelf find` / `artshelf get` are the read-only idempotency
|
|
248
|
-
lookup surface, why `cleanup --execute` requires explicit approval for a
|
|
249
|
-
reviewed plan id, how to render dry-run cleanup and trash purge plans as
|
|
250
|
-
review-report decision packets, how to review trashed records with
|
|
251
|
-
`artshelf trash list` before a separately approved trash purge, and when
|
|
252
|
-
`artshelf resolve <id> --status resolved --reason <text>` may mark confirmed
|
|
253
|
-
handled, missing, or no-longer-needed records without moving or deleting files.
|
|
254
|
-
|
|
255
|
-
The same skill ships in the npm package alongside
|
|
256
|
-
`schemas/artshelf-review-report.schema.json` and the canonical
|
|
257
|
-
`examples/artshelf-review-report.json` packet. From a source checkout, use
|
|
258
|
-
`skills/artshelf/SKILL.md` directly. Agents should ask where the user wants
|
|
259
|
-
Artshelf cloned before installing or linking it.
|
|
260
|
-
|
|
261
|
-
## Development
|
|
150
|
+
By default, Artshelf writes repo-local `.artshelf/ledger.jsonl` inside a git repo
|
|
151
|
+
and `~/.artshelf/ledger.jsonl` outside one. Use `--ledger <path>` and an isolated
|
|
152
|
+
`--registry <path>` for tests, demos, and unusual workflows:
|
|
262
153
|
|
|
263
154
|
```bash
|
|
264
|
-
|
|
265
|
-
|
|
155
|
+
artshelf put /tmp/parser-output --reason "parser fixture" --ttl 1d --ledger /tmp/artshelf-ledger.jsonl --registry /tmp/artshelf-registry.json --json
|
|
156
|
+
artshelf list --ledger /tmp/artshelf-ledger.jsonl
|
|
266
157
|
```
|
|
267
158
|
|
|
268
|
-
|
|
159
|
+
Artshelf keeps a small global registry of known ledgers at
|
|
160
|
+
`~/.artshelf/ledgers.json` (override with `--registry <path>` or
|
|
161
|
+
`ARTSHELF_REGISTRY`). `put` registers its ledger automatically; register an
|
|
162
|
+
existing one with `artshelf ledgers add --ledger <path> --name <project>`.
|
|
163
|
+
`artshelf ledgers list` validates each registered ledger by default (ok/missing/invalid
|
|
164
|
+
status with counts, non-zero exit when broken), so it doubles as a stale-entry
|
|
165
|
+
check; add `--plain` to skip validation.
|
|
166
|
+
|
|
167
|
+
Use `--all` for one read-only discovery entry point across registered ledgers
|
|
168
|
+
(`review`, `status`, `due`, `trash list`, `find`). `artshelf cleanup --dry-run --all`
|
|
169
|
+
writes plans for ledgers with executable entries without moving files. Global
|
|
170
|
+
execution is intentionally refused: to mutate files, review a dry-run plan, then
|
|
171
|
+
execute it against the specific ledger that produced it.
|
|
172
|
+
</details>
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary>Agent skill</summary>
|
|
176
|
+
|
|
177
|
+
The package includes an agent-facing skill at `skills/artshelf`. Agents that
|
|
178
|
+
support local skills can copy or reference this directory to learn when to call
|
|
179
|
+
`artshelf put`, how to report deterministic footnotes after JSON registration,
|
|
180
|
+
why `artshelf find` / `artshelf get` are the read-only idempotency lookup surface,
|
|
181
|
+
why `cleanup --execute` requires an approved reviewed plan id, how to render
|
|
182
|
+
dry-run cleanup and trash purge plans as review-report decision packets, and when
|
|
183
|
+
`artshelf resolve <id> --status resolved --reason <text>` may mark a record handled
|
|
184
|
+
without moving or deleting files.
|
|
185
|
+
|
|
186
|
+
The skill ships in the npm package alongside `scripts/render-review-report.mjs`,
|
|
187
|
+
`schemas/artshelf-review-report.schema.json`, and the canonical
|
|
188
|
+
`examples/artshelf-review-report.json` packet. Copy the whole `skills/artshelf`
|
|
189
|
+
directory so the renderer, schema, and examples travel together.
|
|
190
|
+
</details>
|
|
191
|
+
|
|
192
|
+
<details>
|
|
193
|
+
<summary>Development</summary>
|
|
269
194
|
|
|
270
195
|
```bash
|
|
271
|
-
pnpm
|
|
196
|
+
pnpm install
|
|
197
|
+
pnpm check # build + test
|
|
198
|
+
pnpm docs:serve # preview docs at http://127.0.0.1:8080/
|
|
272
199
|
```
|
|
273
200
|
|
|
274
|
-
|
|
201
|
+
Release Please owns version bumps, changelog, tags, and releases. When a Release
|
|
202
|
+
Please PR merges, the release workflow validates with `pnpm check` and publishes
|
|
203
|
+
`artshelf` to npm through npm Trusted Publishing โ no long-lived npm token in
|
|
204
|
+
GitHub secrets. During tests or one-off runs, pass both `--ledger <path>` and
|
|
205
|
+
`--registry <path>` to keep entries out of default Artshelf storage.
|
|
206
|
+
</details>
|
|
275
207
|
|
|
276
|
-
|
|
277
|
-
When a Release Please PR is merged and a release is created, the release workflow
|
|
278
|
-
validates the package with `pnpm check` and publishes `artshelf` to npm through
|
|
279
|
-
npm Trusted Publishing. The npm package must have this repository's release
|
|
280
|
-
workflow configured as a trusted publisher; no long-lived npm token is expected
|
|
281
|
-
in GitHub secrets.
|
|
208
|
+
## Learn more
|
|
282
209
|
|
|
283
|
-
|
|
284
|
-
|
|
210
|
+
- **[Docs site](https://calvinnwq.github.io/artshelf/)** โ install, quickstart, agent usage, and CLI reference.
|
|
211
|
+
- **[v1 spec](SPEC.md)** โ the full behavioral contract.
|
|
212
|
+
- **[Agent usage guide](docs/agent-usage.md)** โ deeper agent integration notes.
|
|
285
213
|
|
|
286
214
|
## Contributing
|
|
287
215
|
|
|
288
216
|
Artshelf is small on purpose. Keep new behavior ledger-first, previewable, and
|
|
289
217
|
covered by tests. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
290
218
|
|
|
291
|
-
## Support
|
|
219
|
+
## Support and security
|
|
292
220
|
|
|
293
221
|
Use [GitHub issues](https://github.com/calvinnwq/artshelf/issues) for bugs and
|
|
294
|
-
feature ideas. See
|
|
295
|
-
[SUPPORT.md](SUPPORT.md) and [SECURITY.md](SECURITY.md).
|
|
222
|
+
feature ideas. See [SUPPORT.md](SUPPORT.md) and [SECURITY.md](SECURITY.md).
|
|
296
223
|
|
|
297
224
|
## License
|
|
298
225
|
|
package/SPEC.md
CHANGED
|
@@ -284,6 +284,45 @@ ledger exits non-zero. Due entries are normal operational state and do not chang
|
|
|
284
284
|
the exit code. With single `--ledger`, a not-yet-created ledger reports empty
|
|
285
285
|
counts.
|
|
286
286
|
|
|
287
|
+
### `artshelf update`
|
|
288
|
+
|
|
289
|
+
Checks the latest published npm version and, for npm global installs, updates the
|
|
290
|
+
package with npm.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
artshelf update
|
|
294
|
+
artshelf update --json
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Rules:
|
|
298
|
+
|
|
299
|
+
- Normal commands may perform a best-effort npm update check after command
|
|
300
|
+
handling and print a non-blocking notice to stderr when a newer version is
|
|
301
|
+
available.
|
|
302
|
+
- Read-only command guarantees refer to ledger and artifact mutation; automatic
|
|
303
|
+
update-check cache writes are separate and can be disabled.
|
|
304
|
+
- Update notices must never pollute JSON stdout.
|
|
305
|
+
- Automatic checks cache successful and failed latest-version lookups at
|
|
306
|
+
`~/.artshelf/update-check.json` by default, with a 24-hour TTL.
|
|
307
|
+
- `ARTSHELF_NO_UPDATE_CHECK=1` disables automatic checks for scheduled jobs,
|
|
308
|
+
tests, and no-network environments.
|
|
309
|
+
- `ARTSHELF_UPDATE_CACHE` overrides the update-cache path,
|
|
310
|
+
`ARTSHELF_UPDATE_CHECK_TTL_MS` overrides the cache TTL, and
|
|
311
|
+
`ARTSHELF_NPM_REGISTRY_URL` overrides the npm latest-version endpoint.
|
|
312
|
+
- `ARTSHELF_LATEST_VERSION` overrides the discovered latest version for tests.
|
|
313
|
+
- `ARTSHELF_UPDATE_DRY_RUN=1` makes `artshelf update` report the npm command it
|
|
314
|
+
would run without invoking npm.
|
|
315
|
+
- `artshelf update` forces a fresh latest-version check and does not run the
|
|
316
|
+
automatic post-command notice check.
|
|
317
|
+
- If the current version is already current, update exits 0 and reports that no
|
|
318
|
+
update was installed.
|
|
319
|
+
- When an update is available, `artshelf update` runs
|
|
320
|
+
`npm install -g artshelf@latest`; `--json` captures npm stdout/stderr and
|
|
321
|
+
returns npm's exit code.
|
|
322
|
+
- `artshelf update` is for npm global installs only. pnpm global installs should
|
|
323
|
+
use `pnpm add -g artshelf@latest`; source installs should pull, rebuild, and
|
|
324
|
+
link the checkout again.
|
|
325
|
+
|
|
287
326
|
### `artshelf cleanup --dry-run`
|
|
288
327
|
|
|
289
328
|
Creates a cleanup plan when there are executable cleanup entries, but does not
|
|
@@ -450,6 +489,10 @@ V1 also supports a user-level registry of known ledgers:
|
|
|
450
489
|
- Retention and due calculations use wall-clock time by default. `ARTSHELF_NOW`
|
|
451
490
|
overrides it for tests and controlled runs; legacy `SHELF_NOW` is read only
|
|
452
491
|
when `ARTSHELF_NOW` is unset.
|
|
492
|
+
- Automatic npm update checks cache their latest-version result at
|
|
493
|
+
`~/.artshelf/update-check.json` by default. `ARTSHELF_NO_UPDATE_CHECK=1`
|
|
494
|
+
disables automatic checks, `ARTSHELF_UPDATE_CACHE` overrides the cache path,
|
|
495
|
+
and `ARTSHELF_UPDATE_CHECK_TTL_MS` overrides the cache TTL.
|
|
453
496
|
- `put` registers the ledger it writes to.
|
|
454
497
|
- `ledgers add` registers an existing ledger explicitly.
|
|
455
498
|
- `--all` reads registered ledgers as one review surface.
|
|
@@ -632,6 +675,9 @@ artshelf trash list --all --json
|
|
|
632
675
|
artshelf trash purge --older-than <ttl> --dry-run --ledger <path> --json
|
|
633
676
|
```
|
|
634
677
|
|
|
678
|
+
Set `ARTSHELF_NO_UPDATE_CHECK=1` for scheduled jobs that must avoid npm network
|
|
679
|
+
checks and update-cache writes.
|
|
680
|
+
|
|
635
681
|
`artshelf review --all --json` is the read-only all-ledger triage surface;
|
|
636
682
|
scheduled reports should include its aggregate `summary` and `nextAction` when
|
|
637
683
|
whole-machine review is needed.
|
|
@@ -645,10 +691,12 @@ When a scheduled review or dry-run produces cleanup or trash purge plans,
|
|
|
645
691
|
deterministic integrations should build an `ArtshelfReviewReport` packet first,
|
|
646
692
|
then render a compact decision report from it. The packet schema is
|
|
647
693
|
`schemas/artshelf-review-report.schema.json`, the canonical example is
|
|
648
|
-
`examples/artshelf-review-report.json`, and
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
694
|
+
`examples/artshelf-review-report.json`, and the portable skill includes
|
|
695
|
+
`scripts/render-review-report.mjs` for deterministic text rendering. Packaged
|
|
696
|
+
docs/skills carry matching copies for browsable docs and portable agent
|
|
697
|
+
installs. The report groups decisions into ready-for-approval,
|
|
698
|
+
needs-review-first, and blocked sections, and must still include exact approval
|
|
699
|
+
targets in the message body.
|
|
652
700
|
|
|
653
701
|
Scheduled jobs must never run `artshelf cleanup --execute` or
|
|
654
702
|
`artshelf trash purge --execute`; they may only dry-run and report plans for later
|
|
@@ -681,6 +729,8 @@ human review.
|
|
|
681
729
|
- CLI reports a read-only daily dashboard through `artshelf status`, with
|
|
682
730
|
`--all --json` suitable for cron and human output short enough to paste into
|
|
683
731
|
a chat; status never creates plans, receipts, or records.
|
|
732
|
+
- CLI can check for npm package updates, print non-blocking stderr notices, and
|
|
733
|
+
update npm global installs through `artshelf update`.
|
|
684
734
|
- Cleanup dry-run creates a plan id only when there are executable cleanup
|
|
685
735
|
entries; no-op dry-runs do not write plan files.
|
|
686
736
|
- Cleanup dry-run and execute register the plan/receipt artifacts that Artshelf
|
|
@@ -690,8 +740,8 @@ human review.
|
|
|
690
740
|
- CLI can list trashed records (single ledger or `--all`) and purge them through
|
|
691
741
|
an approval-first, ledger-scoped dry-run/execute boundary that writes a purge
|
|
692
742
|
receipt; purge refuses `--all` and never deletes without a reviewed plan id.
|
|
693
|
-
- Package includes the deterministic `ArtshelfReviewReport` schema
|
|
694
|
-
example for agent-rendered review reports.
|
|
743
|
+
- Package includes the deterministic `ArtshelfReviewReport` schema, canonical
|
|
744
|
+
example, and portable renderer script for agent-rendered review reports.
|
|
695
745
|
- All core commands support `--json`.
|
|
696
746
|
- Tests cover record/list/find/get/status-filter/due/validate/resolve/registry,
|
|
697
747
|
`artshelf doctor`, the `artshelf status` dashboard, `--all` review, stale-registry,
|