@deksden-com/dd-flow-cli 0.1.0 → 0.3.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/README.md +13 -0
- package/dist/build-info.json +15 -0
- package/dist/cli/help.js +133 -14
- package/dist/cli/run-cli.js +242 -8
- package/dist/schemas/archived-flow-manifest.schema.json +112 -0
- package/dist/schemas/compatibility.schema.json +26 -0
- package/dist/schemas/flow-guidance.schema.json +73 -0
- package/dist/schemas/flow-run-index.schema.json +30 -4
- package/dist/schemas/global-dashboard-data.schema.json +68 -0
- package/dist/schemas/mb-sdlc-review-report.schema.json +242 -0
- package/dist/schemas/merge-stage-report.schema.json +61 -1
- package/dist/schemas/plan-stage-report.schema.json +255 -0
- package/dist/schemas/project-dashboard-data.schema.json +98 -0
- package/dist/schemas/project-flow-pack-manifest.schema.json +127 -0
- package/dist/schemas/protocol-dashboard-data.schema.json +89 -0
- package/dist/schemas/status-report.schema.json +186 -0
- package/dist/schemas/version-report.schema.json +22 -0
- package/dist/services/build-info.js +114 -0
- package/dist/services/canon.js +298 -0
- package/dist/services/cleanup.js +14 -1
- package/dist/services/config.js +25 -0
- package/dist/services/dashboard.js +655 -10
- package/dist/services/flow-guidance.js +214 -0
- package/dist/services/ids.js +106 -0
- package/dist/services/lanes.js +6 -2
- package/dist/services/merge-queue.js +68 -4
- package/dist/services/merge-worker.js +177 -0
- package/dist/services/projects.js +7 -1
- package/dist/services/protocols.js +648 -17
- package/dist/services/runs.js +98 -21
- package/dist/services/schema-validation.js +88 -9
- package/dist/services/sessions.js +3 -2
- package/dist/services/status.js +306 -0
- package/dist/services/version-status.js +284 -0
- package/dist/storage/database.js +13 -0
- package/dist/storage/paths.js +21 -0
- package/package.json +2 -2
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
"project",
|
|
12
12
|
"subject",
|
|
13
13
|
"overall",
|
|
14
|
+
"invocation_mode",
|
|
14
15
|
"breadcrumbs",
|
|
16
|
+
"worker",
|
|
17
|
+
"queue_context",
|
|
18
|
+
"lane_lock",
|
|
19
|
+
"integration",
|
|
15
20
|
"merge_job",
|
|
16
21
|
"git",
|
|
17
22
|
"checks",
|
|
@@ -29,6 +34,61 @@
|
|
|
29
34
|
"type": "array",
|
|
30
35
|
"items": { "$ref": "#/definitions/breadcrumb" }
|
|
31
36
|
},
|
|
37
|
+
"invocation_mode": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": ["one_shot", "long_lived_worker"]
|
|
40
|
+
},
|
|
41
|
+
"worker": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": true,
|
|
44
|
+
"required": ["id", "session_kind", "status_before", "status_after"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"id": { "type": "string", "minLength": 1 },
|
|
47
|
+
"session_kind": { "type": "string", "enum": ["merge_job", "merge_worker"] },
|
|
48
|
+
"status_before": { "type": "string", "minLength": 1 },
|
|
49
|
+
"status_after": { "type": "string", "minLength": 1 },
|
|
50
|
+
"stop_flag": { "type": "string" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"queue_context": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": true,
|
|
56
|
+
"required": ["before", "claimed_job", "after", "final_reason"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"before": { "type": "string", "minLength": 1 },
|
|
59
|
+
"claimed_job": { "type": "string", "minLength": 1 },
|
|
60
|
+
"position_before": { "type": ["number", "null"] },
|
|
61
|
+
"pending_after": { "type": ["number", "null"] },
|
|
62
|
+
"after": { "type": "string", "minLength": 1 },
|
|
63
|
+
"final_reason": { "type": "string", "minLength": 1 }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"lane_lock": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": true,
|
|
69
|
+
"required": ["owner", "status_before", "status_after"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"owner": { "type": "string", "minLength": 1 },
|
|
72
|
+
"lease_token": { "type": "string" },
|
|
73
|
+
"status_before": { "type": "string", "minLength": 1 },
|
|
74
|
+
"status_after": { "type": "string", "minLength": 1 },
|
|
75
|
+
"acquired_at": { "type": "string" },
|
|
76
|
+
"released_at": { "type": "string" }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"integration": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": true,
|
|
82
|
+
"required": ["source_branch", "target_branch", "result"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"source_branch": { "type": "string", "minLength": 1 },
|
|
85
|
+
"source_commit": { "type": "string" },
|
|
86
|
+
"target_branch": { "type": "string", "minLength": 1 },
|
|
87
|
+
"result": { "type": "string", "enum": ["merged", "failed", "requeued", "blocked"] },
|
|
88
|
+
"result_commit": { "type": "string" },
|
|
89
|
+
"conflicts": { "type": "string" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
32
92
|
"merge_job": {
|
|
33
93
|
"type": "object",
|
|
34
94
|
"additionalProperties": true,
|
|
@@ -96,7 +156,7 @@
|
|
|
96
156
|
"additionalProperties": true,
|
|
97
157
|
"required": ["verdict", "summary", "next_action"],
|
|
98
158
|
"properties": {
|
|
99
|
-
"verdict": { "type": "string", "
|
|
159
|
+
"verdict": { "type": "string", "enum": ["merged", "failed", "requeued", "blocked"] },
|
|
100
160
|
"summary": { "type": "string", "minLength": 1 },
|
|
101
161
|
"next_action": { "type": "string", "minLength": 1 }
|
|
102
162
|
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "dd-flow/plan-stage-report@1",
|
|
4
|
+
"title": "dd-flow plan stage report data",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_id",
|
|
9
|
+
"generated_at",
|
|
10
|
+
"protocol",
|
|
11
|
+
"overall",
|
|
12
|
+
"route",
|
|
13
|
+
"graph",
|
|
14
|
+
"aspects",
|
|
15
|
+
"plan_items",
|
|
16
|
+
"handoff"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schema_id": {
|
|
20
|
+
"const": "dd-flow/plan-stage-report@1"
|
|
21
|
+
},
|
|
22
|
+
"generated_at": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "date-time"
|
|
25
|
+
},
|
|
26
|
+
"protocol": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["id", "title", "project", "branch", "stage"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": {"type": "string", "minLength": 1},
|
|
32
|
+
"title": {"type": "string", "minLength": 1},
|
|
33
|
+
"project": {"type": "string", "minLength": 1},
|
|
34
|
+
"branch": {"type": "string", "minLength": 1},
|
|
35
|
+
"stage": {"type": "string", "minLength": 1}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"overall": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["verdict", "verdict_label", "score", "score_max", "next_action", "summary"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"verdict": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"enum": ["plan_ready", "ready_for_code", "needs_user_decision", "plan_blocked", "degraded"]
|
|
46
|
+
},
|
|
47
|
+
"verdict_label": {"type": "string", "minLength": 1},
|
|
48
|
+
"score": {"type": "number", "minimum": 0},
|
|
49
|
+
"score_max": {"type": "number", "exclusiveMinimum": 0},
|
|
50
|
+
"next_action": {"type": "string", "minLength": 1},
|
|
51
|
+
"summary": {"type": "string", "minLength": 1}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"route": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 1,
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": ["label", "value", "note"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"label": {"type": "string", "minLength": 1},
|
|
63
|
+
"value": {"type": "string", "minLength": 1},
|
|
64
|
+
"note": {"type": "string", "minLength": 1}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"task_profile": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": true,
|
|
71
|
+
"properties": {
|
|
72
|
+
"size": {"type": "string"},
|
|
73
|
+
"risk": {"type": "string"},
|
|
74
|
+
"planning_route_hint": {"type": "string"},
|
|
75
|
+
"execution_mode_hint": {"type": "string"},
|
|
76
|
+
"verification_mode": {"type": "string"}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"route_decision": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": true,
|
|
82
|
+
"properties": {
|
|
83
|
+
"selected_planning_route": {"type": "string"},
|
|
84
|
+
"selected_execution_mode": {"type": "string"},
|
|
85
|
+
"selected_git_route": {"type": "string"},
|
|
86
|
+
"selected_verification_depth": {"type": "string"},
|
|
87
|
+
"selected_evidence_level": {"type": "string"},
|
|
88
|
+
"reason": {"type": "string"}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"graph": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["nodes", "edges"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"nodes": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"minItems": 1,
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["id", "label", "x", "y", "status", "note"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"id": {"type": "string", "minLength": 1},
|
|
105
|
+
"label": {"type": "string", "minLength": 1},
|
|
106
|
+
"x": {"type": "number"},
|
|
107
|
+
"y": {"type": "number"},
|
|
108
|
+
"status": {"type": "string", "enum": ["done", "ready", "watch", "next", "blocked", "skipped"]},
|
|
109
|
+
"note": {"type": "string", "minLength": 1}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"edges": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "array",
|
|
117
|
+
"items": [
|
|
118
|
+
{"type": "string", "minLength": 1},
|
|
119
|
+
{"type": "string", "minLength": 1}
|
|
120
|
+
],
|
|
121
|
+
"additionalItems": false,
|
|
122
|
+
"minItems": 2,
|
|
123
|
+
"maxItems": 2
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"aspects": {
|
|
129
|
+
"type": "array",
|
|
130
|
+
"minItems": 1,
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"required": ["id", "label", "score", "status", "summary", "note", "findings"],
|
|
135
|
+
"properties": {
|
|
136
|
+
"id": {"type": "string", "minLength": 1},
|
|
137
|
+
"label": {"type": "string", "minLength": 1},
|
|
138
|
+
"radar_label": {"type": "string"},
|
|
139
|
+
"relevance": {"type": "string", "enum": ["not_applicable", "light", "deep", "unknown"]},
|
|
140
|
+
"coverage_mode": {"type": "string", "enum": ["orchestrator", "subagent", "grouped_subagent", "degraded"]},
|
|
141
|
+
"subagent_id": {"type": "string"},
|
|
142
|
+
"group_id": {"type": "string"},
|
|
143
|
+
"report_path": {"type": "string"},
|
|
144
|
+
"not_applicable_reason": {"type": "string"},
|
|
145
|
+
"score": {"type": "number", "minimum": 0, "maximum": 5},
|
|
146
|
+
"status": {"type": "string", "enum": ["reviewed", "watch", "blocked", "not_applicable", "degraded"]},
|
|
147
|
+
"summary": {"type": "string", "minLength": 1},
|
|
148
|
+
"note": {"type": "string", "minLength": 1},
|
|
149
|
+
"findings": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"items": {"type": "string", "minLength": 1}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"sdlc_contours": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": true,
|
|
159
|
+
"properties": {
|
|
160
|
+
"summary": {"type": "string"},
|
|
161
|
+
"contours": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"items": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"additionalProperties": true,
|
|
166
|
+
"required": ["name", "applicability_status", "gate_status", "summary"],
|
|
167
|
+
"properties": {
|
|
168
|
+
"name": {"type": "string", "minLength": 1},
|
|
169
|
+
"applicability_status": {"type": "string", "minLength": 1},
|
|
170
|
+
"verification_state": {"type": "string"},
|
|
171
|
+
"closure_state": {"type": "string"},
|
|
172
|
+
"gate_status": {"type": "string", "minLength": 1},
|
|
173
|
+
"target_stage": {"type": "string"},
|
|
174
|
+
"delivery_target": {"type": "string"},
|
|
175
|
+
"summary": {"type": "string", "minLength": 1},
|
|
176
|
+
"reason": {"type": "string"},
|
|
177
|
+
"evidence": {"type": "string"},
|
|
178
|
+
"next_action": {"type": "string"}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"policy_migration": {"type": "string"},
|
|
183
|
+
"next_delivery_action": {"type": "string"}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"links": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": { "$ref": "#/definitions/link" },
|
|
189
|
+
"properties": {
|
|
190
|
+
"global_dashboard": { "$ref": "#/definitions/link" },
|
|
191
|
+
"project_dashboard": { "$ref": "#/definitions/link" },
|
|
192
|
+
"protocol_page": { "$ref": "#/definitions/link" },
|
|
193
|
+
"run_index": { "$ref": "#/definitions/link" },
|
|
194
|
+
"run_summary": { "$ref": "#/definitions/link" },
|
|
195
|
+
"protocol_source": { "$ref": "#/definitions/link" },
|
|
196
|
+
"protocol_summary": { "$ref": "#/definitions/link" },
|
|
197
|
+
"previous_stage_report": { "$ref": "#/definitions/link" },
|
|
198
|
+
"next_stage_report": { "$ref": "#/definitions/link" }
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"plan_items": {
|
|
202
|
+
"type": "array",
|
|
203
|
+
"minItems": 1,
|
|
204
|
+
"items": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"additionalProperties": false,
|
|
207
|
+
"required": ["id", "title", "owner", "status", "depends_on", "verification", "note", "details"],
|
|
208
|
+
"properties": {
|
|
209
|
+
"id": {"type": "string", "minLength": 1},
|
|
210
|
+
"title": {"type": "string", "minLength": 1},
|
|
211
|
+
"owner": {"type": "string", "minLength": 1},
|
|
212
|
+
"status": {"type": "string", "enum": ["ready", "watch", "blocked", "done", "skipped"]},
|
|
213
|
+
"depends_on": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {"type": "string", "minLength": 1}
|
|
216
|
+
},
|
|
217
|
+
"verification": {"type": "string", "minLength": 1},
|
|
218
|
+
"note": {"type": "string", "minLength": 1},
|
|
219
|
+
"details": {
|
|
220
|
+
"type": "array",
|
|
221
|
+
"items": {"type": "string", "minLength": 1}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"handoff": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"required": ["code_prompt", "must_read", "next_gate"],
|
|
230
|
+
"properties": {
|
|
231
|
+
"code_prompt": {"type": "string", "minLength": 1},
|
|
232
|
+
"must_read": {
|
|
233
|
+
"type": "array",
|
|
234
|
+
"items": {"type": "string", "minLength": 1}
|
|
235
|
+
},
|
|
236
|
+
"next_gate": {"type": "string", "minLength": 1}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"definitions": {
|
|
241
|
+
"link": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"additionalProperties": true,
|
|
244
|
+
"required": ["href", "label", "path_kind", "status"],
|
|
245
|
+
"properties": {
|
|
246
|
+
"href": { "type": "string" },
|
|
247
|
+
"label": { "type": "string", "minLength": 1 },
|
|
248
|
+
"path_kind": { "type": "string", "enum": ["relative", "absolute"] },
|
|
249
|
+
"status": { "type": "string", "enum": ["available", "pending", "missing", "not_applicable"] },
|
|
250
|
+
"degraded_reason": { "type": "string" },
|
|
251
|
+
"source": { "type": "string" }
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "dd-flow/project-dashboard-data@1",
|
|
4
|
+
"title": "dd-flow project dashboard data",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": ["schema_id", "generated_at", "target_language", "page", "project", "metrics", "protocol_cards", "warnings"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_id": { "const": "dd-flow/project-dashboard-data@1" },
|
|
10
|
+
"generated_at": { "type": "string", "format": "date-time" },
|
|
11
|
+
"target_language": { "type": "string", "minLength": 2 },
|
|
12
|
+
"page": { "$ref": "#/definitions/page" },
|
|
13
|
+
"project": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": true,
|
|
16
|
+
"required": ["id", "title", "root", "status", "updated_at"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"id": { "type": "string", "minLength": 1 },
|
|
19
|
+
"title": { "type": "string", "minLength": 1 },
|
|
20
|
+
"root": { "type": "string", "minLength": 1 },
|
|
21
|
+
"status": { "type": "string", "minLength": 1 },
|
|
22
|
+
"updated_at": { "type": "string", "minLength": 1 }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"links": { "type": "object", "additionalProperties": { "$ref": "#/definitions/link" } },
|
|
26
|
+
"metrics": { "type": "array", "items": { "$ref": "#/definitions/metric" } },
|
|
27
|
+
"protocol_cards": { "type": "array", "items": { "$ref": "#/definitions/protocolCard" } },
|
|
28
|
+
"review_runs": { "type": "array", "items": { "$ref": "#/definitions/reviewRun" } },
|
|
29
|
+
"merge_queue": { "type": "array" },
|
|
30
|
+
"sessions": { "type": "array" },
|
|
31
|
+
"locks": { "type": "array" },
|
|
32
|
+
"warnings": { "type": "array" }
|
|
33
|
+
},
|
|
34
|
+
"definitions": {
|
|
35
|
+
"page": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": true,
|
|
38
|
+
"required": ["kind", "screen_id", "title", "html_path", "json_path"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"kind": { "const": "project" },
|
|
41
|
+
"screen_id": { "const": "SCR-DD-FLOW-PROJECT-DASHBOARD" },
|
|
42
|
+
"title": { "type": "string", "minLength": 1 },
|
|
43
|
+
"html_path": { "type": "string", "minLength": 1 },
|
|
44
|
+
"json_path": { "type": "string", "minLength": 1 }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"metric": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": true,
|
|
50
|
+
"required": ["id", "label", "value", "status", "source"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"id": { "type": "string", "minLength": 1 },
|
|
53
|
+
"label": { "type": "string", "minLength": 1 },
|
|
54
|
+
"value": { "type": ["number", "null"] },
|
|
55
|
+
"status": { "type": "string", "enum": ["known", "unknown", "degraded", "not_applicable"] },
|
|
56
|
+
"source": { "type": "string", "minLength": 1 }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"link": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": true,
|
|
62
|
+
"required": ["label", "href", "path_kind", "status"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"label": { "type": "string", "minLength": 1 },
|
|
65
|
+
"href": { "type": "string" },
|
|
66
|
+
"path_kind": { "type": "string", "enum": ["absolute", "relative"] },
|
|
67
|
+
"status": { "type": "string", "enum": ["available", "pending", "missing", "not_applicable"] },
|
|
68
|
+
"degraded_reason": { "type": "string" }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"protocolCard": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": true,
|
|
74
|
+
"required": ["id", "short_id", "display_status", "action_level", "current_stage", "href"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"id": { "type": "string", "minLength": 1 },
|
|
77
|
+
"short_id": { "type": "string", "minLength": 1 },
|
|
78
|
+
"display_status": { "type": "string", "minLength": 1 },
|
|
79
|
+
"action_level": { "type": "string", "enum": ["none", "watch", "actionable", "blocked"] },
|
|
80
|
+
"current_stage": { "type": "string", "minLength": 1 },
|
|
81
|
+
"href": { "type": "string", "minLength": 1 }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"reviewRun": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": true,
|
|
87
|
+
"required": ["id", "short_id", "flow_kind", "status", "display_status"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"id": { "type": "string", "minLength": 1 },
|
|
90
|
+
"short_id": { "type": "string", "minLength": 1 },
|
|
91
|
+
"flow_kind": { "type": "string", "minLength": 1 },
|
|
92
|
+
"status": { "type": "string", "minLength": 1 },
|
|
93
|
+
"display_status": { "type": "string", "minLength": 1 },
|
|
94
|
+
"subject_id": { "type": "string" }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "dd-flow/project-flow-pack-manifest@2",
|
|
4
|
+
"title": "Project flow pack manifest",
|
|
5
|
+
"description": "Manifest for the curated project-local dd-flow pack installed under .memory-bank/dd-flow/.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_id",
|
|
10
|
+
"pack_version",
|
|
11
|
+
"flow_origin_policy",
|
|
12
|
+
"canon_root",
|
|
13
|
+
"canon_flow_root",
|
|
14
|
+
"source_commit",
|
|
15
|
+
"installed_at",
|
|
16
|
+
"included_files",
|
|
17
|
+
"excluded_canonical_only_flows"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema_id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["dd-flow/project-flow-pack-manifest@1", "dd-flow/project-flow-pack-manifest@2"]
|
|
23
|
+
},
|
|
24
|
+
"pack_version": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
"flow_origin_policy": {
|
|
29
|
+
"const": "project_local_pack"
|
|
30
|
+
},
|
|
31
|
+
"canon_root": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1
|
|
34
|
+
},
|
|
35
|
+
"canon_memory_bank_root": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"canon_flow_root": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"source_commit": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 7
|
|
46
|
+
},
|
|
47
|
+
"canon_version_at_source_commit": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1
|
|
50
|
+
},
|
|
51
|
+
"canon_version": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"minLength": 1
|
|
54
|
+
},
|
|
55
|
+
"flow_contract": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
},
|
|
59
|
+
"installed_at": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1
|
|
62
|
+
},
|
|
63
|
+
"included_files": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"minItems": 1,
|
|
66
|
+
"uniqueItems": true,
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "#/definitions/projectLocalFile"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"file_hashes": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"excluded_canonical_only_flows": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"minItems": 4,
|
|
81
|
+
"uniqueItems": true,
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": ["mb-init.md", "mb-upgrade.md", "mb-upgrade-review.md", "mb-distill.md"]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"generated_allow_patterns": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"notes": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"allOf": [
|
|
99
|
+
{
|
|
100
|
+
"if": {
|
|
101
|
+
"properties": {
|
|
102
|
+
"schema_id": {
|
|
103
|
+
"const": "dd-flow/project-flow-pack-manifest@2"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"then": {
|
|
108
|
+
"required": ["canon_memory_bank_root", "canon_flow_root", "canon_version_at_source_commit", "flow_contract"]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"definitions": {
|
|
113
|
+
"projectLocalFile": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1,
|
|
116
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)(?!manifest\\.json$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$",
|
|
117
|
+
"not": {
|
|
118
|
+
"anyOf": [
|
|
119
|
+
{ "pattern": "^(mb-init|mb-upgrade|mb-upgrade-review|mb-distill)\\.md$" },
|
|
120
|
+
{ "pattern": "^(mb-init|mb-upgrade|mb-upgrade-review|mb-distill)/" },
|
|
121
|
+
{ "pattern": "^experiments/" },
|
|
122
|
+
{ "pattern": "^evals/" }
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "dd-flow/protocol-dashboard-data@1",
|
|
4
|
+
"title": "dd-flow protocol dashboard data",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": ["schema_id", "generated_at", "target_language", "page", "project", "protocol", "primary_run_id", "run_history", "stage_pipeline", "metrics", "warnings"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_id": { "const": "dd-flow/protocol-dashboard-data@1" },
|
|
10
|
+
"generated_at": { "type": "string", "format": "date-time" },
|
|
11
|
+
"target_language": { "type": "string", "minLength": 2 },
|
|
12
|
+
"page": { "$ref": "#/definitions/page" },
|
|
13
|
+
"project": { "type": "object", "additionalProperties": true, "required": ["id", "title", "root"] },
|
|
14
|
+
"protocol": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": true,
|
|
17
|
+
"required": ["id", "short_id", "raw_status", "raw_stage", "display_status", "action_level", "updated_at"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"id": { "type": "string", "minLength": 1 },
|
|
20
|
+
"short_id": { "type": "string", "minLength": 1 },
|
|
21
|
+
"raw_status": { "type": "string", "minLength": 1 },
|
|
22
|
+
"raw_stage": { "type": "string", "minLength": 1 },
|
|
23
|
+
"display_status": { "type": "string", "minLength": 1 },
|
|
24
|
+
"action_level": { "type": "string", "enum": ["none", "watch", "actionable", "blocked"] },
|
|
25
|
+
"updated_at": { "type": "string", "minLength": 1 }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"links": { "type": "object", "additionalProperties": { "$ref": "#/definitions/link" } },
|
|
29
|
+
"primary_run_id": { "type": ["string", "null"] },
|
|
30
|
+
"primary_run_reason": { "type": "string" },
|
|
31
|
+
"run_history": { "type": "array", "items": { "$ref": "#/definitions/run" } },
|
|
32
|
+
"review_runs": { "type": "array", "items": { "$ref": "#/definitions/run" } },
|
|
33
|
+
"stage_pipeline": { "type": "array" },
|
|
34
|
+
"metrics": { "type": "array", "items": { "$ref": "#/definitions/metric" } },
|
|
35
|
+
"warnings": { "type": "array" }
|
|
36
|
+
},
|
|
37
|
+
"definitions": {
|
|
38
|
+
"page": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": true,
|
|
41
|
+
"required": ["kind", "screen_id", "title", "html_path", "json_path"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"kind": { "const": "protocol" },
|
|
44
|
+
"screen_id": { "const": "SCR-DD-FLOW-PROTOCOL-PAGE" },
|
|
45
|
+
"title": { "type": "string", "minLength": 1 },
|
|
46
|
+
"html_path": { "type": "string", "minLength": 1 },
|
|
47
|
+
"json_path": { "type": "string", "minLength": 1 }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"metric": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": true,
|
|
53
|
+
"required": ["id", "label", "value", "status", "source"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": { "type": "string", "minLength": 1 },
|
|
56
|
+
"label": { "type": "string", "minLength": 1 },
|
|
57
|
+
"value": { "type": ["number", "null"] },
|
|
58
|
+
"status": { "type": "string", "enum": ["known", "unknown", "degraded", "not_applicable"] },
|
|
59
|
+
"source": { "type": "string", "minLength": 1 }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"link": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": true,
|
|
65
|
+
"required": ["label", "href", "path_kind", "status"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"label": { "type": "string", "minLength": 1 },
|
|
68
|
+
"href": { "type": "string" },
|
|
69
|
+
"path_kind": { "type": "string", "enum": ["absolute", "relative"] },
|
|
70
|
+
"status": { "type": "string", "enum": ["available", "pending", "missing", "not_applicable"] },
|
|
71
|
+
"degraded_reason": { "type": "string" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"run": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": true,
|
|
77
|
+
"required": ["id", "short_id", "flow_kind", "display_flow_kind", "status", "display_status", "stages"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"id": { "type": "string", "minLength": 1 },
|
|
80
|
+
"short_id": { "type": "string", "minLength": 1 },
|
|
81
|
+
"flow_kind": { "type": "string", "minLength": 1 },
|
|
82
|
+
"display_flow_kind": { "type": "string", "minLength": 1 },
|
|
83
|
+
"status": { "type": "string", "minLength": 1 },
|
|
84
|
+
"display_status": { "type": "string", "minLength": 1 },
|
|
85
|
+
"stages": { "type": "array" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|