artshelf 0.6.0 → 0.7.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 +12 -3
- package/README.md +48 -20
- package/SPEC.md +8 -6
- package/docs/agent-clean.html +126 -0
- package/docs/agent-create.html +98 -0
- package/docs/agent-monitor.html +150 -0
- package/docs/agent-review.html +120 -0
- package/docs/agent-usage.html +110 -402
- package/docs/agent-usage.md +36 -463
- package/docs/index.html +160 -152
- package/docs/install.html +187 -109
- package/docs/quickstart.html +105 -106
- package/docs/reference.html +214 -164
- package/docs/site.css +675 -490
- package/docs/site.js +397 -0
- package/package.json +1 -1
- package/skills/artshelf/SKILL.md +127 -330
- package/skills/artshelf/scripts/render-review-report.mjs +160 -0
- package/docs/theme.js +0 -42
package/skills/artshelf/SKILL.md
CHANGED
|
@@ -6,63 +6,46 @@ description: "Use before any final response, status update, handoff, or done rep
|
|
|
6
6
|
# Artshelf
|
|
7
7
|
|
|
8
8
|
Artshelf is a tiny CLI for accountable temporary artifact retention. Use this
|
|
9
|
-
skill when
|
|
10
|
-
command but should not be kept forever.
|
|
9
|
+
skill when work creates or reviews non-source files that should survive the
|
|
10
|
+
current command but should not be kept forever.
|
|
11
11
|
|
|
12
|
-
Core rule: register artifacts at creation time, while the reason is still
|
|
13
|
-
|
|
12
|
+
Core rule: register artifacts at creation time, while the reason is still fresh.
|
|
13
|
+
Humans approve dangerous mutations; agents install, register, monitor, produce
|
|
14
|
+
review packets, and verify results.
|
|
14
15
|
|
|
15
16
|
## Contract
|
|
16
17
|
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
- When `artshelf put --json` succeeds, report a deterministic Artshelf footnote
|
|
29
|
-
in the same handoff, status, final response, or run summary that mentions the
|
|
30
|
-
artifact. Include the path, Artshelf id, short reason, due date or
|
|
31
|
-
`manual-review`, and cleanup mode.
|
|
32
|
-
- Cleanup execution is approval-only. Read-only review is fine; mutation needs
|
|
33
|
-
a reviewed plan id and explicit human approval.
|
|
34
|
-
|
|
35
|
-
## Register
|
|
36
|
-
|
|
37
|
-
Check the installed CLI first:
|
|
18
|
+
- Before final/status/handoff/done, check whether the task created, copied,
|
|
19
|
+
exported, quarantined, backed up, or preserved any non-source file or
|
|
20
|
+
directory that may outlive this command.
|
|
21
|
+
- Register meaningful eligible artifacts with `artshelf put --json`; otherwise
|
|
22
|
+
record a clear skip reason.
|
|
23
|
+
- Include reason, TTL or manual-review, cleanup mode, owner, and labels.
|
|
24
|
+
- Report the Artshelf id anywhere restart or cleanup context matters.
|
|
25
|
+
- Use read-only commands freely; execute cleanup, trash purge, or resolve only
|
|
26
|
+
after exact human approval.
|
|
27
|
+
- Do not call work done while known eligible artifacts are neither registered
|
|
28
|
+
nor explicitly skipped.
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
artshelf --version
|
|
41
|
-
artshelf doctor
|
|
42
|
-
artshelf help put
|
|
43
|
-
```
|
|
30
|
+
## Setup
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
then verify `artshelf --version` and `artshelf doctor`.
|
|
32
|
+
Check for the CLI first:
|
|
47
33
|
|
|
48
34
|
```bash
|
|
49
|
-
npm install -g artshelf
|
|
50
35
|
artshelf --version
|
|
51
36
|
artshelf doctor
|
|
37
|
+
artshelf help put
|
|
52
38
|
```
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
If missing, install from npm when appropriate:
|
|
55
41
|
|
|
56
42
|
```bash
|
|
57
|
-
|
|
58
|
-
artshelf --version
|
|
43
|
+
npm install -g artshelf
|
|
59
44
|
artshelf doctor
|
|
60
45
|
```
|
|
61
46
|
|
|
62
|
-
For source installs, ask
|
|
63
|
-
|
|
64
|
-
then verify `artshelf --version` and `artshelf doctor`. Do not create a custom
|
|
65
|
-
shim.
|
|
47
|
+
For source installs, ask where to clone the repo. Do not hard-code a personal
|
|
48
|
+
repo path or create a custom shim.
|
|
66
49
|
|
|
67
50
|
```bash
|
|
68
51
|
git clone https://github.com/calvinnwq/artshelf.git "$ARTSHELF_REPO"
|
|
@@ -71,171 +54,149 @@ corepack enable
|
|
|
71
54
|
pnpm install --frozen-lockfile
|
|
72
55
|
pnpm run build
|
|
73
56
|
npm link
|
|
74
|
-
artshelf --version
|
|
75
57
|
artshelf doctor
|
|
76
58
|
```
|
|
77
59
|
|
|
78
|
-
|
|
60
|
+
Install, copy, or reference this portable skill only after the user chooses the
|
|
61
|
+
integration path. Offer to schedule read-only review job delivery in the host
|
|
62
|
+
runtime.
|
|
63
|
+
|
|
64
|
+
## Create
|
|
65
|
+
|
|
66
|
+
Use lookup-before-put for idempotent registration:
|
|
79
67
|
|
|
80
68
|
```bash
|
|
81
|
-
artshelf
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
--kind run-artifact \
|
|
85
|
-
--cleanup review \
|
|
86
|
-
--owner agent \
|
|
87
|
-
--label <project-or-task> \
|
|
88
|
-
--json
|
|
69
|
+
artshelf find --path <path> --owner <agent-or-runtime> --label <task-or-run-id> --json
|
|
70
|
+
artshelf put <path> --reason "<why this exists>" --ttl 3d --kind run-artifact --cleanup review --owner agent --label <project-or-task> --json
|
|
71
|
+
artshelf get <id> --json
|
|
89
72
|
```
|
|
90
73
|
|
|
91
|
-
|
|
74
|
+
Register backups, quarantine folders, debug output, generated reports, long-run
|
|
75
|
+
evidence, and copied files kept for review. Skip source files, cheap regenerated
|
|
76
|
+
build output, dependency caches, secrets, credential dumps, and artifacts already
|
|
77
|
+
owned by another durable ledger.
|
|
92
78
|
|
|
93
|
-
|
|
79
|
+
Defaults: `kind=scratch` for temp dirs, `backup` for rollback copies,
|
|
80
|
+
`run-artifact` for logs/reports/evidence, `quarantine` for isolated questionable
|
|
81
|
+
files. Use `cleanup=review` when judgment is needed and `cleanup=trash` only when
|
|
82
|
+
later disposal is clearly safe.
|
|
94
83
|
|
|
95
|
-
|
|
96
|
-
registration:
|
|
84
|
+
When JSON registration succeeds, include this deterministic Artshelf footnote:
|
|
97
85
|
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
artshelf get <id> --json
|
|
86
|
+
```text
|
|
87
|
+
Artshelf footnote: registered <artifact-path> as <artshelf-id>; reason: <short reason>; due: <YYYY-MM-DD|manual-review>; cleanup=<cleanup-mode>.
|
|
101
88
|
```
|
|
102
89
|
|
|
103
|
-
|
|
104
|
-
`--status`. Multiple labels must all match. If a matching record already
|
|
105
|
-
exists, reuse its Artshelf id instead of creating a duplicate record.
|
|
90
|
+
## Monitor
|
|
106
91
|
|
|
107
|
-
Use the ledger registry
|
|
108
|
-
point:
|
|
92
|
+
Use the ledger registry for whole-machine review:
|
|
109
93
|
|
|
110
94
|
```bash
|
|
111
95
|
artshelf ledgers list --json
|
|
112
|
-
artshelf review --all --json
|
|
113
96
|
artshelf status --all --json
|
|
114
|
-
artshelf
|
|
97
|
+
artshelf review --all --json
|
|
115
98
|
artshelf trash list --all --json
|
|
116
99
|
```
|
|
117
100
|
|
|
118
|
-
`artshelf ledgers list --json` reports per-ledger validation status
|
|
119
|
-
|
|
120
|
-
stale registry entries without a separate validate pass; `--plain` skips
|
|
121
|
-
validation. `artshelf review --all --json` adds an aggregate triage summary and the
|
|
122
|
-
next safe action.
|
|
101
|
+
`artshelf ledgers list --json` reports per-ledger validation status. `--plain`
|
|
102
|
+
skips validation. `--all` is for discovery and review, not mutation permission.
|
|
123
103
|
|
|
124
|
-
|
|
125
|
-
them explicitly:
|
|
104
|
+
Register existing project ledgers explicitly:
|
|
126
105
|
|
|
127
106
|
```bash
|
|
128
107
|
artshelf ledgers add --ledger <repo>/.artshelf/ledger.jsonl --name <project> --scope repo --json
|
|
129
108
|
```
|
|
130
109
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
dry-run plan ids/skipped entries, and the next safe action.
|
|
149
|
-
4. Classify each candidate:
|
|
150
|
-
- `trash-safe`: disposable after the reviewed plan moves it into Artshelf trash.
|
|
151
|
-
- `needs-human-review`: `cleanup=review`, evidence, backups, reports, or
|
|
152
|
-
anything that should be inspected before closing.
|
|
153
|
-
- `resolve-candidate`: already handled, missing, or no longer needed; use
|
|
154
|
-
`artshelf resolve` only after confirmation.
|
|
155
|
-
- `registry-problem`: stale, missing, or invalid ledger; fix registry health
|
|
156
|
-
before touching artifacts.
|
|
157
|
-
5. If cleanup execution is appropriate, generate or reuse a dry-run plan, then
|
|
158
|
-
ask for explicit approval naming the ledger path and reviewed plan id.
|
|
159
|
-
6. For any `trash-safe` candidates moved by `cleanup=trash`, run `artshelf trash list`
|
|
160
|
-
and then require a separate reviewed purge plan before physical deletion:
|
|
110
|
+
### Scheduled Review
|
|
111
|
+
|
|
112
|
+
Scheduled jobs are review/report only. Reports should name the ledger path and
|
|
113
|
+
plan id when attention exists. They may run:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
artshelf validate --json
|
|
117
|
+
artshelf due --json
|
|
118
|
+
artshelf review --all --json
|
|
119
|
+
artshelf cleanup --dry-run --json
|
|
120
|
+
artshelf cleanup --dry-run --all --json
|
|
121
|
+
artshelf trash list --all --json
|
|
122
|
+
artshelf doctor --json
|
|
123
|
+
artshelf status --all --json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
For old-trash review, dry-run purge only for an explicit ledger:
|
|
161
127
|
|
|
162
128
|
```bash
|
|
163
|
-
artshelf trash list --ledger <ledger-path>
|
|
164
129
|
artshelf trash purge --older-than 7d --dry-run --ledger <ledger-path> --json
|
|
165
|
-
artshelf trash purge --execute --plan-id <purge-plan-id> --ledger <ledger-path> --json
|
|
166
130
|
```
|
|
167
131
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
132
|
+
Do not scan arbitrary filesystem locations for ledgers unless the user opted
|
|
133
|
+
into that discovery scope. Never schedule cleanup or purge execution:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
artshelf cleanup --execute --plan-id <id>
|
|
137
|
+
artshelf trash purge --execute --plan-id <id>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Review
|
|
141
|
+
|
|
142
|
+
Daily Review Workflow: turn raw Artshelf output into a decision packet, not a
|
|
143
|
+
count dump.
|
|
144
|
+
|
|
145
|
+
1. Run read-only review first: `artshelf ledgers list --json`,
|
|
146
|
+
`artshelf review --all --json`, and `artshelf trash list --all --json`.
|
|
147
|
+
2. If cleanup attention exists, run `artshelf cleanup --dry-run --all --json`.
|
|
148
|
+
3. Classify candidates as `trash-safe`, `needs-human-review`,
|
|
149
|
+
`resolve-candidate`, or `registry-problem`.
|
|
150
|
+
4. Use `ArtshelfReviewReport` from
|
|
151
|
+
`schemas/artshelf-review-report.schema.json`; use
|
|
152
|
+
`examples/artshelf-review-report.json` as the canonical packet.
|
|
153
|
+
5. Render the compact decision card with `scripts/render-review-report.mjs`;
|
|
154
|
+
keep `decisionSummary` in audit, while `decisionGroups` drive counts.
|
|
155
|
+
Emojis are encouraged only in host-specific wrappers, not the renderer.
|
|
156
|
+
6. Always include the exact approval target in the message body as a fallback.
|
|
157
|
+
Do not paste the whole packet into chat unless the user asks for it.
|
|
171
158
|
|
|
172
159
|
### Review Plan Report Schema
|
|
173
160
|
|
|
174
|
-
|
|
175
|
-
in a compact human-readable report. The report should let the user approve, ask
|
|
176
|
-
for changes, or request alternatives without opening the plan file.
|
|
161
|
+
Deterministic renderer:
|
|
177
162
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
locks report structure; the CLI output and approval rules still define cleanup
|
|
183
|
-
safety.
|
|
163
|
+
```bash
|
|
164
|
+
cd /path/to/skills/artshelf
|
|
165
|
+
node scripts/render-review-report.mjs examples/artshelf-review-report.json
|
|
166
|
+
```
|
|
184
167
|
|
|
185
|
-
|
|
186
|
-
`decisionGroups`. Lead with counts, then show exactly what is ready for approval
|
|
187
|
-
and what needs review first. Emojis are encouraged when the host renders them
|
|
188
|
-
well because they make the groups scannable; omit them only for plain-text or
|
|
189
|
-
accessibility-constrained surfaces.
|
|
168
|
+
Expected card shape:
|
|
190
169
|
|
|
191
170
|
```text
|
|
192
171
|
Artshelf daily review
|
|
193
172
|
Status: <ok|attention needed>; registry <ok|attention>
|
|
194
173
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
174
|
+
Ready for approval: <n>
|
|
175
|
+
Needs review first: <n>
|
|
176
|
+
Blocked: <n>
|
|
198
177
|
|
|
199
178
|
Recommended action
|
|
200
|
-
<one short sentence
|
|
179
|
+
<one short sentence>.
|
|
201
180
|
|
|
202
181
|
Ready for approval
|
|
203
|
-
1. <
|
|
204
|
-
Why: <
|
|
205
|
-
Action: <
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
2. <short item label>
|
|
209
|
-
Why: <short reason>
|
|
210
|
-
Action: <ledger-only update, no file changes>
|
|
211
|
-
approve artshelf resolve missing ledger <ledger-path> ids <id...>
|
|
182
|
+
1. <label>
|
|
183
|
+
Why: <reason>
|
|
184
|
+
Action: <next step>
|
|
185
|
+
<approval target>
|
|
212
186
|
|
|
213
187
|
Needs review first
|
|
214
|
-
1. <
|
|
215
|
-
Why: <
|
|
216
|
-
Suggested next step:
|
|
217
|
-
Path: <path>
|
|
188
|
+
1. <label>
|
|
189
|
+
Why: <reason>
|
|
190
|
+
Suggested next step: <next step>
|
|
218
191
|
|
|
219
192
|
Blocked
|
|
220
|
-
<none, or
|
|
193
|
+
<none, or blocker and repair step>
|
|
221
194
|
|
|
222
195
|
Safety
|
|
223
196
|
Dry-run only. No execute, resolve, or delete ran.
|
|
224
197
|
```
|
|
225
198
|
|
|
226
|
-
|
|
227
|
-
an attachment, linked file, or expandable detail when the host supports that.
|
|
228
|
-
Do not paste the whole packet into chat unless the user asks for it. For long
|
|
229
|
-
plans, show only the first 3 to 5 decisions under each visible group, then state
|
|
230
|
-
the hidden count by group and classification. Do not hide refused,
|
|
231
|
-
registry-problem, or missing-path items.
|
|
232
|
-
|
|
233
|
-
If the host supports buttons, menus, or other interactive controls, they should
|
|
234
|
-
emit exact text commands such as the approval targets below. Always include the
|
|
235
|
-
exact approval target in the message body as a fallback for clients where those
|
|
236
|
-
controls do not render.
|
|
237
|
-
|
|
238
|
-
Approval wording should be exact:
|
|
199
|
+
Approval wording:
|
|
239
200
|
|
|
240
201
|
```text
|
|
241
202
|
approve artshelf cleanup ledger <ledger-path> plan <plan-id>
|
|
@@ -244,217 +205,53 @@ approve artshelf resolve missing ledger <ledger-path> ids <id...>
|
|
|
244
205
|
```
|
|
245
206
|
|
|
246
207
|
Never execute from a read-only preview id. Never generate a fresh plan and
|
|
247
|
-
execute it in the same step. `
|
|
248
|
-
deletion requires a separate reviewed trash purge plan.
|
|
249
|
-
|
|
250
|
-
## What To Register
|
|
251
|
-
|
|
252
|
-
Register:
|
|
253
|
-
|
|
254
|
-
- config backups and rollback copies
|
|
255
|
-
- quarantine folders
|
|
256
|
-
- debug output directories
|
|
257
|
-
- generated evidence or reports
|
|
258
|
-
- long-running workflow run artifacts
|
|
259
|
-
- copied files kept for review
|
|
260
|
-
|
|
261
|
-
Skip:
|
|
208
|
+
execute it in the same step. After any approved action, verify with `artshelf review --all --json` and report whether the review is quiet.
|
|
262
209
|
|
|
263
|
-
|
|
264
|
-
- cheap regenerated build outputs
|
|
265
|
-
- dependency caches
|
|
266
|
-
- artifacts already owned by a durable workflow ledger
|
|
267
|
-
- secrets or credential dumps
|
|
210
|
+
## Clean
|
|
268
211
|
|
|
269
|
-
|
|
270
|
-
source-controlled, regeneratable, secret-bearing, already tracked by another
|
|
271
|
-
durable ledger, or user asked not to retain it.
|
|
272
|
-
|
|
273
|
-
## Defaults
|
|
274
|
-
|
|
275
|
-
- `kind=scratch` for temporary working directories.
|
|
276
|
-
- `kind=backup` for rollback copies.
|
|
277
|
-
- `kind=run-artifact` for logs, reports, and generated evidence.
|
|
278
|
-
- `kind=quarantine` for isolated questionable files.
|
|
279
|
-
- `cleanup=review` when judgment is needed later.
|
|
280
|
-
- `cleanup=trash` only when disposal after the retention window is clearly safe.
|
|
281
|
-
- `owner=<agent-or-runtime>` should name the agent, tool, CI job, or human
|
|
282
|
-
process that created the artifact.
|
|
283
|
-
|
|
284
|
-
## Report
|
|
285
|
-
|
|
286
|
-
After registration, include the Artshelf id where the future reader will look:
|
|
287
|
-
|
|
288
|
-
```text
|
|
289
|
-
Artshelf artifact: shf_20260601_182800_ab12, /tmp/parser-output, retain until
|
|
290
|
-
2026-06-04, cleanup=review.
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
When a machine-readable registration succeeds, use the same deterministic
|
|
294
|
-
footnote shape:
|
|
295
|
-
|
|
296
|
-
```text
|
|
297
|
-
Artshelf footnote: registered <artifact-path> as <artshelf-id>; reason: <short reason>; due: <YYYY-MM-DD|manual-review>; cleanup=<cleanup-mode>.
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
## Completion Check
|
|
301
|
-
|
|
302
|
-
Before finalizing a task, review your own file actions:
|
|
303
|
-
|
|
304
|
-
1. Did you create, copy, export, quarantine, back up, or preserve any non-source
|
|
305
|
-
file or directory?
|
|
306
|
-
2. Will any of those paths outlive this command?
|
|
307
|
-
3. If yes, did you register them with Artshelf or state why Artshelf is not
|
|
308
|
-
appropriate?
|
|
309
|
-
|
|
310
|
-
Do not call work done while known eligible artifacts are neither registered nor
|
|
311
|
-
explicitly skipped.
|
|
312
|
-
|
|
313
|
-
## Cleanup
|
|
314
|
-
|
|
315
|
-
Allowed without extra approval because they do not move or delete files:
|
|
212
|
+
Read-only and dry-run commands are safe:
|
|
316
213
|
|
|
317
214
|
```bash
|
|
318
215
|
artshelf validate --json
|
|
319
216
|
artshelf validate --all --json
|
|
320
217
|
artshelf due --json
|
|
321
218
|
artshelf due --all --json
|
|
322
|
-
artshelf review --all --json
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
Cleanup dry-run is safe to run. It writes plan files for later review only when
|
|
326
|
-
there are executable cleanup entries:
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
219
|
artshelf cleanup --dry-run --json
|
|
330
220
|
artshelf cleanup --dry-run --all --json
|
|
331
221
|
```
|
|
332
222
|
|
|
333
|
-
Cleanup execution requires
|
|
223
|
+
Cleanup execution requires approval naming the reviewed ledger and plan id:
|
|
334
224
|
|
|
335
225
|
```bash
|
|
336
|
-
artshelf cleanup --execute --plan-id <id>
|
|
226
|
+
artshelf cleanup --execute --plan-id <id> --ledger <ledger-path> --json
|
|
337
227
|
```
|
|
338
228
|
|
|
339
|
-
|
|
340
|
-
trash purge execution requires separate human approval naming the ledger and
|
|
341
|
-
reviewed purge plan id:
|
|
229
|
+
Trash purge is separate from cleanup and needs its own reviewed purge plan:
|
|
342
230
|
|
|
343
231
|
```bash
|
|
344
|
-
artshelf trash list --ledger <ledger-path>
|
|
232
|
+
artshelf trash list --ledger <ledger-path> --json
|
|
345
233
|
artshelf trash purge --older-than 7d --dry-run --ledger <ledger-path> --json
|
|
346
234
|
artshelf trash purge --execute --plan-id <purge-plan-id> --ledger <ledger-path> --json
|
|
347
235
|
```
|
|
348
236
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
Execution writes a receipt and updates touched ledger records to `trashed`,
|
|
352
|
-
`review-required`, or `cleanup-refused`, so handled artifacts stop reappearing in
|
|
353
|
-
future due and dry-run cleanup output.
|
|
354
|
-
Artshelf records generated plans and receipts as `owner=artshelf` artifacts.
|
|
355
|
-
|
|
356
|
-
You may mark a record manually resolved when the user confirms the artifact was
|
|
357
|
-
inspected, is already missing, or is no longer needed:
|
|
237
|
+
Resolve only after confirmation; it updates the ledger and does not move or
|
|
238
|
+
delete files:
|
|
358
239
|
|
|
359
240
|
```bash
|
|
360
|
-
artshelf resolve <id> --status resolved --reason <
|
|
241
|
+
artshelf resolve <id> --status resolved --reason "<specific reason>" --ledger <ledger-path> --json
|
|
361
242
|
```
|
|
362
243
|
|
|
363
|
-
|
|
364
|
-
delete files. For batches of missing-path records, ask for approval that names
|
|
365
|
-
the exact ledger and ids:
|
|
244
|
+
For batches, ask for exact approval:
|
|
366
245
|
|
|
367
246
|
```text
|
|
368
247
|
approve artshelf resolve missing ledger <ledger-path> ids <id...>
|
|
369
248
|
```
|
|
370
249
|
|
|
371
|
-
After resolution, verify with `artshelf review --all --json` and report whether
|
|
372
|
-
the review is quiet or what remains. Resolved records stop reappearing in future
|
|
373
|
-
due and dry-run cleanup output while remaining visible in
|
|
374
|
-
`artshelf list --status resolved`.
|
|
375
|
-
|
|
376
|
-
## Scheduled Review
|
|
377
|
-
|
|
378
|
-
Agents may schedule routine Artshelf checks for stale artifacts through their host
|
|
379
|
-
runtime, such as an agent cron, CI job, or recurring task. Scheduled jobs are
|
|
380
|
-
review/report only.
|
|
381
|
-
|
|
382
|
-
Allowed in scheduled jobs:
|
|
383
|
-
|
|
384
|
-
```bash
|
|
385
|
-
artshelf validate --json
|
|
386
|
-
artshelf due --json
|
|
387
|
-
artshelf review --all --json
|
|
388
|
-
artshelf cleanup --dry-run --json
|
|
389
|
-
artshelf trash list --ledger <ledger-path> --json
|
|
390
|
-
artshelf trash list --all --json
|
|
391
|
-
artshelf trash purge --older-than 7d --dry-run --ledger <ledger-path> --json
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
Read-only health and dashboard checks are also safe to schedule. Run
|
|
395
|
-
`artshelf review --all --json` for aggregate triage (`summary` and `nextAction`),
|
|
396
|
-
`artshelf doctor --json` to catch a broken or stale registry before relying on
|
|
397
|
-
cleanup planning, and `artshelf status --all --json` for a compact cron summary:
|
|
398
|
-
|
|
399
|
-
```bash
|
|
400
|
-
artshelf doctor --json
|
|
401
|
-
artshelf status --all --json
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
The report should include the ledger path, due/manual-review/missing-path counts,
|
|
405
|
-
cleanup dry-run plan id, executable entries, skipped entries, and refused
|
|
406
|
-
entries. When reporting trash, `artshelf trash list --all --json` may discover trashed
|
|
407
|
-
records across registered ledgers. Include trashed record counts and target ages;
|
|
408
|
-
run purge dry-runs only for an explicit ledger and report any plan id, matching
|
|
409
|
-
entries, and skipped entries. Stay quiet when
|
|
410
|
-
nothing needs attention unless a regular summary was requested.
|
|
411
|
-
|
|
412
|
-
Repeated dry-runs with the same executable cleanup entries reuse the existing
|
|
413
|
-
plan id and refresh that plan file's timestamp instead of creating duplicate
|
|
414
|
-
plans.
|
|
415
|
-
|
|
416
|
-
Use explicit ledger paths for scheduled checks. Do not scan arbitrary filesystem
|
|
417
|
-
locations for ledgers unless the user opted into that discovery scope.
|
|
418
|
-
|
|
419
|
-
Never schedule cleanup execution or trash purge execution. Scheduled jobs may
|
|
420
|
-
only dry-run and report plans for later human review:
|
|
421
|
-
|
|
422
|
-
```bash
|
|
423
|
-
artshelf cleanup --execute --plan-id <id>
|
|
424
|
-
artshelf trash purge --execute --plan-id <id>
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
## Review
|
|
428
|
-
|
|
429
|
-
When asked to review Artshelf state:
|
|
430
|
-
|
|
431
|
-
1. Run `artshelf validate --json`.
|
|
432
|
-
2. Run `artshelf due --json`.
|
|
433
|
-
3. Run `artshelf trash list --json` to surface quarantined artifacts.
|
|
434
|
-
4. If cleanup is requested, run `artshelf cleanup --dry-run --json`.
|
|
435
|
-
5. If old-trash purge review is requested, run
|
|
436
|
-
`artshelf trash purge --older-than <ttl> --dry-run --json` for the explicit
|
|
437
|
-
ledger.
|
|
438
|
-
6. Report plan id, executable entries, skipped entries, refused entries, trashed
|
|
439
|
-
records, and any purge plan id.
|
|
440
|
-
7. Stop before `cleanup --execute` or `trash purge --execute` unless the user
|
|
441
|
-
explicitly approves that reviewed plan id.
|
|
442
|
-
|
|
443
|
-
For a whole-machine Artshelf review, prefer:
|
|
444
|
-
|
|
445
|
-
```bash
|
|
446
|
-
artshelf review --all --json
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
If the user asks for cleanup candidates across projects, run
|
|
450
|
-
`artshelf cleanup --dry-run --all --json` and report each ledger's plan id. Execute
|
|
451
|
-
only a specific reviewed plan against its specific ledger.
|
|
452
|
-
|
|
453
250
|
## Safety
|
|
454
251
|
|
|
455
252
|
- Do not register secrets or credential dumps.
|
|
456
|
-
- Do not use Artshelf as a replacement for git, workflow ledgers, or
|
|
253
|
+
- Do not use Artshelf as a replacement for git, durable workflow ledgers, or
|
|
254
|
+
backups.
|
|
457
255
|
- Do not silently delete files.
|
|
458
|
-
- Do not treat `cleanup=delete` as permission to delete. Cleanup
|
|
459
|
-
|
|
460
|
-
requires a separate reviewed trash purge plan.
|
|
256
|
+
- Do not treat `cleanup=delete` as permission to delete. Cleanup records a
|
|
257
|
+
refusal; physical deletion requires a separate reviewed trash purge plan.
|