agentera 3.0.0-dev.8 → 3.0.0-dev.80

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