@agentic-sdlc-kit/contracts 0.0.0-stage → 0.9.1

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 (495) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -2
  3. package/dist/agent/capability.d.ts +9 -0
  4. package/dist/agent/capability.d.ts.map +1 -0
  5. package/dist/agent/capability.js +31 -0
  6. package/dist/agent/capability.js.map +1 -0
  7. package/dist/agent/errors.d.ts +30 -0
  8. package/dist/agent/errors.d.ts.map +1 -0
  9. package/dist/agent/errors.js +62 -0
  10. package/dist/agent/errors.js.map +1 -0
  11. package/dist/agent/events.d.ts +222 -0
  12. package/dist/agent/events.d.ts.map +1 -0
  13. package/dist/agent/events.js +92 -0
  14. package/dist/agent/events.js.map +1 -0
  15. package/dist/agent/execution.d.ts +553 -0
  16. package/dist/agent/execution.d.ts.map +1 -0
  17. package/dist/agent/execution.js +229 -0
  18. package/dist/agent/execution.js.map +1 -0
  19. package/dist/agent/index.d.ts +8 -0
  20. package/dist/agent/index.d.ts.map +1 -0
  21. package/dist/agent/index.js +19 -0
  22. package/dist/agent/index.js.map +1 -0
  23. package/dist/agent/policy.d.ts +135 -0
  24. package/dist/agent/policy.d.ts.map +1 -0
  25. package/dist/agent/policy.js +78 -0
  26. package/dist/agent/policy.js.map +1 -0
  27. package/dist/agent/provider.d.ts +82 -0
  28. package/dist/agent/provider.d.ts.map +1 -0
  29. package/dist/agent/provider.js +33 -0
  30. package/dist/agent/provider.js.map +1 -0
  31. package/dist/agent/session.d.ts +17 -0
  32. package/dist/agent/session.d.ts.map +1 -0
  33. package/dist/agent/session.js +23 -0
  34. package/dist/agent/session.js.map +1 -0
  35. package/dist/application/application-context.d.ts +512 -0
  36. package/dist/application/application-context.d.ts.map +1 -0
  37. package/dist/application/application-context.js +42 -0
  38. package/dist/application/application-context.js.map +1 -0
  39. package/dist/application/application-persistence.d.ts +846 -0
  40. package/dist/application/application-persistence.d.ts.map +1 -0
  41. package/dist/application/application-persistence.js +37 -0
  42. package/dist/application/application-persistence.js.map +1 -0
  43. package/dist/application/application-state.d.ts +89 -0
  44. package/dist/application/application-state.d.ts.map +1 -0
  45. package/dist/application/application-state.js +66 -0
  46. package/dist/application/application-state.js.map +1 -0
  47. package/dist/application/application-transitions.d.ts +23 -0
  48. package/dist/application/application-transitions.d.ts.map +1 -0
  49. package/dist/application/application-transitions.js +60 -0
  50. package/dist/application/application-transitions.js.map +1 -0
  51. package/dist/application/index.d.ts +5 -0
  52. package/dist/application/index.d.ts.map +1 -0
  53. package/dist/application/index.js +6 -0
  54. package/dist/application/index.js.map +1 -0
  55. package/dist/architecture/api-contract.d.ts +259 -0
  56. package/dist/architecture/api-contract.d.ts.map +1 -0
  57. package/dist/architecture/api-contract.js +43 -0
  58. package/dist/architecture/api-contract.js.map +1 -0
  59. package/dist/architecture/architecture-approval.d.ts +40 -0
  60. package/dist/architecture/architecture-approval.d.ts.map +1 -0
  61. package/dist/architecture/architecture-approval.js +24 -0
  62. package/dist/architecture/architecture-approval.js.map +1 -0
  63. package/dist/architecture/architecture-options.d.ts +103 -0
  64. package/dist/architecture/architecture-options.d.ts.map +1 -0
  65. package/dist/architecture/architecture-options.js +35 -0
  66. package/dist/architecture/architecture-options.js.map +1 -0
  67. package/dist/architecture/component-map.d.ts +76 -0
  68. package/dist/architecture/component-map.d.ts.map +1 -0
  69. package/dist/architecture/component-map.js +28 -0
  70. package/dist/architecture/component-map.js.map +1 -0
  71. package/dist/architecture/data-model.d.ts +252 -0
  72. package/dist/architecture/data-model.d.ts.map +1 -0
  73. package/dist/architecture/data-model.js +53 -0
  74. package/dist/architecture/data-model.js.map +1 -0
  75. package/dist/architecture/index.d.ts +8 -0
  76. package/dist/architecture/index.d.ts.map +1 -0
  77. package/dist/architecture/index.js +9 -0
  78. package/dist/architecture/index.js.map +1 -0
  79. package/dist/architecture/operational-design.d.ts +134 -0
  80. package/dist/architecture/operational-design.d.ts.map +1 -0
  81. package/dist/architecture/operational-design.js +46 -0
  82. package/dist/architecture/operational-design.js.map +1 -0
  83. package/dist/architecture/security-design.d.ts +107 -0
  84. package/dist/architecture/security-design.d.ts.map +1 -0
  85. package/dist/architecture/security-design.js +40 -0
  86. package/dist/architecture/security-design.js.map +1 -0
  87. package/dist/common/errors.d.ts +40 -0
  88. package/dist/common/errors.d.ts.map +1 -0
  89. package/dist/common/errors.js +45 -0
  90. package/dist/common/errors.js.map +1 -0
  91. package/dist/common/identifier.d.ts +12 -0
  92. package/dist/common/identifier.d.ts.map +1 -0
  93. package/dist/common/identifier.js +21 -0
  94. package/dist/common/identifier.js.map +1 -0
  95. package/dist/common/index.d.ts +4 -0
  96. package/dist/common/index.d.ts.map +1 -0
  97. package/dist/common/index.js +5 -0
  98. package/dist/common/index.js.map +1 -0
  99. package/dist/common/result.d.ts +28 -0
  100. package/dist/common/result.d.ts.map +1 -0
  101. package/dist/common/result.js +33 -0
  102. package/dist/common/result.js.map +1 -0
  103. package/dist/evaluation/benchmark.d.ts +88 -0
  104. package/dist/evaluation/benchmark.d.ts.map +1 -0
  105. package/dist/evaluation/benchmark.js +34 -0
  106. package/dist/evaluation/benchmark.js.map +1 -0
  107. package/dist/evaluation/index.d.ts +3 -0
  108. package/dist/evaluation/index.d.ts.map +1 -0
  109. package/dist/evaluation/index.js +4 -0
  110. package/dist/evaluation/index.js.map +1 -0
  111. package/dist/evaluation/metrics.d.ts +164 -0
  112. package/dist/evaluation/metrics.d.ts.map +1 -0
  113. package/dist/evaluation/metrics.js +64 -0
  114. package/dist/evaluation/metrics.js.map +1 -0
  115. package/dist/evolution/experiment.d.ts +85 -0
  116. package/dist/evolution/experiment.d.ts.map +1 -0
  117. package/dist/evolution/experiment.js +52 -0
  118. package/dist/evolution/experiment.js.map +1 -0
  119. package/dist/evolution/improvement-hypothesis.d.ts +98 -0
  120. package/dist/evolution/improvement-hypothesis.d.ts.map +1 -0
  121. package/dist/evolution/improvement-hypothesis.js +59 -0
  122. package/dist/evolution/improvement-hypothesis.js.map +1 -0
  123. package/dist/evolution/index.d.ts +3 -0
  124. package/dist/evolution/index.d.ts.map +1 -0
  125. package/dist/evolution/index.js +4 -0
  126. package/dist/evolution/index.js.map +1 -0
  127. package/dist/index.d.ts +24 -0
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +43 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/installer/index.d.ts +4 -0
  132. package/dist/installer/index.d.ts.map +1 -0
  133. package/dist/installer/index.js +5 -0
  134. package/dist/installer/index.js.map +1 -0
  135. package/dist/installer/install-plan.d.ts +168 -0
  136. package/dist/installer/install-plan.d.ts.map +1 -0
  137. package/dist/installer/install-plan.js +40 -0
  138. package/dist/installer/install-plan.js.map +1 -0
  139. package/dist/installer/ownership-manifest.d.ts +86 -0
  140. package/dist/installer/ownership-manifest.d.ts.map +1 -0
  141. package/dist/installer/ownership-manifest.js +34 -0
  142. package/dist/installer/ownership-manifest.js.map +1 -0
  143. package/dist/installer/package-manifest.d.ts +55 -0
  144. package/dist/installer/package-manifest.d.ts.map +1 -0
  145. package/dist/installer/package-manifest.js +46 -0
  146. package/dist/installer/package-manifest.js.map +1 -0
  147. package/dist/learning/engineering-lesson.d.ts +84 -0
  148. package/dist/learning/engineering-lesson.d.ts.map +1 -0
  149. package/dist/learning/engineering-lesson.js +47 -0
  150. package/dist/learning/engineering-lesson.js.map +1 -0
  151. package/dist/learning/engineering-memory.d.ts +66 -0
  152. package/dist/learning/engineering-memory.d.ts.map +1 -0
  153. package/dist/learning/engineering-memory.js +44 -0
  154. package/dist/learning/engineering-memory.js.map +1 -0
  155. package/dist/learning/experience-episode.d.ts +176 -0
  156. package/dist/learning/experience-episode.d.ts.map +1 -0
  157. package/dist/learning/experience-episode.js +68 -0
  158. package/dist/learning/experience-episode.js.map +1 -0
  159. package/dist/learning/experience.d.ts +68 -0
  160. package/dist/learning/experience.d.ts.map +1 -0
  161. package/dist/learning/experience.js +22 -0
  162. package/dist/learning/experience.js.map +1 -0
  163. package/dist/learning/hypothesis.d.ts +57 -0
  164. package/dist/learning/hypothesis.d.ts.map +1 -0
  165. package/dist/learning/hypothesis.js +27 -0
  166. package/dist/learning/hypothesis.js.map +1 -0
  167. package/dist/learning/index.d.ts +8 -0
  168. package/dist/learning/index.d.ts.map +1 -0
  169. package/dist/learning/index.js +9 -0
  170. package/dist/learning/index.js.map +1 -0
  171. package/dist/learning/memory.d.ts +42 -0
  172. package/dist/learning/memory.d.ts.map +1 -0
  173. package/dist/learning/memory.js +20 -0
  174. package/dist/learning/memory.js.map +1 -0
  175. package/dist/learning/promotion.d.ts +31 -0
  176. package/dist/learning/promotion.d.ts.map +1 -0
  177. package/dist/learning/promotion.js +16 -0
  178. package/dist/learning/promotion.js.map +1 -0
  179. package/dist/maintenance/bug-fix-workflow.d.ts +57 -0
  180. package/dist/maintenance/bug-fix-workflow.d.ts.map +1 -0
  181. package/dist/maintenance/bug-fix-workflow.js +100 -0
  182. package/dist/maintenance/bug-fix-workflow.js.map +1 -0
  183. package/dist/maintenance/bug-report.d.ts +62 -0
  184. package/dist/maintenance/bug-report.d.ts.map +1 -0
  185. package/dist/maintenance/bug-report.js +49 -0
  186. package/dist/maintenance/bug-report.js.map +1 -0
  187. package/dist/maintenance/index.d.ts +6 -0
  188. package/dist/maintenance/index.d.ts.map +1 -0
  189. package/dist/maintenance/index.js +7 -0
  190. package/dist/maintenance/index.js.map +1 -0
  191. package/dist/maintenance/performance-baseline.d.ts +80 -0
  192. package/dist/maintenance/performance-baseline.d.ts.map +1 -0
  193. package/dist/maintenance/performance-baseline.js +32 -0
  194. package/dist/maintenance/performance-baseline.js.map +1 -0
  195. package/dist/maintenance/refactor-contract.d.ts +158 -0
  196. package/dist/maintenance/refactor-contract.d.ts.map +1 -0
  197. package/dist/maintenance/refactor-contract.js +65 -0
  198. package/dist/maintenance/refactor-contract.js.map +1 -0
  199. package/dist/maintenance/refactor-workflow.d.ts +79 -0
  200. package/dist/maintenance/refactor-workflow.d.ts.map +1 -0
  201. package/dist/maintenance/refactor-workflow.js +100 -0
  202. package/dist/maintenance/refactor-workflow.js.map +1 -0
  203. package/dist/observer/event-schema.d.ts +49 -0
  204. package/dist/observer/event-schema.d.ts.map +1 -0
  205. package/dist/observer/event-schema.js +48 -0
  206. package/dist/observer/event-schema.js.map +1 -0
  207. package/dist/observer/index.d.ts +5 -0
  208. package/dist/observer/index.d.ts.map +1 -0
  209. package/dist/observer/index.js +6 -0
  210. package/dist/observer/index.js.map +1 -0
  211. package/dist/observer/journal.d.ts +83 -0
  212. package/dist/observer/journal.d.ts.map +1 -0
  213. package/dist/observer/journal.js +76 -0
  214. package/dist/observer/journal.js.map +1 -0
  215. package/dist/observer/retention.d.ts +25 -0
  216. package/dist/observer/retention.d.ts.map +1 -0
  217. package/dist/observer/retention.js +21 -0
  218. package/dist/observer/retention.js.map +1 -0
  219. package/dist/observer/run-summary.d.ts +260 -0
  220. package/dist/observer/run-summary.d.ts.map +1 -0
  221. package/dist/observer/run-summary.js +32 -0
  222. package/dist/observer/run-summary.js.map +1 -0
  223. package/dist/patterns/index.d.ts +2 -0
  224. package/dist/patterns/index.d.ts.map +1 -0
  225. package/dist/patterns/index.js +3 -0
  226. package/dist/patterns/index.js.map +1 -0
  227. package/dist/patterns/pattern.d.ts +106 -0
  228. package/dist/patterns/pattern.d.ts.map +1 -0
  229. package/dist/patterns/pattern.js +69 -0
  230. package/dist/patterns/pattern.js.map +1 -0
  231. package/dist/planning/index.d.ts +2 -0
  232. package/dist/planning/index.d.ts.map +1 -0
  233. package/dist/planning/index.js +3 -0
  234. package/dist/planning/index.js.map +1 -0
  235. package/dist/planning/task.d.ts +178 -0
  236. package/dist/planning/task.d.ts.map +1 -0
  237. package/dist/planning/task.js +35 -0
  238. package/dist/planning/task.js.map +1 -0
  239. package/dist/policy/index.d.ts +2 -0
  240. package/dist/policy/index.d.ts.map +1 -0
  241. package/dist/policy/index.js +3 -0
  242. package/dist/policy/index.js.map +1 -0
  243. package/dist/policy/policy.d.ts +83 -0
  244. package/dist/policy/policy.d.ts.map +1 -0
  245. package/dist/policy/policy.js +57 -0
  246. package/dist/policy/policy.js.map +1 -0
  247. package/dist/product/index.d.ts +5 -0
  248. package/dist/product/index.d.ts.map +1 -0
  249. package/dist/product/index.js +6 -0
  250. package/dist/product/index.js.map +1 -0
  251. package/dist/product/mvp-scope.d.ts +25 -0
  252. package/dist/product/mvp-scope.d.ts.map +1 -0
  253. package/dist/product/mvp-scope.js +18 -0
  254. package/dist/product/mvp-scope.js.map +1 -0
  255. package/dist/product/product-brief.d.ts +94 -0
  256. package/dist/product/product-brief.d.ts.map +1 -0
  257. package/dist/product/product-brief.js +44 -0
  258. package/dist/product/product-brief.js.map +1 -0
  259. package/dist/product/requirements.d.ts +251 -0
  260. package/dist/product/requirements.d.ts.map +1 -0
  261. package/dist/product/requirements.js +50 -0
  262. package/dist/product/requirements.js.map +1 -0
  263. package/dist/product/traceability.d.ts +50 -0
  264. package/dist/product/traceability.d.ts.map +1 -0
  265. package/dist/product/traceability.js +20 -0
  266. package/dist/product/traceability.js.map +1 -0
  267. package/dist/project/index.d.ts +3 -0
  268. package/dist/project/index.d.ts.map +1 -0
  269. package/dist/project/index.js +4 -0
  270. package/dist/project/index.js.map +1 -0
  271. package/dist/project/project-profile.d.ts +79 -0
  272. package/dist/project/project-profile.d.ts.map +1 -0
  273. package/dist/project/project-profile.js +53 -0
  274. package/dist/project/project-profile.js.map +1 -0
  275. package/dist/project/repository-scan.d.ts +82 -0
  276. package/dist/project/repository-scan.d.ts.map +1 -0
  277. package/dist/project/repository-scan.js +29 -0
  278. package/dist/project/repository-scan.js.map +1 -0
  279. package/dist/routing/capability-registry.d.ts +87 -0
  280. package/dist/routing/capability-registry.d.ts.map +1 -0
  281. package/dist/routing/capability-registry.js +26 -0
  282. package/dist/routing/capability-registry.js.map +1 -0
  283. package/dist/routing/escalation.d.ts +25 -0
  284. package/dist/routing/escalation.d.ts.map +1 -0
  285. package/dist/routing/escalation.js +21 -0
  286. package/dist/routing/escalation.js.map +1 -0
  287. package/dist/routing/index.d.ts +5 -0
  288. package/dist/routing/index.d.ts.map +1 -0
  289. package/dist/routing/index.js +6 -0
  290. package/dist/routing/index.js.map +1 -0
  291. package/dist/routing/routing-policy.d.ts +103 -0
  292. package/dist/routing/routing-policy.d.ts.map +1 -0
  293. package/dist/routing/routing-policy.js +32 -0
  294. package/dist/routing/routing-policy.js.map +1 -0
  295. package/dist/routing/routing-request.d.ts +63 -0
  296. package/dist/routing/routing-request.d.ts.map +1 -0
  297. package/dist/routing/routing-request.js +46 -0
  298. package/dist/routing/routing-request.js.map +1 -0
  299. package/dist/runtime-guard/action-classification.d.ts +54 -0
  300. package/dist/runtime-guard/action-classification.d.ts.map +1 -0
  301. package/dist/runtime-guard/action-classification.js +90 -0
  302. package/dist/runtime-guard/action-classification.js.map +1 -0
  303. package/dist/runtime-guard/audit-event.d.ts +98 -0
  304. package/dist/runtime-guard/audit-event.d.ts.map +1 -0
  305. package/dist/runtime-guard/audit-event.js +45 -0
  306. package/dist/runtime-guard/audit-event.js.map +1 -0
  307. package/dist/runtime-guard/index.d.ts +4 -0
  308. package/dist/runtime-guard/index.d.ts.map +1 -0
  309. package/dist/runtime-guard/index.js +5 -0
  310. package/dist/runtime-guard/index.js.map +1 -0
  311. package/dist/runtime-guard/policy-schema.d.ts +139 -0
  312. package/dist/runtime-guard/policy-schema.d.ts.map +1 -0
  313. package/dist/runtime-guard/policy-schema.js +50 -0
  314. package/dist/runtime-guard/policy-schema.js.map +1 -0
  315. package/dist/scaffolding/index.d.ts +3 -0
  316. package/dist/scaffolding/index.d.ts.map +1 -0
  317. package/dist/scaffolding/index.js +4 -0
  318. package/dist/scaffolding/index.js.map +1 -0
  319. package/dist/scaffolding/scaffold-contract.d.ts +528 -0
  320. package/dist/scaffolding/scaffold-contract.d.ts.map +1 -0
  321. package/dist/scaffolding/scaffold-contract.js +50 -0
  322. package/dist/scaffolding/scaffold-contract.js.map +1 -0
  323. package/dist/scaffolding/template-manifest.d.ts +105 -0
  324. package/dist/scaffolding/template-manifest.d.ts.map +1 -0
  325. package/dist/scaffolding/template-manifest.js +44 -0
  326. package/dist/scaffolding/template-manifest.js.map +1 -0
  327. package/dist/secret-guard/detection-rule.d.ts +33 -0
  328. package/dist/secret-guard/detection-rule.d.ts.map +1 -0
  329. package/dist/secret-guard/detection-rule.js +153 -0
  330. package/dist/secret-guard/detection-rule.js.map +1 -0
  331. package/dist/secret-guard/finding.d.ts +89 -0
  332. package/dist/secret-guard/finding.d.ts.map +1 -0
  333. package/dist/secret-guard/finding.js +87 -0
  334. package/dist/secret-guard/finding.js.map +1 -0
  335. package/dist/secret-guard/index.d.ts +5 -0
  336. package/dist/secret-guard/index.d.ts.map +1 -0
  337. package/dist/secret-guard/index.js +6 -0
  338. package/dist/secret-guard/index.js.map +1 -0
  339. package/dist/secret-guard/redaction-policy.d.ts +26 -0
  340. package/dist/secret-guard/redaction-policy.d.ts.map +1 -0
  341. package/dist/secret-guard/redaction-policy.js +30 -0
  342. package/dist/secret-guard/redaction-policy.js.map +1 -0
  343. package/dist/secret-guard/scanner-failure.d.ts +59 -0
  344. package/dist/secret-guard/scanner-failure.d.ts.map +1 -0
  345. package/dist/secret-guard/scanner-failure.js +40 -0
  346. package/dist/secret-guard/scanner-failure.js.map +1 -0
  347. package/dist/specification/index.d.ts +2 -0
  348. package/dist/specification/index.d.ts.map +1 -0
  349. package/dist/specification/index.js +3 -0
  350. package/dist/specification/index.js.map +1 -0
  351. package/dist/specification/specification.d.ts +229 -0
  352. package/dist/specification/specification.d.ts.map +1 -0
  353. package/dist/specification/specification.js +67 -0
  354. package/dist/specification/specification.js.map +1 -0
  355. package/dist/stack-pack/index.d.ts +2 -0
  356. package/dist/stack-pack/index.d.ts.map +1 -0
  357. package/dist/stack-pack/index.js +3 -0
  358. package/dist/stack-pack/index.js.map +1 -0
  359. package/dist/stack-pack/manifest.d.ts +88 -0
  360. package/dist/stack-pack/manifest.d.ts.map +1 -0
  361. package/dist/stack-pack/manifest.js +51 -0
  362. package/dist/stack-pack/manifest.js.map +1 -0
  363. package/dist/verification/index.d.ts +2 -0
  364. package/dist/verification/index.d.ts.map +1 -0
  365. package/dist/verification/index.js +3 -0
  366. package/dist/verification/index.js.map +1 -0
  367. package/dist/verification/report.d.ts +95 -0
  368. package/dist/verification/report.d.ts.map +1 -0
  369. package/dist/verification/report.js +57 -0
  370. package/dist/verification/report.js.map +1 -0
  371. package/dist/workflow/index.d.ts +3 -0
  372. package/dist/workflow/index.d.ts.map +1 -0
  373. package/dist/workflow/index.js +4 -0
  374. package/dist/workflow/index.js.map +1 -0
  375. package/dist/workflow/next-action.d.ts +130 -0
  376. package/dist/workflow/next-action.d.ts.map +1 -0
  377. package/dist/workflow/next-action.js +92 -0
  378. package/dist/workflow/next-action.js.map +1 -0
  379. package/dist/workflow/workflow.d.ts +68 -0
  380. package/dist/workflow/workflow.d.ts.map +1 -0
  381. package/dist/workflow/workflow.js +33 -0
  382. package/dist/workflow/workflow.js.map +1 -0
  383. package/package.json +31 -3
  384. package/src/agent/agent.test.ts +451 -0
  385. package/src/agent/capability.ts +35 -0
  386. package/src/agent/errors.ts +69 -0
  387. package/src/agent/events.ts +107 -0
  388. package/src/agent/execution.ts +275 -0
  389. package/src/agent/index.ts +19 -0
  390. package/src/agent/policy.ts +82 -0
  391. package/src/agent/provider.ts +124 -0
  392. package/src/agent/session.ts +29 -0
  393. package/src/application/application-context.ts +47 -0
  394. package/src/application/application-persistence.ts +44 -0
  395. package/src/application/application-state.test.ts +107 -0
  396. package/src/application/application-state.ts +81 -0
  397. package/src/application/application-transitions.ts +71 -0
  398. package/src/application/index.ts +5 -0
  399. package/src/architecture/api-contract.ts +56 -0
  400. package/src/architecture/architecture-approval.ts +27 -0
  401. package/src/architecture/architecture-options.ts +42 -0
  402. package/src/architecture/architecture.test.ts +263 -0
  403. package/src/architecture/component-map.ts +35 -0
  404. package/src/architecture/data-model.ts +66 -0
  405. package/src/architecture/index.ts +8 -0
  406. package/src/architecture/operational-design.ts +55 -0
  407. package/src/architecture/security-design.ts +47 -0
  408. package/src/common/errors.test.ts +46 -0
  409. package/src/common/errors.ts +114 -0
  410. package/src/common/identifier.test.ts +51 -0
  411. package/src/common/identifier.ts +33 -0
  412. package/src/common/index.ts +4 -0
  413. package/src/common/result.test.ts +52 -0
  414. package/src/common/result.ts +50 -0
  415. package/src/evaluation/benchmark.ts +42 -0
  416. package/src/evaluation/index.ts +3 -0
  417. package/src/evaluation/metrics.ts +76 -0
  418. package/src/evolution/experiment.ts +61 -0
  419. package/src/evolution/improvement-hypothesis.ts +67 -0
  420. package/src/evolution/index.ts +3 -0
  421. package/src/index.test.ts +54 -0
  422. package/src/index.ts +53 -0
  423. package/src/installer/index.ts +4 -0
  424. package/src/installer/install-plan.ts +49 -0
  425. package/src/installer/ownership-manifest.ts +40 -0
  426. package/src/installer/package-manifest.ts +54 -0
  427. package/src/learning/engineering-lesson.ts +55 -0
  428. package/src/learning/engineering-memory.ts +51 -0
  429. package/src/learning/experience-episode.ts +76 -0
  430. package/src/learning/experience.ts +27 -0
  431. package/src/learning/hypothesis.ts +33 -0
  432. package/src/learning/index.ts +8 -0
  433. package/src/learning/memory.ts +25 -0
  434. package/src/learning/promotion.ts +19 -0
  435. package/src/maintenance/bug-fix-workflow.ts +119 -0
  436. package/src/maintenance/bug-report.ts +58 -0
  437. package/src/maintenance/index.ts +6 -0
  438. package/src/maintenance/maintenance.test.ts +219 -0
  439. package/src/maintenance/performance-baseline.ts +35 -0
  440. package/src/maintenance/refactor-contract.ts +77 -0
  441. package/src/maintenance/refactor-workflow.ts +121 -0
  442. package/src/observer/event-schema.ts +54 -0
  443. package/src/observer/index.ts +5 -0
  444. package/src/observer/journal.test.ts +73 -0
  445. package/src/observer/journal.ts +84 -0
  446. package/src/observer/retention.ts +24 -0
  447. package/src/observer/run-summary.ts +37 -0
  448. package/src/patterns/index.ts +2 -0
  449. package/src/patterns/pattern.ts +80 -0
  450. package/src/planning/index.ts +2 -0
  451. package/src/planning/task.ts +47 -0
  452. package/src/policy/index.ts +2 -0
  453. package/src/policy/policy.test.ts +50 -0
  454. package/src/policy/policy.ts +67 -0
  455. package/src/product/index.ts +5 -0
  456. package/src/product/mvp-scope.ts +21 -0
  457. package/src/product/product-brief.test.ts +108 -0
  458. package/src/product/product-brief.ts +53 -0
  459. package/src/product/requirements.ts +59 -0
  460. package/src/product/traceability.ts +25 -0
  461. package/src/project/index.ts +3 -0
  462. package/src/project/project-profile.test.ts +98 -0
  463. package/src/project/project-profile.ts +65 -0
  464. package/src/project/repository-scan.ts +34 -0
  465. package/src/routing/capability-registry.ts +31 -0
  466. package/src/routing/escalation.ts +24 -0
  467. package/src/routing/index.ts +5 -0
  468. package/src/routing/routing-policy.ts +38 -0
  469. package/src/routing/routing-request.ts +55 -0
  470. package/src/runtime-guard/action-classification.ts +99 -0
  471. package/src/runtime-guard/audit-event.ts +49 -0
  472. package/src/runtime-guard/index.ts +4 -0
  473. package/src/runtime-guard/policy-schema.ts +56 -0
  474. package/src/runtime-guard/runtime-guard.test.ts +147 -0
  475. package/src/scaffolding/index.ts +3 -0
  476. package/src/scaffolding/scaffold-contract.test.ts +107 -0
  477. package/src/scaffolding/scaffold-contract.ts +63 -0
  478. package/src/scaffolding/template-manifest.ts +52 -0
  479. package/src/secret-guard/detection-rule.ts +168 -0
  480. package/src/secret-guard/finding.ts +95 -0
  481. package/src/secret-guard/index.ts +5 -0
  482. package/src/secret-guard/redaction-policy.ts +34 -0
  483. package/src/secret-guard/scanner-failure.ts +47 -0
  484. package/src/secret-guard/secret-guard.test.ts +130 -0
  485. package/src/specification/index.ts +2 -0
  486. package/src/specification/specification.ts +79 -0
  487. package/src/stack-pack/index.ts +2 -0
  488. package/src/stack-pack/manifest.ts +60 -0
  489. package/src/verification/index.ts +2 -0
  490. package/src/verification/report.test.ts +91 -0
  491. package/src/verification/report.ts +62 -0
  492. package/src/workflow/index.ts +3 -0
  493. package/src/workflow/next-action.test.ts +101 -0
  494. package/src/workflow/next-action.ts +101 -0
  495. package/src/workflow/workflow.ts +49 -0
@@ -0,0 +1,23 @@
1
+ // packages/contracts/src/agent/session.ts
2
+ //
3
+ // M36 agent session contract (ADR-0019 v2). A session is a resumable provider
4
+ // conversation bound to one workflow task. resumeToken is opaque to Kit;
5
+ // the provider owns its format and rotation.
6
+ //
7
+ // Resume is addressed by (executionId, resumeToken) — NOT by re-passing
8
+ // the full original request. The gateway persists the original request so
9
+ // the provider does not need it re-submitted, which avoids drift between
10
+ // a persisted request and a resubmitted one.
11
+ //
12
+ // SECURITY: a resumeToken is a CREDENTIAL (ADR-0020 §6). It is never
13
+ // logged, never included in ordinary events, and never persisted
14
+ // unencrypted. Compromise of a resume token is treated as compromise of
15
+ // the execution it can resume.
16
+ import { z } from 'zod';
17
+ export const AgentSessionIdSchema = z.string().min(1);
18
+ export const AgentResumeTokenSchema = z.string().min(1);
19
+ export const AgentSessionRefSchema = z.object({
20
+ sessionId: AgentSessionIdSchema,
21
+ resumeToken: AgentResumeTokenSchema.optional(),
22
+ });
23
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/agent/session.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,8EAA8E;AAC9E,yEAAyE;AACzE,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,yEAAyE;AACzE,6CAA6C;AAC7C,EAAE;AACF,qEAAqE;AACrE,iEAAiE;AACjE,wEAAwE;AACxE,+BAA+B;AAE/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAGtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAGxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,oBAAoB;IAC/B,WAAW,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC"}
@@ -0,0 +1,512 @@
1
+ import { z } from 'zod';
2
+ export declare const ApplicationContextSchema: z.ZodObject<{
3
+ brief: z.ZodOptional<z.ZodString>;
4
+ specification: z.ZodOptional<z.ZodObject<{
5
+ id: z.ZodString;
6
+ title: z.ZodString;
7
+ overview: z.ZodString;
8
+ problem: z.ZodString;
9
+ scope: z.ZodObject<{
10
+ in: z.ZodArray<z.ZodString, "many">;
11
+ out: z.ZodArray<z.ZodString, "many">;
12
+ }, "strip", z.ZodTypeAny, {
13
+ in: string[];
14
+ out: string[];
15
+ }, {
16
+ in: string[];
17
+ out: string[];
18
+ }>;
19
+ actors: z.ZodArray<z.ZodObject<{
20
+ name: z.ZodString;
21
+ role: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ name: string;
24
+ role: string;
25
+ }, {
26
+ name: string;
27
+ role: string;
28
+ }>, "many">;
29
+ functionalRequirements: z.ZodArray<z.ZodObject<{
30
+ id: z.ZodString;
31
+ statement: z.ZodString;
32
+ }, "strip", z.ZodTypeAny, {
33
+ id: string;
34
+ statement: string;
35
+ }, {
36
+ id: string;
37
+ statement: string;
38
+ }>, "many">;
39
+ nonFunctionalRequirements: z.ZodArray<z.ZodObject<{
40
+ id: z.ZodString;
41
+ statement: z.ZodString;
42
+ }, "strip", z.ZodTypeAny, {
43
+ id: string;
44
+ statement: string;
45
+ }, {
46
+ id: string;
47
+ statement: string;
48
+ }>, "many">;
49
+ acceptanceCriteria: z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ criterion: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ id: string;
54
+ criterion: string;
55
+ }, {
56
+ id: string;
57
+ criterion: string;
58
+ }>, "many">;
59
+ edgeCases: z.ZodArray<z.ZodString, "many">;
60
+ dependencies: z.ZodArray<z.ZodString, "many">;
61
+ risks: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ severity: z.ZodEnum<["low", "medium", "high"]>;
64
+ description: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ id: string;
67
+ severity: "low" | "medium" | "high";
68
+ description: string;
69
+ }, {
70
+ id: string;
71
+ severity: "low" | "medium" | "high";
72
+ description: string;
73
+ }>, "many">;
74
+ openQuestions: z.ZodArray<z.ZodObject<{
75
+ id: z.ZodString;
76
+ question: z.ZodString;
77
+ resolved: z.ZodBoolean;
78
+ }, "strip", z.ZodTypeAny, {
79
+ id: string;
80
+ question: string;
81
+ resolved: boolean;
82
+ }, {
83
+ id: string;
84
+ question: string;
85
+ resolved: boolean;
86
+ }>, "many">;
87
+ }, "strict", z.ZodTypeAny, {
88
+ id: string;
89
+ overview: string;
90
+ problem: string;
91
+ scope: {
92
+ in: string[];
93
+ out: string[];
94
+ };
95
+ actors: {
96
+ name: string;
97
+ role: string;
98
+ }[];
99
+ functionalRequirements: {
100
+ id: string;
101
+ statement: string;
102
+ }[];
103
+ nonFunctionalRequirements: {
104
+ id: string;
105
+ statement: string;
106
+ }[];
107
+ acceptanceCriteria: {
108
+ id: string;
109
+ criterion: string;
110
+ }[];
111
+ edgeCases: string[];
112
+ dependencies: string[];
113
+ risks: {
114
+ id: string;
115
+ severity: "low" | "medium" | "high";
116
+ description: string;
117
+ }[];
118
+ openQuestions: {
119
+ id: string;
120
+ question: string;
121
+ resolved: boolean;
122
+ }[];
123
+ title: string;
124
+ }, {
125
+ id: string;
126
+ overview: string;
127
+ problem: string;
128
+ scope: {
129
+ in: string[];
130
+ out: string[];
131
+ };
132
+ actors: {
133
+ name: string;
134
+ role: string;
135
+ }[];
136
+ functionalRequirements: {
137
+ id: string;
138
+ statement: string;
139
+ }[];
140
+ nonFunctionalRequirements: {
141
+ id: string;
142
+ statement: string;
143
+ }[];
144
+ acceptanceCriteria: {
145
+ id: string;
146
+ criterion: string;
147
+ }[];
148
+ edgeCases: string[];
149
+ dependencies: string[];
150
+ risks: {
151
+ id: string;
152
+ severity: "low" | "medium" | "high";
153
+ description: string;
154
+ }[];
155
+ openQuestions: {
156
+ id: string;
157
+ question: string;
158
+ resolved: boolean;
159
+ }[];
160
+ title: string;
161
+ }>>;
162
+ architectureDecisionIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
163
+ plan: z.ZodOptional<z.ZodObject<{
164
+ featureId: z.ZodString;
165
+ tasks: z.ZodArray<z.ZodObject<{
166
+ id: z.ZodString;
167
+ description: z.ZodString;
168
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
169
+ verification: z.ZodObject<{
170
+ command: z.ZodArray<z.ZodString, "many">;
171
+ expectedStatus: z.ZodEnum<["passed", "failed", "skipped", "blocked"]>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ command: string[];
174
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
175
+ }, {
176
+ command: string[];
177
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
178
+ }>;
179
+ dependencies: z.ZodArray<z.ZodString, "many">;
180
+ likelyFiles: z.ZodArray<z.ZodString, "many">;
181
+ estimatedScope: z.ZodEnum<["xs", "s", "m", "l", "xl"]>;
182
+ risk: z.ZodEnum<["low", "medium", "high"]>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ id: string;
185
+ acceptanceCriteria: string[];
186
+ dependencies: string[];
187
+ description: string;
188
+ verification: {
189
+ command: string[];
190
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
191
+ };
192
+ likelyFiles: string[];
193
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
194
+ risk: "low" | "medium" | "high";
195
+ }, {
196
+ id: string;
197
+ acceptanceCriteria: string[];
198
+ dependencies: string[];
199
+ description: string;
200
+ verification: {
201
+ command: string[];
202
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
203
+ };
204
+ likelyFiles: string[];
205
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
206
+ risk: "low" | "medium" | "high";
207
+ }>, "many">;
208
+ edges: z.ZodArray<z.ZodObject<{
209
+ from: z.ZodString;
210
+ to: z.ZodString;
211
+ reason: z.ZodString;
212
+ }, "strip", z.ZodTypeAny, {
213
+ from: string;
214
+ to: string;
215
+ reason: string;
216
+ }, {
217
+ from: string;
218
+ to: string;
219
+ reason: string;
220
+ }>, "many">;
221
+ verticalSlices: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
222
+ }, "strip", z.ZodTypeAny, {
223
+ featureId: string;
224
+ tasks: {
225
+ id: string;
226
+ acceptanceCriteria: string[];
227
+ dependencies: string[];
228
+ description: string;
229
+ verification: {
230
+ command: string[];
231
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
232
+ };
233
+ likelyFiles: string[];
234
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
235
+ risk: "low" | "medium" | "high";
236
+ }[];
237
+ edges: {
238
+ from: string;
239
+ to: string;
240
+ reason: string;
241
+ }[];
242
+ verticalSlices: string[][];
243
+ }, {
244
+ featureId: string;
245
+ tasks: {
246
+ id: string;
247
+ acceptanceCriteria: string[];
248
+ dependencies: string[];
249
+ description: string;
250
+ verification: {
251
+ command: string[];
252
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
253
+ };
254
+ likelyFiles: string[];
255
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
256
+ risk: "low" | "medium" | "high";
257
+ }[];
258
+ edges: {
259
+ from: string;
260
+ to: string;
261
+ reason: string;
262
+ }[];
263
+ verticalSlices: string[][];
264
+ }>>;
265
+ scaffoldedFilePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
266
+ verificationReports: z.ZodOptional<z.ZodArray<z.ZodObject<{
267
+ schemaVersion: z.ZodLiteral<1>;
268
+ runId: z.ZodString;
269
+ commitSha: z.ZodOptional<z.ZodString>;
270
+ status: z.ZodEnum<["passed", "failed", "blocked"]>;
271
+ checks: z.ZodArray<z.ZodObject<{
272
+ id: z.ZodString;
273
+ status: z.ZodEnum<["passed", "failed", "skipped", "blocked"]>;
274
+ command: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
275
+ durationMs: z.ZodOptional<z.ZodNumber>;
276
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
277
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ status: "passed" | "failed" | "skipped" | "blocked";
280
+ id: string;
281
+ command?: string[] | undefined;
282
+ durationMs?: number | undefined;
283
+ evidence?: string[] | undefined;
284
+ errors?: string[] | undefined;
285
+ }, {
286
+ status: "passed" | "failed" | "skipped" | "blocked";
287
+ id: string;
288
+ command?: string[] | undefined;
289
+ durationMs?: number | undefined;
290
+ evidence?: string[] | undefined;
291
+ errors?: string[] | undefined;
292
+ }>, "many">;
293
+ }, "strip", z.ZodTypeAny, {
294
+ status: "passed" | "failed" | "blocked";
295
+ schemaVersion: 1;
296
+ runId: string;
297
+ checks: {
298
+ status: "passed" | "failed" | "skipped" | "blocked";
299
+ id: string;
300
+ command?: string[] | undefined;
301
+ durationMs?: number | undefined;
302
+ evidence?: string[] | undefined;
303
+ errors?: string[] | undefined;
304
+ }[];
305
+ commitSha?: string | undefined;
306
+ }, {
307
+ status: "passed" | "failed" | "blocked";
308
+ schemaVersion: 1;
309
+ runId: string;
310
+ checks: {
311
+ status: "passed" | "failed" | "skipped" | "blocked";
312
+ id: string;
313
+ command?: string[] | undefined;
314
+ durationMs?: number | undefined;
315
+ evidence?: string[] | undefined;
316
+ errors?: string[] | undefined;
317
+ }[];
318
+ commitSha?: string | undefined;
319
+ }>, "many">>;
320
+ reviewReportPath: z.ZodOptional<z.ZodString>;
321
+ releaseVersion: z.ZodOptional<z.ZodString>;
322
+ openDecisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
323
+ id: z.ZodString;
324
+ question: z.ZodString;
325
+ stage: z.ZodString;
326
+ raisedAt: z.ZodString;
327
+ }, "strip", z.ZodTypeAny, {
328
+ id: string;
329
+ question: string;
330
+ stage: string;
331
+ raisedAt: string;
332
+ }, {
333
+ id: string;
334
+ question: string;
335
+ stage: string;
336
+ raisedAt: string;
337
+ }>, "many">>;
338
+ }, "strip", z.ZodTypeAny, {
339
+ openDecisions: {
340
+ id: string;
341
+ question: string;
342
+ stage: string;
343
+ raisedAt: string;
344
+ }[];
345
+ brief?: string | undefined;
346
+ specification?: {
347
+ id: string;
348
+ overview: string;
349
+ problem: string;
350
+ scope: {
351
+ in: string[];
352
+ out: string[];
353
+ };
354
+ actors: {
355
+ name: string;
356
+ role: string;
357
+ }[];
358
+ functionalRequirements: {
359
+ id: string;
360
+ statement: string;
361
+ }[];
362
+ nonFunctionalRequirements: {
363
+ id: string;
364
+ statement: string;
365
+ }[];
366
+ acceptanceCriteria: {
367
+ id: string;
368
+ criterion: string;
369
+ }[];
370
+ edgeCases: string[];
371
+ dependencies: string[];
372
+ risks: {
373
+ id: string;
374
+ severity: "low" | "medium" | "high";
375
+ description: string;
376
+ }[];
377
+ openQuestions: {
378
+ id: string;
379
+ question: string;
380
+ resolved: boolean;
381
+ }[];
382
+ title: string;
383
+ } | undefined;
384
+ architectureDecisionIds?: string[] | undefined;
385
+ plan?: {
386
+ featureId: string;
387
+ tasks: {
388
+ id: string;
389
+ acceptanceCriteria: string[];
390
+ dependencies: string[];
391
+ description: string;
392
+ verification: {
393
+ command: string[];
394
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
395
+ };
396
+ likelyFiles: string[];
397
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
398
+ risk: "low" | "medium" | "high";
399
+ }[];
400
+ edges: {
401
+ from: string;
402
+ to: string;
403
+ reason: string;
404
+ }[];
405
+ verticalSlices: string[][];
406
+ } | undefined;
407
+ scaffoldedFilePaths?: string[] | undefined;
408
+ verificationReports?: {
409
+ status: "passed" | "failed" | "blocked";
410
+ schemaVersion: 1;
411
+ runId: string;
412
+ checks: {
413
+ status: "passed" | "failed" | "skipped" | "blocked";
414
+ id: string;
415
+ command?: string[] | undefined;
416
+ durationMs?: number | undefined;
417
+ evidence?: string[] | undefined;
418
+ errors?: string[] | undefined;
419
+ }[];
420
+ commitSha?: string | undefined;
421
+ }[] | undefined;
422
+ reviewReportPath?: string | undefined;
423
+ releaseVersion?: string | undefined;
424
+ }, {
425
+ brief?: string | undefined;
426
+ specification?: {
427
+ id: string;
428
+ overview: string;
429
+ problem: string;
430
+ scope: {
431
+ in: string[];
432
+ out: string[];
433
+ };
434
+ actors: {
435
+ name: string;
436
+ role: string;
437
+ }[];
438
+ functionalRequirements: {
439
+ id: string;
440
+ statement: string;
441
+ }[];
442
+ nonFunctionalRequirements: {
443
+ id: string;
444
+ statement: string;
445
+ }[];
446
+ acceptanceCriteria: {
447
+ id: string;
448
+ criterion: string;
449
+ }[];
450
+ edgeCases: string[];
451
+ dependencies: string[];
452
+ risks: {
453
+ id: string;
454
+ severity: "low" | "medium" | "high";
455
+ description: string;
456
+ }[];
457
+ openQuestions: {
458
+ id: string;
459
+ question: string;
460
+ resolved: boolean;
461
+ }[];
462
+ title: string;
463
+ } | undefined;
464
+ architectureDecisionIds?: string[] | undefined;
465
+ plan?: {
466
+ featureId: string;
467
+ tasks: {
468
+ id: string;
469
+ acceptanceCriteria: string[];
470
+ dependencies: string[];
471
+ description: string;
472
+ verification: {
473
+ command: string[];
474
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
475
+ };
476
+ likelyFiles: string[];
477
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
478
+ risk: "low" | "medium" | "high";
479
+ }[];
480
+ edges: {
481
+ from: string;
482
+ to: string;
483
+ reason: string;
484
+ }[];
485
+ verticalSlices: string[][];
486
+ } | undefined;
487
+ scaffoldedFilePaths?: string[] | undefined;
488
+ verificationReports?: {
489
+ status: "passed" | "failed" | "blocked";
490
+ schemaVersion: 1;
491
+ runId: string;
492
+ checks: {
493
+ status: "passed" | "failed" | "skipped" | "blocked";
494
+ id: string;
495
+ command?: string[] | undefined;
496
+ durationMs?: number | undefined;
497
+ evidence?: string[] | undefined;
498
+ errors?: string[] | undefined;
499
+ }[];
500
+ commitSha?: string | undefined;
501
+ }[] | undefined;
502
+ reviewReportPath?: string | undefined;
503
+ releaseVersion?: string | undefined;
504
+ openDecisions?: {
505
+ id: string;
506
+ question: string;
507
+ stage: string;
508
+ raisedAt: string;
509
+ }[] | undefined;
510
+ }>;
511
+ export type ApplicationContext = z.infer<typeof ApplicationContextSchema>;
512
+ //# sourceMappingURL=application-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-context.d.ts","sourceRoot":"","sources":["../../src/application/application-context.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ // packages/contracts/src/application/application-context.ts
2
+ //
3
+ // Application workflow context (M8 Phase A — M8-01).
4
+ //
5
+ // Carries the artifacts the workflow has produced so far: product brief,
6
+ // PRD, architecture, plan, scaffold manifest, verification reports. Each
7
+ // field is optional because the workflow fills them in as it advances.
8
+ // The validator in core/workflows/application/validators.ts checks that
9
+ // the context matches the current stage (e.g., you cannot be in the
10
+ // `architecture` stage without a `brief` and `requirements`).
11
+ import { z } from 'zod';
12
+ import { FeatureSpecificationSchema } from '../specification/specification.js';
13
+ import { ImplementationPlanSchema } from '../planning/task.js';
14
+ import { VerificationReportSchema } from '../verification/report.js';
15
+ export const ApplicationContextSchema = z.object({
16
+ // Filled in during `intake` and `discovery`:
17
+ brief: z.string().optional(),
18
+ // Filled in during `requirements`:
19
+ specification: FeatureSpecificationSchema.optional(),
20
+ // Filled in during `architecture`:
21
+ architectureDecisionIds: z.array(z.string()).optional(),
22
+ // Filled in during `planning`:
23
+ plan: ImplementationPlanSchema.optional(),
24
+ // Filled in during `scaffolding`:
25
+ scaffoldedFilePaths: z.array(z.string()).optional(),
26
+ // Filled in during `implementation` and `verification`:
27
+ verificationReports: z.array(VerificationReportSchema).optional(),
28
+ // Filled in during `review`:
29
+ reviewReportPath: z.string().optional(),
30
+ // Filled in during `release`:
31
+ releaseVersion: z.string().optional(),
32
+ // Unresolved decisions the workflow is blocked on:
33
+ openDecisions: z
34
+ .array(z.object({
35
+ id: z.string(),
36
+ question: z.string(),
37
+ stage: z.string(),
38
+ raisedAt: z.string(),
39
+ }))
40
+ .default([]),
41
+ });
42
+ //# sourceMappingURL=application-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-context.js","sourceRoot":"","sources":["../../src/application/application-context.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,qDAAqD;AACrD,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,uEAAuE;AACvE,wEAAwE;AACxE,oEAAoE;AACpE,8DAA8D;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,6CAA6C;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,mCAAmC;IACnC,aAAa,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IACpD,mCAAmC;IACnC,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvD,+BAA+B;IAC/B,IAAI,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IACzC,kCAAkC;IAClC,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnD,wDAAwD;IACxD,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IACjE,6BAA6B;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,8BAA8B;IAC9B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,mDAAmD;IACnD,aAAa,EAAE,CAAC;SACb,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;KACrB,CAAC,CACH;SACA,OAAO,CAAC,EAAE,CAAC;CACf,CAAC,CAAC"}