agentera 3.0.0-dev.8 → 3.0.0-dev.81

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