@mnstry/atelier 0.2.0-alpha.13 → 0.2.0-alpha.15

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 (253) hide show
  1. package/CHANGELOG.md +283 -0
  2. package/README.md +102 -52
  3. package/SECURITY.md +1 -1
  4. package/TRADEMARKS.md +2 -2
  5. package/contracts/atelier-extension-manifest.v1.schema.json +412 -0
  6. package/contracts/atelier-graph-view.v1.schema.json +1085 -0
  7. package/contracts/public-api-baseline.json +298 -19
  8. package/docs/README.md +90 -0
  9. package/docs/blocks/capability-stewardship.md +1 -1
  10. package/docs/blocks/claims.md +2 -2
  11. package/docs/blocks/conformance-admission.md +1 -1
  12. package/docs/blocks/learning-harnesses.md +1 -1
  13. package/docs/{atelier-sync.md → guides/atelier-sync.md} +20 -14
  14. package/docs/{capability-stewardship.md → guides/capability-stewardship.md} +2 -4
  15. package/docs/guides/co-authoring.md +113 -0
  16. package/docs/{distributions.md → guides/distributions.md} +13 -8
  17. package/docs/guides/extensions.md +189 -0
  18. package/docs/guides/graph-refresh.md +152 -0
  19. package/docs/guides/graph-workspace.md +64 -0
  20. package/docs/{ingestion.md → guides/ingestion.md} +16 -15
  21. package/docs/{inquiry-harnesses.md → guides/inquiry-harnesses.md} +2 -3
  22. package/docs/{knowledge-workspace.md → guides/knowledge-workspace.md} +2 -2
  23. package/docs/{learning-harnesses.md → guides/learning-harnesses.md} +2 -3
  24. package/docs/{learning.md → guides/learning.md} +12 -5
  25. package/docs/{obsidian.md → guides/obsidian.md} +370 -23
  26. package/docs/guides/ontology-guide.md +111 -0
  27. package/docs/{personal-workspace.md → guides/personal-workspace.md} +17 -5
  28. package/docs/{research-starter.md → guides/research-starter.md} +1 -1
  29. package/docs/{tenant-readiness.md → guides/tenant-readiness.md} +39 -0
  30. package/docs/{upgrade.md → guides/upgrade.md} +197 -11
  31. package/docs/knowledge-health/assessment/capabilities.md +6 -15
  32. package/docs/knowledge-health/facilitator.md +15 -4
  33. package/docs/knowledge-health/{devday/participant-response.md → participant-response.md} +4 -2
  34. package/docs/knowledge-health/quickstart.md +97 -75
  35. package/docs/knowledge-health/readme.md +13 -5
  36. package/docs/maintainers/describing-the-atelier.md +173 -0
  37. package/docs/{release-engineering.md → maintainers/release-engineering.md} +5 -4
  38. package/docs/{announcements.md → reference/announcements.md} +1 -1
  39. package/docs/{architecture.md → reference/architecture.md} +31 -5
  40. package/docs/{atelier-runtime.md → reference/atelier-runtime.md} +1 -1
  41. package/docs/{connected-composition.md → reference/connected-composition.md} +7 -10
  42. package/docs/{coordination.md → reference/coordination.md} +1 -1
  43. package/docs/{decisions.md → reference/decisions.md} +3 -3
  44. package/docs/{design.md → reference/design.md} +1 -1
  45. package/docs/reference/edge-policy.md +151 -0
  46. package/docs/reference/graph-view-structured.md +119 -0
  47. package/docs/reference/graph-view.md +139 -0
  48. package/docs/reference/graph-workspace.md +37 -0
  49. package/docs/{intake-and-guides.md → reference/intake-and-guides.md} +3 -4
  50. package/docs/{knowledge-graph.md → reference/knowledge-graph.md} +120 -6
  51. package/docs/{local-services.md → reference/local-services.md} +43 -4
  52. package/docs/{obsidian-contract.md → reference/obsidian-contract.md} +29 -4
  53. package/docs/{obsidian-plugin.md → reference/obsidian-plugin.md} +218 -68
  54. package/docs/{practical-judgment.md → reference/phronesis.md} +12 -3
  55. package/docs/reference/portability.md +92 -0
  56. package/docs/{portable-presentation.md → reference/portable-presentation.md} +2 -2
  57. package/docs/{presentation-consumer-boundaries.md → reference/presentation-consumer-boundaries.md} +5 -0
  58. package/docs/{project-options.md → reference/project-options.md} +17 -0
  59. package/docs/{repo-boundary-guard.md → reference/repo-boundary-guard.md} +50 -4
  60. package/docs/{review-portability.md → reference/review-portability.md} +4 -0
  61. package/docs/{semantic-operation.md → reference/semantic-operation.md} +4 -3
  62. package/docs/{template-profile.md → reference/template-profile.md} +1 -1
  63. package/docs/{trackables.md → reference/trackables.md} +2 -2
  64. package/docs/start/independent-start.md +89 -0
  65. package/docs/{install.md → start/install.md} +9 -9
  66. package/docs/{knowledge-setup.md → start/knowledge-setup.md} +5 -5
  67. package/docs/{research-starter-quickstart.md → start/research-starter-quickstart.md} +6 -6
  68. package/fixtures/atelier-architecture/catalog/invalid/document.json +2 -2
  69. package/fixtures/atelier-architecture/catalog/valid/document.json +2 -2
  70. package/fixtures/graph-view/synthetic-authorized-input.v1.json +437 -0
  71. package/fixtures/graph-view/synthetic-view.v1.json +1 -0
  72. package/fixtures/knowledge-health/workshop/README.md +1 -1
  73. package/fixtures/templates/local-library.v1.json +3 -1
  74. package/package.json +22 -8
  75. package/plugins/obsidian/main.js +57 -8
  76. package/plugins/obsidian/manifest.json +1 -1
  77. package/skills/claude/atelier-guided-upgrade/SKILL.md +1 -1
  78. package/skills/claude/atelier-knowledge-setup/SKILL.md +2 -2
  79. package/skills/claude/atelier-local-service/SKILL.md +1 -1
  80. package/skills/claude/atelier-practical-judgment/SKILL.md +7 -2
  81. package/skills/claude/atelier-skill-steward/SKILL.md +1 -1
  82. package/skills/claude/mnstry-readiness/SKILL.md +2 -2
  83. package/skills/codex/atelier-guided-upgrade/SKILL.md +1 -1
  84. package/skills/codex/atelier-knowledge-setup/SKILL.md +2 -2
  85. package/skills/codex/atelier-local-service/SKILL.md +1 -1
  86. package/skills/codex/atelier-practical-judgment/SKILL.md +7 -2
  87. package/skills/codex/atelier-skill-steward/SKILL.md +1 -1
  88. package/skills/codex/mnstry-readiness/SKILL.md +2 -2
  89. package/src/architecture/catalog.mjs +2 -2
  90. package/src/attestation/sign.mjs +1 -1
  91. package/src/boundary/content-rules.mjs +534 -68
  92. package/src/boundary/policy.mjs +187 -60
  93. package/src/cli/run.mjs +26 -9
  94. package/src/commands/distribution.mjs +1 -1
  95. package/src/commands/extension.mjs +27 -0
  96. package/src/commands/ingest.mjs +1 -1
  97. package/src/commands/learn.mjs +1 -1
  98. package/src/commands/obsidian.mjs +49 -21
  99. package/src/commands/review.mjs +3 -0
  100. package/src/edge-policy/contract.mjs +69 -0
  101. package/src/edge-policy/policy.mjs +142 -0
  102. package/src/edge-policy/source-citation-adapter.mjs +43 -0
  103. package/src/extension-packs/loader.mjs +4 -3
  104. package/src/extensions/admission.mjs +83 -0
  105. package/src/extensions/client.d.mts +23 -0
  106. package/src/extensions/client.mjs +99 -0
  107. package/src/extensions/contracts.d.mts +29 -0
  108. package/src/extensions/contracts.mjs +163 -0
  109. package/src/extensions/convex.d.mts +24 -0
  110. package/src/extensions/convex.mjs +189 -0
  111. package/src/extensions/delegation.mjs +54 -0
  112. package/src/extensions/drizzle.d.mts +11 -0
  113. package/src/extensions/drizzle.mjs +33 -0
  114. package/src/extensions/postgres.d.mts +7 -0
  115. package/src/extensions/postgres.mjs +66 -0
  116. package/src/extensions/prisma.d.mts +13 -0
  117. package/src/extensions/prisma.mjs +63 -0
  118. package/src/extensions/project.mjs +432 -0
  119. package/src/extensions/scaffold-convex.mjs +130 -0
  120. package/src/extensions/scaffold-sql.mjs +144 -0
  121. package/src/extensions/server.d.mts +20 -0
  122. package/src/extensions/server.mjs +102 -0
  123. package/src/extensions/sql-scope.mjs +22 -0
  124. package/src/graph/graph.mjs +13 -5
  125. package/src/graph/knowledge-graph.mjs +20 -2
  126. package/src/graph/repo-contribution.mjs +405 -0
  127. package/src/graph/repo-contribution.types.mjs +32 -0
  128. package/src/graph-access/edge-decision-adapter.mjs +41 -0
  129. package/src/graph-access/edge-record-adapter.mjs +73 -0
  130. package/src/graph-access/index.mjs +253 -0
  131. package/src/graph-access/multi-contribution-record-adapter.mjs +101 -0
  132. package/src/graph-access/multi-record-projection-adapter.mjs +74 -0
  133. package/src/graph-access/source-adapter.mjs +81 -0
  134. package/src/graph-refresh/compare.mjs +110 -0
  135. package/src/graph-refresh/controller.mjs +324 -0
  136. package/src/graph-refresh/index.mjs +3 -0
  137. package/src/graph-refresh/local.mjs +78 -0
  138. package/src/graph-view/babylon/babylon-scene-port.mjs +64 -0
  139. package/src/graph-view/babylon/index.mjs +2 -0
  140. package/src/graph-view/babylon/navigator.mjs +312 -0
  141. package/src/graph-view/babylon/provenance.mjs +36 -0
  142. package/src/graph-view/babylon/scene-controller.mjs +131 -0
  143. package/src/graph-view/babylon/semantic-picking.mjs +35 -0
  144. package/src/graph-view/babylon/web-host.mjs +188 -0
  145. package/src/graph-view/cli.mjs +3 -0
  146. package/src/graph-view/command.mjs +34 -0
  147. package/src/graph-view/contracts.mjs +79 -0
  148. package/src/graph-view/errors.mjs +5 -0
  149. package/src/graph-view/index.mjs +4 -0
  150. package/src/graph-view/intents.mjs +30 -0
  151. package/src/graph-view/query.mjs +213 -0
  152. package/src/graph-view/refs.mjs +2 -0
  153. package/src/graph-view/structured/browser.mjs +262 -0
  154. package/src/graph-view/structured/styles.mjs +8 -0
  155. package/src/graph-workspace/authoring.mjs +185 -0
  156. package/src/graph-workspace/browser/constellation.mjs +369 -0
  157. package/src/graph-workspace/browser/dom.mjs +23 -0
  158. package/src/graph-workspace/browser/index.mjs +6 -0
  159. package/src/graph-workspace/browser/review.mjs +55 -0
  160. package/src/graph-workspace/browser/styles.mjs +11 -0
  161. package/src/graph-workspace/browser/workbench.mjs +351 -0
  162. package/src/graph-workspace/browser/workspace.mjs +431 -0
  163. package/src/graph-workspace/disclosure.mjs +39 -0
  164. package/src/graph-workspace/geometry.mjs +78 -0
  165. package/src/graph-workspace/index.mjs +11 -0
  166. package/src/graph-workspace/labels.mjs +50 -0
  167. package/src/graph-workspace/model.mjs +109 -0
  168. package/src/graph-workspace/recipes.mjs +88 -0
  169. package/src/graph-workspace/scale.mjs +95 -0
  170. package/src/graph-workspace/theme.mjs +156 -0
  171. package/src/ingestion/optional/graphify/graphify_supplier.py +5 -0
  172. package/src/ingestion/optional/graphify/native-closure-pins.json +275 -0
  173. package/src/ingestion/optional/graphify/native-pins.json +306 -0
  174. package/src/knowledge/ontology-guide.mjs +152 -0
  175. package/src/knowledge-health/proof/installed-check.mjs +2 -2
  176. package/src/knowledge-health/rule-identity.mjs +14 -9
  177. package/src/knowledge-health/workshop.mjs +22 -2
  178. package/src/personal-workspace/index.mjs +1 -1
  179. package/src/personal-workspace/selection.mjs +34 -3
  180. package/src/project/config.mjs +1 -1
  181. package/src/project/path-match.mjs +2 -1
  182. package/src/project/providers/github.mjs +24 -0
  183. package/src/project/repo-identity.mjs +3 -22
  184. package/src/projection/obsidian/contracts.mjs +1 -1
  185. package/src/projection/obsidian/materialize/path-registry.mjs +1 -1
  186. package/src/projection/obsidian/materialize/prepare-view.mjs +88 -6
  187. package/src/projection/obsidian/materialize/redaction.mjs +1 -1
  188. package/src/projection/obsidian/personal-workspace.mjs +84 -5
  189. package/src/projection/obsidian/plugin-bridge/channel.mjs +1 -1
  190. package/src/projection/obsidian/proposals/adapter.mjs +46 -23
  191. package/src/projection/obsidian/proposals/observation.mjs +40 -2
  192. package/src/projection/obsidian/publication/publisher.mjs +96 -8
  193. package/src/projection/project.mjs +21 -16
  194. package/src/readiness/readiness.mjs +20 -11
  195. package/src/readiness-protocols/bundled-pack.mjs +14 -766
  196. package/src/readiness-protocols/bundled-selection.mjs +32 -0
  197. package/src/readiness-protocols/evidence.mjs +2 -1
  198. package/src/readiness-protocols/packs/mnstry.mjs +766 -0
  199. package/src/readiness-protocols/runtime.mjs +43 -6
  200. package/src/runtime/obsidian/engine.mjs +387 -76
  201. package/src/runtime/obsidian/lifecycle.mjs +20 -15
  202. package/src/runtime/obsidian/login-item.mjs +6 -3
  203. package/src/runtime/obsidian/machine-settings.mjs +52 -8
  204. package/src/runtime/obsidian/observation.mjs +36 -4
  205. package/src/runtime/obsidian/opening.mjs +4 -3
  206. package/src/runtime/obsidian/personal-selection.mjs +187 -0
  207. package/src/runtime/obsidian/pipeline.mjs +115 -6
  208. package/src/runtime/obsidian/private-lock.mjs +50 -6
  209. package/src/runtime/obsidian/selection-continuity.mjs +124 -0
  210. package/src/runtime/obsidian/service-main.mjs +68 -16
  211. package/src/runtime/obsidian/service.mjs +80 -6
  212. package/src/runtime/obsidian/unheld-evidence.mjs +1 -1
  213. package/src/runtime/obsidian/view-permission.mjs +335 -0
  214. package/src/ui/control-system.mjs +201 -0
  215. package/src/ui/html-primitives.mjs +3 -0
  216. package/src/upgrade/closure-diagnostics.mjs +135 -0
  217. package/src/upgrade/closure.mjs +649 -0
  218. package/src/upgrade/upgrade.mjs +42 -11
  219. package/templates/distribution-workspace/README.md +2 -2
  220. package/templates/external-project-workspace/atelier.project.json +3 -0
  221. package/templates/external-project-workspace/pack-lifecycle.json +3 -1
  222. package/templates/knowledge-workspace/README.md +2 -2
  223. package/docs/integration-and-review-plan.md +0 -409
  224. package/docs/integration-contract-decisions.md +0 -44
  225. package/docs/knowledge-health/devday/facilitator.md +0 -16
  226. package/docs/knowledge-health/devday/public-default.md +0 -107
  227. package/docs/knowledge-health/devday/quickstart.md +0 -18
  228. package/docs/knowledge-health/devday/support.md +0 -22
  229. package/docs/knowledge-health/exercise.md +0 -17
  230. package/docs/knowledge-health/support.md +0 -34
  231. package/docs/presentation-review-disposition.md +0 -47
  232. package/docs/progressive-ingestion-acceptance.md +0 -89
  233. package/docs/progressive-ingestion.md +0 -235
  234. /package/docs/{exact-upgrades.md → guides/exact-upgrades.md} +0 -0
  235. /package/docs/{guided-upgrades.md → guides/guided-upgrades.md} +0 -0
  236. /package/docs/{local-review.md → guides/local-review.md} +0 -0
  237. /package/docs/{skill-steward.md → guides/skill-steward.md} +0 -0
  238. /package/docs/{template-upgrades.md → guides/template-upgrades.md} +0 -0
  239. /package/docs/{assurance-controls.md → maintainers/assurance-controls.md} +0 -0
  240. /package/docs/{attestation.md → reference/attestation.md} +0 -0
  241. /package/docs/{coauthor-session.md → reference/coauthor-session.md} +0 -0
  242. /package/docs/{continuity.md → reference/continuity.md} +0 -0
  243. /package/docs/{contract-stability.md → reference/contract-stability.md} +0 -0
  244. /package/docs/{decision-practices.md → reference/decision-practices.md} +0 -0
  245. /package/docs/{evidence-navigation.md → reference/evidence-navigation.md} +0 -0
  246. /package/docs/{extension-pack-lifecycle.md → reference/extension-pack-lifecycle.md} +0 -0
  247. /package/docs/{interaction-and-reflection.md → reference/interaction-and-reflection.md} +0 -0
  248. /package/docs/{local-state.md → reference/local-state.md} +0 -0
  249. /package/docs/{ontology.md → reference/ontology.md} +0 -0
  250. /package/docs/{optional-ingestion.md → reference/optional-ingestion.md} +0 -0
  251. /package/docs/{project-command-inventory.md → reference/project-command-inventory.md} +0 -0
  252. /package/docs/{semantic-ingestion.md → reference/semantic-ingestion.md} +0 -0
  253. /package/docs/{vault-service.md → reference/vault-service.md} +0 -0
@@ -15,6 +15,7 @@ import {
15
15
  writeJson,
16
16
  } from '../project/config.mjs'
17
17
  import { packageRootFrom } from '../project/package-root.mjs'
18
+ import { canonicalDiffArgs, gitOutputResult, parseDiffSections } from '../boundary/content-rules.mjs'
18
19
  import {
19
20
  BOUNDARY_POLICY_SCHEMA,
20
21
  checkBoundaryPolicy,
@@ -22,12 +23,15 @@ import {
22
23
  loadBoundaryPolicy,
23
24
  } from '../boundary/policy.mjs'
24
25
  import { bundledMnstryReadinessPackV1 } from '../readiness-protocols/bundled-pack.mjs'
26
+ import { bundledReadinessEnabled } from '../readiness-protocols/bundled-selection.mjs'
25
27
  import { loadExtensionPacks } from '../extension-packs/loader.mjs'
26
28
  import { inspectPackageProvenance, legacyPackageSource } from './provenance.mjs'
27
29
  import { prepareUpgrade, applySavedUpgrade, upgradeOperationStatus, recoverUpgradeDryRun, explainSavedUpgrade } from './transaction.mjs'
28
30
  import { renderUpgradeExplanation } from './explanation.mjs'
31
+ import { planConsumerClosure, runClosurePlanCommand } from './closure.mjs'
29
32
  export { prepareUpgrade, applySavedUpgrade, upgradeOperationStatus, recoverUpgradeDryRun, explainSavedUpgrade }
30
33
  export { prepareTemplateUpgrade } from './transaction.mjs'
34
+ export { planConsumerClosure }
31
35
 
32
36
  export const ATELIER_LOCK_SCHEMA = 'mnstry.atelier-lock@v1'
33
37
  export const ATELIER_MIGRATION_SCHEMA = 'mnstry.atelier-migration@v1'
@@ -62,6 +66,20 @@ const normalize = (value) => String(value ?? '').replaceAll('\\', '/').replace(/
62
66
  const asArray = (value) => (Array.isArray(value) ? value : [])
63
67
  const isObject = (value) => value && typeof value === 'object' && !Array.isArray(value)
64
68
 
69
+ function bundledSelectionLockErrors(includeBundled, lock) {
70
+ if (!lock) return []
71
+ const recorded = asArray(lock.extensionPacks).some((entry) => entry?.id === bundledMnstryReadinessPackV1.id)
72
+ if (recorded === includeBundled) return []
73
+ // The original alpha.0 writer predates bundled pack pins. Preserve its
74
+ // existing default upgrade path; later empty inventories can be opt-outs.
75
+ const legacyUnpinned = lock.package?.version === '0.1.0-alpha.0'
76
+ && (!Object.hasOwn(lock, 'extensionPacks') || (Array.isArray(lock.extensionPacks) && lock.extensionPacks.length === 0))
77
+ if (includeBundled && legacyUnpinned) return []
78
+ return [includeBundled
79
+ ? 'bundled readiness pack is selected but is not recorded in the lock; explicitly write the lock after reviewing pack selection'
80
+ : 'bundled readiness pack is disabled but remains recorded in the lock; explicitly write the lock after reviewing pack selection']
81
+ }
82
+
65
83
  function sha256(value) {
66
84
  return crypto.createHash('sha256').update(typeof value === 'string' ? value : JSON.stringify(value)).digest('hex')
67
85
  }
@@ -114,6 +132,7 @@ function loadPolicyForLock(project) {
114
132
  }
115
133
 
116
134
  export function buildAtelierLock({ project, templateId = 'existing-workspace', appliedMigrations = [], packs = [] } = {}) {
135
+ const includeBundled = bundledReadinessEnabled(project)
117
136
  const policy = loadPolicyForLock(project)
118
137
  return {
119
138
  schema: ATELIER_LOCK_SCHEMA,
@@ -149,11 +168,11 @@ export function buildAtelierLock({ project, templateId = 'existing-workspace', a
149
168
  // the manifest bytes plus every referenced protocol file's bytes, so any
150
169
  // on-disk edit to the manifest or a protocol is visible byte-for-byte.
151
170
  extensionPacks: [
152
- {
171
+ ...(includeBundled ? [{
153
172
  id: bundledMnstryReadinessPackV1.id,
154
173
  version: bundledMnstryReadinessPackV1.version,
155
174
  digest: `sha256:${sha256(bundledMnstryReadinessPackV1)}`,
156
- },
175
+ }] : []),
157
176
  ...packs.map((pack) => ({ id: pack.id, version: pack.version, digest: pack.digest })),
158
177
  ],
159
178
  boundaryPolicy: {
@@ -271,7 +290,7 @@ export const BASE_MIGRATIONS = [
271
290
  class: 'template_scaffold',
272
291
  title: 'Add missing upgrade documentation scaffold',
273
292
  description: 'Add upgrade guidance only when the target file is absent.',
274
- files: ['docs/upgrade.md'],
293
+ files: ['docs/guides/upgrade.md'],
275
294
  safety: 'additive',
276
295
  reviewMarkerRequired: false,
277
296
  explicitConfirmationRequired: false,
@@ -411,18 +430,24 @@ function stagedSemanticFindings(project) {
411
430
  const findings = []
412
431
  for (const repo of project.repos ?? []) {
413
432
  if (!isGitRepo(repo.path)) continue
414
- const result = spawnSync('git', ['-C', repo.path, 'diff', '--cached', '--unified=0', '--', '*.md', '*.kg.json'], { encoding: 'utf8' })
415
- if (result.status !== 0 || !result.stdout.trim()) continue
416
- const diff = result.stdout
417
- const changedSemantic = diff
418
- .split('\n')
419
- .some((line) => /^[+-](?![+-])/.test(line) && SEMANTIC_FIELD_RE.test(line))
420
- if (changedSemantic && !REVIEW_MARKER_RE.test(diff)) findings.push(`${repo.name}: staged semantic field change needs Atelier-Boundary-Review marker`)
433
+ // The boundary guard's pinned diff and parser; only a marker added in this
434
+ // change approves it, never a removed line or a file name.
435
+ const result = gitOutputResult(repo.path, [...canonicalDiffArgs(['--cached'], ['--text']), '--', '*.md', '*.kg.json'])
436
+ if (!result.ok) {
437
+ findings.push(`${repo.name}: staged semantic fields could not be read (${result.code})`)
438
+ continue
439
+ }
440
+ const sections = parseDiffSections(result.stdout, { detail: true })
441
+ const changedSemantic = sections.some((section) => section.incomplete
442
+ || section.hunks.some((hunk) => [...hunk.added, ...hunk.removed].some((line) => SEMANTIC_FIELD_RE.test(line))))
443
+ const approved = sections.some((section) => section.hunks.some((hunk) => hunk.added.some((line) => REVIEW_MARKER_RE.test(line))))
444
+ if (changedSemantic && !approved) findings.push(`${repo.name}: staged semantic field change needs Atelier-Boundary-Review marker`)
421
445
  }
422
446
  return findings
423
447
  }
424
448
 
425
449
  export function planUpgrade({ project, migrations = BASE_MIGRATIONS, allowDirtyGenerated = false, confirmBreaking = [] } = {}) {
450
+ const includeBundled = bundledReadinessEnabled(project)
426
451
  const state = currentState(project)
427
452
  const registryErrors = validateMigrationRegistry(migrations)
428
453
  const planned = selectedMigrations({ lock: state.lock, migrations })
@@ -430,7 +455,7 @@ export function planUpgrade({ project, migrations = BASE_MIGRATIONS, allowDirtyG
430
455
  const warnings = []
431
456
  const requiredConfirmations = []
432
457
 
433
- blockers.push(...registryErrors)
458
+ blockers.push(...registryErrors, ...bundledSelectionLockErrors(includeBundled, state.lock))
434
459
  if (!state.loadedPolicy.ok) blockers.push(...state.loadedPolicy.errors)
435
460
  if (state.boundaryReport && !state.boundaryReport.ok) blockers.push(...state.boundaryReport.errors.map((item) => item.message))
436
461
  blockers.push(...weakeningFindings({ lock: state.lock, currentPolicy: state.loadedPolicy.policy }))
@@ -606,6 +631,7 @@ export function applyUpgrade({ project, branch, allowDirtyGenerated = false, con
606
631
  }
607
632
 
608
633
  export function checkAtelierLock(project) {
634
+ const includeBundled = bundledReadinessEnabled(project)
609
635
  const { lock, lockPath } = loadAtelierLock(project)
610
636
  const errors = []
611
637
  if (!lock) errors.push(`lockfile not found: ${lockPath}`)
@@ -626,6 +652,7 @@ export function checkAtelierLock(project) {
626
652
  errors.push(item.packId ? `extension pack ${item.packId}: ${item.message}` : `extension packs: ${item.message}`)
627
653
  }
628
654
  const lockPacks = asArray(lock.extensionPacks)
655
+ errors.push(...bundledSelectionLockErrors(includeBundled, lock))
629
656
  for (const pack of packReport.packs) {
630
657
  const entry = lockPacks.find((item) => item?.id === pack.id)
631
658
  if (!entry) {
@@ -683,6 +710,10 @@ export function runLockCommand(argv = process.argv.slice(2)) {
683
710
 
684
711
  export function runUpgradeCommand(argv = process.argv.slice(2)) {
685
712
  const args = parseArgs(argv)
713
+ // `closure` plans against an explicit npm root, which need not be an Atelier
714
+ // workspace. It runs before the project is resolved, writes nothing, and lets
715
+ // its typed refusal reach the command wrapper unchanged.
716
+ if (args._[0] === 'closure') return runClosurePlanCommand(args, argv)
686
717
  const project = commandProject({ argv, writeLocalState: args._[0] !== 'explain' })
687
718
  if (['plan', 'apply', 'status', 'recover', 'explain'].includes(args._[0])) {
688
719
  try {
@@ -15,7 +15,7 @@ Every distribution package must carry the exact line below in its README:
15
15
  powered by MNSTRY Atelier
16
16
 
17
17
  `atelier distribution check` blocks on this line. See `TRADEMARKS.md`
18
- ("Required attribution") and `docs/attestation.md` in the Atelier package for
18
+ ("Required attribution") and `docs/reference/attestation.md` in the Atelier package for
19
19
  the policy and signing details.
20
20
 
21
21
  ## Projection branding
@@ -81,6 +81,6 @@ atelier lock write --project ./atelier.project.json
81
81
 
82
82
  ## Learn more
83
83
 
84
- - `docs/distributions.md` in the Atelier package — the full distribution guide.
84
+ - `docs/guides/distributions.md` in the Atelier package — the full distribution guide.
85
85
  - `examples/loomworks-studio/` in the Atelier repository — a complete
86
86
  reference distribution with a branded wrapper binary and extension pack.
@@ -26,6 +26,9 @@
26
26
  ],
27
27
  "ext": {
28
28
  "mnstry.atelier": {
29
+ "readiness": {
30
+ "includeBundled": false
31
+ },
29
32
  "extensionPacks": [
30
33
  {
31
34
  "id": "sample.readiness",
@@ -11,7 +11,9 @@
11
11
  "0.2.0-alpha.10",
12
12
  "0.2.0-alpha.11",
13
13
  "0.2.0-alpha.12",
14
- "0.2.0-alpha.13"
14
+ "0.2.0-alpha.13",
15
+ "0.2.0-alpha.14",
16
+ "0.2.0-alpha.15"
15
17
  ],
16
18
  "status": "active"
17
19
  }
@@ -35,10 +35,10 @@ Its byte budget includes the JSON envelope; token estimates are approximate.
35
35
  The tool makes no model calls. Measure actual tokens and resulting work with
36
36
  your own agent or host before claiming savings.
37
37
 
38
- The package guide `docs/knowledge-setup.md` explains adoption, limitations, and
38
+ The package guide `docs/start/knowledge-setup.md` explains adoption, limitations, and
39
39
  how to measure unseen questions, human correction, and appropriate later reuse.
40
40
 
41
41
  Open `/knowledge` at the printed address for Onboard, Model, Deepen, Apply,
42
42
  and Learn dashboards. Coauthor answers stay in private local history and can
43
43
  resume through `atelier knowledge session`. Review exported drafts before
44
- applying any source change. See the package guide `docs/knowledge-workspace.md`.
44
+ applying any source change. See the package guide `docs/guides/knowledge-workspace.md`.
@@ -1,409 +0,0 @@
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.
@@ -1,44 +0,0 @@
1
- # Integration contract decisions
2
-
3
- ## Responsibility architecture
4
-
5
- The [responsibility architecture](architecture.md) is the canonical naming and
6
- composition model. Keep existing source/API identifiers as compatibility
7
- surfaces. Responsibilities, roles, methods, resources, records and hosts have
8
- distinct kinds and typed relationships. This decision adopts the architecture
9
- direction; it does not declare every consumer implemented or qualified.
10
-
11
- Use additive contracts for architecture bindings, practical cases, native ADR
12
- snapshots and instruction adoption. Existing learning, intake, knowledge and
13
- capability stores retain their domain ownership. Native ADR identity and
14
- approvals remain with the repository that issued them. An imported decision
15
- never becomes a new local approval automatically.
16
-
17
- Preview and runtime must map authored fields to the same relevant domain rules.
18
- Unsupported required behavior is a visible resolution failure. Installation,
19
- actual loading, operation execution, durable readback and behavior assessment
20
- remain separate evidence. Reconsider this architecture if a proposed workflow
21
- requires a competing domain writer or an unrelated mandatory stage.
22
-
23
- <!-- mnstry-review-workflow: atelier-integration-implementation-r1 gate: implementation-readiness stage: closing -->
24
-
25
- These decisions implement the first local integration cut. They do not satisfy
26
- independent review, publication or human acceptance.
27
-
28
- | Artifact | Decision | Compatibility and authority |
29
- | --- | --- | --- |
30
- | 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. |
31
- | Evidence snapshot | Separate content-addressed record using existing JCS | Existing v1 runs stay readable; missing snapshot means no current decision eligibility. |
32
- | 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. |
33
- | Document response | Separate passage-bound record | A question/correction is not a semantic claim or agreement. |
34
- | Owner handoff | Derived proposed change | No canonical apply or publication authority; cross-repository Git disclosure is a distinct event. |
35
- | Inspection bundle | Separate inert artifact; reuse disclosure/JCS ([inspection-bundle.mjs](../src/collaboration/inspection-bundle.mjs); [prepareInspectionBundle](../src/collaboration/inspection-bundle.mjs#L37-L105)) | No active-state overwrite, execution, secret transfer or approval import ([prohibitedKeys](../src/collaboration/inspection-bundle.mjs#L16-L36), [inspectBundle](../src/collaboration/inspection-bundle.mjs#L106-L197), [read and write paths](../src/collaboration/inspection-bundle.mjs#L198-L223)). |
36
- | Pack compatibility | New versioned lifecycle declaration ([lifecycle.mjs](../src/extension-packs/lifecycle.mjs); [inspectPackLifecycle](../src/extension-packs/lifecycle.mjs#L14-L121)) | Legacy packs remain inspectable; closed v1 contracts are not silently widened ([legacy packs inspectable; closed declaration and entries](../src/extension-packs/lifecycle.mjs#L14-L121), [rootVersion](../src/extension-packs/lifecycle.mjs#L7-L12)). |
37
-
38
- <!-- Whole-file citations here rely on decision-practice definition revision three, which drafts on added as well as modified or removed lines. Uncited: Package provenance, Evidence snapshot, Claim decision and Document response await symbol-level citation support in the decision-practice consumer. -->
39
-
40
- Reuse existing private-file, ledger, origin/nonce, JSON validation and
41
- attestation primitives where applicable. Decisions retain complete history;
42
- latest-state compaction alone is not an audit archive. Local typed identity is
43
- explicitly asserted, not authenticated. Encryption and transfer of active
44
- authority require a separate custody design before availability.