@agentic-sdlc-kit/contracts 0.0.0-stage → 0.8.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 (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 +78 -0
  140. package/dist/installer/ownership-manifest.d.ts.map +1 -0
  141. package/dist/installer/ownership-manifest.js +30 -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 +109 -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 +85 -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 +36 -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 +115 -0
  480. package/src/secret-guard/finding.ts +93 -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,846 @@
1
+ import { z } from 'zod';
2
+ export declare const APPLICATION_PERSISTENCE_SCHEMA_VERSION: 1;
3
+ export declare const ApplicationPersistenceSchema: z.ZodObject<{
4
+ schemaVersion: z.ZodLiteral<1>;
5
+ state: z.ZodObject<{
6
+ schemaVersion: z.ZodLiteral<1>;
7
+ runId: z.ZodString;
8
+ status: z.ZodEnum<["pending", "in_progress", "blocked", "completed", "failed"]>;
9
+ stage: z.ZodEnum<["intake", "discovery", "requirements", "architecture", "planning", "scaffolding", "implementation", "verification", "review", "release"]>;
10
+ startedAt: z.ZodOptional<z.ZodString>;
11
+ currentTaskId: z.ZodOptional<z.ZodString>;
12
+ stageHistory: z.ZodArray<z.ZodObject<{
13
+ stage: z.ZodEnum<["intake", "discovery", "requirements", "architecture", "planning", "scaffolding", "implementation", "verification", "review", "release"]>;
14
+ enteredAt: z.ZodString;
15
+ exitedAt: z.ZodOptional<z.ZodString>;
16
+ outcome: z.ZodOptional<z.ZodEnum<["pending", "advanced", "blocked", "completed", "failed", "revised"]>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
19
+ enteredAt: string;
20
+ exitedAt?: string | undefined;
21
+ outcome?: "failed" | "blocked" | "pending" | "completed" | "advanced" | "revised" | undefined;
22
+ }, {
23
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
24
+ enteredAt: string;
25
+ exitedAt?: string | undefined;
26
+ outcome?: "failed" | "blocked" | "pending" | "completed" | "advanced" | "revised" | undefined;
27
+ }>, "many">;
28
+ revisions: z.ZodArray<z.ZodObject<{
29
+ fromStage: z.ZodEnum<["intake", "discovery", "requirements", "architecture", "planning", "scaffolding", "implementation", "verification", "review", "release"]>;
30
+ toStage: z.ZodEnum<["intake", "discovery", "requirements", "architecture", "planning", "scaffolding", "implementation", "verification", "review", "release"]>;
31
+ reason: z.ZodString;
32
+ revisedAt: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ reason: string;
35
+ fromStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
36
+ toStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
37
+ revisedAt: string;
38
+ }, {
39
+ reason: string;
40
+ fromStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
41
+ toStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
42
+ revisedAt: string;
43
+ }>, "many">;
44
+ }, "strip", z.ZodTypeAny, {
45
+ status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
46
+ schemaVersion: 1;
47
+ runId: string;
48
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
49
+ stageHistory: {
50
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
51
+ enteredAt: string;
52
+ exitedAt?: string | undefined;
53
+ outcome?: "failed" | "blocked" | "pending" | "completed" | "advanced" | "revised" | undefined;
54
+ }[];
55
+ revisions: {
56
+ reason: string;
57
+ fromStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
58
+ toStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
59
+ revisedAt: string;
60
+ }[];
61
+ startedAt?: string | undefined;
62
+ currentTaskId?: string | undefined;
63
+ }, {
64
+ status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
65
+ schemaVersion: 1;
66
+ runId: string;
67
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
68
+ stageHistory: {
69
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
70
+ enteredAt: string;
71
+ exitedAt?: string | undefined;
72
+ outcome?: "failed" | "blocked" | "pending" | "completed" | "advanced" | "revised" | undefined;
73
+ }[];
74
+ revisions: {
75
+ reason: string;
76
+ fromStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
77
+ toStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
78
+ revisedAt: string;
79
+ }[];
80
+ startedAt?: string | undefined;
81
+ currentTaskId?: string | undefined;
82
+ }>;
83
+ context: z.ZodObject<{
84
+ brief: z.ZodOptional<z.ZodString>;
85
+ specification: z.ZodOptional<z.ZodObject<{
86
+ id: z.ZodString;
87
+ title: z.ZodString;
88
+ overview: z.ZodString;
89
+ problem: z.ZodString;
90
+ scope: z.ZodObject<{
91
+ in: z.ZodArray<z.ZodString, "many">;
92
+ out: z.ZodArray<z.ZodString, "many">;
93
+ }, "strip", z.ZodTypeAny, {
94
+ in: string[];
95
+ out: string[];
96
+ }, {
97
+ in: string[];
98
+ out: string[];
99
+ }>;
100
+ actors: z.ZodArray<z.ZodObject<{
101
+ name: z.ZodString;
102
+ role: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ name: string;
105
+ role: string;
106
+ }, {
107
+ name: string;
108
+ role: string;
109
+ }>, "many">;
110
+ functionalRequirements: z.ZodArray<z.ZodObject<{
111
+ id: z.ZodString;
112
+ statement: z.ZodString;
113
+ }, "strip", z.ZodTypeAny, {
114
+ id: string;
115
+ statement: string;
116
+ }, {
117
+ id: string;
118
+ statement: string;
119
+ }>, "many">;
120
+ nonFunctionalRequirements: z.ZodArray<z.ZodObject<{
121
+ id: z.ZodString;
122
+ statement: z.ZodString;
123
+ }, "strip", z.ZodTypeAny, {
124
+ id: string;
125
+ statement: string;
126
+ }, {
127
+ id: string;
128
+ statement: string;
129
+ }>, "many">;
130
+ acceptanceCriteria: z.ZodArray<z.ZodObject<{
131
+ id: z.ZodString;
132
+ criterion: z.ZodString;
133
+ }, "strip", z.ZodTypeAny, {
134
+ id: string;
135
+ criterion: string;
136
+ }, {
137
+ id: string;
138
+ criterion: string;
139
+ }>, "many">;
140
+ edgeCases: z.ZodArray<z.ZodString, "many">;
141
+ dependencies: z.ZodArray<z.ZodString, "many">;
142
+ risks: z.ZodArray<z.ZodObject<{
143
+ id: z.ZodString;
144
+ severity: z.ZodEnum<["low", "medium", "high"]>;
145
+ description: z.ZodString;
146
+ }, "strip", z.ZodTypeAny, {
147
+ id: string;
148
+ severity: "low" | "medium" | "high";
149
+ description: string;
150
+ }, {
151
+ id: string;
152
+ severity: "low" | "medium" | "high";
153
+ description: string;
154
+ }>, "many">;
155
+ openQuestions: z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ question: z.ZodString;
158
+ resolved: z.ZodBoolean;
159
+ }, "strip", z.ZodTypeAny, {
160
+ id: string;
161
+ question: string;
162
+ resolved: boolean;
163
+ }, {
164
+ id: string;
165
+ question: string;
166
+ resolved: boolean;
167
+ }>, "many">;
168
+ }, "strict", z.ZodTypeAny, {
169
+ id: string;
170
+ overview: string;
171
+ problem: string;
172
+ scope: {
173
+ in: string[];
174
+ out: string[];
175
+ };
176
+ actors: {
177
+ name: string;
178
+ role: string;
179
+ }[];
180
+ functionalRequirements: {
181
+ id: string;
182
+ statement: string;
183
+ }[];
184
+ nonFunctionalRequirements: {
185
+ id: string;
186
+ statement: string;
187
+ }[];
188
+ acceptanceCriteria: {
189
+ id: string;
190
+ criterion: string;
191
+ }[];
192
+ edgeCases: string[];
193
+ dependencies: string[];
194
+ risks: {
195
+ id: string;
196
+ severity: "low" | "medium" | "high";
197
+ description: string;
198
+ }[];
199
+ openQuestions: {
200
+ id: string;
201
+ question: string;
202
+ resolved: boolean;
203
+ }[];
204
+ title: string;
205
+ }, {
206
+ id: string;
207
+ overview: string;
208
+ problem: string;
209
+ scope: {
210
+ in: string[];
211
+ out: string[];
212
+ };
213
+ actors: {
214
+ name: string;
215
+ role: string;
216
+ }[];
217
+ functionalRequirements: {
218
+ id: string;
219
+ statement: string;
220
+ }[];
221
+ nonFunctionalRequirements: {
222
+ id: string;
223
+ statement: string;
224
+ }[];
225
+ acceptanceCriteria: {
226
+ id: string;
227
+ criterion: string;
228
+ }[];
229
+ edgeCases: string[];
230
+ dependencies: string[];
231
+ risks: {
232
+ id: string;
233
+ severity: "low" | "medium" | "high";
234
+ description: string;
235
+ }[];
236
+ openQuestions: {
237
+ id: string;
238
+ question: string;
239
+ resolved: boolean;
240
+ }[];
241
+ title: string;
242
+ }>>;
243
+ architectureDecisionIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
244
+ plan: z.ZodOptional<z.ZodObject<{
245
+ featureId: z.ZodString;
246
+ tasks: z.ZodArray<z.ZodObject<{
247
+ id: z.ZodString;
248
+ description: z.ZodString;
249
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
250
+ verification: z.ZodObject<{
251
+ command: z.ZodArray<z.ZodString, "many">;
252
+ expectedStatus: z.ZodEnum<["passed", "failed", "skipped", "blocked"]>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ command: string[];
255
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
256
+ }, {
257
+ command: string[];
258
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
259
+ }>;
260
+ dependencies: z.ZodArray<z.ZodString, "many">;
261
+ likelyFiles: z.ZodArray<z.ZodString, "many">;
262
+ estimatedScope: z.ZodEnum<["xs", "s", "m", "l", "xl"]>;
263
+ risk: z.ZodEnum<["low", "medium", "high"]>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ id: string;
266
+ acceptanceCriteria: string[];
267
+ dependencies: string[];
268
+ description: string;
269
+ verification: {
270
+ command: string[];
271
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
272
+ };
273
+ likelyFiles: string[];
274
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
275
+ risk: "low" | "medium" | "high";
276
+ }, {
277
+ id: string;
278
+ acceptanceCriteria: string[];
279
+ dependencies: string[];
280
+ description: string;
281
+ verification: {
282
+ command: string[];
283
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
284
+ };
285
+ likelyFiles: string[];
286
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
287
+ risk: "low" | "medium" | "high";
288
+ }>, "many">;
289
+ edges: z.ZodArray<z.ZodObject<{
290
+ from: z.ZodString;
291
+ to: z.ZodString;
292
+ reason: z.ZodString;
293
+ }, "strip", z.ZodTypeAny, {
294
+ from: string;
295
+ to: string;
296
+ reason: string;
297
+ }, {
298
+ from: string;
299
+ to: string;
300
+ reason: string;
301
+ }>, "many">;
302
+ verticalSlices: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
303
+ }, "strip", z.ZodTypeAny, {
304
+ featureId: string;
305
+ tasks: {
306
+ id: string;
307
+ acceptanceCriteria: string[];
308
+ dependencies: string[];
309
+ description: string;
310
+ verification: {
311
+ command: string[];
312
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
313
+ };
314
+ likelyFiles: string[];
315
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
316
+ risk: "low" | "medium" | "high";
317
+ }[];
318
+ edges: {
319
+ from: string;
320
+ to: string;
321
+ reason: string;
322
+ }[];
323
+ verticalSlices: string[][];
324
+ }, {
325
+ featureId: string;
326
+ tasks: {
327
+ id: string;
328
+ acceptanceCriteria: string[];
329
+ dependencies: string[];
330
+ description: string;
331
+ verification: {
332
+ command: string[];
333
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
334
+ };
335
+ likelyFiles: string[];
336
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
337
+ risk: "low" | "medium" | "high";
338
+ }[];
339
+ edges: {
340
+ from: string;
341
+ to: string;
342
+ reason: string;
343
+ }[];
344
+ verticalSlices: string[][];
345
+ }>>;
346
+ scaffoldedFilePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
347
+ verificationReports: z.ZodOptional<z.ZodArray<z.ZodObject<{
348
+ schemaVersion: z.ZodLiteral<1>;
349
+ runId: z.ZodString;
350
+ commitSha: z.ZodOptional<z.ZodString>;
351
+ status: z.ZodEnum<["passed", "failed", "blocked"]>;
352
+ checks: z.ZodArray<z.ZodObject<{
353
+ id: z.ZodString;
354
+ status: z.ZodEnum<["passed", "failed", "skipped", "blocked"]>;
355
+ command: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
356
+ durationMs: z.ZodOptional<z.ZodNumber>;
357
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
358
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
359
+ }, "strip", z.ZodTypeAny, {
360
+ status: "passed" | "failed" | "skipped" | "blocked";
361
+ id: string;
362
+ command?: string[] | undefined;
363
+ durationMs?: number | undefined;
364
+ evidence?: string[] | undefined;
365
+ errors?: string[] | undefined;
366
+ }, {
367
+ status: "passed" | "failed" | "skipped" | "blocked";
368
+ id: string;
369
+ command?: string[] | undefined;
370
+ durationMs?: number | undefined;
371
+ evidence?: string[] | undefined;
372
+ errors?: string[] | undefined;
373
+ }>, "many">;
374
+ }, "strip", z.ZodTypeAny, {
375
+ status: "passed" | "failed" | "blocked";
376
+ schemaVersion: 1;
377
+ runId: string;
378
+ checks: {
379
+ status: "passed" | "failed" | "skipped" | "blocked";
380
+ id: string;
381
+ command?: string[] | undefined;
382
+ durationMs?: number | undefined;
383
+ evidence?: string[] | undefined;
384
+ errors?: string[] | undefined;
385
+ }[];
386
+ commitSha?: string | undefined;
387
+ }, {
388
+ status: "passed" | "failed" | "blocked";
389
+ schemaVersion: 1;
390
+ runId: string;
391
+ checks: {
392
+ status: "passed" | "failed" | "skipped" | "blocked";
393
+ id: string;
394
+ command?: string[] | undefined;
395
+ durationMs?: number | undefined;
396
+ evidence?: string[] | undefined;
397
+ errors?: string[] | undefined;
398
+ }[];
399
+ commitSha?: string | undefined;
400
+ }>, "many">>;
401
+ reviewReportPath: z.ZodOptional<z.ZodString>;
402
+ releaseVersion: z.ZodOptional<z.ZodString>;
403
+ openDecisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
404
+ id: z.ZodString;
405
+ question: z.ZodString;
406
+ stage: z.ZodString;
407
+ raisedAt: z.ZodString;
408
+ }, "strip", z.ZodTypeAny, {
409
+ id: string;
410
+ question: string;
411
+ stage: string;
412
+ raisedAt: string;
413
+ }, {
414
+ id: string;
415
+ question: string;
416
+ stage: string;
417
+ raisedAt: string;
418
+ }>, "many">>;
419
+ }, "strip", z.ZodTypeAny, {
420
+ openDecisions: {
421
+ id: string;
422
+ question: string;
423
+ stage: string;
424
+ raisedAt: string;
425
+ }[];
426
+ brief?: string | undefined;
427
+ specification?: {
428
+ id: string;
429
+ overview: string;
430
+ problem: string;
431
+ scope: {
432
+ in: string[];
433
+ out: string[];
434
+ };
435
+ actors: {
436
+ name: string;
437
+ role: string;
438
+ }[];
439
+ functionalRequirements: {
440
+ id: string;
441
+ statement: string;
442
+ }[];
443
+ nonFunctionalRequirements: {
444
+ id: string;
445
+ statement: string;
446
+ }[];
447
+ acceptanceCriteria: {
448
+ id: string;
449
+ criterion: string;
450
+ }[];
451
+ edgeCases: string[];
452
+ dependencies: string[];
453
+ risks: {
454
+ id: string;
455
+ severity: "low" | "medium" | "high";
456
+ description: string;
457
+ }[];
458
+ openQuestions: {
459
+ id: string;
460
+ question: string;
461
+ resolved: boolean;
462
+ }[];
463
+ title: string;
464
+ } | undefined;
465
+ architectureDecisionIds?: string[] | undefined;
466
+ plan?: {
467
+ featureId: string;
468
+ tasks: {
469
+ id: string;
470
+ acceptanceCriteria: string[];
471
+ dependencies: string[];
472
+ description: string;
473
+ verification: {
474
+ command: string[];
475
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
476
+ };
477
+ likelyFiles: string[];
478
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
479
+ risk: "low" | "medium" | "high";
480
+ }[];
481
+ edges: {
482
+ from: string;
483
+ to: string;
484
+ reason: string;
485
+ }[];
486
+ verticalSlices: string[][];
487
+ } | undefined;
488
+ scaffoldedFilePaths?: string[] | undefined;
489
+ verificationReports?: {
490
+ status: "passed" | "failed" | "blocked";
491
+ schemaVersion: 1;
492
+ runId: string;
493
+ checks: {
494
+ status: "passed" | "failed" | "skipped" | "blocked";
495
+ id: string;
496
+ command?: string[] | undefined;
497
+ durationMs?: number | undefined;
498
+ evidence?: string[] | undefined;
499
+ errors?: string[] | undefined;
500
+ }[];
501
+ commitSha?: string | undefined;
502
+ }[] | undefined;
503
+ reviewReportPath?: string | undefined;
504
+ releaseVersion?: string | undefined;
505
+ }, {
506
+ brief?: string | undefined;
507
+ specification?: {
508
+ id: string;
509
+ overview: string;
510
+ problem: string;
511
+ scope: {
512
+ in: string[];
513
+ out: string[];
514
+ };
515
+ actors: {
516
+ name: string;
517
+ role: string;
518
+ }[];
519
+ functionalRequirements: {
520
+ id: string;
521
+ statement: string;
522
+ }[];
523
+ nonFunctionalRequirements: {
524
+ id: string;
525
+ statement: string;
526
+ }[];
527
+ acceptanceCriteria: {
528
+ id: string;
529
+ criterion: string;
530
+ }[];
531
+ edgeCases: string[];
532
+ dependencies: string[];
533
+ risks: {
534
+ id: string;
535
+ severity: "low" | "medium" | "high";
536
+ description: string;
537
+ }[];
538
+ openQuestions: {
539
+ id: string;
540
+ question: string;
541
+ resolved: boolean;
542
+ }[];
543
+ title: string;
544
+ } | undefined;
545
+ architectureDecisionIds?: string[] | undefined;
546
+ plan?: {
547
+ featureId: string;
548
+ tasks: {
549
+ id: string;
550
+ acceptanceCriteria: string[];
551
+ dependencies: string[];
552
+ description: string;
553
+ verification: {
554
+ command: string[];
555
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
556
+ };
557
+ likelyFiles: string[];
558
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
559
+ risk: "low" | "medium" | "high";
560
+ }[];
561
+ edges: {
562
+ from: string;
563
+ to: string;
564
+ reason: string;
565
+ }[];
566
+ verticalSlices: string[][];
567
+ } | undefined;
568
+ scaffoldedFilePaths?: string[] | undefined;
569
+ verificationReports?: {
570
+ status: "passed" | "failed" | "blocked";
571
+ schemaVersion: 1;
572
+ runId: string;
573
+ checks: {
574
+ status: "passed" | "failed" | "skipped" | "blocked";
575
+ id: string;
576
+ command?: string[] | undefined;
577
+ durationMs?: number | undefined;
578
+ evidence?: string[] | undefined;
579
+ errors?: string[] | undefined;
580
+ }[];
581
+ commitSha?: string | undefined;
582
+ }[] | undefined;
583
+ reviewReportPath?: string | undefined;
584
+ releaseVersion?: string | undefined;
585
+ openDecisions?: {
586
+ id: string;
587
+ question: string;
588
+ stage: string;
589
+ raisedAt: string;
590
+ }[] | undefined;
591
+ }>;
592
+ changeLog: z.ZodArray<z.ZodObject<{
593
+ id: z.ZodString;
594
+ at: z.ZodString;
595
+ kind: z.ZodEnum<["stage-entered", "stage-exited", "context-updated", "decision-raised", "decision-resolved", "scope-revised", "architecture-revised", "workflow-resumed", "workflow-blocked", "workflow-failed", "workflow-completed"]>;
596
+ summary: z.ZodString;
597
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
598
+ }, "strip", z.ZodTypeAny, {
599
+ at: string;
600
+ id: string;
601
+ summary: string;
602
+ kind: "stage-entered" | "stage-exited" | "context-updated" | "decision-raised" | "decision-resolved" | "scope-revised" | "architecture-revised" | "workflow-resumed" | "workflow-blocked" | "workflow-failed" | "workflow-completed";
603
+ details?: Record<string, unknown> | undefined;
604
+ }, {
605
+ at: string;
606
+ id: string;
607
+ summary: string;
608
+ kind: "stage-entered" | "stage-exited" | "context-updated" | "decision-raised" | "decision-resolved" | "scope-revised" | "architecture-revised" | "workflow-resumed" | "workflow-blocked" | "workflow-failed" | "workflow-completed";
609
+ details?: Record<string, unknown> | undefined;
610
+ }>, "many">;
611
+ }, "strip", z.ZodTypeAny, {
612
+ schemaVersion: 1;
613
+ state: {
614
+ status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
615
+ schemaVersion: 1;
616
+ runId: string;
617
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
618
+ stageHistory: {
619
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
620
+ enteredAt: string;
621
+ exitedAt?: string | undefined;
622
+ outcome?: "failed" | "blocked" | "pending" | "completed" | "advanced" | "revised" | undefined;
623
+ }[];
624
+ revisions: {
625
+ reason: string;
626
+ fromStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
627
+ toStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
628
+ revisedAt: string;
629
+ }[];
630
+ startedAt?: string | undefined;
631
+ currentTaskId?: string | undefined;
632
+ };
633
+ context: {
634
+ openDecisions: {
635
+ id: string;
636
+ question: string;
637
+ stage: string;
638
+ raisedAt: string;
639
+ }[];
640
+ brief?: string | undefined;
641
+ specification?: {
642
+ id: string;
643
+ overview: string;
644
+ problem: string;
645
+ scope: {
646
+ in: string[];
647
+ out: string[];
648
+ };
649
+ actors: {
650
+ name: string;
651
+ role: string;
652
+ }[];
653
+ functionalRequirements: {
654
+ id: string;
655
+ statement: string;
656
+ }[];
657
+ nonFunctionalRequirements: {
658
+ id: string;
659
+ statement: string;
660
+ }[];
661
+ acceptanceCriteria: {
662
+ id: string;
663
+ criterion: string;
664
+ }[];
665
+ edgeCases: string[];
666
+ dependencies: string[];
667
+ risks: {
668
+ id: string;
669
+ severity: "low" | "medium" | "high";
670
+ description: string;
671
+ }[];
672
+ openQuestions: {
673
+ id: string;
674
+ question: string;
675
+ resolved: boolean;
676
+ }[];
677
+ title: string;
678
+ } | undefined;
679
+ architectureDecisionIds?: string[] | undefined;
680
+ plan?: {
681
+ featureId: string;
682
+ tasks: {
683
+ id: string;
684
+ acceptanceCriteria: string[];
685
+ dependencies: string[];
686
+ description: string;
687
+ verification: {
688
+ command: string[];
689
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
690
+ };
691
+ likelyFiles: string[];
692
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
693
+ risk: "low" | "medium" | "high";
694
+ }[];
695
+ edges: {
696
+ from: string;
697
+ to: string;
698
+ reason: string;
699
+ }[];
700
+ verticalSlices: string[][];
701
+ } | undefined;
702
+ scaffoldedFilePaths?: string[] | undefined;
703
+ verificationReports?: {
704
+ status: "passed" | "failed" | "blocked";
705
+ schemaVersion: 1;
706
+ runId: string;
707
+ checks: {
708
+ status: "passed" | "failed" | "skipped" | "blocked";
709
+ id: string;
710
+ command?: string[] | undefined;
711
+ durationMs?: number | undefined;
712
+ evidence?: string[] | undefined;
713
+ errors?: string[] | undefined;
714
+ }[];
715
+ commitSha?: string | undefined;
716
+ }[] | undefined;
717
+ reviewReportPath?: string | undefined;
718
+ releaseVersion?: string | undefined;
719
+ };
720
+ changeLog: {
721
+ at: string;
722
+ id: string;
723
+ summary: string;
724
+ kind: "stage-entered" | "stage-exited" | "context-updated" | "decision-raised" | "decision-resolved" | "scope-revised" | "architecture-revised" | "workflow-resumed" | "workflow-blocked" | "workflow-failed" | "workflow-completed";
725
+ details?: Record<string, unknown> | undefined;
726
+ }[];
727
+ }, {
728
+ schemaVersion: 1;
729
+ state: {
730
+ status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
731
+ schemaVersion: 1;
732
+ runId: string;
733
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
734
+ stageHistory: {
735
+ stage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
736
+ enteredAt: string;
737
+ exitedAt?: string | undefined;
738
+ outcome?: "failed" | "blocked" | "pending" | "completed" | "advanced" | "revised" | undefined;
739
+ }[];
740
+ revisions: {
741
+ reason: string;
742
+ fromStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
743
+ toStage: "verification" | "intake" | "discovery" | "requirements" | "architecture" | "planning" | "scaffolding" | "implementation" | "review" | "release";
744
+ revisedAt: string;
745
+ }[];
746
+ startedAt?: string | undefined;
747
+ currentTaskId?: string | undefined;
748
+ };
749
+ context: {
750
+ brief?: string | undefined;
751
+ specification?: {
752
+ id: string;
753
+ overview: string;
754
+ problem: string;
755
+ scope: {
756
+ in: string[];
757
+ out: string[];
758
+ };
759
+ actors: {
760
+ name: string;
761
+ role: string;
762
+ }[];
763
+ functionalRequirements: {
764
+ id: string;
765
+ statement: string;
766
+ }[];
767
+ nonFunctionalRequirements: {
768
+ id: string;
769
+ statement: string;
770
+ }[];
771
+ acceptanceCriteria: {
772
+ id: string;
773
+ criterion: string;
774
+ }[];
775
+ edgeCases: string[];
776
+ dependencies: string[];
777
+ risks: {
778
+ id: string;
779
+ severity: "low" | "medium" | "high";
780
+ description: string;
781
+ }[];
782
+ openQuestions: {
783
+ id: string;
784
+ question: string;
785
+ resolved: boolean;
786
+ }[];
787
+ title: string;
788
+ } | undefined;
789
+ architectureDecisionIds?: string[] | undefined;
790
+ plan?: {
791
+ featureId: string;
792
+ tasks: {
793
+ id: string;
794
+ acceptanceCriteria: string[];
795
+ dependencies: string[];
796
+ description: string;
797
+ verification: {
798
+ command: string[];
799
+ expectedStatus: "passed" | "failed" | "skipped" | "blocked";
800
+ };
801
+ likelyFiles: string[];
802
+ estimatedScope: "xs" | "s" | "m" | "l" | "xl";
803
+ risk: "low" | "medium" | "high";
804
+ }[];
805
+ edges: {
806
+ from: string;
807
+ to: string;
808
+ reason: string;
809
+ }[];
810
+ verticalSlices: string[][];
811
+ } | undefined;
812
+ scaffoldedFilePaths?: string[] | undefined;
813
+ verificationReports?: {
814
+ status: "passed" | "failed" | "blocked";
815
+ schemaVersion: 1;
816
+ runId: string;
817
+ checks: {
818
+ status: "passed" | "failed" | "skipped" | "blocked";
819
+ id: string;
820
+ command?: string[] | undefined;
821
+ durationMs?: number | undefined;
822
+ evidence?: string[] | undefined;
823
+ errors?: string[] | undefined;
824
+ }[];
825
+ commitSha?: string | undefined;
826
+ }[] | undefined;
827
+ reviewReportPath?: string | undefined;
828
+ releaseVersion?: string | undefined;
829
+ openDecisions?: {
830
+ id: string;
831
+ question: string;
832
+ stage: string;
833
+ raisedAt: string;
834
+ }[] | undefined;
835
+ };
836
+ changeLog: {
837
+ at: string;
838
+ id: string;
839
+ summary: string;
840
+ kind: "stage-entered" | "stage-exited" | "context-updated" | "decision-raised" | "decision-resolved" | "scope-revised" | "architecture-revised" | "workflow-resumed" | "workflow-blocked" | "workflow-failed" | "workflow-completed";
841
+ details?: Record<string, unknown> | undefined;
842
+ }[];
843
+ }>;
844
+ export type ApplicationPersistence = z.infer<typeof ApplicationPersistenceSchema>;
845
+ export type ApplicationChangeLogEntry = ApplicationPersistence['changeLog'][number];
846
+ //# sourceMappingURL=application-persistence.d.ts.map