peer-ai-workflow 1.0.0-next.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/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/config.d.ts +750 -0
- package/dist/config.js +392 -0
- package/dist/ids.d.ts +67 -0
- package/dist/ids.js +199 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +51 -0
- package/dist/report.d.ts +108 -0
- package/dist/report.js +169 -0
- package/dist/state.d.ts +261 -0
- package/dist/state.js +132 -0
- package/package.json +40 -0
- package/schemas/config-layer.schema.json +997 -0
- package/schemas/config.schema.json +1002 -0
- package/schemas/map.schema.json +102 -0
- package/schemas/review-report.schema.json +312 -0
- package/schemas/work-item.schema.json +415 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "number",
|
|
10
|
+
"const": 1
|
|
11
|
+
},
|
|
12
|
+
"assessedAt": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "date-time",
|
|
15
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
16
|
+
},
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"propertyNames": {
|
|
20
|
+
"anyOf": [
|
|
21
|
+
{
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": [
|
|
24
|
+
"requirements",
|
|
25
|
+
"architecture",
|
|
26
|
+
"threat-model",
|
|
27
|
+
"specs",
|
|
28
|
+
"api-contract",
|
|
29
|
+
"data-model",
|
|
30
|
+
"data-inventory",
|
|
31
|
+
"dpia",
|
|
32
|
+
"design",
|
|
33
|
+
"standards",
|
|
34
|
+
"ci",
|
|
35
|
+
"environments",
|
|
36
|
+
"tests",
|
|
37
|
+
"load-testing",
|
|
38
|
+
"infrastructure",
|
|
39
|
+
"observability",
|
|
40
|
+
"slos",
|
|
41
|
+
"runbooks",
|
|
42
|
+
"docs"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^x-[a-z0-9]+(-[a-z0-9]+)*$"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"status": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": [
|
|
57
|
+
"present",
|
|
58
|
+
"partial",
|
|
59
|
+
"missing",
|
|
60
|
+
"not-applicable"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"evidence": {
|
|
64
|
+
"description": "Files or URLs that prove the status.",
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"inferred": {
|
|
72
|
+
"description": "Found by reading the code, not a document, and not yet confirmed by a person.",
|
|
73
|
+
"type": "boolean"
|
|
74
|
+
},
|
|
75
|
+
"note": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"maxLength": 200
|
|
79
|
+
},
|
|
80
|
+
"checkedAt": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"format": "date-time",
|
|
83
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": [
|
|
87
|
+
"status",
|
|
88
|
+
"checkedAt"
|
|
89
|
+
],
|
|
90
|
+
"additionalProperties": false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"version",
|
|
96
|
+
"assessedAt",
|
|
97
|
+
"items"
|
|
98
|
+
],
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"title": "Peer AI project map",
|
|
101
|
+
"description": ".peer-ai/map.json: what the project has, what is partial, and what is missing, with evidence."
|
|
102
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "number",
|
|
10
|
+
"const": 1
|
|
11
|
+
},
|
|
12
|
+
"skill": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"requirements-analysis",
|
|
16
|
+
"product-spec",
|
|
17
|
+
"architecture",
|
|
18
|
+
"system-design",
|
|
19
|
+
"api-design",
|
|
20
|
+
"data-modelling",
|
|
21
|
+
"threat-model",
|
|
22
|
+
"design-system",
|
|
23
|
+
"issue-planning",
|
|
24
|
+
"implement-ticket",
|
|
25
|
+
"code-review",
|
|
26
|
+
"security-review",
|
|
27
|
+
"contract-check",
|
|
28
|
+
"accessibility-review",
|
|
29
|
+
"design-review",
|
|
30
|
+
"performance-review",
|
|
31
|
+
"reliability-review",
|
|
32
|
+
"data-migration-review",
|
|
33
|
+
"dependency-review",
|
|
34
|
+
"compliance-review",
|
|
35
|
+
"test-strategy",
|
|
36
|
+
"qa-acceptance",
|
|
37
|
+
"ai-feature-review",
|
|
38
|
+
"release-readiness",
|
|
39
|
+
"infrastructure-review",
|
|
40
|
+
"observability-review",
|
|
41
|
+
"incident-response",
|
|
42
|
+
"documentation",
|
|
43
|
+
"tech-debt-triage"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"workItem": {
|
|
47
|
+
"description": "The work item reviewed. Omit it for a review of the whole project.",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
|
|
50
|
+
},
|
|
51
|
+
"at": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"format": "date-time",
|
|
54
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
55
|
+
},
|
|
56
|
+
"scope": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"base": {
|
|
60
|
+
"description": "The commit the change starts from.",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"head": {
|
|
65
|
+
"description": "The commit reviewed.",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1
|
|
68
|
+
},
|
|
69
|
+
"tracks": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"files": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"description": "What was reviewed."
|
|
86
|
+
},
|
|
87
|
+
"inputs": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1
|
|
92
|
+
},
|
|
93
|
+
"description": "Every document, profile, rule pack and decision the review read first."
|
|
94
|
+
},
|
|
95
|
+
"inventory": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"id": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"description": "A stable id for something under review, such as route:GET /orders/{id}."
|
|
104
|
+
},
|
|
105
|
+
"kind": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"description": "What it is: a route, screen, migration, service, dependency, file and so on."
|
|
109
|
+
},
|
|
110
|
+
"location": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"file": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1
|
|
116
|
+
},
|
|
117
|
+
"line": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"exclusiveMinimum": 0,
|
|
120
|
+
"maximum": 9007199254740991
|
|
121
|
+
},
|
|
122
|
+
"endLine": {
|
|
123
|
+
"type": "integer",
|
|
124
|
+
"exclusiveMinimum": 0,
|
|
125
|
+
"maximum": 9007199254740991
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"file"
|
|
130
|
+
],
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": [
|
|
135
|
+
"id",
|
|
136
|
+
"kind"
|
|
137
|
+
],
|
|
138
|
+
"additionalProperties": false
|
|
139
|
+
},
|
|
140
|
+
"description": "Everything under review."
|
|
141
|
+
},
|
|
142
|
+
"coverage": {
|
|
143
|
+
"minItems": 1,
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": {
|
|
148
|
+
"rule": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1,
|
|
151
|
+
"description": "The id of the rule checked."
|
|
152
|
+
},
|
|
153
|
+
"item": {
|
|
154
|
+
"description": "The inventory id it was checked against. Omit it for the whole scope.",
|
|
155
|
+
"type": "string",
|
|
156
|
+
"minLength": 1
|
|
157
|
+
},
|
|
158
|
+
"status": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"enum": [
|
|
161
|
+
"pass",
|
|
162
|
+
"fail",
|
|
163
|
+
"not-applicable",
|
|
164
|
+
"not-checked"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"evidence": {
|
|
168
|
+
"description": "For a pass: what was checked, and where.",
|
|
169
|
+
"type": "string",
|
|
170
|
+
"minLength": 1
|
|
171
|
+
},
|
|
172
|
+
"finding": {
|
|
173
|
+
"description": "For a fail: the id of the problem found.",
|
|
174
|
+
"type": "string",
|
|
175
|
+
"minLength": 1
|
|
176
|
+
},
|
|
177
|
+
"reason": {
|
|
178
|
+
"description": "For not-applicable or not-checked: why.",
|
|
179
|
+
"type": "string",
|
|
180
|
+
"minLength": 1
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"rule",
|
|
185
|
+
"status"
|
|
186
|
+
],
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
},
|
|
189
|
+
"description": "How each rule went. A rule is never left out silently."
|
|
190
|
+
},
|
|
191
|
+
"findings": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"id": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"minLength": 1
|
|
199
|
+
},
|
|
200
|
+
"rule": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1
|
|
203
|
+
},
|
|
204
|
+
"severity": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"enum": [
|
|
207
|
+
"critical",
|
|
208
|
+
"high",
|
|
209
|
+
"medium",
|
|
210
|
+
"low"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"status": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"enum": [
|
|
216
|
+
"open",
|
|
217
|
+
"fixed",
|
|
218
|
+
"accepted"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"title": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"minLength": 1
|
|
224
|
+
},
|
|
225
|
+
"location": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"file": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"minLength": 1
|
|
231
|
+
},
|
|
232
|
+
"line": {
|
|
233
|
+
"type": "integer",
|
|
234
|
+
"exclusiveMinimum": 0,
|
|
235
|
+
"maximum": 9007199254740991
|
|
236
|
+
},
|
|
237
|
+
"endLine": {
|
|
238
|
+
"type": "integer",
|
|
239
|
+
"exclusiveMinimum": 0,
|
|
240
|
+
"maximum": 9007199254740991
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": [
|
|
244
|
+
"file"
|
|
245
|
+
],
|
|
246
|
+
"additionalProperties": false
|
|
247
|
+
},
|
|
248
|
+
"evidence": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"minLength": 1,
|
|
251
|
+
"description": "What shows the problem is real."
|
|
252
|
+
},
|
|
253
|
+
"fix": {
|
|
254
|
+
"description": "A suggested fix.",
|
|
255
|
+
"type": "string",
|
|
256
|
+
"minLength": 1
|
|
257
|
+
},
|
|
258
|
+
"acceptedBy": {
|
|
259
|
+
"description": "For an accepted risk: who accepted it.",
|
|
260
|
+
"type": "string",
|
|
261
|
+
"minLength": 1
|
|
262
|
+
},
|
|
263
|
+
"reason": {
|
|
264
|
+
"description": "For an accepted risk: why it was accepted.",
|
|
265
|
+
"type": "string",
|
|
266
|
+
"minLength": 1
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": [
|
|
270
|
+
"id",
|
|
271
|
+
"rule",
|
|
272
|
+
"severity",
|
|
273
|
+
"status",
|
|
274
|
+
"title",
|
|
275
|
+
"location",
|
|
276
|
+
"evidence"
|
|
277
|
+
],
|
|
278
|
+
"additionalProperties": false
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"result": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"enum": [
|
|
284
|
+
"pass",
|
|
285
|
+
"fail",
|
|
286
|
+
"incomplete"
|
|
287
|
+
],
|
|
288
|
+
"description": "Must agree with the findings and coverage."
|
|
289
|
+
},
|
|
290
|
+
"summary": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"minLength": 1,
|
|
293
|
+
"maxLength": 500,
|
|
294
|
+
"description": "A short summary for people."
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"required": [
|
|
298
|
+
"version",
|
|
299
|
+
"skill",
|
|
300
|
+
"at",
|
|
301
|
+
"scope",
|
|
302
|
+
"inputs",
|
|
303
|
+
"inventory",
|
|
304
|
+
"coverage",
|
|
305
|
+
"findings",
|
|
306
|
+
"result",
|
|
307
|
+
"summary"
|
|
308
|
+
],
|
|
309
|
+
"additionalProperties": false,
|
|
310
|
+
"title": "Peer AI review report",
|
|
311
|
+
"description": ".peer-ai/reports/<work item>/<skill>-<time>.json: what a review looked at, every rule it checked, and every problem it found."
|
|
312
|
+
}
|