agentera 3.0.0-dev.4 → 3.0.0-dev.46

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