@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,18 @@
1
+ // packages/contracts/src/product/mvp-scope.ts
2
+ //
3
+ // MVP scope definition (M8 Phase B — M8-10).
4
+ //
5
+ // Records what is in the MVP and what is explicitly out of scope. The
6
+ // boundary is enforced: tasks in the implementation plan MUST trace to an
7
+ // MVP-scoped requirement; tasks that trace to out-of-scope requirements
8
+ // are rejected by the plan validator.
9
+ import { z } from 'zod';
10
+ export const MvpScopeSchema = z.object({
11
+ schemaVersion: z.literal(1),
12
+ briefId: z.string(),
13
+ inScopeRequirementIds: z.array(z.string()),
14
+ outOfScopeRequirementIds: z.array(z.string()),
15
+ releaseBoundary: z.enum(['mvp', 'post-mvp', 'future']),
16
+ rationale: z.string().min(1),
17
+ });
18
+ //# sourceMappingURL=mvp-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mvp-scope.js","sourceRoot":"","sources":["../../src/product/mvp-scope.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,wEAAwE;AACxE,sCAAsC;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1C,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7C,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACtD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ export declare const ProductBriefSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ title: z.ZodString;
5
+ description: z.ZodString;
6
+ problemStatement: z.ZodString;
7
+ targetUsers: z.ZodArray<z.ZodObject<{
8
+ name: z.ZodString;
9
+ role: z.ZodString;
10
+ need: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ name: string;
13
+ role: string;
14
+ need: string;
15
+ }, {
16
+ name: string;
17
+ role: string;
18
+ need: string;
19
+ }>, "many">;
20
+ businessGoals: z.ZodArray<z.ZodString, "many">;
21
+ assumptions: z.ZodDefault<z.ZodArray<z.ZodObject<{
22
+ id: z.ZodString;
23
+ assumption: z.ZodString;
24
+ requiresApproval: z.ZodBoolean;
25
+ }, "strip", z.ZodTypeAny, {
26
+ id: string;
27
+ assumption: string;
28
+ requiresApproval: boolean;
29
+ }, {
30
+ id: string;
31
+ assumption: string;
32
+ requiresApproval: boolean;
33
+ }>, "many">>;
34
+ unresolvedDecisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
35
+ id: z.ZodString;
36
+ question: z.ZodString;
37
+ blocking: z.ZodBoolean;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ question: string;
41
+ blocking: boolean;
42
+ }, {
43
+ id: string;
44
+ question: string;
45
+ blocking: boolean;
46
+ }>, "many">>;
47
+ outOfScope: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
+ }, "strict", z.ZodTypeAny, {
49
+ id: string;
50
+ description: string;
51
+ title: string;
52
+ problemStatement: string;
53
+ targetUsers: {
54
+ name: string;
55
+ role: string;
56
+ need: string;
57
+ }[];
58
+ businessGoals: string[];
59
+ assumptions: {
60
+ id: string;
61
+ assumption: string;
62
+ requiresApproval: boolean;
63
+ }[];
64
+ unresolvedDecisions: {
65
+ id: string;
66
+ question: string;
67
+ blocking: boolean;
68
+ }[];
69
+ outOfScope: string[];
70
+ }, {
71
+ id: string;
72
+ description: string;
73
+ title: string;
74
+ problemStatement: string;
75
+ targetUsers: {
76
+ name: string;
77
+ role: string;
78
+ need: string;
79
+ }[];
80
+ businessGoals: string[];
81
+ assumptions?: {
82
+ id: string;
83
+ assumption: string;
84
+ requiresApproval: boolean;
85
+ }[] | undefined;
86
+ unresolvedDecisions?: {
87
+ id: string;
88
+ question: string;
89
+ blocking: boolean;
90
+ }[] | undefined;
91
+ outOfScope?: string[] | undefined;
92
+ }>;
93
+ export type ProductBrief = z.infer<typeof ProductBriefSchema>;
94
+ //# sourceMappingURL=product-brief.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-brief.d.ts","sourceRoot":"","sources":["../../src/product/product-brief.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCpB,CAAC;AAEZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ // packages/contracts/src/product/product-brief.ts
2
+ //
3
+ // Product brief contract (M8 Phase B — M8-06, M8-07).
4
+ //
5
+ // Captures the developer's product idea and the kit's analysis of the
6
+ // problem and users. The brief is the input to the requirements engine.
7
+ //
8
+ // INVARIANT (post-M7 roadmap §2.3 Phase B): the kit must NOT silently
9
+ // invent business rules when the developer provides an incomplete product
10
+ // idea. Assumptions are recorded and flagged as decisions requiring
11
+ // approval.
12
+ import { z } from 'zod';
13
+ export const ProductBriefSchema = z
14
+ .object({
15
+ id: z.string().regex(/^[A-Z]+-[0-9]{3,}$/, 'id must match BRIEF-NNN'),
16
+ title: z.string().min(1).max(200),
17
+ description: z.string().min(1),
18
+ problemStatement: z.string().min(1),
19
+ targetUsers: z
20
+ .array(z.object({
21
+ name: z.string().min(1),
22
+ role: z.string().min(1),
23
+ need: z.string().min(1),
24
+ }))
25
+ .min(1, 'at least one target user is required'),
26
+ businessGoals: z.array(z.string().min(1)),
27
+ assumptions: z
28
+ .array(z.object({
29
+ id: z.string(),
30
+ assumption: z.string().min(1),
31
+ requiresApproval: z.boolean(),
32
+ }))
33
+ .default([]),
34
+ unresolvedDecisions: z
35
+ .array(z.object({
36
+ id: z.string(),
37
+ question: z.string().min(1),
38
+ blocking: z.boolean(),
39
+ }))
40
+ .default([]),
41
+ outOfScope: z.array(z.string().min(1)).default([]),
42
+ })
43
+ .strict();
44
+ //# sourceMappingURL=product-brief.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-brief.js","sourceRoot":"","sources":["../../src/product/product-brief.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sDAAsD;AACtD,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,EAAE;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,oEAAoE;AACpE,YAAY;AAEZ,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;IACrE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,WAAW,EAAE,CAAC;SACX,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACxB,CAAC,CACH;SACA,GAAG,CAAC,CAAC,EAAE,sCAAsC,CAAC;IACjD,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACzC,WAAW,EAAE,CAAC;SACX,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7B,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE;KAC9B,CAAC,CACH;SACA,OAAO,CAAC,EAAE,CAAC;IACd,mBAAmB,EAAE,CAAC;SACnB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;KACtB,CAAC,CACH;SACA,OAAO,CAAC,EAAE,CAAC;IACd,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACnD,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,251 @@
1
+ import { z } from 'zod';
2
+ export declare const RequirementKindSchema: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
3
+ export declare const ProductRequirementSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ kind: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
6
+ statement: z.ZodString;
7
+ priority: z.ZodEnum<["must", "should", "could", "wont"]>;
8
+ source: z.ZodString;
9
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string;
12
+ statement: string;
13
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
14
+ priority: "must" | "should" | "could" | "wont";
15
+ source: string;
16
+ acceptanceCriterionIds: string[];
17
+ }, {
18
+ id: string;
19
+ statement: string;
20
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
21
+ priority: "must" | "should" | "could" | "wont";
22
+ source: string;
23
+ acceptanceCriterionIds: string[];
24
+ }>;
25
+ export declare const RequirementsDocumentSchema: z.ZodObject<{
26
+ schemaVersion: z.ZodLiteral<1>;
27
+ briefId: z.ZodString;
28
+ functional: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodString;
30
+ kind: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
31
+ statement: z.ZodString;
32
+ priority: z.ZodEnum<["must", "should", "could", "wont"]>;
33
+ source: z.ZodString;
34
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
35
+ }, "strip", z.ZodTypeAny, {
36
+ id: string;
37
+ statement: string;
38
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
39
+ priority: "must" | "should" | "could" | "wont";
40
+ source: string;
41
+ acceptanceCriterionIds: string[];
42
+ }, {
43
+ id: string;
44
+ statement: string;
45
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
46
+ priority: "must" | "should" | "could" | "wont";
47
+ source: string;
48
+ acceptanceCriterionIds: string[];
49
+ }>, "many">;
50
+ nonFunctional: z.ZodArray<z.ZodObject<{
51
+ id: z.ZodString;
52
+ kind: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
53
+ statement: z.ZodString;
54
+ priority: z.ZodEnum<["must", "should", "could", "wont"]>;
55
+ source: z.ZodString;
56
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
57
+ }, "strip", z.ZodTypeAny, {
58
+ id: string;
59
+ statement: string;
60
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
61
+ priority: "must" | "should" | "could" | "wont";
62
+ source: string;
63
+ acceptanceCriterionIds: string[];
64
+ }, {
65
+ id: string;
66
+ statement: string;
67
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
68
+ priority: "must" | "should" | "could" | "wont";
69
+ source: string;
70
+ acceptanceCriterionIds: string[];
71
+ }>, "many">;
72
+ business: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodString;
74
+ kind: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
75
+ statement: z.ZodString;
76
+ priority: z.ZodEnum<["must", "should", "could", "wont"]>;
77
+ source: z.ZodString;
78
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
79
+ }, "strip", z.ZodTypeAny, {
80
+ id: string;
81
+ statement: string;
82
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
83
+ priority: "must" | "should" | "could" | "wont";
84
+ source: string;
85
+ acceptanceCriterionIds: string[];
86
+ }, {
87
+ id: string;
88
+ statement: string;
89
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
90
+ priority: "must" | "should" | "could" | "wont";
91
+ source: string;
92
+ acceptanceCriterionIds: string[];
93
+ }>, "many">;
94
+ technicalConstraints: z.ZodArray<z.ZodObject<{
95
+ id: z.ZodString;
96
+ kind: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
97
+ statement: z.ZodString;
98
+ priority: z.ZodEnum<["must", "should", "could", "wont"]>;
99
+ source: z.ZodString;
100
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
101
+ }, "strip", z.ZodTypeAny, {
102
+ id: string;
103
+ statement: string;
104
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
105
+ priority: "must" | "should" | "could" | "wont";
106
+ source: string;
107
+ acceptanceCriterionIds: string[];
108
+ }, {
109
+ id: string;
110
+ statement: string;
111
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
112
+ priority: "must" | "should" | "could" | "wont";
113
+ source: string;
114
+ acceptanceCriterionIds: string[];
115
+ }>, "many">;
116
+ assumptions: z.ZodArray<z.ZodObject<{
117
+ id: z.ZodString;
118
+ kind: z.ZodEnum<["business", "functional", "non-functional", "technical-constraint", "assumption"]>;
119
+ statement: z.ZodString;
120
+ priority: z.ZodEnum<["must", "should", "could", "wont"]>;
121
+ source: z.ZodString;
122
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
123
+ }, "strip", z.ZodTypeAny, {
124
+ id: string;
125
+ statement: string;
126
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
127
+ priority: "must" | "should" | "could" | "wont";
128
+ source: string;
129
+ acceptanceCriterionIds: string[];
130
+ }, {
131
+ id: string;
132
+ statement: string;
133
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
134
+ priority: "must" | "should" | "could" | "wont";
135
+ source: string;
136
+ acceptanceCriterionIds: string[];
137
+ }>, "many">;
138
+ unresolvedDecisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
139
+ id: z.ZodString;
140
+ question: z.ZodString;
141
+ blocking: z.ZodBoolean;
142
+ }, "strip", z.ZodTypeAny, {
143
+ id: string;
144
+ question: string;
145
+ blocking: boolean;
146
+ }, {
147
+ id: string;
148
+ question: string;
149
+ blocking: boolean;
150
+ }>, "many">>;
151
+ }, "strict", z.ZodTypeAny, {
152
+ schemaVersion: 1;
153
+ assumptions: {
154
+ id: string;
155
+ statement: string;
156
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
157
+ priority: "must" | "should" | "could" | "wont";
158
+ source: string;
159
+ acceptanceCriterionIds: string[];
160
+ }[];
161
+ unresolvedDecisions: {
162
+ id: string;
163
+ question: string;
164
+ blocking: boolean;
165
+ }[];
166
+ business: {
167
+ id: string;
168
+ statement: string;
169
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
170
+ priority: "must" | "should" | "could" | "wont";
171
+ source: string;
172
+ acceptanceCriterionIds: string[];
173
+ }[];
174
+ functional: {
175
+ id: string;
176
+ statement: string;
177
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
178
+ priority: "must" | "should" | "could" | "wont";
179
+ source: string;
180
+ acceptanceCriterionIds: string[];
181
+ }[];
182
+ briefId: string;
183
+ nonFunctional: {
184
+ id: string;
185
+ statement: string;
186
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
187
+ priority: "must" | "should" | "could" | "wont";
188
+ source: string;
189
+ acceptanceCriterionIds: string[];
190
+ }[];
191
+ technicalConstraints: {
192
+ id: string;
193
+ statement: string;
194
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
195
+ priority: "must" | "should" | "could" | "wont";
196
+ source: string;
197
+ acceptanceCriterionIds: string[];
198
+ }[];
199
+ }, {
200
+ schemaVersion: 1;
201
+ assumptions: {
202
+ id: string;
203
+ statement: string;
204
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
205
+ priority: "must" | "should" | "could" | "wont";
206
+ source: string;
207
+ acceptanceCriterionIds: string[];
208
+ }[];
209
+ business: {
210
+ id: string;
211
+ statement: string;
212
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
213
+ priority: "must" | "should" | "could" | "wont";
214
+ source: string;
215
+ acceptanceCriterionIds: string[];
216
+ }[];
217
+ functional: {
218
+ id: string;
219
+ statement: string;
220
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
221
+ priority: "must" | "should" | "could" | "wont";
222
+ source: string;
223
+ acceptanceCriterionIds: string[];
224
+ }[];
225
+ briefId: string;
226
+ nonFunctional: {
227
+ id: string;
228
+ statement: string;
229
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
230
+ priority: "must" | "should" | "could" | "wont";
231
+ source: string;
232
+ acceptanceCriterionIds: string[];
233
+ }[];
234
+ technicalConstraints: {
235
+ id: string;
236
+ statement: string;
237
+ kind: "assumption" | "business" | "functional" | "non-functional" | "technical-constraint";
238
+ priority: "must" | "should" | "could" | "wont";
239
+ source: string;
240
+ acceptanceCriterionIds: string[];
241
+ }[];
242
+ unresolvedDecisions?: {
243
+ id: string;
244
+ question: string;
245
+ blocking: boolean;
246
+ }[] | undefined;
247
+ }>;
248
+ export type RequirementKind = z.infer<typeof RequirementKindSchema>;
249
+ export type ProductRequirement = z.infer<typeof ProductRequirementSchema>;
250
+ export type RequirementsDocument = z.infer<typeof RequirementsDocumentSchema>;
251
+ //# sourceMappingURL=requirements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../../src/product/requirements.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB,+FAMhC,CAAC;AAMH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB5B,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ // packages/contracts/src/product/requirements.ts
2
+ //
3
+ // Functional and non-functional requirements (M8 Phase B — M8-08, M8-09).
4
+ //
5
+ // Distinguishes:
6
+ // - Business requirements (what the business needs).
7
+ // - Functional requirements (what the system does).
8
+ // - Non-functional requirements (security, performance, reliability).
9
+ // - Technical constraints (e.g., must run on PostgreSQL).
10
+ // - Assumptions (carried from the brief; require approval if blocking).
11
+ // - Unresolved decisions.
12
+ import { z } from 'zod';
13
+ export const RequirementKindSchema = z.enum([
14
+ 'business',
15
+ 'functional',
16
+ 'non-functional',
17
+ 'technical-constraint',
18
+ 'assumption',
19
+ ]);
20
+ // Named ProductRequirementSchema to avoid collision with the
21
+ // specification.ts RequirementSchema (which is a simpler { id, statement }
22
+ // used inside FeatureSpecification). This one carries the full M8
23
+ // requirements-engineering shape (kind, priority, source, traceability).
24
+ export const ProductRequirementSchema = z.object({
25
+ id: z.string(),
26
+ kind: RequirementKindSchema,
27
+ statement: z.string().min(1),
28
+ priority: z.enum(['must', 'should', 'could', 'wont']),
29
+ source: z.string().min(1), // brief id or "inferred"
30
+ acceptanceCriterionIds: z.array(z.string()),
31
+ });
32
+ export const RequirementsDocumentSchema = z
33
+ .object({
34
+ schemaVersion: z.literal(1),
35
+ briefId: z.string(),
36
+ functional: z.array(ProductRequirementSchema),
37
+ nonFunctional: z.array(ProductRequirementSchema),
38
+ business: z.array(ProductRequirementSchema),
39
+ technicalConstraints: z.array(ProductRequirementSchema),
40
+ assumptions: z.array(ProductRequirementSchema),
41
+ unresolvedDecisions: z
42
+ .array(z.object({
43
+ id: z.string(),
44
+ question: z.string().min(1),
45
+ blocking: z.boolean(),
46
+ }))
47
+ .default([]),
48
+ })
49
+ .strict();
50
+ //# sourceMappingURL=requirements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirements.js","sourceRoot":"","sources":["../../src/product/requirements.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,0EAA0E;AAC1E,EAAE;AACF,iBAAiB;AACjB,uDAAuD;AACvD,sDAAsD;AACtD,wEAAwE;AACxE,4DAA4D;AAC5D,0EAA0E;AAC1E,4BAA4B;AAE5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1C,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,sBAAsB;IACtB,YAAY;CACb,CAAC,CAAC;AAEH,6DAA6D;AAC7D,2EAA2E;AAC3E,kEAAkE;AAClE,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,qBAAqB;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,yBAAyB;IACpD,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IAChD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IAC3C,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IACvD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IAC9C,mBAAmB,EAAE,CAAC;SACnB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;KACtB,CAAC,CACH;SACA,OAAO,CAAC,EAAE,CAAC;CACf,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { z } from 'zod';
2
+ export declare const TraceabilityEntrySchema: z.ZodObject<{
3
+ requirementId: z.ZodString;
4
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
5
+ taskIds: z.ZodArray<z.ZodString, "many">;
6
+ }, "strip", z.ZodTypeAny, {
7
+ acceptanceCriterionIds: string[];
8
+ requirementId: string;
9
+ taskIds: string[];
10
+ }, {
11
+ acceptanceCriterionIds: string[];
12
+ requirementId: string;
13
+ taskIds: string[];
14
+ }>;
15
+ export declare const TraceabilityMatrixSchema: z.ZodObject<{
16
+ schemaVersion: z.ZodLiteral<1>;
17
+ briefId: z.ZodString;
18
+ entries: z.ZodArray<z.ZodObject<{
19
+ requirementId: z.ZodString;
20
+ acceptanceCriterionIds: z.ZodArray<z.ZodString, "many">;
21
+ taskIds: z.ZodArray<z.ZodString, "many">;
22
+ }, "strip", z.ZodTypeAny, {
23
+ acceptanceCriterionIds: string[];
24
+ requirementId: string;
25
+ taskIds: string[];
26
+ }, {
27
+ acceptanceCriterionIds: string[];
28
+ requirementId: string;
29
+ taskIds: string[];
30
+ }>, "many">;
31
+ }, "strip", z.ZodTypeAny, {
32
+ entries: {
33
+ acceptanceCriterionIds: string[];
34
+ requirementId: string;
35
+ taskIds: string[];
36
+ }[];
37
+ schemaVersion: 1;
38
+ briefId: string;
39
+ }, {
40
+ entries: {
41
+ acceptanceCriterionIds: string[];
42
+ requirementId: string;
43
+ taskIds: string[];
44
+ }[];
45
+ schemaVersion: 1;
46
+ briefId: string;
47
+ }>;
48
+ export type TraceabilityEntry = z.infer<typeof TraceabilityEntrySchema>;
49
+ export type TraceabilityMatrix = z.infer<typeof TraceabilityMatrixSchema>;
50
+ //# sourceMappingURL=traceability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traceability.d.ts","sourceRoot":"","sources":["../../src/product/traceability.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAInC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ // packages/contracts/src/product/traceability.ts
2
+ //
3
+ // Requirement-to-acceptance-to-task traceability (M8 Phase B — M8-11).
4
+ //
5
+ // Every requirement MUST map to at least one acceptance criterion. Every
6
+ // acceptance criterion MUST map to at least one task in the implementation
7
+ // plan. The traceability matrix is produced by the requirements engine and
8
+ // validated by kit validate-plan (M4) and kit audit (M9+).
9
+ import { z } from 'zod';
10
+ export const TraceabilityEntrySchema = z.object({
11
+ requirementId: z.string(),
12
+ acceptanceCriterionIds: z.array(z.string()).min(1),
13
+ taskIds: z.array(z.string()),
14
+ });
15
+ export const TraceabilityMatrixSchema = z.object({
16
+ schemaVersion: z.literal(1),
17
+ briefId: z.string(),
18
+ entries: z.array(TraceabilityEntrySchema),
19
+ });
20
+ //# sourceMappingURL=traceability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traceability.js","sourceRoot":"","sources":["../../src/product/traceability.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,uEAAuE;AACvE,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,2EAA2E;AAC3E,2DAA2D;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;CAC1C,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './project-profile.js';
2
+ export * from './repository-scan.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ // packages/contracts/src/project/index.ts
2
+ export * from './project-profile.js';
3
+ export * from './repository-scan.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/project/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Schema version for the ProjectProfile contract. Bumped on breaking
4
+ // changes; requires an ADR and a migration function in
5
+ // core/artifacts/migrations/.
6
+ */
7
+ export declare const PROJECT_PROFILE_SCHEMA_VERSION: 1;
8
+ /**
9
+ * A single command is an array of arguments. The executor MUST run with
10
+ * shell: false. Empty arrays are rejected.
11
+ */
12
+ export declare const CommandSchema: z.ZodArray<z.ZodString, "many">;
13
+ export declare const CommandsMapSchema: z.ZodObject<{
14
+ test: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
15
+ lint: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
16
+ typecheck: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
17
+ build: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
18
+ }, "strict", z.ZodTypeAny, {
19
+ test?: string[][] | undefined;
20
+ lint?: string[][] | undefined;
21
+ typecheck?: string[][] | undefined;
22
+ build?: string[][] | undefined;
23
+ }, {
24
+ test?: string[][] | undefined;
25
+ lint?: string[][] | undefined;
26
+ typecheck?: string[][] | undefined;
27
+ build?: string[][] | undefined;
28
+ }>;
29
+ export declare const ProjectProfileSchema: z.ZodObject<{
30
+ schemaVersion: z.ZodLiteral<1>;
31
+ name: z.ZodString;
32
+ stack: z.ZodArray<z.ZodString, "many">;
33
+ commands: z.ZodObject<{
34
+ test: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
35
+ lint: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
36
+ typecheck: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
37
+ build: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
38
+ }, "strict", z.ZodTypeAny, {
39
+ test?: string[][] | undefined;
40
+ lint?: string[][] | undefined;
41
+ typecheck?: string[][] | undefined;
42
+ build?: string[][] | undefined;
43
+ }, {
44
+ test?: string[][] | undefined;
45
+ lint?: string[][] | undefined;
46
+ typecheck?: string[][] | undefined;
47
+ build?: string[][] | undefined;
48
+ }>;
49
+ }, "strict", z.ZodTypeAny, {
50
+ schemaVersion: 1;
51
+ name: string;
52
+ stack: string[];
53
+ commands: {
54
+ test?: string[][] | undefined;
55
+ lint?: string[][] | undefined;
56
+ typecheck?: string[][] | undefined;
57
+ build?: string[][] | undefined;
58
+ };
59
+ }, {
60
+ schemaVersion: 1;
61
+ name: string;
62
+ stack: string[];
63
+ commands: {
64
+ test?: string[][] | undefined;
65
+ lint?: string[][] | undefined;
66
+ typecheck?: string[][] | undefined;
67
+ build?: string[][] | undefined;
68
+ };
69
+ }>;
70
+ export type ProjectProfile = z.infer<typeof ProjectProfileSchema>;
71
+ export type CommandsMap = z.infer<typeof CommandsMapSchema>;
72
+ export type Command = z.infer<typeof CommandSchema>;
73
+ /**
74
+ * Convenience constructor: builds a profile and validates it. Throws
75
+ * (programmer error) if invalid — production callers should use the schema
76
+ * directly and surface a PROFILE_INVALID Result.
77
+ */
78
+ export declare function makeProfile(input: Omit<ProjectProfile, 'schemaVersion'>): ProjectProfile;
79
+ //# sourceMappingURL=project-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-profile.d.ts","sourceRoot":"","sources":["../../src/project/project-profile.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAG,CAAU,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,aAAa,iCAEiC,CAAC;AAE5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAOnB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAetB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,GAAG,cAAc,CAExF"}