@tea-agent/loop-agent 0.13.0 → 0.15.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.
Files changed (272) hide show
  1. package/AGENTS.md +157 -157
  2. package/CHANGELOG.md +116 -305
  3. package/README.md +357 -334
  4. package/bin/agent-worker.js +22 -22
  5. package/bin/loop-agent.js +21 -21
  6. package/dist/commands/cursor-prompt.js +6 -6
  7. package/dist/commands/init.js +505 -505
  8. package/dist/commands/loop-benchmark.js +11 -11
  9. package/dist/commands/pi-reuse-benchmark.js +16 -16
  10. package/dist/executors/pi-event-serializer.js +33 -11
  11. package/dist/sidecars/cursor-prompt/executor.js +1 -1
  12. package/dist/task/runtime.js +27 -27
  13. package/dist/worker/observe/spec-evidence.js +19 -10
  14. package/dist/worker/observe/static/api.js +46 -46
  15. package/dist/worker/observe/static/app.js +151 -150
  16. package/dist/worker/observe/static/constants.js +156 -148
  17. package/dist/worker/observe/static/copy.js +67 -67
  18. package/dist/worker/observe/static/dag-helpers.js +201 -172
  19. package/dist/worker/observe/static/dag-layout.d.ts +31 -31
  20. package/dist/worker/observe/static/dag-layout.js +83 -83
  21. package/dist/worker/observe/static/dag-model.js +72 -72
  22. package/dist/worker/observe/static/dom.js +122 -122
  23. package/dist/worker/observe/static/format-pool.d.ts +71 -0
  24. package/dist/worker/observe/static/format-pool.js +134 -67
  25. package/dist/worker/observe/static/format.js +317 -292
  26. package/dist/worker/observe/static/index.html +350 -308
  27. package/dist/worker/observe/static/kpi.js +100 -94
  28. package/dist/worker/observe/static/markdown-render.js +124 -0
  29. package/dist/worker/observe/static/relations.js +133 -133
  30. package/dist/worker/observe/static/router.js +93 -93
  31. package/dist/worker/observe/static/run-processing.js +148 -148
  32. package/dist/worker/observe/static/shell-chrome.js +74 -68
  33. package/dist/worker/observe/static/state.js +273 -267
  34. package/dist/worker/observe/static/styles.css +2504 -1902
  35. package/dist/worker/observe/static/views/batch.js +227 -227
  36. package/dist/worker/observe/static/views/dag-graph.js +172 -172
  37. package/dist/worker/observe/static/views/dag-inspector.js +530 -627
  38. package/dist/worker/observe/static/views/dag.js +371 -371
  39. package/dist/worker/observe/static/views/dashboard.js +86 -100
  40. package/dist/worker/observe/static/views/failures.js +143 -143
  41. package/dist/worker/observe/static/views/feature.js +492 -492
  42. package/dist/worker/observe/static/views/pool.js +708 -350
  43. package/dist/worker/observe/static/views/run.js +453 -453
  44. package/dist/worker/observe/static/views/session-timeline.js +771 -219
  45. package/dist/worker/observe/static/views/shell.js +7 -7
  46. package/dist/worker/observe/static/views/task.js +314 -314
  47. package/dist/worker/observe/static/views/timeline.js +163 -163
  48. package/dist/workflows/dag/canvas-observer.js +275 -275
  49. package/dist/workflows/dag/init-hybrid.js +27 -11
  50. package/docs/README.md +106 -104
  51. package/docs/architecture/README.md +26 -26
  52. package/docs/architecture/dag-execution.md +140 -140
  53. package/docs/architecture/evolution.md +54 -54
  54. package/docs/architecture/facts-and-state.md +71 -71
  55. package/docs/architecture/runtime-boundaries.md +191 -191
  56. package/docs/architecture/system-overview.md +93 -93
  57. package/docs/architecture/worker-and-feature.md +85 -85
  58. package/docs/harness-methodology-debugging.md +153 -153
  59. package/docs/harness-methodology-tdd.md +130 -130
  60. package/docs/harness-methodology-verification.md +27 -27
  61. package/docs/init-surface.manifest.json +304 -307
  62. package/docs/skills/README.md +7 -7
  63. package/docs/skills/vetted-skill-registry.md +29 -29
  64. package/docs/templates/adr.md +60 -60
  65. package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
  66. package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
  67. package/docs/templates/agent-dag-decision-gate-dogfood-report.md +117 -117
  68. package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
  69. package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
  70. package/docs/templates/agent-dag-report.schema.json +473 -473
  71. package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
  72. package/docs/templates/agent-dag.base.json +190 -190
  73. package/docs/templates/agent-dag.final-verification.json +185 -185
  74. package/docs/templates/agent-dag.schema.json +411 -411
  75. package/docs/templates/agent-dag.supervised-implementation.json +620 -620
  76. package/docs/templates/backend-test-analysis.schema.json +44 -44
  77. package/docs/templates/backend-test-case-manifest.schema.json +190 -190
  78. package/docs/templates/backend-test-dag.classify.prompt.md +75 -75
  79. package/docs/templates/backend-test-dag.generate-pytest.prompt.md +204 -204
  80. package/docs/templates/backend-test-dag.json +559 -559
  81. package/docs/templates/backend-test-dag.retrospect.prompt.md +139 -139
  82. package/docs/templates/backend-test-dag.review-cases.prompt.md +83 -83
  83. package/docs/templates/backend-test-execution.schema.json +133 -133
  84. package/docs/templates/backend-test-result.schema.json +99 -99
  85. package/docs/templates/branch-merge-report.md +0 -1
  86. package/docs/templates/exec-plan.md +64 -64
  87. package/docs/templates/feature-spec.md +53 -53
  88. package/docs/templates/frontend-design-contract.md +42 -42
  89. package/docs/templates/frontend-eval/fixtures/failures/01-type-build-error.md +17 -17
  90. package/docs/templates/frontend-eval/fixtures/failures/02-unit-component-test-fail.md +16 -16
  91. package/docs/templates/frontend-eval/fixtures/failures/03-fixture-schema-drift.md +16 -16
  92. package/docs/templates/frontend-eval/fixtures/failures/04-missing-loading-empty-error-state.md +16 -16
  93. package/docs/templates/frontend-eval/fixtures/failures/05-forbidden-write-writeset-expansion.md +16 -16
  94. package/docs/templates/frontend-eval/fixtures/failures/06-unapproved-dependency-add.md +16 -16
  95. package/docs/templates/frontend-eval/fixtures/failures/07-mock-production-on.md +21 -21
  96. package/docs/templates/frontend-eval/fixtures/functional/01-simple-component-style.md +29 -29
  97. package/docs/templates/frontend-eval/fixtures/functional/02-form-validation.md +28 -28
  98. package/docs/templates/frontend-eval/fixtures/functional/03-list-detail-page.md +28 -28
  99. package/docs/templates/frontend-eval/fixtures/functional/04-api-mock.md +29 -29
  100. package/docs/templates/frontend-eval/fixtures/functional/05-permission-auth-gated-ui.md +27 -27
  101. package/docs/templates/frontend-eval/fixtures/functional/06-ssr-server-client-boundary.md +28 -28
  102. package/docs/templates/frontend-eval/fixtures/functional/07-shared-public-component-api.md +28 -28
  103. package/docs/templates/frontend-eval/fixtures/functional/08-pure-local-no-remote.md +27 -27
  104. package/docs/templates/frontend-eval/metrics.md +138 -138
  105. package/docs/templates/frontend-eval/smoke-targets.md +53 -53
  106. package/docs/templates/frontend-implementation-contract.schema.json +27 -27
  107. package/docs/templates/frontend-task-constraints.md +35 -35
  108. package/docs/templates/frontend-task-requirement.md +70 -70
  109. package/docs/templates/frontend-test-dag.generate-cases.prompt.md +5 -5
  110. package/docs/templates/frontend-test-dag.json +23 -23
  111. package/docs/templates/frontend-test-dag.retrieve-context.prompt.md +3 -3
  112. package/docs/templates/frontend-test-dag.retrospect.prompt.md +3 -3
  113. package/docs/templates/frontend-test-dag.review-cases.prompt.md +3 -3
  114. package/docs/templates/frontend-test-dag.review-execution.prompt.md +3 -3
  115. package/docs/templates/harness.schema.json +221 -221
  116. package/docs/templates/hybrid-dag.json +188 -188
  117. package/docs/templates/init-evolution-review.md +35 -35
  118. package/docs/templates/interactive-ui-round2-experiment.md +66 -66
  119. package/docs/templates/knowledge-graph-bootstrap-dag.json +118 -118
  120. package/docs/templates/knowledge-sync-dag.json +178 -178
  121. package/docs/templates/knowledge-sync-draft.schema.json +71 -71
  122. package/docs/templates/product-line/AGENTS.md +8 -8
  123. package/docs/templates/product-line/README.md +9 -9
  124. package/docs/templates/product-line/acceptance.yaml +14 -14
  125. package/docs/templates/product-line/closeout.yaml +9 -9
  126. package/docs/templates/product-line/design.md +13 -13
  127. package/docs/templates/product-line/links.md +10 -10
  128. package/docs/templates/product-line/requirement.md +17 -17
  129. package/docs/templates/product-line/task-graph.yaml +15 -15
  130. package/docs/templates/product-line/task.yaml +64 -64
  131. package/docs/templates/product-line/test-plan.md +7 -7
  132. package/docs/templates/production-readiness-checklist.md +57 -57
  133. package/docs/templates/progress-log.md +17 -17
  134. package/docs/templates/project-start-checklist.md +9 -9
  135. package/docs/templates/qa-report.md +48 -48
  136. package/docs/templates/sprint-contract.md +29 -29
  137. package/docs/templates/worker-dogfood-evidence.md +80 -80
  138. package/docs/templates/worker-dogfood-setup.md +68 -68
  139. package/examples/decision-gate-agent-dag.json +173 -173
  140. package/examples/example-dag.json +46 -46
  141. package/examples/hybrid-loop-agent-dag.json +188 -188
  142. package/harness.json +66 -66
  143. package/package.json +78 -52
  144. package/scripts/kb-bootstrap-init-skeleton.sh +240 -240
  145. package/scripts/kb-graph-incremental-prepare.mjs +386 -386
  146. package/scripts/kb-graph-materialize.mjs +105 -105
  147. package/scripts/kb-graph-promote.mjs +164 -164
  148. package/scripts/kb-query.mjs +554 -554
  149. package/skills/agent-worker/SKILL.md +39 -39
  150. package/skills/agent-worker/references/agent-worker-operator.md +60 -60
  151. package/skills/ai-engineering-context/SKILL.md +48 -48
  152. package/skills/analyze-product-dependencies/SKILL.md +67 -67
  153. package/skills/analyze-product-dependencies/agents/openai.yaml +4 -4
  154. package/skills/analyze-product-dependencies/references/api-documentation-schema.md +30 -30
  155. package/skills/analyze-product-dependencies/references/dependency-analysis-schema.md +28 -28
  156. package/skills/analyze-product-dependencies/references/example.md +76 -76
  157. package/skills/analyze-product-dependencies/references/forward-test-cases.md +35 -35
  158. package/skills/analyze-product-dependencies/references/input-contract.md +11 -11
  159. package/skills/analyze-product-dependencies/references/scouting-rules.md +61 -61
  160. package/skills/analyze-product-dependencies/scripts/test-validators.mjs +267 -267
  161. package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +101 -101
  162. package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +142 -142
  163. package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +76 -76
  164. package/skills/analyze-product-dependencies/scripts/validation-helpers.mjs +146 -146
  165. package/skills/analyze-product-requirements/SKILL.md +90 -90
  166. package/skills/analyze-product-requirements/agents/openai.yaml +4 -4
  167. package/skills/analyze-product-requirements/references/acceptance-criteria.md +91 -91
  168. package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +56 -56
  169. package/skills/analyze-product-requirements/references/example.md +86 -86
  170. package/skills/analyze-product-requirements/references/forward-test-cases.md +66 -66
  171. package/skills/analyze-product-requirements/references/product-analysis-schema.md +32 -32
  172. package/skills/analyze-product-requirements/references/product-requirement-schema.md +33 -33
  173. package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +35 -35
  174. package/skills/analyze-product-requirements/scripts/test-validators.mjs +193 -193
  175. package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +69 -69
  176. package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +97 -97
  177. package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +98 -98
  178. package/skills/analyze-product-requirements/scripts/validation-helpers.mjs +156 -156
  179. package/skills/browser-tools/SKILL.md +196 -196
  180. package/skills/browser-tools/browser-content.js +103 -103
  181. package/skills/browser-tools/browser-cookies.js +35 -35
  182. package/skills/browser-tools/browser-eval.js +53 -53
  183. package/skills/browser-tools/browser-hn-scraper.js +108 -108
  184. package/skills/browser-tools/browser-nav.js +44 -44
  185. package/skills/browser-tools/browser-pick.js +162 -162
  186. package/skills/browser-tools/browser-screenshot.js +34 -34
  187. package/skills/browser-tools/browser-start.js +86 -86
  188. package/skills/browser-tools/package-lock.json +2556 -2556
  189. package/skills/browser-tools/package.json +19 -19
  190. package/skills/code-review-core/SKILL.md +20 -20
  191. package/skills/codebase-scout/SKILL.md +19 -19
  192. package/skills/frontend-design-review/SKILL.md +66 -66
  193. package/skills/frontend-design-review/references/review-checklist.md +40 -58
  194. package/skills/frontend-implementation/SKILL.md +49 -49
  195. package/skills/frontend-implementation/references/code-standards.md +32 -32
  196. package/skills/frontend-implementation/references/design-spec.md +46 -46
  197. package/skills/frontend-implementation/references/node-contracts.md +27 -27
  198. package/skills/frontend-review/SKILL.md +61 -59
  199. package/skills/frontend-review/references/review-findings.md +48 -47
  200. package/skills/frontend-verification/SKILL.md +55 -53
  201. package/skills/frontend-verification/references/verification-checklist.md +59 -68
  202. package/skills/grill-me/SKILL.md +10 -10
  203. package/skills/grill-with-docs/SKILL.md +88 -88
  204. package/skills/grill-with-docs/adr-format.md +47 -47
  205. package/skills/grill-with-docs/context-format.md +60 -60
  206. package/skills/init-capability-evolution/SKILL.md +70 -70
  207. package/skills/loop-agent/SKILL.md +151 -151
  208. package/skills/loop-agent/references/README.md +67 -67
  209. package/skills/loop-agent/references/command-reference.md +527 -527
  210. package/skills/loop-agent/references/docs-converge.md +126 -126
  211. package/skills/loop-agent/references/harness-policy.md +263 -263
  212. package/skills/loop-agent/references/hybrid-dag.md +243 -243
  213. package/skills/loop-agent/references/learned/README.md +21 -21
  214. package/skills/loop-agent/references/long-running-loop.md +57 -57
  215. package/skills/loop-agent/references/model-routing.md +36 -36
  216. package/skills/loop-agent/references/multi-worktree.md +54 -54
  217. package/skills/loop-agent/references/one-shot-runs.md +85 -85
  218. package/skills/loop-agent/references/orchestrator-and-interventions.md +169 -169
  219. package/skills/loop-agent/references/pi-prompt.md +23 -23
  220. package/skills/loop-agent/references/pi-subagent-assisted-mode.md +84 -84
  221. package/skills/loop-agent/references/post-implementation-and-patterns.md +44 -44
  222. package/skills/loop-agent/references/task-workflow.md +89 -89
  223. package/skills/loop-agent/references/verification-and-failure-handling.md +141 -141
  224. package/skills/playwright-cli/SKILL.md +420 -420
  225. package/skills/playwright-cli/references/element-attributes.md +23 -23
  226. package/skills/playwright-cli/references/playwright-tests.md +39 -39
  227. package/skills/playwright-cli/references/request-mocking.md +87 -87
  228. package/skills/playwright-cli/references/running-code.md +241 -241
  229. package/skills/playwright-cli/references/session-management.md +225 -225
  230. package/skills/playwright-cli/references/storage-state.md +275 -275
  231. package/skills/playwright-cli/references/test-generation.md +433 -433
  232. package/skills/playwright-cli/references/tracing.md +139 -139
  233. package/skills/playwright-cli/references/video-recording.md +143 -143
  234. package/skills/playwright-cli-case-generator/SKILL.md +74 -74
  235. package/skills/requesting-code-review/SKILL.md +101 -101
  236. package/skills/requesting-code-review/code-reviewer.md +168 -168
  237. package/skills/systematic-debugging/CREATION-LOG.md +119 -119
  238. package/skills/systematic-debugging/SKILL.md +296 -296
  239. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  240. package/skills/systematic-debugging/condition-based-waiting.md +115 -115
  241. package/skills/systematic-debugging/defense-in-depth.md +122 -122
  242. package/skills/systematic-debugging/find-polluter.sh +63 -63
  243. package/skills/systematic-debugging/root-cause-tracing.md +169 -169
  244. package/skills/systematic-debugging/test-academic.md +14 -14
  245. package/skills/systematic-debugging/test-pressure-1.md +58 -58
  246. package/skills/systematic-debugging/test-pressure-2.md +68 -68
  247. package/skills/systematic-debugging/test-pressure-3.md +69 -69
  248. package/skills/test-driven-development/SKILL.md +20 -20
  249. package/skills/using-git-worktrees/SKILL.md +215 -215
  250. package/skills/verification-before-completion/SKILL.md +154 -154
  251. package/skills/webapp-testing/SKILL.md +19 -19
  252. package/docs/agent-dag-recovery-playbook.md +0 -195
  253. package/docs/agent-dag-runner.md +0 -67
  254. package/docs/cursor-prompt-sidecar.md +0 -36
  255. package/docs/decisions/README.md +0 -18
  256. package/docs/design/README.md +0 -167
  257. package/docs/development-principles.md +0 -73
  258. package/docs/exec-plans/README.md +0 -6
  259. package/docs/exec-plans/active/README.md +0 -12
  260. package/docs/exec-plans/completed/README.md +0 -107
  261. package/docs/feature-workflow.md +0 -414
  262. package/docs/loop-agent-harness.md +0 -142
  263. package/docs/production-readiness.md +0 -96
  264. package/docs/progress/README.md +0 -80
  265. package/docs/reports/README.md +0 -159
  266. package/docs/verification-matrix.md +0 -70
  267. package/scripts/check-product-line-docs.sh +0 -29
  268. package/scripts/check-task-pool-root.sh +0 -32
  269. package/scripts/kb-graph-incremental-prepare.sh +0 -5
  270. package/scripts/kb-graph-materialize.sh +0 -4
  271. package/scripts/kb-graph-promote.sh +0 -4
  272. package/scripts/kb-query.sh +0 -5
@@ -1,473 +1,473 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://loop-agent.local/schemas/agent-dag-report.schema.json",
4
- "title": "Agent DAG Report",
5
- "description": "Stable JSON contract for `dag report --json` output consumed by Decision Gate evidence builders and operator tooling. Derived read-only view over `.harness/dag-runs/` canonical facts; never mutates run state.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["schemaVersion", "runs"],
9
- "properties": {
10
- "schemaVersion": {
11
- "type": "integer",
12
- "const": 1,
13
- "description": "Report envelope schema version. Bump only when breaking stable fields."
14
- },
15
- "runs": {
16
- "type": "array",
17
- "items": { "$ref": "#/$defs/dagRunReportEntry" }
18
- }
19
- },
20
- "$defs": {
21
- "dagArtifactRef": {
22
- "type": "object",
23
- "additionalProperties": false,
24
- "required": ["path", "exists"],
25
- "properties": {
26
- "path": { "type": "string" },
27
- "exists": { "type": "boolean" }
28
- }
29
- },
30
- "dagRecoveryRecommendation": {
31
- "type": "object",
32
- "additionalProperties": false,
33
- "required": [
34
- "action",
35
- "summary",
36
- "reason",
37
- "humanRequired",
38
- "autoRetryEligible"
39
- ],
40
- "properties": {
41
- "action": {
42
- "type": "string",
43
- "enum": [
44
- "none",
45
- "monitor",
46
- "retry-node",
47
- "rerun-after-fix",
48
- "resume-or-reject",
49
- "manual-review",
50
- "inspect-upstream",
51
- "unknown"
52
- ]
53
- },
54
- "summary": { "type": "string" },
55
- "reason": { "type": "string" },
56
- "humanRequired": { "type": "boolean" },
57
- "autoRetryEligible": { "type": "boolean" },
58
- "commandHint": { "type": "string" }
59
- }
60
- },
61
- "dagProductLineFailureCategory": {
62
- "type": "string",
63
- "enum": [
64
- "SpecUnclear",
65
- "ContractMismatch",
66
- "ProductBug",
67
- "TestBug",
68
- "EnvFailure",
69
- "FlakyTest",
70
- "RiskyChange",
71
- "DependencyFailure",
72
- "NeedsHuman",
73
- "Unknown"
74
- ]
75
- },
76
- "dagReportPrimaryFailure": {
77
- "type": "object",
78
- "additionalProperties": false,
79
- "required": ["scope"],
80
- "properties": {
81
- "scope": { "type": "string", "enum": ["node", "run"] },
82
- "nodeId": { "type": "string" },
83
- "nodeStatus": {
84
- "type": "string",
85
- "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
86
- },
87
- "failureCategory": { "type": "string" },
88
- "normalizedFailureCategory": {
89
- "type": "string",
90
- "enum": [
91
- "success",
92
- "validation",
93
- "executor",
94
- "write-guard",
95
- "timeout",
96
- "auth",
97
- "human-required",
98
- "human-rejected",
99
- "shell-command",
100
- "static-error",
101
- "decision-envelope",
102
- "skipped",
103
- "unknown"
104
- ]
105
- },
106
- "productLineFailureCategory": {
107
- "$ref": "#/$defs/dagProductLineFailureCategory"
108
- },
109
- "recommendedFollowUp": { "type": "string" }
110
- }
111
- },
112
- "dagReportPrimaryRecovery": {
113
- "$ref": "#/$defs/dagRecoveryRecommendation"
114
- },
115
- "dagReportDownstreamSkippedNode": {
116
- "type": "object",
117
- "additionalProperties": false,
118
- "required": ["nodeId"],
119
- "properties": {
120
- "nodeId": { "type": "string" },
121
- "failureCategory": { "type": "string" },
122
- "normalizedFailureCategory": {
123
- "type": "string",
124
- "enum": [
125
- "success",
126
- "validation",
127
- "executor",
128
- "write-guard",
129
- "timeout",
130
- "auth",
131
- "human-required",
132
- "human-rejected",
133
- "shell-command",
134
- "static-error",
135
- "decision-envelope",
136
- "skipped",
137
- "unknown"
138
- ]
139
- },
140
- "productLineFailureCategory": {
141
- "$ref": "#/$defs/dagProductLineFailureCategory"
142
- },
143
- "recommendedFollowUp": { "type": "string" }
144
- }
145
- },
146
- "dagNodeDecisionEnvelope": {
147
- "type": "object",
148
- "additionalProperties": true,
149
- "required": ["parseOk"],
150
- "properties": {
151
- "parseOk": { "type": "boolean" },
152
- "decision": { "type": "string" },
153
- "requiresHuman": { "type": "boolean" },
154
- "nextAction": { "type": "string" },
155
- "riskLevel": { "type": "string" },
156
- "source": {
157
- "type": "string",
158
- "enum": ["assistantText", "resultSummaryFallback"]
159
- },
160
- "errors": {
161
- "type": "array",
162
- "items": { "type": "string" }
163
- }
164
- }
165
- },
166
- "dagNodeArtifactsReport": {
167
- "type": "object",
168
- "additionalProperties": false,
169
- "required": [
170
- "resultSummary",
171
- "promptRedacted",
172
- "skills",
173
- "nodeRecord",
174
- "decisionEnvelope",
175
- "decisionEnvelopeValidation",
176
- "humanEscalationJson",
177
- "humanEscalationMd",
178
- "humanApproval",
179
- "humanRejection"
180
- ],
181
- "properties": {
182
- "resultSummary": { "$ref": "#/$defs/dagArtifactRef" },
183
- "promptRedacted": { "$ref": "#/$defs/dagArtifactRef" },
184
- "skills": { "$ref": "#/$defs/dagArtifactRef" },
185
- "nodeRecord": { "$ref": "#/$defs/dagArtifactRef" },
186
- "decisionEnvelope": { "$ref": "#/$defs/dagArtifactRef" },
187
- "decisionEnvelopeValidation": { "$ref": "#/$defs/dagArtifactRef" },
188
- "humanEscalationJson": { "$ref": "#/$defs/dagArtifactRef" },
189
- "humanEscalationMd": { "$ref": "#/$defs/dagArtifactRef" },
190
- "humanApproval": { "$ref": "#/$defs/dagArtifactRef" },
191
- "humanRejection": { "$ref": "#/$defs/dagArtifactRef" }
192
- }
193
- },
194
- "repairArtifact": {
195
- "type": "object",
196
- "additionalProperties": false,
197
- "required": [
198
- "schemaVersion",
199
- "verdict",
200
- "failureClass",
201
- "rootCause",
202
- "fixScope",
203
- "invariant",
204
- "evidenceRefs",
205
- "rawLogFallbackAllowed"
206
- ],
207
- "properties": {
208
- "schemaVersion": { "type": "integer", "const": 1 },
209
- "verdict": {
210
- "type": "string",
211
- "enum": ["pass", "request-revision"]
212
- },
213
- "failureClass": {
214
- "type": "string",
215
- "enum": [
216
- "syntax",
217
- "runtime",
218
- "logic",
219
- "boundary",
220
- "environment",
221
- "governance",
222
- "unknown"
223
- ]
224
- },
225
- "rootCause": { "type": "string", "minLength": 1 },
226
- "fixScope": {
227
- "type": "array",
228
- "items": { "type": "string", "minLength": 1 }
229
- },
230
- "invariant": { "type": "string", "minLength": 1 },
231
- "evidenceRefs": {
232
- "type": "array",
233
- "items": { "type": "string", "minLength": 1 }
234
- },
235
- "rawLogFallbackAllowed": { "type": "boolean" }
236
- }
237
- },
238
- "dagConvergencePassArtifactRef": {
239
- "type": "object",
240
- "additionalProperties": false,
241
- "required": ["nodeId", "status"],
242
- "properties": {
243
- "nodeId": { "type": "string" },
244
- "status": {
245
- "type": "string",
246
- "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
247
- },
248
- "failureCategory": { "type": "string" },
249
- "nodeRecordPath": { "type": "string" },
250
- "stdoutArtifactPath": { "type": "string" },
251
- "assistantArtifactPath": { "type": "string" },
252
- "preservedNodeRecordPath": { "type": "string" },
253
- "preservedNodeDir": { "type": "string" }
254
- }
255
- },
256
- "dagConvergencePass": {
257
- "type": "object",
258
- "additionalProperties": false,
259
- "required": ["pass", "finishedAt", "status", "reason", "artifactRefs"],
260
- "properties": {
261
- "pass": { "type": "integer", "minimum": 1 },
262
- "startedAt": { "type": "string" },
263
- "finishedAt": { "type": "string" },
264
- "status": {
265
- "type": "string",
266
- "enum": ["retrying", "terminal", "paused"]
267
- },
268
- "reason": { "type": "string" },
269
- "hardVerifyStatus": {
270
- "type": "string",
271
- "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
272
- },
273
- "hardVerifyFailureCategory": { "type": "string" },
274
- "processVerdict": {
275
- "type": "string",
276
- "enum": ["pass", "request-revision", "unknown"]
277
- },
278
- "repairArtifact": { "$ref": "#/$defs/repairArtifact" },
279
- "verifyPhase": {
280
- "type": "string",
281
- "enum": ["intermediate", "final"]
282
- },
283
- "verifyQuota": {
284
- "type": "string",
285
- "enum": ["1", "3", "full"]
286
- },
287
- "verifyCommandCount": { "type": "integer", "minimum": 0 },
288
- "verifyCommandLabels": {
289
- "type": "array",
290
- "items": { "type": "string" }
291
- },
292
- "shellSuccessCount": { "type": "integer", "minimum": 0 },
293
- "artifactRefs": {
294
- "type": "array",
295
- "items": { "$ref": "#/$defs/dagConvergencePassArtifactRef" }
296
- }
297
- }
298
- },
299
- "dagConvergence": {
300
- "type": "object",
301
- "additionalProperties": false,
302
- "required": ["enabled", "maxPasses", "currentPass", "passHistory"],
303
- "properties": {
304
- "enabled": { "type": "boolean" },
305
- "maxPasses": { "type": "integer", "minimum": 1 },
306
- "currentPass": { "type": "integer", "minimum": 1 },
307
- "terminalReason": { "type": "string" },
308
- "passHistory": {
309
- "type": "array",
310
- "items": { "$ref": "#/$defs/dagConvergencePass" }
311
- }
312
- }
313
- },
314
- "dagNodeReportRow": {
315
- "type": "object",
316
- "additionalProperties": false,
317
- "required": [
318
- "nodeId",
319
- "rank",
320
- "order",
321
- "executor",
322
- "status",
323
- "artifacts"
324
- ],
325
- "properties": {
326
- "nodeId": { "type": "string" },
327
- "rank": { "type": "integer", "minimum": 0 },
328
- "order": { "type": "integer", "minimum": 0 },
329
- "executor": {
330
- "type": "string",
331
- "enum": ["pi", "shell", "static"]
332
- },
333
- "model": { "type": "string" },
334
- "status": {
335
- "type": "string",
336
- "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
337
- },
338
- "durationMs": { "type": "number", "minimum": 0 },
339
- "tokensUsed": { "type": "number", "minimum": 0 },
340
- "failureCategory": { "type": "string" },
341
- "normalizedFailureCategory": {
342
- "type": "string",
343
- "enum": [
344
- "success",
345
- "validation",
346
- "executor",
347
- "write-guard",
348
- "timeout",
349
- "auth",
350
- "human-required",
351
- "human-rejected",
352
- "shell-command",
353
- "static-error",
354
- "decision-envelope",
355
- "skipped",
356
- "unknown"
357
- ]
358
- },
359
- "productLineFailureCategory": {
360
- "$ref": "#/$defs/dagProductLineFailureCategory"
361
- },
362
- "recommendedFollowUp": { "type": "string" },
363
- "recoveryRecommendation": {
364
- "$ref": "#/$defs/dagRecoveryRecommendation"
365
- },
366
- "backend": { "type": "string", "enum": ["sdk", "cli"] },
367
- "sdkAttempted": { "type": "boolean" },
368
- "startedAt": { "type": "string" },
369
- "finishedAt": { "type": "string" },
370
- "decisionEnvelope": { "$ref": "#/$defs/dagNodeDecisionEnvelope" },
371
- "artifacts": { "$ref": "#/$defs/dagNodeArtifactsReport" }
372
- }
373
- },
374
- "dagRunReportEntry": {
375
- "type": "object",
376
- "additionalProperties": false,
377
- "required": [
378
- "runId",
379
- "title",
380
- "lifecycle",
381
- "status",
382
- "runDir",
383
- "startedAt",
384
- "primaryFailure",
385
- "primaryRecovery",
386
- "downstreamSkippedNodes",
387
- "executorJsonl",
388
- "nodes"
389
- ],
390
- "properties": {
391
- "runId": { "type": "string", "minLength": 1 },
392
- "title": { "type": "string" },
393
- "lifecycle": {
394
- "type": "string",
395
- "enum": ["active", "paused", "completed"]
396
- },
397
- "status": {
398
- "type": "string",
399
- "enum": [
400
- "pending",
401
- "running",
402
- "finished",
403
- "partial_failed",
404
- "failed",
405
- "paused",
406
- "superseded",
407
- "abandoned"
408
- ]
409
- },
410
- "runDir": { "type": "string", "minLength": 1 },
411
- "startedAt": { "type": "string", "minLength": 1 },
412
- "finishedAt": { "type": "string" },
413
- "failureCategory": { "type": "string" },
414
- "normalizedFailureCategory": {
415
- "type": "string",
416
- "enum": [
417
- "success",
418
- "validation",
419
- "executor",
420
- "write-guard",
421
- "timeout",
422
- "auth",
423
- "human-required",
424
- "human-rejected",
425
- "shell-command",
426
- "static-error",
427
- "decision-envelope",
428
- "skipped",
429
- "unknown"
430
- ]
431
- },
432
- "productLineFailureCategory": {
433
- "$ref": "#/$defs/dagProductLineFailureCategory"
434
- },
435
- "recommendedFollowUp": { "type": "string" },
436
- "recoveryRecommendation": {
437
- "$ref": "#/$defs/dagRecoveryRecommendation"
438
- },
439
- "primaryFailure": { "$ref": "#/$defs/dagReportPrimaryFailure" },
440
- "primaryRecovery": { "$ref": "#/$defs/dagReportPrimaryRecovery" },
441
- "downstreamSkippedNodes": {
442
- "type": "array",
443
- "items": { "$ref": "#/$defs/dagReportDownstreamSkippedNode" }
444
- },
445
- "pausedByNodeId": { "type": "string" },
446
- "pauseReason": { "type": "string" },
447
- "controllerIdentity": {
448
- "type": "object",
449
- "additionalProperties": false,
450
- "required": ["status", "capturedAt", "runtimeContractCompatibility"],
451
- "properties": {
452
- "status": { "enum": ["pinned", "legacy-unpinned"] },
453
- "capturedAt": { "type": "string" },
454
- "packageName": { "type": "string" },
455
- "packageVersion": { "type": "string" },
456
- "packageFingerprint": { "type": "string" },
457
- "binarySha256": { "type": "string" },
458
- "runtimeContractCompatibility": {
459
- "enum": ["compatible", "incompatible", "legacy-unspecified"]
460
- },
461
- "runtimeContractReason": { "type": "string" }
462
- }
463
- },
464
- "executorJsonl": { "$ref": "#/$defs/dagArtifactRef" },
465
- "convergence": { "$ref": "#/$defs/dagConvergence" },
466
- "nodes": {
467
- "type": "array",
468
- "items": { "$ref": "#/$defs/dagNodeReportRow" }
469
- }
470
- }
471
- }
472
- }
473
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://loop-agent.local/schemas/agent-dag-report.schema.json",
4
+ "title": "Agent DAG Report",
5
+ "description": "Stable JSON contract for `dag report --json` output consumed by Decision Gate evidence builders and operator tooling. Derived read-only view over `.harness/dag-runs/` canonical facts; never mutates run state.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "runs"],
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "type": "integer",
12
+ "const": 1,
13
+ "description": "Report envelope schema version. Bump only when breaking stable fields."
14
+ },
15
+ "runs": {
16
+ "type": "array",
17
+ "items": { "$ref": "#/$defs/dagRunReportEntry" }
18
+ }
19
+ },
20
+ "$defs": {
21
+ "dagArtifactRef": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["path", "exists"],
25
+ "properties": {
26
+ "path": { "type": "string" },
27
+ "exists": { "type": "boolean" }
28
+ }
29
+ },
30
+ "dagRecoveryRecommendation": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": [
34
+ "action",
35
+ "summary",
36
+ "reason",
37
+ "humanRequired",
38
+ "autoRetryEligible"
39
+ ],
40
+ "properties": {
41
+ "action": {
42
+ "type": "string",
43
+ "enum": [
44
+ "none",
45
+ "monitor",
46
+ "retry-node",
47
+ "rerun-after-fix",
48
+ "resume-or-reject",
49
+ "manual-review",
50
+ "inspect-upstream",
51
+ "unknown"
52
+ ]
53
+ },
54
+ "summary": { "type": "string" },
55
+ "reason": { "type": "string" },
56
+ "humanRequired": { "type": "boolean" },
57
+ "autoRetryEligible": { "type": "boolean" },
58
+ "commandHint": { "type": "string" }
59
+ }
60
+ },
61
+ "dagProductLineFailureCategory": {
62
+ "type": "string",
63
+ "enum": [
64
+ "SpecUnclear",
65
+ "ContractMismatch",
66
+ "ProductBug",
67
+ "TestBug",
68
+ "EnvFailure",
69
+ "FlakyTest",
70
+ "RiskyChange",
71
+ "DependencyFailure",
72
+ "NeedsHuman",
73
+ "Unknown"
74
+ ]
75
+ },
76
+ "dagReportPrimaryFailure": {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": ["scope"],
80
+ "properties": {
81
+ "scope": { "type": "string", "enum": ["node", "run"] },
82
+ "nodeId": { "type": "string" },
83
+ "nodeStatus": {
84
+ "type": "string",
85
+ "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
86
+ },
87
+ "failureCategory": { "type": "string" },
88
+ "normalizedFailureCategory": {
89
+ "type": "string",
90
+ "enum": [
91
+ "success",
92
+ "validation",
93
+ "executor",
94
+ "write-guard",
95
+ "timeout",
96
+ "auth",
97
+ "human-required",
98
+ "human-rejected",
99
+ "shell-command",
100
+ "static-error",
101
+ "decision-envelope",
102
+ "skipped",
103
+ "unknown"
104
+ ]
105
+ },
106
+ "productLineFailureCategory": {
107
+ "$ref": "#/$defs/dagProductLineFailureCategory"
108
+ },
109
+ "recommendedFollowUp": { "type": "string" }
110
+ }
111
+ },
112
+ "dagReportPrimaryRecovery": {
113
+ "$ref": "#/$defs/dagRecoveryRecommendation"
114
+ },
115
+ "dagReportDownstreamSkippedNode": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": ["nodeId"],
119
+ "properties": {
120
+ "nodeId": { "type": "string" },
121
+ "failureCategory": { "type": "string" },
122
+ "normalizedFailureCategory": {
123
+ "type": "string",
124
+ "enum": [
125
+ "success",
126
+ "validation",
127
+ "executor",
128
+ "write-guard",
129
+ "timeout",
130
+ "auth",
131
+ "human-required",
132
+ "human-rejected",
133
+ "shell-command",
134
+ "static-error",
135
+ "decision-envelope",
136
+ "skipped",
137
+ "unknown"
138
+ ]
139
+ },
140
+ "productLineFailureCategory": {
141
+ "$ref": "#/$defs/dagProductLineFailureCategory"
142
+ },
143
+ "recommendedFollowUp": { "type": "string" }
144
+ }
145
+ },
146
+ "dagNodeDecisionEnvelope": {
147
+ "type": "object",
148
+ "additionalProperties": true,
149
+ "required": ["parseOk"],
150
+ "properties": {
151
+ "parseOk": { "type": "boolean" },
152
+ "decision": { "type": "string" },
153
+ "requiresHuman": { "type": "boolean" },
154
+ "nextAction": { "type": "string" },
155
+ "riskLevel": { "type": "string" },
156
+ "source": {
157
+ "type": "string",
158
+ "enum": ["assistantText", "resultSummaryFallback"]
159
+ },
160
+ "errors": {
161
+ "type": "array",
162
+ "items": { "type": "string" }
163
+ }
164
+ }
165
+ },
166
+ "dagNodeArtifactsReport": {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "required": [
170
+ "resultSummary",
171
+ "promptRedacted",
172
+ "skills",
173
+ "nodeRecord",
174
+ "decisionEnvelope",
175
+ "decisionEnvelopeValidation",
176
+ "humanEscalationJson",
177
+ "humanEscalationMd",
178
+ "humanApproval",
179
+ "humanRejection"
180
+ ],
181
+ "properties": {
182
+ "resultSummary": { "$ref": "#/$defs/dagArtifactRef" },
183
+ "promptRedacted": { "$ref": "#/$defs/dagArtifactRef" },
184
+ "skills": { "$ref": "#/$defs/dagArtifactRef" },
185
+ "nodeRecord": { "$ref": "#/$defs/dagArtifactRef" },
186
+ "decisionEnvelope": { "$ref": "#/$defs/dagArtifactRef" },
187
+ "decisionEnvelopeValidation": { "$ref": "#/$defs/dagArtifactRef" },
188
+ "humanEscalationJson": { "$ref": "#/$defs/dagArtifactRef" },
189
+ "humanEscalationMd": { "$ref": "#/$defs/dagArtifactRef" },
190
+ "humanApproval": { "$ref": "#/$defs/dagArtifactRef" },
191
+ "humanRejection": { "$ref": "#/$defs/dagArtifactRef" }
192
+ }
193
+ },
194
+ "repairArtifact": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "required": [
198
+ "schemaVersion",
199
+ "verdict",
200
+ "failureClass",
201
+ "rootCause",
202
+ "fixScope",
203
+ "invariant",
204
+ "evidenceRefs",
205
+ "rawLogFallbackAllowed"
206
+ ],
207
+ "properties": {
208
+ "schemaVersion": { "type": "integer", "const": 1 },
209
+ "verdict": {
210
+ "type": "string",
211
+ "enum": ["pass", "request-revision"]
212
+ },
213
+ "failureClass": {
214
+ "type": "string",
215
+ "enum": [
216
+ "syntax",
217
+ "runtime",
218
+ "logic",
219
+ "boundary",
220
+ "environment",
221
+ "governance",
222
+ "unknown"
223
+ ]
224
+ },
225
+ "rootCause": { "type": "string", "minLength": 1 },
226
+ "fixScope": {
227
+ "type": "array",
228
+ "items": { "type": "string", "minLength": 1 }
229
+ },
230
+ "invariant": { "type": "string", "minLength": 1 },
231
+ "evidenceRefs": {
232
+ "type": "array",
233
+ "items": { "type": "string", "minLength": 1 }
234
+ },
235
+ "rawLogFallbackAllowed": { "type": "boolean" }
236
+ }
237
+ },
238
+ "dagConvergencePassArtifactRef": {
239
+ "type": "object",
240
+ "additionalProperties": false,
241
+ "required": ["nodeId", "status"],
242
+ "properties": {
243
+ "nodeId": { "type": "string" },
244
+ "status": {
245
+ "type": "string",
246
+ "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
247
+ },
248
+ "failureCategory": { "type": "string" },
249
+ "nodeRecordPath": { "type": "string" },
250
+ "stdoutArtifactPath": { "type": "string" },
251
+ "assistantArtifactPath": { "type": "string" },
252
+ "preservedNodeRecordPath": { "type": "string" },
253
+ "preservedNodeDir": { "type": "string" }
254
+ }
255
+ },
256
+ "dagConvergencePass": {
257
+ "type": "object",
258
+ "additionalProperties": false,
259
+ "required": ["pass", "finishedAt", "status", "reason", "artifactRefs"],
260
+ "properties": {
261
+ "pass": { "type": "integer", "minimum": 1 },
262
+ "startedAt": { "type": "string" },
263
+ "finishedAt": { "type": "string" },
264
+ "status": {
265
+ "type": "string",
266
+ "enum": ["retrying", "terminal", "paused"]
267
+ },
268
+ "reason": { "type": "string" },
269
+ "hardVerifyStatus": {
270
+ "type": "string",
271
+ "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
272
+ },
273
+ "hardVerifyFailureCategory": { "type": "string" },
274
+ "processVerdict": {
275
+ "type": "string",
276
+ "enum": ["pass", "request-revision", "unknown"]
277
+ },
278
+ "repairArtifact": { "$ref": "#/$defs/repairArtifact" },
279
+ "verifyPhase": {
280
+ "type": "string",
281
+ "enum": ["intermediate", "final"]
282
+ },
283
+ "verifyQuota": {
284
+ "type": "string",
285
+ "enum": ["1", "3", "full"]
286
+ },
287
+ "verifyCommandCount": { "type": "integer", "minimum": 0 },
288
+ "verifyCommandLabels": {
289
+ "type": "array",
290
+ "items": { "type": "string" }
291
+ },
292
+ "shellSuccessCount": { "type": "integer", "minimum": 0 },
293
+ "artifactRefs": {
294
+ "type": "array",
295
+ "items": { "$ref": "#/$defs/dagConvergencePassArtifactRef" }
296
+ }
297
+ }
298
+ },
299
+ "dagConvergence": {
300
+ "type": "object",
301
+ "additionalProperties": false,
302
+ "required": ["enabled", "maxPasses", "currentPass", "passHistory"],
303
+ "properties": {
304
+ "enabled": { "type": "boolean" },
305
+ "maxPasses": { "type": "integer", "minimum": 1 },
306
+ "currentPass": { "type": "integer", "minimum": 1 },
307
+ "terminalReason": { "type": "string" },
308
+ "passHistory": {
309
+ "type": "array",
310
+ "items": { "$ref": "#/$defs/dagConvergencePass" }
311
+ }
312
+ }
313
+ },
314
+ "dagNodeReportRow": {
315
+ "type": "object",
316
+ "additionalProperties": false,
317
+ "required": [
318
+ "nodeId",
319
+ "rank",
320
+ "order",
321
+ "executor",
322
+ "status",
323
+ "artifacts"
324
+ ],
325
+ "properties": {
326
+ "nodeId": { "type": "string" },
327
+ "rank": { "type": "integer", "minimum": 0 },
328
+ "order": { "type": "integer", "minimum": 0 },
329
+ "executor": {
330
+ "type": "string",
331
+ "enum": ["pi", "shell", "static"]
332
+ },
333
+ "model": { "type": "string" },
334
+ "status": {
335
+ "type": "string",
336
+ "enum": ["PENDING", "RUNNING", "FINISHED", "ERROR", "SKIPPED"]
337
+ },
338
+ "durationMs": { "type": "number", "minimum": 0 },
339
+ "tokensUsed": { "type": "number", "minimum": 0 },
340
+ "failureCategory": { "type": "string" },
341
+ "normalizedFailureCategory": {
342
+ "type": "string",
343
+ "enum": [
344
+ "success",
345
+ "validation",
346
+ "executor",
347
+ "write-guard",
348
+ "timeout",
349
+ "auth",
350
+ "human-required",
351
+ "human-rejected",
352
+ "shell-command",
353
+ "static-error",
354
+ "decision-envelope",
355
+ "skipped",
356
+ "unknown"
357
+ ]
358
+ },
359
+ "productLineFailureCategory": {
360
+ "$ref": "#/$defs/dagProductLineFailureCategory"
361
+ },
362
+ "recommendedFollowUp": { "type": "string" },
363
+ "recoveryRecommendation": {
364
+ "$ref": "#/$defs/dagRecoveryRecommendation"
365
+ },
366
+ "backend": { "type": "string", "enum": ["sdk", "cli"] },
367
+ "sdkAttempted": { "type": "boolean" },
368
+ "startedAt": { "type": "string" },
369
+ "finishedAt": { "type": "string" },
370
+ "decisionEnvelope": { "$ref": "#/$defs/dagNodeDecisionEnvelope" },
371
+ "artifacts": { "$ref": "#/$defs/dagNodeArtifactsReport" }
372
+ }
373
+ },
374
+ "dagRunReportEntry": {
375
+ "type": "object",
376
+ "additionalProperties": false,
377
+ "required": [
378
+ "runId",
379
+ "title",
380
+ "lifecycle",
381
+ "status",
382
+ "runDir",
383
+ "startedAt",
384
+ "primaryFailure",
385
+ "primaryRecovery",
386
+ "downstreamSkippedNodes",
387
+ "executorJsonl",
388
+ "nodes"
389
+ ],
390
+ "properties": {
391
+ "runId": { "type": "string", "minLength": 1 },
392
+ "title": { "type": "string" },
393
+ "lifecycle": {
394
+ "type": "string",
395
+ "enum": ["active", "paused", "completed"]
396
+ },
397
+ "status": {
398
+ "type": "string",
399
+ "enum": [
400
+ "pending",
401
+ "running",
402
+ "finished",
403
+ "partial_failed",
404
+ "failed",
405
+ "paused",
406
+ "superseded",
407
+ "abandoned"
408
+ ]
409
+ },
410
+ "runDir": { "type": "string", "minLength": 1 },
411
+ "startedAt": { "type": "string", "minLength": 1 },
412
+ "finishedAt": { "type": "string" },
413
+ "failureCategory": { "type": "string" },
414
+ "normalizedFailureCategory": {
415
+ "type": "string",
416
+ "enum": [
417
+ "success",
418
+ "validation",
419
+ "executor",
420
+ "write-guard",
421
+ "timeout",
422
+ "auth",
423
+ "human-required",
424
+ "human-rejected",
425
+ "shell-command",
426
+ "static-error",
427
+ "decision-envelope",
428
+ "skipped",
429
+ "unknown"
430
+ ]
431
+ },
432
+ "productLineFailureCategory": {
433
+ "$ref": "#/$defs/dagProductLineFailureCategory"
434
+ },
435
+ "recommendedFollowUp": { "type": "string" },
436
+ "recoveryRecommendation": {
437
+ "$ref": "#/$defs/dagRecoveryRecommendation"
438
+ },
439
+ "primaryFailure": { "$ref": "#/$defs/dagReportPrimaryFailure" },
440
+ "primaryRecovery": { "$ref": "#/$defs/dagReportPrimaryRecovery" },
441
+ "downstreamSkippedNodes": {
442
+ "type": "array",
443
+ "items": { "$ref": "#/$defs/dagReportDownstreamSkippedNode" }
444
+ },
445
+ "pausedByNodeId": { "type": "string" },
446
+ "pauseReason": { "type": "string" },
447
+ "controllerIdentity": {
448
+ "type": "object",
449
+ "additionalProperties": false,
450
+ "required": ["status", "capturedAt", "runtimeContractCompatibility"],
451
+ "properties": {
452
+ "status": { "enum": ["pinned", "legacy-unpinned"] },
453
+ "capturedAt": { "type": "string" },
454
+ "packageName": { "type": "string" },
455
+ "packageVersion": { "type": "string" },
456
+ "packageFingerprint": { "type": "string" },
457
+ "binarySha256": { "type": "string" },
458
+ "runtimeContractCompatibility": {
459
+ "enum": ["compatible", "incompatible", "legacy-unspecified"]
460
+ },
461
+ "runtimeContractReason": { "type": "string" }
462
+ }
463
+ },
464
+ "executorJsonl": { "$ref": "#/$defs/dagArtifactRef" },
465
+ "convergence": { "$ref": "#/$defs/dagConvergence" },
466
+ "nodes": {
467
+ "type": "array",
468
+ "items": { "$ref": "#/$defs/dagNodeReportRow" }
469
+ }
470
+ }
471
+ }
472
+ }
473
+ }