project-tiny-context-harness 0.8.17 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/README.md +93 -30
  2. package/assets/README.md +158 -44
  3. package/assets/README.zh-CN.md +88 -29
  4. package/assets/agents/AGENTS_CORE.md +2 -2
  5. package/assets/context_templates/context.toml +6 -1
  6. package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_helpers.cs +301 -0
  7. package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_run.cs +197 -0
  8. package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_types.cs +215 -0
  9. package/assets/runtime/windows-job-supervisor/windows_job_process_supervisor.ps1 +117 -0
  10. package/assets/skills/design-resource-authoring/SKILL.md +6 -3
  11. package/assets/skills/design-resource-authoring/references/authority-delta-assessment.md +52 -0
  12. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +5 -1
  13. package/assets/skills/design-system-authoring/SKILL.md +23 -17
  14. package/assets/skills/design-system-authoring/references/authority-adoption.md +19 -9
  15. package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +4 -0
  16. package/assets/skills/long-task-workflow/SKILL.md +6 -6
  17. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +10 -4
  18. package/assets/skills/long-task-workflow/references/contract-authoring.md +5 -5
  19. package/assets/skills/long-task-workflow/references/evidence-design.md +14 -3
  20. package/assets/skills/long-task-workflow/references/source-authoring.md +11 -8
  21. package/assets/tools/context_rules.json +53 -0
  22. package/assets/tools/validate_context.py +302 -77
  23. package/dist/cli.js +2 -1
  24. package/dist/commands/context-create.d.ts +1 -0
  25. package/dist/commands/context-create.js +90 -0
  26. package/dist/commands/context-inspect.d.ts +1 -0
  27. package/dist/commands/context-inspect.js +98 -0
  28. package/dist/commands/context-move.d.ts +1 -0
  29. package/dist/commands/context-move.js +78 -0
  30. package/dist/commands/context-register.d.ts +1 -0
  31. package/dist/commands/context-register.js +110 -0
  32. package/dist/commands/context-transaction.d.ts +1 -0
  33. package/dist/commands/context-transaction.js +84 -0
  34. package/dist/commands/context.d.ts +1 -0
  35. package/dist/commands/context.js +36 -0
  36. package/dist/commands/design-authority-delta.d.ts +1 -0
  37. package/dist/commands/design-authority-delta.js +53 -0
  38. package/dist/commands/design-authority.d.ts +1 -0
  39. package/dist/commands/design-authority.js +104 -0
  40. package/dist/commands/design-resource.js +8 -1
  41. package/dist/commands/doctor.d.ts +1 -1
  42. package/dist/commands/doctor.js +61 -3
  43. package/dist/commands/index.js +19 -2
  44. package/dist/commands/long-task-authoring.js +20 -2
  45. package/dist/commands/long-task-workdir.d.ts +2 -0
  46. package/dist/commands/long-task-workdir.js +23 -0
  47. package/dist/commands/long-task.js +75 -6
  48. package/dist/commands/route.d.ts +15 -0
  49. package/dist/commands/route.js +142 -0
  50. package/dist/index.d.ts +3 -13
  51. package/dist/index.js +3 -12
  52. package/dist/lib/cli-exit.d.ts +14 -0
  53. package/dist/lib/cli-exit.js +19 -0
  54. package/dist/lib/context-catalog/catalog-default-footprint.d.ts +3 -0
  55. package/dist/lib/context-catalog/catalog-default-footprint.js +53 -0
  56. package/dist/lib/context-catalog/catalog-diagnostics.d.ts +9 -0
  57. package/dist/lib/context-catalog/catalog-diagnostics.js +34 -0
  58. package/dist/lib/context-catalog/catalog-discovery.d.ts +7 -0
  59. package/dist/lib/context-catalog/catalog-discovery.js +81 -0
  60. package/dist/lib/context-catalog/catalog-load.d.ts +8 -0
  61. package/dist/lib/context-catalog/catalog-load.js +187 -0
  62. package/dist/lib/context-catalog/catalog-path-validation.d.ts +7 -0
  63. package/dist/lib/context-catalog/catalog-path-validation.js +62 -0
  64. package/dist/lib/context-catalog/catalog-paths.d.ts +11 -0
  65. package/dist/lib/context-catalog/catalog-paths.js +41 -0
  66. package/dist/lib/context-catalog/catalog-portable-contract.d.ts +15 -0
  67. package/dist/lib/context-catalog/catalog-portable-contract.js +68 -0
  68. package/dist/lib/context-catalog/catalog-staged-path-safety.d.ts +1 -0
  69. package/dist/lib/context-catalog/catalog-staged-path-safety.js +36 -0
  70. package/dist/lib/context-catalog/catalog-types.d.ts +40 -0
  71. package/dist/lib/context-catalog/catalog-types.js +1 -0
  72. package/dist/lib/context-catalog/catalog-validation.d.ts +9 -0
  73. package/dist/lib/context-catalog/catalog-validation.js +148 -0
  74. package/dist/lib/context-create/context-create-path.d.ts +2 -0
  75. package/dist/lib/context-create/context-create-path.js +30 -0
  76. package/dist/lib/context-create/context-create-template.d.ts +2 -0
  77. package/dist/lib/context-create/context-create-template.js +95 -0
  78. package/dist/lib/context-create/context-create-types.d.ts +28 -0
  79. package/dist/lib/context-create/context-create-types.js +1 -0
  80. package/dist/lib/context-create/context-create-write.d.ts +1 -0
  81. package/dist/lib/context-create/context-create-write.js +85 -0
  82. package/dist/lib/context-create/context-create.d.ts +2 -0
  83. package/dist/lib/context-create/context-create.js +84 -0
  84. package/dist/lib/context-default-footprint.d.ts +2 -3
  85. package/dist/lib/context-default-footprint.js +49 -57
  86. package/dist/lib/context-doctor/context-doctor-types.d.ts +16 -0
  87. package/dist/lib/context-doctor/context-doctor-types.js +15 -0
  88. package/dist/lib/context-doctor/context-doctor.d.ts +2 -0
  89. package/dist/lib/context-doctor/context-doctor.js +130 -0
  90. package/dist/lib/context-graph-snapshot.d.ts +5 -0
  91. package/dist/lib/context-graph-snapshot.js +46 -25
  92. package/dist/lib/context-inspect/context-inspect-projection.d.ts +9 -0
  93. package/dist/lib/context-inspect/context-inspect-projection.js +49 -0
  94. package/dist/lib/context-inspect/context-inspect-render.d.ts +2 -0
  95. package/dist/lib/context-inspect/context-inspect-render.js +29 -0
  96. package/dist/lib/context-inspect/context-inspect-types.d.ts +43 -0
  97. package/dist/lib/context-inspect/context-inspect-types.js +1 -0
  98. package/dist/lib/context-inspect/context-inspect.d.ts +2 -0
  99. package/dist/lib/context-inspect/context-inspect.js +104 -0
  100. package/dist/lib/context-manifest-schema.d.ts +1 -1
  101. package/dist/lib/context-manifest-schema.js +4 -20
  102. package/dist/lib/context-markdown/context-markdown-analysis.d.ts +15 -0
  103. package/dist/lib/context-markdown/context-markdown-analysis.js +245 -0
  104. package/dist/lib/context-markdown/context-markdown-extract.d.ts +7 -0
  105. package/dist/lib/context-markdown/context-markdown-extract.js +114 -0
  106. package/dist/lib/context-markdown/context-markdown-types.d.ts +57 -0
  107. package/dist/lib/context-markdown/context-markdown-types.js +1 -0
  108. package/dist/lib/context-move/context-move-input.d.ts +8 -0
  109. package/dist/lib/context-move/context-move-input.js +17 -0
  110. package/dist/lib/context-move/context-move-literal-scan.d.ts +20 -0
  111. package/dist/lib/context-move/context-move-literal-scan.js +213 -0
  112. package/dist/lib/context-move/context-move-live-validation.d.ts +3 -0
  113. package/dist/lib/context-move/context-move-live-validation.js +56 -0
  114. package/dist/lib/context-move/context-move-markdown-plan.d.ts +22 -0
  115. package/dist/lib/context-move/context-move-markdown-plan.js +39 -0
  116. package/dist/lib/context-move/context-move-projection.d.ts +3 -0
  117. package/dist/lib/context-move/context-move-projection.js +11 -0
  118. package/dist/lib/context-move/context-move-reference-validation.d.ts +11 -0
  119. package/dist/lib/context-move/context-move-reference-validation.js +64 -0
  120. package/dist/lib/context-move/context-move-render.d.ts +2 -0
  121. package/dist/lib/context-move/context-move-render.js +24 -0
  122. package/dist/lib/context-move/context-move-support.d.ts +10 -0
  123. package/dist/lib/context-move/context-move-support.js +88 -0
  124. package/dist/lib/context-move/context-move-transaction-plan.d.ts +24 -0
  125. package/dist/lib/context-move/context-move-transaction-plan.js +108 -0
  126. package/dist/lib/context-move/context-move-types.d.ts +74 -0
  127. package/dist/lib/context-move/context-move-types.js +1 -0
  128. package/dist/lib/context-move/context-move.d.ts +8 -0
  129. package/dist/lib/context-move/context-move.js +180 -0
  130. package/dist/lib/context-mutation/manifest-lossless-patch.d.ts +28 -0
  131. package/dist/lib/context-mutation/manifest-lossless-patch.js +208 -0
  132. package/dist/lib/context-mutation/markdown-link-patch.d.ts +34 -0
  133. package/dist/lib/context-mutation/markdown-link-patch.js +143 -0
  134. package/dist/lib/context-mutation/markdown-link-spans.d.ts +10 -0
  135. package/dist/lib/context-mutation/markdown-link-spans.js +179 -0
  136. package/dist/lib/context-mutation/mutation-cas.d.ts +13 -0
  137. package/dist/lib/context-mutation/mutation-cas.js +365 -0
  138. package/dist/lib/context-mutation/mutation-command-support.d.ts +12 -0
  139. package/dist/lib/context-mutation/mutation-command-support.js +57 -0
  140. package/dist/lib/context-mutation/mutation-commit.d.ts +12 -0
  141. package/dist/lib/context-mutation/mutation-commit.js +89 -0
  142. package/dist/lib/context-mutation/mutation-directories.d.ts +5 -0
  143. package/dist/lib/context-mutation/mutation-directories.js +56 -0
  144. package/dist/lib/context-mutation/mutation-file-state.d.ts +14 -0
  145. package/dist/lib/context-mutation/mutation-file-state.js +137 -0
  146. package/dist/lib/context-mutation/mutation-journal-file-validation.d.ts +1 -0
  147. package/dist/lib/context-mutation/mutation-journal-file-validation.js +106 -0
  148. package/dist/lib/context-mutation/mutation-journal-io.d.ts +5 -0
  149. package/dist/lib/context-mutation/mutation-journal-io.js +55 -0
  150. package/dist/lib/context-mutation/mutation-journal-storage.d.ts +18 -0
  151. package/dist/lib/context-mutation/mutation-journal-storage.js +283 -0
  152. package/dist/lib/context-mutation/mutation-journal-validation-support.d.ts +16 -0
  153. package/dist/lib/context-mutation/mutation-journal-validation-support.js +140 -0
  154. package/dist/lib/context-mutation/mutation-journal-validation.d.ts +3 -0
  155. package/dist/lib/context-mutation/mutation-journal-validation.js +177 -0
  156. package/dist/lib/context-mutation/mutation-journal.d.ts +8 -0
  157. package/dist/lib/context-mutation/mutation-journal.js +111 -0
  158. package/dist/lib/context-mutation/mutation-live-validation.d.ts +3 -0
  159. package/dist/lib/context-mutation/mutation-live-validation.js +51 -0
  160. package/dist/lib/context-mutation/mutation-long-task-guard.d.ts +6 -0
  161. package/dist/lib/context-mutation/mutation-long-task-guard.js +57 -0
  162. package/dist/lib/context-mutation/mutation-recovery.d.ts +4 -0
  163. package/dist/lib/context-mutation/mutation-recovery.js +189 -0
  164. package/dist/lib/context-mutation/mutation-staged-fs.d.ts +5 -0
  165. package/dist/lib/context-mutation/mutation-staged-fs.js +56 -0
  166. package/dist/lib/context-mutation/mutation-types.d.ts +103 -0
  167. package/dist/lib/context-mutation/mutation-types.js +1 -0
  168. package/dist/lib/context-register/context-register-input.d.ts +11 -0
  169. package/dist/lib/context-register/context-register-input.js +43 -0
  170. package/dist/lib/context-register/context-register-render.d.ts +2 -0
  171. package/dist/lib/context-register/context-register-render.js +21 -0
  172. package/dist/lib/context-register/context-register-support.d.ts +6 -0
  173. package/dist/lib/context-register/context-register-support.js +46 -0
  174. package/dist/lib/context-register/context-register-types.d.ts +46 -0
  175. package/dist/lib/context-register/context-register-types.js +1 -0
  176. package/dist/lib/context-register/context-register.d.ts +8 -0
  177. package/dist/lib/context-register/context-register.js +155 -0
  178. package/dist/lib/context-router/context-route-budget.d.ts +15 -0
  179. package/dist/lib/context-router/context-route-budget.js +14 -0
  180. package/dist/lib/context-router/context-route-candidates.d.ts +15 -0
  181. package/dist/lib/context-router/context-route-candidates.js +112 -0
  182. package/dist/lib/context-router/context-route-order.d.ts +6 -0
  183. package/dist/lib/context-router/context-route-order.js +53 -0
  184. package/dist/lib/context-router/context-route-paths.d.ts +16 -0
  185. package/dist/lib/context-router/context-route-paths.js +109 -0
  186. package/dist/lib/context-router/context-route-render.d.ts +2 -0
  187. package/dist/lib/context-router/context-route-render.js +32 -0
  188. package/dist/lib/context-router/context-route-scan.d.ts +18 -0
  189. package/dist/lib/context-router/context-route-scan.js +156 -0
  190. package/dist/lib/context-router/context-route-selection.d.ts +16 -0
  191. package/dist/lib/context-router/context-route-selection.js +72 -0
  192. package/dist/lib/context-router/context-route-terms.d.ts +13 -0
  193. package/dist/lib/context-router/context-route-terms.js +202 -0
  194. package/dist/lib/context-router/context-route-types.d.ts +101 -0
  195. package/dist/lib/context-router/context-route-types.js +1 -0
  196. package/dist/lib/context-router/context-route.d.ts +2 -0
  197. package/dist/lib/context-router/context-route.js +127 -0
  198. package/dist/lib/context-units-migration.d.ts +13 -0
  199. package/dist/lib/context-units-migration.js +217 -0
  200. package/dist/lib/design-authority-binding.d.ts +7 -0
  201. package/dist/lib/design-authority-binding.js +96 -0
  202. package/dist/lib/design-authority-closure.d.ts +3 -0
  203. package/dist/lib/design-authority-closure.js +201 -0
  204. package/dist/lib/design-authority-delta-codec-primitives.d.ts +10 -0
  205. package/dist/lib/design-authority-delta-codec-primitives.js +58 -0
  206. package/dist/lib/design-authority-delta-codec.d.ts +2 -0
  207. package/dist/lib/design-authority-delta-codec.js +193 -0
  208. package/dist/lib/design-authority-delta-types.d.ts +65 -0
  209. package/dist/lib/design-authority-delta-types.js +6 -0
  210. package/dist/lib/design-authority-delta-validation.d.ts +2 -0
  211. package/dist/lib/design-authority-delta-validation.js +16 -0
  212. package/dist/lib/design-authority-digest.d.ts +8 -0
  213. package/dist/lib/design-authority-digest.js +36 -0
  214. package/dist/lib/design-authority-files.d.ts +9 -0
  215. package/dist/lib/design-authority-files.js +62 -0
  216. package/dist/lib/design-authority-format.d.ts +2 -0
  217. package/dist/lib/design-authority-format.js +93 -0
  218. package/dist/lib/design-authority-links.d.ts +10 -0
  219. package/dist/lib/design-authority-links.js +137 -0
  220. package/dist/lib/design-authority-manifest.d.ts +4 -0
  221. package/dist/lib/design-authority-manifest.js +144 -0
  222. package/dist/lib/design-authority-tokens.d.ts +9 -0
  223. package/dist/lib/design-authority-tokens.js +45 -0
  224. package/dist/lib/design-authority-types.d.ts +80 -0
  225. package/dist/lib/design-authority-types.js +23 -0
  226. package/dist/lib/design-md-tool-adapter.d.ts +9 -0
  227. package/dist/lib/design-md-tool-adapter.js +152 -0
  228. package/dist/lib/design-md-tool-normalization.d.ts +7 -0
  229. package/dist/lib/design-md-tool-normalization.js +78 -0
  230. package/dist/lib/design-md-tool-types.d.ts +99 -0
  231. package/dist/lib/design-md-tool-types.js +8 -0
  232. package/dist/lib/design-resource-handoff-input-types.d.ts +1 -1
  233. package/dist/lib/design-resource-handoff-manifest-projection.js +3 -0
  234. package/dist/lib/design-resource-handoff-shape.js +14 -2
  235. package/dist/lib/design-resource-handoff-types.d.ts +3 -0
  236. package/dist/lib/design-resource-handoff-validation.js +16 -4
  237. package/dist/lib/design-resource-implementation-feasibility-validation-support.js +1 -1
  238. package/dist/lib/design-resource-recovery-current.js +22 -0
  239. package/dist/lib/design-resource-recovery-shape.js +64 -7
  240. package/dist/lib/design-resource-recovery-types.d.ts +4 -1
  241. package/dist/lib/design-resource-symbolic-fact-shape.js +7 -1
  242. package/dist/lib/design-resource-symbolic-fact-types.d.ts +3 -0
  243. package/dist/lib/design-resource-symbolic-fact-validation.js +15 -3
  244. package/dist/lib/doctor.d.ts +2 -1
  245. package/dist/lib/doctor.js +29 -1
  246. package/dist/lib/fs.js +1 -1
  247. package/dist/lib/long-task-acceptance-reachability-claims.d.ts +2 -0
  248. package/dist/lib/long-task-acceptance-reachability-claims.js +279 -0
  249. package/dist/lib/long-task-acceptance-reachability-design.d.ts +2 -0
  250. package/dist/lib/long-task-acceptance-reachability-design.js +96 -0
  251. package/dist/lib/long-task-acceptance-reachability-external.d.ts +9 -0
  252. package/dist/lib/long-task-acceptance-reachability-external.js +123 -0
  253. package/dist/lib/long-task-acceptance-reachability-helpers.d.ts +64 -0
  254. package/dist/lib/long-task-acceptance-reachability-helpers.js +473 -0
  255. package/dist/lib/long-task-acceptance-reachability-semantic.d.ts +2 -0
  256. package/dist/lib/long-task-acceptance-reachability-semantic.js +122 -0
  257. package/dist/lib/long-task-acceptance-reachability-types.d.ts +91 -0
  258. package/dist/lib/long-task-acceptance-reachability-types.js +1 -0
  259. package/dist/lib/long-task-acceptance-reachability.d.ts +4 -0
  260. package/dist/lib/long-task-acceptance-reachability.js +115 -0
  261. package/dist/lib/long-task-activation-validation.d.ts +6 -0
  262. package/dist/lib/long-task-activation-validation.js +72 -69
  263. package/dist/lib/long-task-active-authority-lock-context.d.ts +4 -0
  264. package/dist/lib/long-task-active-authority-lock-context.js +29 -0
  265. package/dist/lib/long-task-applicability-identity.d.ts +25 -0
  266. package/dist/lib/long-task-applicability-identity.js +60 -0
  267. package/dist/lib/long-task-authoring-preflight-diagnostics.js +8 -0
  268. package/dist/lib/long-task-authoring-preflight-types.d.ts +2 -0
  269. package/dist/lib/long-task-authoring-preflight-types.js +9 -0
  270. package/dist/lib/long-task-authoring-preflight.js +18 -2
  271. package/dist/lib/long-task-authority-material-diff.js +4 -0
  272. package/dist/lib/long-task-authority-materials.js +19 -0
  273. package/dist/lib/long-task-authority-policy.d.ts +3 -0
  274. package/dist/lib/long-task-authority-policy.js +3 -0
  275. package/dist/lib/long-task-authority-revision-details.js +2 -1
  276. package/dist/lib/long-task-authority-types.d.ts +2 -0
  277. package/dist/lib/long-task-authority.js +2 -0
  278. package/dist/lib/long-task-check-shape.js +6 -1
  279. package/dist/lib/long-task-claim-definitions.js +1 -3
  280. package/dist/lib/long-task-claim-semantic-proof-floor.d.ts +3 -0
  281. package/dist/lib/long-task-claim-semantic-proof-floor.js +78 -0
  282. package/dist/lib/long-task-claims.d.ts +0 -18
  283. package/dist/lib/long-task-claims.js +15 -14
  284. package/dist/lib/long-task-command-process.js +3 -0
  285. package/dist/lib/long-task-compact-authoring.js +3 -0
  286. package/dist/lib/long-task-compact-projections.js +10 -0
  287. package/dist/lib/long-task-complete-delivery-evidence-types.d.ts +38 -0
  288. package/dist/lib/long-task-complete-delivery-evidence-types.js +1 -0
  289. package/dist/lib/long-task-completion-types.d.ts +109 -0
  290. package/dist/lib/long-task-completion-types.js +1 -0
  291. package/dist/lib/long-task-conformance-policy.d.ts +2 -1
  292. package/dist/lib/long-task-conformance-policy.js +11 -4
  293. package/dist/lib/long-task-context-authority-topology.js +6 -4
  294. package/dist/lib/long-task-contract-types.d.ts +52 -1
  295. package/dist/lib/long-task-counterfactual-sandbox.d.ts +7 -1
  296. package/dist/lib/long-task-counterfactual-sandbox.js +86 -6
  297. package/dist/lib/long-task-delivery-compiler-preflight.d.ts +24 -0
  298. package/dist/lib/long-task-delivery-compiler-preflight.js +32 -0
  299. package/dist/lib/long-task-delivery-compiler.d.ts +1 -0
  300. package/dist/lib/long-task-delivery-compiler.js +59 -44
  301. package/dist/lib/long-task-delivery-parser.d.ts +3 -0
  302. package/dist/lib/long-task-delivery-parser.js +26 -8
  303. package/dist/lib/long-task-delivery-types.d.ts +2 -0
  304. package/dist/lib/long-task-delivery-types.js +2 -0
  305. package/dist/lib/long-task-delivery-validation.d.ts +6 -1
  306. package/dist/lib/long-task-delivery-validation.js +19 -4
  307. package/dist/lib/long-task-design-feasibility-binding.d.ts +1 -0
  308. package/dist/lib/long-task-design-feasibility-binding.js +3 -3
  309. package/dist/lib/long-task-design-feasibility-source-closure.js +11 -2
  310. package/dist/lib/long-task-design-obligation.d.ts +50 -0
  311. package/dist/lib/long-task-design-obligation.js +99 -0
  312. package/dist/lib/long-task-design-resource-handoff.d.ts +3 -1
  313. package/dist/lib/long-task-design-resource-handoff.js +36 -12
  314. package/dist/lib/long-task-design-resource-method-binding.js +12 -0
  315. package/dist/lib/long-task-effective-external-takeover.d.ts +15 -0
  316. package/dist/lib/long-task-effective-external-takeover.js +109 -0
  317. package/dist/lib/long-task-effective-external-ui-takeover.d.ts +5 -0
  318. package/dist/lib/long-task-effective-external-ui-takeover.js +117 -0
  319. package/dist/lib/long-task-evidence-capability-codec.js +91 -0
  320. package/dist/lib/long-task-evidence-capability-runtime.js +62 -14
  321. package/dist/lib/long-task-evidence-capability-types.d.ts +3 -2
  322. package/dist/lib/long-task-evidence-v2.d.ts +6 -1
  323. package/dist/lib/long-task-evidence-v2.js +253 -170
  324. package/dist/lib/long-task-execution-observation.d.ts +7 -0
  325. package/dist/lib/long-task-execution-observation.js +21 -4
  326. package/dist/lib/long-task-expected-authority.d.ts +4 -0
  327. package/dist/lib/long-task-expected-authority.js +126 -0
  328. package/dist/lib/long-task-external-confirmation-artifacts.d.ts +9 -0
  329. package/dist/lib/long-task-external-confirmation-artifacts.js +138 -0
  330. package/dist/lib/long-task-external-confirmation-attestation.d.ts +20 -0
  331. package/dist/lib/long-task-external-confirmation-attestation.js +115 -0
  332. package/dist/lib/long-task-external-confirmation-challenge.d.ts +23 -0
  333. package/dist/lib/long-task-external-confirmation-challenge.js +164 -0
  334. package/dist/lib/long-task-external-confirmation-context.d.ts +14 -0
  335. package/dist/lib/long-task-external-confirmation-context.js +53 -0
  336. package/dist/lib/long-task-external-confirmation-evaluation.d.ts +11 -0
  337. package/dist/lib/long-task-external-confirmation-evaluation.js +454 -0
  338. package/dist/lib/long-task-external-confirmation-expected.d.ts +8 -0
  339. package/dist/lib/long-task-external-confirmation-expected.js +200 -0
  340. package/dist/lib/long-task-external-confirmation-identity.d.ts +10 -0
  341. package/dist/lib/long-task-external-confirmation-identity.js +77 -0
  342. package/dist/lib/long-task-external-confirmation-plan.d.ts +25 -0
  343. package/dist/lib/long-task-external-confirmation-plan.js +148 -0
  344. package/dist/lib/long-task-external-confirmation-preparation.d.ts +4 -0
  345. package/dist/lib/long-task-external-confirmation-preparation.js +100 -0
  346. package/dist/lib/long-task-external-confirmation-shape.d.ts +8 -0
  347. package/dist/lib/long-task-external-confirmation-shape.js +387 -0
  348. package/dist/lib/long-task-external-confirmation-state.d.ts +10 -0
  349. package/dist/lib/long-task-external-confirmation-state.js +109 -0
  350. package/dist/lib/long-task-external-confirmation-types.d.ts +195 -0
  351. package/dist/lib/long-task-external-confirmation-types.js +1 -0
  352. package/dist/lib/long-task-final-integrity.d.ts +2 -0
  353. package/dist/lib/long-task-final-integrity.js +21 -10
  354. package/dist/lib/long-task-final-v2.d.ts +7 -2
  355. package/dist/lib/long-task-final-v2.js +179 -55
  356. package/dist/lib/long-task-finalization-identity.d.ts +27 -0
  357. package/dist/lib/long-task-finalization-identity.js +58 -0
  358. package/dist/lib/long-task-finding-context.d.ts +1 -1
  359. package/dist/lib/long-task-finding-context.js +139 -13
  360. package/dist/lib/long-task-freshness.d.ts +27 -0
  361. package/dist/lib/long-task-freshness.js +128 -5
  362. package/dist/lib/long-task-git.js +3 -3
  363. package/dist/lib/long-task-material-input-closure.d.ts +3 -0
  364. package/dist/lib/long-task-material-input-closure.js +92 -0
  365. package/dist/lib/long-task-obligation-authority-resolution.d.ts +12 -0
  366. package/dist/lib/long-task-obligation-authority-resolution.js +57 -0
  367. package/dist/lib/long-task-obligation-semantic-identity.d.ts +16 -0
  368. package/dist/lib/long-task-obligation-semantic-identity.js +116 -0
  369. package/dist/lib/long-task-observation-authority.d.ts +11 -0
  370. package/dist/lib/long-task-observation-authority.js +137 -6
  371. package/dist/lib/long-task-process-table.d.ts +2 -5
  372. package/dist/lib/long-task-process-table.js +21 -53
  373. package/dist/lib/long-task-process-tree.d.ts +0 -1
  374. package/dist/lib/long-task-process-tree.js +24 -54
  375. package/dist/lib/long-task-proof-adequacy.d.ts +12 -0
  376. package/dist/lib/long-task-proof-adequacy.js +57 -0
  377. package/dist/lib/long-task-proof-capability-floor.d.ts +6 -0
  378. package/dist/lib/long-task-proof-capability-floor.js +137 -0
  379. package/dist/lib/long-task-repair-frontier-checks.d.ts +8 -0
  380. package/dist/lib/long-task-repair-frontier-checks.js +93 -0
  381. package/dist/lib/long-task-repair-frontier-groups.d.ts +2 -0
  382. package/dist/lib/long-task-repair-frontier-groups.js +64 -0
  383. package/dist/lib/long-task-repair-frontier-utils.d.ts +6 -0
  384. package/dist/lib/long-task-repair-frontier-utils.js +27 -0
  385. package/dist/lib/long-task-repair-frontier.d.ts +14 -0
  386. package/dist/lib/long-task-repair-frontier.js +132 -0
  387. package/dist/lib/long-task-risk.d.ts +3 -2
  388. package/dist/lib/long-task-risk.js +73 -24
  389. package/dist/lib/long-task-root-shape.js +148 -8
  390. package/dist/lib/long-task-runner-freeze.d.ts +2 -1
  391. package/dist/lib/long-task-runner-freeze.js +23 -8
  392. package/dist/lib/long-task-runtime-types.d.ts +34 -40
  393. package/dist/lib/long-task-semantic-assurance-policy.js +2 -11
  394. package/dist/lib/long-task-semantic-contract-types.d.ts +2 -1
  395. package/dist/lib/long-task-semantic-drift-migration.js +48 -2
  396. package/dist/lib/long-task-semantic-fact-binding-types.d.ts +20 -0
  397. package/dist/lib/long-task-semantic-fact-closure.d.ts +5 -1
  398. package/dist/lib/long-task-semantic-fact-closure.js +33 -5
  399. package/dist/lib/long-task-semantic-fact-contract-closure.js +176 -1
  400. package/dist/lib/long-task-semantic-fact-contract-proofs.js +18 -1
  401. package/dist/lib/long-task-semantic-fact-input-closure.d.ts +16 -2
  402. package/dist/lib/long-task-semantic-fact-input-closure.js +138 -15
  403. package/dist/lib/long-task-semantic-fact-provenance-closure.js +1 -1
  404. package/dist/lib/long-task-semantic-fact-shape.d.ts +2 -1
  405. package/dist/lib/long-task-semantic-fact-shape.js +35 -1
  406. package/dist/lib/long-task-semantic-proof-adequacy.d.ts +2 -0
  407. package/dist/lib/long-task-semantic-proof-adequacy.js +19 -0
  408. package/dist/lib/long-task-semantic-proof-profile.d.ts +5 -0
  409. package/dist/lib/long-task-semantic-proof-profile.js +187 -0
  410. package/dist/lib/long-task-shape-primitives.d.ts +1 -1
  411. package/dist/lib/long-task-shape-primitives.js +5 -0
  412. package/dist/lib/long-task-source-anchors.d.ts +10 -0
  413. package/dist/lib/long-task-source-anchors.js +102 -0
  414. package/dist/lib/long-task-source-authority-types.d.ts +46 -0
  415. package/dist/lib/long-task-source-claim-validation.js +36 -0
  416. package/dist/lib/long-task-source-conservation-facts.d.ts +8 -0
  417. package/dist/lib/long-task-source-conservation-facts.js +57 -0
  418. package/dist/lib/long-task-source-conservation-types.d.ts +34 -0
  419. package/dist/lib/long-task-source-conservation-types.js +1 -0
  420. package/dist/lib/long-task-source-conservation.d.ts +7 -0
  421. package/dist/lib/long-task-source-conservation.js +110 -0
  422. package/dist/lib/long-task-source-fragments.d.ts +6 -0
  423. package/dist/lib/long-task-source-fragments.js +219 -0
  424. package/dist/lib/long-task-source-projection-resolution.d.ts +5 -0
  425. package/dist/lib/long-task-source-projection-resolution.js +57 -0
  426. package/dist/lib/long-task-source-projection-validation.d.ts +17 -0
  427. package/dist/lib/long-task-source-projection-validation.js +154 -0
  428. package/dist/lib/long-task-source-shape.js +14 -6
  429. package/dist/lib/long-task-source-supersession.d.ts +5 -0
  430. package/dist/lib/long-task-source-supersession.js +138 -0
  431. package/dist/lib/long-task-stage-policy.d.ts +7 -2
  432. package/dist/lib/long-task-stage-policy.js +67 -23
  433. package/dist/lib/long-task-state.d.ts +18 -4
  434. package/dist/lib/long-task-state.js +319 -33
  435. package/dist/lib/long-task-static-observation-freeze.js +4 -3
  436. package/dist/lib/long-task-status-projection.d.ts +3 -1
  437. package/dist/lib/long-task-status-projection.js +44 -13
  438. package/dist/lib/long-task-status-v2.d.ts +10 -6
  439. package/dist/lib/long-task-status-v2.js +70 -58
  440. package/dist/lib/long-task-target-policy.d.ts +8 -3
  441. package/dist/lib/long-task-target-policy.js +40 -9
  442. package/dist/lib/long-task-terminal-finalization.d.ts +12 -0
  443. package/dist/lib/long-task-terminal-finalization.js +190 -0
  444. package/dist/lib/long-task-ui-design-policy.js +15 -4
  445. package/dist/lib/long-task-verifier-counterfactuals.d.ts +11 -0
  446. package/dist/lib/long-task-verifier-counterfactuals.js +96 -0
  447. package/dist/lib/long-task-verifier-execution.d.ts +9 -0
  448. package/dist/lib/long-task-verifier-execution.js +67 -0
  449. package/dist/lib/long-task-verifier-identity.js +16 -5
  450. package/dist/lib/long-task-verifier-v2.js +52 -65
  451. package/dist/lib/long-task-windows-job-supervisor-helper.d.ts +1 -0
  452. package/dist/lib/long-task-windows-job-supervisor-helper.js +104 -0
  453. package/dist/lib/long-task-windows-job-supervisor-protocol.d.ts +28 -0
  454. package/dist/lib/long-task-windows-job-supervisor-protocol.js +124 -0
  455. package/dist/lib/long-task-windows-job-supervisor-result.d.ts +11 -0
  456. package/dist/lib/long-task-windows-job-supervisor-result.js +152 -0
  457. package/dist/lib/long-task-windows-job-supervisor.d.ts +2 -0
  458. package/dist/lib/long-task-windows-job-supervisor.js +126 -0
  459. package/dist/lib/long-task-workspace-scope.d.ts +1 -0
  460. package/dist/lib/long-task-workspace-scope.js +4 -1
  461. package/dist/lib/long-task-workspace.d.ts +1 -0
  462. package/dist/lib/long-task-workspace.js +10 -0
  463. package/dist/lib/migrations.js +43 -2
  464. package/dist/lib/repository-path-safety.d.ts +1 -0
  465. package/dist/lib/repository-path-safety.js +3 -3
  466. package/dist/lib/semantic-fact-input-shape.d.ts +7 -2
  467. package/dist/lib/semantic-fact-input-shape.js +25 -1
  468. package/dist/lib/semantic-fact-inventory-types.d.ts +8 -2
  469. package/dist/lib/semantic-fact-policy-census.d.ts +1 -1
  470. package/dist/lib/semantic-fact-policy-census.js +5 -2
  471. package/dist/lib/semantic-fact-policy.d.ts +1 -1
  472. package/dist/lib/semantic-fact-policy.js +2 -2
  473. package/dist/lib/semantic-fact-proof-shape.d.ts +1 -1
  474. package/dist/lib/semantic-fact-property-shape.d.ts +1 -1
  475. package/dist/lib/validators.d.ts +3 -0
  476. package/dist/lib/validators.js +45 -157
  477. package/dist/public-api-core.d.ts +12 -0
  478. package/dist/public-api-core.js +12 -0
  479. package/dist/public-api-long-task.d.ts +10 -0
  480. package/dist/public-api-long-task.js +10 -0
  481. package/dist/public-types.d.ts +5 -1
  482. package/dist/schemas/design-authority-delta-assessment-v1.schema.json +191 -0
  483. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +166 -2
  484. package/dist/schemas/long-task-external-confirmation-record-v1.schema.json +155 -0
  485. package/dist/schemas/long-task-external-confirmation-record-v2.schema.json +209 -0
  486. package/migrations/README.md +99 -0
  487. package/package.json +7 -5
  488. package/source-mappings.yaml +18 -0
@@ -0,0 +1,215 @@
1
+ using System;
2
+ using System.Runtime.InteropServices;
3
+ using System.Text;
4
+
5
+ public sealed class FormalProcessSupervisorResult
6
+ {
7
+ public string RequestId { get; set; }
8
+ public int ProcessId { get; set; }
9
+ public int ExitCode { get; set; }
10
+ public bool TimedOut { get; set; }
11
+ public bool OutputOverflow { get; set; }
12
+ public bool DescendantsCleaned { get; set; }
13
+ public long StdoutBytes { get; set; }
14
+ public long StderrBytes { get; set; }
15
+ public long StartedUnixMs { get; set; }
16
+ public long CompletedUnixMs { get; set; }
17
+ public string MonotonicStartedNs { get; set; }
18
+ public string MonotonicCompletedNs { get; set; }
19
+ public string MonotonicClockId { get; set; }
20
+ public string WallClockId { get; set; }
21
+ public long UserCpu100Ns { get; set; }
22
+ public long KernelCpu100Ns { get; set; }
23
+ public long TotalCpu100Ns { get; set; }
24
+ public uint TotalProcesses { get; set; }
25
+ public uint ActiveProcessesAtResult { get; set; }
26
+ public uint TotalTerminatedProcesses { get; set; }
27
+ public string AccountingSourceKind { get; set; }
28
+ public string Error { get; set; }
29
+ }
30
+
31
+ public static partial class FormalProcessSupervisor
32
+ {
33
+ private const uint CREATE_SUSPENDED = 0x00000004;
34
+ private const uint CREATE_NO_WINDOW = 0x08000000;
35
+ private const uint CREATE_UNICODE_ENVIRONMENT = 0x00000400;
36
+ private const uint STARTF_USESTDHANDLES = 0x00000100;
37
+ private const uint HANDLE_FLAG_INHERIT = 0x00000001;
38
+ private const uint JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000;
39
+ private const int JobObjectBasicAccountingInformation = 1;
40
+ private const int JobObjectExtendedLimitInformation = 9;
41
+ private const uint STILL_ACTIVE = 259;
42
+ private const int CleanupWaitMilliseconds = 5000;
43
+
44
+ [StructLayout(LayoutKind.Sequential)]
45
+ private struct SECURITY_ATTRIBUTES
46
+ {
47
+ public int nLength;
48
+ public IntPtr lpSecurityDescriptor;
49
+ [MarshalAs(UnmanagedType.Bool)] public bool bInheritHandle;
50
+ }
51
+
52
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
53
+ private struct STARTUPINFO
54
+ {
55
+ public int cb;
56
+ public string lpReserved;
57
+ public string lpDesktop;
58
+ public string lpTitle;
59
+ public uint dwX;
60
+ public uint dwY;
61
+ public uint dwXSize;
62
+ public uint dwYSize;
63
+ public uint dwXCountChars;
64
+ public uint dwYCountChars;
65
+ public uint dwFillAttribute;
66
+ public uint dwFlags;
67
+ public short wShowWindow;
68
+ public short cbReserved2;
69
+ public IntPtr lpReserved2;
70
+ public IntPtr hStdInput;
71
+ public IntPtr hStdOutput;
72
+ public IntPtr hStdError;
73
+ }
74
+
75
+ [StructLayout(LayoutKind.Sequential)]
76
+ private struct PROCESS_INFORMATION
77
+ {
78
+ public IntPtr hProcess;
79
+ public IntPtr hThread;
80
+ public uint dwProcessId;
81
+ public uint dwThreadId;
82
+ }
83
+
84
+ [StructLayout(LayoutKind.Sequential)]
85
+ private struct JOBOBJECT_BASIC_LIMIT_INFORMATION
86
+ {
87
+ public long PerProcessUserTimeLimit;
88
+ public long PerJobUserTimeLimit;
89
+ public uint LimitFlags;
90
+ public UIntPtr MinimumWorkingSetSize;
91
+ public UIntPtr MaximumWorkingSetSize;
92
+ public uint ActiveProcessLimit;
93
+ public UIntPtr Affinity;
94
+ public uint PriorityClass;
95
+ public uint SchedulingClass;
96
+ }
97
+
98
+ [StructLayout(LayoutKind.Sequential)]
99
+ private struct IO_COUNTERS
100
+ {
101
+ public ulong ReadOperationCount;
102
+ public ulong WriteOperationCount;
103
+ public ulong OtherOperationCount;
104
+ public ulong ReadTransferCount;
105
+ public ulong WriteTransferCount;
106
+ public ulong OtherTransferCount;
107
+ }
108
+
109
+ [StructLayout(LayoutKind.Sequential)]
110
+ private struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
111
+ {
112
+ public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
113
+ public IO_COUNTERS IoInfo;
114
+ public UIntPtr ProcessMemoryLimit;
115
+ public UIntPtr JobMemoryLimit;
116
+ public UIntPtr PeakProcessMemoryUsed;
117
+ public UIntPtr PeakJobMemoryUsed;
118
+ }
119
+
120
+ [StructLayout(LayoutKind.Sequential)]
121
+ private struct JOBOBJECT_BASIC_ACCOUNTING_INFORMATION
122
+ {
123
+ public long TotalUserTime;
124
+ public long TotalKernelTime;
125
+ public long ThisPeriodTotalUserTime;
126
+ public long ThisPeriodTotalKernelTime;
127
+ public uint TotalPageFaultCount;
128
+ public uint TotalProcesses;
129
+ public uint ActiveProcesses;
130
+ public uint TotalTerminatedProcesses;
131
+ }
132
+
133
+ private sealed class CaptureState
134
+ {
135
+ public long CombinedBytes;
136
+ public int Overflow;
137
+ public long Limit;
138
+ public IntPtr Job;
139
+ }
140
+
141
+ [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
142
+ private static extern IntPtr CreateJobObject(IntPtr attributes, string name);
143
+
144
+ [DllImport("kernel32.dll", SetLastError = true)]
145
+ [return: MarshalAs(UnmanagedType.Bool)]
146
+ private static extern bool SetInformationJobObject(
147
+ IntPtr job,
148
+ int informationClass,
149
+ ref JOBOBJECT_EXTENDED_LIMIT_INFORMATION information,
150
+ uint informationLength);
151
+
152
+ [DllImport("kernel32.dll", SetLastError = true)]
153
+ [return: MarshalAs(UnmanagedType.Bool)]
154
+ private static extern bool QueryInformationJobObject(
155
+ IntPtr job,
156
+ int informationClass,
157
+ out JOBOBJECT_BASIC_ACCOUNTING_INFORMATION information,
158
+ uint informationLength,
159
+ IntPtr returnLength);
160
+
161
+ [DllImport("kernel32.dll", SetLastError = true)]
162
+ [return: MarshalAs(UnmanagedType.Bool)]
163
+ private static extern bool AssignProcessToJobObject(IntPtr job, IntPtr process);
164
+
165
+ [DllImport("kernel32.dll", SetLastError = true)]
166
+ [return: MarshalAs(UnmanagedType.Bool)]
167
+ private static extern bool TerminateJobObject(IntPtr job, uint exitCode);
168
+
169
+ [DllImport("kernel32.dll", SetLastError = true)]
170
+ [return: MarshalAs(UnmanagedType.Bool)]
171
+ private static extern bool CreatePipe(
172
+ out IntPtr readPipe,
173
+ out IntPtr writePipe,
174
+ ref SECURITY_ATTRIBUTES attributes,
175
+ uint size);
176
+
177
+ [DllImport("kernel32.dll", SetLastError = true)]
178
+ [return: MarshalAs(UnmanagedType.Bool)]
179
+ private static extern bool SetHandleInformation(
180
+ IntPtr handle,
181
+ uint mask,
182
+ uint flags);
183
+
184
+ [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
185
+ [return: MarshalAs(UnmanagedType.Bool)]
186
+ private static extern bool CreateProcessW(
187
+ string applicationName,
188
+ StringBuilder commandLine,
189
+ IntPtr processAttributes,
190
+ IntPtr threadAttributes,
191
+ [MarshalAs(UnmanagedType.Bool)] bool inheritHandles,
192
+ uint creationFlags,
193
+ IntPtr environment,
194
+ string currentDirectory,
195
+ ref STARTUPINFO startupInfo,
196
+ out PROCESS_INFORMATION processInformation);
197
+
198
+ [DllImport("kernel32.dll", SetLastError = true)]
199
+ private static extern uint ResumeThread(IntPtr thread);
200
+
201
+ [DllImport("kernel32.dll", SetLastError = true)]
202
+ [return: MarshalAs(UnmanagedType.Bool)]
203
+ private static extern bool GetExitCodeProcess(IntPtr process, out uint exitCode);
204
+
205
+ [DllImport("kernel32.dll", SetLastError = true)]
206
+ [return: MarshalAs(UnmanagedType.Bool)]
207
+ private static extern bool TerminateProcess(IntPtr process, uint exitCode);
208
+
209
+ [DllImport("kernel32.dll", SetLastError = true)]
210
+ private static extern uint WaitForSingleObject(IntPtr handle, uint milliseconds);
211
+
212
+ [DllImport("kernel32.dll", SetLastError = true)]
213
+ [return: MarshalAs(UnmanagedType.Bool)]
214
+ private static extern bool CloseHandle(IntPtr handle);
215
+ }
@@ -0,0 +1,117 @@
1
+ Set-StrictMode -Version Latest
2
+ $ErrorActionPreference = 'Stop'
3
+
4
+ $utf8 = New-Object System.Text.UTF8Encoding($false)
5
+ [Console]::InputEncoding = $utf8
6
+ [Console]::OutputEncoding = $utf8
7
+
8
+ if ([System.Environment]::OSVersion.Platform -ne [System.PlatformID]::Win32NT) {
9
+ throw 'formal_process_supervisor_platform_unsupported'
10
+ }
11
+
12
+ $nativeSources = @(
13
+ Join-Path $PSScriptRoot 'formal_process_supervisor_native_types.cs'
14
+ Join-Path $PSScriptRoot 'formal_process_supervisor_native_run.cs'
15
+ Join-Path $PSScriptRoot 'formal_process_supervisor_native_helpers.cs'
16
+ )
17
+ Add-Type -Path $nativeSources
18
+
19
+ function Get-ExactProperty {
20
+ param(
21
+ [Parameter(Mandatory = $true)] [object] $Object,
22
+ [Parameter(Mandatory = $true)] [string] $Name
23
+ )
24
+ $matches = @($Object.PSObject.Properties | Where-Object { $_.Name -ceq $Name })
25
+ if ($matches.Count -ne 1) { throw 'formal_process_supervisor_request_shape' }
26
+ return $matches[0]
27
+ }
28
+
29
+ while (($line = [Console]::In.ReadLine()) -ne $null) {
30
+ if ([string]::IsNullOrWhiteSpace($line)) { continue }
31
+ $request = $null
32
+ $requestId = $null
33
+ $requestStage = 'json'
34
+ try {
35
+ [FormalProcessSupervisor]::AssertUniqueJsonObjectKeys($line)
36
+ $request = $line | ConvertFrom-Json
37
+ if ($null -eq $request -or $request -is [System.Array] -or $request -is [string]) {
38
+ throw 'formal_process_supervisor_request_shape'
39
+ }
40
+ $expected = @('schema_version', 'request_id', 'executable', 'argv', 'cwd', 'stdout_path', 'stderr_path', 'timeout_ms', 'combined_output_limit_bytes', 'environment')
41
+ $actual = @($request.PSObject.Properties | ForEach-Object { $_.Name } | Sort-Object)
42
+ $requestStage = 'fields'
43
+ if (@(Compare-Object ($expected | Sort-Object) $actual -CaseSensitive).Count -ne 0) {
44
+ throw 'formal_process_supervisor_request_shape'
45
+ }
46
+ $requestStage = 'properties'
47
+ $schemaVersion = (Get-ExactProperty $request 'schema_version').Value
48
+ $requestId = (Get-ExactProperty $request 'request_id').Value
49
+ $executable = (Get-ExactProperty $request 'executable').Value
50
+ $argv = (Get-ExactProperty $request 'argv').Value
51
+ $cwd = (Get-ExactProperty $request 'cwd').Value
52
+ $stdoutPath = (Get-ExactProperty $request 'stdout_path').Value
53
+ $stderrPath = (Get-ExactProperty $request 'stderr_path').Value
54
+ $timeoutMs = (Get-ExactProperty $request 'timeout_ms').Value
55
+ $combinedOutputLimit = (Get-ExactProperty $request 'combined_output_limit_bytes').Value
56
+ $environmentObject = (Get-ExactProperty $request 'environment').Value
57
+ $requestStage = 'values'
58
+ if ($schemaVersion -isnot [string] -or $schemaVersion -cne 'formal-process-supervisor-request-v1' -or
59
+ $requestId -isnot [string] -or $executable -isnot [string] -or $cwd -isnot [string] -or
60
+ $stdoutPath -isnot [string] -or $stderrPath -isnot [string] -or
61
+ $argv -isnot [System.Array] -or
62
+ (($timeoutMs -isnot [int]) -and ($timeoutMs -isnot [long])) -or
63
+ (($combinedOutputLimit -isnot [int]) -and ($combinedOutputLimit -isnot [long])) -or
64
+ $null -eq $environmentObject -or $environmentObject -is [System.Array] -or $environmentObject -is [string]) {
65
+ throw 'formal_process_supervisor_request_shape'
66
+ }
67
+ foreach ($argument in $argv) {
68
+ if ($argument -isnot [string]) { throw 'formal_process_supervisor_request_shape' }
69
+ }
70
+ $requestStage = 'environment'
71
+ $seenEnvironment = @{}
72
+ $environment = @(
73
+ $environmentObject.PSObject.Properties |
74
+ Sort-Object Name |
75
+ ForEach-Object {
76
+ $environmentName = [string]$_.Name
77
+ if ($seenEnvironment.ContainsKey($environmentName)) {
78
+ throw ('formal_process_supervisor_request_shape:environment_duplicate:{0}' -f $environmentName)
79
+ }
80
+ if ([string]::IsNullOrEmpty($environmentName) -or
81
+ $environmentName.IndexOf([char]61) -ge 0 -or
82
+ $environmentName.IndexOf([char]0) -ge 0 -or
83
+ $environmentName.IndexOf([char]13) -ge 0 -or
84
+ $environmentName.IndexOf([char]10) -ge 0) {
85
+ throw ('formal_process_supervisor_request_shape:environment_name:{0}' -f $environmentName)
86
+ }
87
+ if ($_.Value -isnot [string]) {
88
+ throw ('formal_process_supervisor_request_shape:environment_value:{0}:{1}' -f $environmentName, $_.Value.GetType().FullName)
89
+ }
90
+ $seenEnvironment[$environmentName] = $true
91
+ '{0}={1}' -f $environmentName, $_.Value
92
+ }
93
+ )
94
+ $requestStage = 'native_run'
95
+ $result = [FormalProcessSupervisor]::Run(
96
+ [string]$requestId,
97
+ [string]$executable,
98
+ [string[]]$argv,
99
+ [string]$cwd,
100
+ [string]$stdoutPath,
101
+ [string]$stderrPath,
102
+ [int]$timeoutMs,
103
+ [long]$combinedOutputLimit,
104
+ [string[]]$environment
105
+ )
106
+ [Console]::Out.WriteLine(($result | ConvertTo-Json -Compress -Depth 8))
107
+ [Console]::Out.Flush()
108
+ }
109
+ catch {
110
+ $failure = [ordered]@{
111
+ RequestId = if ($requestId -is [string]) { [string]$requestId } else { $null }
112
+ Error = '{0}:{1}' -f $requestStage, [string]$_.Exception.Message
113
+ }
114
+ [Console]::Out.WriteLine(($failure | ConvertTo-Json -Compress))
115
+ [Console]::Out.Flush()
116
+ }
117
+ }
@@ -12,6 +12,7 @@ Commission the smallest sufficient resource set for the user's explicit output/d
12
12
  - A raw proposal, plan, brief, screenshot or existing resource is valid input. Never require or create a special intermediary planning format, and never rewrite caller-owned Source except for the one explicitly selected proposal reconciliation.
13
13
  - The explicit output/development scope is a hard ceiling. Necessary surrounding context may orient the slice but cannot expand it. Report an outside-ceiling effect as existing `decision-required` with reason `scope-expansion-required`; only explicit user expansion changes the ceiling.
14
14
  - Candidates are ordinary external Source. They do not select themselves, become `exact-target`, update `DESIGN.md`/Context or prove implementation acceptance.
15
+ - A selected task design does not update the project design system. DRA may emit only the non-authoritative Authority Delta Assessment; it never invokes Design System Authoring, selects a system candidate or adopts Authority.
15
16
  - Keep candidate effects in a task-local buffer. Only after explicit selection or explicitly delegated selection may accepted decisions be reconciled once and idempotently into the initial proposal; never write rejected/unresolved meaning as accepted.
16
17
  - Never mutate `project_context/**`, `DESIGN.md`, a Delivery Contract, production code or tests as a resource-authoring side effect.
17
18
  - Do not require a prototype, fidelity pair, provider-native file, fixed directory, variant count, resource pack or one artifact per control. Reuse selected component families and group repeated controls.
@@ -26,8 +27,9 @@ Commission the smallest sufficient resource set for the user's explicit output/d
26
27
  1. Always read [resource-selection.md](references/resource-selection.md) to fix the scope ceiling, authoritative product/surface inputs, intent, input roles, style dependency and minimum commission.
27
28
  2. Read [open-design-provider.md](references/open-design-provider.md) only before live capability discovery, provider execution, Design Authority binding, source acquisition or recovery.
28
29
  3. Read [downstream-handoff.md](references/downstream-handoff.md) only when selection, proposal reconciliation or downstream handoff is material. A simple unselected preview may stop without it.
29
- 4. Read [implementation-feasibility.md](references/implementation-feasibility.md) before commissioning or publishing a Web/App implementation handoff against a real repository substrate. Reference-only and non-implementation resources never load it.
30
- 5. Read [formal-selected-web-app-handoff.md](references/formal-selected-web-app-handoff.md) completely only for an explicitly final selected Web/App implementation handoff. Exploration, unselected previews, reference-only resources and non-Web/App commissions never load this reference.
30
+ 4. Read [authority-delta-assessment.md](references/authority-delta-assessment.md) after task-direction selection whenever a downstream handoff is being prepared. It owns the lightweight post-DRA system-delta judgment and explicit DSA stop.
31
+ 5. Read [implementation-feasibility.md](references/implementation-feasibility.md) before commissioning or publishing a Web/App implementation handoff against a real repository substrate. Reference-only and non-implementation resources never load it.
32
+ 6. Read [formal-selected-web-app-handoff.md](references/formal-selected-web-app-handoff.md) completely only for an explicitly final selected Web/App implementation handoff. Exploration, unselected previews, reference-only resources and non-Web/App commissions never load this reference.
31
33
 
32
34
  For simple-preview overhead accounting, the requested preview is neither additional Provider generation nor an added tool action.
33
35
 
@@ -44,6 +46,7 @@ For simple-preview overhead accounting, the requested preview is neither additio
44
46
  7. Bind style-bearing provider work to the adopted design-system identity, send only the scoped product/resource commission and keep provider execution, model-selection verification, Artifact readiness, Design suitability, human selection and authority adoption distinct.
45
47
  8. Iterate within scope. Re-review applicable suitability checks after every material revision. A first render with no material Source, feasibility or suitability defect may be selected directly; never require a revision merely to satisfy process. Exploration returns a visible candidate after minimal sanity review. When direction review or selection is material, use the downstream owner's `Design Resource Review & Selection Stop`; it is not approval, acceptance, formal completeness or persistent state. Do not burden exploration with handoff schema, hashes, complete Fact closure or downstream validation.
46
48
  9. After direction selection, preserve canonical immutable identity and editable-upstream provenance. For a selected formal Web/App handoff, complete the formal reference's closure first and return to the review stop if it exposes a new visible decision. Reconcile accepted proposal effects once only after stable formal closure; non-formal small requests retain their one-turn option.
49
+ 10. Before downstream handoff, perform the reference-owned Authority Delta Assessment against the complete current Design Authority closure. `consistent_with_current_authority` continues without DSA; a task-only variance declares forbidden precedent; a reusable local variance requires its durable owner decision; an `authority_delta_candidate` returns a non-authoritative packet and stops for a separate explicit `$design-system-authoring` invocation. After adoption, rebind the handoff to the new closure identity and rerun affected validation.
47
50
 
48
51
  ## Conditional Design Authority stop
49
52
 
@@ -57,4 +60,4 @@ Style-bearing design resources require an adopted project design system. Explici
57
60
 
58
61
  Route durable system adoption/repair to `context_uiux_design`, surface responsibility to `context_surface_contract`, ordinary implementation to the default Workflow Contract/current Goal, and machine-assurance delivery to an explicitly selected/resumed `long-task-workflow`.
59
62
 
60
- Report intent-sized results: scope/context/exclusions, style gate, input roles, resource dispositions, provider/binding status, visible artifacts/locators, selection basis, immutable/editable provenance, limitations/decision gaps and proposal-reconciliation status. A formal handoff additionally reports exactly what its dedicated reference requires. Never call a failing, unresolved, incomplete or unselected result ready.
63
+ Report intent-sized results: scope/context/exclusions, style gate, input roles, resource dispositions, provider/binding status, visible artifacts/locators, selection basis, immutable/editable provenance, limitations/decision gaps, proposal-reconciliation status and exactly one Authority Delta Assessment when a handoff is prepared. A formal handoff additionally reports exactly what its dedicated reference requires. Never call a failing, unresolved, incomplete or unselected result ready.
@@ -0,0 +1,52 @@
1
+ # Authority Delta Assessment
2
+
3
+ Run this lightweight assessment only after the task resource direction is selected and, for a formal Web/App handoff, its selected-source closure is stable. It asks whether the selected task design changes durable Design Authority. It is neither Proposal–Resource reconciliation nor an acceptance/adoption Gate.
4
+
5
+ ## Bind the current Authority
6
+
7
+ Read the complete current project Design Authority closure. A new style-bearing or mixed handoff binds the exact `repository-closure` identity: `format_version`, root `DESIGN.md`, optional `design_system/authority.manifest.json`, closure digest and human revision diagnostic. Bundle format additionally requires the exact body-leading `<!-- ty-context-design-authority-format: bundle-v1 -->` declaration; marker/manifest mismatch is invalid rather than legacy. Legacy omission is only backward compatibility for a true unmarked one-file project. Never compare revision alone.
8
+
9
+ If the closure changed after resource selection, re-read it and reassess the selected task design. Do not reuse a stale assessment.
10
+
11
+ ## Exactly three assessments
12
+
13
+ ### `consistent_with_current_authority`
14
+
15
+ Use only when concrete current tokens/components/rules cover the selected task design and `observed_variances` is empty. Cite exact token keys, component keys and local Authority rule anchors. This is evidence-backed Agent judgment, not machine acceptance, and it does not invoke Design System Authoring.
16
+
17
+ ### `task_local_variance`
18
+
19
+ Use for a deliberate deviation that must not silently become a system rule.
20
+
21
+ - A one-task deviation declares `durability: task_only` and `precedent: forbidden`. It may remain in the task handoff, creates no cross-task memory and is never reused as precedent.
22
+ - A reusable local rule declares `durability: cross_task_candidate` and one required Screen Contract owner. Before handoff, the user must explicitly update that owner, explicitly start Design System Authoring for a system-level rule, or abandon the durable claim. DRA changes neither owner automatically.
23
+
24
+ State scope, reason and affected current rule anchors. Do not accumulate ownerless exceptions.
25
+
26
+ ### `authority_delta_candidate`
27
+
28
+ Use only when the selected task design proposes a reusable long-lived Token, component, pattern, motion or platform change. Produce a non-authoritative packet based on the exact current closure identity, with keyed proposed changes/rationales, supporting resource anchors and representative scenarios. At least one proposal and one representative scenario are required.
29
+
30
+ DRA stops after producing the packet. Tell the user to explicitly invoke `$design-system-authoring` in `reconcile` mode. DRA never invokes it, selects a system candidate or adopts Authority.
31
+
32
+ ## Strict data boundary
33
+
34
+ When a replayable assessment file is warranted, use the package `design-authority-delta-assessment-v1` JSON shape and validate it read-only:
35
+
36
+ ```text
37
+ ty-context design-resource authority-delta validate <assessment.json> --json
38
+ ```
39
+
40
+ The codec accepts only:
41
+
42
+ - `consistent_with_current_authority` with concrete evidence and no variance;
43
+ - `task_local_variance` with exactly one durability branch;
44
+ - `authority_delta_candidate` with the complete proposed-change categories.
45
+
46
+ It rejects `status`, `passed`, `selected`, `adopted`, `authority_updated` and unknown fields. Validation proves structural integrity and current base identity only. It performs no write, selection, DSA invocation, adoption or production conformance.
47
+
48
+ ## Handoff consequence
49
+
50
+ For `consistent_with_current_authority` and a valid task-only variance, return the assessment with the normal DRA handoff. A cross-task candidate blocks an unqualified durable-memory claim until its owner decision closes. An Authority delta candidate blocks system-adoption claims and waits for explicit DSA; the selected task resource may continue only as a user-approved task-only variance or after adoption/rebinding.
51
+
52
+ After a DSA adoption, bind the DRA handoff to the new complete closure identity and rerun affected preflight/resource verification before downstream handoff. Page/resource selection never implies system adoption.
@@ -8,6 +8,8 @@ Generated resources remain ordinary external Source. Preserve enough identity an
8
8
  - **Selection:** explicit user/team choice, or explicit delegation with known criteria; it permits proposal reconciliation and selected-source preparation.
9
9
  - **Authority adoption:** later UI Authority Closure reconciles selected Source with surface/interaction Context and `DESIGN.md` and binds implementation/verification to declared conditions.
10
10
 
11
+ Task-resource selection is not design-system adoption. Before downstream handoff, load the dedicated Authority Delta Assessment reference. DRA can classify the selected task design as current-system-consistent, a bounded local variance or a system-delta candidate; none of those classifications adopts Authority.
12
+
11
13
  This Skill may preserve an input already classified `exact-target`; it cannot promote its own candidate. Unknown coverage remains unknown. Resource hashes, provider success and previews establish neither selection nor production conformance.
12
14
 
13
15
  A selection binds the canonical selected-source digest, target identity, declared conditions and controlling Source/Design-Authority identity. Preview URLs, names, PNGs, export archives and wrappers are derived artifacts, not the selection identity. A derived artifact proved equivalent to that canonical source under the bound target/conditions preserves selection; a visible or semantic difference requires fresh Design suitability review and another user choice.
@@ -52,11 +54,13 @@ Exploration returns the visible candidate, scope, dispositions, obvious limitati
52
54
 
53
55
  A non-formal selected-source handoff preserves target/resource classification, conditions, immutable identity, editable-upstream route, coverage/limitations and proposal identity in a project-native location authorized by the user. It remains ordinary Source.
54
56
 
57
+ Every prepared style-bearing or mixed handoff also binds the complete current project Design Authority closure, not only a human revision label or raw `DESIGN.md` digest. If a subordinate owner changes, the old handoff is stale even when revision text is unchanged. Legacy omission is backward compatibility only for a true one-file Authority.
58
+
55
59
  For an explicitly selected Web/App implementation handoff, stop here and read [implementation-feasibility.md](implementation-feasibility.md) followed by [formal-selected-web-app-handoff.md](formal-selected-web-app-handoff.md). UI symbolic V2 is explicit opt-in; V1 remains the default. Those references own the real-substrate feasibility Source, strict manifest-backed V1/symbolic V2, Census/Fact/method and bundle/preflight rules. If closure exposes a new visible decision, return here for suitability review and the Review & Selection Stop; only stable closure returns for the one Proposal reconciliation. Do not approximate formal rules from this lightweight reference.
56
60
 
57
61
  ## Downstream routing
58
62
 
59
- The default Workflow opens every affected selected `exact-target` or `constraint` plus current feasibility Source, routes design meaning through owning surface/Design Authority, selects an allowed implementation strategy during Architecture Deliberation, implements through the real production entry, runs applicable current-candidate checks, and reports blockers or unestablished conditions. It does not require machine-unique binding selection. When no reliable project-native check observes a production claim, report it as `Unverified`; preflight or model judgment cannot promote it. It does not rebuild a per-Fact proof ledger.
63
+ The default Workflow opens every affected selected `exact-target` or `constraint` plus current feasibility Source, routes design meaning through owning surface/Design Authority, selects an allowed implementation strategy during Architecture Deliberation, implements through the real production entry, runs applicable current-candidate checks, and reports blockers or unestablished conditions. It does not infer system adoption from a selected task resource or require machine-unique binding selection. When no reliable project-native check observes a production claim, report it as `Unverified`; preflight or model judgment cannot promote it. It does not rebuild a per-Fact proof ledger.
60
64
 
61
65
  An active Long-Task uses its one Source/Contract/Authority/Final Gate lifecycle. Existing component bindings must uniquely derive an allowed realization for every candidate-bearing cell and must all be attributed back to an allowing candidate-bearing cell; shared bindings are attributed across the complete surface, not forced onto each target. A surface with empty component refs is admitted only by complete Source-aware activation when every target is all-blocker-only; standalone structure validation, candidate/mixed/legacy targets and fake component bindings remain strict failures. Every `file`/`path_glob` target and carrier, every `verified` carrier and every non-empty planned carrier must be a proven subset of an observed component or route root; partial or unknown containment fails. Exact `path#source-item-key` Claims carry selected planned-owner/required-realization decisions, while every blocker is either `decision_required` or an open/closed target-blocking External Confirmation over affected current-target Claims. An open confirmation may project only its externally blocked design Assertions from machine execution and reaches `blocked_external`, never `machine_accepted`; it does not mutate the Contract or create a second Gate. The resource handoff, feasibility document and controlling technical authority are Source and bind only through existing Contract surfaces; this Skill creates no Contract Draft, Outcome, Progress, Evidence, Receipt, Check result or Gate. Historical Provider, preflight, DRA-audit or project-check results never replace current-candidate evidence in the existing Final Gate.
62
66
 
@@ -1,21 +1,23 @@
1
1
  ---
2
2
  name: design-system-authoring
3
- description: Use only when the user explicitly asks to initialize, generate, choose, adopt, replace or repair a project design system or design style with Open Design; asks for “初始化设计系统”, “生成设计系统”, “确定设计风格”, “采纳 Open Design 设计系统”, or explicitly invokes design-system-authoring in a Minimal Context Harness project. This cold-start capability never runs merely because DESIGN.md is missing, a project is new, another Skill needs visual style, or ordinary UI work begins.
3
+ description: Use only when the user explicitly asks to bootstrap, revise, reconcile, choose, adopt, replace or repair a project design system or design style with Open Design; asks for “初始化设计系统”, “生成设计系统”, “确定设计风格”, “采纳 Open Design 设计系统”, explicitly promotes a DRA Authority delta candidate, or invokes design-system-authoring in a Minimal Context Harness project. This capability never runs merely because DESIGN.md is missing, a project is new, DRA found a candidate delta, another Skill needs visual style, or ordinary UI work begins.
4
4
  ---
5
5
 
6
6
  # Design System Authoring
7
7
 
8
- Generate or select an Open Design design system, obtain an explicit selection, and adopt that selection into the project's existing durable Design Authority. The user invokes this Skill at project cold start or later repair time; installation only makes it available.
8
+ Bootstrap, revise or reconcile an Open Design design-system candidate, obtain an explicit selection, then require a separate explicit adoption confirmation before changing the project's durable Design Authority. Installation only makes the Skill available.
9
9
 
10
10
  ## Hard boundaries
11
11
 
12
12
  - Run only from an explicit user request. Never auto-run from `init`, `sync`, the default Workflow, `design-resource-authoring`, a missing/starter `DESIGN.md`, or a new-project inference.
13
+ - A DRA `authority_delta_candidate` is non-authoritative input, not permission to invoke this Skill or adopt anything. The user must explicitly start `reconcile` mode.
13
14
  - A combined explicit user request to initialize the system and then generate resources authorizes that sequence; a resource gate alone does not.
14
15
  - Open Design owns generation, revision, previews and its catalogue. Use its live structured capabilities; do not copy its prompts, emulate its generator, vendor a catalogue or invent provider IDs.
15
- - Keep candidate generation, human/delegated selection and authority adoption distinct. A successful job or attractive preview is not selected and is not project authority.
16
- - Project `DESIGN.md` and its one declared authored exact-value token source or generation direction are canonical. An Open Design design-system record and project binding are provider synchronization, not a second authority.
16
+ - Keep candidate generation, human/delegated selection, and the later explicit adoption confirmation distinct. A successful job, attractive preview, selected task resource or selected system candidate is not project authority.
17
+ - Root `DESIGN.md` is the unique Authority entry and revision owner. In this bundle version its supported front matter remains the editable exact Token authority; `design_system/tokens.json` is deterministic generated output, and a sparse `design_system/authority.manifest.json` owns closure membership/digest only. Bundle adoption must insert the exact `<!-- ty-context-design-authority-format: bundle-v1 -->` line at the fixed first non-empty Markdown body position and create the manifest in the same adoption. None is a second independently editable Authority.
18
+ - Create subordinate component/pattern/motion/platform owners only for real reusable durable rules. Never scaffold a mandatory full taxonomy.
17
19
  - Put durable surface, information-architecture and interaction facts in their owning `project_context/**`; put visual-system semantics, rationale, token direction and reference interpretation in `DESIGN.md`. Do not duplicate facts across owners.
18
- - Do not create a design registry, receipt, workflow state, Contract, acceptance gate or provider runtime inside Tiny Context.
20
+ - Do not create a design registry, receipt, workflow state, Contract, acceptance gate or provider runtime inside Tiny Context. The package's local `@google/design.md` adapter and Authority codecs are deterministic lint/export/validation tools, not Open Design generation.
19
21
  - Do not persistently install/configure MCP, plugins, authentication or disclosure paths without separate authorization. Task-local use of an already available Open Design MCP/daemon is allowed.
20
22
  - Do not implement production UI or claim downstream fidelity, accessibility, product correctness or acceptance.
21
23
 
@@ -26,19 +28,21 @@ Generate or select an Open Design design system, obtain an explicit selection, a
26
28
 
27
29
  ## Core workflow
28
30
 
29
- 1. **Confirm explicit intent and scope.** Identify whether the user wants a new system, selection from existing systems, repair, or replacement; capture the product/brand purpose, supported surface/platform, accessibility needs, required modes and supplied references. Ask only when an unresolved aesthetic or brand choice materially changes the candidates and the user has not delegated selection.
30
- 2. **Inspect current authority.** Read core Context, relevant surface/interaction Context, `DESIGN.md`, its declared token source/generation direction and any recorded Open Design provenance. Classify the project as `unconfigured`, `configured`, or `configured-but-inconsistent`; this is a task-local finding, not new state.
31
- 3. **Discover live Open Design capabilities.** Prefer structured MCP. List/read `od://design-systems/<id>/DESIGN.md`, inspect tool schemas, and feature-detect design-system creation/revision/acceptance plus project binding. Record the live provider/MCP version and any fallback used.
32
- 4. **Reuse or generate candidates.** Reuse an existing provider system only when its identity and meaning fit. If a live MCP creation capability exists, use it. Otherwise use the official daemon generation-job API described in the provider reference. Keep every output a candidate until selection.
33
- 5. **Review and iterate.** Inspect `DESIGN.md`, generated token files, preview/showcase and relevant workspace files. Use provider revision jobs for scoped feedback, poll boundedly, preserve diagnostics and keep pending revisions non-authoritative.
34
- 6. **Obtain selection.** Require an explicit user/team selection, or an explicit instruction delegating selection with known criteria. Record the selection basis, provider design-system ID, selected revision when applicable and immutable content digest/snapshot. Reject or leave other candidates unselected.
35
- 7. **Adopt once.** Reconcile the selected system through the authority-adoption procedure. Update root `DESIGN.md`, establish exactly one authored token source/generation direction, update only owning Context facts, and record provider provenance without making it authoritative.
36
- 8. **Synchronize Open Design.** Accept the selected pending revision when applicable. Confirm MCP can read the adopted provider system. For later style-bearing resource work, create or verify an Open Design project with `create_project.designSystem` equal to the adopted provider ID.
37
- 9. **Validate and report.** Run project-owned Context/design lint and source/package checks appropriate to the repository. Separately report provider execution, artifact readiness, selection, authority adoption, provider synchronization, verification and unresolved issues.
31
+ 1. **Confirm explicit mode and scope.** Use `bootstrap` for an unconfigured project, `revise` for an explicit current-system change, or `reconcile` for a user-promoted DRA Authority delta candidate. Capture product/brand purpose, supported surfaces/platforms, accessibility, modes, immutable constraints and supplied references. Ask only when an unresolved aesthetic or brand choice materially changes candidates and selection was not delegated.
32
+ 2. **Inspect the complete current authority.** Read core and relevant surface Context, root `DESIGN.md`, optional sparse manifest/subordinate owners, generated Tokens and provider provenance. Run read-only closure inspection. Classify `unconfigured`, `configured` or `configured-but-inconsistent` as a task-local finding, not state.
33
+ 3. **Validate reconcile input.** In `reconcile`, require the strict non-authoritative Authority Delta Assessment, validate that its `based_on` closure is still current, then use only its proposed changes, supporting resources, representative scenarios and immutable constraints. A stale packet returns to DRA reassessment.
34
+ 4. **Discover live Open Design capabilities.** Prefer structured MCP. List/read `od://design-systems/<id>/DESIGN.md`, inspect tool schemas, and feature-detect creation/revision/acceptance plus project binding. Record live provider/MCP version and fallback.
35
+ 5. **Reuse or generate candidates.** Reuse an existing provider system only when identity and meaning fit. Otherwise use a live structured creation/revision capability or the official daemon fallback. In `revise`/`reconcile`, generate bounded deltas against the current closure rather than an unrelated replacement. Keep every output a candidate.
36
+ 6. **Review representative scenarios and iterate.** Inspect candidate `DESIGN.md`, exact Token delta, sparse owner delta, preview/showcase and representative scenes. Preserve immutable constraints, migration impact, provider diagnostics and provenance. Pending revisions remain non-authoritative.
37
+ 7. **Obtain system-candidate selection.** Require explicit user/team selection, or explicit delegated selection with known criteria. Record basis, provider ID/revision and immutable digest/snapshot. Reject or leave other candidates unselected.
38
+ 8. **Stop for separate adoption confirmation.** Present the exact project-owner diff, migration impact, new/removed subordinate owners, generated Token change and affected DRA resources. Ask the user to explicitly confirm adoption of this selected system candidate. Candidate selection or an earlier page-resource approval does not satisfy this confirmation.
39
+ 9. **Adopt once after confirmation.** Follow the authority-adoption reference: update root `DESIGN.md`, insert/preserve the canonical body-leading `bundle-v1` marker, update only necessary sparse subordinate owners, deterministic generated Tokens, closure-only manifest/digest, owning Context and provider provenance. Create or remove marker and manifest only as one explicit Authority-format change. Do not copy revision or Token values into the manifest.
40
+ 10. **Rebind and synchronize.** Calculate the new complete closure identity. Rebind affected DRA resources/handoffs to it and rerun affected preflight/representative verification. Accept the selected provider revision when applicable, confirm it is readable, and verify downstream provider project binding.
41
+ 11. **Validate and report.** Run project-owned closure, Token, Context/design lint, source/package and affected DRA checks. Separately report mode, provider execution, artifact readiness, selection, explicit adoption confirmation, changed owners, old/new closure identities, rebinding, provider synchronization, verification and unresolved issues.
38
42
 
39
43
  ## Readiness classification
40
44
 
41
- Treat Design Authority as unconfigured when `DESIGN.md` is absent, explicitly says `Design authority status: unconfigured`, remains an unedited starter, contains only style adjectives/inspiration, or lacks one authored exact-value token source/generation direction. A configured visual system still does not make every surface implementation-ready; selected exact/constraint targets and declared coverage remain separate.
45
+ Treat Design Authority as unconfigured when `DESIGN.md` is absent, explicitly says `Design authority status: unconfigured`, remains an unedited starter, contains only style adjectives/inspiration, or lacks supported authored exact Token values. A configured visual system still does not make every surface implementation-ready; selected exact/constraint targets and declared coverage remain separate.
42
46
 
43
47
  If authority is already configured and the user did not ask to replace or repair it, prefer reuse and explain the current system. Never generate a competing system as filler.
44
48
 
@@ -47,10 +51,12 @@ If authority is already configured and the user did not ask to replace or repair
47
51
  Report:
48
52
 
49
53
  - requested operation and design-system scope;
54
+ - `bootstrap`, `revise` or `reconcile` mode and the exact base closure identity;
50
55
  - Open Design transport/version and capabilities actually used;
51
56
  - candidate IDs and review performed;
52
- - explicit or delegated selection basis;
53
- - adopted `DESIGN.md`, token source and Context owners changed;
57
+ - explicit or delegated selection basis and separate adoption confirmation;
58
+ - adopted `DESIGN.md`, sparse subordinate owners, generated Tokens, manifest and Context owners changed;
59
+ - new closure identity and affected DRA rebinding/revalidation;
54
60
  - provider ID, revision/digest and project-binding verification;
55
61
  - validations run, limitations and decisions still required.
56
62