artifact-graph 0.3.1 → 0.4.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.
@@ -0,0 +1,246 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://artifact-graph.dev/schemas/review-result/v1.0.schema.json",
4
+ "title": "Review Result Protocol",
5
+ "description": "Versioned, machine-verifiable result schema for artifact review, repair, and batch processing workflows. Covers run-level, stage/batch-level, and finding-level results with severity, status, evidence, and repair relationships.",
6
+ "version": "1.0",
7
+ "type": "object",
8
+ "required": ["schema_version", "run_id", "status", "decision", "summary"],
9
+ "properties": {
10
+ "schema_version": {
11
+ "type": "string",
12
+ "const": "1.0",
13
+ "description": "Protocol version. Must be '1.0' for this schema."
14
+ },
15
+ "run_id": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "description": "Unique identifier for this review/repair run."
19
+ },
20
+ "stage_id": {
21
+ "type": "string",
22
+ "description": "Stage or batch identifier within the run. Omitted for final/run-level results."
23
+ },
24
+ "attempt": {
25
+ "type": "integer",
26
+ "minimum": 1,
27
+ "description": "Attempt number for this stage. Defaults to 1."
28
+ },
29
+ "status": {
30
+ "type": "string",
31
+ "enum": ["SUCCEEDED", "FAILED", "BLOCKED", "NEEDS_INPUT", "SKIPPED"],
32
+ "description": "Execution status. SUCCEEDED means the stage completed; decision may still be FAIL."
33
+ },
34
+ "decision": {
35
+ "type": "string",
36
+ "enum": ["PASS", "FAIL", "PASS_WITH_RESIDUAL_MINOR", "BLOCKED", "NEEDS_INPUT", "NOT_APPLICABLE"],
37
+ "description": "Business decision. PASS means no blocking findings; FAIL means blocking findings remain."
38
+ },
39
+ "summary": {
40
+ "type": "string",
41
+ "description": "Human-readable summary of the result."
42
+ },
43
+ "outputs": {
44
+ "type": "array",
45
+ "items": { "type": "string" },
46
+ "description": "Paths to output files produced by this stage."
47
+ },
48
+ "warnings": {
49
+ "type": "array",
50
+ "items": { "type": "string" },
51
+ "description": "Non-blocking warning messages."
52
+ },
53
+ "blocking_reason": {
54
+ "type": ["string", "null"],
55
+ "description": "Reason the stage is blocked. Null if not blocked."
56
+ },
57
+ "degradation": {
58
+ "type": ["string", "null"],
59
+ "description": "Description of any quality degradation (e.g., partial execution, timeout fallback)."
60
+ },
61
+ "producer": {
62
+ "type": "object",
63
+ "description": "Identity of what produced this result.",
64
+ "required": ["executor", "name"],
65
+ "properties": {
66
+ "executor": {
67
+ "type": "string",
68
+ "enum": ["script", "worker", "agent", "manual", "cli"],
69
+ "description": "Type of executor."
70
+ },
71
+ "name": {
72
+ "type": "string",
73
+ "description": "Name of the executor (script filename, worker name, etc.)."
74
+ },
75
+ "skill": {
76
+ "type": "string",
77
+ "description": "Skill or plugin that owns this executor."
78
+ }
79
+ }
80
+ },
81
+ "evidence": {
82
+ "type": "array",
83
+ "items": {
84
+ "oneOf": [
85
+ { "type": "string" },
86
+ {
87
+ "type": "object",
88
+ "required": ["type", "path"],
89
+ "properties": {
90
+ "type": {
91
+ "type": "string",
92
+ "description": "Evidence type (e.g., task, deterministic-result, semantic-report, repair-log)."
93
+ },
94
+ "path": { "type": "string" },
95
+ "status": { "type": "string" },
96
+ "decision": { "type": "string" },
97
+ "summary": { "type": "string" },
98
+ "command": { "type": "string" },
99
+ "result": { "type": "string" }
100
+ }
101
+ }
102
+ ]
103
+ },
104
+ "description": "Evidence items supporting this result."
105
+ },
106
+ "review": {
107
+ "type": "object",
108
+ "description": "Review-specific data. Present for review stages.",
109
+ "properties": {
110
+ "source_files": {
111
+ "type": "array",
112
+ "items": { "type": "string" },
113
+ "description": "Files reviewed in this stage."
114
+ },
115
+ "files": {
116
+ "type": "array",
117
+ "items": { "type": "string" },
118
+ "description": "All files in scope for the run."
119
+ },
120
+ "batches": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "object",
124
+ "required": ["id", "files"],
125
+ "properties": {
126
+ "id": { "type": "string" },
127
+ "files": { "type": "array", "items": { "type": "string" } },
128
+ "chars": { "type": "integer" }
129
+ }
130
+ },
131
+ "description": "Batch definitions for batch processing."
132
+ },
133
+ "metrics": {
134
+ "type": "object",
135
+ "description": "Quantitative metrics for this review.",
136
+ "properties": {
137
+ "files_reviewed": { "type": "integer", "minimum": 0 },
138
+ "files_scanned": { "type": "integer", "minimum": 0 },
139
+ "findings_count": { "type": "integer", "minimum": 0 },
140
+ "deterministic_findings_count": { "type": "integer", "minimum": 0 },
141
+ "semantic_findings_count": { "type": "integer", "minimum": 0 },
142
+ "block_count": { "type": "integer", "minimum": 0 },
143
+ "warn_count": { "type": "integer", "minimum": 0 },
144
+ "info_count": { "type": "integer", "minimum": 0 },
145
+ "resolved_count": { "type": "integer", "minimum": 0 },
146
+ "batch_count": { "type": "integer", "minimum": 0 },
147
+ "scenario_count": { "type": "integer", "minimum": 0 }
148
+ }
149
+ },
150
+ "findings": {
151
+ "type": "array",
152
+ "items": { "$ref": "#/$defs/finding" },
153
+ "description": "Open findings from this review."
154
+ },
155
+ "resolved_findings": {
156
+ "type": "array",
157
+ "items": { "$ref": "#/$defs/finding" },
158
+ "description": "Findings that were resolved (by repair or acceptance)."
159
+ },
160
+ "repair_worker_needed": {
161
+ "type": "boolean",
162
+ "description": "Whether a repair worker should be dispatched."
163
+ }
164
+ }
165
+ },
166
+ "repair": {
167
+ "type": "object",
168
+ "description": "Repair-specific data. Present for repair stages.",
169
+ "properties": {
170
+ "source_review_run_id": { "type": "string" },
171
+ "source_review_stage_id": { "type": "string" },
172
+ "findings_addressed": {
173
+ "type": "array",
174
+ "items": { "$ref": "#/$defs/finding" }
175
+ },
176
+ "files_modified": {
177
+ "type": "array",
178
+ "items": { "type": "string" }
179
+ },
180
+ "validation_after_repair": {
181
+ "type": "object",
182
+ "description": "Re-validation results after repair.",
183
+ "properties": {
184
+ "command": { "type": "string" },
185
+ "exit_code": { "type": "integer" },
186
+ "findings_remaining": { "type": "integer", "minimum": 0 }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "$defs": {
193
+ "finding": {
194
+ "type": "object",
195
+ "required": ["id", "severity", "message"],
196
+ "properties": {
197
+ "id": {
198
+ "type": "string",
199
+ "description": "Unique finding identifier within the run (e.g., B043-SF-001)."
200
+ },
201
+ "severity": {
202
+ "type": "string",
203
+ "enum": ["block", "warn", "info"],
204
+ "description": "Finding severity."
205
+ },
206
+ "category": {
207
+ "type": "string",
208
+ "description": "Finding category (e.g., structure, semantic, link, format)."
209
+ },
210
+ "message": {
211
+ "type": "string",
212
+ "description": "Human-readable finding description."
213
+ },
214
+ "location": {
215
+ "type": "object",
216
+ "properties": {
217
+ "file": { "type": "string" },
218
+ "line": { "type": "integer" },
219
+ "column": { "type": "integer" }
220
+ }
221
+ },
222
+ "artifact_id": {
223
+ "type": "string",
224
+ "description": "Related artifact ID (e.g., S-01, A1, D-ARCH-01)."
225
+ },
226
+ "evidence": {
227
+ "type": "string",
228
+ "description": "Evidence supporting this finding."
229
+ },
230
+ "suggested_fix": {
231
+ "type": "string",
232
+ "description": "Suggested fix or remediation."
233
+ },
234
+ "status": {
235
+ "type": "string",
236
+ "enum": ["open", "resolved", "accepted", "superseded"],
237
+ "description": "Current status of this finding."
238
+ },
239
+ "resolved_by": {
240
+ "type": "string",
241
+ "description": "How the finding was resolved (e.g., repair, acceptance, superseded by another finding)."
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }