@mnstry/atelier 0.2.0-alpha.6 → 0.2.0-alpha.8

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 (374) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +59 -15
  3. package/SECURITY.md +6 -1
  4. package/contracts/atelier-adoption-policy.v1.schema.json +49 -0
  5. package/contracts/atelier-coauthor.v1.schema.json +163 -0
  6. package/contracts/atelier-decision-request.v1.schema.json +476 -0
  7. package/contracts/atelier-decision-result.v1.schema.json +500 -0
  8. package/contracts/atelier-guide.v1.schema.json +227 -0
  9. package/contracts/atelier-intake.v1.schema.json +151 -0
  10. package/contracts/atelier-migration.v2.schema.json +61 -0
  11. package/contracts/atelier-obsidian-acceptance-receipt.v1.schema.json +211 -0
  12. package/contracts/atelier-obsidian-apply-policy.v1.schema.json +298 -0
  13. package/contracts/atelier-obsidian-corpus-profile.v1.schema.json +98 -0
  14. package/contracts/atelier-obsidian-edit-operation.v1.schema.json +138 -0
  15. package/contracts/atelier-obsidian-ext-settings.v1.schema.json +287 -0
  16. package/contracts/atelier-obsidian-generation-manifest.v1.schema.json +353 -0
  17. package/contracts/atelier-obsidian-proposal-receipt.v1.schema.json +110 -0
  18. package/contracts/atelier-obsidian-publication-journal.v1.schema.json +167 -0
  19. package/contracts/atelier-obsidian-scope.v1.schema.json +264 -0
  20. package/contracts/atelier-obsidian-service-state.v1.schema.json +149 -0
  21. package/contracts/atelier-obsidian-source-snapshot.v1.schema.json +179 -0
  22. package/contracts/atelier-pane-presentation.v1.schema.json +76 -0
  23. package/contracts/atelier-presentation.v1.schema.json +1293 -0
  24. package/contracts/atelier-review.v1.schema.json +1601 -0
  25. package/contracts/atelier-skill-steward.v1.schema.json +692 -0
  26. package/contracts/atelier-upgrade-plan.v2.schema.json +398 -0
  27. package/contracts/atelier-upgrade-receipt.v1.schema.json +99 -0
  28. package/contracts/atelier-vault-publication.v1.schema.json +58 -0
  29. package/docs/assurance-controls.md +9 -1
  30. package/docs/atelier-sync.md +5 -4
  31. package/docs/blocks/claims.md +15 -10
  32. package/docs/blocks/will-not-do.md +4 -1
  33. package/docs/coauthor-session.md +57 -0
  34. package/docs/connected-composition.md +75 -0
  35. package/docs/decisions.md +167 -0
  36. package/docs/exact-upgrades.md +159 -0
  37. package/docs/extension-pack-lifecycle.md +33 -0
  38. package/docs/guided-upgrades.md +99 -0
  39. package/docs/install.md +65 -9
  40. package/docs/intake-and-guides.md +65 -0
  41. package/docs/integration-and-review-plan.md +409 -0
  42. package/docs/integration-contract-decisions.md +22 -0
  43. package/docs/local-review.md +84 -0
  44. package/docs/local-services.md +227 -0
  45. package/docs/local-state.md +107 -0
  46. package/docs/obsidian-contract.md +687 -0
  47. package/docs/obsidian.md +387 -0
  48. package/docs/portable-presentation.md +328 -0
  49. package/docs/presentation-consumer-boundaries.md +75 -0
  50. package/docs/presentation-review-disposition.md +47 -0
  51. package/docs/project-command-inventory.md +38 -0
  52. package/docs/project-options.md +53 -0
  53. package/docs/release-engineering.md +88 -0
  54. package/docs/review-portability.md +55 -0
  55. package/docs/skill-steward.md +156 -0
  56. package/docs/upgrade.md +55 -2
  57. package/docs/vault-service.md +292 -0
  58. package/fixtures/atelier-coauthor/invalid/authority.v1.json +5 -0
  59. package/fixtures/atelier-coauthor/valid/config.v1.json +12 -0
  60. package/fixtures/atelier-guide/invalid/authority.v1.json +11 -0
  61. package/fixtures/atelier-guide/valid/capability.v1.json +10 -0
  62. package/fixtures/atelier-guide/valid/consent.v1.json +11 -0
  63. package/fixtures/atelier-guide/valid/engagement.v1.json +7 -0
  64. package/fixtures/atelier-guide/valid/offer.v1.json +10 -0
  65. package/fixtures/atelier-intake/invalid/authority.v1.json +9 -0
  66. package/fixtures/atelier-intake/valid/attempt.v1.json +8 -0
  67. package/fixtures/atelier-intake/valid/completion.v1.json +9 -0
  68. package/fixtures/atelier-intake/valid/source.v1.json +7 -0
  69. package/fixtures/atelier-review/invalid/authenticated-identity.v1.json +22 -0
  70. package/fixtures/atelier-review/valid/bound.v1.json +229 -0
  71. package/fixtures/atelier-review/valid/bundle.v1.json +267 -0
  72. package/fixtures/atelier-review/valid/contribution.v1.json +22 -0
  73. package/fixtures/atelier-review/valid/lifecycle.v1.json +14 -0
  74. package/fixtures/atelier-skill-steward/audit/invalid/source-mutation.v1.json +26 -0
  75. package/fixtures/atelier-skill-steward/audit/valid/clean.v1.json +26 -0
  76. package/fixtures/atelier-skill-steward/candidates/invalid/workflow-key.v1.json +37 -0
  77. package/fixtures/atelier-skill-steward/candidates/valid/create.v1.json +37 -0
  78. package/fixtures/atelier-skill-steward/lock/invalid/bad-digest.v1.json +18 -0
  79. package/fixtures/atelier-skill-steward/lock/valid/installed.v1.json +23 -0
  80. package/fixtures/atelier-skill-steward/plan/invalid/delete-action.v1.json +33 -0
  81. package/fixtures/atelier-skill-steward/plan/valid/add.v1.json +33 -0
  82. package/fixtures/atelier-upgrade-transaction/adoption-policy/invalid/example.json +12 -0
  83. package/fixtures/atelier-upgrade-transaction/adoption-policy/valid/example.json +11 -0
  84. package/fixtures/atelier-upgrade-transaction/migration/invalid/example.json +20 -0
  85. package/fixtures/atelier-upgrade-transaction/migration/valid/example.json +19 -0
  86. package/fixtures/atelier-upgrade-transaction/upgrade-plan/invalid/example.json +58 -0
  87. package/fixtures/atelier-upgrade-transaction/upgrade-plan/valid/example.json +57 -0
  88. package/fixtures/atelier-upgrade-transaction/upgrade-receipt/invalid/example.json +15 -0
  89. package/fixtures/atelier-upgrade-transaction/upgrade-receipt/valid/example.json +14 -0
  90. package/fixtures/atelier-vault-publication/invalid/publication.json +5 -0
  91. package/fixtures/atelier-vault-publication/valid/publication.json +11 -0
  92. package/fixtures/decisions/request/invalid/unknown-authority.v1.json +61 -0
  93. package/fixtures/decisions/request/valid/triage.v1.json +60 -0
  94. package/fixtures/decisions/result/invalid/execution-authority.v1.json +50 -0
  95. package/fixtures/decisions/result/valid/abstained.v1.json +23 -0
  96. package/fixtures/decisions/result/valid/assessed.v1.json +50 -0
  97. package/fixtures/obsidian/acceptance/ap05-extra-notes.json +14 -0
  98. package/fixtures/obsidian/acceptance/receipts/G07.valid.v1.json +63 -0
  99. package/fixtures/obsidian/acceptance/receipts/G13.valid.v1.json +69 -0
  100. package/fixtures/obsidian/acceptance/receipts/G14.valid.v1.json +62 -0
  101. package/fixtures/obsidian/acceptance/receipts/G15.valid.v1.json +56 -0
  102. package/fixtures/obsidian/acceptance/receipts/G16.valid.v1.json +73 -0
  103. package/fixtures/obsidian/acceptance/receipts/G17.valid.v1.json +75 -0
  104. package/fixtures/obsidian/acceptance/receipts/G18.valid.v1.json +64 -0
  105. package/fixtures/obsidian/acceptance/service-sentinels.json +10 -0
  106. package/fixtures/obsidian/contracts/acceptance-receipt/invalid/duplicate-evidence-name.v1.json +39 -0
  107. package/fixtures/obsidian/contracts/acceptance-receipt/invalid/evidence-by-absolute-path.v1.json +34 -0
  108. package/fixtures/obsidian/contracts/acceptance-receipt/invalid/missing-candidate-tree.v1.json +33 -0
  109. package/fixtures/obsidian/contracts/acceptance-receipt/invalid/no-evidence.v1.json +28 -0
  110. package/fixtures/obsidian/contracts/acceptance-receipt/invalid/unknown-outcome.v1.json +34 -0
  111. package/fixtures/obsidian/contracts/acceptance-receipt/invalid/unknown-top-level-field.v1.json +35 -0
  112. package/fixtures/obsidian/contracts/acceptance-receipt/valid/node-gate.v1.json +34 -0
  113. package/fixtures/obsidian/contracts/apply-policy/invalid/automatic-without-edit-class.v1.json +27 -0
  114. package/fixtures/obsidian/contracts/apply-policy/invalid/conflict-overwrite.v1.json +29 -0
  115. package/fixtures/obsidian/contracts/apply-policy/invalid/missing-policy-digest.v1.json +28 -0
  116. package/fixtures/obsidian/contracts/apply-policy/invalid/unbounded-batch.v1.json +29 -0
  117. package/fixtures/obsidian/contracts/apply-policy/invalid/unimplemented-edit-class.v1.json +30 -0
  118. package/fixtures/obsidian/contracts/apply-policy/invalid/unknown-mode.v1.json +29 -0
  119. package/fixtures/obsidian/contracts/apply-policy/invalid/unknown-selector-operator.v1.json +22 -0
  120. package/fixtures/obsidian/contracts/apply-policy/invalid/unknown-top-level-field.v1.json +30 -0
  121. package/fixtures/obsidian/contracts/apply-policy/valid/automatic-scoped.v1.json +29 -0
  122. package/fixtures/obsidian/contracts/apply-policy/valid/manual-default.v1.json +20 -0
  123. package/fixtures/obsidian/contracts/corpus-profile/invalid/absolute-path-in-ext.v1.json +30 -0
  124. package/fixtures/obsidian/contracts/corpus-profile/invalid/absolute-repository-root.v1.json +27 -0
  125. package/fixtures/obsidian/contracts/corpus-profile/invalid/duplicate-repository-id.v1.json +27 -0
  126. package/fixtures/obsidian/contracts/corpus-profile/invalid/overlapping-managed-roots.v1.json +27 -0
  127. package/fixtures/obsidian/contracts/corpus-profile/invalid/unknown-enrollment.v1.json +27 -0
  128. package/fixtures/obsidian/contracts/corpus-profile/invalid/unknown-top-level-field.v1.json +28 -0
  129. package/fixtures/obsidian/contracts/corpus-profile/valid/three-repositories.v1.json +27 -0
  130. package/fixtures/obsidian/contracts/edit-operation/invalid/absolute-recovery-ref.v1.json +21 -0
  131. package/fixtures/obsidian/contracts/edit-operation/invalid/inline-observed-bytes.v1.json +22 -0
  132. package/fixtures/obsidian/contracts/edit-operation/invalid/missing-base-digest.v1.json +20 -0
  133. package/fixtures/obsidian/contracts/edit-operation/invalid/short-idempotency-key.v1.json +21 -0
  134. package/fixtures/obsidian/contracts/edit-operation/invalid/unknown-kind.v1.json +21 -0
  135. package/fixtures/obsidian/contracts/edit-operation/valid/pending-body-replacement.v1.json +21 -0
  136. package/fixtures/obsidian/contracts/ext-settings/invalid/absolute-path-prefix.v1.json +28 -0
  137. package/fixtures/obsidian/contracts/ext-settings/invalid/apply-policy-in-portable-settings.v1.json +30 -0
  138. package/fixtures/obsidian/contracts/ext-settings/invalid/duplicate-scope-id.v1.json +27 -0
  139. package/fixtures/obsidian/contracts/ext-settings/invalid/machine-local-vault-path.v1.json +28 -0
  140. package/fixtures/obsidian/contracts/ext-settings/invalid/service-port-in-portable-settings.v1.json +28 -0
  141. package/fixtures/obsidian/contracts/ext-settings/invalid/unknown-default-scope.v1.json +27 -0
  142. package/fixtures/obsidian/contracts/ext-settings/valid/disabled.v1.json +5 -0
  143. package/fixtures/obsidian/contracts/ext-settings/valid/enabled-with-scopes.v1.json +27 -0
  144. package/fixtures/obsidian/contracts/generation-manifest/invalid/absolute-note-path.v1.json +114 -0
  145. package/fixtures/obsidian/contracts/generation-manifest/invalid/complete-with-unwritten-notes.v1.json +114 -0
  146. package/fixtures/obsidian/contracts/generation-manifest/invalid/derived-link-claimed-declared.v1.json +114 -0
  147. package/fixtures/obsidian/contracts/generation-manifest/invalid/duplicate-note-identity.v1.json +114 -0
  148. package/fixtures/obsidian/contracts/generation-manifest/invalid/in-scope-endpoint-missing.v1.json +114 -0
  149. package/fixtures/obsidian/contracts/generation-manifest/invalid/title-only-note-path.v1.json +114 -0
  150. package/fixtures/obsidian/contracts/generation-manifest/invalid/unknown-note-field.v1.json +115 -0
  151. package/fixtures/obsidian/contracts/generation-manifest/invalid/unknown-relation-type.v1.json +114 -0
  152. package/fixtures/obsidian/contracts/generation-manifest/invalid/withheld-endpoint.v1.json +114 -0
  153. package/fixtures/obsidian/contracts/generation-manifest/valid/two-notes.v1.json +114 -0
  154. package/fixtures/obsidian/contracts/oracles/scope-cases.json +412 -0
  155. package/fixtures/obsidian/contracts/proposal-receipt/invalid/accepted-without-proposal-id.v1.json +12 -0
  156. package/fixtures/obsidian/contracts/proposal-receipt/invalid/missing-adapter-operation-id.v1.json +11 -0
  157. package/fixtures/obsidian/contracts/proposal-receipt/invalid/unknown-backpressure-outcome.v1.json +12 -0
  158. package/fixtures/obsidian/contracts/proposal-receipt/invalid/unknown-top-level-field.v1.json +13 -0
  159. package/fixtures/obsidian/contracts/proposal-receipt/valid/accepted-new.v1.json +12 -0
  160. package/fixtures/obsidian/contracts/proposal-receipt/valid/deferred.v1.json +12 -0
  161. package/fixtures/obsidian/contracts/publication-journal/invalid/absolute-recovery-ref.v1.json +47 -0
  162. package/fixtures/obsidian/contracts/publication-journal/invalid/duplicate-sequence.v1.json +47 -0
  163. package/fixtures/obsidian/contracts/publication-journal/invalid/empty-protocol-id.v1.json +47 -0
  164. package/fixtures/obsidian/contracts/publication-journal/invalid/missing-protocol-id.v1.json +46 -0
  165. package/fixtures/obsidian/contracts/publication-journal/invalid/unknown-entry-field.v1.json +48 -0
  166. package/fixtures/obsidian/contracts/publication-journal/invalid/unknown-state.v1.json +47 -0
  167. package/fixtures/obsidian/contracts/publication-journal/valid/committed.v1.json +47 -0
  168. package/fixtures/obsidian/contracts/publication-journal/valid/updating-after-restart.v1.json +22 -0
  169. package/fixtures/obsidian/contracts/scope/invalid/absolute-path-prefix.v1.json +15 -0
  170. package/fixtures/obsidian/contracts/scope/invalid/duplicate-ids.v1.json +18 -0
  171. package/fixtures/obsidian/contracts/scope/invalid/expansion-without-node-budget.v1.json +40 -0
  172. package/fixtures/obsidian/contracts/scope/invalid/full-mode-with-subset.v1.json +8 -0
  173. package/fixtures/obsidian/contracts/scope/invalid/unknown-mode.v1.json +41 -0
  174. package/fixtures/obsidian/contracts/scope/invalid/unknown-selector-key.v1.json +15 -0
  175. package/fixtures/obsidian/contracts/scope/invalid/unknown-selector-operator.v1.json +14 -0
  176. package/fixtures/obsidian/contracts/scope/invalid/unknown-top-level-field.v1.json +42 -0
  177. package/fixtures/obsidian/contracts/scope/valid/explicit-empty.v1.json +8 -0
  178. package/fixtures/obsidian/contracts/scope/valid/focus.v1.json +11 -0
  179. package/fixtures/obsidian/contracts/scope/valid/full.v1.json +8 -0
  180. package/fixtures/obsidian/contracts/scope/valid/scoped-set-expression.v1.json +41 -0
  181. package/fixtures/obsidian/contracts/service-state/invalid/hostname-instead-of-literal-loopback.v1.json +23 -0
  182. package/fixtures/obsidian/contracts/service-state/invalid/missing-consent.v1.json +18 -0
  183. package/fixtures/obsidian/contracts/service-state/invalid/privileged-port.v1.json +23 -0
  184. package/fixtures/obsidian/contracts/service-state/invalid/unknown-top-level-field.v1.json +24 -0
  185. package/fixtures/obsidian/contracts/service-state/invalid/wildcard-bind.v1.json +23 -0
  186. package/fixtures/obsidian/contracts/service-state/valid/healthy.v1.json +23 -0
  187. package/fixtures/obsidian/contracts/source-snapshot/invalid/absolute-file-path.v1.json +48 -0
  188. package/fixtures/obsidian/contracts/source-snapshot/invalid/duplicate-repository-id.v1.json +48 -0
  189. package/fixtures/obsidian/contracts/source-snapshot/invalid/mixed-read.v1.json +48 -0
  190. package/fixtures/obsidian/contracts/source-snapshot/invalid/parent-traversal-path.v1.json +48 -0
  191. package/fixtures/obsidian/contracts/source-snapshot/invalid/unknown-file-field.v1.json +49 -0
  192. package/fixtures/obsidian/contracts/source-snapshot/valid/two-repositories.v1.json +48 -0
  193. package/fixtures/obsidian/edits/workspace.json +65 -0
  194. package/fixtures/obsidian/materialization/expected-full.json +99 -0
  195. package/fixtures/obsidian/materialization/expected-scoped.json +39 -0
  196. package/fixtures/obsidian/materialization/workspace.json +54 -0
  197. package/fixtures/obsidian/proposals/expected-shapes.json +11 -0
  198. package/fixtures/ui/presentation/pane.v1.json +7 -0
  199. package/fixtures/ui/presentation/reference.v1.json +293 -0
  200. package/package.json +57 -6
  201. package/skills/claude/atelier-guided-coauthor/SKILL.md +49 -0
  202. package/skills/claude/atelier-guided-upgrade/SKILL.md +97 -0
  203. package/skills/claude/atelier-open/SKILL.md +5 -0
  204. package/skills/claude/atelier-skill-steward/SKILL.md +62 -0
  205. package/skills/claude/mnstry-readiness/SKILL.md +5 -0
  206. package/skills/codex/atelier-guided-coauthor/SKILL.md +49 -0
  207. package/skills/codex/atelier-guided-upgrade/SKILL.md +97 -0
  208. package/skills/codex/atelier-open/SKILL.md +5 -0
  209. package/skills/codex/atelier-skill-steward/SKILL.md +62 -0
  210. package/skills/codex/mnstry-readiness/SKILL.md +5 -0
  211. package/src/access/preview-enforcer.mjs +84 -0
  212. package/src/boundary/policy.mjs +57 -25
  213. package/src/cli/project-options.mjs +58 -0
  214. package/src/cli/run.mjs +43 -3
  215. package/src/coauthor/session.mjs +161 -0
  216. package/src/coauthor/store.mjs +173 -0
  217. package/src/collaboration/event-ledger.mjs +16 -33
  218. package/src/collaboration/inspection-bundle.mjs +223 -0
  219. package/src/collaboration/review-contracts.mjs +25 -0
  220. package/src/collaboration/review-store.mjs +305 -0
  221. package/src/commands/coauthor.mjs +26 -0
  222. package/src/commands/config.mjs +6 -1
  223. package/src/commands/extension-pack.mjs +15 -8
  224. package/src/commands/init.mjs +44 -5
  225. package/src/commands/obsidian.mjs +368 -0
  226. package/src/commands/review.mjs +147 -0
  227. package/src/commands/setup.mjs +51 -14
  228. package/src/commands/skills.mjs +199 -0
  229. package/src/commands/sync.mjs +8 -1
  230. package/src/composition/registry.mjs +27 -0
  231. package/src/composition/wire.mjs +122 -0
  232. package/src/contracts/corpus.mjs +29 -0
  233. package/src/decisions/contracts.d.mts +96 -0
  234. package/src/decisions/contracts.mjs +321 -0
  235. package/src/disclosure/content-scan.mjs +13 -0
  236. package/src/export/atelier-export-contract.mjs +16 -1
  237. package/src/extension-packs/lifecycle.mjs +154 -0
  238. package/src/graph/graph.mjs +64 -2
  239. package/src/graph/knowledge-graph.mjs +548 -24
  240. package/src/guides/contracts.mjs +54 -0
  241. package/src/intake/store.mjs +119 -0
  242. package/src/preview/channel.mjs +89 -0
  243. package/src/project/config.mjs +26 -27
  244. package/src/project/durable-state.mjs +161 -0
  245. package/src/project/file-class.mjs +166 -0
  246. package/src/project/private-state.mjs +11 -1
  247. package/src/projection/obsidian/contracts.mjs +571 -0
  248. package/src/projection/obsidian/edits/align.mjs +169 -0
  249. package/src/projection/obsidian/edits/apply.mjs +889 -0
  250. package/src/projection/obsidian/edits/arbitrate.mjs +414 -0
  251. package/src/projection/obsidian/edits/contribution.mjs +108 -0
  252. package/src/projection/obsidian/edits/index.mjs +19 -0
  253. package/src/projection/obsidian/edits/object-identity.mjs +61 -0
  254. package/src/projection/obsidian/edits/object-store.mjs +517 -0
  255. package/src/projection/obsidian/edits/observe.mjs +123 -0
  256. package/src/projection/obsidian/edits/policy.mjs +123 -0
  257. package/src/projection/obsidian/edits/regions.mjs +648 -0
  258. package/src/projection/obsidian/materialize/byte-lens.mjs +98 -0
  259. package/src/projection/obsidian/materialize/index.mjs +7 -0
  260. package/src/projection/obsidian/materialize/path-registry.mjs +105 -0
  261. package/src/projection/obsidian/materialize/prepare-view.mjs +746 -0
  262. package/src/projection/obsidian/materialize/settings.mjs +57 -0
  263. package/src/projection/obsidian/materialize/stage.mjs +27 -0
  264. package/src/projection/obsidian/proposals/adapter.mjs +572 -0
  265. package/src/projection/obsidian/proposals/backpressure.mjs +113 -0
  266. package/src/projection/obsidian/proposals/contribution.mjs +55 -0
  267. package/src/projection/obsidian/proposals/index.mjs +23 -0
  268. package/src/projection/obsidian/proposals/observation.mjs +216 -0
  269. package/src/projection/obsidian/proposals/queue.mjs +277 -0
  270. package/src/projection/obsidian/proposals/router.mjs +168 -0
  271. package/src/projection/obsidian/publication/bridge-script.mjs +266 -0
  272. package/src/projection/obsidian/publication/exchange.mjs +117 -0
  273. package/src/projection/obsidian/publication/index.mjs +5 -0
  274. package/src/projection/obsidian/publication/publisher.mjs +588 -0
  275. package/src/projection/obsidian/publication/test-seam.mjs +16 -0
  276. package/src/projection/obsidian/publication/transport.mjs +139 -0
  277. package/src/projection/obsidian/recovery/index.mjs +6 -0
  278. package/src/projection/obsidian/recovery/journal.mjs +134 -0
  279. package/src/projection/obsidian/recovery/late-writer.mjs +46 -0
  280. package/src/projection/obsidian/recovery/restart.mjs +316 -0
  281. package/src/projection/obsidian/recovery/store.mjs +234 -0
  282. package/src/projection/obsidian/selection-ui/conflict-view.mjs +91 -0
  283. package/src/projection/obsidian/selection-ui/contribution.mjs +141 -0
  284. package/src/projection/obsidian/selection-ui/focus.mjs +82 -0
  285. package/src/projection/obsidian/selection-ui/index.mjs +12 -0
  286. package/src/projection/obsidian/selection-ui/policy-setup.mjs +107 -0
  287. package/src/projection/obsidian/selection-ui/receipt.mjs +173 -0
  288. package/src/projection/obsidian/selection-ui/selection-state.mjs +122 -0
  289. package/src/projection/obsidian/selection-ui/selection.mjs +109 -0
  290. package/src/projection/project.mjs +28 -19
  291. package/src/readiness-protocols/evidence.mjs +282 -0
  292. package/src/readiness-protocols/runtime.mjs +4 -3
  293. package/src/readiness-protocols/source-read.mjs +39 -0
  294. package/src/runtime/obsidian/app-capability.mjs +110 -0
  295. package/src/runtime/obsidian/app-production-seams.mjs +96 -0
  296. package/src/runtime/obsidian/contributions/proposal-adapter.mjs +4 -0
  297. package/src/runtime/obsidian/contributions/selection-ui.mjs +4 -0
  298. package/src/runtime/obsidian/contributions/source-apply.mjs +4 -0
  299. package/src/runtime/obsidian/contributions.mjs +27 -0
  300. package/src/runtime/obsidian/documents.mjs +37 -0
  301. package/src/runtime/obsidian/enablement.mjs +53 -0
  302. package/src/runtime/obsidian/engine.mjs +532 -0
  303. package/src/runtime/obsidian/errors.mjs +14 -0
  304. package/src/runtime/obsidian/extension-points.mjs +103 -0
  305. package/src/runtime/obsidian/index.mjs +34 -0
  306. package/src/runtime/obsidian/lifecycle.mjs +258 -0
  307. package/src/runtime/obsidian/machine-settings.mjs +260 -0
  308. package/src/runtime/obsidian/observation.mjs +158 -0
  309. package/src/runtime/obsidian/opening.mjs +243 -0
  310. package/src/runtime/obsidian/pending-edits.mjs +141 -0
  311. package/src/runtime/obsidian/pipeline.mjs +122 -0
  312. package/src/runtime/obsidian/private-lock.mjs +156 -0
  313. package/src/runtime/obsidian/process-identity.mjs +58 -0
  314. package/src/runtime/obsidian/service-client.mjs +66 -0
  315. package/src/runtime/obsidian/service-main.mjs +89 -0
  316. package/src/runtime/obsidian/service-record.mjs +169 -0
  317. package/src/runtime/obsidian/service-server.mjs +121 -0
  318. package/src/runtime/obsidian/service.mjs +216 -0
  319. package/src/runtime/obsidian/startup-adapters.mjs +87 -0
  320. package/src/runtime/obsidian/state-store.mjs +180 -0
  321. package/src/runtime/obsidian/sync-notice.mjs +33 -0
  322. package/src/runtime/obsidian/tick-loop.mjs +84 -0
  323. package/src/runtime/obsidian/watchers.mjs +36 -0
  324. package/src/runtime/supervisor.mjs +16 -1
  325. package/src/server/local-sidecar.mjs +44 -0
  326. package/src/server/server.mjs +1 -0
  327. package/src/skills/steward.mjs +780 -0
  328. package/src/ui/presentation/browser.mjs +278 -0
  329. package/src/ui/presentation/contract.mjs +116 -0
  330. package/src/ui/presentation/index.mjs +7 -0
  331. package/src/ui/presentation/native.mjs +153 -0
  332. package/src/ui/presentation/proof.mjs +57 -0
  333. package/src/ui/presentation/schema-check.mjs +30 -0
  334. package/src/ui/presentation/schema.generated.mjs +1371 -0
  335. package/src/ui/presentation/state.mjs +43 -0
  336. package/src/ui/presentation/styles.mjs +67 -0
  337. package/src/ui/presentation/tokens.mjs +74 -0
  338. package/src/ui/presentation/web.mjs +85 -0
  339. package/src/ui/review-page.mjs +32 -0
  340. package/src/upgrade/explanation.mjs +33 -0
  341. package/src/upgrade/provenance.mjs +338 -0
  342. package/src/upgrade/transaction-files.mjs +103 -0
  343. package/src/upgrade/transaction.mjs +475 -0
  344. package/src/upgrade/upgrade.mjs +63 -28
  345. package/src/vault/hosts.mjs +21 -0
  346. package/src/vault/identity.mjs +19 -0
  347. package/src/vault/index.mjs +7 -0
  348. package/src/vault/interface.mjs +11 -0
  349. package/src/vault/metadata.mjs +31 -0
  350. package/src/vault/privacy.mjs +148 -0
  351. package/src/vault/probe.mjs +89 -0
  352. package/src/vault/service.mjs +131 -0
  353. package/src/vault/source.mjs +45 -0
  354. package/src/vault/storage.mjs +23 -0
  355. package/templates/distribution-workspace/.claude/launch.json +6 -2
  356. package/templates/distribution-workspace/gitignore +1 -0
  357. package/templates/distribution-workspace/project/README.md +2 -2
  358. package/templates/external-project-workspace/README.md +45 -0
  359. package/templates/external-project-workspace/answers.example.json +4 -0
  360. package/templates/external-project-workspace/atelier.project.json +40 -0
  361. package/templates/external-project-workspace/boundary-policy.v1.json +60 -0
  362. package/templates/external-project-workspace/gitignore +8 -0
  363. package/templates/external-project-workspace/pack-lifecycle.json +14 -0
  364. package/templates/external-project-workspace/packs/protocols/contract-gate.v1.json +109 -0
  365. package/templates/external-project-workspace/packs/sample-pack.v1.json +48 -0
  366. package/templates/external-project-workspace/repo-access.v1.json +9 -0
  367. package/templates/external-project-workspace/source/README.md +11 -0
  368. package/templates/launch.json +6 -2
  369. package/templates/private-domain-workspace/.claude/launch.json +6 -2
  370. package/templates/private-domain-workspace/domain/README.md +2 -2
  371. package/templates/private-domain-workspace/gitignore +1 -0
  372. package/templates/shared-project-workspace/.claude/launch.json +6 -2
  373. package/templates/shared-project-workspace/gitignore +1 -0
  374. package/templates/shared-project-workspace/project/README.md +2 -2
package/docs/install.md CHANGED
@@ -17,6 +17,10 @@ Git repository access is the hard read boundary for source files. Local
17
17
  `kg.audience` labels guide projection and review, but they do not hide files
18
18
  from anyone who can read the repository.
19
19
 
20
+ For adapters whose source repositories live elsewhere, see
21
+ [project options](project-options.md) for shared CLI overrides, precedence and
22
+ resolution diagnostics. Moving a repository does not change its read authority.
23
+
20
24
  Two command forms ship, and each has a place. Inside an installed
21
25
  workspace, use `atelier` — it resolves from `node_modules/.bin`, so npm
22
26
  scripts and workspace shells get the real binary. From outside a
@@ -30,19 +34,19 @@ The registry is the distribution channel of record, as `docs/continuity.md`
30
34
  commits:
31
35
 
32
36
  ```bash
33
- npm install --save-dev @mnstry/atelier@0.2.0-alpha.6
37
+ npm install --save-dev @mnstry/atelier@0.2.0-alpha.8
34
38
  ```
35
39
 
36
40
  Installing from the matching Git tag resolves to the same reviewed commit:
37
41
 
38
42
  ```bash
39
- npm install --save-dev "git+https://github.com/MNSTRY/atelier.git#v0.2.0-alpha.6"
43
+ npm install --save-dev "git+https://github.com/MNSTRY/atelier.git#v0.2.0-alpha.8"
40
44
  ```
41
45
 
42
46
  Or over SSH:
43
47
 
44
48
  ```bash
45
- npm install --save-dev "git+ssh://git@github.com/MNSTRY/atelier.git#v0.2.0-alpha.6"
49
+ npm install --save-dev "git+ssh://git@github.com/MNSTRY/atelier.git#v0.2.0-alpha.8"
46
50
  ```
47
51
 
48
52
  Keep the `@mnstry/` scope — see the command-form note above for why the
@@ -121,17 +125,60 @@ atelier init --template shared-project --target ./project-alpha --actor tenant-u
121
125
 
122
126
  `--actor` rewrites the copied boundary policy actor entry and binds it to the
123
127
  local Git email when available. Use `--github-login` or `--git-email` to set
124
- those values explicitly during onboarding. At check time, a declared actor is
125
- resolved in this order: recognized `--actor`/`MNSTRY_ATELIER_ACTOR`/
126
- `GITHUB_ACTOR`, configured Git email, then a reviewed `gh api user` fallback.
127
- An explicit value that is not declared in the policy does not authenticate an
128
- actor and therefore does not suppress later resolution attempts.
128
+ those values explicitly during onboarding. Initialization does not infer a
129
+ GitHub login from the environment or actor slug; without `--github-login` it
130
+ retains an actor-specific placeholder. At check time, explicit selectors are validated even for shared-only work.
131
+ Unknown `--actor`/`MNSTRY_ATELIER_ACTOR` values or conflicting explicit selectors
132
+ are always errors. Boundary ownership is scoped to configured repository names;
133
+ these names do not authenticate a checkout's identity. Duplicate configured names
134
+ are refused case-insensitively.
135
+
136
+ Derived attribution is needed only when the project operates a private-domain
137
+ repository with a declared owner. Shared-only checks skip platform, Git-email and
138
+ `gh` lookup entirely. When ownership requires attribution, precedence is:
139
+
140
+ | Input | Result |
141
+ | --- | --- |
142
+ | `--actor` or `MNSTRY_ATELIER_ACTOR` | Must name one declared actor; wins over derived inputs. |
143
+ | `GITHUB_ACTOR` | Must uniquely match a declared `githubLogin`, case-insensitively. Unmapped/ambiguous values do not fall through. Actor keys and login placeholders are not login mappings. |
144
+ | Configured Git email | Used only without either input above; must map to one actor. Commit history is never used. |
145
+ | Optional `gh api user` | Used only when the inputs above are absent or configured email has no match; must uniquely match a declared login. Sync disables this lookup. |
146
+
147
+ Unresolved derived attribution and ownership mismatches are errors in strict
148
+ mode and warnings in ordinary `legacy-warning` mode. Sync forces ownership errors
149
+ in both modes. Reports retain the resolution reason and affected repository.
150
+ `allowHistoryActorResolution` is a deprecated, accepted no-op: setting it to true
151
+ never enables history-based attribution. These are attribution hints, not
152
+ authenticated authorization. In particular `GITHUB_ACTOR` describes the supplied
153
+ platform value, not an authenticated human operating a phone or a workflow rerun.
154
+ Shared-host deployment must establish its own trusted identity boundary.
155
+
156
+ `init` refuses existing scaffold files or an existing project/lock; use `adopt`
157
+ for existing content and `upgrade` for managed changes. Adoption validates the
158
+ proposed or retained project and its selected policy before writing any scaffold
159
+ or local state, preserves existing locks, and
160
+ refuses drift rather than reporting success. Choose and install the intended
161
+ package before adoption. Preview configs resolve `@mnstry/atelier/cli` from the
162
+ workspace through parent `node_modules` directories using Node, without registry
163
+ fallback. This supports the documented subdirectory target and hoisted install.
164
+ Generate `graph` and `project` output before starting the preview. Existing launch
165
+ configs are not rewritten by these template changes. Append server arguments
166
+ following a `--` separator after the configured Node arguments. The host process
167
+ lifecycle still needs qualification before relying on preview restarts.
168
+
169
+ Upgrade planning and application use the same optional `gh api user` fallback
170
+ as ordinary boundary checks. Supply a valid explicit selector or mapped identity
171
+ to avoid this lookup; Sync disables it.
172
+
173
+ The generated manifest's `graphPath` is relative to its output directory. Readers
174
+ of older manifests should continue accepting absolute paths; resolve relative
175
+ values against the directory containing `atelier.manifest.json`.
129
176
 
130
177
  Then update:
131
178
 
132
179
  - `atelier.project.json` repo paths.
133
180
  - `repo-access.v1.json` read boundaries.
134
- - `atelier.lock.json` with `atelier lock write` after choosing the exact Atelier package source.
181
+ - `atelier.lock.json`: inspect `atelier lock check`; use the reviewed upgrade path for a changed package or policy rather than silently rewriting the baseline.
135
182
  - README placeholders for project names and Git remotes.
136
183
 
137
184
  Keep project configuration tracked and local overlay state ignored. Track
@@ -165,3 +212,12 @@ smoke-test tools; they are not the default install path.
165
212
 
166
213
  See `docs/tenant-readiness.md` for the readiness review format and
167
214
  `docs/upgrade.md` for the full upgrade flow and boundary review checklist.
215
+
216
+ ## External source adapters and local review
217
+
218
+ Use `atelier init --template external-project --target NEW_DIRECTORY` for the
219
+ invented adapter/source starter. See [local review](local-review.md) for the
220
+ complete installed workflow, source ownership, asserted identity and save/resume.
221
+ `atelier lock provenance` distinguishes declared install origin, observed package
222
+ bytes and verified clean-checkout binding. It never substitutes the consumer
223
+ repository's HEAD for the installed package.
@@ -0,0 +1,65 @@
1
+ # Immutable intake and guide integration
2
+
3
+ ## Keep source, extraction and meaning separate
4
+
5
+ `@mnstry/atelier/intake` supplies a bounded local integrity store for existing
6
+ extractors. It does not select or run a processor, install dependencies, import
7
+ an entire corpus, upload data, or accept semantic claims.
8
+
9
+ Create the store in a Git workspace whose `.atelier-local/` is ignored and
10
+ untracked. Ingest a visible relative source file against an expected SHA-256.
11
+ The store copies verified bytes, checks the source again, and writes an immutable
12
+ provenance record. Identical bytes from different source paths retain separate
13
+ records. Original files are never moved, rewritten or removed.
14
+
15
+ Begin an attempt using an explicit identifier, verified blob digest, extractor
16
+ identity/version and configuration digest. Retrying the identical attempt is
17
+ idempotent; changing its identity is refused. Complete it with bounded UTF-8
18
+ output and its expected digest. Output is written and checked before completion.
19
+ An interrupted or conflicting output is preserved, never overwritten; inspect
20
+ it and use a new attempt identifier for a changed run. An occupied operation lock
21
+ requires recovery inspection. A completion receipt proves byte integrity only:
22
+ semantic acceptance remains pending. Read completion through the store to verify
23
+ its attempt, output and source blob again.
24
+
25
+ The current per-file/output ceiling is 16 MiB. Larger media stay in existing
26
+ bounded processing tools; do not split or downsample originals silently. This
27
+ adapter does not promise aggregate disk quota, malware isolation, cross-host
28
+ locking, backup, or a Windows qualification. Consumers retain conversation branch
29
+ structure, missing-asset evidence, and format-specific completeness checks.
30
+ Do not flatten a conversation export merely to satisfy a text-output API.
31
+ Packet authoring can proceed before corpus ingestion.
32
+
33
+ ## Guides and private implementations
34
+
35
+ `@mnstry/atelier/guides` and the guide schema define portable offers, inert
36
+ remote capability descriptors, local engagement transitions and exact-payload
37
+ consent assessment. Offers identify the guide and capabilities; engagement can
38
+ be accepted, paused, resumed or irrevocably revoked. An updated offer requires
39
+ a newly bound engagement. Deliverable acceptance remains an explicit human step.
40
+ Commercial terms, booking, billing and provider enrollment remain consumer-owned.
41
+
42
+ Descriptors contain schema digests and a service reference, not executable code,
43
+ private instructions or credentials. Do not place sensitive prose in a local
44
+ skill, blueprint, manifest, bundle or model context and expect it to remain hidden.
45
+ A proprietary implementation must stay behind a separately operated service.
46
+ The local harness can call an authenticated remote MCP tool through its configured
47
+ host; installing this package neither configures MCP nor makes that connection.
48
+
49
+ Consent binds the canonical JSON payload, exact offer and capability, engagement
50
+ revision and a validity interval. Changing any binding requires new consent.
51
+ Revoked/paused engagements and expired consent are refused by local assessment.
52
+ Even a positive result is only `eligible-for-host-validation`, never execution
53
+ authority. These are unsigned local assertions, not authenticated approvals.
54
+
55
+ A production host must authenticate guide and author, enforce tenant isolation
56
+ and current entitlements/revocation server-side, validate the real schemas, show
57
+ exact outbound disclosure and cost, acquire current authorization, and verify
58
+ the returned output before proposing a local change. Never send private inputs
59
+ just because a descriptor or saved consent says to. Outputs remain untrusted
60
+ proposals and cannot publish, edit canonical sources or grant permissions.
61
+
62
+ No remote executor, endpoint, credential store, scheduling, billing, browser
63
+ editor or network behavior is added here. Codex Desktop remains the conversation
64
+ surface; the local packet and durable drafts remain independently usable when
65
+ the hosted service is unavailable.
@@ -0,0 +1,409 @@
1
+ # External-project integration and human review implementation plan
2
+
3
+ Status: local implementation candidate. See the feature guides for implemented behavior; final source-bound review, release and human acceptance remain separate gates.
4
+ Baseline: `58895eafbd980ae131d8c5f2d1882ac34f5c08b9`, tree `72f06c2aa8183f93dc2b49066a5c4e55d1c2f336`.
5
+
6
+ <!-- mnstry-review-request: atelier-integration-plan-r1 gate: plan-readiness -->
7
+ <!-- mnstry-review-workflow: atelier-integration-plan-fable-low-r3 gate: plan-readiness stage: planning -->
8
+
9
+ ## Outcome and authority
10
+
11
+ A domain owner can connect an established repository through a bounded adapter,
12
+ run its declared method, inspect proposed claims and their evidence, retain
13
+ individual review decisions, and resume without losing authorship or historical
14
+ meaning. Canon stays in the domain repository. The root supplies generic
15
+ contracts, validators, local review behavior, templates, and synthetic proof.
16
+
17
+ Implementation is authorized as local pre-production work. This plan introduces
18
+ no publication, remote deployment, collaborator enrollment, remote access,
19
+ automatic canonical writes, or member/tenant activation. Approval of a proposal
20
+ does not authorize publication, runtime admission, or consent changes. Existing
21
+ consumer reading and meeting workflows do not depend on this full programme.
22
+
23
+ All fixtures must be independently invented. Do not copy private correspondence,
24
+ domain names, vocabulary, methods, information architecture, or operational
25
+ details into this repository. Review packets and implementation branches must
26
+ respect the same boundary.
27
+
28
+ ## Baseline findings and evidence
29
+
30
+ 1. `src/project/config.mjs` resolves repository paths in this order: CLI
31
+ `--repo-path`, ignored local overlay, tracked relative path, sibling discovery.
32
+ Discovery checks the declared remote when supplied. Command resolution also
33
+ ensures local state, so describe its possible filesystem writes accurately.
34
+ 2. `src/commands/extension-pack.mjs` has a separate option allowlist that rejects
35
+ `--repo-path` before `commandProject()` executes. Reproduction on Node 22.18.0:
36
+ `node bin/atelier.mjs extension-pack list --repo-path=sample=.`.
37
+ 3. `src/upgrade/upgrade.mjs:packageSource()` captures HEAD only when the installed
38
+ package directory is itself the Git top-level. Repository metadata without
39
+ that checkout becomes `private_github` with a null SHA. The lock schema already
40
+ permits `gitSha`; repository metadata alone cannot prove installation type.
41
+ 4. `src/collaboration/proposals.mjs`, `src/collaboration/event-ledger.mjs`, and
42
+ `src/server/local-sidecar.mjs` provide review records, concurrency machinery,
43
+ and proposal pages. Readiness proposals currently carry claims as JSON.
44
+ 5. `src/readiness-protocols/runtime.mjs:evaluateProtocolAnswers()` measures
45
+ required-answer presence. `claimsForProtocolRun()` assigns 0.7 or 0.2 based on
46
+ whether any answer is present, and references a run rather than specific
47
+ supporting source evidence. Neither is calibrated evidence confidence.
48
+ 6. `atelier-claim@v1` fixes `status: proposed` and `promoted: false`.
49
+ `atelier-readiness-run@v1` identifies a protocol but does not itself establish
50
+ a complete source/pack/evaluator snapshot for historical reproduction.
51
+ 7. Existing distribution/private-domain/shared-project templates, normative
52
+ audience guidance, extension pack versions/digests and migration declarations
53
+ provide foundations. They do not constitute a demonstrated end-to-end
54
+ external-project review experience.
55
+
56
+ These are bounded source observations, not an exhaustive implementation review.
57
+ Other branches are not assumed landed. Refresh main and reconcile owner changes
58
+ before each implementation stage.
59
+
60
+ ## Design decisions for the first implementation
61
+
62
+ - Reuse the proposal ledger and local sidecar; do not create a second review
63
+ database or weaken their current authentication, origin, CSRF, path, private
64
+ file, or concurrency controls. Validate reusable fit before adding UI.
65
+ - Preserve immutable v1 claim records. Add a separate versioned review-decision
66
+ contract and derived views. Authoritative new semantics belong in a real
67
+ contract, not in an unvalidated `ext` member that old consumers ignore.
68
+ - Acceptance prepares an explicit change proposal for the source owner. The
69
+ source owner applies it through its own workflow. No automatic apply action.
70
+ - Initially make portable bundles inspection-only. Imported review decisions
71
+ remain attributed historical assertions, never current local approval.
72
+ - Preserve local-only defaults. Export is an explicit local operation, not sync
73
+ or upload. A later encrypted bundle must identify its recipient and selected
74
+ disclosure scope without exposing private content in logs.
75
+ - Preserve established CLI aliases and exit codes unless a documented,
76
+ versioned change is unavoidable. No new runtime dependency is assumed.
77
+ - External-project is an architecture pattern, not an instruction to use
78
+ `repos[].kind: external`: that kind is unmanaged and supplies no read boundary.
79
+ The adapter must explicitly declare the actual read authority and allowed refs.
80
+
81
+ ## Work packages and dependency order
82
+
83
+ ### W0 — Baseline, ownership, contracts, and plan disposition
84
+
85
+ Own an isolated root worktree; keep the ordinary checkout and other writers
86
+ untouched. Record base SHA/tree, clean status, current branch work and any
87
+ overlapping unlanded changes. Resolve overlap through evidence and the source
88
+ owner before editing the same boundary. Never import sibling private data.
89
+
90
+ Disposition every plan finding as accepted, rejected with evidence, or deferred
91
+ with a bounded reason. Blocking design findings precede dependent implementation.
92
+ Prepare a contract compatibility decision for each new schema and public API.
93
+ Do not silently widen existing v1 contracts or rewrite historical runs.
94
+
95
+ For every proposed artifact, record reuse, compatible extension, or a separate
96
+ versioned contract with its reason. Inventory existing JCS, attestation,
97
+ support-preview/disclosure, export and migration facilities before adding new
98
+ machinery. Shared hashing or validation does not imply shared artifact semantics.
99
+ Resolve claim-decision aggregate identity, required concurrency version,
100
+ idempotency and full-history retention before implementing the review endpoint.
101
+ Legacy proposal readers must never encounter new event types in their proposal
102
+ aggregates; prove compatibility against the actual pre-change reader.
103
+
104
+ ### W1 — Shared project options and transparent resolution
105
+
106
+ Files: `src/project/config.mjs`, `src/cli/`, all project-aware command entry
107
+ points in `src/commands/`, command help, project/config tests.
108
+
109
+ Inventory commands first: classify project-aware versus standalone commands,
110
+ direct-module versus wrapper entry, accepted aliases, environment inputs, and
111
+ side effects. Introduce a shared option definition/parser for project location
112
+ and repo overrides. Unknown command-specific options still fail; a shared
113
+ parser must not accept every argument everywhere. Keep both `--flag=value` and
114
+ `--flag value`, repeated named overrides, missing values, and malformed entries
115
+ explicit. Choose and document duplicate override behavior from current callers.
116
+
117
+ Document precedence and provide resolution diagnostics showing logical repo,
118
+ resolution source, and declared identity without leaking machine paths in
119
+ portable output. Preserve required-repo failure and all boundary validation.
120
+ Test each command family against a moved two-repository fixture, both through
121
+ the published CLI and an invented wrapper. Include missing/malformed values,
122
+ unresolved required repos, identity mismatch, and unchanged read scope.
123
+
124
+ ### W2 — Installed-package provenance
125
+
126
+ Files: `src/upgrade/upgrade.mjs`, lock tests, consumer/distribution smoke,
127
+ `docs/install.md`, `docs/upgrade.md`; schema change only if the compatibility
128
+ decision requires it.
129
+
130
+ Distinguish installed package source from consumer-project source. For a Git
131
+ checkout use its own commit plus dirty-state qualification. For an npm Git
132
+ dependency inspect supported install-lock metadata and match the exact package
133
+ instance, including nested installs and workspace/symlink resolution; never
134
+ borrow the consumer repo HEAD or trust a URL/ref as an immutable commit.
135
+ Registry/tarball installs record available integrity/provenance without inventing
136
+ a Git SHA. Define metadata precedence and refuse conflicting provenance.
137
+
138
+ Distinguish a declared install origin, observed installed-byte identity, and
139
+ verified source binding. Lock metadata alone is a declaration. An installed-tree
140
+ digest can detect change against a trusted earlier inventory, but cannot prove
141
+ that the declared commit produced those bytes. Define the inventory, links,
142
+ excluded generated files and trust anchor before claiming exact source. A clean
143
+ checkout establishes its tracked commit only; separately account for untracked,
144
+ ignored or generated files that may affect execution. An exact-source check
145
+ must refuse an unverified binding even when a locally recorded digest matches.
146
+
147
+ Keep historical locks readable. Report legacy/unresolved provenance explicitly;
148
+ an exact-source-required check must fail for unresolved or dirty source. A
149
+ missing Git SHA must not imply private Git origin. Never write credential-bearing
150
+ remote URLs into locks or logs. Test local Git dependency installation with Git
151
+ metadata stripped, tagged/branch inputs, registry-shaped and tarball fixtures,
152
+ multiple package instances, symlinks, dirty checkout and contradictory metadata.
153
+ Use local synthetic repositories and package archives; no registry/network test
154
+ is required to prove these cases.
155
+ Include a declared Git revision with modified installed bytes, and verify that
156
+ neither the declaration nor a newly computed digest reports verified origin.
157
+
158
+ ### W3 — Official external-project starter and audience guidance
159
+
160
+ Files: `templates/`, `src/commands/setup.mjs` or existing setup owner,
161
+ `docs/install.md`, `docs/distributions.md`, `docs/blocks/audience-visibility.md`,
162
+ template and consumer smoke tests.
163
+
164
+ Compose existing templates into an invented two-repository example with project
165
+ config, bounded source contract, strict policy, namespaced pack, synthetic
166
+ protocol/answers, local-state exclusions, and documented validation commands.
167
+ No proprietary domain shape may be used as the fixture scaffold. Configuration
168
+ must state which repository owns facts, proposed changes, run state and outputs.
169
+
170
+ Reference and compose existing CI, consumer-smoke and distribution-smoke paths
171
+ for graph, pack, boundary, readiness and lock proof; add only missing coverage
172
+ under the current execution policy. Documentation does not dispatch CI.
173
+ Setup refuses overwrite and unsafe destination paths. Inspect and test
174
+ reference traversal, symlinks and path escape using existing defensive controls.
175
+ Make source audience, review acceptance, publication eligibility and runtime
176
+ visibility separate in the starter and review copy. A public source is not a
177
+ publication consent or runtime access grant.
178
+
179
+ ### W4 — Evidence-bound runs and honest evaluation
180
+
181
+ Files: `src/readiness-protocols/runtime.mjs`, affected contracts, validators,
182
+ readiness CLI/renderers and tests.
183
+
184
+ Separate input completeness, executable rule checks, unresolved evidence,
185
+ human judgment and runtime readiness. Preserve the legacy score as documented
186
+ input completeness; do not silently change the meaning of old results. New
187
+ claims omit unsupported confidence or explicitly identify the method and its
188
+ limits. No calibrated confidence claim without a defined evaluation dataset.
189
+ Apply these distinctions to rendered labels, examples and screenshots as well
190
+ as stored fields. A completed answer form must never appear to establish
191
+ evidence strength, human acceptance or runtime readiness.
192
+ Inventory the run, journey, packet and summary surfaces together. Preserve
193
+ legacy field/status meanings where contracts require them, and explain them in
194
+ the view rather than silently changing existing status literals.
195
+
196
+ Bind each new run to exact relevant source revisions/content digests, bounded
197
+ reference set, answers digest, protocol digest/version, pack digest/version,
198
+ evaluator identity and applicable policy digest. Reuse `src/attestation/jcs.mjs`
199
+ for canonical JSON and specify the byte/hash envelope. Evidence digests must identify the content
200
+ actually read; a clean repository HEAD alone is insufficient for dirty sources.
201
+ Do not create a timing gap between inspected bytes and recorded identity.
202
+
203
+ Show field-level evidence links for mapped claims, missing evidence and unresolved
204
+ references. Separate source-backed assertions from an operator's recorded answer.
205
+ Historical v1 runs remain readable but are labeled provenance-incomplete. New
206
+ source/protocol/policy changes invalidate current eligibility for affected reviews
207
+ without changing old records. Test changed source, dirty source, changed pack,
208
+ policy change, absent evidence, migration and deterministic replay under pinned
209
+ inputs; timestamps/run IDs need not match for semantic replay.
210
+ The current run ID hashes project name, protocol ID, normalized answers and
211
+ time; it does not bind protocol content, source bytes, pack or policy. It may
212
+ identify a historical run but cannot replace evidence binding or justify moving
213
+ current decision eligibility ahead of this prerequisite. Revalidate the bound
214
+ evidence inside the decision mutation, not solely when rendering its form.
215
+
216
+ ### W5 — Structured claim decisions and owner handoff
217
+
218
+ Files: `src/collaboration/`, proposal rendering modules located from sidecar
219
+ imports, `src/server/local-sidecar.mjs`, new review contract and tests.
220
+
221
+ Render subject/predicate/object with readable labels, original IDs, evidence
222
+ excerpts/links within the read boundary, limitations, conflict indicators,
223
+ source/run identity, and current decision eligibility. Accept, reject and revise
224
+ operate per claim with reviewer attribution, rationale and an exact expected
225
+ revision. Required optimistic concurrency checks must apply at the mutation
226
+ boundary, not just the UI. Explicitly describe local asserted identity versus
227
+ authenticated reviewer identity; typed names alone do not prove human approval.
228
+ Record and render an explicit local-asserted identity kind. Require a client
229
+ decision ID and expected aggregate version; an identical retry returns the
230
+ existing decision, while reuse of the ID with different content fails.
231
+
232
+ The rendered acceptance check must let a reader identify the proposed change,
233
+ its rationale, supporting evidence, uncertainty or conflicts, intended effect
234
+ of acceptance, and the person or source workflow authorized to apply it.
235
+ An identifier or an accept button alone does not satisfy this check.
236
+
237
+ Revision creates a linked successor rather than overwriting the original claim.
238
+ Decisions are separate append-only records with verifiable links to claim and
239
+ evidence identity. Retries are idempotent. A change during review refuses stale
240
+ acceptance. Crash recovery reconstructs views from the ledger without silently
241
+ losing or duplicating decisions. Bulk review is not part of the first slice.
242
+ New decisions use distinct aggregates and a versioned contract, sharing proven
243
+ persistence primitives without inserting unsupported events into legacy proposal
244
+ aggregates. Define retention that preserves every decision: current generic
245
+ compaction keeps only selected events, so a latest-state checkpoint alone is
246
+ not a complete decision audit history. Test compaction beyond count/time limits,
247
+ replay, and the old proposal reader against the resulting store.
248
+
249
+ An accepted decision creates a reviewable owner handoff showing intended source
250
+ edits, affected IDs and required source revision. It grants no canonical write,
251
+ publication or runtime capability. Promotion status is shown only from a
252
+ separate source-owner receipt; absent receipt means not established.
253
+ Evaluate `git-promote-event@v1` for actual cross-repository disclosure events.
254
+ It does not by itself prove that an accepted semantic edit was applied; any
255
+ owner-application receipt must bind the decision, intended edit and resulting
256
+ source revision, with authority appropriate to that workflow.
257
+
258
+ Tests: claim-level mixed decisions, stale views, concurrent requests, retries,
259
+ crash/restart, missing evidence, source movement, hostile display text, unauthorized
260
+ review, unchanged canonical bytes, and accepted-without-promotion behavior.
261
+
262
+ ### W6 — Reusable document response and resume slice
263
+
264
+ Dependencies: W4/W5 review identity and persistence contracts, but ship a bounded
265
+ local slice independently of pack migration and portable bundles.
266
+
267
+ Use one invented document to prove a reader can open a passage, leave a question
268
+ or correction, see save state, close, reopen and find the same response and
269
+ reading position. Bind response to document identity, exact revision and stable
270
+ anchor; retain the original wording and distinguish generated summaries.
271
+ Changed document revisions retain prior responses and require explicit
272
+ reassociation. Aggregate unresolved responses and explicitly recorded decisions
273
+ into a discussion view. Reading/scrolling/no response never means agreement.
274
+
275
+ The root owns generic passage references, response records and UI primitives;
276
+ consumer repositories own content, reading order, prompts and delivery/access.
277
+ Do not convert packet responses into semantic claims automatically. Verify
278
+ keyboard operation, visible focus, save failure/retry and two-view conflicts.
279
+ Use the established loopback local-service contract for browser proof. No
280
+ physical device, remote collaborator access or onboarding is implied.
281
+
282
+ Qualify save/resume as one required sequence: contribute a response, observe
283
+ durable save acknowledgement, close, reopen, and recover both original wording
284
+ and reading position. Exercise failed save/retry and changed document revision
285
+ in that sequence; a pending or failed write must never display as saved.
286
+ Include the existing ledger's 423 lock-contention response and retry path.
287
+ Presence/seen records with no responses must still render as unanswered.
288
+
289
+ Evaluate first use with an unfamiliar reader and an invented document: can
290
+ they make one useful question or correction without prior installation,
291
+ ontology or agent-skill instruction? Record the assistance required and any
292
+ point where they cannot proceed. Technical setup completion is a separate
293
+ result; actual adopter usefulness still needs its own human acceptance record.
294
+
295
+ ### W7 — Extension-pack lifecycle
296
+
297
+ Files: extension loader, pack/protocol contracts, migration checks, fixtures and
298
+ new lifecycle documentation.
299
+
300
+ Define substrate compatibility ranges, pack content identity, deprecation and
301
+ replacement terms, protocol version changes and migration modes. Reject an
302
+ unsupported combination before new execution. Preserve old term meaning and
303
+ source/run records; never silently reinterpret them with the newest pack.
304
+ Migration is dry-run first with a report and explicit owner application. Do not
305
+ execute arbitrary extension code or install dependencies as part of loading.
306
+ Historical inspection uses pinned content or marks missing historic dependencies.
307
+ Reuse existing pack digest/lock validation and the upgrade migration registry.
308
+ A required compatibility range cannot be added silently to the closed v1 pack
309
+ contract; record a compatible representation or explicit new-version migration.
310
+
311
+ Specify the legacy-pack policy: readable and inspectable does not automatically
312
+ mean admitted for new exact-reproducibility execution. Include a compatibility
313
+ matrix for old/current root, old/current pack, historical/new run and migration
314
+ availability. Test refusal, deprecation reporting, replay and rollback.
315
+
316
+ ### W8 — Private run-state policy and portable inspection bundles
317
+
318
+ Document state classes first: tracked contracts/configuration; ignored local
319
+ answers, runs and decisions; regenerable views/caches; ephemeral sessions/nonces;
320
+ secrets/grants that are never transferable. Git checkout portability is distinct
321
+ from active review portability. Backups are explicit owner-managed actions.
322
+
323
+ Specify the inspection-bundle manifest after the W0 reuse decision, including
324
+ selected members, sizes/digests, format version, source/pack identities, disclosure
325
+ classification and verification result. Evaluate existing export and support-preview contracts. Reuse their
326
+ primitives where suitable; a runtime export and a private historical inspection
327
+ bundle have different authority and must not be forced into one schema merely
328
+ because both carry provenance. Reuse the existing disclosure scanner and preview
329
+ controls, and the attestation verification path where an applicable trusted
330
+ signature exists. A valid signature still requires signer authorization and
331
+ does not import current approval. Signing is not encryption.
332
+ Export only selected bounded artifacts after an inspectable disclosure preview
333
+ and required disclosure check. Fail closed when the check is unavailable; do not
334
+ label an unchecked export safe. Omit auth/session/grant material and absolute
335
+ machine paths. No silent synchronization or upload.
336
+
337
+ Import first validates bounded sizes/counts, member digests, paths, duplicates,
338
+ links, versions and content rendering, then exposes an isolated inspection view.
339
+ It cannot overwrite active local state, install packs, execute content or import
340
+ approval authority. Keep foreign decisions visibly attributed and unverified
341
+ unless their actual signature/trust policy is verified.
342
+
343
+ Encrypted export is a distinct substage: select a maintained local encryption
344
+ mechanism with an explicit recipient/key custody contract, dependency rationale
345
+ and failure tests. Do not invent encryption or claim hashes authenticate a
346
+ sender. Complete manifest/inspection behavior first; encryption and external
347
+ sharing stay unavailable until that mechanism is explicitly selected and proved.
348
+ Test disclosure failures, tampering, truncated archives, unknown versions,
349
+ oversized content, traversal/symlink refusal, duplicate members and inert import.
350
+
351
+ ### W9 — Installed workflow, release evidence and consumer handoff
352
+
353
+ Test the exact packed artifact in a fresh synthetic two-repository workspace:
354
+ setup -> resolution -> bounded graph/pack checks -> readiness -> claim review ->
355
+ owner handoff -> close/reopen. Repeat under different local folder structures,
356
+ then an explicit pack upgrade. Include the document response slice, source
357
+ immutability, stale-decision refusal and inspection-only bundle behavior.
358
+
359
+ Use Node 22.18.0. Run focused regression suites, syntax, complete discoverable
360
+ tests, contract and public API compatibility, migrations, disclosure and exact
361
+ tarball/consumer checks. Verify test discovery includes new nested tests; either
362
+ place tests under current discovery or reconcile the separate discovery work.
363
+ Use the maintained private disclosure lane, never substitute structural-only
364
+ results. Existing global failures are reported separately with exact evidence.
365
+
366
+ An implementation review binds the final candidate and changed contracts. Valid
367
+ review findings are dispositioned and fixed before closeout; a plan review is
368
+ not implementation proof. Refresh main and prove required checks before landing.
369
+ Publishing a package, deployment, consumer activation and human acceptance remain
370
+ separate gates requiring their own authority and evidence.
371
+
372
+ ## Proposed delivery cuts and acceptance gates
373
+
374
+ 1. Reliability: W0-W3. External adapter setup works from the installed artifact
375
+ on two layouts; every documented project-aware invocation accepts the shared
376
+ options; source identity is exact or visibly unresolved. No canonical writes.
377
+ 2. Human review: W4-W6. A domain owner can understand each claim, inspect evidence,
378
+ record a decision, retain an attributed response and resume. Stale acceptance
379
+ fails; original source and historical claims remain unchanged.
380
+ 3. Lifecycle: W7-W8 plus W9. Upgrade preserves historical meaning; selected state
381
+ travels only through validated inspection bundles. Imported evidence never
382
+ becomes approval. Encryption is qualified separately before availability.
383
+
384
+ Each cut has focused local proof, exact source identity, review disposition,
385
+ rollback and a clear remaining-gates statement. Consumer human acceptance is
386
+ obtained separately; synthetic/browser proof cannot substitute for it.
387
+
388
+ ## Rollback and recovery
389
+
390
+ Pin the prior package and packs; retain original documents and append-only
391
+ responses/decisions. Disable optional new views/exports without deleting state.
392
+ Old versions must reject unknown authoritative records or ignore them only when
393
+ that cannot grant authority. Demonstrate rollback with historical data before
394
+ shipping migrations. Import never writes into the active state directory.
395
+
396
+ ## Reviewer challenge and open decisions
397
+
398
+ Prefer static inspection and existing defensive tests. Challenge dependency
399
+ order, contract evolution, exact provenance, stale acceptance, local reviewer
400
+ identity, disclosure, import authority, legacy compatibility and scope growth.
401
+ Return evidence, files, severity, confidence, impact, remediation order and
402
+ testable acceptance changes. Do not execute new live abuse paths or edit source.
403
+
404
+ The review must distinguish plan completeness from implementation correctness.
405
+ Known decisions: owner-applied canon and inspection-only imports are first-cut
406
+ defaults; authenticated multi-user approval, cross-computer continuation of active
407
+ authority, concrete encryption/key custody, remote onboarding and any calibrated
408
+ diagnostic scoring require explicit later design decisions. Their absence does
409
+ not block the independent reliability and local review cuts.
@@ -0,0 +1,22 @@
1
+ # Integration contract decisions
2
+
3
+ <!-- mnstry-review-workflow: atelier-integration-implementation-r1 gate: implementation-readiness stage: closing -->
4
+
5
+ These decisions implement the first local integration cut. They do not satisfy
6
+ independent review, publication or human acceptance.
7
+
8
+ | Artifact | Decision | Compatibility and authority |
9
+ | --- | --- | --- |
10
+ | Package provenance | Separate versioned diagnostic; retain v1 lock fields | Declared origin and observed bytes do not authenticate an upstream publisher. Exact checks require verified binding. |
11
+ | Evidence snapshot | Separate content-addressed record using existing JCS | Existing v1 runs stay readable; missing snapshot means no current decision eligibility. |
12
+ | Claim decision | Separate immutable decision aggregate and contract | Never insert new event types into legacy proposal aggregates. Stable request identity and expected version are mandatory. |
13
+ | Document response | Separate passage-bound record | A question/correction is not a semantic claim or agreement. |
14
+ | Owner handoff | Derived proposed change | No canonical apply or publication authority; cross-repository Git disclosure is a distinct event. |
15
+ | Inspection bundle | Separate inert artifact; reuse disclosure/JCS | No active-state overwrite, execution, secret transfer or approval import. |
16
+ | Pack compatibility | New versioned lifecycle declaration | Legacy packs remain inspectable; closed v1 contracts are not silently widened. |
17
+
18
+ Reuse existing private-file, ledger, origin/nonce, JSON validation and
19
+ attestation primitives where applicable. Decisions retain complete history;
20
+ latest-state compaction alone is not an audit archive. Local typed identity is
21
+ explicitly asserted, not authenticated. Encryption and transfer of active
22
+ authority require a separate custody design before availability.