agentera 3.0.0-dev.5 → 3.0.0-dev.51

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