agentera 3.0.0-dev.4 → 3.0.0-dev.41

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 (840) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +79 -22
  3. package/bundle/.agentera-npx-bundle.json +1 -1
  4. package/bundle/CHANGELOG.md +1261 -0
  5. package/bundle/DESIGN.md +229 -0
  6. package/bundle/LICENSE +201 -0
  7. package/bundle/README.md +136 -0
  8. package/bundle/UPGRADE.md +201 -0
  9. package/bundle/extract-corpus-parity.json +21 -0
  10. package/bundle/fixtures/routing/hybrid-corpus.yaml +154 -0
  11. package/bundle/references/adapters/package-manifest-interface-model.yaml +42 -252
  12. package/bundle/references/adapters/package-publication.json +43 -0
  13. package/bundle/references/adapters/package-registry.yaml +20 -188
  14. package/bundle/references/adapters/package-surface-characterization.md +59 -48
  15. package/bundle/references/adapters/runtime-lifecycle-adapters.yaml +74 -0
  16. package/bundle/references/adapters/runtime-lifecycle-authority.yaml +62 -0
  17. package/bundle/references/adapters/runtime-lifecycle-operation-contract.yaml +84 -0
  18. package/bundle/references/adapters/runtime-retired-resources.yaml +97 -0
  19. package/bundle/references/analysis/benchmark.md +10 -6
  20. package/bundle/references/analysis/evidence-tier-authority.yaml +518 -0
  21. package/bundle/references/analysis/startup-measurement-contract.yaml +37 -26
  22. package/bundle/references/analysis/verification-policy.yaml +143 -0
  23. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +20 -10
  24. package/bundle/references/artifacts/glossary-entry-contract.yaml +1254 -0
  25. package/bundle/references/artifacts/state-storage-authority.yaml +2930 -0
  26. package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
  27. package/bundle/references/cli/agent-ready-state-contract.yaml +133 -71
  28. package/bundle/references/cli/app-lifecycle-vocabulary.yaml +7 -8
  29. package/bundle/references/cli/audience-namespace-cli-migration.yaml +73 -33
  30. package/bundle/references/cli/bundle-skill-vocabulary.yaml +12 -49
  31. package/bundle/references/cli/capability-instruction-contract.yaml +96 -58
  32. package/bundle/references/cli/capability-instruction-structure.md +144 -0
  33. package/bundle/references/cli/capability-tool-classification.yaml +14 -14
  34. package/bundle/references/cli/coexistence-probe.yaml +13 -0
  35. package/bundle/references/cli/hybrid-route-contract.yaml +416 -0
  36. package/bundle/references/cli/parity-expected-actual-template.md +30 -0
  37. package/bundle/references/cli/prime-consumer-compatibility.yaml +701 -0
  38. package/bundle/references/cli/routing-execution-vocabulary.yaml +16 -38
  39. package/bundle/references/cli/routing-model.md +139 -0
  40. package/bundle/references/cli/single-name-protocol.yaml +42 -0
  41. package/bundle/references/cli/trigger-schema-enrichment.md +140 -0
  42. package/bundle/references/cli/update-channels.yaml +35 -2
  43. package/bundle/references/cli/upgrade-repair-wording.md +25 -0
  44. package/bundle/references/cli/v3-handoff-manifest.schema.yaml +97 -0
  45. package/bundle/references/cli/vocabulary-index.yaml +23 -18
  46. package/bundle/references/cli/vocabulary.md +341 -328
  47. package/bundle/references/meta/documentation-inventory.md +10 -3
  48. package/bundle/registry.json +14 -14
  49. package/bundle/skills/agentera/SKILL.md +202 -408
  50. package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +84 -0
  51. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/exit.yaml +2 -2
  52. package/bundle/skills/agentera/capabilities/audit/schemas/triggers.yaml +25 -0
  53. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/validation.yaml +37 -18
  54. package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +102 -0
  55. package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/exit.yaml +6 -5
  56. package/bundle/skills/agentera/capabilities/build/schemas/triggers.yaml +27 -0
  57. package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +176 -0
  58. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/artifacts.yaml +12 -12
  59. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/exit.yaml +5 -5
  60. package/bundle/skills/agentera/capabilities/design/schemas/triggers.yaml +16 -0
  61. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/validation.yaml +7 -7
  62. package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +51 -0
  63. package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/exit.yaml +2 -2
  64. package/bundle/skills/agentera/capabilities/discuss/schemas/triggers.yaml +20 -0
  65. package/bundle/skills/agentera/capabilities/discuss/schemas/validation.yaml +144 -0
  66. package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +80 -0
  67. package/bundle/skills/agentera/capabilities/document/schemas/triggers.yaml +16 -0
  68. package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/validation.yaml +18 -18
  69. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/artifacts.yaml +17 -17
  70. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/exit.yaml +2 -2
  71. package/bundle/skills/agentera/capabilities/optimize/schemas/triggers.yaml +16 -0
  72. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/validation.yaml +9 -9
  73. package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +76 -0
  74. package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/exit.yaml +9 -7
  75. package/bundle/skills/agentera/capabilities/orchestrate/schemas/triggers.yaml +23 -0
  76. package/bundle/skills/agentera/capabilities/orchestrate/schemas/validation.yaml +121 -0
  77. package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +66 -0
  78. package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/exit.yaml +2 -2
  79. package/bundle/skills/agentera/capabilities/plan/schemas/triggers.yaml +23 -0
  80. package/bundle/skills/agentera/capabilities/plan/schemas/validation.yaml +121 -0
  81. package/bundle/skills/agentera/capabilities/profile/schemas/artifacts.yaml +23 -0
  82. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/exit.yaml +6 -5
  83. package/bundle/skills/agentera/capabilities/profile/schemas/triggers.yaml +20 -0
  84. package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +115 -0
  85. package/bundle/skills/agentera/capabilities/research/schemas/artifacts.yaml +24 -0
  86. package/bundle/skills/agentera/capabilities/research/schemas/triggers.yaml +16 -0
  87. package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/validation.yaml +2 -2
  88. package/bundle/skills/agentera/capabilities/status/schemas/artifacts.yaml +73 -0
  89. package/bundle/skills/agentera/capabilities/status/schemas/triggers.yaml +22 -0
  90. package/bundle/skills/agentera/capabilities/{hej → status}/schemas/validation.yaml +5 -5
  91. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/artifacts.yaml +16 -16
  92. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/exit.yaml +7 -6
  93. package/bundle/skills/agentera/capabilities/vision/schemas/triggers.yaml +23 -0
  94. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/validation.yaml +18 -20
  95. package/bundle/skills/agentera/capability_schema_contract.yaml +200 -37
  96. package/bundle/skills/agentera/protocol.yaml +31 -31
  97. package/bundle/skills/agentera/references/contract.md +387 -329
  98. package/bundle/skills/agentera/route-phrases.yaml +81 -0
  99. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +5 -4
  100. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +40 -22
  101. package/bundle/skills/agentera/schemas/artifacts/design.yaml +5 -4
  102. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +15 -19
  103. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +145 -14
  104. package/bundle/skills/agentera/schemas/artifacts/glossary.yaml +82 -0
  105. package/bundle/skills/agentera/schemas/artifacts/health.yaml +58 -21
  106. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +22 -8
  107. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +419 -33
  108. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +143 -53
  109. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +343 -31
  110. package/bundle/skills/agentera/schemas/artifacts/vision.yaml +3 -3
  111. package/dist/analytics/extractCorpus/cli.js +191 -0
  112. package/dist/analytics/extractCorpus/cli.js.map +1 -0
  113. package/dist/analytics/extractCorpus/copilotSessions.js +276 -0
  114. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -0
  115. package/dist/analytics/extractCorpus/core.js +393 -0
  116. package/dist/analytics/extractCorpus/core.js.map +1 -0
  117. package/dist/analytics/extractCorpus/corpus.js +168 -0
  118. package/dist/analytics/extractCorpus/corpus.js.map +1 -0
  119. package/dist/analytics/extractCorpus/coverageAudit.js +261 -0
  120. package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -0
  121. package/dist/analytics/extractCorpus/cursorSessions.js +426 -0
  122. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -0
  123. package/dist/analytics/extractCorpus/evidenceTiers.js +604 -0
  124. package/dist/analytics/extractCorpus/evidenceTiers.js.map +1 -0
  125. package/dist/analytics/extractCorpus/extractCorpusParity.js +106 -0
  126. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -0
  127. package/dist/analytics/extractCorpus/filesystemSources.js +119 -0
  128. package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -0
  129. package/dist/analytics/extractCorpus/index.js +15 -0
  130. package/dist/analytics/extractCorpus/index.js.map +1 -0
  131. package/dist/analytics/extractCorpus/jsonlSessions.js +205 -0
  132. package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -0
  133. package/dist/analytics/extractCorpus/sqliteCaps.js +44 -0
  134. package/dist/analytics/extractCorpus/sqliteCaps.js.map +1 -0
  135. package/dist/analytics/extractCorpus/sqliteSessions.js +368 -0
  136. package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -0
  137. package/dist/analytics/extractCorpus/tierReader.js +109 -0
  138. package/dist/analytics/extractCorpus/tierReader.js.map +1 -0
  139. package/dist/analytics/extractCorpus.js +2 -1790
  140. package/dist/analytics/extractCorpus.js.map +1 -1
  141. package/dist/analytics/glossaryAdviceResolution.js +167 -0
  142. package/dist/analytics/glossaryAdviceResolution.js.map +1 -0
  143. package/dist/analytics/glossaryInputAcquisition.js +320 -0
  144. package/dist/analytics/glossaryInputAcquisition.js.map +1 -0
  145. package/dist/analytics/personalGlossaryAdmission.js +134 -0
  146. package/dist/analytics/personalGlossaryAdmission.js.map +1 -0
  147. package/dist/analytics/personalGlossaryProfile.js +220 -0
  148. package/dist/analytics/personalGlossaryProfile.js.map +1 -0
  149. package/dist/analytics/profileSignals.js +212 -0
  150. package/dist/analytics/profileSignals.js.map +1 -0
  151. package/dist/analytics/usageStats.js +169 -41
  152. package/dist/analytics/usageStats.js.map +1 -1
  153. package/dist/audit/terminologyDrift.js +282 -0
  154. package/dist/audit/terminologyDrift.js.map +1 -0
  155. package/dist/bin/agentera.js +3 -1
  156. package/dist/bin/agentera.js.map +1 -1
  157. package/dist/capabilities/audit/instructions.js +17 -0
  158. package/dist/capabilities/audit/instructions.js.map +1 -0
  159. package/dist/capabilities/build/instructions.js +57 -0
  160. package/dist/capabilities/build/instructions.js.map +1 -0
  161. package/dist/capabilities/design/instructions.js +5 -0
  162. package/dist/capabilities/design/instructions.js.map +1 -0
  163. package/dist/capabilities/discuss/instructions.js +30 -0
  164. package/dist/capabilities/discuss/instructions.js.map +1 -0
  165. package/dist/capabilities/document/instructions.js +12 -0
  166. package/dist/capabilities/document/instructions.js.map +1 -0
  167. package/dist/capabilities/index.js +39 -0
  168. package/dist/capabilities/index.js.map +1 -0
  169. package/dist/capabilities/optimize/instructions.js +15 -0
  170. package/dist/capabilities/optimize/instructions.js.map +1 -0
  171. package/dist/capabilities/orchestrate/instructions.js +41 -0
  172. package/dist/capabilities/orchestrate/instructions.js.map +1 -0
  173. package/dist/capabilities/plan/instructions.js +33 -0
  174. package/dist/capabilities/plan/instructions.js.map +1 -0
  175. package/dist/capabilities/profile/instructions.js +71 -0
  176. package/dist/capabilities/profile/instructions.js.map +1 -0
  177. package/dist/capabilities/research/instructions.js +6 -0
  178. package/dist/capabilities/research/instructions.js.map +1 -0
  179. package/dist/capabilities/status/instructions.js +12 -0
  180. package/dist/capabilities/status/instructions.js.map +1 -0
  181. package/dist/capabilities/status/startupInstructions.js +39 -0
  182. package/dist/capabilities/status/startupInstructions.js.map +1 -0
  183. package/dist/capabilities/vision/instructions.js +5 -0
  184. package/dist/capabilities/vision/instructions.js.map +1 -0
  185. package/dist/cli/appContext.js +30 -23
  186. package/dist/cli/appContext.js.map +1 -1
  187. package/dist/cli/argvalidate.js.map +1 -1
  188. package/dist/cli/capabilityContext/benchmark.js +565 -0
  189. package/dist/cli/capabilityContext/benchmark.js.map +1 -0
  190. package/dist/cli/capabilityContext/bespoke.js +45 -0
  191. package/dist/cli/capabilityContext/bespoke.js.map +1 -0
  192. package/dist/cli/capabilityContext/build.js +244 -0
  193. package/dist/cli/capabilityContext/build.js.map +1 -0
  194. package/dist/cli/capabilityContext/closeout.js +235 -0
  195. package/dist/cli/capabilityContext/closeout.js.map +1 -0
  196. package/dist/cli/capabilityContext/contract.js +214 -0
  197. package/dist/cli/capabilityContext/contract.js.map +1 -0
  198. package/dist/cli/capabilityContext/evidence.js +465 -0
  199. package/dist/cli/capabilityContext/evidence.js.map +1 -0
  200. package/dist/cli/capabilityContext/index.js +4 -0
  201. package/dist/cli/capabilityContext/index.js.map +1 -0
  202. package/dist/cli/capabilityContext/orchestration.js +133 -0
  203. package/dist/cli/capabilityContext/orchestration.js.map +1 -0
  204. package/dist/cli/capabilityContext/planState.js +261 -0
  205. package/dist/cli/capabilityContext/planState.js.map +1 -0
  206. package/dist/cli/capabilityContext/progress.js +143 -0
  207. package/dist/cli/capabilityContext/progress.js.map +1 -0
  208. package/dist/cli/capabilityContext/projectVerification.js +410 -0
  209. package/dist/cli/capabilityContext/projectVerification.js.map +1 -0
  210. package/dist/cli/capabilityContext/shared.js +100 -0
  211. package/dist/cli/capabilityContext/shared.js.map +1 -0
  212. package/dist/cli/capabilityContext/slim.js +153 -0
  213. package/dist/cli/capabilityContext/slim.js.map +1 -0
  214. package/dist/cli/capabilityContext/startup.js +278 -0
  215. package/dist/cli/capabilityContext/startup.js.map +1 -0
  216. package/dist/cli/capabilityContext/types.js +56 -0
  217. package/dist/cli/capabilityContext/types.js.map +1 -0
  218. package/dist/cli/capabilityContext.js +1 -2420
  219. package/dist/cli/capabilityContext.js.map +1 -1
  220. package/dist/cli/commands/appHome.js +23 -0
  221. package/dist/cli/commands/appHome.js.map +1 -0
  222. package/dist/cli/commands/capability.js +3 -10
  223. package/dist/cli/commands/capability.js.map +1 -1
  224. package/dist/cli/commands/compact.js +41 -12
  225. package/dist/cli/commands/compact.js.map +1 -1
  226. package/dist/cli/commands/doctor.js +34 -99
  227. package/dist/cli/commands/doctor.js.map +1 -1
  228. package/dist/cli/commands/durability.js +82 -0
  229. package/dist/cli/commands/durability.js.map +1 -0
  230. package/dist/cli/commands/entityMigrate.js +132 -0
  231. package/dist/cli/commands/entityMigrate.js.map +1 -0
  232. package/dist/cli/commands/glossaryAdvice.js +139 -0
  233. package/dist/cli/commands/glossaryAdvice.js.map +1 -0
  234. package/dist/cli/commands/lint.js +26 -43
  235. package/dist/cli/commands/lint.js.map +1 -1
  236. package/dist/cli/commands/personalGlossary.js +177 -0
  237. package/dist/cli/commands/personalGlossary.js.map +1 -0
  238. package/dist/cli/commands/prime/briefOrientation.js +808 -0
  239. package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
  240. package/dist/cli/commands/prime/buildExecutionRequest.js +165 -0
  241. package/dist/cli/commands/prime/buildExecutionRequest.js.map +1 -0
  242. package/dist/cli/commands/prime/bundleStatus.js +191 -0
  243. package/dist/cli/commands/prime/bundleStatus.js.map +1 -0
  244. package/dist/cli/commands/prime/collectEntityOrientation.js +291 -0
  245. package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -0
  246. package/dist/cli/commands/prime/collectOrientationState.js +178 -0
  247. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
  248. package/dist/cli/commands/prime/orientationOutput.js +377 -0
  249. package/dist/cli/commands/prime/orientationOutput.js.map +1 -0
  250. package/dist/cli/commands/prime/types.js +2 -0
  251. package/dist/cli/commands/prime/types.js.map +1 -0
  252. package/dist/cli/commands/prime/v1Migration.js +39 -0
  253. package/dist/cli/commands/prime/v1Migration.js.map +1 -0
  254. package/dist/cli/commands/prime.js +96 -556
  255. package/dist/cli/commands/prime.js.map +1 -1
  256. package/dist/cli/commands/profileGrounding.js +56 -0
  257. package/dist/cli/commands/profileGrounding.js.map +1 -0
  258. package/dist/cli/commands/query.js +77 -52
  259. package/dist/cli/commands/query.js.map +1 -1
  260. package/dist/cli/commands/report.js +96 -24
  261. package/dist/cli/commands/report.js.map +1 -1
  262. package/dist/cli/commands/route.js +142 -0
  263. package/dist/cli/commands/route.js.map +1 -0
  264. package/dist/cli/commands/schema.js +258 -105
  265. package/dist/cli/commands/schema.js.map +1 -1
  266. package/dist/cli/commands/state/decisions.js +388 -0
  267. package/dist/cli/commands/state/decisions.js.map +1 -0
  268. package/dist/cli/commands/state/docs.js +71 -0
  269. package/dist/cli/commands/state/docs.js.map +1 -0
  270. package/dist/cli/commands/state/experimentRecords.js +152 -0
  271. package/dist/cli/commands/state/experimentRecords.js.map +1 -0
  272. package/dist/cli/commands/state/experiments.js +15 -0
  273. package/dist/cli/commands/state/experiments.js.map +1 -0
  274. package/dist/cli/commands/state/get.js +130 -0
  275. package/dist/cli/commands/state/get.js.map +1 -0
  276. package/dist/cli/commands/state/health.js +15 -0
  277. package/dist/cli/commands/state/health.js.map +1 -0
  278. package/dist/cli/commands/state/index.js +17 -0
  279. package/dist/cli/commands/state/index.js.map +1 -0
  280. package/dist/cli/commands/state/list.js +195 -0
  281. package/dist/cli/commands/state/list.js.map +1 -0
  282. package/dist/cli/commands/state/objective.js +26 -0
  283. package/dist/cli/commands/state/objective.js.map +1 -0
  284. package/dist/cli/commands/state/plan.js +15 -0
  285. package/dist/cli/commands/state/plan.js.map +1 -0
  286. package/dist/cli/commands/state/planTasks.js +155 -0
  287. package/dist/cli/commands/state/planTasks.js.map +1 -0
  288. package/dist/cli/commands/state/plans.js +155 -0
  289. package/dist/cli/commands/state/plans.js.map +1 -0
  290. package/dist/cli/commands/state/progress.js +14 -0
  291. package/dist/cli/commands/state/progress.js.map +1 -0
  292. package/dist/cli/commands/state/shared.js +15 -0
  293. package/dist/cli/commands/state/shared.js.map +1 -0
  294. package/dist/cli/commands/state/todo.js +43 -0
  295. package/dist/cli/commands/state/todo.js.map +1 -0
  296. package/dist/cli/commands/state/write.js +425 -0
  297. package/dist/cli/commands/state/write.js.map +1 -0
  298. package/dist/cli/commands/upgrade.js +146 -4
  299. package/dist/cli/commands/upgrade.js.map +1 -1
  300. package/dist/cli/commands/upgradeVerify.js +119 -0
  301. package/dist/cli/commands/upgradeVerify.js.map +1 -0
  302. package/dist/cli/commands/validate.js +173 -210
  303. package/dist/cli/commands/validate.js.map +1 -1
  304. package/dist/cli/commands/verify.js +24 -8
  305. package/dist/cli/commands/verify.js.map +1 -1
  306. package/dist/cli/contracts/bundleStatus.js +2 -0
  307. package/dist/cli/contracts/bundleStatus.js.map +1 -0
  308. package/dist/cli/contracts/orientationState.js +2 -0
  309. package/dist/cli/contracts/orientationState.js.map +1 -0
  310. package/dist/cli/dispatch/argvParser.js +33 -0
  311. package/dist/cli/dispatch/argvParser.js.map +1 -0
  312. package/dist/cli/dispatch/check.js +390 -0
  313. package/dist/cli/dispatch/check.js.map +1 -0
  314. package/dist/cli/dispatch/commands.js +27 -0
  315. package/dist/cli/dispatch/commands.js.map +1 -0
  316. package/dist/cli/dispatch/index.js +234 -0
  317. package/dist/cli/dispatch/index.js.map +1 -0
  318. package/dist/cli/dispatch/lifecycle.js +698 -0
  319. package/dist/cli/dispatch/lifecycle.js.map +1 -0
  320. package/dist/cli/dispatch/prime.js +140 -0
  321. package/dist/cli/dispatch/prime.js.map +1 -0
  322. package/dist/cli/dispatch/shared.js +64 -0
  323. package/dist/cli/dispatch/shared.js.map +1 -0
  324. package/dist/cli/dispatch/state.js +141 -0
  325. package/dist/cli/dispatch/state.js.map +1 -0
  326. package/dist/cli/dispatch.js +1 -995
  327. package/dist/cli/dispatch.js.map +1 -1
  328. package/dist/cli/errors.js +53 -0
  329. package/dist/cli/errors.js.map +1 -0
  330. package/dist/cli/help.js +356 -30
  331. package/dist/cli/help.js.map +1 -1
  332. package/dist/cli/migrationRequired.js +89 -0
  333. package/dist/cli/migrationRequired.js.map +1 -0
  334. package/dist/cli/orientation/attention.js +72 -0
  335. package/dist/cli/orientation/attention.js.map +1 -0
  336. package/dist/cli/orientation/corpusCoverage.js +103 -0
  337. package/dist/cli/orientation/corpusCoverage.js.map +1 -0
  338. package/dist/cli/orientation.js +443 -172
  339. package/dist/cli/orientation.js.map +1 -1
  340. package/dist/cli/planArtifacts.js +351 -0
  341. package/dist/cli/planArtifacts.js.map +1 -0
  342. package/dist/cli/planEvidence.js +158 -0
  343. package/dist/cli/planEvidence.js.map +1 -0
  344. package/dist/cli/planLifecycleState.js +36 -0
  345. package/dist/cli/planLifecycleState.js.map +1 -0
  346. package/dist/cli/planTaskIndex.js +12 -0
  347. package/dist/cli/planTaskIndex.js.map +1 -0
  348. package/dist/cli/prime-blob.js +70 -2
  349. package/dist/cli/prime-blob.js.map +1 -1
  350. package/dist/cli/profileAcquisition.js +168 -0
  351. package/dist/cli/profileAcquisition.js.map +1 -0
  352. package/dist/cli/startupCompletenessContract.js +60 -0
  353. package/dist/cli/startupCompletenessContract.js.map +1 -0
  354. package/dist/cli/stateQuery.js +63 -10
  355. package/dist/cli/stateQuery.js.map +1 -1
  356. package/dist/cli/structured.js.map +1 -1
  357. package/dist/cli/todoMarkdown.js +47 -0
  358. package/dist/cli/todoMarkdown.js.map +1 -0
  359. package/dist/cli/todoReadinessSelection.js +192 -0
  360. package/dist/cli/todoReadinessSelection.js.map +1 -0
  361. package/dist/cli/todoSeverity.js +19 -0
  362. package/dist/cli/todoSeverity.js.map +1 -0
  363. package/dist/core/atomicWriter.js +21 -0
  364. package/dist/core/atomicWriter.js.map +1 -0
  365. package/dist/core/difflib.js.map +1 -1
  366. package/dist/core/envPaths.js +21 -0
  367. package/dist/core/envPaths.js.map +1 -0
  368. package/dist/core/jsonValue.js +6 -0
  369. package/dist/core/jsonValue.js.map +1 -0
  370. package/dist/core/paths.js.map +1 -1
  371. package/dist/core/pyjson.js +67 -2
  372. package/dist/core/pyjson.js.map +1 -1
  373. package/dist/core/shell.js +5 -0
  374. package/dist/core/shell.js.map +1 -0
  375. package/dist/core/skillIdentity.js +24 -0
  376. package/dist/core/skillIdentity.js.map +1 -0
  377. package/dist/core/sourceRoot.js.map +1 -1
  378. package/dist/core/text.js +11 -0
  379. package/dist/core/text.js.map +1 -0
  380. package/dist/core/toml.js.map +1 -1
  381. package/dist/core/yaml.js +8 -0
  382. package/dist/core/yaml.js.map +1 -1
  383. package/dist/eval/evalSkills.js +30 -25
  384. package/dist/eval/evalSkills.js.map +1 -1
  385. package/dist/eval/hybridRouteEvaluation.js +156 -0
  386. package/dist/eval/hybridRouteEvaluation.js.map +1 -0
  387. package/dist/eval/semanticEval.js +43 -19
  388. package/dist/eval/semanticEval.js.map +1 -1
  389. package/dist/eval/semanticFixtures.js +16 -4
  390. package/dist/eval/semanticFixtures.js.map +1 -1
  391. package/dist/hooks/common.js +10 -27
  392. package/dist/hooks/common.js.map +1 -1
  393. package/dist/hooks/compaction/apply.js +447 -0
  394. package/dist/hooks/compaction/apply.js.map +1 -0
  395. package/dist/hooks/compaction/dryRun.js +185 -0
  396. package/dist/hooks/compaction/dryRun.js.map +1 -0
  397. package/dist/hooks/compaction/index.js +23 -0
  398. package/dist/hooks/compaction/index.js.map +1 -0
  399. package/dist/hooks/compaction/parse.js +326 -0
  400. package/dist/hooks/compaction/parse.js.map +1 -0
  401. package/dist/hooks/compaction/retention.js +203 -0
  402. package/dist/hooks/compaction/retention.js.map +1 -0
  403. package/dist/hooks/compaction/status.js +361 -0
  404. package/dist/hooks/compaction/status.js.map +1 -0
  405. package/dist/hooks/compaction/types.js +6 -0
  406. package/dist/hooks/compaction/types.js.map +1 -0
  407. package/dist/hooks/cursorPreToolUse.js +1 -1
  408. package/dist/hooks/cursorPreToolUse.js.map +1 -1
  409. package/dist/hooks/cursorSessionStart.js +14 -21
  410. package/dist/hooks/cursorSessionStart.js.map +1 -1
  411. package/dist/hooks/projectHookInput.js +26 -0
  412. package/dist/hooks/projectHookInput.js.map +1 -0
  413. package/dist/hooks/sessionStart.js +55 -170
  414. package/dist/hooks/sessionStart.js.map +1 -1
  415. package/dist/hooks/sessionStop.js +12 -26
  416. package/dist/hooks/sessionStop.js.map +1 -1
  417. package/dist/hooks/validateArtifact/agentFacing.js +10 -0
  418. package/dist/hooks/validateArtifact/agentFacing.js.map +1 -0
  419. package/dist/hooks/validateArtifact/index.js +151 -0
  420. package/dist/hooks/validateArtifact/index.js.map +1 -0
  421. package/dist/hooks/validateArtifact/markdown.js +146 -0
  422. package/dist/hooks/validateArtifact/markdown.js.map +1 -0
  423. package/dist/hooks/validateArtifact/runtime.js +86 -0
  424. package/dist/hooks/validateArtifact/runtime.js.map +1 -0
  425. package/dist/hooks/validateArtifact/schema.js +547 -0
  426. package/dist/hooks/validateArtifact/schema.js.map +1 -0
  427. package/dist/hooks/validateArtifact/traversal.js +108 -0
  428. package/dist/hooks/validateArtifact/traversal.js.map +1 -0
  429. package/dist/hooks/validateArtifact/violations.js +108 -0
  430. package/dist/hooks/validateArtifact/violations.js.map +1 -0
  431. package/dist/migrate/v2HandoffManifest.js +455 -0
  432. package/dist/migrate/v2HandoffManifest.js.map +1 -0
  433. package/dist/registries/artifactProtocolIds.js +79 -0
  434. package/dist/registries/artifactProtocolIds.js.map +1 -0
  435. package/dist/registries/artifactRegistry.js +224 -62
  436. package/dist/registries/artifactRegistry.js.map +1 -1
  437. package/dist/registries/artifactSchemaProjection.js +46 -0
  438. package/dist/registries/artifactSchemaProjection.js.map +1 -0
  439. package/dist/registries/capabilityContract.js +141 -12
  440. package/dist/registries/capabilityContract.js.map +1 -1
  441. package/dist/registries/evaluatorHandoffContract.js +171 -0
  442. package/dist/registries/evaluatorHandoffContract.js.map +1 -0
  443. package/dist/registries/evidenceTierContract.js +372 -0
  444. package/dist/registries/evidenceTierContract.js.map +1 -0
  445. package/dist/registries/glossaryAdviceContract.js +79 -0
  446. package/dist/registries/glossaryAdviceContract.js.map +1 -0
  447. package/dist/registries/glossaryCaveatContract.js +68 -0
  448. package/dist/registries/glossaryCaveatContract.js.map +1 -0
  449. package/dist/registries/glossaryConsumerContractValidation.js +788 -0
  450. package/dist/registries/glossaryConsumerContractValidation.js.map +1 -0
  451. package/dist/registries/glossaryEntryContract.js +757 -0
  452. package/dist/registries/glossaryEntryContract.js.map +1 -0
  453. package/dist/registries/glossaryTermIdentity.js +18 -0
  454. package/dist/registries/glossaryTermIdentity.js.map +1 -0
  455. package/dist/registries/glossaryTermOccurrence.js +21 -0
  456. package/dist/registries/glossaryTermOccurrence.js.map +1 -0
  457. package/dist/registries/hybridRoute.js +203 -0
  458. package/dist/registries/hybridRoute.js.map +1 -0
  459. package/dist/registries/hybridRouteReceipt.js +221 -0
  460. package/dist/registries/hybridRouteReceipt.js.map +1 -0
  461. package/dist/registries/packageRegistry.js +90 -230
  462. package/dist/registries/packageRegistry.js.map +1 -1
  463. package/dist/registries/todoReadinessContract.js +449 -0
  464. package/dist/registries/todoReadinessContract.js.map +1 -0
  465. package/dist/registries/triggerLoader.js +175 -0
  466. package/dist/registries/triggerLoader.js.map +1 -0
  467. package/dist/registries/verbosityBudgetContract.js +206 -0
  468. package/dist/registries/verbosityBudgetContract.js.map +1 -0
  469. package/dist/release/releaseMetadata.js +319 -0
  470. package/dist/release/releaseMetadata.js.map +1 -0
  471. package/dist/runtime/lifecycleAdapterContract.js +458 -0
  472. package/dist/runtime/lifecycleAdapterContract.js.map +1 -0
  473. package/dist/runtime/lifecycleAdapters.js +778 -0
  474. package/dist/runtime/lifecycleAdapters.js.map +1 -0
  475. package/dist/runtime/lifecycleAuthority.js +454 -0
  476. package/dist/runtime/lifecycleAuthority.js.map +1 -0
  477. package/dist/runtime/lifecycleOperationContract.js +114 -0
  478. package/dist/runtime/lifecycleOperationContract.js.map +1 -0
  479. package/dist/runtime/lifecycleOperations.js +635 -0
  480. package/dist/runtime/lifecycleOperations.js.map +1 -0
  481. package/dist/runtime/lifecycleOwnershipJournal.js +623 -0
  482. package/dist/runtime/lifecycleOwnershipJournal.js.map +1 -0
  483. package/dist/runtime/lifecyclePublication.js +416 -0
  484. package/dist/runtime/lifecyclePublication.js.map +1 -0
  485. package/dist/runtime/lifecycleSnapshot.js +439 -0
  486. package/dist/runtime/lifecycleSnapshot.js.map +1 -0
  487. package/dist/runtime/nativeResourceCleanup.js +317 -0
  488. package/dist/runtime/nativeResourceCleanup.js.map +1 -0
  489. package/dist/setup/codex/cli.js +130 -0
  490. package/dist/setup/codex/cli.js.map +1 -0
  491. package/dist/setup/codex/configToml.js +558 -0
  492. package/dist/setup/codex/configToml.js.map +1 -0
  493. package/dist/setup/codex/constants.js +14 -0
  494. package/dist/setup/codex/constants.js.map +1 -0
  495. package/dist/setup/codex/installRoot.js +64 -0
  496. package/dist/setup/codex/installRoot.js.map +1 -0
  497. package/dist/setup/codex/state.js +252 -0
  498. package/dist/setup/codex/state.js.map +1 -0
  499. package/dist/setup/codex.js +9 -1055
  500. package/dist/setup/codex.js.map +1 -1
  501. package/dist/setup/opencode.js +21 -0
  502. package/dist/setup/opencode.js.map +1 -0
  503. package/dist/setup/opencodeConstants.js +2 -0
  504. package/dist/setup/opencodeConstants.js.map +1 -0
  505. package/dist/setup/sharedSkill.js +46 -0
  506. package/dist/setup/sharedSkill.js.map +1 -0
  507. package/dist/setup/smokeChecks.js +24 -53
  508. package/dist/setup/smokeChecks.js.map +1 -1
  509. package/dist/state/archiveDiscovery.js +581 -0
  510. package/dist/state/archiveDiscovery.js.map +1 -0
  511. package/dist/state/archivePublication.js +226 -0
  512. package/dist/state/archivePublication.js.map +1 -0
  513. package/dist/state/archiveRecovery.js +238 -0
  514. package/dist/state/archiveRecovery.js.map +1 -0
  515. package/dist/state/archiveReplay.js +54 -0
  516. package/dist/state/archiveReplay.js.map +1 -0
  517. package/dist/state/canonicalMigrationRecord.js +37 -0
  518. package/dist/state/canonicalMigrationRecord.js.map +1 -0
  519. package/dist/state/changelog.js +222 -0
  520. package/dist/state/changelog.js.map +1 -0
  521. package/dist/state/decisionEntities.js +368 -0
  522. package/dist/state/decisionEntities.js.map +1 -0
  523. package/dist/state/decisionLegacyValidation.js +216 -0
  524. package/dist/state/decisionLegacyValidation.js.map +1 -0
  525. package/dist/state/decisionMigrationProvenance.js +200 -0
  526. package/dist/state/decisionMigrationProvenance.js.map +1 -0
  527. package/dist/state/decisionOverlay.js +255 -0
  528. package/dist/state/decisionOverlay.js.map +1 -0
  529. package/dist/state/decisionRevision.js +257 -0
  530. package/dist/state/decisionRevision.js.map +1 -0
  531. package/dist/state/decisionRevisionMigration.js +90 -0
  532. package/dist/state/decisionRevisionMigration.js.map +1 -0
  533. package/dist/state/directRetrieval.js +324 -0
  534. package/dist/state/directRetrieval.js.map +1 -0
  535. package/dist/state/durability.js +325 -0
  536. package/dist/state/durability.js.map +1 -0
  537. package/dist/state/entityCutover.js +294 -0
  538. package/dist/state/entityCutover.js.map +1 -0
  539. package/dist/state/entityCutoverGit.js +128 -0
  540. package/dist/state/entityCutoverGit.js.map +1 -0
  541. package/dist/state/entityGlossaryAuthority.js +14 -0
  542. package/dist/state/entityGlossaryAuthority.js.map +1 -0
  543. package/dist/state/entityListProjection.js +188 -0
  544. package/dist/state/entityListProjection.js.map +1 -0
  545. package/dist/state/entityListRuntimeRegistry.js +50 -0
  546. package/dist/state/entityListRuntimeRegistry.js.map +1 -0
  547. package/dist/state/entityMigrationCausality.js +99 -0
  548. package/dist/state/entityMigrationCausality.js.map +1 -0
  549. package/dist/state/entityMigrationIdentity.js +6 -0
  550. package/dist/state/entityMigrationIdentity.js.map +1 -0
  551. package/dist/state/entityMigrationPreview.js +884 -0
  552. package/dist/state/entityMigrationPreview.js.map +1 -0
  553. package/dist/state/entityPublicationContext.js +807 -0
  554. package/dist/state/entityPublicationContext.js.map +1 -0
  555. package/dist/state/entityRetrievalHelp.js +476 -0
  556. package/dist/state/entityRetrievalHelp.js.map +1 -0
  557. package/dist/state/entityStorage.js +897 -0
  558. package/dist/state/entityStorage.js.map +1 -0
  559. package/dist/state/exactReplacementRecovery.js +19 -0
  560. package/dist/state/exactReplacementRecovery.js.map +1 -0
  561. package/dist/state/experimentArchive.js +64 -0
  562. package/dist/state/experimentArchive.js.map +1 -0
  563. package/dist/state/experimentIdentity.js +203 -0
  564. package/dist/state/experimentIdentity.js.map +1 -0
  565. package/dist/state/healthEntities.js +263 -0
  566. package/dist/state/healthEntities.js.map +1 -0
  567. package/dist/state/healthEntityValidation.js +19 -0
  568. package/dist/state/healthEntityValidation.js.map +1 -0
  569. package/dist/state/healthRepair.js +70 -0
  570. package/dist/state/healthRepair.js.map +1 -0
  571. package/dist/state/installRoot.js +64 -24
  572. package/dist/state/installRoot.js.map +1 -1
  573. package/dist/state/legacyEntityCutoverEvidence.js +66 -0
  574. package/dist/state/legacyEntityCutoverEvidence.js.map +1 -0
  575. package/dist/state/legacyIdentity.js +48 -0
  576. package/dist/state/legacyIdentity.js.map +1 -0
  577. package/dist/state/legacySummaryRecord.js +7 -0
  578. package/dist/state/legacySummaryRecord.js.map +1 -0
  579. package/dist/state/listAccounting.js +55 -0
  580. package/dist/state/listAccounting.js.map +1 -0
  581. package/dist/state/listClassification.js +18 -0
  582. package/dist/state/listClassification.js.map +1 -0
  583. package/dist/state/listCursor.js +43 -0
  584. package/dist/state/listCursor.js.map +1 -0
  585. package/dist/state/listRetrieval.js +782 -0
  586. package/dist/state/listRetrieval.js.map +1 -0
  587. package/dist/state/migrationSourceBinding.js +31 -0
  588. package/dist/state/migrationSourceBinding.js.map +1 -0
  589. package/dist/state/objectiveExperimentEntities.js +323 -0
  590. package/dist/state/objectiveExperimentEntities.js.map +1 -0
  591. package/dist/state/planEntities.js +531 -0
  592. package/dist/state/planEntities.js.map +1 -0
  593. package/dist/state/planIdentity.js +48 -0
  594. package/dist/state/planIdentity.js.map +1 -0
  595. package/dist/state/planRetrieval.js +314 -0
  596. package/dist/state/planRetrieval.js.map +1 -0
  597. package/dist/state/planTaskRetrieval.js +295 -0
  598. package/dist/state/planTaskRetrieval.js.map +1 -0
  599. package/dist/state/progressEntities.js +513 -0
  600. package/dist/state/progressEntities.js.map +1 -0
  601. package/dist/state/progressGlossaryCaveat.js +169 -0
  602. package/dist/state/progressGlossaryCaveat.js.map +1 -0
  603. package/dist/state/progressPublicationOrder.js +20 -0
  604. package/dist/state/progressPublicationOrder.js.map +1 -0
  605. package/dist/state/projectRoot.js +63 -0
  606. package/dist/state/projectRoot.js.map +1 -0
  607. package/dist/state/projectionPolicy.js +191 -0
  608. package/dist/state/projectionPolicy.js.map +1 -0
  609. package/dist/state/retrievalAuthority.js +157 -0
  610. package/dist/state/retrievalAuthority.js.map +1 -0
  611. package/dist/state/safeProjectFile.js +156 -0
  612. package/dist/state/safeProjectFile.js.map +1 -0
  613. package/dist/state/startupAnalysis/benchmark.js +433 -0
  614. package/dist/state/startupAnalysis/benchmark.js.map +1 -0
  615. package/dist/state/startupAnalysis/contract.js +126 -0
  616. package/dist/state/startupAnalysis/contract.js.map +1 -0
  617. package/dist/state/startupAnalysis/helpers.js +287 -0
  618. package/dist/state/startupAnalysis/helpers.js.map +1 -0
  619. package/dist/state/startupAnalysis/index.js +7 -0
  620. package/dist/state/startupAnalysis/index.js.map +1 -0
  621. package/dist/state/startupAnalysis/metrics.js +341 -0
  622. package/dist/state/startupAnalysis/metrics.js.map +1 -0
  623. package/dist/state/startupAnalysis/records.js +199 -0
  624. package/dist/state/startupAnalysis/records.js.map +1 -0
  625. package/dist/state/startupAnalysis/report.js +112 -0
  626. package/dist/state/startupAnalysis/report.js.map +1 -0
  627. package/dist/state/startupAnalysis/threshold.js +513 -0
  628. package/dist/state/startupAnalysis/threshold.js.map +1 -0
  629. package/dist/state/startupAnalysis.js +2 -1952
  630. package/dist/state/startupAnalysis.js.map +1 -1
  631. package/dist/state/startupProjection.js +499 -0
  632. package/dist/state/startupProjection.js.map +1 -0
  633. package/dist/state/stateMode.js +86 -0
  634. package/dist/state/stateMode.js.map +1 -0
  635. package/dist/state/stateStorageAuthority.js +48 -0
  636. package/dist/state/stateStorageAuthority.js.map +1 -0
  637. package/dist/state/summaryEntityRead.js +26 -0
  638. package/dist/state/summaryEntityRead.js.map +1 -0
  639. package/dist/state/summaryMigrationProvenance.js +67 -0
  640. package/dist/state/summaryMigrationProvenance.js.map +1 -0
  641. package/dist/state/summarySourceRowAuthority.js +37 -0
  642. package/dist/state/summarySourceRowAuthority.js.map +1 -0
  643. package/dist/state/todoDocsEntities.js +986 -0
  644. package/dist/state/todoDocsEntities.js.map +1 -0
  645. package/dist/state/todoDocsEntityValidation.js +159 -0
  646. package/dist/state/todoDocsEntityValidation.js.map +1 -0
  647. package/dist/state/todoReconciliationActivation.js +63 -0
  648. package/dist/state/todoReconciliationActivation.js.map +1 -0
  649. package/dist/state/todoReconciliationTransaction.js +554 -0
  650. package/dist/state/todoReconciliationTransaction.js.map +1 -0
  651. package/dist/state/write/assign.js +21 -0
  652. package/dist/state/write/assign.js.map +1 -0
  653. package/dist/state/write/candidateMutation.js +270 -0
  654. package/dist/state/write/candidateMutation.js.map +1 -0
  655. package/dist/state/write/errors.js +12 -0
  656. package/dist/state/write/errors.js.map +1 -0
  657. package/dist/state/write/experimentPublication.js +193 -0
  658. package/dist/state/write/experimentPublication.js.map +1 -0
  659. package/dist/state/write/explain.js +333 -0
  660. package/dist/state/write/explain.js.map +1 -0
  661. package/dist/state/write/fields.js +62 -0
  662. package/dist/state/write/fields.js.map +1 -0
  663. package/dist/state/write/glossaryPublication.js +264 -0
  664. package/dist/state/write/glossaryPublication.js.map +1 -0
  665. package/dist/state/write/grammar.js +271 -0
  666. package/dist/state/write/grammar.js.map +1 -0
  667. package/dist/state/write/helpers.js +30 -0
  668. package/dist/state/write/helpers.js.map +1 -0
  669. package/dist/state/write/index.js +13 -0
  670. package/dist/state/write/index.js.map +1 -0
  671. package/dist/state/write/input.js +368 -0
  672. package/dist/state/write/input.js.map +1 -0
  673. package/dist/state/write/lock.js +838 -0
  674. package/dist/state/write/lock.js.map +1 -0
  675. package/dist/state/write/mutation.js +235 -0
  676. package/dist/state/write/mutation.js.map +1 -0
  677. package/dist/state/write/operations.js +170 -0
  678. package/dist/state/write/operations.js.map +1 -0
  679. package/dist/state/write/planEvaluation.js +129 -0
  680. package/dist/state/write/planEvaluation.js.map +1 -0
  681. package/dist/state/write/planPublication.js +180 -0
  682. package/dist/state/write/planPublication.js.map +1 -0
  683. package/dist/state/write/runtimeOperations.js +65 -0
  684. package/dist/state/write/runtimeOperations.js.map +1 -0
  685. package/dist/state/write/serialize.js +2 -0
  686. package/dist/state/write/serialize.js.map +1 -0
  687. package/dist/state/write/transaction.js +53 -0
  688. package/dist/state/write/transaction.js.map +1 -0
  689. package/dist/state/write/validate.js +8 -0
  690. package/dist/state/write/validate.js.map +1 -0
  691. package/dist/upgrade/appContentRefresh.js +384 -0
  692. package/dist/upgrade/appContentRefresh.js.map +1 -0
  693. package/dist/upgrade/appModel.js +8 -6
  694. package/dist/upgrade/appModel.js.map +1 -1
  695. package/dist/upgrade/atomicWriter.js +2 -0
  696. package/dist/upgrade/atomicWriter.js.map +1 -0
  697. package/dist/upgrade/bundleEvidence.js +34 -0
  698. package/dist/upgrade/bundleEvidence.js.map +1 -0
  699. package/dist/upgrade/channels.js +12 -7
  700. package/dist/upgrade/channels.js.map +1 -1
  701. package/dist/upgrade/coexistenceProbe.js +105 -0
  702. package/dist/upgrade/coexistenceProbe.js.map +1 -0
  703. package/dist/upgrade/compatibility.js +56 -20
  704. package/dist/upgrade/compatibility.js.map +1 -1
  705. package/dist/upgrade/doctor.js +197 -191
  706. package/dist/upgrade/doctor.js.map +1 -1
  707. package/dist/upgrade/doctorClassifier.js +188 -0
  708. package/dist/upgrade/doctorClassifier.js.map +1 -0
  709. package/dist/upgrade/installedHooksRetirement.js +197 -0
  710. package/dist/upgrade/installedHooksRetirement.js.map +1 -0
  711. package/dist/upgrade/legacyAgentCleanup.js +283 -0
  712. package/dist/upgrade/legacyAgentCleanup.js.map +1 -0
  713. package/dist/upgrade/lifecycleUpgrade.js +114 -0
  714. package/dist/upgrade/lifecycleUpgrade.js.map +1 -0
  715. package/dist/upgrade/migrateArtifactsV2ToV3.js +363 -137
  716. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  717. package/dist/upgrade/migrationPublication.js +123 -0
  718. package/dist/upgrade/migrationPublication.js.map +1 -0
  719. package/dist/upgrade/nextMajorDoctor.js +156 -0
  720. package/dist/upgrade/nextMajorDoctor.js.map +1 -0
  721. package/dist/upgrade/npxPlatformStatus.js +23 -0
  722. package/dist/upgrade/npxPlatformStatus.js.map +1 -0
  723. package/dist/upgrade/projectIntegration.js +142 -171
  724. package/dist/upgrade/projectIntegration.js.map +1 -1
  725. package/dist/upgrade/projectIntegrationDecision.js +51 -0
  726. package/dist/upgrade/projectIntegrationDecision.js.map +1 -0
  727. package/dist/upgrade/runtimeMigration.js +336 -281
  728. package/dist/upgrade/runtimeMigration.js.map +1 -1
  729. package/dist/upgrade/upgradeCommands.js +9 -0
  730. package/dist/upgrade/upgradeCommands.js.map +1 -1
  731. package/dist/upgrade/upgradeLock.js +86 -0
  732. package/dist/upgrade/upgradeLock.js.map +1 -0
  733. package/dist/upgrade/upgradeOrchestrator.js +217 -56
  734. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  735. package/dist/upgrade/v3CapabilitySurface.js +15 -0
  736. package/dist/upgrade/v3CapabilitySurface.js.map +1 -0
  737. package/dist/upgrade/versionResolution.js +12 -4
  738. package/dist/upgrade/versionResolution.js.map +1 -1
  739. package/dist/validate/appHomeContract.js +5 -9
  740. package/dist/validate/appHomeContract.js.map +1 -1
  741. package/dist/validate/capability.js +144 -14
  742. package/dist/validate/capability.js.map +1 -1
  743. package/dist/validate/crossCapability.js +15 -9
  744. package/dist/validate/crossCapability.js.map +1 -1
  745. package/dist/validate/selfAudit.js +73 -36
  746. package/dist/validate/selfAudit.js.map +1 -1
  747. package/dist/validate/v1LegacyCruft.js +141 -0
  748. package/dist/validate/v1LegacyCruft.js.map +1 -0
  749. package/dist/validate/vocabularyAuthority.js +305 -0
  750. package/dist/validate/vocabularyAuthority.js.map +1 -0
  751. package/package.json +46 -27
  752. package/bundle/references/adapters/cursor.md +0 -213
  753. package/bundle/references/adapters/opencode.md +0 -530
  754. package/bundle/references/adapters/runtime-adapter-characterization.md +0 -79
  755. package/bundle/references/adapters/runtime-adapter-interface-model.yaml +0 -200
  756. package/bundle/references/adapters/runtime-adapter-registry.yaml +0 -548
  757. package/bundle/references/adapters/runtime-feature-parity.md +0 -189
  758. package/bundle/references/v1-section-mapping.md +0 -47
  759. package/bundle/skills/agentera/.claude-plugin/plugin.json +0 -27
  760. package/bundle/skills/agentera/agents/dokumentera.toml +0 -6
  761. package/bundle/skills/agentera/agents/hej.toml +0 -6
  762. package/bundle/skills/agentera/agents/inspektera.toml +0 -6
  763. package/bundle/skills/agentera/agents/inspirera.toml +0 -6
  764. package/bundle/skills/agentera/agents/optimera.toml +0 -6
  765. package/bundle/skills/agentera/agents/orkestrera.toml +0 -6
  766. package/bundle/skills/agentera/agents/planera.toml +0 -6
  767. package/bundle/skills/agentera/agents/profilera.toml +0 -6
  768. package/bundle/skills/agentera/agents/realisera.toml +0 -6
  769. package/bundle/skills/agentera/agents/resonera.toml +0 -6
  770. package/bundle/skills/agentera/agents/visionera.toml +0 -6
  771. package/bundle/skills/agentera/agents/visualisera.toml +0 -6
  772. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +0 -428
  773. package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +0 -73
  774. package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +0 -35
  775. package/bundle/skills/agentera/capabilities/hej/instructions.md +0 -331
  776. package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +0 -69
  777. package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +0 -58
  778. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +0 -514
  779. package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +0 -76
  780. package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +0 -38
  781. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +0 -280
  782. package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +0 -24
  783. package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +0 -34
  784. package/bundle/skills/agentera/capabilities/optimera/instructions.md +0 -437
  785. package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +0 -39
  786. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +0 -433
  787. package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +0 -64
  788. package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +0 -42
  789. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +0 -107
  790. package/bundle/skills/agentera/capabilities/planera/instructions.md +0 -368
  791. package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +0 -62
  792. package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +0 -34
  793. package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +0 -61
  794. package/bundle/skills/agentera/capabilities/profilera/instructions.md +0 -419
  795. package/bundle/skills/agentera/capabilities/profilera/schemas/artifacts.yaml +0 -18
  796. package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +0 -45
  797. package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +0 -57
  798. package/bundle/skills/agentera/capabilities/realisera/instructions.md +0 -403
  799. package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +0 -80
  800. package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +0 -39
  801. package/bundle/skills/agentera/capabilities/realisera/schemas/validation.yaml +0 -110
  802. package/bundle/skills/agentera/capabilities/resonera/instructions.md +0 -329
  803. package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +0 -47
  804. package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +0 -46
  805. package/bundle/skills/agentera/capabilities/resonera/schemas/validation.yaml +0 -77
  806. package/bundle/skills/agentera/capabilities/visionera/instructions.md +0 -309
  807. package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +0 -41
  808. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +0 -400
  809. package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +0 -33
  810. package/bundle/skills/hej/.claude-plugin/plugin.json +0 -6
  811. package/bundle/skills/hej/SKILL.md +0 -69
  812. package/bundle/skills/hej/agents/hej.toml +0 -11
  813. package/bundle/skills/hej/agents/openai.yaml +0 -8
  814. package/dist/cli/commands/backfill.js +0 -84
  815. package/dist/cli/commands/backfill.js.map +0 -1
  816. package/dist/cli/commands/state.js +0 -1012
  817. package/dist/cli/commands/state.js.map +0 -1
  818. package/dist/core/git.js +0 -43
  819. package/dist/core/git.js.map +0 -1
  820. package/dist/hooks/compaction.js +0 -935
  821. package/dist/hooks/compaction.js.map +0 -1
  822. package/dist/hooks/validateArtifact.js +0 -933
  823. package/dist/hooks/validateArtifact.js.map +0 -1
  824. package/dist/registries/runtimeAdapterRegistry.js +0 -315
  825. package/dist/registries/runtimeAdapterRegistry.js.map +0 -1
  826. package/dist/setup/copilot.js +0 -227
  827. package/dist/setup/copilot.js.map +0 -1
  828. package/dist/setup/cursor.js +0 -127
  829. package/dist/setup/cursor.js.map +0 -1
  830. package/dist/setup/doctor.js +0 -1297
  831. package/dist/setup/doctor.js.map +0 -1
  832. package/dist/state/progressCommit.js +0 -289
  833. package/dist/state/progressCommit.js.map +0 -1
  834. package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -571
  835. package/dist/upgrade/migrateArtifactsV1ToV2.js.map +0 -1
  836. package/dist/validate/lifecycleAdapters.js +0 -772
  837. package/dist/validate/lifecycleAdapters.js.map +0 -1
  838. /package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/exit.yaml +0 -0
  839. /package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/exit.yaml +0 -0
  840. /package/bundle/skills/agentera/capabilities/{hej → status}/schemas/exit.yaml +0 -0
@@ -0,0 +1,2930 @@
1
+ schema_version: agentera.stateStorageAuthority.v1
2
+ status: active_authority
3
+ purpose: >-
4
+ Define both the implemented bounded-retrieval contracts for current state and
5
+ the Decision 94 target entity and cutover contracts. The target declaration is
6
+ authoritative before its storage, writer, retrieval, and migration behavior is
7
+ implemented; implementation status is explicit at each boundary.
8
+ authority:
9
+ source: references/artifacts/state-storage-authority.yaml
10
+ single_source_rule: >-
11
+ Runtime readers, writers, validators, tests, help, and capability source
12
+ contracts may project this authority but must not create a second map of
13
+ archive paths, API verbs, compatibility classes, mutable overlay fields,
14
+ amendment revision paths, legacy label coexistence rules, failure classes,
15
+ or byte limits.
16
+ implementation_boundary: >-
17
+ Shared entity storage plus the progress, decisions, health, plan, objective,
18
+ experiment, TODO-item, and documentation-inventory family writers and retrieval,
19
+ plus one-way forward import, are implemented but activate entity authority only
20
+ from the durable cutover marker. The preserved
21
+ singleton families remain legacy files. The
22
+ numbered archives, aggregate overlays, and aggregate revision documents
23
+ remain migration input while that marker is absent; no independent legacy
24
+ read or repair mutation remains.
25
+
26
+ entity_target:
27
+ status: progress_decisions_health_plan_objective_experiment_todo_and_docs_implemented_other_families_declared
28
+ decision: 94
29
+ activation: >-
30
+ This target becomes active persisted and structured state authority only
31
+ after entity_migration publishes a validated entity graph and writes the marker
32
+ last. Before then, legacy aggregates
33
+ remain migration input and explicitly labelled migration-evidence writer state;
34
+ ordinary public reads fail with migration_required instead of exposing them.
35
+ implementation_status:
36
+ progress: implemented
37
+ decisions: implemented
38
+ health: implemented
39
+ plan: implemented
40
+ objective: implemented
41
+ experiments: implemented
42
+ todo: implemented
43
+ docs: implemented
44
+ remaining_families: declared_not_implemented
45
+ rule: >-
46
+ Every implemented family selects entity behavior only when the durable
47
+ cutover marker is valid. Marker-absent ordinary consumers fail with
48
+ migration_required; the read-only migration preview and readiness checks do
49
+ not create entity state or write both authorities.
50
+ public_schema:
51
+ canonical_identity_field: id
52
+ canonical_classification_field: artifact
53
+ identity_and_classification_fields: [id, artifact]
54
+ entity_envelope:
55
+ required_fields: [id, artifact, record]
56
+ additional_identity_or_classification_fields: forbidden
57
+ forbidden_canonical_aliases:
58
+ - stable_id
59
+ - artifact_id
60
+ - entry_number
61
+ - number
62
+ - task_number
63
+ - experiment_number
64
+ - plan_id
65
+ - objective_id
66
+ - type_prefixed_id
67
+ exemptions:
68
+ - historical prose and immutable historical evidence
69
+ - internal TypeScript variable names that are not persisted or public structured output
70
+ - current pre-cutover contracts explicitly marked as implemented legacy authority
71
+ public_retrieval:
72
+ schema_version: agentera.entityPublicRetrieval.v1
73
+ status: final
74
+ commands:
75
+ progress:
76
+ list: agentera state progress list [--topic TEXT] [--status STATUS] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
77
+ get: agentera state progress get --id ID --format json
78
+ decisions:
79
+ list: agentera state decisions list [--topic TEXT] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
80
+ get: agentera state decisions get --id ID --format json
81
+ health:
82
+ list: agentera state health list [--dimension DIMENSION] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
83
+ get: agentera state health get --id ID --format json
84
+ plans:
85
+ list: agentera state plan list [--status open|complete|archived] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
86
+ get: agentera state plan get --id ID --format json
87
+ plan_tasks:
88
+ list: agentera state plan tasks list [PLAN_ID] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
89
+ get: agentera state plan tasks get --id ID --format json
90
+ objective:
91
+ list: agentera state objective list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
92
+ get: agentera state objective get --id ID --format json
93
+ experiments:
94
+ list: agentera state experiments list --objective ID [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
95
+ get: agentera state experiments get --id ID --format json
96
+ todo:
97
+ list: agentera state todo list [--severity SEVERITY] [--status STATUS] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
98
+ get: agentera state todo get --id ID --format json
99
+ docs:
100
+ list: agentera state docs list [--topic TEXT] [--status STATUS] [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
101
+ get: agentera state docs get --id ID --format json
102
+ list_help:
103
+ schema_version: agentera.entityListHelp.v1
104
+ defaults:
105
+ summary_fields: [id, artifact, retrieval.get]
106
+ selectors:
107
+ ids_only:
108
+ flag: --ids-only
109
+ description: Return only canonical minimum identity, exact-get recovery, and required family minimum fields such as TODO queue_rank.
110
+ fields:
111
+ flag: --fields FIELDS
112
+ description: Select comma-separated lowercase record paths present in the filtered snapshot; identity and exact-get recovery remain present.
113
+ mutual_exclusion: true
114
+ bounds: { minimum: 1, default: 20, maximum: 100, max_utf8_bytes: 32768 }
115
+ formats: [text, json, yaml]
116
+ families:
117
+ progress:
118
+ command_tokens: [progress]
119
+ bare_read: alias
120
+ filters:
121
+ - { flag: --topic TEXT, name: topic, values: free_text }
122
+ - { flag: --status STATUS, name: status, values: free_text }
123
+ example: agentera state progress list --limit 20 --format json
124
+ decisions:
125
+ command_tokens: [decisions]
126
+ bare_read: alias
127
+ filters:
128
+ - { flag: --topic TEXT, name: topic, values: free_text }
129
+ example: agentera state decisions list --limit 20 --format json
130
+ health:
131
+ command_tokens: [health]
132
+ bare_read: correction
133
+ bare_recovery: agentera state health list --limit 20 --format json
134
+ filters:
135
+ - { flag: --dimension DIMENSION, name: dimension, values: free_text }
136
+ example: agentera state health list --limit 20 --format json
137
+ plans:
138
+ command_tokens: [plan]
139
+ bare_read: correction
140
+ bare_recovery: agentera state plan list --status open --limit 20 --format json
141
+ filters:
142
+ - { flag: '--status open|complete|archived', name: status, values: [open, complete, archived] }
143
+ example: agentera state plan list --status open --limit 20 --format json
144
+ plan_tasks:
145
+ command_tokens: [plan, tasks]
146
+ bare_read: correction
147
+ bare_recovery: agentera state plan tasks list --limit 20 --format json
148
+ family_identifier:
149
+ syntax: PLAN_ID
150
+ required: false
151
+ description: Optional bare plan ID; omit it to list tasks from the active plan.
152
+ filters: []
153
+ example: agentera state plan tasks list --limit 20 --format json
154
+ objective:
155
+ command_tokens: [objective]
156
+ bare_read: correction
157
+ bare_recovery: agentera state objective list --limit 20 --format json
158
+ filters: []
159
+ example: agentera state objective list --limit 20 --format json
160
+ experiments:
161
+ command_tokens: [experiments]
162
+ bare_read: correction
163
+ bare_recovery: agentera state objective list --limit 20 --format json
164
+ family_identifier:
165
+ syntax: --objective ID
166
+ required: true
167
+ description: Required bare objective entity ID.
168
+ filters: []
169
+ example: agentera state experiments list --objective qjtrmnpvka --limit 20 --format json
170
+ todo:
171
+ command_tokens: [todo]
172
+ bare_read: alias
173
+ filters:
174
+ - { flag: --severity SEVERITY, name: severity, values: free_text }
175
+ - { flag: --status STATUS, name: status, values: free_text }
176
+ summary_fields: [id, artifact, public_order, readiness, actionability, queue_rank, reconciliation, retrieval.get]
177
+ summary_field_notes:
178
+ public_order:
179
+ description: Markdown-owned one-based order within the item's public section, or null before reconciliation activation.
180
+ ownership: markdown_read_projection
181
+ persisted: false
182
+ filter: false
183
+ readiness:
184
+ description: Public lifecycle state plus whether Agentera readiness declares an explicit blocker.
185
+ ownership: agentera_operational_projection
186
+ persisted: false
187
+ filter: false
188
+ actionability:
189
+ description: Read-only TODO readiness outcome and eligibility computed across the complete TODO snapshot.
190
+ ownership: computed_read_snapshot
191
+ persisted: false
192
+ filter: false
193
+ queue_rank:
194
+ description: Computed one-based position in the complete ordered TODO snapshot before filters.
195
+ ownership: computed_read_snapshot
196
+ persisted: false
197
+ filter: false
198
+ reconciliation:
199
+ description: Global reconciliation status and item-specific drift state for this read snapshot.
200
+ ownership: computed_read_snapshot
201
+ persisted: false
202
+ filter: false
203
+ example: agentera state todo list --severity critical --ids-only --limit 20 --format json
204
+ docs:
205
+ command_tokens: [docs]
206
+ bare_read: correction
207
+ bare_recovery: agentera state docs list --limit 20 --format json
208
+ filters:
209
+ - { flag: --topic TEXT, name: topic, values: free_text }
210
+ - { flag: --status STATUS, name: status, values: free_text }
211
+ example: agentera state docs list --limit 20 --format json
212
+ collections:
213
+ - { artifact: progress, identity: id, classification: artifact }
214
+ - { artifact: decisions, identity: id, classification: artifact }
215
+ - { artifact: health, identity: id, classification: artifact }
216
+ - { artifact: plan, boundary: plan, identity: id, classification: artifact }
217
+ - { artifact: plan, boundary: plan_task, identity: id, classification: artifact }
218
+ - { artifact: objective, identity: id, classification: artifact }
219
+ - { artifact: experiments, identity: id, classification: artifact }
220
+ - { artifact: todo, identity: id, classification: artifact }
221
+ - { artifact: docs, identity: id, classification: artifact }
222
+ policy:
223
+ schema_version: agentera.entityPublicRetrievalPolicy.v1
224
+ status: final
225
+ authority_boundary: >-
226
+ This canonical public-retrieval model owns list/get envelopes, cursors,
227
+ selectors, identities, omissions, structured failures, and output bounds.
228
+ Entity definitions own family ordering and storage. No other active
229
+ section may declare public retrieval commands, selectors, or identities.
230
+ envelope:
231
+ required_fields:
232
+ - schemaVersion
233
+ - command
234
+ - status
235
+ - entries
236
+ - counts
237
+ - filters
238
+ - snapshot
239
+ - source
240
+ - source_contract
241
+ counts_required_fields: [total, returned, remaining, candidate, omitted, continuation]
242
+ status_values: [ok, degraded]
243
+ bounded_summary_projection:
244
+ cardinality_owner: summary_rows_after_filters_and_cursor
245
+ limit_semantics: >-
246
+ Return exactly min(requested limit, candidates remaining in the bound
247
+ snapshot) rows. Serialized-byte pressure may remove optional detail
248
+ from those rows but never removes a selected row.
249
+ minimum_fields: [id, artifact, retrieval.get]
250
+ family_minimum_fields:
251
+ todo: [queue_rank]
252
+ optional_fields_rule: >-
253
+ Every declared family summary field that is not a minimum field is
254
+ optional under byte pressure and is removed as one deterministic tier.
255
+ queue_rank: >-
256
+ One-based position in the complete canonically ordered TODO queue
257
+ before request filters. It is computed from the read snapshot and is
258
+ never persisted or used to reorder TODO.md.
259
+ optional_detail_degradation:
260
+ status: degraded
261
+ reason: optional_detail_byte_budget
262
+ row_omission: forbidden
263
+ scalar_truncation: forbidden
264
+ required_metadata: [reason, detail_omitted_count, omitted_fields, recovery]
265
+ omitted_fields_order: lexical
266
+ recovery: concrete_exact_get_pointer_per_returned_row
267
+ selectors:
268
+ ids_only:
269
+ fields: canonical_minimum_fields
270
+ optional_summary_fields: excluded
271
+ fields:
272
+ fields: canonical_minimum_fields_plus_all_requested_record_paths
273
+ validation: >-
274
+ Each lowercase dot path must exist in at least one record in the
275
+ filtered cursor snapshot. Duplicate, malformed, or absent paths
276
+ are invalid_request. Requested paths are sorted before projection
277
+ and cursor binding; a missing value in one row remains absent.
278
+ scalar_truncation: forbidden
279
+ mutual_exclusion: ids_only_and_fields
280
+ byte_pressure:
281
+ ids_only: reject_without_partial_rows_if_minimum_rows_cannot_fit
282
+ selected_fields: reject_without_partial_rows_or_fields
283
+ default: degrade_full_to_summary_then_minimum_before_rejection
284
+ metadata:
285
+ continuation: binds_family_identifier_filters_selector_limit_order_and_snapshot
286
+ exact_get: one_concrete_command_per_returned_row
287
+ cursor:
288
+ vocabulary: opaque_snapshot_cursor
289
+ first_page: omit_cursor
290
+ response_field: next_cursor
291
+ binding: [collection, family_identifier, selectors, filters, limit, order, snapshot]
292
+ invalid_behavior: cursor_invalid
293
+ unavailable_behavior: cursor_snapshot_unavailable
294
+ caller_rules: [do_not_parse, do_not_construct, do_not_compare_internals]
295
+ omission:
296
+ required_when_candidates_remain: [omitted, omitted_count, omission_reason, retrieval]
297
+ semantics: >-
298
+ Omission reports only candidates beyond the selected row window.
299
+ Optional detail degradation is separate and names every omitted field.
300
+ A response never silently slices rows or truncates scalar values.
301
+ output_bounds:
302
+ maximum_limit: 100
303
+ max_serialized_utf8_bytes: 32768
304
+ scalar_truncation: forbidden
305
+ row_omission_under_byte_pressure: forbidden
306
+ optional_detail: degrade_before_minimum_row_rejection
307
+ failures:
308
+ schema_version: agentera.stateFailure.v1
309
+ required_fields: [class, message, syntax, example, recovery]
310
+ classes:
311
+ invalid_request: malformed, duplicate, missing, or incompatible selector
312
+ unsupported_artifact: collection is not exposed by the canonical grammar
313
+ not_found: a valid exact identity has no matching record
314
+ ambiguous: duplicate identity or compatibility state has multiple candidates
315
+ corrupt: selected state cannot be parsed or validated safely
316
+ incomplete: selected record exists but required detail is unavailable
317
+ cursor_invalid: cursor is malformed or bound to different request state
318
+ cursor_snapshot_unavailable: exact cursor snapshot cannot be resumed
319
+ unsupported_state: authority cannot return a safe bounded envelope
320
+ exit_codes: { usage: 2, state_or_compatibility_failure: 1 }
321
+ archive_policy:
322
+ plan:
323
+ owner: canonical_plan_entities_and_immutable_plan_archive_entities
324
+ diagnostics: selected_candidate_only_blocks_exact_get
325
+ unselected_diagnostics: degrade_catalog_without_blocking_other_exact_gets
326
+ experiments:
327
+ owner: experiment_archival
328
+ storage_scope: objective_directory
329
+ publication_order: archive_before_projection
330
+ projection_policy: uniform_10_40_50
331
+ missing_detail: never_reconstructed
332
+ identity:
333
+ scope: project_wide_across_all_entity_artifacts
334
+ alphabet: abcdefghijklmnopqrstuvwxyz
335
+ length: 10
336
+ accepted_pattern: '^[a-z]{10}$'
337
+ example: qjtrmnpvka
338
+ allocation: random_from_declared_alphabet
339
+ collision_rule: retry before publication; an existing ID is never reassigned or overwritten
340
+ prohibited_components: [prefix, sequence, timestamp, branch, writer, git_reference]
341
+ meaning_rule: >-
342
+ The ID is opaque and carries no artifact or entity-boundary information;
343
+ artifact is the sole public classification field.
344
+ storage_boundary:
345
+ rule: one independently mutable entity per writer-owned canonical file
346
+ aggregate_authority: forbidden
347
+ shared_primitives:
348
+ status: implemented
349
+ canonical_root: .agentera/entities
350
+ canonical_path_template: .agentera/entities/<artifact>/<boundary>/<id>.yaml
351
+ path_components: [artifact, boundary, id]
352
+ extension: .yaml
353
+ publication: exclusive_immutable_file
354
+ publication_context:
355
+ scope: shared_by_all_entity_families
356
+ binding: validated_project_root_and_exact_cutover_marker_snapshot
357
+ lifetime: mode_detection_through_writer_lock_and_final_publication_validation
358
+ filesystem_contract:
359
+ primitives: [node_fs_linkSync, node_fs_renameSync]
360
+ replacement_visibility: complete_old_or_new_bytes_per_file
361
+ journal_visibility: pending_journal_blocks_reads
362
+ global_snapshot: not_promised
363
+ late_racer: outside_contract_after_final_successful_validation
364
+ unsupported_result: structured_unsupported_target_before_target_effects
365
+ pathname_race_contract: >-
366
+ Entity publication uses project-relative standard Node paths. The root,
367
+ exact valid marker, target, recovery directories, and attempt-owned
368
+ roles are revalidated at declared boundaries before publication or
369
+ recovery effects. Immutable creation linearizes through link and
370
+ replacement linearizes through complete-file rename. A detected
371
+ boundary change preserves the competitor and returns a structured
372
+ conflict. The journal is a read barrier and recovery authority, not a
373
+ global multi-file snapshot; a non-cooperating writer that races after
374
+ the final successful validation is outside this contract.
375
+ marker_change_after_detection: conflict_without_legacy_fallback
376
+ successor_preservation: never_remove_unmatched_or_unrelated_identity
377
+ allocation: provisional_candidate_until_publication
378
+ project_wide_id_claim:
379
+ synchronization: .agentera/.writer.lock
380
+ critical_section: final_project_wide_scan_through_durable_publication
381
+ interrupted_writer_recovery: dead_process_lock_reclamation
382
+ persistent_reservation: none
383
+ identical_replay: idempotent
384
+ replay_equality: recursive_key_sorted_logical_content_with_array_order_preserved
385
+ divergent_same_id: reject_without_overwrite
386
+ state_validation:
387
+ canonical_command: agentera check validate state
388
+ mutates: false
389
+ failure_exit: nonzero
390
+ diagnostics: bounded_structured_with_exact_recovery
391
+ same_entity_conflict: >-
392
+ Concurrent divergent edits to one entity remain an ordinary explicit file
393
+ conflict or validation conflict; no runtime silently selects a winner.
394
+ unrelated_entity_merge: >-
395
+ Independently created or changed entities occupy distinct canonical files
396
+ so ordinary Git can preserve both changes.
397
+ entities:
398
+ - boundary: progress_cycle
399
+ artifact: progress
400
+ independently_mutable: true
401
+ relationships: []
402
+ implementation: implemented
403
+ record:
404
+ required_fields: [timestamp, type, phase, what, context]
405
+ required_paths: [context.intent]
406
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
407
+ temporal_fields: [timestamp]
408
+ timestamp_format: 'YYYY-MM-DD HH:MM'
409
+ publication_order:
410
+ field: publication_order
411
+ type: positive_safe_integer
412
+ presence: optional_for_legacy_required_for_new_publications
413
+ visibility: public_record_metadata
414
+ ownership: progress_writer_only
415
+ assignment: max_valid_existing_progress_publication_order_plus_one
416
+ synchronization: .agentera/.writer.lock
417
+ dry_run: omitted_without_consuming_or_mutating_order
418
+ caller_input: forbidden
419
+ malformed_or_spoofed_input: reject_before_mutation_with_bounded_diagnostics
420
+ durability: persisted_in_each_new_progress_cycle_entity
421
+ privacy: bounded_ordinal_without_time_identity_or_content
422
+ retrieval:
423
+ exact: agentera state progress get --id ID --format json
424
+ list: agentera state progress list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
425
+ ordering: timestamp_desc_then_publication_order_desc_then_id_asc
426
+ semantic_recency: >-
427
+ The first full progress cycle is latest. Timestamp remains the public
428
+ minute-compatible primary key. Within one timestamp, a valid writer-owned
429
+ publication_order sorts descending; a marked publication sorts after all
430
+ unmarked legacy records observed by that publication and therefore before
431
+ them in newest-first retrieval. Missing markers are legacy unordered ties.
432
+ Equal valid markers can result from independently published histories and
433
+ do not establish relative publication order. Missing or equal markers use
434
+ opaque ID ascending only as a deterministic final fallback and never claim
435
+ reconstructed publication chronology.
436
+ default_limit: 20
437
+ maximum_limit: 100
438
+ max_utf8_bytes: 32768
439
+ cursor: opaque_snapshot_cursor_v2
440
+ cursor_compatibility: >-
441
+ Version 2 continuation keys include timestamp, publication_order presence
442
+ and value, and opaque ID. Version 1 progress cursors are rejected with
443
+ recovery to omit --cursor and establish a new snapshot; authority changes
444
+ also invalidate prior cursor signatures by design.
445
+ mutation_after_snapshot: cursor_snapshot_unavailable
446
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
447
+ scalar_truncation: forbidden
448
+ - boundary: progress_summary
449
+ artifact: progress
450
+ independently_mutable: false
451
+ relationships: []
452
+ implementation: implemented
453
+ publication: immutable
454
+ mutation: forbidden
455
+ record:
456
+ required_fields: [summary, migration_provenance]
457
+ required_paths: []
458
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
459
+ canonical_metadata:
460
+ summary_migration_provenance:
461
+ path: record.migration_provenance
462
+ required_fields: [source_path, source_record_sha256]
463
+ additional_fields: forbidden
464
+ source_path: project-relative v2 aggregate source path
465
+ sources:
466
+ - path: .agentera/progress.yaml
467
+ collections: [cycles, archive]
468
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
469
+ - boundary: decision
470
+ artifact: decisions
471
+ independently_mutable: true
472
+ relationships: []
473
+ implementation: implemented
474
+ publication: immutable
475
+ record:
476
+ required_fields: [date, question, context, alternatives, choice, reasoning, confidence]
477
+ required_paths: []
478
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, satisfaction]
479
+ canonical_metadata:
480
+ migration_provenance:
481
+ applicability: inherited_unsupported_confidence_only
482
+ required_fields: [kind, source, source_path, source_record_sha256, confidence]
483
+ additional_fields: forbidden
484
+ kind: inherited_decision_confidence
485
+ sources: [current_projection, verified_archive]
486
+ semantics: >-
487
+ Cutover persists this envelope-level metadata only when an authority-backed
488
+ complete-record classifier proves that high, medium, or low confidence is
489
+ the source record's sole schema violation. confidence must match the
490
+ canonical record, source_path is project-relative, and source_record_sha256
491
+ binds the complete parsed source record before canonical alias removal.
492
+ Current confidence values and ordinary decision writes omit this metadata.
493
+ retrieval:
494
+ exact: agentera state decisions get --id ID --format json
495
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
496
+ ordering: date_desc_then_id_asc
497
+ default_limit: 20
498
+ maximum_limit: 100
499
+ max_utf8_bytes: 32768
500
+ cursor: opaque_snapshot_cursor
501
+ mutation_after_snapshot: cursor_snapshot_unavailable
502
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
503
+ scalar_truncation: forbidden
504
+ - boundary: decision_satisfaction
505
+ artifact: decisions
506
+ independently_mutable: true
507
+ relationships: [decision]
508
+ implementation: implemented
509
+ publication: replace_owned_entity
510
+ ownership: { fields: [decision], cardinality: zero_or_one }
511
+ record:
512
+ required_fields: [decision, state]
513
+ required_paths: []
514
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
515
+ - boundary: decision_summary
516
+ artifact: decisions
517
+ independently_mutable: false
518
+ relationships: []
519
+ implementation: implemented
520
+ publication: immutable
521
+ mutation: forbidden
522
+ record:
523
+ required_fields: [summary, migration_provenance]
524
+ required_paths: []
525
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
526
+ canonical_metadata:
527
+ summary_migration_provenance:
528
+ path: record.migration_provenance
529
+ required_fields: [source_path, source_record_sha256]
530
+ additional_fields: forbidden
531
+ source_path: project-relative v2 aggregate source path
532
+ sources:
533
+ - path: .agentera/decisions.yaml
534
+ collections: [decisions, archive]
535
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
536
+ satisfaction: optional_inline_read_only_source_retained_field
537
+ - boundary: decision_revision
538
+ artifact: decisions
539
+ independently_mutable: true
540
+ includes: [amendment]
541
+ relationships: [decision]
542
+ implementation: implemented
543
+ publication: immutable
544
+ ownership: { fields: [decision, base_sha256], cardinality: zero_or_one }
545
+ record:
546
+ required_fields: [decision, provenance, base_sha256, changes]
547
+ legacy_optional_fields: [date]
548
+ required_paths: []
549
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, satisfaction]
550
+ canonical_metadata:
551
+ migration_provenance:
552
+ applicability: inherited_unsupported_revision_confidence_only
553
+ required_fields: [kind, source, source_path, source_identity, source_fingerprint, source_record_sha256, confidence]
554
+ additional_fields: forbidden
555
+ kind: inherited_decision_revision_confidence
556
+ sources: [revision_document]
557
+ semantics: >-
558
+ Cutover persists this envelope-level metadata only when a legacy
559
+ aggregate revision carries high, medium, or low confidence and the
560
+ composed decision is otherwise valid. source_identity selects the
561
+ exact ordered row in .agentera/revisions/decisions.yaml,
562
+ source_fingerprint binds the deterministic canonical decision ID, and
563
+ source_record_sha256 binds that complete row. Ordinary decision
564
+ amendments accept only the current confidence vocabulary.
565
+ - boundary: health_audit
566
+ artifact: health
567
+ independently_mutable: true
568
+ relationships: []
569
+ implementation: implemented
570
+ publication: immutable
571
+ record:
572
+ required_fields: [date, dimensions, findings_summary, trajectory, grades]
573
+ required_paths: []
574
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
575
+ cli_owned_append_fields: [appended_at]
576
+ legacy_optional_fields: [appended_at]
577
+ field_contract:
578
+ appended_at:
579
+ format: canonical_utc_iso8601
580
+ assignment: cli_writer_at_append
581
+ compatibility: >-
582
+ Legacy canonical health audits omit appended_at and remain valid without
583
+ reconstructed chronology.
584
+ retrieval:
585
+ exact: agentera state health get --id ID --format json
586
+ list: agentera state health list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
587
+ ordering: appended_at_desc_then_id_asc_then_legacy_date_desc_then_id_asc
588
+ default_limit: 20
589
+ maximum_limit: 100
590
+ max_utf8_bytes: 32768
591
+ cursor: opaque_snapshot_cursor
592
+ mutation_after_snapshot: cursor_snapshot_unavailable
593
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
594
+ scalar_truncation: forbidden
595
+ repair: >-
596
+ Canonical health audit entities are immutable and cannot be row-deduplicated.
597
+ Malformed envelopes, duplicate IDs, or conflicting ownership fail before effects
598
+ and recover through agentera check validate state; no repair event is fabricated.
599
+ - boundary: health_summary
600
+ artifact: health
601
+ independently_mutable: false
602
+ relationships: []
603
+ implementation: implemented
604
+ publication: immutable
605
+ mutation: forbidden
606
+ record:
607
+ required_fields: [summary, migration_provenance]
608
+ required_paths: []
609
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
610
+ canonical_metadata:
611
+ summary_migration_provenance:
612
+ path: record.migration_provenance
613
+ required_fields: [source_path, source_record_sha256]
614
+ additional_fields: forbidden
615
+ source_path: project-relative v2 aggregate source path
616
+ sources:
617
+ - path: .agentera/health.yaml
618
+ collections: [audits, archive]
619
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
620
+ - boundary: plan
621
+ artifact: plan
622
+ independently_mutable: true
623
+ relationships: []
624
+ implementation: implemented
625
+ publication: replace_owned_entity
626
+ record:
627
+ required_fields: [header, what, why, scope]
628
+ required_paths: [header.title, header.created, header.status]
629
+ forbidden_fields: [id, artifact, stable_id, plan_id, tasks, previous_plan_archived]
630
+ identity: >-
631
+ The canonical plan identity is the bare ten-letter entity envelope id.
632
+ A composite header.id belongs only to legacy migration source and is
633
+ never a public selector.
634
+ field_shapes:
635
+ scope:
636
+ type: mapping
637
+ required_fields:
638
+ included: string_list
639
+ excluded: string_list
640
+ optional_fields:
641
+ deferred: string_list
642
+ additional_fields: forbidden
643
+ legacy_source_normalization: >-
644
+ A block-style, non-flow, exactly-one-pair mapping used directly as
645
+ an included, excluded, or deferred sequence item is the historical
646
+ block-colon string encoding and normalizes to one `key: value`
647
+ string only when both source nodes are string scalars. Explicit
648
+ flow mapping syntax never normalizes and remains invalid under the
649
+ canonical validator. A deliberate block single-pair mapping is
650
+ syntactically indistinguishable from the legacy encoding and falls
651
+ under this source-form rule; no semantic intent is inferred.
652
+ retrieval:
653
+ exact: agentera state plan get --id ID --format json
654
+ list: agentera state plan list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
655
+ ordering: created_desc_then_id_asc
656
+ default_limit: 20
657
+ maximum_limit: 100
658
+ max_utf8_bytes: 32768
659
+ cursor: opaque_snapshot_cursor
660
+ mutation_after_snapshot: cursor_snapshot_unavailable
661
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
662
+ scalar_truncation: forbidden
663
+ - boundary: plan_task
664
+ artifact: plan
665
+ independently_mutable: true
666
+ relationships: [plan, depends_on_tasks, superseded_by]
667
+ implementation: implemented
668
+ publication: replace_owned_entity
669
+ record:
670
+ required_fields: [plan, name, status, depends_on, acceptance]
671
+ required_paths: []
672
+ forbidden_fields: [id, artifact, number, task_number, stable_id, plan_id]
673
+ identity: >-
674
+ The canonical task identity is the bare ten-letter entity envelope id;
675
+ dependencies and replacements are bare IDs resolved within the same plan.
676
+ - boundary: objective
677
+ artifact: objective
678
+ independently_mutable: true
679
+ relationships: []
680
+ implementation: implemented
681
+ publication: replace_owned_entity
682
+ record:
683
+ required_fields: [header, objective, metric, baseline, scope]
684
+ required_paths: [header.title, header.status, objective.description, objective.measurement]
685
+ forbidden_fields: [id, artifact, stable_id, objective_id]
686
+ retrieval:
687
+ exact: agentera state objective get --id ID --format json
688
+ list: agentera state objective list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
689
+ ordering: created_desc_then_id_asc
690
+ default_limit: 20
691
+ maximum_limit: 100
692
+ max_utf8_bytes: 32768
693
+ cursor: opaque_snapshot_cursor
694
+ mutation_after_snapshot: cursor_snapshot_unavailable
695
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
696
+ scalar_truncation: forbidden
697
+ - boundary: experiment
698
+ artifact: experiments
699
+ independently_mutable: true
700
+ relationships: [objective]
701
+ implementation: implemented
702
+ publication: immutable
703
+ baseline:
704
+ field: status
705
+ value: baseline
706
+ cardinality: exactly_one_when_experiments_exist
707
+ record:
708
+ required_fields: [objective, date, label, hypothesis, method, change, metric, regression, status, conclusion]
709
+ required_paths: [objective, date, label, status]
710
+ forbidden_fields: [id, artifact, number, experiment_number, stable_id, objective_id]
711
+ retrieval:
712
+ exact: agentera state experiments get --id ID --format json
713
+ list: agentera state experiments list --objective ID [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
714
+ ordering: date_desc_then_id_asc
715
+ default_limit: 20
716
+ maximum_limit: 100
717
+ max_utf8_bytes: 32768
718
+ cursor: opaque_snapshot_cursor
719
+ mutation_after_snapshot: cursor_snapshot_unavailable
720
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
721
+ scalar_truncation: forbidden
722
+ - boundary: todo_item
723
+ artifact: todo
724
+ independently_mutable: true
725
+ relationships: []
726
+ implementation: implemented
727
+ publication: reconcile_markdown_under_recoverable_journal
728
+ record:
729
+ required_fields: [severity, status]
730
+ required_paths: []
731
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, path, public_order]
732
+ ownership:
733
+ fields: [kind, target_version, title, requirements, acceptance, release_blocker, severity, status, readiness, lifecycle, reconciliation]
734
+ cardinality: TODO.md owns public fields; Agentera owns operational fields
735
+ identity: managed row and canonical entity share one visible ten-letter id
736
+ markdown_public_fields: [description, severity, status, order]
737
+ agentera_operational_fields: [readiness, dependencies, blocked, gate, evidence, lifecycle]
738
+ reconciliation:
739
+ baseline: record.reconciliation
740
+ schema_version: agentera.todoReconciliation.v1
741
+ public_fields: [description, severity, status, order]
742
+ transaction_journal: .agentera/.todo-reconciliation/<content-digest>.json
743
+ create_recovery_receipt:
744
+ applicability: create_transactions_only
745
+ created_id: original_writer_assigned_ten_letter_id
746
+ request_sha256: sha256_of_domain_separated_canonical_normalized_create_record
747
+ transaction_identity: canonical_create_receipt_and_targets
748
+ retry: >-
749
+ Before applying a pending create journal, require the retry's normalized
750
+ request digest to match. Exact retry recovers and returns the original ID
751
+ as an idempotent replay without allocation; a different request rejects
752
+ before target effects and leaves the journal intact.
753
+ activation:
754
+ path: .agentera/todo-reconciliation-activation.json
755
+ schema_version: agentera.todoReconciliationActivation.v1
756
+ cardinality: zero_before_activation_then_exactly_one
757
+ initial_match: exact_unique_public_fields_only
758
+ retained_legacy_rows: bounded_section_and_exact_line_sha256_identities
759
+ rule: >-
760
+ The first reconciliation may assign a canonical ID only when one
761
+ ID-less pre-activation row exactly matches one otherwise-unclaimed
762
+ entity public record. It records unmatched pre-existing rows by
763
+ section-and-line digest as retained unmanaged legacy bytes. The
764
+ activation record, all entity baselines, and the public document
765
+ publish in the same journal. After activation, every new checkbox
766
+ row under a managed severity or resolved heading requires a
767
+ canonical ten-letter ID; each retained legacy exemption admits at
768
+ most one exact row occurrence per reconciliation and cannot
769
+ authorize a changed or duplicate row.
770
+ managed_row_identity: every_activated_managed_checkbox_row_has_one_ten_letter_id
771
+ unmanaged_regions: checkbox_rows_outside_managed_headings_remain_ordinary_markdown
772
+ public_path_binding: exact_docs_mapped_relative_path_plus_docs_yaml_snapshot_sha256
773
+ pending_visibility: agentera_todo_get_list_startup_and_dry_run_fail_closed_without_recovery_effects
774
+ hard_crash_recovery: consume_exact_original_previous_replacement_tmp_and_replacement_metadata_before_target_replay
775
+ startup_selection:
776
+ ordering_authority: skills/agentera/schemas/artifacts/todo.yaml#READINESS.ordering.modes.projected_startup
777
+ projected_entity_bound: 256
778
+ public_replacement: >-
779
+ Stage and fsync complete replacement bytes plus exact prior bytes on the
780
+ target filesystem, then replace each regular file with standard Node
781
+ filesystem operations. Each replacement linearizes as one complete-file
782
+ rename, so readers observe complete old or new bytes. The journal is a
783
+ read barrier and recovery authority, not a global multi-file atomic
784
+ snapshot. Publication validates the target and project context at
785
+ declared boundaries and preserves a change detected at a validation
786
+ boundary. A non-cooperating writer that races after the final successful
787
+ validation is outside this contract. Cross-filesystem or operational
788
+ filesystem rejection rolls back every attempted target before returning
789
+ one bounded correction. Recovery consumes exact private roles;
790
+ concurrent bytes remain canonical or retained and produce one structured
791
+ correction.
792
+ semantics: >-
793
+ TODO reads project Markdown-owned public fields and order with
794
+ Agentera-owned operational fields, report bounded field-level drift,
795
+ and have no reconciliation effects. Startup builds one complete
796
+ bounded projection through that same read authority; readiness,
797
+ dependency state, selection, and counts all consume its projected
798
+ status, severity, and order while retaining operational readiness and
799
+ gates. Eligibility and severity grouping apply before managed Markdown
800
+ order. An entity intentionally absent from managed Markdown sorts after
801
+ managed rows of the same severity by queue rank and then ID.
802
+ Every TODO mutation compares
803
+ TODO.md and the entity against the last public baseline, merges
804
+ one-sided or independent field edits, rejects different edits to the
805
+ same public field, applies the requested mutation, and publishes all
806
+ changed targets under one recoverable journal. Interrupted create retry
807
+ is bound to its canonical normalized request and original created ID;
808
+ exact retry returns that ID without allocating another entity, while a
809
+ different request rejects before recovery effects. Missing post-activation
810
+ baselines, divergent edits, duplicate or orphaned IDs, and removal of an
811
+ unchecked row reject before effects. One bounded activation
812
+ transaction admits exact legacy state
813
+ without treating retained unmatched rows as managed. The durable
814
+ journal is the Agentera-visible commit barrier:
815
+ while it exists, TODO reads and startup reject rather than expose mixed
816
+ targets, and dry-run inspects it without recovery effects. Each ordinary
817
+ file replacement remains whole-file atomic. A non-dry retry repairs a
818
+ target interrupted before or after replacement from exact retained role
819
+ files, and recovers the public document from the same portable
820
+ complete-file roles, then completes the prepared journal before
821
+ replaying the request. Invalid journals and stale or retained-role
822
+ conflicts preserve all target and recovery bytes and return one
823
+ bounded structured correction. Recovery is bound to the exact
824
+ docs-mapped public path and mapping snapshot; unrelated branch,
825
+ competitor, or mapping changes are never overwritten.
826
+ Rollback attempts every applied target even when one target reports a
827
+ boundary conflict; it retains the pending journal and bounded per-target role
828
+ evidence for only the targets that could not be restored.
829
+ bounds:
830
+ managed_items: 256
831
+ startup_projected_entities: 256
832
+ retained_pre_activation_legacy_rows: 256
833
+ transaction_targets: 258
834
+ activation_utf8_bytes: 32768
835
+ journal_utf8_bytes: 4194304
836
+ todo_markdown_utf8_bytes: 1048576
837
+ retrieval:
838
+ exact: agentera state todo get --id ID --format json
839
+ list: agentera state todo list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
840
+ ordering: severity_then_status_then_markdown_order_then_id
841
+ default_limit: 20
842
+ maximum_limit: 100
843
+ max_utf8_bytes: 32768
844
+ cursor: opaque_snapshot_cursor
845
+ mutation_after_snapshot: cursor_snapshot_unavailable
846
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
847
+ scalar_truncation: forbidden
848
+ - boundary: documentation_inventory_entry
849
+ artifact: docs
850
+ independently_mutable: true
851
+ relationships: []
852
+ implementation: implemented
853
+ publication: replace_owned_entity
854
+ record:
855
+ required_fields: [document, path, last_updated, status]
856
+ required_paths: []
857
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
858
+ retrieval:
859
+ exact: agentera state docs get --id ID --format json
860
+ list: agentera state docs list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
861
+ ordering: path_then_id
862
+ default_limit: 20
863
+ maximum_limit: 100
864
+ max_utf8_bytes: 32768
865
+ cursor: opaque_snapshot_cursor
866
+ mutation_after_snapshot: cursor_snapshot_unavailable
867
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
868
+ scalar_truncation: forbidden
869
+ relationships:
870
+ representation: bare target entity ID in the named record field
871
+ integrity: every non-null target must resolve to exactly one entity with the declared target boundary
872
+ unresolved_behavior: whole-state validation and migration cutover fail without creating a target
873
+ declarations:
874
+ - source: decision_satisfaction
875
+ field: decision
876
+ target: decision
877
+ cardinality: exactly_one
878
+ - source: decision_revision
879
+ field: decision
880
+ target: decision
881
+ cardinality: exactly_one
882
+ - source: plan_task
883
+ field: plan
884
+ target: plan
885
+ cardinality: exactly_one
886
+ - source: plan_task
887
+ field: depends_on
888
+ target: plan_task
889
+ cardinality: zero_or_many_same_plan
890
+ - source: plan_task
891
+ field: superseded_by
892
+ target: plan_task
893
+ cardinality: zero_or_many_same_plan
894
+ - source: experiment
895
+ field: objective
896
+ target: objective
897
+ cardinality: exactly_one
898
+ views:
899
+ authority: non_authoritative_cli_rendering
900
+ mutation: forbidden
901
+ source: canonical entity files only after cutover
902
+ requirements:
903
+ - bounded lists expose id and artifact and provide exact get by id
904
+ - ordering and cursors bind to an explicit snapshot and never imply identity
905
+ - omissions expose counts, reasons, and exact retrieval commands
906
+ - nested plan/task and objective/experiment views are relationship projections
907
+ - startup views use the same entities and may omit detail only under declared budgets
908
+ intentional_singletons:
909
+ exhaustive: true
910
+ additions_require_authority_amendment: true
911
+ boundaries:
912
+ - boundary: vision
913
+ reason: one project north star; excluded from execution-cycle mutation
914
+ - boundary: design
915
+ reason: one project visual identity editorial artifact
916
+ - boundary: changelog
917
+ reason: one ordered release-history editorial artifact
918
+ - boundary: profile
919
+ reason: one reusable decision-profile document per selected profile
920
+ - boundary: runtime_local_session_state
921
+ reason: runtime-local and not canonical project entity state
922
+ - boundary: docs_mapping
923
+ reason: one project path and documentation-policy mapping, distinct from documentation inventory entries
924
+ conflict_rule: concurrent edits remain explicit whole-document conflicts
925
+ excluded_from_entity_migration:
926
+ - all intentional_singletons
927
+ - immutable historical prose and evidence, except structured references explicitly declared for rewrite
928
+ - genuinely singleton editorial artifacts added by an authority amendment
929
+ declared_compacted_summary_contract:
930
+ status: implemented
931
+ activation: >-
932
+ The three summary boundaries are active entity and migration authority in
933
+ entity_target.entities. Ordinary summary readers and startup projection
934
+ expose retained degraded history without reconstructing missing detail.
935
+ runtime_boundary_source: entity_target.entities
936
+ runtime_exclusion: >-
937
+ No experiment_summary boundary is activated. Summary boundaries are
938
+ immutable/read-only and are not ordinary write targets.
939
+ source_scope:
940
+ included_artifacts: [progress, decisions, health]
941
+ excluded_artifacts:
942
+ - objective_experiments: protected v2 family; not a compacted-summary migration input
943
+ - runtime_local_session_state: runtime-local state is outside canonical project migration
944
+ - compacted_todo_rows: already satisfy the canonical TODO shape and are not remapped as summaries
945
+ authority_rule: >-
946
+ This implemented scope does not reconstruct Git history, normalize source
947
+ summaries, retain dual authority, or provide a repair or import command.
948
+ source_row_provenance:
949
+ semantic_id: v2_compacted_summary_physical_row.v1
950
+ status: implemented
951
+ accepted_parsed_row_values: [mapping, scalar_string]
952
+ normalization: >-
953
+ Preview normalizes either accepted parsed physical row value to canonical
954
+ retained summary content for matching and publication. A mapping retains
955
+ its source fields subject to canonical alias removal and declared metadata
956
+ injection; a scalar string becomes {summary: value}.
957
+ source_record_sha256:
958
+ format: lowercase_sha256_hex
959
+ input: >-
960
+ original parsed physical source row value, which may be a mapping or a
961
+ scalar string, before summary normalization, canonical alias removal, or
962
+ metadata injection
963
+ canonicalization: >-
964
+ SHA-256 of UTF-8 canonical JSON: recursively sort mapping keys, preserve
965
+ array order, serialize scalar strings with JSON.stringify, and emit no
966
+ insignificant whitespace.
967
+ diagnostics:
968
+ status: implemented
969
+ implementation: >-
970
+ Read-only migration preview classifies independent invalid source
971
+ identities as roots, then reports generated graph dependents separately.
972
+ Ordinary summary reads and startup do not expose these migration-only
973
+ fields.
974
+ counts:
975
+ blockers: total root_blockers plus dependent_blockers
976
+ root_blockers: independently invalid, ambiguous, conflicting, or unsupported source identities
977
+ dependent_blockers: >-
978
+ Downstream diagnostics caused by a named root blocker. Each dependent names
979
+ its root source identity and does not increase root corruption.
980
+ dependent_blocker_required_fields: [root_source_identity]
981
+ corruption_count: corrupt classification counts source roots only, never generated dependents
982
+ graph: >-
983
+ A resolved relationship to a root (including a chain) is a dependent
984
+ blocker. Missing references make their owning source a root. Cycles with
985
+ no source root choose their lexicographically first source identity as a
986
+ deterministic corrupt root; preview does not attempt graph recovery.
987
+ source_outcomes:
988
+ status: implemented
989
+ valid_compacted_summary:
990
+ outcome: ready_with_degraded_provenance
991
+ rule: >-
992
+ Map each valid supported v2 summary to its declared immutable summary
993
+ boundary, retain source fields and migration provenance, and never
994
+ reconstruct missing detail.
995
+ missing_detail_not_declared_summary:
996
+ outcome: blocked
997
+ rule: retain evidence and stop before publication; never infer omitted fields
998
+ inherited_confidence_only:
999
+ outcome: ready_with_legacy_caveat
1000
+ rule: >-
1001
+ Preserve an inherited full-decision high, medium, or low label exactly and
1002
+ report its caveat. Only new or amended labels must use the current strict
1003
+ vocabulary.
1004
+ boundaries:
1005
+ - boundary: progress_summary
1006
+ artifact: progress
1007
+ independently_mutable: false
1008
+ implementation: implemented
1009
+ publication: immutable
1010
+ mutation: forbidden
1011
+ canonical_representation: one_immutable_degraded_summary_entity_per_valid_v2_summary
1012
+ relationships: []
1013
+ record:
1014
+ required_fields: [summary, migration_provenance]
1015
+ additional_fields: source_retained_fields_plus_declared_metadata
1016
+ declared_metadata_fields: [migration_provenance]
1017
+ source_retained_fields: >-
1018
+ Preserve every source-retained field in the canonical record except
1019
+ public_schema.forbidden_canonical_aliases. migration_provenance is
1020
+ declared canonical metadata, not a retained source field. Missing
1021
+ full-detail fields remain absent; migration does not normalize or
1022
+ reconstruct them.
1023
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
1024
+ migration_provenance:
1025
+ path: record.migration_provenance
1026
+ required_fields: [source_path, source_record_sha256]
1027
+ additional_fields: forbidden
1028
+ source_path: project-relative v2 aggregate source path
1029
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
1030
+ retrieval:
1031
+ exact: agentera state progress get --id ID --format json
1032
+ list: agentera state progress list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
1033
+ detail_availability: summary
1034
+ compatibility: degraded
1035
+ caveats: required
1036
+ ordering: full_timestamp_desc_then_publication_order_desc_then_id_asc_then_summary_id_asc
1037
+ summary_ordering: canonical_id_asc_without_chronology_claim
1038
+ mutation: read_only
1039
+ - boundary: decision_summary
1040
+ artifact: decisions
1041
+ independently_mutable: false
1042
+ implementation: implemented
1043
+ publication: immutable
1044
+ mutation: forbidden
1045
+ canonical_representation: one_immutable_degraded_summary_entity_per_valid_v2_summary
1046
+ relationships: []
1047
+ record:
1048
+ required_fields: [summary, migration_provenance]
1049
+ additional_fields: source_retained_fields_plus_declared_metadata
1050
+ declared_metadata_fields: [migration_provenance]
1051
+ source_retained_fields: >-
1052
+ Preserve every source-retained field in the canonical record except
1053
+ public_schema.forbidden_canonical_aliases. migration_provenance is
1054
+ declared canonical metadata, not a retained source field. Missing
1055
+ full-detail fields remain absent; migration does not normalize or
1056
+ reconstruct them.
1057
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
1058
+ satisfaction: optional_inline_read_only_source_retained_field
1059
+ satisfaction_rule: >-
1060
+ Satisfaction may be absent. When retained, it remains inline and read-only;
1061
+ a decision summary never creates or targets a decision_satisfaction entity.
1062
+ migration_provenance:
1063
+ path: record.migration_provenance
1064
+ required_fields: [source_path, source_record_sha256]
1065
+ additional_fields: forbidden
1066
+ source_path: project-relative v2 aggregate source path
1067
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
1068
+ retrieval:
1069
+ exact: agentera state decisions get --id ID --format json
1070
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
1071
+ detail_availability: summary
1072
+ compatibility: degraded
1073
+ caveats: required
1074
+ ordering: full_date_desc_then_id_asc_then_summary_id_asc
1075
+ summary_ordering: canonical_id_asc_without_chronology_claim
1076
+ mutation: read_only
1077
+ - boundary: health_summary
1078
+ artifact: health
1079
+ independently_mutable: false
1080
+ implementation: implemented
1081
+ publication: immutable
1082
+ mutation: forbidden
1083
+ canonical_representation: one_immutable_degraded_summary_entity_per_valid_v2_summary
1084
+ relationships: []
1085
+ record:
1086
+ required_fields: [summary, migration_provenance]
1087
+ additional_fields: source_retained_fields_plus_declared_metadata
1088
+ declared_metadata_fields: [migration_provenance]
1089
+ source_retained_fields: >-
1090
+ Preserve every source-retained field in the canonical record except
1091
+ public_schema.forbidden_canonical_aliases. migration_provenance is
1092
+ declared canonical metadata, not a retained source field. Missing
1093
+ full-detail fields remain absent; migration does not normalize or
1094
+ reconstruct them.
1095
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
1096
+ migration_provenance:
1097
+ path: record.migration_provenance
1098
+ required_fields: [source_path, source_record_sha256]
1099
+ additional_fields: forbidden
1100
+ source_path: project-relative v2 aggregate source path
1101
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
1102
+ retrieval:
1103
+ exact: agentera state health get --id ID --format json
1104
+ list: agentera state health list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
1105
+ detail_availability: summary
1106
+ compatibility: degraded
1107
+ caveats: required
1108
+ ordering: full_date_desc_then_id_asc_then_summary_id_asc
1109
+ summary_ordering: canonical_id_asc_without_chronology_claim
1110
+ mutation: read_only
1111
+ measurement_contract:
1112
+ status: implemented
1113
+ environment: Linux, Node.js 22 or newer, one cold CLI process per sample
1114
+ fixtures:
1115
+ small: 100 valid entities distributed across every active entity_target.entities boundary
1116
+ large: 1000 valid entities distributed across every active entity_target.entities boundary
1117
+ relationship_rule: every active entity_target.relationships declaration has at least one valid fixture edge
1118
+ sampling:
1119
+ repetitions: 5
1120
+ pass_rule: every repetition stays within every applicable limit
1121
+ elapsed: wall-clock milliseconds from process start through complete serialized output
1122
+ heap: process heapUsed peak minus the normalized heapUsed baseline before fixture discovery
1123
+ heap_baseline:
1124
+ boundary: after CLI import reaches the fixture boundary and before the measured operation
1125
+ normalization: await successful Node inspector HeapProfiler.collectGarbage, then read Runtime.getHeapUsage
1126
+ measured_operation_collection: forbidden
1127
+ bytes: UTF-8 byte length of stdout including the trailing newline
1128
+ targets:
1129
+ exact_get:
1130
+ max_latency_ms: 1000
1131
+ max_heap_delta_bytes: 67108864
1132
+ max_utf8_bytes: 1048576
1133
+ bounded_list_small:
1134
+ max_latency_ms: 5000
1135
+ max_heap_delta_bytes: 67108864
1136
+ max_utf8_bytes: 32768
1137
+ bounded_list_large:
1138
+ max_latency_ms: 15000
1139
+ max_heap_delta_bytes: 268435456
1140
+ max_utf8_bytes: 32768
1141
+ startup_small:
1142
+ max_latency_ms: 5000
1143
+ max_heap_delta_bytes: 67108864
1144
+ serialized_limits: budgets.startup.surfaces
1145
+ startup_large:
1146
+ max_latency_ms: 15000
1147
+ max_heap_delta_bytes: 268435456
1148
+ serialized_limits: budgets.startup.surfaces
1149
+ failure_rule: >-
1150
+ Over-budget results fail the target gate. They may return a measured
1151
+ degraded envelope only where the referenced budget permits omission; they
1152
+ never truncate bytes, omit required identity, or fabricate detail.
1153
+
1154
+ entity_migration:
1155
+ status: one_way_forward_import_implemented
1156
+ decision: 94
1157
+ kind: single_full_upgrade_cutover
1158
+ cutover_marker:
1159
+ path: .agentera/state-mode.yaml
1160
+ schema_version: agentera.stateMode.v1
1161
+ entity_mode:
1162
+ schemaVersion: agentera.stateMode.v1
1163
+ mode: entities
1164
+ source_fingerprint: lowercase_sha256_of_bound_migration_inputs
1165
+ preview_digest: lowercase_sha256_of_bound_migration_preview
1166
+ absent_mode: legacy
1167
+ invalid_behavior: fail_without_fallback
1168
+ detection: read_only
1169
+ publication_owner: development_channel_v2_to_v3_upgrade
1170
+ selection: >-
1171
+ Project state and CLI installation state are independent dimensions. A v3
1172
+ CLI selects this cutover for recognized marker-absent v2 aggregate state
1173
+ whether the CLI runs from a self-contained npm package or a source
1174
+ checkout. Pending v1 Markdown state and marker-absent state with no
1175
+ recognized v2 entity input are rejected with manual recovery instructions.
1176
+ invocation:
1177
+ explicit_apply: full_upgrade_yes_only
1178
+ dry_run: optional_read_only_preview
1179
+ ordinary_reads_migrate: false
1180
+ ordinary_writes_migrate: false
1181
+ apply_invokes_git: true
1182
+ read_only_command: >-
1183
+ npx -y agentera@next upgrade --channel development --project "$PWD" --dry-run
1184
+ apply_command: >-
1185
+ npx -y agentera@next upgrade --channel development --project "$PWD" --yes
1186
+ apply_boundary: >-
1187
+ Full upgrade serializes through the project writer lock, validates the
1188
+ deterministic conversion, writes each missing canonical entity or accepts
1189
+ an exact existing match, validates the complete graph, and writes the
1190
+ authority marker last. There is no direct
1191
+ entity apply, public operation ID, resume, rollback, or cross-major restore.
1192
+ git_preflight:
1193
+ required: true
1194
+ project_root: exact_worktree_root
1195
+ source: HEAD_commit
1196
+ checkout: no_staged_modified_renamed_or_untracked_paths_except_exact_cutover_outputs
1197
+ migration_inputs: regular_tracked_files_whose_bytes_and_executable_mode_match_HEAD
1198
+ absent_input: absent_from_HEAD_and_worktree
1199
+ ignored_or_untracked_input: refuse
1200
+ verification: >-
1201
+ Planning and apply resolve the current HEAD commit and prove every present
1202
+ migration input is a safe regular tracked path whose bytes and executable
1203
+ mode match that commit. Apply repeats the proof under the writer lock
1204
+ before its first effect. Non-Git projects and dirty or unsupported source
1205
+ state are refused before any selected upgrade effect.
1206
+ upgrade_composition:
1207
+ owner: development_channel_v2_to_v3_upgrade
1208
+ selected_with: [full]
1209
+ apply_consent: >-
1210
+ The upgrade --yes consent derives all source and target bindings in
1211
+ process. Users provide no hashes, approval files, migration IDs, --force,
1212
+ or additional cutover consent. Any --only apply is rejected at this
1213
+ cross-major boundary.
1214
+ interruption: >-
1215
+ A rerun recomputes the deterministic conversion from unchanged Git-bound
1216
+ source, accepts existing canonical targets only when their bytes match,
1217
+ writes the first missing target, validates the complete graph, and finishes
1218
+ the marker forward. It never deletes or replaces canonical entities.
1219
+ completed: >-
1220
+ A valid entity marker makes legacy authority permanently inactive.
1221
+ Repeated upgrade validates current entity state and reports a no-op;
1222
+ normal entity writes may evolve records without reopening cutover.
1223
+ preflight: >-
1224
+ Upgrade plans artifact normalization, entity readiness, runtime work,
1225
+ and cleanup read-only before any selected apply function runs. A detect,
1226
+ artifact, or entity blocker prevents entity publication and activation.
1227
+ Runtime or cleanup blockers do not prevent valid entity activation; their
1228
+ resources remain untouched and are reported after the marker as
1229
+ action-required work.
1230
+ phase_filters: >-
1231
+ Every --only apply is invalid during a v2-to-v3 boundary. Read-only
1232
+ filtered preview may remain available.
1233
+ legacy_projection: >-
1234
+ Canonical v2 YAML and already-resolved v1 conversions are inventoried
1235
+ directly. A pending v1 Markdown conversion is not projected through a
1236
+ prerequisite write during planning and therefore blocks the composed
1237
+ apply before effects.
1238
+ lifecycle_normalization: >-
1239
+ Deterministic legacy plan lifecycle normalization is part of entity
1240
+ projection during cutover. Upgrade retains the original legacy YAML as
1241
+ source and recovery evidence instead of rewriting it first.
1242
+ empty_state: unsupported_unknown_source_with_manual_handoff
1243
+ existing_entity_state: validate_then_no_op
1244
+ source_scope:
1245
+ included_entities: entity_target.entities
1246
+ included_structured_relationships: entity_target.relationships.declarations
1247
+ preserved_singletons: entity_target.intentional_singletons.boundaries
1248
+ sources: >-
1249
+ Current canonical files, verified immutable archives, overlays, revisions,
1250
+ and validated source evidence are inventoried together without changing
1251
+ their pre-cutover authority. Every present input must be recoverable from
1252
+ the pinned Git commit.
1253
+ recovered_projection_correlation: >-
1254
+ Every archive carrying recovery_provenance must match the immutable
1255
+ .agentera/archive/recovery/projection-correlation.yaml recovery set by
1256
+ identity, archive bytes, final record SHA-256, parent/child Git proof or
1257
+ legacy converter/source proof, current projection bytes, and overlay.
1258
+ Missing, changed, new, replaced, or unlisted recovery evidence blocks.
1259
+ internal_migration_diagnostic: true
1260
+ read_only_preview:
1261
+ implementation: implemented
1262
+ ordering: artifact_then_boundary_then_source_identity_then_source_path
1263
+ filter: complete_declared_inventory
1264
+ source_fingerprint: >-
1265
+ SHA-256 over canonical JSON containing every declared source path's
1266
+ project-relative name, presence, byte length, byte SHA-256, permission
1267
+ mode, regular-file type, device, and inode from one verified open
1268
+ descriptor. Missing declared roots are represented explicitly with null
1269
+ identity. No mtime, Git value, or cache participates.
1270
+ project_root: >-
1271
+ The selected root must exist, be a directory, and resolve without a
1272
+ symbolic-link root or symbolic-link traversal. Failure is structured and
1273
+ occurs before inventory or effects.
1274
+ recursive_roots: >-
1275
+ Every declared archive and objective inventory root is lstat-validated
1276
+ before traversal and again when recursion enters it. Existing symbolic
1277
+ links and non-directories are project-bound inventory failures; their
1278
+ targets are never inventoried.
1279
+ authority_binding: >-
1280
+ The preview records the active state-storage authority schema version and
1281
+ byte SHA-256. The complete preview digest includes both values, so any
1282
+ authority-only change invalidates approval before an apply effect.
1283
+ proposed_id: >-
1284
+ Preview-only ten-letter candidates are deterministically allocated from a
1285
+ domain-separated SHA-256 of the complete source fingerprint and canonical
1286
+ source key. This is allocation of a new opaque target candidate, not
1287
+ reconstruction of a missing source ID. A collision is a blocker. Apply
1288
+ preserves the deterministic mapping in each canonical target path.
1289
+ preview_digest: >-
1290
+ SHA-256 over canonical JSON of the complete unbounded inventory, proposed
1291
+ mapping, authority-validated final envelope byte SHA-256 values,
1292
+ relationship rewrite map, counts, blockers, and source
1293
+ fingerprint plus the project selector, complete-source filter, declared
1294
+ order, and migration-authority binding before output omission.
1295
+ target_validation: >-
1296
+ Before preview can be ready or produce an approvable digest, every proposed
1297
+ final envelope, record, public field vocabulary, and relationship graph is
1298
+ validated through the same authority-backed canonical target validator used
1299
+ defensively by upgrade apply and forward retry. A target failure is a corrupt blocker tied
1300
+ to its source identity and recovery action; preserved nonentity residues are
1301
+ excluded from target validation and publication.
1302
+ output:
1303
+ max_utf8_bytes: 32768
1304
+ default_limit: 100
1305
+ maximum_limit: 1000
1306
+ omission: whole entries and diagnostics only
1307
+ scalar_truncation: forbidden
1308
+ required_omission_fields: [omitted, omitted_count, omission_reason, retrieval]
1309
+ recovery: >-
1310
+ --after SOURCE_IDENTITY advances from the last whole logical identity
1311
+ returned only when accompanied by that page's --source-fingerprint and
1312
+ --preview-digest. The digest binds the project selector, complete-source
1313
+ filter, authority-declared order, migration authority, and complete
1314
+ source snapshot. Any mismatch refuses continuation with a command that
1315
+ omits --after and restarts from the current snapshot. Diagnostics travel
1316
+ with their owning entry, so repeated use of retrieval.command recovers
1317
+ every later omitted entry and diagnostic.
1318
+ counts:
1319
+ physical_records: every observed record before identity grouping
1320
+ logical_identities: every source identity after grouping
1321
+ mirrors: excess canonical-identical physical records grouped under one logical identity
1322
+ duplicates: excess divergent physical records claiming one logical identity
1323
+ conflicts: logical identities with divergent candidates plus proposed-target collisions
1324
+ root_blockers: independently invalid source identities, counted once per source identity
1325
+ dependent_blockers: generated relationship-to-root diagnostics, each carrying root_source_identity
1326
+ blockers: root_blockers plus dependent_blockers
1327
+ zero_write: >-
1328
+ Inventory, preview, malformed-input handling, and source-binding checks
1329
+ open no writer or upgrade lock and create no directory, temporary file,
1330
+ mapping, snapshot, journal, cache, or state file.
1331
+ binding: >-
1332
+ Before any apply effect, recompute the complete preview and require its
1333
+ source fingerprint and preview digest to match the Git-pinned preparation.
1334
+ A mismatch refuses every selected effect.
1335
+ source_outcomes:
1336
+ valid_full:
1337
+ outcome: ready
1338
+ rule: map one complete validated source entity and every relationship exactly once
1339
+ canonical_mirror:
1340
+ outcome: ready_with_mirrored_provenance
1341
+ rule: group canonical-identical physical records as one logical identity and retain every provenance class
1342
+ degraded_recoverable:
1343
+ outcome: ready_with_provenance
1344
+ rule: admit only independently validated full detail and record its recovery provenance
1345
+ valid_compacted_summary:
1346
+ outcome: ready_with_degraded_provenance
1347
+ rule: preserve retained summary fields and source-record provenance without reconstructing omitted detail
1348
+ missing_detail_not_declared_summary:
1349
+ outcome: blocked
1350
+ rule: retain evidence and stop before publication; never reconstruct omitted fields
1351
+ ambiguous_or_duplicate_identity:
1352
+ outcome: blocked
1353
+ rule: retain every candidate and require explicit disposition; never choose by order or recency
1354
+ proposed_target_conflict:
1355
+ outcome: blocked
1356
+ rule: retain every colliding logical identity and allocate no winner
1357
+ corrupt_or_unresolved_relationship:
1358
+ outcome: blocked
1359
+ rule: report the exact source and recovery action; never publish a partial graph
1360
+ unsupported:
1361
+ outcome: blocked
1362
+ rule: preserve bytes and report the unsupported source contract
1363
+ non_fabrication:
1364
+ forbidden:
1365
+ - synthetic entities for missing source detail
1366
+ - inferred IDs from order, numbers, paths, timestamps, branches, writers, or Git references
1367
+ - guessed relationship targets
1368
+ - silent dropping, deduplication, or winner selection
1369
+ partial_cutover_success: forbidden
1370
+ forward_state:
1371
+ persisted_recovery_state: none
1372
+ publication_order: exact_or_missing_entities_then_graph_validation_then_marker
1373
+ retry_rule: accept_exact_targets_and_continue_at_first_missing_path
1374
+ divergent_target: stop_without_replacement_and_name_first_unresolved_path
1375
+ forbidden_fields: [operation_id, migration_id, snapshots, source_bytes, inode_receipts, rollback_state]
1376
+ historical_evidence: >-
1377
+ Already committed .agentera/migrations content is inert and remains
1378
+ byte-for-byte untouched. Read-only legacy manifest parsing is retained only
1379
+ for public validation of entity markers created by the former cutover.
1380
+ fault_test_hook: >-
1381
+ Tests may set NODE_ENV=test and
1382
+ AGENTERA_FAULT_INJECT_ENTITY_MIGRATION_AFTER_PHASE to one declared publication
1383
+ phase. Other environments ignore the variable.
1384
+ lifecycle:
1385
+ - phase: inventory
1386
+ mutates: false
1387
+ exit: every source entity and relationship is classified
1388
+ - phase: preview
1389
+ mutates: false
1390
+ exit: proposed graph, mapping, outcomes, blockers, and digest are complete
1391
+ - phase: git_preflight
1392
+ mutates: false
1393
+ exit: project root, HEAD, clean checkout, source bytes, types, and modes match
1394
+ - phase: publishing_entities
1395
+ mutates: true
1396
+ exit: every canonical target is an exact match or is published once
1397
+ - phase: entities_published
1398
+ mutates: false
1399
+ exit: canonical source-to-target parity, uniqueness, ownership, relationships, and budgets pass
1400
+ - phase: marker
1401
+ mutates: true
1402
+ exit: one durable marker activates entity_target and retires writable legacy authority
1403
+
1404
+ scope:
1405
+ supported_artifacts:
1406
+ - artifact_id: progress
1407
+ current_projection_path: .agentera/progress.yaml
1408
+ entry_collection: cycles
1409
+ entry_number_field: number
1410
+ entry_kind: cycle
1411
+ - artifact_id: decisions
1412
+ current_projection_path: .agentera/decisions.yaml
1413
+ entry_collection: decisions
1414
+ entry_number_field: number
1415
+ entry_kind: decision
1416
+ - artifact_id: health
1417
+ current_projection_path: .agentera/health.yaml
1418
+ entry_collection: audits
1419
+ entry_number_field: number
1420
+ entry_kind: audit
1421
+ excluded_from_numbered_archive:
1422
+ - plan
1423
+ - vision
1424
+ - todo
1425
+ - changelog
1426
+ - docs
1427
+ - design
1428
+ - objective
1429
+ - experiments
1430
+
1431
+ historical_retrieval_evidence:
1432
+ schema_version: agentera.stateRetrievalHistory.v1
1433
+ status: retired_historical_evidence
1434
+ runtime_consumption: forbidden
1435
+ implementation:
1436
+ plan_tasks: implemented
1437
+ plans: implemented
1438
+ experiments: implemented
1439
+ progress: implemented
1440
+ decisions: implemented
1441
+ health: implemented
1442
+ authority_boundary: >-
1443
+ This inert group records pre-entity retrieval closure evidence only. It does
1444
+ not own runtime grammar or policy; entity_target.public_retrieval is the sole
1445
+ active public retrieval model.
1446
+ envelope:
1447
+ schema_version: agentera.stateRetrieval.v1
1448
+ required_fields:
1449
+ - schemaVersion
1450
+ - command
1451
+ - status
1452
+ - entries
1453
+ - counts
1454
+ - order
1455
+ - filters
1456
+ - snapshot
1457
+ - source
1458
+ - source_contract
1459
+ entry_required_fields:
1460
+ - id
1461
+ - artifact
1462
+ - boundary
1463
+ - detail_availability
1464
+ - compatibility
1465
+ - provenance
1466
+ - retrieval
1467
+ summary_boundary_entries:
1468
+ visibility: >-
1469
+ Progress, decision, and health list/get reads include both the full
1470
+ boundary and its corresponding immutable summary boundary under the
1471
+ same artifact vocabulary.
1472
+ full: { detail_availability: full, compatibility: current }
1473
+ summary:
1474
+ detail_availability: summary
1475
+ compatibility: degraded
1476
+ required_fields: [boundary, caveats, record.migration_provenance]
1477
+ provenance: record_level_summary_migration_provenance
1478
+ mutation: immutable_read_only
1479
+ ordering: >-
1480
+ Summary rows without a full-record temporal sort field sort after
1481
+ timestamped or dated full rows and then by canonical ID ascending.
1482
+ counts_required_fields: [total, returned, remaining, omitted]
1483
+ status_values: [ok, degraded]
1484
+ bounded_summary_projection:
1485
+ cardinality_owner: summary_rows_after_filters_and_cursor
1486
+ limit_semantics: >-
1487
+ Return exactly min(requested limit, candidates remaining in the bound
1488
+ snapshot) summary rows. Serialized-byte pressure may remove optional
1489
+ full detail from those rows but never removes a summary row.
1490
+ summary_required_fields: [id, artifact, retrieval.get]
1491
+ todo_summary_additional_fields: [queue_rank]
1492
+ queue_rank: >-
1493
+ One-based position in the complete canonically ordered TODO candidate
1494
+ queue before request filters. It is computed from the read snapshot and
1495
+ does not persist, reorder, or add a public field to TODO.md.
1496
+ optional_detail_degradation:
1497
+ status: degraded
1498
+ reason: optional_detail_byte_budget
1499
+ row_omission: forbidden
1500
+ scalar_truncation: forbidden
1501
+ recovery: exact_get_pointer_per_summary_row
1502
+ selectors:
1503
+ ids_only:
1504
+ flag: --ids-only
1505
+ fields: [id, artifact, retrieval.get]
1506
+ todo_additional_fields: [queue_rank]
1507
+ fields:
1508
+ flag: --fields COMMA_SEPARATED_RECORD_PATHS
1509
+ validation: >-
1510
+ Each lowercase dot path must exist in at least one record in the
1511
+ filtered cursor snapshot. Duplicate or malformed paths and paths
1512
+ absent from that snapshot are invalid_request. Paths are sorted
1513
+ before projection and cursor binding; missing values in individual
1514
+ rows remain absent.
1515
+ identity_and_recovery_fields_always_present: true
1516
+ scalar_truncation: forbidden
1517
+ mutual_exclusion: ids_only_and_fields
1518
+ byte_pressure:
1519
+ ids_only_or_selected_fields: reject_without_partial_rows_or_fields
1520
+ summary_rows: reject_without_partial_rows
1521
+ metadata:
1522
+ counts: [candidate, returned, omitted, continuation]
1523
+ continuation: binds_collection_selectors_filters_order_and_snapshot
1524
+ continuation_command: >-
1525
+ Preserve every active family identifier, filter, selector, limit, and
1526
+ cursor in deterministic grammar order. Quote every non-literal string
1527
+ argument with the shared POSIX-shell argument primitive; generated
1528
+ commands must be safe to paste and must not permit expansion or
1529
+ injection through spaces, quotes, dollar signs, semicolons, or other
1530
+ shell metacharacters.
1531
+ exact_get: one_concrete_command_per_returned_row
1532
+ cursor:
1533
+ vocabulary: opaque_snapshot_cursor
1534
+ first_page: omit --cursor
1535
+ response_field: next_cursor
1536
+ binding: [collection, selectors, filters, order, snapshot]
1537
+ append_behavior: >-
1538
+ Records added after the first page are excluded from that cursor snapshot.
1539
+ Experiment cursors bind each original stable identity to immutable archive
1540
+ content when available, so unchanged full-to-summary or summary-to-drop
1541
+ projection rollover does not invalidate continuation. Without sufficient
1542
+ immutable or retained detail to prove an original identity unchanged, the
1543
+ cursor fails with cursor_snapshot_unavailable.
1544
+ invalid_behavior: cursor_invalid
1545
+ unavailable_behavior: cursor_snapshot_unavailable
1546
+ caller_rules: [do_not_parse, do_not_construct, do_not_compare_internals]
1547
+ omission:
1548
+ required_when_any_entry_is_not_returned:
1549
+ - omitted
1550
+ - omitted_count
1551
+ - omission_reason
1552
+ - retrieval
1553
+ semantics: >-
1554
+ Omission is explicit in both text and structured output. A response never
1555
+ silently slices a collection, truncates a scalar, or claims omitted detail
1556
+ is unavailable. Every omitted addressable item has an advancing cursor or
1557
+ exact get command; unaddressable legacy items retain compatibility
1558
+ diagnostics and are never assigned fabricated history.
1559
+ output_bounds:
1560
+ maximum_limit: 100
1561
+ max_serialized_utf8_bytes: 32768
1562
+ scalar_truncation: forbidden
1563
+ omission_unit: candidates_beyond_the_summary_row_window
1564
+ optional_detail: degrade_before_any_summary_row_omission
1565
+ failures:
1566
+ schema_version: agentera.stateFailure.v1
1567
+ required_fields: [class, message, syntax, example, recovery]
1568
+ classes:
1569
+ invalid_request: malformed, duplicate, missing, or incompatible selector
1570
+ unsupported_artifact: collection is not exposed by the requested grammar
1571
+ not_found: a valid exact identity has no matching record
1572
+ ambiguous: legacy derivation, duplicate identity, or path compatibility has multiple candidates
1573
+ corrupt: selected state cannot be parsed or validated safely
1574
+ incomplete: selected record exists but required detail is unavailable
1575
+ cursor_invalid: cursor is malformed or bound to different selectors, filters, collection, or order
1576
+ cursor_snapshot_unavailable: the exact cursor snapshot cannot be resumed
1577
+ unsupported_state: authority cannot return a safe bounded envelope
1578
+ exit_codes:
1579
+ usage: 2
1580
+ state_or_compatibility_failure: 1
1581
+ legacy_diagnostic_rule: >-
1582
+ Compatibility failures include candidate provenance and a working recovery
1583
+ command but never synthesize an ID, objective scope, task, experiment, or
1584
+ archive event.
1585
+ collections:
1586
+ - collection_id: progress.records
1587
+ artifact_id: progress
1588
+ growth: append_only_unbounded
1589
+ identity: bare_ten_letter_entity_id
1590
+ storage_ownership: canonical_progress_entities
1591
+ ordering: timestamp_desc_then_publication_order_desc_then_id_asc
1592
+ bounds: count_1_to_100_and_serialized_utf8_budget
1593
+ cursor: opaque_snapshot_cursor
1594
+ omission: explicit_with_advancing_cursor_or_exact_get
1595
+ get: agentera state progress get --id ID --format json
1596
+ - collection_id: decisions.records
1597
+ artifact_id: decisions
1598
+ growth: immutable_base_and_revision_entities_with_replaceable_satisfaction_entity
1599
+ identity: bare_ten_letter_entity_id
1600
+ storage_ownership: canonical_decision_entities
1601
+ ordering: date_desc_then_id_asc
1602
+ bounds: count_1_to_100_and_serialized_utf8_budget
1603
+ cursor: opaque_snapshot_cursor
1604
+ omission: explicit_with_advancing_cursor_or_exact_get
1605
+ get: agentera state decisions get --id ID --format json
1606
+ - collection_id: health.records
1607
+ artifact_id: health
1608
+ growth: append_only_unbounded
1609
+ identity: bare_ten_letter_entity_id
1610
+ storage_ownership: canonical_health_entities
1611
+ ordering: appended_at_desc_then_id_asc_then_legacy_date_desc_then_id_asc
1612
+ bounds: count_1_to_100_and_serialized_utf8_budget
1613
+ cursor: opaque_snapshot_cursor
1614
+ omission: explicit_with_advancing_cursor_or_exact_get
1615
+ get: agentera state health get --id ID --format json
1616
+ - collection_id: plan.plans
1617
+ artifact_id: plan
1618
+ growth: one_active_plus_append_only_immutable_file_archives
1619
+ identity: retrieval.identity.plan
1620
+ storage_ownership: active_plan_file_and_immutable_plan_archive_files
1621
+ ordering: created_desc_then_plan_id_asc
1622
+ bounds: count_1_to_100_and_serialized_utf8_budget
1623
+ cursor: opaque_snapshot_cursor
1624
+ omission: explicit_with_advancing_cursor_or_exact_get
1625
+ get: retrieval.commands.plans.get
1626
+ - collection_id: plan.tasks
1627
+ artifact_id: plan
1628
+ growth: mutable_while_plan_active_then_immutable_with_archived_plan
1629
+ identity: retrieval.identity.task
1630
+ storage_ownership: owning_active_plan_file
1631
+ ordering: id_asc
1632
+ bounds: count_1_to_100_and_serialized_utf8_budget
1633
+ cursor: opaque_snapshot_cursor
1634
+ omission: explicit_with_advancing_cursor_or_exact_get
1635
+ get: retrieval.commands.plan_tasks.get
1636
+ - collection_id: experiments.records
1637
+ artifact_id: experiments
1638
+ growth: append_only_objective_scoped_with_10_full_40_summary_50_projection
1639
+ identity: retrieval.identity.experiment
1640
+ storage_ownership: objective_scoped_durable_records_and_bounded_10_40_50_projection
1641
+ ordering: experiment_number_desc
1642
+ bounds: count_1_to_100_serialized_utf8_budget_and_projection_10_40_50
1643
+ cursor: opaque_snapshot_cursor
1644
+ omission: explicit_with_advancing_cursor_or_exact_get_or_legacy_unavailable_diagnostic
1645
+ get: retrieval.commands.experiments.get
1646
+ - collection_id: todo.items
1647
+ artifact_id: todo
1648
+ growth: bounded_current_working_set_with_resolved_compaction
1649
+ identity: absent_legacy_markdown_item_identity
1650
+ storage_ownership: TODO.md
1651
+ ordering: severity_then_document_order
1652
+ bounds: 10_open_40_resolved_summary_50_total_projection
1653
+ cursor: none_not_publicly_pageable
1654
+ omission: current_query_must_report_omission_but_exact_get_is_unavailable
1655
+ get: unsupported_no_stable_identity
1656
+ - collection_id: docs.entries
1657
+ artifact_id: docs
1658
+ growth: bounded_document_inventory
1659
+ identity: canonical_document_path_when_present
1660
+ storage_ownership: .agentera/docs.yaml_or_docs_mapping
1661
+ ordering: document_order
1662
+ bounds: artifact_budget_and_projection_output_budget
1663
+ cursor: none_not_publicly_pageable
1664
+ omission: current_query_must_report_omission_but_exact_get_is_unavailable
1665
+ get: unsupported_no_public_get
1666
+ - collection_id: changelog.entries
1667
+ artifact_id: changelog
1668
+ growth: append_only_public_release_history
1669
+ identity: absent_markdown_entry_identity
1670
+ storage_ownership: CHANGELOG.md
1671
+ ordering: document_order_newest_release_first
1672
+ bounds: no_collection_page_contract
1673
+ cursor: none_not_publicly_pageable
1674
+ omission: query_result_may_be_filtered_but_must_not_claim_exact_retrieval
1675
+ get: unsupported_no_stable_identity
1676
+ non_collections:
1677
+ - artifact_id: vision
1678
+ behavior: singleton_document_no_list_or_get_grammar
1679
+ - artifact_id: design
1680
+ behavior: singleton_document_no_list_or_get_grammar
1681
+ - artifact_id: objective
1682
+ behavior: one_selected_objective_document; identity is only a required experiments selector in this task
1683
+ - artifact_id: plan_archive
1684
+ behavior: storage special case represented publicly by plan.plans
1685
+ - artifact_id: optimize_harness
1686
+ behavior: local harness storage, not public state retrieval
1687
+ gap_closure_evidence:
1688
+ - surface: agentera state plan --format json / plans
1689
+ declared_gap: PLAN_HISTORY_CATALOG_LIMIT capped catalog rows without collection-level omission recovery
1690
+ outcome: closed
1691
+ closure: active and archive-only plan_catalog responses report omitted, omitted_count, omission_reason, and executable public list/get recovery; the plan list surface owns count and serialized-byte continuation
1692
+ - surface: agentera state plan --format json / source.archive_paths
1693
+ declared_gap: archive paths were capped at 10 with only an omitted count and no stable recovery
1694
+ outcome: closed
1695
+ closure: source reports archive_paths_omitted, archive_paths_omitted_count, archive_paths_omission_reason, and plan list/get recovery instead of requiring path traversal
1696
+ - surface: agentera state plan text / tasks
1697
+ declared_gap: legacy text projection capped tasks at 10 and needed explicit whole-record omission recovery
1698
+ outcome: closed
1699
+ closure: text retains complete scalar values and whole task rows only, caps rows at 10 and total output at budgets.list.max_utf8_bytes, and reports count/byte omissions with task list/get or exact-plan recovery without ellipsis
1700
+ - surface: agentera state plan --format json / tasks
1701
+ declared_gap: structured plan projection needed deterministic whole-task byte omission and public recovery
1702
+ outcome: closed
1703
+ closure: JSON and YAML report omitted, omitted_count, omission_reason, and task list/get recovery; task list JSON/YAML enforce budgets.list.max_utf8_bytes
1704
+ - surface: legacy agentera state experiments projection
1705
+ declared_gap: the pre-list/get projection is objective-selected rather than a stable cross-objective collection
1706
+ outcome: out_of_scope
1707
+ closure: objective-scoped experiments list/get is the supported retrieval surface; adding identity or pagination to the legacy projection would duplicate that contract
1708
+ plan_archive_diagnostics:
1709
+ classification: pre_existing_compatibility_caveat
1710
+ smoke_test_behavior: >-
1711
+ A lifecycle diagnostic on an unrelated archived plan degrades list/catalog
1712
+ status and remains visible, but does not fail exact retrieval of a different
1713
+ valid plan. Exact get fails only when the selected candidate is invalid,
1714
+ corrupt, or ambiguous. Read-only smoke tests assert diagnostics and never
1715
+ repair or rewrite archive history.
1716
+ known_live_diagnostics:
1717
+ - plan-2026-06-04-d56-parity-closeout.yaml
1718
+ - plan-2026-07-08-cliDistributionMajor-secondary-signal.yaml
1719
+
1720
+ consumer_matrix:
1721
+ status: active_authority
1722
+ purpose: >-
1723
+ Mechanically account for every capability source and bundled artifact-schema
1724
+ consumer of numbered decisions, progress, and health state. The artifact
1725
+ schemas remain the role authority; this matrix binds each declared consumer
1726
+ to the bounded startup and exact retrieval contracts below.
1727
+ source_root: packages/cli/src/capabilities/<capability>/instructions.ts
1728
+ bundle_root: skills/agentera/capabilities/<capability>/schemas/artifacts.yaml
1729
+ required_capabilities:
1730
+ - status
1731
+ - vision
1732
+ - discuss
1733
+ - research
1734
+ - plan
1735
+ - build
1736
+ - optimize
1737
+ - audit
1738
+ - document
1739
+ - profile
1740
+ - design
1741
+ - orchestrate
1742
+ access_contract:
1743
+ startup: agentera prime --context <capability> --format json
1744
+ list: agentera state <artifact-id> list --limit 20 --format json
1745
+ get: agentera state <artifact> get --id ID --format json
1746
+ policy: >-
1747
+ Use the bounded prime context first, then the bounded state list for
1748
+ discovery and exact state get for requested detail. Raw artifact or Git
1749
+ traversal is not a normal consumer path; it is allowed only for a named
1750
+ corruption or CLI-defect diagnostic exception, and must preserve missing,
1751
+ ambiguous, compacted, and satisfaction-incomplete provenance.
1752
+ capabilities:
1753
+ - name: status
1754
+ source: packages/cli/src/capabilities/status/instructions.ts
1755
+ bundle: skills/agentera/capabilities/status/schemas/artifacts.yaml
1756
+ state_consumers: [decisions, progress, health]
1757
+ - name: vision
1758
+ source: packages/cli/src/capabilities/vision/instructions.ts
1759
+ bundle: skills/agentera/capabilities/vision/schemas/artifacts.yaml
1760
+ state_consumers: [decisions, progress, health]
1761
+ - name: discuss
1762
+ source: packages/cli/src/capabilities/discuss/instructions.ts
1763
+ bundle: skills/agentera/capabilities/discuss/schemas/artifacts.yaml
1764
+ state_consumers: [decisions]
1765
+ - name: research
1766
+ source: packages/cli/src/capabilities/research/instructions.ts
1767
+ bundle: skills/agentera/capabilities/research/schemas/artifacts.yaml
1768
+ state_consumers: []
1769
+ - name: plan
1770
+ source: packages/cli/src/capabilities/plan/instructions.ts
1771
+ bundle: skills/agentera/capabilities/plan/schemas/artifacts.yaml
1772
+ state_consumers: [decisions, progress, health]
1773
+ - name: build
1774
+ source: packages/cli/src/capabilities/build/instructions.ts
1775
+ bundle: skills/agentera/capabilities/build/schemas/artifacts.yaml
1776
+ state_consumers: [decisions, progress, health]
1777
+ - name: optimize
1778
+ source: packages/cli/src/capabilities/optimize/instructions.ts
1779
+ bundle: skills/agentera/capabilities/optimize/schemas/artifacts.yaml
1780
+ state_consumers: [decisions, progress]
1781
+ - name: audit
1782
+ source: packages/cli/src/capabilities/audit/instructions.ts
1783
+ bundle: skills/agentera/capabilities/audit/schemas/artifacts.yaml
1784
+ state_consumers: [decisions, progress, health]
1785
+ - name: document
1786
+ source: packages/cli/src/capabilities/document/instructions.ts
1787
+ bundle: skills/agentera/capabilities/document/schemas/artifacts.yaml
1788
+ state_consumers: [decisions, progress, health]
1789
+ - name: profile
1790
+ source: packages/cli/src/capabilities/profile/instructions.ts
1791
+ bundle: skills/agentera/capabilities/profile/schemas/artifacts.yaml
1792
+ state_consumers: [decisions]
1793
+ - name: design
1794
+ source: packages/cli/src/capabilities/design/instructions.ts
1795
+ bundle: skills/agentera/capabilities/design/schemas/artifacts.yaml
1796
+ state_consumers: [progress]
1797
+ - name: orchestrate
1798
+ source: packages/cli/src/capabilities/orchestrate/instructions.ts
1799
+ bundle: skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml
1800
+ state_consumers: [decisions, progress, health]
1801
+ unchanged_archive_conventions:
1802
+ plan:
1803
+ location: .agentera/archive/plan-*.yaml
1804
+ role: existing plan lifecycle archive
1805
+ numbered_entry_discovery: forbidden
1806
+ execution: archived plans remain historical and non-executable
1807
+ vision:
1808
+ location: .agentera/archive/vision-*.yaml
1809
+ role: existing replace-mode vision archive
1810
+ numbered_entry_discovery: forbidden
1811
+ format: unchanged
1812
+
1813
+ experiment_archival:
1814
+ status: implemented
1815
+ authority_boundary: >-
1816
+ This is an objective-scoped full-detail publication archive for new
1817
+ experiments. It is not part of the numbered archive authority, does not
1818
+ migrate experiments into .agentera/archive, and does not reconstruct
1819
+ detail already dropped by legacy projection compaction.
1820
+ layout:
1821
+ path_template: .agentera/<objective-root>/<objective>/archive/experiments/<experiment-number>.yaml
1822
+ canonical_objective_root: optimize
1823
+ readable_legacy_objective_roots: [optimera]
1824
+ ownership: objective_directory
1825
+ path_override: forbidden
1826
+ identity:
1827
+ stable_id: '<objective-id>/experiment:<non-negative-integer>'
1828
+ path_selector: experiment_number
1829
+ objective_binding: envelope.objective_id must equal the resolved objective header.id
1830
+ content_binding: record.number must equal envelope.experiment_number
1831
+ envelope:
1832
+ schema_version: agentera.experimentArchive.v1
1833
+ required_fields:
1834
+ - schemaVersion
1835
+ - stable_id
1836
+ - objective_id
1837
+ - experiment_number
1838
+ - record
1839
+ - record_sha256
1840
+ - provenance
1841
+ provenance_required_fields: [authority, objective_id, experiment_id, storage_scope, publication_order]
1842
+ authority: references/artifacts/state-storage-authority.yaml
1843
+ hash: sha256_of_canonical_record_json
1844
+ publication:
1845
+ order:
1846
+ - validate_objective_identity
1847
+ - validate_full_experiment_record
1848
+ - validate_archive_envelope
1849
+ - stage_and_compact_projection
1850
+ - create_and_fsync_each_missing_archive_directory_entry
1851
+ - publish_and_fsync_immutable_archive
1852
+ - replace_and_fsync_projection
1853
+ archive_before_projection: true
1854
+ mutation_policy: no_overwrite_after_publication
1855
+ retry_policy: >-
1856
+ Byte-equivalent envelope bytes at the same stable identity are an
1857
+ idempotent replay. Different bytes at that identity are an immutable
1858
+ conflict and preserve both archive and projection bytes.
1859
+ interruption_policy: >-
1860
+ Failure before archive publication leaves archive and projection
1861
+ unchanged. Failure after durable archive publication may leave the new
1862
+ archive with the old projection; retry reuses that archive and publishes
1863
+ the projection without duplicating detail.
1864
+ directory_durability: >-
1865
+ Each newly created archive path component is followed by fsync of its
1866
+ parent before publication advances. In particular, creating the
1867
+ experiments directory requires fsync of the archive directory before an
1868
+ experiment record can be considered durably published.
1869
+ exact_full_replay_recovery: >-
1870
+ If the projection already contains the byte-equivalent full record but
1871
+ its required archive is absent, publication reconstructs that one archive
1872
+ from the exact retained detail before returning replay success. Summary-
1873
+ only and dropped legacy detail remain unavailable and are never inferred.
1874
+ projection:
1875
+ policy: uniform_10_40_50
1876
+ full_entries: 10
1877
+ summary_entries: 40
1878
+ total_entries: 50
1879
+ archive_effect: none
1880
+ compatibility:
1881
+ legacy_projection_records: readable_without_archive
1882
+ pre_feature_dropped_detail: unavailable_and_never_fabricated
1883
+
1884
+ storage:
1885
+ project_root:
1886
+ fixed: true
1887
+ resolution: >-
1888
+ The caller's selected project root. The archive is project-local and is
1889
+ never resolved through AGENTERA_HOME, a profile directory, XDG data, or a
1890
+ docs.yaml path override.
1891
+ archive_root: .agentera/archive
1892
+ archive_path_template: .agentera/archive/<artifact-id>/<entry-number>.yaml
1893
+ path_override: forbidden
1894
+ project_boundary: >-
1895
+ The resolved archive path and every parent must remain beneath the
1896
+ selected project root. URI paths, traversal segments, encoded traversal,
1897
+ and symlink escapes are invalid.
1898
+ archive:
1899
+ record_type: immutable_numbered_entry
1900
+ supported_artifact_directories: [progress, decisions, health]
1901
+ filename:
1902
+ entry_number: positive_integer
1903
+ canonical_form: base-10 decimal without a leading plus sign or leading zero
1904
+ accepted_pattern: '^[1-9][0-9]*$'
1905
+ directory_name: artifact_id
1906
+ extension: .yaml
1907
+ publication_order: archive_before_projection
1908
+ mutation_policy: no_overwrite_after_publication
1909
+ retry_policy: >-
1910
+ An identical artifact_id, entry_number, and canonical record is an
1911
+ idempotent replay. The same identity with different canonical content is
1912
+ an immutable conflict and must not replace existing bytes.
1913
+ discovery_policy: >-
1914
+ Only the exact supported path template is eligible. Malformed names,
1915
+ unsupported artifact directories, symlinks, duplicate logical identities,
1916
+ invalid envelopes, and hash mismatches are not valid records.
1917
+
1918
+ identity:
1919
+ stable_id:
1920
+ format: <artifact-id>:<entry-number>
1921
+ accepted_pattern: '^(progress|decisions|health):[1-9][0-9]*$'
1922
+ example: decisions:53
1923
+ components:
1924
+ artifact_id: one of the supported artifact values declared by scope
1925
+ entry_number: positive integer from the artifact's entry_number_field
1926
+ uniqueness: stable_id is unique within one project archive
1927
+ ordering:
1928
+ list: entry_number descending, numerically rather than lexicographically
1929
+ tie_breaker: stable_id ascending (defensive only; numbers are unique per artifact)
1930
+ get: exact stable_id match; no topic or summary scan is a substitute
1931
+ legacy_rows:
1932
+ canonical_number: >-
1933
+ A positive entry_number field, or an artifact-labelled summary beginning
1934
+ with Cycle N, Decision N, Audit N, or the decisions-only shorthand DNN.
1935
+ The number is accepted only from that explicit position; arbitrary prose
1936
+ and nested values never establish identity.
1937
+ unaddressable: >-
1938
+ A physical current or legacy-summary row without one explicit number.
1939
+ It is list-only and uses stable_id: null and entry_number: null; no
1940
+ synthetic number, position, or inferred reference is permitted.
1941
+ ambiguous: >-
1942
+ A row containing multiple explicit decision shorthands such as
1943
+ Staging D3+D4. It remains list-only with stable_id: null and is never
1944
+ assigned the first or most recent shorthand.
1945
+ physical_accounting: >-
1946
+ physical counts raw current rows, current archive-summary rows, and
1947
+ validated or rejected numbered archive files. addressable counts those
1948
+ physical rows carrying one explicit number; unaddressable and ambiguous
1949
+ partition the remaining physical rows. addressable_ids counts unique
1950
+ stable-ID groups. mirrored, duplicate, and conflict are non-additive
1951
+ redundancy classifications over addressable rows; omitted counts rows
1952
+ not emitted on the current bounded page.
1953
+
1954
+ envelope:
1955
+ legacy_source_state: migration_input_only
1956
+ schema_version: agentera.stateArchiveEntry.v1
1957
+ required_fields:
1958
+ - schemaVersion
1959
+ - artifact_id
1960
+ - entry_number
1961
+ - record
1962
+ - record_sha256
1963
+ field_contract:
1964
+ schemaVersion: exact string agentera.stateArchiveEntry.v1
1965
+ artifact_id: supported artifact ID matching the archive directory
1966
+ entry_number: positive integer matching the filename and record identity field
1967
+ record: complete pre-projection entry, not a compact summary
1968
+ record_sha256: lowercase SHA-256 of the canonical record bytes
1969
+ canonical_record:
1970
+ encoding: UTF-8
1971
+ serialization: canonical JSON with recursively sorted object keys and no whitespace
1972
+ arrays: preserve source order
1973
+ hash_input: record only, excluding the envelope
1974
+ identity_checks:
1975
+ - envelope.artifact_id matches the parent artifact directory
1976
+ - envelope.entry_number matches the filename
1977
+ - envelope.entry_number matches record.<artifact entry_number_field>
1978
+ - record_sha256 matches canonical_record
1979
+ forbidden_fields:
1980
+ - commit
1981
+ - commit_hash
1982
+ - git_commit
1983
+ - git_ref
1984
+ - parent_commit
1985
+ provenance_rule: >-
1986
+ Git provenance is durability evidence returned by a later diagnostic
1987
+ surface, never per-entry commit bookkeeping and never part of immutable
1988
+ record identity.
1989
+
1990
+ overlays:
1991
+ location: .agentera/overlays/decisions.yaml
1992
+ legacy_source_state: migration_input_only
1993
+ current_entity_boundary: decision_satisfaction
1994
+ project_root_fixed: true
1995
+ docs_yaml_override: forbidden
1996
+ schema_version: agentera.decisionOverlay.v1
1997
+ supported_artifact: decisions
1998
+ identity_key: decisions:<decision-number>
1999
+ storage_shape: >-
2000
+ The legacy migration source is a mapping keyed by numbered decision ID.
2001
+ Entity migration converts each value into one decision_satisfaction entity
2002
+ related to the canonical decision ID. Current reads and writes use that
2003
+ entity and never read or publish the aggregate overlay document.
2004
+ mutable_paths:
2005
+ - satisfaction.state
2006
+ - satisfaction.evidence
2007
+ - satisfaction.user_confirmation.confirmed_by
2008
+ - satisfaction.user_confirmation.confirmed_at
2009
+ derived_paths:
2010
+ - satisfaction.review_needed
2011
+ - satisfaction.source
2012
+ - satisfaction.caveats
2013
+ immutable_paths:
2014
+ - number
2015
+ - date
2016
+ - question
2017
+ - context
2018
+ - alternatives
2019
+ - choice
2020
+ - reasoning
2021
+ - confidence
2022
+ - feeds_into
2023
+ state_values: [open, provisionally_satisfied, user_confirmed_satisfied]
2024
+ transition_rules:
2025
+ open:
2026
+ allowed_next: [open, provisionally_satisfied, user_confirmed_satisfied]
2027
+ provisional_requires: non_empty_satisfaction.evidence
2028
+ confirmed_requires: explicit_current_user_confirmation_metadata
2029
+ provisionally_satisfied:
2030
+ allowed_next: [open, provisionally_satisfied, user_confirmed_satisfied]
2031
+ provisional_requires: non_empty_satisfaction.evidence
2032
+ confirmed_requires: explicit_current_user_confirmation_metadata
2033
+ user_confirmed_satisfied:
2034
+ allowed_next: [user_confirmed_satisfied]
2035
+ downgrade: forbidden_without_explicit_current_user_confirmation
2036
+ decision_53_rules:
2037
+ missing_satisfaction: valid legacy state; derive review_needed=true
2038
+ open: review_needed=true
2039
+ provisional: review_needed=true until explicit user confirmation
2040
+ confirmed: review_needed=false only with confirmed_by and confirmed_at
2041
+ inference: forbidden from commits, downstream references, summaries, or Git history
2042
+ protected_review: unresolved decisions remain visible and never block archive storage
2043
+
2044
+ revisions:
2045
+ location: .agentera/revisions/decisions.yaml
2046
+ legacy_source_state: migration_input_only
2047
+ project_root_fixed: true
2048
+ docs_yaml_override: forbidden
2049
+ schema_version: agentera.decisionRevision.v1
2050
+ supported_artifact: decisions
2051
+ identity_key: decisions:<decision-number>
2052
+ storage_shape: >-
2053
+ The legacy migration source is a mapping keyed by numbered decision ID.
2054
+ Entity migration converts each ordered row into one decision_revision
2055
+ entity related to the canonical decision ID. Current reads and writes use
2056
+ those entities and never read or publish the aggregate revision document.
2057
+ amendable_paths:
2058
+ - question
2059
+ - context
2060
+ - alternatives.chosen
2061
+ - alternatives.rejected
2062
+ - choice
2063
+ - reasoning
2064
+ - confidence
2065
+ - feeds_into
2066
+ migration_amendable_paths:
2067
+ - alternatives
2068
+ legacy_amendable_paths:
2069
+ - question
2070
+ - context
2071
+ - alternatives
2072
+ - choice
2073
+ - reasoning
2074
+ - confidence
2075
+ - feeds_into
2076
+ identity_paths:
2077
+ - number
2078
+ temporal_paths:
2079
+ - date
2080
+ separation_from_overlay: >-
2081
+ Legacy content amendments never touch legacy aggregate satisfaction paths;
2082
+ migration converts both sources independently. Current satisfaction and
2083
+ content mutations publish decision_satisfaction and decision_revision
2084
+ entities, and neither entity boundary rewrites the other.
2085
+ immutability: >-
2086
+ Imported numbered archive records remain immutable historical evidence.
2087
+ Current decision_revision entities are additional immutable evidence;
2088
+ no revision overwrites, reorders, or deletes a prior revision. An entity
2089
+ revision is byte-stable after publication and an identical revision is an
2090
+ idempotent replay.
2091
+ provenance: >-
2092
+ Revision evidence carries revision provenance only. It is never labeled
2093
+ as historical archive provenance. A revision bootstrapped from a complete
2094
+ legacy projection record may carry degraded_projection provenance and
2095
+ never historical_archive provenance.
2096
+ publication_order:
2097
+ - validate_entity_target_identity
2098
+ - validate_amendment_vocabulary
2099
+ - validate_base_sha256
2100
+ - publish_decision_revision_entity
2101
+ - compose_effective_entity_read
2102
+ apply_state: entity_implemented_legacy_source_retired
2103
+ apply_state_note: >-
2104
+ The entity amend command publishes one immutable decision_revision entity
2105
+ related to the selected bare decision ID. A valid dry-run reports the
2106
+ candidate without writing; retries converge through canonical entity
2107
+ replay. Effective entity reads compose base, ordered revision entities, and
2108
+ satisfaction entities. The aggregate revision document is read only by
2109
+ migration preview and cutover and is never a current publication target.
2110
+ Amend execution refuses before side effects for an unsafe target, duplicate
2111
+ same-base claim, or stale base hash. Discover the current contract with
2112
+ `agentera state decisions explain --verb amend --format json`.
2113
+
2114
+ projections:
2115
+ archive:
2116
+ source_state: migration_input_only
2117
+ role: complete immutable historical migration detail
2118
+ source_of_truth_for: historical_record_fields
2119
+ omission: never omit fields from an archive record
2120
+ current:
2121
+ source_state: migration_input_only
2122
+ role: bounded aggregate migration projection
2123
+ default_capacity:
2124
+ active_entries: 10
2125
+ summary_entries: 40
2126
+ total_entries: 50
2127
+ semantics: >-
2128
+ These are projection defaults, not retention or deletion limits. Entries
2129
+ outside the default display capacity remain in the numbered archive;
2130
+ entries whose archive cannot be verified remain full in the projection
2131
+ with recovery metadata rather than being discarded.
2132
+ legacy_summary_overflow:
2133
+ source: legacy_summary
2134
+ compatibility: degraded
2135
+ detail_availability: unavailable
2136
+ archive_verified: false
2137
+ semantics: >-
2138
+ Legacy inline summaries without a verified numbered record are bounded
2139
+ like every other projection item. If omitted, omission_provenance keeps
2140
+ their degraded and incomplete status explicit; omission never promotes
2141
+ them to archive-backed detail or reconstructs missing fields.
2142
+ paths:
2143
+ progress: .agentera/progress.yaml
2144
+ decisions: .agentera/decisions.yaml
2145
+ health: .agentera/health.yaml
2146
+ source_of_truth_for: legacy_migration_and_compatibility_state_only
2147
+ archive_relationship: >-
2148
+ A legacy aggregate entry may be full, summary-only, or absent from the projection;
2149
+ archive presence and hash verification determine whether full detail is
2150
+ available during migration. Legacy decision overlay values are converted
2151
+ independently and do not rewrite archive bytes.
2152
+ summary:
2153
+ source_state: migration_input_only
2154
+ role: bounded aggregate migration representation
2155
+ required_item_fields: [stable_id, artifact_id, entry_number, addressable, classification, detail_availability, source]
2156
+ nullable_item_fields:
2157
+ - stable_id
2158
+ - entry_number
2159
+ detail_availability: [full, summary, unavailable]
2160
+ source_values: [archive, current_projection, legacy_full, legacy_summary]
2161
+ classification_values: [canonical, mirrored, duplicate, conflict, ambiguous, unaddressable, corrupt]
2162
+ counts:
2163
+ required: [physical, addressable, addressable_ids, unaddressable, ambiguous, mirrored, duplicate, conflict, omitted]
2164
+ reconciliation: >-
2165
+ physical = addressable + unaddressable + ambiguous;
2166
+ addressable_ids is the unique logical count and is not added to the
2167
+ physical count; mirrored, duplicate, and conflict are overlapping
2168
+ redundancy diagnostics, not partition buckets.
2169
+ omission: >-
2170
+ Omitted detail is represented by omitted=true, omitted_count,
2171
+ omission_reason, and a get command pointer. It is never silently
2172
+ truncated, represented as a fabricated summary, or treated as missing
2173
+ history without provenance.
2174
+ startup:
2175
+ source_state: canonical_entity_authority
2176
+ role: bounded orientation and capability-startup projection
2177
+ required_fields: [command, status, source, source_contract]
2178
+ allowed_payload: >-
2179
+ Counts, bounded summaries, actionable stable IDs, detail availability,
2180
+ omission metadata, compatibility classification, and retrieval pointers.
2181
+ forbidden_payload: [raw_archive_records, raw_yaml, unbounded_entry_arrays, Git_history_scan]
2182
+ incomplete_state: >-
2183
+ Preserve degraded or blocked compatibility and omission metadata in
2184
+ source_contract; do not fall back to raw archive traversal merely to fill
2185
+ an omitted field.
2186
+
2187
+ api:
2188
+ namespace: agentera state
2189
+ artifact_syntax: agentera state <artifact-id>
2190
+ formats: [text, json, yaml]
2191
+ direct_get:
2192
+ command: agentera state <artifact-id> get --id ID --format json
2193
+ examples:
2194
+ progress: agentera state progress get --id qjtrmnpvka --format json
2195
+ decisions: agentera state decisions get --id imumkmffwh --format json
2196
+ health: agentera state health get --id abcdefghij --format json
2197
+ required_selector: --id ID
2198
+ result: >-
2199
+ One complete canonical entity record with id, artifact, detail availability,
2200
+ compatibility, effective content, and provenance metadata. Decision reads
2201
+ compose immutable base, ordered revisions, and current satisfaction entities.
2202
+ exact_only: direct retrieval resolves one canonical entity ID without scanning unrelated records
2203
+ list:
2204
+ command: agentera state <artifact-id> list [--limit N] [--cursor TOKEN] [--ids-only | --fields FIELDS] --format json
2205
+ examples:
2206
+ progress: agentera state progress list --limit 20 --format json
2207
+ decisions_next_page: agentera state decisions list --limit 20 --cursor TOKEN --format json
2208
+ default_limit: 20
2209
+ minimum_limit: 1
2210
+ maximum_limit: 100
2211
+ ordering:
2212
+ progress: timestamp_desc_then_publication_order_desc_then_id_asc
2213
+ decisions: date_desc_then_id_asc
2214
+ health: appended_at_desc_then_id_asc_then_legacy_date_desc_then_id_asc
2215
+ response_fields:
2216
+ required: [command, status, entries, counts, source, filters, snapshot, source_contract]
2217
+ entry: [id, artifact, detail_availability, compatibility, record, provenance, retrieval]
2218
+ optional_entry: [summary, caveats]
2219
+ empty_result: status=ok with entries=[] and counts.total=0; absence is not an error
2220
+ durability:
2221
+ command: agentera check durability [--project PATH] [--artifact ARTIFACT] [--id ID] [--limit N] --format json
2222
+ formats: [text, json, yaml]
2223
+ selectors:
2224
+ artifact: optional supported entity artifact ID
2225
+ id: optional bare entity ID; requires artifact
2226
+ limit: optional bounded result count
2227
+ default_limit: 100
2228
+ maximum_limit: 100
2229
+ status_values: [complete, degraded, unavailable]
2230
+ local_values: [verified, unavailable, corrupt]
2231
+ git_values: [verified, degraded, unavailable]
2232
+ response_fields:
2233
+ required: [command, status, project, read_only, remote_contact, head, counts, entries, diagnostics, source_contract]
2234
+ entry: [id, artifact, status, local, git]
2235
+ guarantees:
2236
+ read_only: true
2237
+ remote_contact: forbidden
2238
+ writes_independent: true
2239
+ head_capture: >-
2240
+ Capture the local HEAD before inspection and after inspection. If the
2241
+ values differ, report changed_head and do not claim committed recovery.
2242
+ deterministic: >-
2243
+ With unchanged local files and reachable refs, repeated checks emit the
2244
+ same ordered result and do not create state or contact a remote.
2245
+ entity_migration_discovery:
2246
+ command: agentera state migrate entities --project PATH --dry-run --format json
2247
+ implementation: implemented
2248
+ read_only: true
2249
+ writes: forbidden
2250
+ authority: entity_migration.read_only_preview
2251
+ cursor:
2252
+ syntax: opaque TOKEN returned as response.next_cursor
2253
+ first_page: omit --cursor to establish a snapshot
2254
+ snapshot_identity: >-
2255
+ deterministic hash of ordered canonical entity IDs, projected record
2256
+ hashes, and filters.
2257
+ snapshot_scope: artifact and filters are bound to the cursor; limit may change between pages
2258
+ append_behavior: >-
2259
+ Entries appended after the first page are excluded from that cursor's
2260
+ snapshot. They appear only in a new listing without the old cursor.
2261
+ continuation: >-
2262
+ Continue strictly after the last emitted entity ordering key. Never
2263
+ restart from page one, skip an entry, or duplicate an entry.
2264
+ unavailable: return cursor_snapshot_unavailable rather than silently creating a new snapshot
2265
+ opacity: callers must not parse, construct, or compare token internals
2266
+ filters:
2267
+ allowed: artifact-specific existing filters plus --limit and --cursor
2268
+ filter_binding: every filter value is included in snapshot identity
2269
+ invalid_filters: structured failure with syntax, valid values, and example
2270
+
2271
+ failures:
2272
+ schema_version: agentera.stateFailure.v1
2273
+ envelope:
2274
+ required_fields: [schemaVersion, status, error]
2275
+ status: fail
2276
+ error_required_fields: [class, message, syntax, example, recovery]
2277
+ error_optional_fields: [artifact, id, details, valid_values]
2278
+ exit_codes:
2279
+ invalid_input: 2
2280
+ operational_failure: 1
2281
+ classes:
2282
+ invalid_request:
2283
+ exit_class: invalid_input
2284
+ use_for: malformed syntax, missing selector, invalid limit, or invalid cursor format
2285
+ unsupported_artifact:
2286
+ exit_class: invalid_input
2287
+ use_for: artifact outside scope.supported_artifacts
2288
+ not_found:
2289
+ exit_class: operational_failure
2290
+ use_for: requested stable ID has no available current or archive record
2291
+ ambiguous:
2292
+ exit_class: operational_failure
2293
+ use_for: multiple legacy candidates or conflicting identities prevent safe selection
2294
+ corrupt:
2295
+ exit_class: operational_failure
2296
+ use_for: malformed YAML, invalid envelope, hash mismatch, unsafe path, symlink, or duplicate identity
2297
+ incomplete:
2298
+ exit_class: operational_failure
2299
+ use_for: a requested complete record is represented only by an irrecoverable legacy summary
2300
+ immutable_conflict:
2301
+ exit_class: operational_failure
2302
+ use_for: same stable ID has different canonical content; existing bytes remain untouched
2303
+ cursor_invalid:
2304
+ exit_class: invalid_input
2305
+ use_for: token is malformed, bound to another artifact, or bound to different filters
2306
+ cursor_snapshot_unavailable:
2307
+ exit_class: operational_failure
2308
+ use_for: the original snapshot cannot be reproduced exactly
2309
+ project_boundary:
2310
+ exit_class: invalid_input
2311
+ use_for: path resolution would leave the selected project root
2312
+ unsupported_state:
2313
+ exit_class: operational_failure
2314
+ use_for: state format is outside the declared compatibility authority
2315
+ guidance_rule: >-
2316
+ Every failure includes the valid command syntax, a concrete example, and a
2317
+ recovery action. A failure must not silently downgrade a complete record,
2318
+ retry an invalid cursor as a fresh listing, or invent missing history.
2319
+
2320
+ compatibility:
2321
+ classifications: [complete, degraded, blocked, unsupported]
2322
+ dimensions:
2323
+ local_read: local project state and numbered archive availability
2324
+ detail: whether full record fields are available without inference
2325
+ git_durability: optional committed-history evidence only; never a write prerequisite
2326
+ cases:
2327
+ new:
2328
+ classification: complete
2329
+ local_read: complete
2330
+ detail: complete
2331
+ git_durability: optional
2332
+ behavior: numbered archive is canonical; current projection is bounded
2333
+ legacy_full:
2334
+ classification: degraded
2335
+ local_read: complete
2336
+ detail: complete
2337
+ git_durability: unavailable_until_migrated
2338
+ behavior: full inline current/legacy entry is usable, but provenance declares noncanonical storage and migration-needed
2339
+ legacy_summary:
2340
+ classification: degraded
2341
+ local_read: complete
2342
+ detail: incomplete
2343
+ git_durability: optional
2344
+ behavior: summary and retained fields are usable; missing fields stay missing and are never reconstructed
2345
+ non_git:
2346
+ classification: complete
2347
+ local_read: complete
2348
+ detail: based_on_local_records
2349
+ git_durability: unavailable
2350
+ behavior: local archive reads and writes remain supported; no Git operation is attempted
2351
+ shallow:
2352
+ classification: degraded
2353
+ local_read: complete_when_local_records_validate
2354
+ detail: based_on_local_records
2355
+ git_durability: history_unavailable
2356
+ behavior: do not claim historical recovery beyond reachable local records
2357
+ ambiguous:
2358
+ classification: blocked
2359
+ local_read: affected_identity_blocked
2360
+ detail: not_safe_to_select
2361
+ git_durability: not_evaluated
2362
+ behavior: preserve candidates and require explicit disambiguation; never choose by recency or Git guess
2363
+ corrupt:
2364
+ classification: blocked
2365
+ local_read: affected_record_blocked
2366
+ detail: not_trusted
2367
+ git_durability: not_evaluated
2368
+ behavior: reject the affected record, preserve its bytes for diagnostics, and continue only with independently valid records
2369
+ unsupported:
2370
+ classification: unsupported
2371
+ local_read: unsupported
2372
+ detail: unavailable
2373
+ git_durability: not_evaluated
2374
+ behavior: identify the unsupported artifact or format and return valid supported values
2375
+ precedence: corrupt > ambiguous > unsupported > degraded > complete
2376
+ no_reconstruction: >-
2377
+ Compatibility reports provenance and availability only. It does not
2378
+ reconstruct missing decision fields, promote summaries to full records, or
2379
+ use Git history to satisfy a current source contract.
2380
+ legacy_label_coexistence:
2381
+ dimensions:
2382
+ - confidence
2383
+ current_vocabulary: [firm, provisional, exploratory]
2384
+ current_vocabulary_ref: protocol.yaml DECISION_LABELS (DL1-DL3)
2385
+ known_legacy_examples: [high, medium, low]
2386
+ classification_rule: >-
2387
+ A label value is unsupported when it is not in current_vocabulary. An
2388
+ unsupported inherited label on a record the caller did not touch is
2389
+ explicit legacy state: it is preserved byte- and value-semantically,
2390
+ reported as a legacy caveat, never coerced to the current vocabulary,
2391
+ and never blocks an append, satisfaction update, or amend on a
2392
+ different target. A confidence label supplied by append or amend is new
2393
+ or amended content and must be a current_vocabulary value; otherwise the
2394
+ operation rejects before side effects.
2395
+ no_silent_normalization: >-
2396
+ Unsupported inherited labels are never rewritten to current values
2397
+ without explicit user migration consent. Reads classify them as legacy
2398
+ and never silently promote them to current vocabulary or claim stronger
2399
+ provenance than exists.
2400
+
2401
+ budgets:
2402
+ schema_version: agentera.stateOutputBudget.v1
2403
+ measurement:
2404
+ encoding: UTF-8
2405
+ bytes: serialized byte length after encoding, including the final newline
2406
+ json_serializer: JSON.stringify(value, null, 2) plus newline
2407
+ yaml_serializer: YAML.stringify(value) as emitted by the CLI
2408
+ measure_before_emit: true
2409
+ list:
2410
+ max_utf8_bytes: 32768
2411
+ benchmark:
2412
+ measurement_contract: entity_target.measurement_contract.sampling
2413
+ fixture: numbered progress archive entries measured through one cold source process per scale
2414
+ small:
2415
+ entries: 100
2416
+ max_latency_ms: 5000
2417
+ max_heap_delta_bytes: 67108864
2418
+ large:
2419
+ entries: 1000
2420
+ max_latency_ms: 15000
2421
+ max_heap_delta_bytes: 268435456
2422
+ response_max_utf8_bytes: 32768
2423
+ index_decision:
2424
+ decision: no_index
2425
+ trigger: >-
2426
+ Defer a persistent index until the large fixture exceeds any declared
2427
+ latency, heap, or response threshold on a reproducible authority test.
2428
+ projection:
2429
+ max_utf8_bytes: 32768
2430
+ applies_to: current, summary, and migration result responses
2431
+ required_when_over_budget: [omitted, omitted_count, omission_reason, retrieval]
2432
+ omission_semantics: >-
2433
+ Remove optional detail entries in deterministic numeric order from the
2434
+ response, retain required identity/count/source fields, and expose a next
2435
+ retrieval pointer. Never split UTF-8, truncate a scalar, or silently drop
2436
+ an entry. If required/source fields themselves exceed the budget, emit a
2437
+ measured minimal degraded envelope with projection output-budget error
2438
+ metadata rather than returning an over-budget payload.
2439
+ startup:
2440
+ source_manifest: scripts/json_output_surface_manifest.yaml
2441
+ source_work:
2442
+ schema_version: agentera.startupSourceWorkBudget.v1
2443
+ measurement: >-
2444
+ Count current projection entry rows and archive files inspected by the
2445
+ source-side metadata query. Full archive records are never retained by
2446
+ startup consumers.
2447
+ small:
2448
+ max_current_entries: 100
2449
+ max_archive_files: 100
2450
+ max_latency_ms: 5000
2451
+ max_heap_delta_bytes: 67108864
2452
+ large:
2453
+ max_current_entries: 1000
2454
+ max_archive_files: 1000
2455
+ max_latency_ms: 15000
2456
+ max_heap_delta_bytes: 268435456
2457
+ serialized_output:
2458
+ # Generic prime capability capsules retain the full instructions body.
2459
+ # The status capability is a separate one-call surface with a stricter
2460
+ # bound declared below and in the JSON surface manifest.
2461
+ prime_capability_context_max_utf8_bytes: 55000
2462
+ prime_status_context_max_utf8_bytes: 25000
2463
+ surfaces:
2464
+ prime_briefing:
2465
+ manifest_id: prime-briefing
2466
+ # Bounded default decision brief (Plan Task 3): the bare default
2467
+ # `agentera prime --format json` projects the full orientation payload
2468
+ # to routing-essential leaves plus named recovery pointers for omitted
2469
+ # rich state. Pretty UTF-8 JSON + trailing newline is measured and an
2470
+ # over-budget brief is rejected in favor of a bounded degraded envelope;
2471
+ # diagnostics stay on stderr. prime_dashboard keeps full current state
2472
+ # while omitting duplicated ordinary history entries with recovery.
2473
+ max_utf8_bytes: 12000
2474
+ prime_dashboard:
2475
+ manifest_id: prime-dashboard
2476
+ max_utf8_bytes: 35000
2477
+ prime_status_context:
2478
+ manifest_id: prime-status-context
2479
+ # Status startup includes the full instructions capsule as well as the
2480
+ # bounded Task 3 decision brief. Diagnostics remain on stderr.
2481
+ max_utf8_bytes: 25000
2482
+ prime_sparse:
2483
+ manifest_id: prime-fields-sparse
2484
+ max_utf8_bytes: 28000
2485
+ required_when_over_budget: [omitted, omitted_count, omission_reason, retrieval]
2486
+ omission_semantics: >-
2487
+ Omit optional historical detail and retain counts, actionable IDs,
2488
+ compatibility, source_contract, and exact get/list command pointers. The
2489
+ caller must be able to distinguish omitted detail from unavailable detail.
2490
+ The bare default briefing is a bounded decision brief: every required
2491
+ top-level field stays present (content projected to routing-essential
2492
+ leaves), missing versus present-but-empty stays distinguishable through
2493
+ state_presence, and each omitted rich-state family carries a named
2494
+ authoritative recovery command. When even the projected brief exceeds the
2495
+ budget, emit a measured bounded degraded envelope that keeps command,
2496
+ status, mode, state_presence, a brief source_contract, and the
2497
+ byte-budget error with a recovery command; never emit an over-budget
2498
+ payload. Diagnostics are measured on stderr separately.
2499
+ validation:
2500
+ authority: this file plus the referenced JSON surface manifest
2501
+ drift_rule: tests fail if manifest IDs or byte values disagree with this contract
2502
+
2503
+ # The mutation grammar is the only declarative inventory of public state writes.
2504
+ # Runtime code owns execution; this section owns the vocabulary, shape, bounds,
2505
+ # recovery, and projections exposed by discovery.
2506
+ mutation_grammar:
2507
+ schema_version: agentera.stateMutationGrammar.v1
2508
+ status: active
2509
+ authority: references/artifacts/state-storage-authority.yaml
2510
+ operation_classes: [record_payload, simple_transition, batch_transaction]
2511
+ contract_scope: public_state_writer_verbs
2512
+ structured_input:
2513
+ parser: yaml_or_json_mapping
2514
+ sources: [file, stdin]
2515
+ flag: --input
2516
+ stdin_value: '-'
2517
+ operations:
2518
+ - artifact: progress
2519
+ verb: append
2520
+ class: record_payload
2521
+ selectors: []
2522
+ preconditions: [entity_mode_marker_is_valid]
2523
+ owned_fields: [id, artifact, publication_order]
2524
+ input:
2525
+ mode: structured
2526
+ root: one progress cycle record
2527
+ sources: [file, stdin]
2528
+ structured_sources: [file, stdin]
2529
+ cli_owned_fields: [id, artifact, publication_order]
2530
+ recovery: Run agentera state progress explain --verb append --format json and correct the rejected field; no state was changed.
2531
+ examples: ['agentera state progress append --input progress.yaml --format json']
2532
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2533
+ compacts: true
2534
+ fields: []
2535
+
2536
+ - artifact: decisions
2537
+ verb: append
2538
+ class: record_payload
2539
+ selectors: []
2540
+ preconditions: [entity_mode_marker_is_valid, exactly_one_chosen_alternative]
2541
+ owned_fields: [id, artifact]
2542
+ input:
2543
+ mode: structured
2544
+ root: one decision record
2545
+ sources: [file, stdin]
2546
+ structured_sources: [file, stdin]
2547
+ cli_owned_fields: [id, artifact]
2548
+ recovery: Run agentera state decisions explain --verb append --format json and supply every required field; no state was changed.
2549
+ examples: ['agentera state decisions append --input decision.yaml --format json']
2550
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2551
+ compacts: true
2552
+ fields: []
2553
+
2554
+ - artifact: decisions
2555
+ verb: update
2556
+ class: simple_transition
2557
+ selectors: [--id]
2558
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, satisfaction_state_is_valid]
2559
+ owned_fields: [id, artifact, satisfaction]
2560
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2561
+ recovery: Run agentera state decisions explain --verb update --format json, use the returned bare decision ID, and provide a valid satisfaction transition.
2562
+ examples: ['agentera state decisions update --id qjtrmnpvka --satisfaction-state provisionally_satisfied --satisfaction-evidence "..." --format json']
2563
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1 }
2564
+ fields:
2565
+ - { flag: --id, field: id, kind: string, required: true }
2566
+ - { flag: --satisfaction-state, field: satisfaction.state, kind: string, required: true, valid_values: [open, provisionally_satisfied, user_confirmed_satisfied] }
2567
+ - { flag: --satisfaction-evidence, field: satisfaction.evidence, kind: string }
2568
+ - { flag: --confirmed-by, field: satisfaction.user_confirmation.confirmed_by, kind: string }
2569
+ - { flag: --confirmed-at, field: satisfaction.user_confirmation.confirmed_at, kind: string }
2570
+
2571
+ - artifact: decisions
2572
+ verb: amend
2573
+ class: record_payload
2574
+ selectors: [--id, --base-sha256]
2575
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, base_sha256_matches_current_effective_record]
2576
+ owned_fields: [id, artifact, base_sha256]
2577
+ input:
2578
+ mode: structured
2579
+ root: amendable decision content
2580
+ sources: [file, stdin]
2581
+ structured_sources: [file, stdin]
2582
+ cli_owned_fields: [id, artifact, base_sha256]
2583
+ recovery: Reread the exact decision, copy its current effective SHA-256, and retry with at least one amendable field; no state was changed.
2584
+ examples: ['agentera state decisions amend --id qjtrmnpvka --base-sha256 HASH --input amendment.yaml --format json']
2585
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2586
+ fields:
2587
+ - { flag: --id, field: id, kind: string, required: true }
2588
+ - { flag: --base-sha256, field: base_sha256, kind: string, required: true }
2589
+
2590
+ - artifact: plan
2591
+ verb: append
2592
+ class: record_payload
2593
+ selectors: [--plan]
2594
+ preconditions: [entity_mode_marker_is_valid, selected_plan_is_open, input_is_one_complete_plan_task_record, task_dependencies_are_bare_ids_in_same_plan]
2595
+ owned_fields: [id, artifact, plan, status, superseded_by, superseded_reason, evaluation, header.status, header.id, previous_plan_archived, task_ids]
2596
+ input:
2597
+ mode: structured
2598
+ root: one plan task record
2599
+ sources: [file, stdin]
2600
+ structured_sources: [file, stdin]
2601
+ cli_owned_fields: [id, artifact, plan, status, superseded_by, superseded_reason, evaluation, header.status, header.id, previous_plan_archived, task_ids]
2602
+ recovery: Use agentera state plan explain --verb append --format json, select an open plan, and supply one complete task record with bare same-plan dependencies.
2603
+ examples: ['agentera state plan append --plan qjtrmnpvka --input task.yaml --format json']
2604
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2605
+ fields:
2606
+ - { flag: --plan, field: plan, kind: string }
2607
+
2608
+ - artifact: plan
2609
+ verb: update
2610
+ class: record_payload
2611
+ selectors: [--id, --plan]
2612
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, selected_plan_is_open, input_is_plan_task_patch, task_dependencies_are_bare_ids_in_same_plan]
2613
+ owned_fields: [id, artifact, plan, status, superseded_by, superseded_reason, evaluation, header.status, header.id, previous_plan_archived, task_ids]
2614
+ input:
2615
+ mode: structured
2616
+ root: plan task patch
2617
+ sources: [file, stdin]
2618
+ structured_sources: [file, stdin]
2619
+ cli_owned_fields: [id, artifact, plan, status, superseded_by, superseded_reason, evaluation, header.status, header.id, previous_plan_archived, task_ids]
2620
+ recovery: Reread the plan task by its bare ID, supply an omission-preserving patch through --input, and retry; no state was changed.
2621
+ examples: ['agentera state plan update --id qjtrmnpvka --plan abcdefghij --input task-patch.yaml --format json']
2622
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2623
+ fields:
2624
+ - { flag: --id, field: id, kind: string, required: true }
2625
+ - { flag: --plan, field: plan, kind: string }
2626
+
2627
+ - artifact: plan
2628
+ verb: set-status
2629
+ class: simple_transition
2630
+ selectors: [--id, --plan]
2631
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, task_exists_in_selected_plan]
2632
+ owned_fields: [id, artifact, plan, status]
2633
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2634
+ recovery: Reread the task list, copy its bare task ID, and use one of complete, in_progress, pending, or blocked.
2635
+ examples: ['agentera state plan set-status --id qjtrmnpvka --status complete --format json']
2636
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1 }
2637
+ fields:
2638
+ - { flag: --id, field: id, kind: string, required: true }
2639
+ - { flag: --plan, field: plan, kind: string }
2640
+ - { flag: --status, field: status, kind: string, required: true, valid_values: [complete, in_progress, pending, blocked] }
2641
+
2642
+ - artifact: plan
2643
+ verb: supersede
2644
+ class: simple_transition
2645
+ selectors: [--id, --plan]
2646
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, replacements_are_distinct_same_plan_complete_latest_pass]
2647
+ owned_fields: [id, artifact, plan, superseded_by, superseded_reason]
2648
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2649
+ recovery: Complete and evaluate each replacement task with latest PASS evidence, then retry with the returned bare IDs.
2650
+ examples: ['agentera state plan supersede --id qjtrmnpvka --by zqtrmnpvka --reason "Replacement task" --format json']
2651
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 100, max_reason_code_points: 500 }
2652
+ fields:
2653
+ - { flag: --id, field: id, kind: string, required: true }
2654
+ - { flag: --plan, field: plan, kind: string }
2655
+ - { flag: --by, field: superseded_by, kind: string_list, required: true, repeatable: true }
2656
+ - { flag: --reason, field: superseded_reason, kind: string, required: true }
2657
+
2658
+ - artifact: plan
2659
+ verb: set-plan-status
2660
+ class: simple_transition
2661
+ selectors: [--plan]
2662
+ preconditions: [entity_mode_marker_is_valid, selected_plan_is_open_or_complete, completion_requires_complete_tasks_and_latest_pass_replacements]
2663
+ owned_fields: [id, artifact, plan, header.status]
2664
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2665
+ recovery: Keep the plan open or resolve every incomplete task and replacement evaluation before retrying completion.
2666
+ examples: ['agentera state plan set-plan-status --status complete --format json']
2667
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 100 }
2668
+ fields:
2669
+ - { flag: --plan, field: plan, kind: string }
2670
+ - { flag: --status, field: status, kind: string, required: true, valid_values: [open, complete] }
2671
+
2672
+ - artifact: plan
2673
+ verb: record-evaluation
2674
+ class: simple_transition
2675
+ selectors: [--id, --plan]
2676
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, attempt_id_is_idempotent, verdict_is_pass_or_fail]
2677
+ owned_fields: [id, artifact, plan, evaluation]
2678
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2679
+ recovery: Use the task's bare ID, a stable attempt ID, and evaluator provenance, then retry without changing published evidence.
2680
+ examples: ['agentera state plan record-evaluation --id qjtrmnpvka --attempt-id audit-1 --verdict pass --provenance "audit report" --format json']
2681
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1 }
2682
+ fields:
2683
+ - { flag: --id, field: id, kind: string, required: true }
2684
+ - { flag: --plan, field: plan, kind: string }
2685
+ - { flag: --attempt-id, field: evaluation.attempt_id, kind: string, required: true }
2686
+ - { flag: --verdict, field: evaluation.verdict, kind: string, required: true, valid_values: [pass, fail] }
2687
+ - { flag: --failure-evidence, field: evaluation.failure_evidence, kind: string }
2688
+ - { flag: --provenance, field: evaluation.provenance, kind: string, required: true }
2689
+
2690
+ - artifact: plan
2691
+ verb: archive
2692
+ class: simple_transition
2693
+ selectors: [--plan]
2694
+ preconditions: [entity_mode_marker_is_valid, selected_plan_is_not_open]
2695
+ owned_fields: [id, artifact, plan, header.status]
2696
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2697
+ recovery: Complete or preserve the selected plan, then retry archive with no content flags; no state was changed.
2698
+ examples: ['agentera state plan archive --dry-run --format json']
2699
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 100 }
2700
+ allow_force: true
2701
+ fields: [{ flag: --plan, field: plan, kind: string }]
2702
+
2703
+ - artifact: plan
2704
+ verb: create
2705
+ class: batch_transaction
2706
+ selectors: []
2707
+ preconditions: [entity_mode_marker_is_valid, input_is_one_complete_plan_document, create_local_task_ordinals_are_sequential, dependency_graph_is_valid]
2708
+ owned_fields: [id, artifact, header.id, previous_plan_archived, task_ids]
2709
+ input:
2710
+ mode: structured
2711
+ root: complete plan document
2712
+ sources: [file, stdin]
2713
+ cli_owned_fields: [id, artifact, header.id, previous_plan_archived, task_ids]
2714
+ recovery: Run agentera state plan explain --verb create --format json, keep task ordinals and dependencies local to this atomic input, remove CLI-owned fields, and correct the first schema or dependency violation.
2715
+ examples: ['agentera state plan create --input plan.yaml --format json']
2716
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 100 }
2717
+ allow_force: true
2718
+ fields: []
2719
+
2720
+ - artifact: health
2721
+ verb: append
2722
+ class: record_payload
2723
+ selectors: []
2724
+ preconditions: [entity_mode_marker_is_valid, input_is_one_audit_entry_not_a_whole_artifact]
2725
+ owned_fields: [id, artifact, appended_at]
2726
+ input:
2727
+ mode: structured
2728
+ root: one audit entry
2729
+ sources: [file, stdin]
2730
+ cli_owned_fields: [id, artifact, appended_at]
2731
+ recovery: Run agentera check validate state --format json, preserve audit evidence, and retry with one schema-valid audit entry.
2732
+ examples: ['agentera state health append --input audit.yaml --format json']
2733
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 100 }
2734
+ compacts: true
2735
+ fields: []
2736
+
2737
+ - artifact: objective
2738
+ verb: create
2739
+ class: record_payload
2740
+ selectors: []
2741
+ preconditions: [entity_mode_marker_is_valid, input_is_one_objective_document]
2742
+ owned_fields: [id, artifact, header.id]
2743
+ input:
2744
+ mode: structured
2745
+ root: one objective document
2746
+ sources: [file, stdin]
2747
+ cli_owned_fields: [id, artifact, header.id]
2748
+ recovery: Remove identity fields assigned by the CLI and retry with one schema-valid objective document.
2749
+ examples: ['agentera state objective create --input objective.yaml --format json']
2750
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2751
+ fields: []
2752
+
2753
+ - artifact: objective
2754
+ verb: update
2755
+ class: record_payload
2756
+ selectors: [--id]
2757
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, input_is_one_objective_document]
2758
+ owned_fields: [id, artifact, header.id]
2759
+ input:
2760
+ mode: structured
2761
+ root: one objective document
2762
+ sources: [file, stdin]
2763
+ cli_owned_fields: [id, artifact, header.id]
2764
+ recovery: Reread the objective, copy its bare ID to --id, remove CLI-owned fields, and retry.
2765
+ examples: ['agentera state objective update --id qjtrmnpvka --input objective.yaml --format json']
2766
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2767
+ fields: [{ flag: --id, field: id, kind: string, required: true }]
2768
+
2769
+ - artifact: experiments
2770
+ verb: publish
2771
+ class: batch_transaction
2772
+ selectors: [--objective, --id]
2773
+ preconditions: [entity_mode_marker_is_valid, owner_is_bare_ten_letters, input_is_one_experiment_entry, archive_and_projection_publication_is_atomic]
2774
+ owned_fields: [id, artifact, objective, archive_identity]
2775
+ input:
2776
+ mode: structured
2777
+ root: one experiment entry
2778
+ sources: [file, stdin]
2779
+ cli_owned_fields: [id, artifact, objective]
2780
+ recovery: Use a bare objective ID, omit numeric legacy selectors, and retry the exact input; divergent immutable identities remain untouched.
2781
+ examples: ['agentera state experiments publish --objective qjtrmnpvka --input experiment.yaml --format json']
2782
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 100 }
2783
+ compacts: true
2784
+ fields:
2785
+ - { flag: --objective, field: objective, kind: string, required: true }
2786
+ - { flag: --id, field: id, kind: string }
2787
+
2788
+ - artifact: todo
2789
+ verb: create
2790
+ class: record_payload
2791
+ selectors: []
2792
+ preconditions: [entity_mode_marker_is_valid, todo_reconciliation_is_valid, full_typed_record_is_valid, readiness_is_complete_or_needs_triage, dependency_graph_is_valid]
2793
+ owned_fields: [id, artifact, status, public_order, lifecycle]
2794
+ input:
2795
+ mode: structured
2796
+ root: full typed TODO record
2797
+ sources: [file, stdin]
2798
+ structured_sources: [file, stdin]
2799
+ cli_owned_fields: [id, artifact, status, public_order, lifecycle]
2800
+ recovery: Run agentera state todo explain --verb create --format json, remove CLI-owned fields, provide the full typed TODO record, and retry.
2801
+ examples: ['agentera state todo create --input todo.yaml --format json']
2802
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 100 }
2803
+ fields: []
2804
+
2805
+ - artifact: todo
2806
+ verb: update
2807
+ class: record_payload
2808
+ selectors: [--id]
2809
+ preconditions: [entity_mode_marker_is_valid, todo_reconciliation_is_valid, target_id_is_bare_ten_letters, typed_patch_is_valid, dependency_graph_is_valid]
2810
+ owned_fields: [id, artifact, status, public_order, lifecycle]
2811
+ input:
2812
+ mode: structured
2813
+ root: TODO record patch
2814
+ sources: [file, stdin]
2815
+ structured_sources: [file, stdin]
2816
+ cli_owned_fields: [id, artifact, status, public_order, lifecycle]
2817
+ recovery: Reread the TODO item, use its bare ID, supply only typed patch fields, and use null or an empty list only for declared clearable fields.
2818
+ examples: ['agentera state todo update --id qjtrmnpvka --input todo-patch.yaml --format json']
2819
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2820
+ fields: [{ flag: --id, field: id, kind: string, required: true }]
2821
+
2822
+ - artifact: todo
2823
+ verb: set-severity
2824
+ class: simple_transition
2825
+ selectors: [--id]
2826
+ preconditions: [entity_mode_marker_is_valid, todo_reconciliation_is_valid, target_id_is_bare_ten_letters, severity_is_valid, reason_and_date_are_present]
2827
+ owned_fields: [id, artifact, severity, lifecycle]
2828
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2829
+ recovery: Use the bare TODO ID, one immediate-impact severity, a reason, and a YYYY-MM-DD date; no record input is accepted.
2830
+ examples: ['agentera state todo set-severity --id qjtrmnpvka --severity degraded --reason "Impact changed" --date 2026-07-31 --format json']
2831
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1, max_reason_code_points: 500 }
2832
+ fields:
2833
+ - { flag: --id, field: id, kind: string, required: true }
2834
+ - { flag: --severity, field: severity, kind: string, required: true, valid_values: [critical, degraded, normal, annoying] }
2835
+ - { flag: --reason, field: lifecycle.reason, kind: string, required: true }
2836
+ - { flag: --date, field: lifecycle.date, kind: date, required: true }
2837
+
2838
+ - artifact: todo
2839
+ verb: supersede
2840
+ class: simple_transition
2841
+ selectors: [--id]
2842
+ preconditions: [entity_mode_marker_is_valid, todo_reconciliation_is_valid, target_id_is_bare_ten_letters, replacement_is_distinct_existing_todo, reason_and_date_are_present]
2843
+ owned_fields: [id, artifact, status, lifecycle]
2844
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2845
+ recovery: Use the selected bare TODO ID, an existing distinct replacement ID, a reason, and a YYYY-MM-DD date; no record input is accepted.
2846
+ examples: ['agentera state todo supersede --id qjtrmnpvka --replacement zqtrmnpvka --reason "Replaced by narrower work" --date 2026-07-31 --format json']
2847
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1, max_reason_code_points: 500 }
2848
+ fields:
2849
+ - { flag: --id, field: id, kind: string, required: true }
2850
+ - { flag: --replacement, field: lifecycle.replacement, kind: string, required: true }
2851
+ - { flag: --reason, field: lifecycle.reason, kind: string, required: true }
2852
+ - { flag: --date, field: lifecycle.date, kind: date, required: true }
2853
+
2854
+ - artifact: todo
2855
+ verb: resolve
2856
+ class: simple_transition
2857
+ selectors: [--id]
2858
+ preconditions: [entity_mode_marker_is_valid, todo_reconciliation_is_valid, target_id_is_bare_ten_letters, item_is_open, reason_and_date_are_present]
2859
+ owned_fields: [id, artifact, status, lifecycle]
2860
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2861
+ recovery: Use the bare TODO ID, a reason, and a YYYY-MM-DD date; no record input is accepted.
2862
+ examples: ['agentera state todo resolve --id qjtrmnpvka --reason "Shipped" --date 2026-07-31 --format json']
2863
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1, max_reason_code_points: 500 }
2864
+ fields:
2865
+ - { flag: --id, field: id, kind: string, required: true }
2866
+ - { flag: --reason, field: lifecycle.reason, kind: string, required: true }
2867
+ - { flag: --date, field: lifecycle.date, kind: date, required: true }
2868
+
2869
+ - artifact: todo
2870
+ verb: reopen
2871
+ class: simple_transition
2872
+ selectors: [--id]
2873
+ preconditions: [entity_mode_marker_is_valid, todo_reconciliation_is_valid, target_id_is_bare_ten_letters, item_is_resolved, reason_and_date_are_present]
2874
+ owned_fields: [id, artifact, status, lifecycle]
2875
+ input: { mode: none, sources: [], cli_owned_fields: [] }
2876
+ recovery: Use the bare resolved TODO ID, a reason, and a YYYY-MM-DD date; no record input is accepted.
2877
+ examples: ['agentera state todo reopen --id qjtrmnpvka --reason "Scope returned" --date 2026-07-31 --format json']
2878
+ bounds: { max_input_utf8_bytes: 0, max_collection_items: 1, max_reason_code_points: 500 }
2879
+ fields:
2880
+ - { flag: --id, field: id, kind: string, required: true }
2881
+ - { flag: --reason, field: lifecycle.reason, kind: string, required: true }
2882
+ - { flag: --date, field: lifecycle.date, kind: date, required: true }
2883
+
2884
+ - artifact: docs
2885
+ verb: create
2886
+ class: record_payload
2887
+ selectors: []
2888
+ preconditions: [entity_mode_marker_is_valid, input_is_one_documentation_inventory_entry]
2889
+ owned_fields: [id, artifact]
2890
+ input:
2891
+ mode: structured
2892
+ root: one documentation inventory entry
2893
+ sources: [file, stdin]
2894
+ cli_owned_fields: [id, artifact]
2895
+ recovery: Remove id and artifact from the input and retry with one schema-valid documentation inventory entry.
2896
+ examples: ['agentera state docs create --input documentation.yaml --format json']
2897
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 100 }
2898
+ fields: []
2899
+
2900
+ - artifact: docs
2901
+ verb: update
2902
+ class: record_payload
2903
+ selectors: [--id]
2904
+ preconditions: [entity_mode_marker_is_valid, target_id_is_bare_ten_letters, input_is_one_documentation_inventory_entry]
2905
+ owned_fields: [id, artifact]
2906
+ input:
2907
+ mode: structured
2908
+ root: one documentation inventory entry
2909
+ sources: [file, stdin]
2910
+ cli_owned_fields: [id, artifact]
2911
+ recovery: Reread the documentation entry, copy its bare ID to --id, remove CLI-owned fields, and retry.
2912
+ examples: ['agentera state docs update --id qjtrmnpvka --input documentation.yaml --format json']
2913
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2914
+ fields: [{ flag: --id, field: id, kind: string, required: true }]
2915
+
2916
+ - artifact: glossary
2917
+ verb: publish
2918
+ class: batch_transaction
2919
+ selectors: []
2920
+ preconditions: [input_is_one_glossary_publication_request, cited_source_lines_are_current, confirmation_matches_proposal]
2921
+ owned_fields: [approval_id, glossary_entry_id]
2922
+ input:
2923
+ mode: structured
2924
+ root: one glossary publication request
2925
+ sources: [file, stdin]
2926
+ cli_owned_fields: []
2927
+ recovery: Run agentera state glossary explain --verb publish --format json and correct the bounded request or confirmation.
2928
+ examples: ['agentera state glossary publish --input glossary-publication.yaml --format json']
2929
+ bounds: { max_input_utf8_bytes: 32768, max_collection_items: 1 }
2930
+ fields: []