artshelf 0.4.1 → 0.6.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 +23 -0
- package/README.md +21 -13
- package/SPEC.md +37 -7
- package/dist/src/ledger.js +2 -2
- package/dist/src/registry.js +5 -5
- package/docs/agent-usage.html +94 -5
- package/docs/agent-usage.md +92 -4
- package/docs/examples/artshelf-review-report.json +116 -0
- package/docs/quickstart.html +2 -2
- package/docs/reference.html +10 -4
- package/docs/schemas/artshelf-review-report.schema.json +315 -0
- package/examples/artshelf-review-report.json +116 -0
- package/package.json +3 -1
- package/schemas/artshelf-review-report.schema.json +315 -0
- package/skills/artshelf/SKILL.md +90 -3
- package/skills/artshelf/examples/artshelf-review-report.json +116 -0
- package/skills/artshelf/schemas/artshelf-review-report.schema.json +315 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://calvinnwq.github.io/artshelf/schemas/artshelf-review-report.schema.json",
|
|
4
|
+
"title": "ArtshelfReviewReport",
|
|
5
|
+
"description": "Machine-readable decision packet for rendering an Artshelf review report.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"scope",
|
|
11
|
+
"decisionSummary",
|
|
12
|
+
"decisionGroups",
|
|
13
|
+
"summary",
|
|
14
|
+
"recommendation",
|
|
15
|
+
"items",
|
|
16
|
+
"alternatives",
|
|
17
|
+
"safety",
|
|
18
|
+
"verification"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"schemaVersion": {
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"const": 1
|
|
24
|
+
},
|
|
25
|
+
"scope": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["registryPath", "ledgerCount", "health", "registryHealth"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"registryPath": { "type": "string" },
|
|
31
|
+
"ledgerCount": { "type": "integer", "minimum": 0 },
|
|
32
|
+
"health": { "type": "string", "enum": ["ok", "attention"] },
|
|
33
|
+
"registryHealth": { "type": "string", "enum": ["ok", "attention"] },
|
|
34
|
+
"affectedLedgers": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["ledgerPath"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"name": { "type": "string" },
|
|
42
|
+
"ledgerPath": { "type": "string" },
|
|
43
|
+
"validationStatus": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"enum": ["ok", "missing", "invalid"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"plans": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": { "$ref": "#/$defs/plan" },
|
|
55
|
+
"default": []
|
|
56
|
+
},
|
|
57
|
+
"decisionSummary": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": ["readyForApproval", "needsReviewFirst", "blocked"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"readyForApproval": { "type": "integer", "minimum": 0 },
|
|
63
|
+
"needsReviewFirst": { "type": "integer", "minimum": 0 },
|
|
64
|
+
"blocked": { "type": "integer", "minimum": 0 }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"decisionGroups": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["readyForApproval", "needsReviewFirst", "blocked"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"readyForApproval": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": { "$ref": "#/$defs/approvalDecision" }
|
|
75
|
+
},
|
|
76
|
+
"needsReviewFirst": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "$ref": "#/$defs/nonApprovalDecision" }
|
|
79
|
+
},
|
|
80
|
+
"blocked": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": { "$ref": "#/$defs/nonApprovalDecision" }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"summary": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"executable",
|
|
91
|
+
"skipped",
|
|
92
|
+
"refused",
|
|
93
|
+
"manualReview",
|
|
94
|
+
"missingPath",
|
|
95
|
+
"trashed"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"executable": { "type": "integer", "minimum": 0 },
|
|
99
|
+
"skipped": { "type": "integer", "minimum": 0 },
|
|
100
|
+
"refused": { "type": "integer", "minimum": 0 },
|
|
101
|
+
"manualReview": { "type": "integer", "minimum": 0 },
|
|
102
|
+
"missingPath": { "type": "integer", "minimum": 0 },
|
|
103
|
+
"trashed": { "type": "integer", "minimum": 0 }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"recommendation": { "type": "string", "minLength": 1 },
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": { "$ref": "#/$defs/item" }
|
|
110
|
+
},
|
|
111
|
+
"alternatives": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"minItems": 1,
|
|
114
|
+
"items": { "type": "string", "minLength": 1 }
|
|
115
|
+
},
|
|
116
|
+
"safety": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": [
|
|
120
|
+
"dryRunOnly",
|
|
121
|
+
"executeAllRefused",
|
|
122
|
+
"noExecuteRan",
|
|
123
|
+
"noResolveRan",
|
|
124
|
+
"noDeleteRan"
|
|
125
|
+
],
|
|
126
|
+
"properties": {
|
|
127
|
+
"dryRunOnly": { "type": "boolean" },
|
|
128
|
+
"executeAllRefused": { "type": "boolean" },
|
|
129
|
+
"noExecuteRan": { "type": "boolean" },
|
|
130
|
+
"noResolveRan": { "type": "boolean" },
|
|
131
|
+
"noDeleteRan": { "type": "boolean" }
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"verification": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": ["command", "successCondition"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"command": { "type": "string", "minLength": 1 },
|
|
140
|
+
"successCondition": { "type": "string", "minLength": 1 }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"$defs": {
|
|
145
|
+
"plan": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"required": ["type", "ledgerPath", "planId", "approvalTarget"],
|
|
149
|
+
"properties": {
|
|
150
|
+
"type": { "type": "string", "enum": ["cleanup", "trash-purge"] },
|
|
151
|
+
"ledgerPath": { "type": "string" },
|
|
152
|
+
"planId": { "type": "string" },
|
|
153
|
+
"planPath": { "type": ["string", "null"] },
|
|
154
|
+
"approvalTarget": { "type": "string" }
|
|
155
|
+
},
|
|
156
|
+
"allOf": [
|
|
157
|
+
{
|
|
158
|
+
"if": {
|
|
159
|
+
"properties": { "type": { "const": "cleanup" } },
|
|
160
|
+
"required": ["type"]
|
|
161
|
+
},
|
|
162
|
+
"then": {
|
|
163
|
+
"properties": {
|
|
164
|
+
"approvalTarget": {
|
|
165
|
+
"pattern": "^approve artshelf cleanup ledger .+ plan .+$"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"if": {
|
|
172
|
+
"properties": { "type": { "const": "trash-purge" } },
|
|
173
|
+
"required": ["type"]
|
|
174
|
+
},
|
|
175
|
+
"then": {
|
|
176
|
+
"properties": {
|
|
177
|
+
"approvalTarget": {
|
|
178
|
+
"pattern": "^approve artshelf trash purge ledger .+ plan .+$"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"item": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"required": [
|
|
189
|
+
"classification",
|
|
190
|
+
"proposedAction",
|
|
191
|
+
"dueStatus",
|
|
192
|
+
"reason",
|
|
193
|
+
"note"
|
|
194
|
+
],
|
|
195
|
+
"properties": {
|
|
196
|
+
"id": { "type": "string" },
|
|
197
|
+
"path": { "type": "string" },
|
|
198
|
+
"classification": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"enum": [
|
|
201
|
+
"trash-safe",
|
|
202
|
+
"needs-human-review",
|
|
203
|
+
"resolve-candidate",
|
|
204
|
+
"registry-problem"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
"proposedAction": { "type": "string", "minLength": 1 },
|
|
208
|
+
"dueStatus": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"enum": ["kept", "due", "manual-review", "missing-path", "trashed"]
|
|
211
|
+
},
|
|
212
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
213
|
+
"note": { "type": "string", "minLength": 1 }
|
|
214
|
+
},
|
|
215
|
+
"anyOf": [
|
|
216
|
+
{ "required": ["id"] },
|
|
217
|
+
{ "required": ["path"] }
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"decision": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"required": ["label", "actionType", "reason", "nextStep"],
|
|
224
|
+
"properties": {
|
|
225
|
+
"label": { "type": "string", "minLength": 1 },
|
|
226
|
+
"itemIds": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"items": { "type": "string", "minLength": 1 },
|
|
229
|
+
"default": []
|
|
230
|
+
},
|
|
231
|
+
"actionType": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"enum": [
|
|
234
|
+
"cleanup",
|
|
235
|
+
"trash-purge",
|
|
236
|
+
"resolve-missing",
|
|
237
|
+
"inspect",
|
|
238
|
+
"fix-registry",
|
|
239
|
+
"keep-or-snooze",
|
|
240
|
+
"change-retention"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"approvalTarget": { "type": ["string", "null"] },
|
|
244
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
245
|
+
"nextStep": { "type": "string", "minLength": 1 }
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"approvalDecision": {
|
|
249
|
+
"allOf": [
|
|
250
|
+
{ "$ref": "#/$defs/decision" },
|
|
251
|
+
{
|
|
252
|
+
"required": ["approvalTarget"],
|
|
253
|
+
"properties": {
|
|
254
|
+
"actionType": {
|
|
255
|
+
"enum": ["cleanup", "trash-purge", "resolve-missing"]
|
|
256
|
+
},
|
|
257
|
+
"approvalTarget": { "type": "string", "minLength": 1 }
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"if": {
|
|
262
|
+
"properties": { "actionType": { "const": "cleanup" } },
|
|
263
|
+
"required": ["actionType"]
|
|
264
|
+
},
|
|
265
|
+
"then": {
|
|
266
|
+
"properties": {
|
|
267
|
+
"approvalTarget": {
|
|
268
|
+
"pattern": "^approve artshelf cleanup ledger .+ plan .+$"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"if": {
|
|
275
|
+
"properties": { "actionType": { "const": "trash-purge" } },
|
|
276
|
+
"required": ["actionType"]
|
|
277
|
+
},
|
|
278
|
+
"then": {
|
|
279
|
+
"properties": {
|
|
280
|
+
"approvalTarget": {
|
|
281
|
+
"pattern": "^approve artshelf trash purge ledger .+ plan .+$"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"if": {
|
|
288
|
+
"properties": { "actionType": { "const": "resolve-missing" } },
|
|
289
|
+
"required": ["actionType"]
|
|
290
|
+
},
|
|
291
|
+
"then": {
|
|
292
|
+
"properties": {
|
|
293
|
+
"approvalTarget": {
|
|
294
|
+
"pattern": "^approve artshelf resolve missing ledger .+ ids .+$"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"nonApprovalDecision": {
|
|
302
|
+
"allOf": [
|
|
303
|
+
{ "$ref": "#/$defs/decision" },
|
|
304
|
+
{
|
|
305
|
+
"properties": {
|
|
306
|
+
"actionType": {
|
|
307
|
+
"enum": ["inspect", "fix-registry", "keep-or-snooze", "change-retention"]
|
|
308
|
+
},
|
|
309
|
+
"approvalTarget": { "type": "null" }
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|