artshelf 0.14.0 → 0.16.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.
@@ -63,7 +63,7 @@
63
63
  <a class="ledger-row" href="agent-clean.html">
64
64
  <span class="n">4.4</span>
65
65
  <span class="stage">Clean</span>
66
- <span class="what"><span class="cmdline">artshelf cleanup --execute --plan-id &lt;id&gt;</span>Run the one plan the human approved, resolve confirmed ids, and verify the next review is quiet.</span>
66
+ <span class="what"><span class="cmdline">artshelf cleanup --execute --plan-id &lt;id&gt;</span>Run cleanup or dispose plans the human approved, resolve confirmed ids, and verify the next review is quiet.</span>
67
67
  </a>
68
68
  <a class="ledger-row" href="agent-purge.html">
69
69
  <span class="n">4.5</span>
@@ -90,13 +90,15 @@
90
90
  <section>
91
91
  <h2>Render modes</h2>
92
92
  <p>
93
- <code>review</code>, <code>status</code>, <code>doctor</code>, and <code>ledgers prune --dry-run</code> share agent-oriented render modes
93
+ <code>review</code>, <code>status</code>, <code>doctor</code>, <code>ledgers prune --dry-run</code>, <code>dispose --dry-run</code>, and per-record
94
+ <code>get --inspect</code> share agent-oriented render modes
94
95
  so the same data fits both people and agents. Reach for <code>--agent</code> when an agent
95
96
  decides and acts; reach for <code>--json</code> for full record, plan, or health detail.
97
+ On <code>get</code>, <code>--agent</code> requires <code>--inspect</code>.
96
98
  </p>
97
99
  <dl class="def-rows">
98
100
  <div><dt>default</dt><dd>human render: scannable grouped counts, attention states, and a short next action for a person at the terminal</dd></div>
99
- <div><dt>--agent</dt><dd>a deterministic, token-efficient decision packet (single-line compact JSON) with health, counts, classifications, blockers, approval targets where applicable, and a verification command</dd></div>
101
+ <div><dt>--agent</dt><dd>a deterministic, token-efficient decision packet (single-line compact JSON) with health, counts, classifications, blockers, record recommendations, approval targets where applicable, and a verification command</dd></div>
100
102
  <div><dt>--json</dt><dd>the backward-compatible public audit contract: complete machine-readable JSON for debugging and integrations</dd></div>
101
103
  </dl>
102
104
  </section>
@@ -19,8 +19,8 @@ Use Artshelf as a five-stage loop around agent work:
19
19
  paths, and trash state.
20
20
  3. **Review**: turn raw output into an `ArtshelfReviewReport` decision packet
21
21
  with exact approval targets.
22
- 4. **Clean**: execute approved cleanup plans (which trash, never delete),
23
- resolve confirmed ids, then verify quiet.
22
+ 4. **Clean**: execute approved cleanup and dispose plans, resolve confirmed ids,
23
+ then verify quiet.
24
24
  5. **Purge**: clear old trash only from a separate, separately reviewed purge
25
25
  plan; physical deletion never piggybacks on the cleanup plan.
26
26
 
@@ -36,8 +36,8 @@ The browsable docs split the workflow into focused child pages:
36
36
  and preview plans.
37
37
  - [Review](agent-review.html): decision packet schema, classifications, and
38
38
  exact approval wording.
39
- - [Clean](agent-clean.html): approval-only cleanup, resolve, receipts, and
40
- verify-quiet checks.
39
+ - [Clean](agent-clean.html): approval-only cleanup, dispose, resolve, receipts,
40
+ and verify-quiet checks.
41
41
  - [Purge](agent-purge.html): separately reviewed trash purge that physically
42
42
  deletes, with its own approval target and receipts.
43
43
 
@@ -53,20 +53,23 @@ The browsable docs split the workflow into focused child pages:
53
53
 
54
54
  ## Render modes
55
55
 
56
- `review`, `status`, `doctor`, and `ledgers prune --dry-run` share agent-oriented render modes so the same data fits
57
- both people and agents:
56
+ `review`, `status`, `doctor`, `ledgers prune --dry-run`, `dispose --dry-run`,
57
+ and per-record `get --inspect` share agent-oriented render modes so the same data fits both
58
+ people and agents:
58
59
 
59
60
  - **default**: a human render — scannable grouped counts, attention states, and a
60
61
  short next action for a person at the terminal.
61
62
  - **`--agent`**: a deterministic, token-efficient decision packet (single-line
62
- compact JSON) with health, counts, classifications, blockers, approval targets where applicable, and a
63
- verification command. Use it when an agent acts on the result.
63
+ compact JSON) with health, counts, classifications, blockers, record
64
+ recommendations, approval targets where applicable, and a verification
65
+ command. Use it when an agent acts on the result.
64
66
  - **`--json`**: the backward-compatible public audit contract — complete
65
67
  machine-readable JSON for debugging and integrations.
66
68
 
67
69
  Reach for `--agent` when an agent needs to decide and act cheaply; reach for
68
70
  `--json` when you want the full record, plan, or health detail for audit or
69
- debugging. `--agent` takes precedence if both flags are passed.
71
+ debugging. `--agent` takes precedence if both flags are passed; on `get`, it
72
+ requires `--inspect`.
70
73
 
71
74
  ## Portable Skill
72
75
 
package/docs/index.html CHANGED
@@ -107,6 +107,10 @@ artshelf review --json</code></pre>
107
107
  <span class="stamp refused">Refused</span>
108
108
  <span><code>cleanup --execute --all</code> does not exist. Execution names one ledger and one reviewed plan id.</span>
109
109
  </li>
110
+ <li>
111
+ <span class="stamp refused">Refused</span>
112
+ <span><code>dispose --all</code> does not exist. Disposition is one reviewed record and one plan id at a time.</span>
113
+ </li>
110
114
  <li>
111
115
  <span class="stamp refused">Refused</span>
112
116
  <span>Delete is refused in v1. <code>cleanup=trash</code> quarantines; physical deletion needs a separate reviewed purge plan.</span>
package/docs/install.html CHANGED
@@ -109,7 +109,7 @@ npm link</code></pre>
109
109
  with the full agent setup steps: install the portable skill together
110
110
  with its bundled report renderer script, register existing ledgers, and
111
111
  ask you first before creating any scheduled review job. Scheduled jobs
112
- stay read-only; cleanup and purge execution always come back to you.
112
+ stay read-only; cleanup, dispose, and purge execution always come back to you.
113
113
  </p>
114
114
  <p>Copy this one line into your coding agent:</p>
115
115
  <pre><code>Follow the instructions in https://github.com/calvinnwq/artshelf/blob/main/INSTALL.md to set up Artshelf in this workspace.</code></pre>
@@ -219,7 +219,7 @@ artshelf review --all --json
219
219
 
220
220
  and reports what needs attention. Scheduled jobs are review and report only:
221
221
  never schedule `artshelf cleanup --execute`, `artshelf ledgers prune --execute`,
222
- or `artshelf trash purge --execute`.
222
+ `artshelf dispose --execute`, or `artshelf trash purge --execute`.
223
223
 
224
224
  ## 5. Verify and report
225
225
 
@@ -117,12 +117,22 @@ artshelf list [--all] [--status active|review-required|trashed|cleanup-refused|r
117
117
  artshelf find --path &lt;path&gt; [--owner &lt;o&gt;] [--label &lt;l&gt;] [--json]
118
118
 
119
119
  <span class="c"># fetch one record by id</span>
120
- artshelf get &lt;id&gt; [--all] [--json]</code></pre>
120
+ artshelf get &lt;id&gt; [--all] [--json]
121
+
122
+ <span class="c"># review one record as a decision card (read-only, no mutation)</span>
123
+ artshelf get &lt;id&gt; --inspect [--ledger &lt;path&gt;] [--json|--agent]
124
+ artshelf get &lt;id&gt; --inspect --all [--registry &lt;path&gt;] [--json|--agent]</code></pre>
121
125
  <p>
122
126
  <code>list</code> shows ledger entries and current status. <code>find</code> looks up
123
127
  existing records by path, owner, labels, and status. Use it before <code>put</code>
124
128
  for idempotent registration; it requires at least one selector and never mutates records.
125
- <code>get</code> is the audit lookup for one record by Artshelf id.
129
+ <code>get</code> is the audit lookup for one record by Artshelf id;
130
+ <code>--inspect</code> renders it as a review decision card — existence, size, age,
131
+ retention/due state, and a recommendation bucket (<code>keep</code>, <code>snooze</code>, <code>trash-safe</code>,
132
+ <code>resolve-only</code>, or <code>blocked</code>) with the exact next-safe action,
133
+ without moving files, touching the ledger, or previewing arbitrary file contents.
134
+ Combine <code>--inspect --all</code> to find the id through the registry while the card
135
+ reports the concrete ledger that owns the record.
126
136
  </p>
127
137
  </section>
128
138
 
@@ -207,6 +217,33 @@ artshelf cleanup --execute --plan-id &lt;id&gt; [--ledger &lt;path&gt;] [--json]
207
217
  </div>
208
218
  </section>
209
219
 
220
+ <section class="cmd">
221
+ <div class="cmd-head"><h2>artshelf dispose</h2><span class="cmd-flag approval">approval-gated</span></div>
222
+ <pre><code><span class="c"># classify one reviewed record into a reviewed plan</span>
223
+ artshelf dispose --id &lt;id&gt; --action trash-resolve|resolve-only|snooze|keep --dry-run [--reason &lt;text&gt;] [--ttl &lt;ttl&gt;|--retain-until &lt;date&gt;] [--ledger &lt;path&gt;] [--json|--agent]
224
+
225
+ <span class="c"># execute exactly one reviewed plan (approval only)</span>
226
+ artshelf dispose --execute --plan-id &lt;id&gt; [--ledger &lt;path&gt;] [--json]</code></pre>
227
+ <p>
228
+ Approval-gated disposition for one reviewed record, usually the next step after
229
+ <code>get --inspect</code>. <code>--dry-run</code> classifies exactly one record id
230
+ and action, writes a reviewed plan under <code>dispose-plans/</code> when actionable
231
+ (and reuses a matching earlier plan id), and prints the exact approval target.
232
+ <code>--execute</code> binds to one reviewed plan id: it re-snapshots the live
233
+ subject, refuses status/subject drift or a target conflict, moves the subject to
234
+ plan-scoped trash for <code>trash-resolve</code>, resolves the row for
235
+ <code>resolve-only</code>, extends retention for <code>snooze</code>, stamps
236
+ reviewed-and-kept for <code>keep</code>, and writes a receipt registered as an
237
+ Artshelf-owned artifact. Reruns are idempotent.
238
+ </p>
239
+ <div class="callout" data-kind="boundary">
240
+ <span class="callout-label">Hard boundary</span>
241
+ <p>No daemon, no auto-execute, no global execute, no fresh-plan-then-execute, and no
242
+ physical deletion. <code>dispose --all</code> does not exist; one plan binds one
243
+ record id to one action.</p>
244
+ </div>
245
+ </section>
246
+
210
247
  <section class="cmd">
211
248
  <div class="cmd-head"><h2>artshelf trash</h2><span class="cmd-flag approval">approval-gated</span></div>
212
249
  <pre><code><span class="c"># show trashed records with provenance and age</span>
@@ -276,9 +313,9 @@ artshelf reconcile --execute --plan-id &lt;id&gt; --ledger &lt;path&gt; [--json]
276
313
  output stays clean.
277
314
  </p>
278
315
  <p>
279
- <code>review</code>, <code>status</code>, <code>doctor</code>, and <code>ledgers prune --dry-run</code> add <code>--agent</code>:
316
+ <code>review</code>, <code>status</code>, <code>doctor</code>, <code>ledgers prune --dry-run</code>, <code>dispose --dry-run</code>, and <code>get --inspect</code> add <code>--agent</code>:
280
317
  a deterministic, token-efficient decision packet emitted as a single line of compact JSON.
281
- It names the relevant health or prune counts, classifications, blockers, approval targets where applicable, and the command
318
+ It names the relevant health, prune counts, dispose plan status, or record recommendation, classifications, blockers, approval targets where applicable, and the command
282
319
  to re-run for verification, so an agent can act without parsing decorative output.
283
320
  </p>
284
321
  <p>
@@ -289,8 +326,8 @@ artshelf reconcile --execute --plan-id &lt;id&gt; --ledger &lt;path&gt; [--json]
289
326
  </p>
290
327
  <table class="opts">
291
328
  <tr><th>option</th><th>meaning</th></tr>
292
- <tr><td>(default)</td><td>human render: grouped counts, ✓/⚠ attention glyphs, and a short next action</td></tr>
293
- <tr><td>--agent</td><td>token-efficient decision packet for agents on <code>review</code>, <code>status</code>, <code>doctor</code>, and <code>ledgers prune --dry-run</code></td></tr>
329
+ <tr><td>(default)</td><td>human render: grouped counts or a record card, ✓/⚠ attention glyphs, and a short next action</td></tr>
330
+ <tr><td>--agent</td><td>token-efficient decision packet for agents on <code>review</code>, <code>status</code>, <code>doctor</code>, <code>ledgers prune --dry-run</code>, <code>dispose --dry-run</code>, and <code>get --inspect</code></td></tr>
294
331
  <tr><td>--json</td><td>full machine-readable audit JSON on commands that return data</td></tr>
295
332
  </table>
296
333
  </section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artshelf",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Tiny CLI for accountable temporary artifact retention.",
5
5
  "type": "module",
6
6
  "author": "Calvin",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: artshelf
3
- description: "Use before any final response, status update, handoff, or done report to check whether created/copied/exported/quarantined/backed-up/preserved non-source files or directories outlive the command; and when registering temporary artifacts, backups, run outputs, debug evidence, daily Artshelf reviews, cleanup plans, trash listings, or trash purge plans with Artshelf."
3
+ description: "Use before any final response, status update, handoff, or done report to check whether created/copied/exported/quarantined/backed-up/preserved non-source files or directories outlive the command; and when registering temporary artifacts, backups, run outputs, debug evidence, daily Artshelf reviews, cleanup plans, dispose plans, trash listings, or trash purge plans with Artshelf."
4
4
  ---
5
5
 
6
6
  # Artshelf
@@ -22,8 +22,8 @@ review packets, and verify results.
22
22
  record a clear skip reason.
23
23
  - Include reason, TTL or manual-review, cleanup mode, owner, and labels.
24
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.
25
+ - Use read-only and dry-run commands freely; execute cleanup, dispose, trash
26
+ purge, or resolve only after exact human approval.
27
27
  - Do not call work done while known eligible artifacts are neither registered
28
28
  nor explicitly skipped.
29
29
 
@@ -96,9 +96,10 @@ artshelf trash list --all --json
96
96
 
97
97
  `artshelf ledgers list --json` reports per-ledger validation status. `--plain`
98
98
  skips validation. `--all` is for discovery and review, not mutation permission.
99
- Use `--agent` on `review`, `status`, `doctor`, and `ledgers prune --dry-run`
100
- for compact decisions; use `--json` for full audit/API payloads, custom
101
- rendering, or debugging.
99
+ Use `--agent` on `review`, `status`, `doctor`, `ledgers prune --dry-run`,
100
+ `dispose --dry-run`, and `get --inspect` for compact decisions; use `--json`
101
+ for full audit/API payloads,
102
+ custom rendering, or debugging. On `get`, `--agent` requires `--inspect`.
102
103
 
103
104
  Register existing project ledgers explicitly:
104
105
 
@@ -131,10 +132,11 @@ artshelf trash purge --older-than 7d --dry-run --ledger <ledger-path> --json
131
132
 
132
133
  Do not scan arbitrary filesystem locations for ledgers unless the user opted
133
134
  into that discovery scope. Scheduled jobs may review registry-prune plans but
134
- must not execute them. Never schedule cleanup, registry-prune, or purge execution:
135
+ must not execute them. Never schedule cleanup, dispose, registry-prune, or purge execution:
135
136
 
136
137
  ```bash
137
138
  artshelf cleanup --execute --plan-id <id>
139
+ artshelf dispose --execute --plan-id <id>
138
140
  artshelf ledgers prune --execute --plan-id <id>
139
141
  artshelf trash purge --execute --plan-id <id>
140
142
  ```
@@ -150,13 +152,17 @@ count dump.
150
152
  3. If missing-path warnings exist inside valid ledgers, run `artshelf validate --all --json` then `artshelf reconcile --dry-run --all --json --registry <registry-path>` for renames, moves, deletes, topology after handoff/finalization, and `.shelf`/`.artshelf` migration fallout.
151
153
  4. If cleanup attention exists, run `artshelf cleanup --dry-run --all --json`.
152
154
  5. Classify candidates as `trash-safe`, `needs-human-review`,
153
- `resolve-candidate`, or `registry-problem`.
155
+ `resolve-candidate`, or `registry-problem`. For one flagged record (e.g. a
156
+ stale `cleanup=review` backup), read-only `artshelf get <id> --inspect --agent`
157
+ returns a per-record decision (`keep`, `snooze`, `trash-safe`, `resolve-only`,
158
+ `blocked`) and the exact next-safe action without mutating anything.
154
159
  6. Use the built-in `--agent` packet when the CLI output is enough to decide,
155
160
  because it is deterministic and token-efficient. Use
156
161
  `ArtshelfReviewReport` from `schemas/artshelf-review-report.schema.json` and `examples/artshelf-review-report.json` when you need a host-specific card, attachment, or richer audit record.
157
162
  7. Render full packets with `scripts/render-review-report.mjs`; keep
158
163
  `decisionSummary` in audit, while `decisionGroups` drive counts. Emojis are encouraged only in host-specific wrappers, not the renderer.
159
- 8. Always include the exact approval target in the message body as a fallback.
164
+ 8. For one inspected decision that needs a disposition plan, run `artshelf dispose --id <id> --action <trash-resolve|resolve-only|snooze|keep> --dry-run --ledger <ledger-path> --json` and include its exact approval target.
165
+ 9. Always include the exact approval target in the message body as a fallback.
160
166
  Do not paste the whole packet into chat unless the user asks for it.
161
167
 
162
168
  ### Review Plan Report Schema
@@ -168,41 +174,15 @@ cd /path/to/skills/artshelf
168
174
  node scripts/render-review-report.mjs examples/artshelf-review-report.json
169
175
  ```
170
176
 
171
- Expected card shape:
172
-
173
- ```text
174
- Artshelf daily review
175
- Status: <ok|attention needed>; registry <ok|attention>
176
-
177
- Ready for approval: <n>
178
- Needs review first: <n>
179
- Blocked: <n>
180
-
181
- Recommended action
182
- <one short sentence>.
183
-
184
- Ready for approval
185
- 1. <label>
186
- Why: <reason>
187
- Action: <next step>
188
- <approval target>
189
-
190
- Needs review first
191
- 1. <label>
192
- Why: <reason>
193
- Suggested next step: <next step>
194
-
195
- Blocked
196
- <none, or blocker and repair step>
197
-
198
- Safety
199
- Dry-run only. No execute, resolve, or delete ran.
200
- ```
177
+ The renderer owns the exact layout.
178
+ It emits `Artshelf daily review`, `Ready for approval`, `Needs review first`, `Blocked`, `Recommended action`, `Why:`, `Action:`, `Suggested next step:`, and `Safety`.
179
+ Its safety line stays: `Dry-run only. No execute, resolve, or delete ran.`
201
180
 
202
181
  Approval wording:
203
182
 
204
183
  ```text
205
184
  approve artshelf cleanup ledger <ledger-path> plan <plan-id>
185
+ approve artshelf dispose ledger <ledger-path> plan <dispose-plan-id>
206
186
  approve artshelf trash purge ledger <ledger-path> plan <purge-plan-id>
207
187
  approve artshelf resolve missing ledger <ledger-path> ids <id...>
208
188
  approve artshelf reconcile ledger <ledger-path> plan <plan-id>
@@ -210,7 +190,7 @@ approve artshelf ledgers prune registry <registry-path> plan <plan-id>
210
190
  ```
211
191
 
212
192
  Never execute from a read-only preview id. Never generate a fresh plan and
213
- execute it in the same step. After cleanup, resolve, or registry-prune approval, verify with `artshelf review --all --json` and `artshelf ledgers list --json`; after trash purge approval, also run `artshelf trash list --all --json`.
193
+ execute it in the same step. After cleanup, dispose, resolve, or registry-prune approval, verify with `artshelf review --all --json` and `artshelf ledgers list --json`; after trash purge approval, also run `artshelf trash list --all --json`.
214
194
 
215
195
  ## Clean
216
196
 
@@ -226,6 +206,18 @@ If cleanup is interrupted, rerun the same plan id; durable receipt/trash
226
206
  evidence resumes or replays without a fresh plan. `cleanup=trash` quarantines
227
207
  files into Artshelf trash. Physical deletion belongs to the separate Purge stage.
228
208
 
209
+ Dispose execution requires approval naming the reviewed ledger and plan id:
210
+
211
+ ```bash
212
+ artshelf dispose --execute --plan-id <id> --ledger <ledger-path> --json
213
+ ```
214
+
215
+ `dispose` applies one inspected record decision: `trash-resolve` moves the
216
+ subject into plan-scoped Artshelf trash and resolves the row, `resolve-only`
217
+ closes the row without moving files, `snooze` extends retention, and `keep`
218
+ stamps the record reviewed-and-kept. It refuses `--all`, stale plans, target
219
+ conflicts, fresh-plan-then-execute, and physical deletion.
220
+
229
221
  Resolve only after confirmation; it updates the ledger and does not move or
230
222
  delete files:
231
223