agentera 3.0.0-dev.7 → 3.0.0-dev.72

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