opennori 0.1.7 → 0.1.9

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 (433) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.opennori/protocol.md +169 -33
  3. package/LICENSE +674 -21
  4. package/README.md +259 -54
  5. package/bin/opennori.js +39 -14
  6. package/dist/bin/opennori.d.ts +4 -0
  7. package/dist/bin/opennori.d.ts.map +1 -0
  8. package/dist/bin/opennori.js +42 -0
  9. package/dist/bin/opennori.js.map +1 -0
  10. package/dist/src/acceptance.d.ts +15 -0
  11. package/dist/src/acceptance.d.ts.map +1 -0
  12. package/dist/src/acceptance.js +504 -0
  13. package/dist/src/acceptance.js.map +1 -0
  14. package/dist/src/architecture/agent-surface.d.ts +6 -0
  15. package/dist/src/architecture/agent-surface.d.ts.map +1 -0
  16. package/dist/src/architecture/agent-surface.js +70 -0
  17. package/dist/src/architecture/agent-surface.js.map +1 -0
  18. package/dist/src/architecture/baseline.d.ts +12 -0
  19. package/dist/src/architecture/baseline.d.ts.map +1 -0
  20. package/dist/src/architecture/baseline.js +124 -0
  21. package/dist/src/architecture/baseline.js.map +1 -0
  22. package/dist/src/architecture/build-vs-buy.d.ts +5 -0
  23. package/dist/src/architecture/build-vs-buy.d.ts.map +1 -0
  24. package/dist/src/architecture/build-vs-buy.js +132 -0
  25. package/dist/src/architecture/build-vs-buy.js.map +1 -0
  26. package/dist/src/architecture/challenge.d.ts +4 -0
  27. package/dist/src/architecture/challenge.d.ts.map +1 -0
  28. package/dist/src/architecture/challenge.js +59 -0
  29. package/dist/src/architecture/challenge.js.map +1 -0
  30. package/dist/src/architecture/profile.d.ts +9 -0
  31. package/dist/src/architecture/profile.d.ts.map +1 -0
  32. package/dist/src/architecture/profile.js +293 -0
  33. package/dist/src/architecture/profile.js.map +1 -0
  34. package/dist/src/architecture/report.d.ts +3 -0
  35. package/dist/src/architecture/report.d.ts.map +1 -0
  36. package/dist/src/architecture/report.js +47 -0
  37. package/dist/src/architecture/report.js.map +1 -0
  38. package/dist/src/architecture/shared.d.ts +16 -0
  39. package/dist/src/architecture/shared.d.ts.map +1 -0
  40. package/dist/src/architecture/shared.js +41 -0
  41. package/dist/src/architecture/shared.js.map +1 -0
  42. package/dist/src/architecture/state.d.ts +3 -0
  43. package/dist/src/architecture/state.d.ts.map +1 -0
  44. package/dist/src/architecture/state.js +60 -0
  45. package/dist/src/architecture/state.js.map +1 -0
  46. package/dist/src/architecture.d.ts +9 -0
  47. package/dist/src/architecture.d.ts.map +1 -0
  48. package/dist/src/architecture.js +9 -0
  49. package/dist/src/architecture.js.map +1 -0
  50. package/dist/src/cli/bootstrap.d.ts +9 -0
  51. package/dist/src/cli/bootstrap.d.ts.map +1 -0
  52. package/dist/src/cli/bootstrap.js +113 -0
  53. package/dist/src/cli/bootstrap.js.map +1 -0
  54. package/dist/src/cli/command-tree.d.ts +29 -0
  55. package/dist/src/cli/command-tree.d.ts.map +1 -0
  56. package/dist/src/cli/command-tree.js +223 -0
  57. package/dist/src/cli/command-tree.js.map +1 -0
  58. package/dist/src/cli/commands/acceptance/approval.d.ts +32 -0
  59. package/dist/src/cli/commands/acceptance/approval.d.ts.map +1 -0
  60. package/dist/src/cli/commands/acceptance/approval.js +42 -0
  61. package/dist/src/cli/commands/acceptance/approval.js.map +1 -0
  62. package/dist/src/cli/commands/acceptance/brainstorm.d.ts +47 -0
  63. package/dist/src/cli/commands/acceptance/brainstorm.d.ts.map +1 -0
  64. package/dist/src/cli/commands/acceptance/brainstorm.js +104 -0
  65. package/dist/src/cli/commands/acceptance/brainstorm.js.map +1 -0
  66. package/dist/src/cli/commands/acceptance/criterion.d.ts +106 -0
  67. package/dist/src/cli/commands/acceptance/criterion.d.ts.map +1 -0
  68. package/dist/src/cli/commands/acceptance/criterion.js +202 -0
  69. package/dist/src/cli/commands/acceptance/criterion.js.map +1 -0
  70. package/dist/src/cli/commands/acceptance/draft.d.ts +52 -0
  71. package/dist/src/cli/commands/acceptance/draft.d.ts.map +1 -0
  72. package/dist/src/cli/commands/acceptance/draft.js +108 -0
  73. package/dist/src/cli/commands/acceptance/draft.js.map +1 -0
  74. package/dist/src/cli/commands/acceptance/runtime-status.d.ts +102 -0
  75. package/dist/src/cli/commands/acceptance/runtime-status.d.ts.map +1 -0
  76. package/dist/src/cli/commands/acceptance/runtime-status.js +119 -0
  77. package/dist/src/cli/commands/acceptance/runtime-status.js.map +1 -0
  78. package/dist/src/cli/commands/acceptance/shared.d.ts +18 -0
  79. package/dist/src/cli/commands/acceptance/shared.d.ts.map +1 -0
  80. package/dist/src/cli/commands/acceptance/shared.js +29 -0
  81. package/dist/src/cli/commands/acceptance/shared.js.map +1 -0
  82. package/dist/src/cli/commands/acceptance.d.ts +6 -0
  83. package/dist/src/cli/commands/acceptance.d.ts.map +1 -0
  84. package/dist/src/cli/commands/acceptance.js +6 -0
  85. package/dist/src/cli/commands/acceptance.js.map +1 -0
  86. package/dist/src/cli/commands/architecture/baseline.d.ts +36 -0
  87. package/dist/src/cli/commands/architecture/baseline.d.ts.map +1 -0
  88. package/dist/src/cli/commands/architecture/baseline.js +84 -0
  89. package/dist/src/cli/commands/architecture/baseline.js.map +1 -0
  90. package/dist/src/cli/commands/architecture/build-vs-buy.d.ts +74 -0
  91. package/dist/src/cli/commands/architecture/build-vs-buy.d.ts.map +1 -0
  92. package/dist/src/cli/commands/architecture/build-vs-buy.js +132 -0
  93. package/dist/src/cli/commands/architecture/build-vs-buy.js.map +1 -0
  94. package/dist/src/cli/commands/architecture/challenge.d.ts +35 -0
  95. package/dist/src/cli/commands/architecture/challenge.d.ts.map +1 -0
  96. package/dist/src/cli/commands/architecture/challenge.js +90 -0
  97. package/dist/src/cli/commands/architecture/challenge.js.map +1 -0
  98. package/dist/src/cli/commands/architecture/profile.d.ts +31 -0
  99. package/dist/src/cli/commands/architecture/profile.d.ts.map +1 -0
  100. package/dist/src/cli/commands/architecture/profile.js +61 -0
  101. package/dist/src/cli/commands/architecture/profile.js.map +1 -0
  102. package/dist/src/cli/commands/architecture/profiles.d.ts +14 -0
  103. package/dist/src/cli/commands/architecture/profiles.d.ts.map +1 -0
  104. package/dist/src/cli/commands/architecture/profiles.js +27 -0
  105. package/dist/src/cli/commands/architecture/profiles.js.map +1 -0
  106. package/dist/src/cli/commands/architecture/shared.d.ts +13 -0
  107. package/dist/src/cli/commands/architecture/shared.d.ts.map +1 -0
  108. package/dist/src/cli/commands/architecture/shared.js +18 -0
  109. package/dist/src/cli/commands/architecture/shared.js.map +1 -0
  110. package/dist/src/cli/commands/architecture/show.d.ts +18 -0
  111. package/dist/src/cli/commands/architecture/show.d.ts.map +1 -0
  112. package/dist/src/cli/commands/architecture/show.js +32 -0
  113. package/dist/src/cli/commands/architecture/show.js.map +1 -0
  114. package/dist/src/cli/commands/architecture.d.ts +7 -0
  115. package/dist/src/cli/commands/architecture.d.ts.map +1 -0
  116. package/dist/src/cli/commands/architecture.js +7 -0
  117. package/dist/src/cli/commands/architecture.js.map +1 -0
  118. package/dist/src/cli/commands/bootstrap.d.ts +25 -0
  119. package/dist/src/cli/commands/bootstrap.d.ts.map +1 -0
  120. package/dist/src/cli/commands/bootstrap.js +37 -0
  121. package/dist/src/cli/commands/bootstrap.js.map +1 -0
  122. package/dist/src/cli/commands/changes.d.ts +14 -0
  123. package/dist/src/cli/commands/changes.d.ts.map +1 -0
  124. package/dist/src/cli/commands/changes.js +69 -0
  125. package/dist/src/cli/commands/changes.js.map +1 -0
  126. package/dist/src/cli/commands/check.d.ts +27 -0
  127. package/dist/src/cli/commands/check.d.ts.map +1 -0
  128. package/dist/src/cli/commands/check.js +134 -0
  129. package/dist/src/cli/commands/check.js.map +1 -0
  130. package/dist/src/cli/commands/context.d.ts +31 -0
  131. package/dist/src/cli/commands/context.d.ts.map +1 -0
  132. package/dist/src/cli/commands/context.js +38 -0
  133. package/dist/src/cli/commands/context.js.map +1 -0
  134. package/dist/src/cli/commands/doctor.d.ts +14 -0
  135. package/dist/src/cli/commands/doctor.d.ts.map +1 -0
  136. package/dist/src/cli/commands/doctor.js +36 -0
  137. package/dist/src/cli/commands/doctor.js.map +1 -0
  138. package/dist/src/cli/commands/evidence/add.d.ts +82 -0
  139. package/dist/src/cli/commands/evidence/add.d.ts.map +1 -0
  140. package/dist/src/cli/commands/evidence/add.js +113 -0
  141. package/dist/src/cli/commands/evidence/add.js.map +1 -0
  142. package/dist/src/cli/commands/evidence/prune.d.ts +35 -0
  143. package/dist/src/cli/commands/evidence/prune.d.ts.map +1 -0
  144. package/dist/src/cli/commands/evidence/prune.js +57 -0
  145. package/dist/src/cli/commands/evidence/prune.js.map +1 -0
  146. package/dist/src/cli/commands/evidence/source-parsing.d.ts +6 -0
  147. package/dist/src/cli/commands/evidence/source-parsing.d.ts.map +1 -0
  148. package/dist/src/cli/commands/evidence/source-parsing.js +70 -0
  149. package/dist/src/cli/commands/evidence/source-parsing.js.map +1 -0
  150. package/dist/src/cli/commands/evidence.d.ts +3 -0
  151. package/dist/src/cli/commands/evidence.d.ts.map +1 -0
  152. package/dist/src/cli/commands/evidence.js +3 -0
  153. package/dist/src/cli/commands/evidence.js.map +1 -0
  154. package/dist/src/cli/commands/install.d.ts +51 -0
  155. package/dist/src/cli/commands/install.d.ts.map +1 -0
  156. package/dist/src/cli/commands/install.js +80 -0
  157. package/dist/src/cli/commands/install.js.map +1 -0
  158. package/dist/src/cli/commands/list.d.ts +14 -0
  159. package/dist/src/cli/commands/list.d.ts.map +1 -0
  160. package/dist/src/cli/commands/list.js +40 -0
  161. package/dist/src/cli/commands/list.js.map +1 -0
  162. package/dist/src/cli/commands/profile/add.d.ts +60 -0
  163. package/dist/src/cli/commands/profile/add.d.ts.map +1 -0
  164. package/dist/src/cli/commands/profile/add.js +74 -0
  165. package/dist/src/cli/commands/profile/add.js.map +1 -0
  166. package/dist/src/cli/commands/profile/check.d.ts +32 -0
  167. package/dist/src/cli/commands/profile/check.d.ts.map +1 -0
  168. package/dist/src/cli/commands/profile/check.js +43 -0
  169. package/dist/src/cli/commands/profile/check.js.map +1 -0
  170. package/dist/src/cli/commands/profile/evidence.d.ts +45 -0
  171. package/dist/src/cli/commands/profile/evidence.d.ts.map +1 -0
  172. package/dist/src/cli/commands/profile/evidence.js +60 -0
  173. package/dist/src/cli/commands/profile/evidence.js.map +1 -0
  174. package/dist/src/cli/commands/profile/shared.d.ts +15 -0
  175. package/dist/src/cli/commands/profile/shared.d.ts.map +1 -0
  176. package/dist/src/cli/commands/profile/shared.js +29 -0
  177. package/dist/src/cli/commands/profile/shared.js.map +1 -0
  178. package/dist/src/cli/commands/profile/show.d.ts +27 -0
  179. package/dist/src/cli/commands/profile/show.d.ts.map +1 -0
  180. package/dist/src/cli/commands/profile/show.js +28 -0
  181. package/dist/src/cli/commands/profile/show.js.map +1 -0
  182. package/dist/src/cli/commands/profile.d.ts +5 -0
  183. package/dist/src/cli/commands/profile.d.ts.map +1 -0
  184. package/dist/src/cli/commands/profile.js +5 -0
  185. package/dist/src/cli/commands/profile.js.map +1 -0
  186. package/dist/src/cli/commands/reporting.d.ts +61 -0
  187. package/dist/src/cli/commands/reporting.d.ts.map +1 -0
  188. package/dist/src/cli/commands/reporting.js +109 -0
  189. package/dist/src/cli/commands/reporting.js.map +1 -0
  190. package/dist/src/cli/commands/setup.d.ts +35 -0
  191. package/dist/src/cli/commands/setup.d.ts.map +1 -0
  192. package/dist/src/cli/commands/setup.js +51 -0
  193. package/dist/src/cli/commands/setup.js.map +1 -0
  194. package/dist/src/cli/commands/uninstall.d.ts +44 -0
  195. package/dist/src/cli/commands/uninstall.d.ts.map +1 -0
  196. package/dist/src/cli/commands/uninstall.js +69 -0
  197. package/dist/src/cli/commands/uninstall.js.map +1 -0
  198. package/dist/src/cli/commands/upgrade.d.ts +44 -0
  199. package/dist/src/cli/commands/upgrade.d.ts.map +1 -0
  200. package/dist/src/cli/commands/upgrade.js +76 -0
  201. package/dist/src/cli/commands/upgrade.js.map +1 -0
  202. package/dist/src/cli/init.d.ts +9 -0
  203. package/dist/src/cli/init.d.ts.map +1 -0
  204. package/dist/src/cli/init.js +111 -0
  205. package/dist/src/cli/init.js.map +1 -0
  206. package/dist/src/cli/runtime.d.ts +50 -0
  207. package/dist/src/cli/runtime.d.ts.map +1 -0
  208. package/dist/src/cli/runtime.js +181 -0
  209. package/dist/src/cli/runtime.js.map +1 -0
  210. package/dist/src/cli/setup.d.ts +9 -0
  211. package/dist/src/cli/setup.d.ts.map +1 -0
  212. package/dist/src/cli/setup.js +89 -0
  213. package/dist/src/cli/setup.js.map +1 -0
  214. package/dist/src/cli.d.ts +2 -0
  215. package/dist/src/cli.d.ts.map +1 -0
  216. package/dist/src/cli.js +55 -0
  217. package/dist/src/cli.js.map +1 -0
  218. package/dist/src/core/contract.d.ts +10 -0
  219. package/dist/src/core/contract.d.ts.map +1 -0
  220. package/dist/src/core/contract.js +178 -0
  221. package/dist/src/core/contract.js.map +1 -0
  222. package/dist/src/core/evidence.d.ts +28 -0
  223. package/dist/src/core/evidence.d.ts.map +1 -0
  224. package/dist/src/core/evidence.js +461 -0
  225. package/dist/src/core/evidence.js.map +1 -0
  226. package/dist/src/core/profile.d.ts +9 -0
  227. package/dist/src/core/profile.d.ts.map +1 -0
  228. package/dist/src/core/profile.js +116 -0
  229. package/dist/src/core/profile.js.map +1 -0
  230. package/dist/src/core/report.d.ts +11 -0
  231. package/dist/src/core/report.d.ts.map +1 -0
  232. package/dist/src/core/report.js +434 -0
  233. package/dist/src/core/report.js.map +1 -0
  234. package/dist/src/core/shared.d.ts +21 -0
  235. package/dist/src/core/shared.d.ts.map +1 -0
  236. package/dist/src/core/shared.js +80 -0
  237. package/dist/src/core/shared.js.map +1 -0
  238. package/dist/src/core.d.ts +6 -0
  239. package/dist/src/core.d.ts.map +1 -0
  240. package/dist/src/core.js +6 -0
  241. package/dist/src/core.js.map +1 -0
  242. package/dist/src/lifecycle/bootstrap.d.ts +5 -0
  243. package/dist/src/lifecycle/bootstrap.d.ts.map +1 -0
  244. package/dist/src/lifecycle/bootstrap.js +47 -0
  245. package/dist/src/lifecycle/bootstrap.js.map +1 -0
  246. package/dist/src/lifecycle/context-export.d.ts +6 -0
  247. package/dist/src/lifecycle/context-export.d.ts.map +1 -0
  248. package/dist/src/lifecycle/context-export.js +42 -0
  249. package/dist/src/lifecycle/context-export.js.map +1 -0
  250. package/dist/src/lifecycle/doctor/active-goals.d.ts +7 -0
  251. package/dist/src/lifecycle/doctor/active-goals.d.ts.map +1 -0
  252. package/dist/src/lifecycle/doctor/active-goals.js +57 -0
  253. package/dist/src/lifecycle/doctor/active-goals.js.map +1 -0
  254. package/dist/src/lifecycle/doctor/manifest-health.d.ts +9 -0
  255. package/dist/src/lifecycle/doctor/manifest-health.d.ts.map +1 -0
  256. package/dist/src/lifecycle/doctor/manifest-health.js +49 -0
  257. package/dist/src/lifecycle/doctor/manifest-health.js.map +1 -0
  258. package/dist/src/lifecycle/doctor/plugin-health.d.ts +7 -0
  259. package/dist/src/lifecycle/doctor/plugin-health.d.ts.map +1 -0
  260. package/dist/src/lifecycle/doctor/plugin-health.js +23 -0
  261. package/dist/src/lifecycle/doctor/plugin-health.js.map +1 -0
  262. package/dist/src/lifecycle/doctor/project-health.d.ts +4 -0
  263. package/dist/src/lifecycle/doctor/project-health.d.ts.map +1 -0
  264. package/dist/src/lifecycle/doctor/project-health.js +43 -0
  265. package/dist/src/lifecycle/doctor/project-health.js.map +1 -0
  266. package/dist/src/lifecycle/doctor/shared.d.ts +6 -0
  267. package/dist/src/lifecycle/doctor/shared.d.ts.map +1 -0
  268. package/dist/src/lifecycle/doctor/shared.js +40 -0
  269. package/dist/src/lifecycle/doctor/shared.js.map +1 -0
  270. package/dist/src/lifecycle/doctor.d.ts +3 -0
  271. package/dist/src/lifecycle/doctor.d.ts.map +1 -0
  272. package/dist/src/lifecycle/doctor.js +29 -0
  273. package/dist/src/lifecycle/doctor.js.map +1 -0
  274. package/dist/src/lifecycle/install.d.ts +9 -0
  275. package/dist/src/lifecycle/install.d.ts.map +1 -0
  276. package/dist/src/lifecycle/install.js +28 -0
  277. package/dist/src/lifecycle/install.js.map +1 -0
  278. package/dist/src/lifecycle/managed-files.d.ts +20 -0
  279. package/dist/src/lifecycle/managed-files.d.ts.map +1 -0
  280. package/dist/src/lifecycle/managed-files.js +78 -0
  281. package/dist/src/lifecycle/managed-files.js.map +1 -0
  282. package/dist/src/lifecycle/manifest.d.ts +13 -0
  283. package/dist/src/lifecycle/manifest.d.ts.map +1 -0
  284. package/dist/src/lifecycle/manifest.js +100 -0
  285. package/dist/src/lifecycle/manifest.js.map +1 -0
  286. package/dist/src/lifecycle/plans.d.ts +16 -0
  287. package/dist/src/lifecycle/plans.d.ts.map +1 -0
  288. package/dist/src/lifecycle/plans.js +169 -0
  289. package/dist/src/lifecycle/plans.js.map +1 -0
  290. package/dist/src/lifecycle/profile-checks.d.ts +4 -0
  291. package/dist/src/lifecycle/profile-checks.d.ts.map +1 -0
  292. package/dist/src/lifecycle/profile-checks.js +119 -0
  293. package/dist/src/lifecycle/profile-checks.js.map +1 -0
  294. package/dist/src/lifecycle/setup.d.ts +47 -0
  295. package/dist/src/lifecycle/setup.d.ts.map +1 -0
  296. package/dist/src/lifecycle/setup.js +275 -0
  297. package/dist/src/lifecycle/setup.js.map +1 -0
  298. package/dist/src/lifecycle/shared.d.ts +10 -0
  299. package/dist/src/lifecycle/shared.d.ts.map +1 -0
  300. package/dist/src/lifecycle/shared.js +59 -0
  301. package/dist/src/lifecycle/shared.js.map +1 -0
  302. package/dist/src/lifecycle/uninstall.d.ts +6 -0
  303. package/dist/src/lifecycle/uninstall.d.ts.map +1 -0
  304. package/dist/src/lifecycle/uninstall.js +47 -0
  305. package/dist/src/lifecycle/uninstall.js.map +1 -0
  306. package/dist/src/lifecycle/upgrade.d.ts +6 -0
  307. package/dist/src/lifecycle/upgrade.d.ts.map +1 -0
  308. package/dist/src/lifecycle/upgrade.js +134 -0
  309. package/dist/src/lifecycle/upgrade.js.map +1 -0
  310. package/dist/src/lifecycle.d.ts +11 -0
  311. package/dist/src/lifecycle.d.ts.map +1 -0
  312. package/dist/src/lifecycle.js +11 -0
  313. package/dist/src/lifecycle.js.map +1 -0
  314. package/dist/src/package-root.d.ts +3 -0
  315. package/dist/src/package-root.d.ts.map +1 -0
  316. package/dist/src/package-root.js +17 -0
  317. package/dist/src/package-root.js.map +1 -0
  318. package/dist/src/plugin.d.ts +3 -0
  319. package/dist/src/plugin.d.ts.map +1 -0
  320. package/dist/src/plugin.js +63 -0
  321. package/dist/src/plugin.js.map +1 -0
  322. package/dist/src/skills.d.ts +11 -0
  323. package/dist/src/skills.d.ts.map +1 -0
  324. package/dist/src/skills.js +60 -0
  325. package/dist/src/skills.js.map +1 -0
  326. package/dist/src/types.d.ts +710 -0
  327. package/dist/src/types.d.ts.map +1 -0
  328. package/dist/src/types.js +2 -0
  329. package/dist/src/types.js.map +1 -0
  330. package/dist/src/validation.d.ts +21 -0
  331. package/dist/src/validation.d.ts.map +1 -0
  332. package/dist/src/validation.js +52 -0
  333. package/dist/src/validation.js.map +1 -0
  334. package/examples/opennori-self.json +109 -20
  335. package/package.json +28 -6
  336. package/plugins/opennori/.codex-plugin/plugin.json +40 -0
  337. package/plugins/opennori/skills/nori/SKILL.md +80 -0
  338. package/plugins/opennori/skills/nori-acceptance/SKILL.md +85 -0
  339. package/plugins/opennori/skills/nori-architecture-apply/SKILL.md +63 -0
  340. package/plugins/opennori/skills/nori-architecture-brainstorm/SKILL.md +67 -0
  341. package/plugins/opennori/skills/nori-architecture-challenge/SKILL.md +59 -0
  342. package/plugins/opennori/skills/nori-build-vs-buy/SKILL.md +68 -0
  343. package/plugins/opennori/skills/nori-capability-profile/SKILL.md +65 -0
  344. package/plugins/opennori/skills/nori-evidence/SKILL.md +72 -0
  345. package/plugins/opennori/skills/nori-project-health/SKILL.md +85 -0
  346. package/plugins/opennori/skills/nori-reporting/SKILL.md +72 -0
  347. package/schemas/architecture-baseline.schema.json +59 -0
  348. package/schemas/build-vs-buy.schema.json +39 -0
  349. package/schemas/evidence-payload.schema.json +71 -0
  350. package/schemas/manifest.schema.json +91 -0
  351. package/src/acceptance.ts +589 -0
  352. package/src/architecture/agent-surface.ts +78 -0
  353. package/src/architecture/baseline.ts +156 -0
  354. package/src/architecture/build-vs-buy.ts +142 -0
  355. package/src/architecture/challenge.ts +62 -0
  356. package/src/architecture/profile.ts +301 -0
  357. package/src/architecture/report.ts +49 -0
  358. package/src/architecture/shared.ts +50 -0
  359. package/src/architecture/state.ts +63 -0
  360. package/src/architecture.ts +40 -0
  361. package/src/cli/bootstrap.ts +156 -0
  362. package/src/cli/command-tree.ts +274 -0
  363. package/src/cli/commands/acceptance/approval.ts +49 -0
  364. package/src/cli/commands/acceptance/brainstorm.ts +121 -0
  365. package/src/cli/commands/acceptance/criterion.ts +218 -0
  366. package/src/cli/commands/acceptance/draft.ts +125 -0
  367. package/src/cli/commands/acceptance/runtime-status.ts +137 -0
  368. package/src/cli/commands/acceptance/shared.ts +38 -0
  369. package/src/cli/commands/acceptance.ts +32 -0
  370. package/src/cli/commands/architecture/baseline.ts +94 -0
  371. package/src/cli/commands/architecture/build-vs-buy.ts +140 -0
  372. package/src/cli/commands/architecture/challenge.ts +99 -0
  373. package/src/cli/commands/architecture/profile.ts +72 -0
  374. package/src/cli/commands/architecture/profiles.ts +28 -0
  375. package/src/cli/commands/architecture/shared.ts +21 -0
  376. package/src/cli/commands/architecture/show.ts +33 -0
  377. package/src/cli/commands/architecture.ts +24 -0
  378. package/src/cli/commands/bootstrap.ts +44 -0
  379. package/src/cli/commands/changes.ts +86 -0
  380. package/src/cli/commands/check.ts +136 -0
  381. package/src/cli/commands/context.ts +44 -0
  382. package/src/cli/commands/doctor.ts +37 -0
  383. package/src/cli/commands/evidence/add.ts +121 -0
  384. package/src/cli/commands/evidence/prune.ts +67 -0
  385. package/src/cli/commands/evidence/source-parsing.ts +72 -0
  386. package/src/cli/commands/evidence.ts +8 -0
  387. package/src/cli/commands/install.ts +106 -0
  388. package/src/cli/commands/list.ts +41 -0
  389. package/src/cli/commands/profile/add.ts +86 -0
  390. package/src/cli/commands/profile/check.ts +52 -0
  391. package/src/cli/commands/profile/evidence.ts +69 -0
  392. package/src/cli/commands/profile/shared.ts +35 -0
  393. package/src/cli/commands/profile/show.ts +35 -0
  394. package/src/cli/commands/profile.ts +16 -0
  395. package/src/cli/commands/reporting.ts +122 -0
  396. package/src/cli/commands/setup.ts +66 -0
  397. package/src/cli/commands/uninstall.ts +90 -0
  398. package/src/cli/commands/upgrade.ts +110 -0
  399. package/src/cli/init.ts +152 -0
  400. package/src/cli/runtime.ts +212 -0
  401. package/src/cli/setup.ts +139 -0
  402. package/src/cli.ts +68 -0
  403. package/src/core/contract.ts +210 -0
  404. package/src/core/evidence.ts +492 -0
  405. package/src/core/profile.ts +120 -0
  406. package/src/core/report.ts +462 -0
  407. package/src/core/shared.ts +89 -0
  408. package/src/core.ts +5 -0
  409. package/src/lifecycle/bootstrap.ts +55 -0
  410. package/src/lifecycle/context-export.ts +53 -0
  411. package/src/lifecycle/doctor/active-goals.ts +73 -0
  412. package/src/lifecycle/doctor/manifest-health.ts +118 -0
  413. package/src/lifecycle/doctor/plugin-health.ts +60 -0
  414. package/src/lifecycle/doctor/project-health.ts +108 -0
  415. package/src/lifecycle/doctor/shared.ts +49 -0
  416. package/src/lifecycle/doctor.ts +41 -0
  417. package/src/lifecycle/install.ts +51 -0
  418. package/src/lifecycle/managed-files.ts +96 -0
  419. package/src/lifecycle/manifest.ts +123 -0
  420. package/src/lifecycle/plans.ts +176 -0
  421. package/src/lifecycle/profile-checks.ts +121 -0
  422. package/src/lifecycle/setup.ts +383 -0
  423. package/src/lifecycle/shared.ts +61 -0
  424. package/src/lifecycle/uninstall.ts +63 -0
  425. package/src/lifecycle/upgrade.ts +156 -0
  426. package/src/lifecycle.ts +22 -0
  427. package/src/package-root.ts +16 -0
  428. package/src/plugin.ts +76 -0
  429. package/src/skills.ts +72 -0
  430. package/src/types.ts +793 -0
  431. package/src/validation.ts +66 -0
  432. package/src/cli.js +0 -2530
  433. package/src/core.js +0 -971
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "opennori",
3
+ "interface": {
4
+ "displayName": "OpenNori"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "opennori",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/opennori"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Productivity"
18
+ }
19
+ ]
20
+ }
@@ -6,6 +6,7 @@ The human-facing surface is acceptance state:
6
6
 
7
7
  - goal
8
8
  - user acceptance criteria
9
+ - architecture baseline decision
9
10
  - current acceptance gap
10
11
  - evidence summary
11
12
  - final status
@@ -13,6 +14,20 @@ The human-facing surface is acceptance state:
13
14
  Implementation plans are allowed inside the agent's private reasoning, but they are not the default
14
15
  progress surface and they are not completion evidence.
15
16
 
17
+ For non-trivial goals, OpenNori also carries an Architecture Baseline. Product AC answers what the
18
+ human user must be able to accept. Architecture Baseline answers what technical architecture the
19
+ agent must follow while producing that outcome. These are reported together but kept separate.
20
+
21
+ OpenNori is installed and used as one agent capability bundle:
22
+
23
+ - Codex Plugin distributes and discovers packaged OpenNori Skills.
24
+ - Skills define the agent behavior protocols and natural-language routing.
25
+ - `opennori` is the deterministic state layer those Skills call.
26
+ - `.opennori/` is the project-local contract, evidence, profile, architecture, health, and report store.
27
+
28
+ Do not present Plugin, Skills, CLI, or `.opennori` state as separate user workflows. Direct CLI use
29
+ is an advanced, automation, or debugging route for the same state layer.
30
+
16
31
  ## Layered Acceptance Criteria v1
17
32
 
18
33
  OpenNori itself is accepted only when it satisfies user-tool-operation acceptance criteria.
@@ -63,6 +78,7 @@ The operator layer proves that Codex can actually use OpenNori as the work proto
63
78
  | AC-O-6 | Codex conversation | Revise an AC after new facts appear | The changed acceptance basis is preserved. | Updated ACs become the basis for `current_gap` and completion; old criteria are not silently reused. |
64
79
  | AC-O-7 | Codex conversation | Ask OpenNori to brainstorm a fuzzy idea | The user sees selectable acceptance directions without remembering CLI syntax. | Brainstorm candidates describe user value, observable acceptance direction, and risk; they are not treated as a contract or completion evidence. |
65
80
  | AC-O-8 | Codex conversation | State required Skills, preferred stacks, avoided tools, or execution constraints | The agent records a Nori Profile without making the user remember CLI syntax. | Must/avoid profile items are shown in contract and report; unsatisfied must items or violated avoid items block completion unless waived. |
81
+ | AC-O-9 | Codex conversation | Ask OpenNori to use a good architecture for a non-trivial goal | The user sees Product AC and an Architecture Baseline before implementation starts. | The baseline is not a plan; it names the architecture profile, boundaries, build-vs-buy policy, and challenge rule. |
66
82
 
67
83
  ### L3 Productization AC
68
84
 
@@ -71,18 +87,24 @@ a durable workflow asset.
71
87
 
72
88
  | ID | Tool / entrypoint | User operation | User acceptance criterion | Passing threshold |
73
89
  | --- | --- | --- | --- | --- |
74
- | AC-Z-1 | CLI | Run `opennori skill export` | The user gets a usable Codex Skill draft for OpenNori. | The Skill tells agents to drive work through resume, next, evidence, evaluate, status, and report. |
75
- | AC-Z-2 | CLI | Run `opennori install` | The user can install OpenNori into a project without unexpected overwrites. | Install shows created/skipped assets; existing user content is not overwritten by default. |
90
+ | AC-Z-1 | Codex Plugin / package assets | Install or inspect the OpenNori package | The user's agent can discover focused OpenNori Skills without the user memorizing CLI flags. | `.agents/plugins/marketplace.json` points to `./plugins/opennori`; `plugins/opennori/.codex-plugin/plugin.json` points to package-local `skills/`; the `nori` Skill routes natural-language work through acceptance, evidence, profile, architecture, health, and reporting. |
91
+ | AC-Z-2 | CLI | Run `opennori init` or `opennori install` | The user can initialize OpenNori project state without unexpected overwrites. | Init/install shows created/skipped assets; existing user content is not overwritten by default. |
76
92
  | AC-Z-3 | Git / PR diff | Review the agent's changes | The user can separate acceptance evidence changes from implementation noise. | Summary defaults to AC status changes, evidence changes, and user impact. |
77
93
  | AC-Z-4 | CLI | Run `opennori list` and select a goal | The user can see multiple active goals and choose one explicitly. | Multiple active goals are listed with status, gap, and paths; `--goal` selects the target. |
78
94
  | AC-Z-5 | CLI | Archive a completed or blocked goal | The user removes it from active work while preserving evidence and report. | Active no longer lists the goal; contract, ledger, and report remain recoverable. |
79
95
  | AC-Z-6 | Project file browser | Inspect the project after running OpenNori | The user sees OpenNori-owned state under `.opennori/` instead of a generic project `process/` directory. | Install, draft, brainstorm, report, and archive write OpenNori state under `.opennori/` by default. |
80
- | AC-Z-7 | CLI / project file browser | Run `opennori install` | The user can inspect project OpenNori registration and judge version, managed entries, active goals, Skill status, and protocol capabilities. | Install output uses create, skip, overwrite, or update semantics; `.opennori/manifest.json` records version, managed files, active goals, Skill state, and capabilities. |
81
- | AC-Z-8 | CLI | Run `opennori doctor` | The user can judge whether the project is `ready`, `needs-action`, or `broken`, and see the next recovery action. | Doctor checks `.opennori` structure, manifest consistency, active goal recoverability, Skill sync, CLI runtime, and recovery suggestions. |
96
+ | AC-Z-7 | CLI / project file browser | Run `opennori install` | The user can inspect project OpenNori registration and judge version, managed entries, active goals, Plugin Skill availability, and protocol capabilities. | Install output uses create, skip, overwrite, or update semantics; `.opennori/manifest.json` records version, managed files, active goals, Plugin state, architecture state, and capabilities. |
97
+ | AC-Z-8 | CLI | Run `opennori doctor` | The user can judge whether the project is `ready`, `needs-action`, or `broken`, and see the next recovery action. | Doctor checks `.opennori` structure, manifest consistency, active goal recoverability, packaged Plugin Skills, CLI runtime, and recovery suggestions. |
82
98
  | AC-Z-9 | CLI | Preview install with `opennori install --dry-run` | The user can judge what OpenNori would create, skip, update, or overwrite before writing to the project. | Install plan lists action, kind, managed status, write intent, destructive flag, and reason; dry-run reports zero actual writes. |
83
99
  | AC-Z-10 | CLI | Apply force install | The user must preview and explicitly confirm destructive install actions before files are overwritten. | Real `opennori install --force` fails without confirmation; dry-run previews destructive overwrites; confirmed force install may write. |
84
100
  | AC-Z-11 | CLI | Preview and apply uninstall | The user can uninstall OpenNori entry assets without losing acceptance state by default. | Uninstall plan shows removals and preserved state; real uninstall requires confirmation; `.opennori` state is deleted only with `--include-state --confirm`. |
85
- | AC-Z-12 | CLI / Codex Skills | Install OpenNori Skill Pack | The agent gets focused OpenNori Skills for acceptance, evidence, Nori Profile, project health, and reporting while the user keeps using natural language. | `opennori skill export --pack` exposes the pack; `opennori install --skill` writes it; manifest records `skill_pack`; doctor detects missing or stale pack Skills. |
101
+ | AC-Z-12 | Codex Plugin / Codex Skills | Use OpenNori Plugin Skills | The agent gets focused OpenNori Skills for acceptance, evidence, Nori Profile, architecture, project health, reporting, and next-loop candidates while the user keeps using natural language. | The npm package ships `.agents/plugins/marketplace.json`, `plugins/opennori/.codex-plugin/plugin.json`, and `plugins/opennori/skills/nori*/SKILL.md`; each Skill is an agent behavior protocol with trigger semantics, state reading, natural-language mapping, state write boundaries, handoffs, user reply shape, and misuse guards; install does not copy Skills into the project; manifest records `plugin`; doctor detects missing packaged Plugin Skills. |
102
+ | AC-Z-13 | CLI / project file browser | Establish an Architecture Baseline | The user can see what architecture the agent must follow while implementing Product AC. | `.opennori/architecture/baseline.json`, `.opennori/architecture/baseline.md`, and `.opennori/agent-guide.md` expose the baseline to agents and reviewers. |
103
+ | AC-Z-14 | CLI / project file browser | Add a project Architecture Profile | The user can extend built-in profiles with a reviewed project profile. | `opennori architecture profile --from <profile.json>` writes `.opennori/architecture/profiles/<id>.json`; `architecture profiles` lists it before built-ins. |
104
+ | AC-Z-15 | CLI / report | Challenge a baseline | The user can review evidence before an agent changes architecture. | `opennori architecture challenge` records current baseline, conflict evidence, recommendation, and user confirmation requirement. |
105
+ | AC-Z-16 | CLI / report | Record build-vs-buy decisions | The user can see whether existing dependencies, standard libraries, official SDKs, and mature OSS were checked before self-building infrastructure. | `opennori architecture build-vs-buy` records the decision under `.opennori/architecture/decisions/` and status/report summarize it. |
106
+ | AC-Z-18 | README / website / Plugin description | First read the OpenNori entry material | The user understands OpenNori as one agent capability bundle: Plugin discovery, packaged Skills, deterministic CLI state layer, and `.opennori` project state work together. | README Install/Quick Start, website Start, Plugin longDescription, and nori/project-health Skills do not present Plugin, Skills, or CLI as separate user paths; they explain that missing bundle parts should be recovered through doctor/health rather than used as a half-installed workflow. |
107
+ | AC-Z-19 | CLI / Codex / npm | Run `npx opennori setup`, then use `opennori init` in projects | The user installs the complete OpenNori capability bundle from one explicit setup entry and can initialize projects with the global CLI. | Setup previews Codex Plugin registration, packaged Skill availability, global CLI install, project `.opennori` initialization, and doctor; unconfirmed setup writes nothing; confirmed setup uses official `codex plugin` and npm commands plus OpenNori project initialization. |
86
108
 
87
109
  ## Required Artifact Pair
88
110
 
@@ -92,6 +114,7 @@ OpenNori writes its project-local state under `.opennori/`.
92
114
  .opennori/
93
115
  manifest.json
94
116
  protocol.md
117
+ agent-guide.md
95
118
  active/
96
119
  <goal>.acceptance.md
97
120
  <goal>.evidence.json
@@ -99,6 +122,13 @@ OpenNori writes its project-local state under `.opennori/`.
99
122
  blocked/
100
123
  reports/
101
124
  brainstorms/
125
+ architecture/
126
+ baseline.json
127
+ baseline.md
128
+ profiles/
129
+ challenges/
130
+ decisions/
131
+ evidence/
102
132
  ```
103
133
 
104
134
  Each active goal has:
@@ -112,11 +142,13 @@ Each active goal has:
112
142
  - OpenNori package version
113
143
  - managed `.opennori` files and directories
114
144
  - active goals recoverable from `.opennori/active`
115
- - optional repo-local OpenNori Skill state
116
- - optional repo-local OpenNori Skill Pack state
145
+ - OpenNori Plugin and package Skill asset state
146
+ - Architecture Baseline, profile, challenge, build-vs-buy, and agent-readable surface state
117
147
  - protocol capabilities exposed by this CLI
118
148
 
119
- `opennori install` creates or refreshes the manifest. State-changing OpenNori commands refresh it when
149
+ `opennori init` creates project state through the same preview-first lifecycle used by install.
150
+ `opennori install` remains a deterministic project-asset command for agents and automation.
151
+ State-changing OpenNori commands refresh the manifest when
120
152
  `.opennori/` already exists.
121
153
 
122
154
  `opennori install --dry-run` returns an install plan. The plan uses deterministic action semantics:
@@ -134,30 +166,48 @@ Real `opennori install --force` can overwrite OpenNori-managed files, so it requ
134
166
  Run `opennori install --dry-run --force` first to inspect destructive actions, then rerun with
135
167
  `--confirm` only if those writes are acceptable.
136
168
 
137
- `opennori uninstall --dry-run` returns an uninstall plan. By default it removes entry assets such as the
138
- repo-local OpenNori Skill and manifest, while preserving Nori Contracts, evidence records,
139
- reports, archives, and brainstorms. Real uninstall requires `--confirm`. Deleting the whole `.opennori`
140
- state directory requires both `--include-state` and `--confirm`.
169
+ `opennori uninstall --dry-run` returns an uninstall plan. By default it removes the manifest while
170
+ preserving Nori Contracts, evidence records, reports, archives, brainstorms, protocol, guide, and
171
+ architecture state. Real uninstall requires `--confirm`. Deleting the whole `.opennori` state
172
+ directory requires both `--include-state` and `--confirm`.
141
173
 
142
- ## Skill Pack
174
+ ## OpenNori Plugin Skills
143
175
 
144
- OpenNori exposes a Skill Pack for agent use. The user should not need to remember these Skill names;
145
- the root `nori` Skill routes natural-language requests to focused Skills:
176
+ OpenNori exposes Codex Skills through its Plugin and package assets. These Skills are agent
177
+ behavior protocols, not CLI manuals for users. The user should not need to remember Skill names or
178
+ command flags; the root `nori` Skill routes natural-language requests to focused Skills:
146
179
 
147
180
  - `nori`: root router for OpenNori turns
148
181
  - `nori-acceptance`: discover AC gaps, brainstorm, draft, approve, and revise human-facing ACs
149
182
  - `nori-evidence`: record reviewable evidence without forcing fixed adapters
150
183
  - `nori-capability-profile`: record required Skills, preferred stacks, avoided tools, and install policy
151
- - `nori-project-health`: install, uninstall, doctor, manifest, and Skill Pack sync
152
- - `nori-reporting`: status, report, current gap, user intervention, and changes
153
-
154
- `opennori install --skill` installs the pack under `.agents/skills/`. The manifest records `skill_pack`
155
- state, and `opennori doctor` checks whether the pack is installed and in sync.
184
+ - `nori-architecture-brainstorm`: select or create an Architecture Baseline before non-trivial implementation
185
+ - `nori-architecture-apply`: read and apply the confirmed baseline before implementation
186
+ - `nori-architecture-challenge`: raise evidence-backed requests to revise a baseline
187
+ - `nori-build-vs-buy`: record dependency/library/self-build decisions before infrastructure work
188
+ - `nori-project-health`: install, upgrade, uninstall, doctor, manifest, Plugin health, and project recoverability
189
+ - `nori-reporting`: status, report, current gap, user intervention, changes, and context export
190
+
191
+ Each packaged Skill states its mission, starting state reads, natural-language mapping, allowed
192
+ state writes, handoff rules, user-facing reply shape, and misuse guards. This lets agents use
193
+ OpenNori from natural language while the CLI remains a deterministic state layer.
194
+
195
+ The package ships `.agents/plugins/marketplace.json` pointing to `./plugins/opennori`, where
196
+ `plugins/opennori/.codex-plugin/plugin.json` declares `skills: "./skills/"`. `opennori install`
197
+ writes project state under `.opennori/`; it does not copy OpenNori Skills into the user's project.
198
+ The manifest records `plugin` state, and `opennori doctor` checks whether packaged Plugin Skills are
199
+ present and whether the manifest Plugin state is stale.
156
200
 
157
201
  When upgrading an existing OpenNori project, upgrade entry assets first, then run `opennori check`.
158
- `check` validates active Nori Contracts and reports `acceptance_quality` warnings for vague ACs
159
- such as "modify profile fields" or "show an error". It does not rewrite existing contracts, evidence,
160
- reports, archives, or brainstorms. The user decides whether to revise affected criteria.
202
+ `check` validates active Nori Contract integrity as hard state structure, then reports
203
+ `acceptance_review` findings for vague or possibly implementation-centered ACs such as "modify
204
+ profile fields" or "show an error". These review findings are questions for the agent and user,
205
+ not hard protocol rejection. `check` also reports `architecture_check` warnings when the active goal
206
+ has no confirmed Architecture Baseline, stale agent-readable surface, or unresolved Architecture
207
+ Challenges. It reports `evidence_health` warnings when a complete-looking goal relies on stale,
208
+ broad, source-free, or non-reviewable evidence. It does not rewrite existing contracts, evidence,
209
+ reports, archives, brainstorms, or baselines. The user decides whether to revise affected criteria,
210
+ confirm assumptions, accept review risk, revise architecture, or refresh evidence.
161
211
 
162
212
  ## Nori Profile
163
213
 
@@ -180,12 +230,76 @@ Profile items have:
180
230
  Completion rules:
181
231
 
182
232
  - `must` blocks completion until satisfied or waived.
183
- - `prefer` is reported but does not block completion.
233
+ - `prefer` does not block objective completion, but unknown or violated preferences become `profile_review` risk before confident completion.
184
234
  - `avoid` blocks completion if violated.
185
235
 
186
236
  Agents translate the user's natural-language preferences into profile records. Users should not
187
237
  need to remember `opennori profile` commands.
188
238
 
239
+ ## Architecture Baseline
240
+
241
+ Architecture Baseline is separate from Product AC. It is not a plan, phase list, task list, or
242
+ implementation checklist. It is sticky architecture guidance for agents and maintainers:
243
+
244
+ - selected Architecture Profile
245
+ - goal it applies to
246
+ - architecture principles and boundaries
247
+ - Architecture Checks for maintainers or agents
248
+ - preferred libraries or technologies
249
+ - avoid policy
250
+ - build-vs-buy policy
251
+ - challenge policy
252
+ - agent-readable surfaces
253
+
254
+ OpenNori includes built-in profiles and supports project profiles under:
255
+
256
+ ```text
257
+ .opennori/architecture/profiles/<profile-id>.json
258
+ ```
259
+
260
+ Use `opennori architecture profiles --root <project> --json` to list built-ins and project profiles.
261
+ The output is intentionally reviewable before baseline confirmation: each profile includes suitable
262
+ use cases, reference sources, architecture principles, checks, preferred libraries, avoid
263
+ boundaries, validation issues, and build-vs-buy policy.
264
+ Use `opennori architecture profile --root <project> --from <profile.json> --json` to add a reviewed
265
+ project profile. Existing profiles are not overwritten unless the agent uses `--force` after review.
266
+
267
+ Use `opennori architecture baseline --root <project> --goal "<goal>" --profile <profile-id> --json`
268
+ to preview a baseline. Preview has no side effect. After the user accepts it, rerun with `--confirm`.
269
+
270
+ Once confirmed, the baseline is written to:
271
+
272
+ - `.opennori/architecture/baseline.json`
273
+ - `.opennori/architecture/baseline.md`
274
+ - `.opennori/agent-guide.md`
275
+
276
+ Agent route files such as `AGENTS.md` or `CLAUDE.md` should point new sessions to these surfaces.
277
+ `opennori doctor` checks that the baseline exists when an active goal requires it, that the schema is
278
+ valid, and that at least one agent route references `.opennori/architecture/baseline.md`.
279
+
280
+ If project evidence conflicts with a confirmed baseline, the agent must create an Architecture
281
+ Challenge instead of silently changing stack, dependency policy, directory boundaries, state model,
282
+ or project architecture:
283
+
284
+ ```bash
285
+ opennori architecture challenge --root <project> --summary "<conflict>" --evidence "<evidence>" --recommendation "<change>" --json
286
+ ```
287
+
288
+ Build-vs-buy decisions are first-class architecture evidence. Before self-building infrastructure,
289
+ the agent checks current project dependencies, standard libraries, official SDKs, mature
290
+ open-source libraries, and documented reference projects:
291
+
292
+ ```bash
293
+ opennori architecture build-vs-buy --root <project> --area "<area>" --need "<need>" --recommendation <reuse|buy|self-build> --summary "<decision>" --json
294
+ ```
295
+
296
+ Architecture state affects completion confidence, not Product AC shape. When every required Product
297
+ AC is `passing` or `waived` but the active goal has a missing/draft/invalid/challenged baseline,
298
+ stale agent-readable architecture surface, or unhealthy build-vs-buy decisions, OpenNori reports
299
+ `objective_complete: true` with `confidence: review-risk`. It must not create synthetic ARCH
300
+ acceptance criteria or replace `current_gap` unless a real Product AC or blocking Profile item is
301
+ still incomplete.
302
+
189
303
  ## Status Model
190
304
 
191
305
  - `unknown`: no user-understandable evidence exists
@@ -194,7 +308,17 @@ need to remember `opennori profile` commands.
194
308
  - `blocked`: user decision or external condition required
195
309
  - `waived`: user explicitly accepts the unmet criterion with a reason
196
310
 
197
- The workflow is complete only when every required criterion is `passing` or `waived`.
311
+ The workflow ledger is complete only when every required criterion is `passing` or `waived`.
312
+ The user-facing completion answer is not confidently complete while `evidence_health` has review
313
+ findings, `profile_review` is unresolved, `architecture_review` remains, or `build_vs_buy` is
314
+ unhealthy, even if the ledger status is already `complete`.
315
+
316
+ When a goal is confidently complete, `next_recommendation` may include `candidate_goals`.
317
+ These candidates help the agent continue when the user has asked to keep going. Each candidate
318
+ names a possible next human-facing goal, the user value, acceptance directions, and risks.
319
+ Candidates are not phases, task lists, approved acceptance criteria, or completion evidence. The
320
+ agent must turn a selected or revised candidate into a new draft Nori Contract before using it for
321
+ completion judgment.
198
322
 
199
323
  ## Risk Gate
200
324
 
@@ -239,6 +363,9 @@ When the agent submits evidence, the user-facing record should explain:
239
363
 
240
364
  The shape is intentionally open. OpenNori should preserve arbitrary source metadata instead of forcing
241
365
  all evidence through a narrow adapter taxonomy.
366
+ `evidence_health` audits that reviewability surface without forcing an adapter taxonomy: it warns
367
+ about missing sources, missing reviewability, missing limitations, stale timestamps, and broad batch
368
+ summaries.
242
369
 
243
370
  ## Agent Rule
244
371
 
@@ -253,13 +380,20 @@ On every turn:
253
380
  7. Show the draft acceptance criteria and ask the user to approve or revise them.
254
381
  8. After approval, run `opennori approve --root <repo> --summary "<approval>" --json`.
255
382
  9. If the user states required Skills, preferred stacks, avoided tools, install policy, or execution constraints, run `opennori profile add --root <repo> ... --json` and keep those items out of the user acceptance criteria.
256
- 10. If the user revises a criterion later, run `opennori criterion update --root <repo> --criterion <id> ... --json`; old evidence for the changed criterion is cleared.
257
- 11. If the user asks to upgrade an existing OpenNori project, run `opennori doctor`, preview and confirm `opennori upgrade`, then run `opennori check`; ask the user before revising any existing AC flagged by `acceptance_quality`.
258
- 12. Run `opennori resume --root <repo>` or `opennori next --root <repo>` to recover the active goal and current acceptance gap from repository files.
259
- 13. Work only to produce evidence for that gap.
260
- 14. Add acceptance evidence with `opennori evidence add`; choose any suitable verification method, but record basis, sources, reviewability, confidence, and limitations. Add profile compliance evidence with `opennori profile evidence` when profile items exist.
261
- 15. Run `opennori evaluate`.
262
- 16. Report acceptance state, profile compliance, and evidence, not implementation steps.
383
+ 10. For non-trivial goals, run `opennori architecture profiles --root <repo> --json`, preview a baseline, show it to the user, and confirm it before implementation.
384
+ 11. If the user provides a preferred architecture, add it with `opennori architecture profile --root <repo> --from <profile.json> --json` before previewing the baseline.
385
+ 12. Before implementing an acceptance gap, read `.opennori/architecture/baseline.md` and keep Product AC separate from Architecture Checks.
386
+ 13. Before self-building infrastructure, record a build-vs-buy decision.
387
+ 14. If project evidence conflicts with the baseline, run `opennori architecture challenge`; do not silently replace the baseline.
388
+ 15. If the user adds a new acceptance boundary after approval, run `opennori criterion add --root <repo> --id <id> ... --json`; the new criterion becomes an evidence gap without forcing the agent to edit state files manually.
389
+ 16. If the user revises a criterion later, run `opennori criterion update --root <repo> --criterion <id> ... --json`; old evidence for the changed criterion is cleared.
390
+ 17. If the user asks to update an existing OpenNori project, run `opennori doctor`, use `opennori upgrade --dry-run/--confirm` for manifest/protocol/guide refreshes, then run `opennori check`; ask the user before revising any existing AC flagged by `acceptance_review`. If packaged Plugin Skills are missing, reinstall or update the OpenNori package instead of copying Skills into the project.
391
+ 18. Run `opennori resume --root <repo>` or `opennori next --root <repo>` to recover the active goal and current acceptance gap from repository files.
392
+ 19. Work only to produce evidence for that gap under the confirmed Architecture Baseline.
393
+ 20. Add acceptance evidence with `opennori evidence add`; choose any suitable verification method, but record basis, sources, reviewability, confidence, and limitations. If existing evidence is invalid or obsolete, run `opennori evidence prune` first so stale proof does not occupy active context. Add profile compliance evidence with `opennori profile evidence` when profile items exist.
394
+ 21. Run `opennori evaluate`.
395
+ 22. Report acceptance state, profile compliance, and evidence, not implementation steps.
396
+ 23. If the goal is complete and the user asked to continue, review `next_recommendation.candidate_goals`, choose or refine the strongest human-facing next goal, then run discovery or draft for a new Nori Contract. Do not treat candidate goals as approved AC, phases, task lists, or evidence.
263
397
 
264
398
  Useful commands:
265
399
 
@@ -268,8 +402,10 @@ Useful commands:
268
402
  - `opennori draft --goal "<goal>" --root <repo>`: create a draft Nori Contract that needs user approval.
269
403
  - `opennori draft --from-brainstorm <brainstorm-id> --candidate <A|B|C> --root <repo>`: convert a selected brainstorm direction into a draft contract.
270
404
  - `opennori approve --root <repo>`: mark the acceptance basis as approved so completion can be decided.
405
+ - `opennori criterion add --root <repo> --id <id> ...`: add a newly confirmed acceptance boundary to the active contract and ledger.
271
406
  - `opennori criterion update --root <repo> --criterion <id> ...`: preserve a user revision as the new acceptance basis.
272
407
  - `opennori evidence add --root <repo> --criterion <id> --kind <kind> --summary "<summary>" --result <passing|failing|blocked|waived> --basis <basis> --source '<json-or-label>' --reviewability "<how to review>" --limitations "<known limits>"`: attach user-understandable, reviewable evidence without forcing a fixed adapter.
408
+ - `opennori evidence prune --root <repo> --criterion <id> --reason "<reason>"`: remove invalid or obsolete evidence from an active criterion so reports and context exports only carry current proof.
273
409
  - `opennori profile add --root <repo> --type <skill|stack|constraint> --name "<name>" --strength <must|prefer|avoid>`: record user execution preferences separately from ACs.
274
410
  - `opennori profile evidence --root <repo> --item <item-id> --result <satisfied|violated|waived>`: record whether the agent followed the profile.
275
411
  - `opennori profile show --root <repo>`: show profile compliance and blocking items.
@@ -277,7 +413,7 @@ Useful commands:
277
413
  - `opennori install --root <repo>`: create or refresh project-local OpenNori assets and manifest.
278
414
  - `opennori upgrade --root <repo>`: preview and refresh project-local OpenNori assets without rewriting active contracts or evidence.
279
415
  - `opennori doctor --root <repo>`: inspect project OpenNori health and recovery actions.
280
- - `opennori check --root <repo>`: validate active contract structure and audit active ACs for underspecified acceptance quality.
416
+ - `opennori check --root <repo>`: validate active contract structure, audit active ACs for underspecified acceptance quality, surface Architecture Baseline health for the active goal, and report evidence health.
281
417
  - `opennori resume --root <repo>`: recover the active goal, current gap, completion answer, and intervention state.
282
418
  - `opennori status --root <repo>`: answer whether the goal is complete and whether the user needs to act.
283
419
  - `opennori report --root <repo>`: generate the human acceptance report.