@intentius/chant 0.101.0 → 0.102.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 (427) hide show
  1. package/dist/agents/checks.d.ts.map +1 -1
  2. package/dist/attrref.d.ts.map +1 -1
  3. package/dist/audit/discover.d.ts.map +1 -1
  4. package/dist/audit/nginx.d.ts.map +1 -1
  5. package/dist/audit/prior-art.d.ts +48 -0
  6. package/dist/audit/prior-art.d.ts.map +1 -1
  7. package/dist/behaviour-kinds.d.ts.map +1 -1
  8. package/dist/builder.d.ts.map +1 -1
  9. package/dist/cli/commands/carve-emit.d.ts.map +1 -1
  10. package/dist/cli/commands/check-lexicon.d.ts +16 -0
  11. package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
  12. package/dist/cli/commands/import.d.ts +8 -0
  13. package/dist/cli/commands/import.d.ts.map +1 -1
  14. package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
  15. package/dist/cli/commands/init.d.ts +19 -0
  16. package/dist/cli/commands/init.d.ts.map +1 -1
  17. package/dist/cli/commands/onboard.d.ts +9 -0
  18. package/dist/cli/commands/onboard.d.ts.map +1 -1
  19. package/dist/cli/commands/pinned-upgrade.d.ts +19 -5
  20. package/dist/cli/commands/pinned-upgrade.d.ts.map +1 -1
  21. package/dist/cli/handlers/dev.d.ts.map +1 -1
  22. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  23. package/dist/cli/handlers/misc.d.ts.map +1 -1
  24. package/dist/cli/handlers/operator.d.ts +9 -0
  25. package/dist/cli/handlers/operator.d.ts.map +1 -1
  26. package/dist/cli/handlers/run.d.ts.map +1 -1
  27. package/dist/cli/lsp/server.d.ts.map +1 -1
  28. package/dist/cli/main.d.ts.map +1 -1
  29. package/dist/cli/mcp/server.d.ts.map +1 -1
  30. package/dist/cli/mcp/tools/build.d.ts.map +1 -1
  31. package/dist/cli/mcp/tools/composites.d.ts.map +1 -1
  32. package/dist/cli/mcp/tools/explain.d.ts.map +1 -1
  33. package/dist/cli/mcp/tools/import.d.ts.map +1 -1
  34. package/dist/cli/mcp/tools/lint.d.ts.map +1 -1
  35. package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -1
  36. package/dist/cli/mcp/tools/search.d.ts.map +1 -1
  37. package/dist/cli/mcp/workspace-tools.d.ts +1 -1
  38. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  39. package/dist/cli/registry.d.ts +11 -2
  40. package/dist/cli/registry.d.ts.map +1 -1
  41. package/dist/codegen/fetch.d.ts.map +1 -1
  42. package/dist/codegen/naming.d.ts.map +1 -1
  43. package/dist/codegen/pinned-upgrade.d.ts +67 -3
  44. package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
  45. package/dist/codegen/registry.d.ts.map +1 -1
  46. package/dist/components/capability-plugin-loader.d.ts.map +1 -1
  47. package/dist/components/capability.d.ts.map +1 -1
  48. package/dist/components/driver.d.ts.map +1 -1
  49. package/dist/components/fan-out.d.ts.map +1 -1
  50. package/dist/components/starter-plugin.d.ts.map +1 -1
  51. package/dist/components/verbs/process-runner.d.ts.map +1 -1
  52. package/dist/components/verbs/r2-sync.d.ts.map +1 -1
  53. package/dist/components/verbs/run-agent.d.ts.map +1 -1
  54. package/dist/components/verbs/sbom-generator.d.ts.map +1 -1
  55. package/dist/components/verbs/sign.d.ts.map +1 -1
  56. package/dist/components/verbs/verify.d.ts.map +1 -1
  57. package/dist/components/verbs/vuln-gate.d.ts.map +1 -1
  58. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  59. package/dist/components/verbs/wrangler.d.ts.map +1 -1
  60. package/dist/composite.d.ts.map +1 -1
  61. package/dist/config.d.ts +19 -7
  62. package/dist/config.d.ts.map +1 -1
  63. package/dist/declarable.d.ts +16 -0
  64. package/dist/declarable.d.ts.map +1 -1
  65. package/dist/discovery/cache.d.ts.map +1 -1
  66. package/dist/discovery/fold-import.d.ts +15 -5
  67. package/dist/discovery/fold-import.d.ts.map +1 -1
  68. package/dist/discovery/param-deps.d.ts +16 -0
  69. package/dist/discovery/param-deps.d.ts.map +1 -1
  70. package/dist/discovery/sandbox/policy-wire.d.ts.map +1 -1
  71. package/dist/discovery/specifier-resolve.d.ts +37 -0
  72. package/dist/discovery/specifier-resolve.d.ts.map +1 -0
  73. package/dist/errors.d.ts.map +1 -1
  74. package/dist/fold/fold.d.ts +3 -1
  75. package/dist/fold/fold.d.ts.map +1 -1
  76. package/dist/graph-detail.d.ts.map +1 -1
  77. package/dist/graph-ir.d.ts.map +1 -1
  78. package/dist/graph-layout.d.ts.map +1 -1
  79. package/dist/import/base-parser.d.ts.map +1 -1
  80. package/dist/import/embedded.d.ts +7 -0
  81. package/dist/import/embedded.d.ts.map +1 -1
  82. package/dist/import/parser-options.d.ts +14 -0
  83. package/dist/import/parser-options.d.ts.map +1 -0
  84. package/dist/import/parser.d.ts +17 -0
  85. package/dist/import/parser.d.ts.map +1 -1
  86. package/dist/kubectl-context.d.ts.map +1 -1
  87. package/dist/lexicon-output.d.ts.map +1 -1
  88. package/dist/lexicon-schema.d.ts +3 -3
  89. package/dist/lexicon.d.ts +55 -3
  90. package/dist/lexicon.d.ts.map +1 -1
  91. package/dist/lifecycle/assert-live.d.ts.map +1 -1
  92. package/dist/lifecycle/gate-ledger.d.ts +15 -0
  93. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  94. package/dist/lifecycle/git.d.ts.map +1 -1
  95. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  96. package/dist/lifecycle/observe.d.ts.map +1 -1
  97. package/dist/lifecycle/plan-ledger.d.ts.map +1 -1
  98. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  99. package/dist/lifecycle/scenario.d.ts.map +1 -1
  100. package/dist/lifecycle/status.d.ts.map +1 -1
  101. package/dist/lifecycle/work-lease.d.ts +61 -2
  102. package/dist/lifecycle/work-lease.d.ts.map +1 -1
  103. package/dist/lint/config.d.ts +8 -8
  104. package/dist/lint/engine.d.ts +6 -0
  105. package/dist/lint/engine.d.ts.map +1 -1
  106. package/dist/lsp/lexicon-providers.d.ts.map +1 -1
  107. package/dist/op/activities/activity-contracts.d.ts +11 -11
  108. package/dist/op/activities/apply.d.ts +79 -9
  109. package/dist/op/activities/apply.d.ts.map +1 -1
  110. package/dist/op/activities/decide.d.ts.map +1 -1
  111. package/dist/op/activities/index.d.ts +1 -1
  112. package/dist/op/activities/index.d.ts.map +1 -1
  113. package/dist/op/activities/lexicon-upgrade.d.ts +44 -12
  114. package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -1
  115. package/dist/op/activity-contract.d.ts +1 -1
  116. package/dist/op/activity-failure.d.ts.map +1 -1
  117. package/dist/op/activity-profiles.d.ts.map +1 -1
  118. package/dist/op/builders.d.ts.map +1 -1
  119. package/dist/op/composites/apply-op.d.ts +12 -5
  120. package/dist/op/composites/apply-op.d.ts.map +1 -1
  121. package/dist/op/composites/lexicon-upgrade-op.d.ts +22 -6
  122. package/dist/op/composites/lexicon-upgrade-op.d.ts.map +1 -1
  123. package/dist/op/decide-backend.d.ts.map +1 -1
  124. package/dist/op/decide-read-inputs.d.ts.map +1 -1
  125. package/dist/op/emulator-lifecycle.d.ts +21 -2
  126. package/dist/op/emulator-lifecycle.d.ts.map +1 -1
  127. package/dist/op/gate-approval.d.ts +5 -1
  128. package/dist/op/gate-approval.d.ts.map +1 -1
  129. package/dist/op/gate-wait.d.ts.map +1 -1
  130. package/dist/op/gate.d.ts +19 -3
  131. package/dist/op/gate.d.ts.map +1 -1
  132. package/dist/op/index.d.ts +2 -0
  133. package/dist/op/index.d.ts.map +1 -1
  134. package/dist/op/local-executor.d.ts +6 -0
  135. package/dist/op/local-executor.d.ts.map +1 -1
  136. package/dist/op/operator.d.ts.map +1 -1
  137. package/dist/op/run-context.d.ts +39 -0
  138. package/dist/op/run-context.d.ts.map +1 -0
  139. package/dist/op/run-live.d.ts.map +1 -1
  140. package/dist/op/runtimes/local.d.ts.map +1 -1
  141. package/dist/op/source-archive.d.ts.map +1 -1
  142. package/dist/op/steward-beside.d.ts.map +1 -1
  143. package/dist/op/steward-points.d.ts.map +1 -1
  144. package/dist/op/steward.d.ts.map +1 -1
  145. package/dist/op/types.d.ts +8 -3
  146. package/dist/op/types.d.ts.map +1 -1
  147. package/dist/op/work-lease-run.d.ts +24 -4
  148. package/dist/op/work-lease-run.d.ts.map +1 -1
  149. package/dist/project-root.d.ts.map +1 -1
  150. package/dist/provenance.d.ts +21 -0
  151. package/dist/provenance.d.ts.map +1 -1
  152. package/dist/pseudo-parameter.d.ts.map +1 -1
  153. package/dist/reconcile.d.ts.map +1 -1
  154. package/dist/secret-materialization.d.ts.map +1 -1
  155. package/dist/terraform/emit-source.d.ts.map +1 -1
  156. package/dist/terraform/parse.d.ts.map +1 -1
  157. package/dist/testing.d.ts.map +1 -1
  158. package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -1
  159. package/dist/workspace/__fixtures__/decide-workspace.d.ts +1 -1
  160. package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -1
  161. package/dist/workspace/agent-cli.d.ts +5 -0
  162. package/dist/workspace/agent-cli.d.ts.map +1 -1
  163. package/dist/workspace/box-factory.d.ts +73 -0
  164. package/dist/workspace/box-factory.d.ts.map +1 -0
  165. package/dist/workspace/changes.d.ts.map +1 -1
  166. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -1
  167. package/dist/workspace/checks/boxes.d.ts.map +1 -1
  168. package/dist/workspace/checks.d.ts +5 -0
  169. package/dist/workspace/checks.d.ts.map +1 -1
  170. package/dist/workspace/compose-graph.d.ts +10 -0
  171. package/dist/workspace/compose-graph.d.ts.map +1 -1
  172. package/dist/workspace/conformance/index.d.ts +67 -6
  173. package/dist/workspace/conformance/index.d.ts.map +1 -1
  174. package/dist/workspace/conformance/vitest.d.ts +12 -3
  175. package/dist/workspace/conformance/vitest.d.ts.map +1 -1
  176. package/dist/workspace/conformance/writer.d.ts +368 -0
  177. package/dist/workspace/conformance/writer.d.ts.map +1 -0
  178. package/dist/workspace/decide.d.ts +1 -1
  179. package/dist/workspace/decide.d.ts.map +1 -1
  180. package/dist/workspace/declaration.d.ts +91 -4
  181. package/dist/workspace/declaration.d.ts.map +1 -1
  182. package/dist/workspace/declaration.schema.json +234 -5
  183. package/dist/workspace/generated-files.d.ts.map +1 -1
  184. package/dist/workspace/graph-cache.d.ts.map +1 -1
  185. package/dist/workspace/graph-cli.d.ts +2 -0
  186. package/dist/workspace/graph-cli.d.ts.map +1 -1
  187. package/dist/workspace/identity.d.ts +111 -0
  188. package/dist/workspace/identity.d.ts.map +1 -0
  189. package/dist/workspace/intent-cli.d.ts +7 -4
  190. package/dist/workspace/intent-cli.d.ts.map +1 -1
  191. package/dist/workspace/intent-record.d.ts +8 -1
  192. package/dist/workspace/intent-record.d.ts.map +1 -1
  193. package/dist/workspace/intent.d.ts +149 -5
  194. package/dist/workspace/intent.d.ts.map +1 -1
  195. package/dist/workspace/kinds.d.ts +18 -4
  196. package/dist/workspace/kinds.d.ts.map +1 -1
  197. package/dist/workspace/lineage-hash-index.d.ts.map +1 -1
  198. package/dist/workspace/lineage-lock.d.ts +2 -2
  199. package/dist/workspace/lineage-lock.d.ts.map +1 -1
  200. package/dist/workspace/links.d.ts.map +1 -1
  201. package/dist/workspace/points.d.ts.map +1 -1
  202. package/dist/workspace/principal-classes.d.ts +114 -0
  203. package/dist/workspace/principal-classes.d.ts.map +1 -0
  204. package/dist/workspace/reason-codes.d.ts +21 -1
  205. package/dist/workspace/reason-codes.d.ts.map +1 -1
  206. package/dist/workspace/record-assets.d.ts.map +1 -1
  207. package/dist/workspace/records-checkout.d.ts +54 -0
  208. package/dist/workspace/records-checkout.d.ts.map +1 -0
  209. package/dist/workspace/records-cli.d.ts +27 -1
  210. package/dist/workspace/records-cli.d.ts.map +1 -1
  211. package/dist/workspace/records-close.d.ts +1 -1
  212. package/dist/workspace/records-close.d.ts.map +1 -1
  213. package/dist/workspace/records-since.d.ts.map +1 -1
  214. package/dist/workspace/records-write.d.ts +5 -4
  215. package/dist/workspace/records-write.d.ts.map +1 -1
  216. package/dist/workspace/records.d.ts +15 -0
  217. package/dist/workspace/records.d.ts.map +1 -1
  218. package/dist/workspace/runs-cli.d.ts +164 -0
  219. package/dist/workspace/runs-cli.d.ts.map +1 -0
  220. package/dist/workspace/runs.d.ts +423 -0
  221. package/dist/workspace/runs.d.ts.map +1 -0
  222. package/dist/workspace/source-block.d.ts +1 -1
  223. package/dist/workspace/source-block.d.ts.map +1 -1
  224. package/dist/workspace/status-gates.d.ts +15 -3
  225. package/dist/workspace/status-gates.d.ts.map +1 -1
  226. package/dist/workspace/status.d.ts +10 -0
  227. package/dist/workspace/status.d.ts.map +1 -1
  228. package/dist/workspace/symbols.d.ts +52 -0
  229. package/dist/workspace/symbols.d.ts.map +1 -0
  230. package/dist/workspace/trailer-joins.d.ts +46 -0
  231. package/dist/workspace/trailer-joins.d.ts.map +1 -0
  232. package/dist/workspace/trailers.d.ts +89 -0
  233. package/dist/workspace/trailers.d.ts.map +1 -0
  234. package/dist/workspace/trust/attestor.d.ts.map +1 -1
  235. package/dist/workspace/trust/rotation.d.ts.map +1 -1
  236. package/dist/workspace/trust/seal.d.ts +33 -0
  237. package/dist/workspace/trust/seal.d.ts.map +1 -1
  238. package/dist/workspace/trust/test-repo.d.ts.map +1 -1
  239. package/dist/workspace/work-cli.d.ts +39 -3
  240. package/dist/workspace/work-cli.d.ts.map +1 -1
  241. package/dist/workspace/work-evidence.d.ts +1 -1
  242. package/dist/workspace/work-evidence.d.ts.map +1 -1
  243. package/dist/workspace/work.d.ts +26 -1
  244. package/dist/workspace/work.d.ts.map +1 -1
  245. package/dist/workspace/workspace-principals.schema.json +60 -0
  246. package/dist/workspace/write-scope.d.ts +79 -19
  247. package/dist/workspace/write-scope.d.ts.map +1 -1
  248. package/dist/yaml.d.ts +21 -39
  249. package/dist/yaml.d.ts.map +1 -1
  250. package/package.json +2 -2
  251. package/src/audit/prior-art.ts +15 -0
  252. package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +1 -1
  253. package/src/cli/commands/carve-emit-state.test.ts +4 -0
  254. package/src/cli/commands/carve-emit.ts +5 -19
  255. package/src/cli/commands/check-lexicon.test.ts +62 -1
  256. package/src/cli/commands/check-lexicon.ts +36 -6
  257. package/src/cli/commands/import-live.test.ts +18 -0
  258. package/src/cli/commands/import-parser-options.test.ts +133 -0
  259. package/src/cli/commands/import.ts +21 -3
  260. package/src/cli/commands/init-lexicon/templates/project.ts +1 -1
  261. package/src/cli/commands/init.test.ts +8 -1
  262. package/src/cli/commands/init.ts +23 -8
  263. package/src/cli/commands/lint.test.ts +37 -0
  264. package/src/cli/commands/onboard.test.ts +53 -3
  265. package/src/cli/commands/onboard.ts +52 -4
  266. package/src/cli/commands/pinned-upgrade.ts +73 -33
  267. package/src/cli/handlers/__snapshots__/build-member.test.ts.snap +2 -2
  268. package/src/cli/handlers/components.ts +2 -2
  269. package/src/cli/handlers/dev.ts +8 -6
  270. package/src/cli/handlers/lifecycle.test.ts +67 -0
  271. package/src/cli/handlers/lifecycle.ts +6 -5
  272. package/src/cli/handlers/misc.ts +2 -0
  273. package/src/cli/handlers/operator.ts +87 -3
  274. package/src/cli/handlers/run.test.ts +111 -0
  275. package/src/cli/handlers/run.ts +85 -24
  276. package/src/cli/handlers/scenario.ts +2 -2
  277. package/src/cli/main.test.ts +1 -0
  278. package/src/cli/main.ts +65 -11
  279. package/src/cli/mcp/workspace-tools.test.ts +5 -2
  280. package/src/cli/mcp/workspace-tools.ts +29 -2
  281. package/src/cli/registry.ts +11 -2
  282. package/src/codegen/pinned-upgrade-multi.test.ts +157 -0
  283. package/src/codegen/pinned-upgrade-tags.test.ts +112 -0
  284. package/src/codegen/pinned-upgrade.test.ts +104 -0
  285. package/src/codegen/pinned-upgrade.ts +250 -56
  286. package/src/codegen/testdata/postgres-tags.json +242 -0
  287. package/src/config.test.ts +21 -0
  288. package/src/config.ts +15 -0
  289. package/src/declarable.test.ts +21 -0
  290. package/src/declarable.ts +19 -0
  291. package/src/discovery/fold-composite.test.ts +41 -5
  292. package/src/discovery/fold-import.test.ts +129 -0
  293. package/src/discovery/fold-import.ts +643 -131
  294. package/src/discovery/fold-package-composite.test.ts +264 -0
  295. package/src/discovery/fold-specifiers.test.ts +191 -0
  296. package/src/discovery/param-deps.test.ts +66 -1
  297. package/src/discovery/param-deps.ts +45 -0
  298. package/src/discovery/specifier-resolve.ts +344 -0
  299. package/src/fold/fold.test.ts +39 -1
  300. package/src/fold/fold.ts +83 -9
  301. package/src/fold-provenance.test.ts +140 -0
  302. package/src/graph-ir.test.ts +83 -0
  303. package/src/graph-ir.ts +29 -0
  304. package/src/import/embedded.test.ts +20 -0
  305. package/src/import/embedded.ts +13 -0
  306. package/src/import/parser-options.ts +46 -0
  307. package/src/import/parser.ts +20 -0
  308. package/src/lexicon.ts +55 -3
  309. package/src/lifecycle/gate-ledger.ts +16 -0
  310. package/src/lifecycle/observe.test.ts +18 -0
  311. package/src/lifecycle/observe.ts +6 -4
  312. package/src/lifecycle/snapshot.ts +2 -2
  313. package/src/lifecycle/work-lease.test.ts +1 -1
  314. package/src/lifecycle/work-lease.ts +93 -2
  315. package/src/lint/engine.test.ts +55 -0
  316. package/src/lint/engine.ts +30 -4
  317. package/src/lint/output-docs.test.ts +59 -56
  318. package/src/op/activities/apply.test.ts +189 -5
  319. package/src/op/activities/apply.ts +230 -8
  320. package/src/op/activities/index.ts +3 -0
  321. package/src/op/activities/lexicon-upgrade.test.ts +160 -6
  322. package/src/op/activities/lexicon-upgrade.ts +154 -51
  323. package/src/op/composites/apply-op.ts +12 -5
  324. package/src/op/composites/composites.test.ts +30 -3
  325. package/src/op/composites/lexicon-upgrade-op.test.ts +7 -2
  326. package/src/op/composites/lexicon-upgrade-op.ts +29 -8
  327. package/src/op/emulator-lifecycle.test.ts +23 -0
  328. package/src/op/emulator-lifecycle.ts +52 -14
  329. package/src/op/gate-approval.test.ts +74 -0
  330. package/src/op/gate-approval.ts +5 -1
  331. package/src/op/gate.ts +31 -5
  332. package/src/op/index.ts +2 -0
  333. package/src/op/local-executor.test.ts +15 -0
  334. package/src/op/local-executor.ts +40 -12
  335. package/src/op/local-output.ts +1 -1
  336. package/src/op/operator.ts +4 -0
  337. package/src/op/run-context.test.ts +141 -0
  338. package/src/op/run-context.ts +51 -0
  339. package/src/op/runtimes/local.test.ts +14 -0
  340. package/src/op/runtimes/local.ts +2 -0
  341. package/src/op/steward-beside.ts +2 -0
  342. package/src/op/types.ts +8 -3
  343. package/src/op/work-lease-run.test.ts +47 -0
  344. package/src/op/work-lease-run.ts +73 -11
  345. package/src/provenance.ts +35 -0
  346. package/src/workspace/__fixtures__/studio-template-84c8b21.json +1 -1
  347. package/src/workspace/agent-cli.ts +7 -3
  348. package/src/workspace/agent.schema.json +22 -0
  349. package/src/workspace/box-factory.test.ts +320 -0
  350. package/src/workspace/box-factory.ts +103 -0
  351. package/src/workspace/changes.schema.json +12 -20
  352. package/src/workspace/changes.ts +4 -1
  353. package/src/workspace/checks/boxes.test.ts +2 -0
  354. package/src/workspace/checks.ts +29 -5
  355. package/src/workspace/compose-graph.ts +7 -0
  356. package/src/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +27 -0
  357. package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +95 -0
  358. package/src/workspace/conformance/__writer_fixture__/decisions/points.json +132 -0
  359. package/src/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +48 -0
  360. package/src/workspace/conformance/__writer_fixture__/sessions/session.schema.json +108 -0
  361. package/src/workspace/conformance/__writer_fixture__/work/W-001-the-writer-suite-works-this-item.md +25 -0
  362. package/src/workspace/conformance/__writer_fixture__/work/work.kind.mjs +60 -0
  363. package/src/workspace/conformance/__writer_fixture__/work/work.schema.json +578 -0
  364. package/src/workspace/conformance/conformance.e2e.test.ts +35 -3
  365. package/src/workspace/conformance/index.mjs +30 -3
  366. package/src/workspace/conformance/index.ts +103 -15
  367. package/src/workspace/conformance/vitest.ts +44 -2
  368. package/src/workspace/conformance/writer-conformance.e2e.test.ts +131 -0
  369. package/src/workspace/conformance/writer.test.ts +156 -0
  370. package/src/workspace/conformance/writer.ts +880 -0
  371. package/src/workspace/decide.ts +7 -1
  372. package/src/workspace/declaration.schema.json +234 -5
  373. package/src/workspace/declaration.ts +174 -10
  374. package/src/workspace/graph-cli.ts +5 -2
  375. package/src/workspace/graph.schema.json +247 -0
  376. package/src/workspace/identity.test.ts +196 -0
  377. package/src/workspace/identity.ts +186 -0
  378. package/src/workspace/intent-cli.ts +64 -10
  379. package/src/workspace/intent-record.schema.json +208 -0
  380. package/src/workspace/intent-record.ts +35 -1
  381. package/src/workspace/intent-why.test.ts +274 -0
  382. package/src/workspace/intent.schema.json +718 -7
  383. package/src/workspace/intent.test.ts +11 -2
  384. package/src/workspace/intent.ts +495 -32
  385. package/src/workspace/kinds.ts +44 -37
  386. package/src/workspace/points-write.schema.json +1 -0
  387. package/src/workspace/principal-classes.test.ts +175 -0
  388. package/src/workspace/principal-classes.ts +307 -0
  389. package/src/workspace/reason-codes.test.ts +11 -3
  390. package/src/workspace/reason-codes.ts +24 -1
  391. package/src/workspace/records-amend.schema.json +2 -0
  392. package/src/workspace/records-checkout.ts +106 -0
  393. package/src/workspace/records-cli.ts +103 -11
  394. package/src/workspace/records-close.schema.json +1 -0
  395. package/src/workspace/records-new.schema.json +2 -0
  396. package/src/workspace/records-review.schema.json +2 -0
  397. package/src/workspace/records-uncommitted.test.ts +171 -0
  398. package/src/workspace/records-write.ts +28 -6
  399. package/src/workspace/records.schema.json +72 -1
  400. package/src/workspace/records.ts +27 -0
  401. package/src/workspace/runs-cli.ts +381 -0
  402. package/src/workspace/runs-write.schema.json +583 -0
  403. package/src/workspace/runs.schema.json +810 -0
  404. package/src/workspace/runs.test.ts +242 -0
  405. package/src/workspace/runs.ts +709 -0
  406. package/src/workspace/status-contract.test.ts +5 -0
  407. package/src/workspace/status-gates.ts +22 -8
  408. package/src/workspace/status.schema.json +127 -2
  409. package/src/workspace/status.ts +21 -1
  410. package/src/workspace/symbols.ts +180 -0
  411. package/src/workspace/trailer-joins.test.ts +171 -0
  412. package/src/workspace/trailer-joins.ts +82 -0
  413. package/src/workspace/trailers.ts +148 -0
  414. package/src/workspace/trust/seal.ts +52 -1
  415. package/src/workspace/work-cli.e2e.test.ts +28 -1
  416. package/src/workspace/work-cli.ts +133 -8
  417. package/src/workspace/work-evidence.schema.json +2 -0
  418. package/src/workspace/work-history.schema.json +73 -1
  419. package/src/workspace/work-history.test.ts +48 -5
  420. package/src/workspace/work-kind-fields.test.ts +154 -0
  421. package/src/workspace/work-lease.schema.json +14 -1
  422. package/src/workspace/work.ts +82 -0
  423. package/src/workspace/workspace-principals.schema.json +60 -0
  424. package/src/workspace/write-scope.test.ts +128 -2
  425. package/src/workspace/write-scope.ts +170 -45
  426. package/src/yaml.test.ts +111 -1
  427. package/src/yaml.ts +141 -549
@@ -0,0 +1,95 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "urn:intentius:chant:point-answer:1",
4
+ "title": "Decision point answer front matter",
5
+ "description": "The front matter of one answer to a decision point (ws-058, #2739), as `chant workspace points ask` and `points answer` write it into the records directory of a record kind with an `answers` block. One record per point, declaration and inputs: its id is the point's name and the first 12 hex digits of the inputs hash, so the same question is answered once. A table's answer is `answered`; a model's answer at or above its threshold is `proposed` until a person confirms it; a question no decider before the quorum answered is `escalated`, open for people. A workspace copies this file next to its answer kind, as reference-workspace/answers/ does. Values stay within what YAML and JSON share. Fields other than these must start with x-.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "patternProperties": { "^x-": {} },
9
+ "required": ["id", "title", "point", "point_version", "question_type", "candidates", "inputs", "inputs_hash", "state", "decider", "asked_on"],
10
+ "properties": {
11
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*-[0-9a-f]{12}$", "description": "The point's name, a hyphen, and the first 12 hex digits of inputs_hash." },
12
+ "title": { "type": "string", "minLength": 1 },
13
+ "point": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "description": "The point in the points file this answers." },
14
+ "point_version": { "$ref": "#/definitions/sha256", "description": "sha256 of the point's declaration when it was asked. Editing the question or any decider changes it." },
15
+ "question_type": { "enum": ["noul", "choice", "score"] },
16
+ "candidates": { "type": "array", "minItems": 2, "items": { "type": ["string", "boolean"] }, "description": "The answers the question allowed: true and false, a choice's options, or a score's levels." },
17
+ "inputs": { "type": "object", "description": "The state the deciders saw, input name to value." },
18
+ "inputs_hash": { "$ref": "#/definitions/sha256", "description": "sha256 of the point, its version and its inputs. The same hash is answered once." },
19
+ "constrains": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "What the question is about, such as a work item's id." },
20
+ "state": { "enum": ["escalated", "proposed", "answered"] },
21
+ "answer": { "type": ["string", "boolean"] },
22
+ "decider": {
23
+ "type": "object",
24
+ "required": ["kind"],
25
+ "properties": {
26
+ "kind": { "enum": ["table", "model", "quorum"] },
27
+ "row": { "type": "integer", "minimum": 0, "description": "table: the row that matched." },
28
+ "backend": { "type": "string", "minLength": 1 },
29
+ "model": { "type": "string", "minLength": 1, "description": "model: the model id that answered, as the backend reported it." },
30
+ "count": { "type": "integer", "minimum": 1 },
31
+ "roles": { "type": "array", "items": { "type": "string" } },
32
+ "by": { "type": "array", "items": { "type": "string" }, "description": "quorum: who answered." }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "probabilities": { "$ref": "#/definitions/probabilities" },
37
+ "confidence": { "$ref": "#/definitions/unit" },
38
+ "threshold": { "$ref": "#/definitions/unit" },
39
+ "escalations": {
40
+ "type": "array",
41
+ "description": "The deciders asked before the one that answered, or before the quorum, and why each did not answer.",
42
+ "items": { "$ref": "#/definitions/escalation" }
43
+ },
44
+ "answered_by": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "The people who answered or confirmed it." },
45
+ "asked_on": { "$ref": "#/definitions/date" },
46
+ "answered_on": { "$ref": "#/definitions/date" },
47
+ "source": {
48
+ "type": "object",
49
+ "description": "Where the answer came from (#2708): via, client and model, the model id that answered when a model decider did."
50
+ }
51
+ },
52
+ "allOf": [
53
+ {
54
+ "if": { "properties": { "state": { "const": "proposed" } }, "required": ["state"] },
55
+ "then": { "required": ["answer"], "properties": { "decider": { "properties": { "kind": { "const": "model" } } } } }
56
+ },
57
+ {
58
+ "if": { "properties": { "state": { "const": "answered" } }, "required": ["state"] },
59
+ "then": { "required": ["answer", "answered_on"] }
60
+ },
61
+ {
62
+ "if": { "properties": { "state": { "const": "escalated" } }, "required": ["state"] },
63
+ "then": { "not": { "required": ["answer"] }, "properties": { "decider": { "properties": { "kind": { "const": "quorum" } } } } }
64
+ },
65
+ {
66
+ "if": { "properties": { "decider": { "properties": { "kind": { "const": "model" } }, "required": ["kind"] } }, "required": ["decider"] },
67
+ "then": { "required": ["probabilities", "confidence", "threshold"], "properties": { "decider": { "required": ["backend", "model"] } } }
68
+ },
69
+ {
70
+ "if": { "properties": { "state": { "const": "answered" }, "decider": { "properties": { "kind": { "const": "quorum" } }, "required": ["kind"] } }, "required": ["state", "decider"] },
71
+ "then": { "required": ["answered_by"], "properties": { "decider": { "required": ["by"] } } }
72
+ }
73
+ ],
74
+ "definitions": {
75
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
76
+ "unit": { "type": "number", "minimum": 0, "maximum": 1 },
77
+ "date": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
78
+ "probabilities": { "type": "object", "additionalProperties": { "$ref": "#/definitions/unit" } },
79
+ "escalation": {
80
+ "type": "object",
81
+ "required": ["kind", "reason"],
82
+ "properties": {
83
+ "kind": { "enum": ["table", "model"] },
84
+ "reason": { "type": "string", "minLength": 1 },
85
+ "backend": { "type": "string" },
86
+ "model": { "type": "string" },
87
+ "answer": { "type": ["string", "boolean", "null"] },
88
+ "probabilities": { "$ref": "#/definitions/probabilities" },
89
+ "confidence": { "$ref": "#/definitions/unit" },
90
+ "threshold": { "$ref": "#/definitions/unit" }
91
+ },
92
+ "additionalProperties": false
93
+ }
94
+ }
95
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "$schema": "https://intentius.io/chant/schemas/workspace/decision-points/v1/decision-points.schema.json",
3
+ "points": {
4
+ "slice-tier": {
5
+ "title": "Which builder tier builds this work item",
6
+ "question": {
7
+ "type": "choice",
8
+ "instructions": "Pick the smallest builder tier that can build this work item. The state is how much the work item holds and whether that fits each tier's sizing limits.",
9
+ "criteria": {
10
+ "small": "A haiku-class builder. The work item fits the small limits.",
11
+ "medium": "A mid-size builder. The work item fits the medium limits.",
12
+ "large": "The largest builder. The work item is bigger than the medium limits."
13
+ }
14
+ },
15
+ "inputs": {
16
+ "work-item.criteria": "acceptance criteria in the work item",
17
+ "work-item.files": "distinct paths the work item names",
18
+ "work-item.words": "words in the body outside headings",
19
+ "work-item.fits_small": "whether it is within the small tier's limits",
20
+ "work-item.fits_medium": "whether it is within the medium tier's limits"
21
+ },
22
+ "deciders": [
23
+ {
24
+ "kind": "table",
25
+ "rows": [
26
+ { "when": { "work-item.fits_small": true }, "answer": "small" },
27
+ { "when": { "work-item.fits_medium": true }, "answer": "medium" }
28
+ ]
29
+ },
30
+ { "kind": "model", "backend": "systemone", "model": "bosun-v3.1-1.7b", "threshold": 0.8 },
31
+ { "kind": "quorum", "count": 1 }
32
+ ]
33
+ },
34
+ "ship-skip": {
35
+ "title": "May this release skip the human gate",
36
+ "question": {
37
+ "type": "noul",
38
+ "instructions": "May this release pass the ship gate without a person approving it? The state is what the release would change. No model decider answers this point, since a model's answer may route or report and never authorizes a release.",
39
+ "criteria": {
40
+ "true": "An agent may pass the gate for this release.",
41
+ "false": "A person approves the release at the gate."
42
+ }
43
+ },
44
+ "inputs": {
45
+ "release.first_release": "nothing has shipped yet",
46
+ "release.new_migrations": "migrations that would fire",
47
+ "release.files_changed": "files changed since the serving release",
48
+ "release.app_changed": "whether any file under the app directory changed",
49
+ "release.work_changed": "whether any work item changed",
50
+ "release.units": "work items the release ships"
51
+ },
52
+ "deciders": [
53
+ {
54
+ "kind": "table",
55
+ "rows": [{ "when": {}, "answer": false, "note": "Never, until someone adds a row above this one that says when." }]
56
+ },
57
+ { "kind": "quorum", "count": 1, "note": "The ship gate's quorum: a gate that asks this point takes its approver count from here." }
58
+ ]
59
+ },
60
+ "finding-triage": {
61
+ "title": "What to do about this finding",
62
+ "question": {
63
+ "type": "choice",
64
+ "instructions": "A finding from chant workspace graph --intent, or from chant workspace check --changes, is a gap between what the workspace decided and what it holds. Pick what happens to it. The state is the finding and the region it fired on.",
65
+ "criteria": {
66
+ "work-item": "Someone closes the gap. It becomes a work item whose source names the finding and its region.",
67
+ "needs-a-decision": "The gap is a choice nobody has made. Someone writes a decision before any work starts.",
68
+ "leave": "Nothing happens. The finding is known, accepted or already taken."
69
+ }
70
+ },
71
+ "inputs": {
72
+ "finding.code": "the finding's code",
73
+ "finding.message": "what the finding says",
74
+ "finding.addressed": "whether a work item already addresses it",
75
+ "region.path": "the path the finding fired on",
76
+ "region.member": "the member the region is in",
77
+ "region.generated": "whether the region is a generated file"
78
+ },
79
+ "deciders": [
80
+ {
81
+ "kind": "table",
82
+ "rows": [
83
+ { "when": { "finding.addressed": true }, "answer": "leave", "note": "A work item already addresses it." },
84
+ { "when": { "finding.code": "intent-decision-unimplemented" }, "answer": "work-item", "note": "A decided decision that nobody is carrying out is work." },
85
+ {
86
+ "when": { "finding.code": { "in": ["intent-region-unconstrained", "intent-decision-contested", "intent-decision-superseded-live"] } },
87
+ "answer": "needs-a-decision",
88
+ "note": "No current decision that everyone agrees with covers the region."
89
+ },
90
+ {
91
+ "when": { "finding.code": "change-out-of-scope" },
92
+ "answer": "needs-a-decision",
93
+ "note": "A change crossed a boundary a record draws. Someone decides whether the boundary moves or the change goes, and no model answers leave for it. change-uncovered has no row: whether an uncovered change is work, a decision or nothing depends on what the path is, which the model reads."
94
+ }
95
+ ]
96
+ },
97
+ { "kind": "model", "backend": "systemone", "model": "jev-1.13.0", "threshold": 0.8 },
98
+ { "kind": "quorum", "count": 1 }
99
+ ]
100
+ },
101
+ "needs-a-decision": {
102
+ "title": "Does this change need a decision",
103
+ "question": {
104
+ "type": "noul",
105
+ "instructions": "Does the change need a decision written before it lands? The state is the commits in the change's window that changed its region, as chant workspace graph --intent reads them, and the decisions the change's work item implements.",
106
+ "criteria": {
107
+ "true": "Someone writes a decision that covers the change, or amends one, before it lands.",
108
+ "false": "The decisions already in the workspace cover the change."
109
+ }
110
+ },
111
+ "inputs": {
112
+ "commit.count": "commits in the window that changed the region",
113
+ "commit.undecided": "of those, the commits no decision's path window holds",
114
+ "commit.decided_by_window": "of those, the commits in a decision's window that are not that decision's own work",
115
+ "region.path": "the path the change touches",
116
+ "region.generated": "whether the region is a generated file",
117
+ "work-item.implements": "the decisions the change's work item implements"
118
+ },
119
+ "deciders": [
120
+ {
121
+ "kind": "table",
122
+ "rows": [
123
+ { "when": { "commit.count": 0 }, "answer": false, "note": "Nothing changed in the window." },
124
+ { "when": { "commit.undecided": 0, "commit.decided_by_window": 0 }, "answer": false, "note": "Every commit in the window is a decision's own work." }
125
+ ]
126
+ },
127
+ { "kind": "model", "backend": "systemone", "model": "jev-1.13.0", "threshold": 0.8 },
128
+ { "kind": "quorum", "count": 1 }
129
+ ]
130
+ }
131
+ }
132
+ }
@@ -0,0 +1,48 @@
1
+ // The review-session record kind (#2673, #2650 C10), data only: no imports,
2
+ // no code.
3
+ //
4
+ // chant workspace records --kind design/sessions/session.kind.mjs --json
5
+ // chant workspace records --kind design/sessions/session.kind.mjs --since <open commit> --at <close commit> --json
6
+ // chant workspace records --since S-0002 --json
7
+ // chant workspace records close S-0002
8
+ //
9
+ // A session is a group walking an agenda of records together. It keeps who
10
+ // attended and the verdicts it produced, and it is sealed when it closes.
11
+ // Each verdict it produced is also an entry in the judged decision's reviews
12
+ // list, whose session field names the session. chud's session files (such
13
+ // as sessions/S-0001.json) are the starting shape; sessions are markdown
14
+ // front matter here because that is the only record format chant reads
15
+ // (#2664).
16
+ export const recordKind = {
17
+ name: "session",
18
+ location: { dir: ".", match: "^S-[0-9]{4,}-.+\\.md$" },
19
+ format: "markdown-front-matter",
20
+ schema: { id: "urn:intentius:chant:session:1", path: "session.schema.json" },
21
+ idField: "id",
22
+ stateField: "state",
23
+ states: ["open", "closed"],
24
+ // A closed session never changes: records checks its seal on every read.
25
+ closedStates: ["closed"],
26
+ // The kind contract requires a supersedes declaration (#2664 proposes making
27
+ // it optional). The session schema has no supersedes field, so a session
28
+ // never supersedes another.
29
+ supersedes: { field: "supersedes", key: "session" },
30
+ // verdicts: the verdicts the session produced, each naming a decision.
31
+ // seal: the whole-file seal, sha256: and the hex SHA-256 of the JCS form
32
+ // of the session without closed_digest (front matter as core, the text
33
+ // below it as body, line endings LF), written when the session closes
34
+ // (#2546).
35
+ // subjects: the decisions the verdicts name. Entries of their reviews list
36
+ // (the decision kind's reviews.field) name a session.
37
+ // openedRev, closedRev and closedOn (#2693): the fields records new and
38
+ // records close write, the commits the session opened and closed at and
39
+ // the time it closed. records --since <session id> reads the commits.
40
+ session: {
41
+ verdicts: "verdicts",
42
+ seal: "closed_digest",
43
+ subjects: { kind: "../decisions/decision.kind.mjs" },
44
+ openedRev: "opened_rev",
45
+ closedRev: "closed_rev",
46
+ closedOn: "closed",
47
+ },
48
+ };
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "urn:intentius:chant:session:1",
4
+ "title": "Review session",
5
+ "description": "The front matter of a review-session file (#2673, #2650 C10): a group walking an agenda of records together, who attended, and the verdicts the session produced. Each verdict is also an entry in the judged record's reviews list, whose session field names this session. A closed session is sealed: closed_digest is sha256: and the lowercase hex SHA-256 of the JCS form of the whole session without closed_digest (its front matter as core and the text below it as body, line endings LF, #2546), and chant workspace records checks it on every read (session-seal-mismatch).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "id", "title", "state", "agenda", "attendance", "opened", "closed", "verdicts"],
9
+ "properties": {
10
+ "schema": { "const": 1 },
11
+ "id": {
12
+ "description": "S- and at least four digits, as chud numbers its sessions.",
13
+ "type": "string",
14
+ "pattern": "^S-[0-9]{4,}$"
15
+ },
16
+ "title": { "type": "string", "minLength": 1 },
17
+ "state": { "enum": ["open", "closed"] },
18
+ "agenda": {
19
+ "description": "What the session walks, in order: a record by its id, or an item of free text.",
20
+ "type": "array",
21
+ "minItems": 1,
22
+ "items": {
23
+ "oneOf": [
24
+ {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["record"],
28
+ "properties": { "record": { "type": "string", "minLength": 1 } }
29
+ },
30
+ {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["text"],
34
+ "properties": { "text": { "type": "string", "pattern": "\\S" } }
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ "attendance": {
40
+ "description": "Who joined, with the class of each principal. An agent may attend to prepare and lay out; it never gives a verdict (#2650).",
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["principal", "class"],
46
+ "properties": {
47
+ "principal": { "type": "string", "minLength": 1 },
48
+ "class": { "enum": ["person", "agent"] },
49
+ "roles": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
50
+ }
51
+ }
52
+ },
53
+ "opened": { "$ref": "#/definitions/dateTime" },
54
+ "opened_rev": {
55
+ "description": "The commit HEAD named when chant workspace records new wrote the session (#2693), or null when the repository had no commit yet; the next records amend, review --session or close fills it. chant writes it, and records --since <session id> reads it. Optional, so a session written before #2693 stays valid.",
56
+ "oneOf": [{ "type": "null" }, { "$ref": "#/definitions/rev" }]
57
+ },
58
+ "closed": {
59
+ "description": "When the session closed, or null while it is open.",
60
+ "oneOf": [{ "type": "null" }, { "$ref": "#/definitions/dateTime" }]
61
+ },
62
+ "closed_rev": {
63
+ "description": "The commit HEAD named when chant workspace records close closed the session (#2693), or null when the repository had no commit. Only a closed session has it. Optional, so a session closed before #2693 stays valid.",
64
+ "oneOf": [{ "type": "null" }, { "$ref": "#/definitions/rev" }]
65
+ },
66
+ "verdicts": {
67
+ "description": "The verdicts the session produced, in the order they were given.",
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["record", "principal", "verdict"],
73
+ "properties": {
74
+ "record": { "description": "The id of the record judged.", "type": "string", "minLength": 1 },
75
+ "principal": { "type": "string", "minLength": 1 },
76
+ "verdict": { "enum": ["agree", "dissent", "abstain"] },
77
+ "digest": {
78
+ "description": "The digest of the record text the verdict judged, as the review entry carries it.",
79
+ "type": "string",
80
+ "pattern": "^[0-9a-f]{64}$"
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "closed_digest": {
86
+ "description": "The seal, written when the session closes.",
87
+ "type": "string",
88
+ "pattern": "^sha256:[0-9a-f]{64}$"
89
+ }
90
+ },
91
+ "definitions": {
92
+ "rev": { "type": "string", "pattern": "^[0-9a-f]{40,64}$" },
93
+ "dateTime": {
94
+ "type": "string",
95
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(:[0-9]{2}(\\.[0-9]+)?)?(Z|[+-][0-9]{2}:[0-9]{2})$"
96
+ }
97
+ },
98
+ "if": { "required": ["state"], "properties": { "state": { "const": "closed" } } },
99
+ "then": {
100
+ "description": "A closed session needs its closed time and its seal.",
101
+ "required": ["closed_digest"],
102
+ "properties": { "closed": { "$ref": "#/definitions/dateTime" } }
103
+ },
104
+ "else": {
105
+ "description": "An open session has no closed time, no closing revision and no seal.",
106
+ "properties": { "closed": { "type": "null" }, "closed_rev": false, "closed_digest": false }
107
+ }
108
+ }
@@ -0,0 +1,25 @@
1
+ ---
2
+ schema: 1
3
+ id: "W-001"
4
+ title: "The writer suite works this item"
5
+ state: "open"
6
+ implements: []
7
+ needs: []
8
+ constrains:
9
+ - "member:delivery"
10
+ evidence: []
11
+ acceptance:
12
+ - id: "AC-1"
13
+ text: "A run under the item's lease attaches evidence for this criterion through chant"
14
+ verification: "unit"
15
+ owner: "conformance"
16
+ opened_on: "2026-01-01"
17
+ source:
18
+ kind: "workspace"
19
+ member: "delivery"
20
+ supersedes: []
21
+ ---
22
+
23
+ # The writer suite works this item
24
+
25
+ The writer conformance suite (INTENTIUS/chant#3159) claims this item's lease, renews it, attaches evidence for AC-1 and releases it, each through the writer under test.
@@ -0,0 +1,60 @@
1
+ // The work item record kind (#2683), data only: no imports, no code.
2
+ //
3
+ // chant workspace records --kind work/work.kind.mjs --json
4
+ // chant workspace graph --intent <region> --kind decisions/decision.kind.mjs --kind work/work.kind.mjs
5
+ //
6
+ // A work item is a record in the workspace, with its dependencies written
7
+ // inside it, that people and agents share as one queue with no server. Most
8
+ // come from a gap the intent graph reports, named in `source.finding`.
9
+ // Records are Markdown with front matter: an item keeps its id while its
10
+ // state changes, so it is not content-addressed. ws-053 (#2664) lets a kind
11
+ // read `format: "json"`, but `records new` and `records amend` write Markdown
12
+ // only, so work items stay Markdown until the write commands write JSON.
13
+ export const recordKind = {
14
+ name: "work",
15
+ location: { dir: ".", match: "^W-[0-9]{3,}-.+\\.md$" },
16
+ format: "markdown-front-matter",
17
+ schema: { id: "urn:intentius:chant:work:1", path: "work.schema.json" },
18
+ idField: "id",
19
+ stateField: "state",
20
+ // A proposal opens proposed: an item an agent or a decision point's model
21
+ // suggested (ws-058, #2741). A person keeps it by moving it to open, or drops it.
22
+ states: ["proposed", "open", "in-progress", "done", "dropped"],
23
+ closedStates: ["done", "dropped"],
24
+ // Takes effect from a done or dropped item, the closed states.
25
+ supersedes: { field: "supersedes", key: "work" },
26
+ // records new --by and the MCP records-new tool's by name a proposal's
27
+ // proposer here (#2756).
28
+ proposedBy: { field: "proposed_by" },
29
+ // Evidence is the proof of done: links, or workspace files pinned by hash.
30
+ pins: { field: "evidence" },
31
+ // The same grammar as a decision's: member:, path:, issues and decision ids.
32
+ constrains: { field: "constrains" },
33
+ // Workspace paths the change doing the work must not touch (#2773):
34
+ // chant workspace check --changes --work <id> reports change-out-of-scope.
35
+ outOfScope: { field: "out_of_scope" },
36
+ // needs and implements, the decisions they name, and when an item is ready.
37
+ work: {
38
+ needs: "needs",
39
+ implements: "implements",
40
+ decisions: "../decisions/decision.kind.mjs",
41
+ open: "open",
42
+ done: "done",
43
+ closedOn: "closed_on",
44
+ // What done means, stated on the record (#2772): each criterion expects
45
+ // a verification, and a manual verdict never comes from the owner.
46
+ acceptance: { field: "acceptance", implementer: "owner" },
47
+ // The builder tiers an item may name in tier, declared once here (#3147).
48
+ // The same three the slice-tier decision point answers with.
49
+ tier: { field: "tier", tiers: ["small", "medium", "large"] },
50
+ // An item is left to people after this many failed attempts, counted
51
+ // from its lease history (chant workspace work history). An item's own
52
+ // max_attempts overrides it (#3147).
53
+ attempts: { field: "max_attempts", max: 3 },
54
+ // Decision points' answers about an item are joined from the answer
55
+ // kind by the item's id, never copied onto the item (#3147).
56
+ answers: "../answers/answer.kind.mjs",
57
+ // A workspace with a contract kind links items to contracts with
58
+ // contract: { field: "contract", kind: "<contract kind file>" }.
59
+ },
60
+ };