agentera 3.0.0-dev.3 → 3.0.0-dev.30

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 (762) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +96 -6
  3. package/bundle/.agentera-npx-bundle.json +1 -1
  4. package/bundle/CHANGELOG.md +1133 -0
  5. package/bundle/DESIGN.md +229 -0
  6. package/bundle/LICENSE +201 -0
  7. package/bundle/README.md +136 -0
  8. package/bundle/UPGRADE.md +201 -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-manifest-interface-model.yaml +42 -252
  12. package/bundle/references/adapters/package-registry.yaml +20 -188
  13. package/bundle/references/adapters/package-surface-characterization.md +36 -37
  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 +97 -0
  18. package/bundle/references/analysis/benchmark.md +10 -6
  19. package/bundle/references/analysis/evidence-tier-authority.yaml +516 -0
  20. package/bundle/references/analysis/startup-measurement-contract.yaml +37 -26
  21. package/bundle/references/analysis/verification-policy.yaml +142 -0
  22. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +9 -8
  23. package/bundle/references/artifacts/state-storage-authority.yaml +2167 -0
  24. package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
  25. package/bundle/references/cli/agent-ready-state-contract.yaml +64 -81
  26. package/bundle/references/cli/app-lifecycle-vocabulary.yaml +7 -8
  27. package/bundle/references/cli/audience-namespace-cli-migration.yaml +58 -29
  28. package/bundle/references/cli/bundle-skill-vocabulary.yaml +12 -49
  29. package/bundle/references/cli/capability-instruction-contract.yaml +96 -58
  30. package/bundle/references/cli/capability-instruction-structure.md +144 -0
  31. package/bundle/references/cli/capability-tool-classification.yaml +14 -14
  32. package/bundle/references/cli/coexistence-probe.yaml +13 -0
  33. package/bundle/references/cli/hybrid-route-contract.yaml +416 -0
  34. package/bundle/references/cli/parity-expected-actual-template.md +30 -0
  35. package/bundle/references/cli/prime-consumer-compatibility.yaml +651 -0
  36. package/bundle/references/cli/routing-execution-vocabulary.yaml +16 -38
  37. package/bundle/references/cli/routing-model.md +139 -0
  38. package/bundle/references/cli/single-name-protocol.yaml +42 -0
  39. package/bundle/references/cli/trigger-schema-enrichment.md +140 -0
  40. package/bundle/references/cli/update-channels.yaml +45 -7
  41. package/bundle/references/cli/upgrade-repair-wording.md +25 -0
  42. package/bundle/references/cli/v3-handoff-manifest.schema.yaml +97 -0
  43. package/bundle/references/cli/vocabulary-index.yaml +23 -18
  44. package/bundle/references/cli/vocabulary.md +346 -331
  45. package/bundle/references/meta/documentation-inventory.md +10 -3
  46. package/bundle/registry.json +14 -14
  47. package/bundle/skills/agentera/SKILL.md +182 -407
  48. package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +84 -0
  49. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/exit.yaml +2 -2
  50. package/bundle/skills/agentera/capabilities/audit/schemas/triggers.yaml +25 -0
  51. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/validation.yaml +20 -19
  52. package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +85 -0
  53. package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/exit.yaml +3 -3
  54. package/bundle/skills/agentera/capabilities/build/schemas/triggers.yaml +27 -0
  55. package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/validation.yaml +16 -16
  56. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/artifacts.yaml +12 -12
  57. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/exit.yaml +5 -5
  58. package/bundle/skills/agentera/capabilities/design/schemas/triggers.yaml +16 -0
  59. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/validation.yaml +7 -7
  60. package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +49 -0
  61. package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/exit.yaml +2 -2
  62. package/bundle/skills/agentera/capabilities/discuss/schemas/triggers.yaml +20 -0
  63. package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/validation.yaml +9 -8
  64. package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +80 -0
  65. package/bundle/skills/agentera/capabilities/document/schemas/triggers.yaml +16 -0
  66. package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/validation.yaml +18 -18
  67. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/artifacts.yaml +17 -17
  68. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/exit.yaml +2 -2
  69. package/bundle/skills/agentera/capabilities/optimize/schemas/triggers.yaml +16 -0
  70. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/validation.yaml +9 -9
  71. package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +76 -0
  72. package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/exit.yaml +9 -7
  73. package/bundle/skills/agentera/capabilities/orchestrate/schemas/triggers.yaml +23 -0
  74. package/bundle/skills/agentera/capabilities/orchestrate/schemas/validation.yaml +121 -0
  75. package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +63 -0
  76. package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/exit.yaml +2 -2
  77. package/bundle/skills/agentera/capabilities/plan/schemas/triggers.yaml +23 -0
  78. package/bundle/skills/agentera/capabilities/plan/schemas/validation.yaml +89 -0
  79. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/artifacts.yaml +4 -4
  80. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/exit.yaml +3 -3
  81. package/bundle/skills/agentera/capabilities/profile/schemas/triggers.yaml +20 -0
  82. package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +85 -0
  83. package/bundle/skills/agentera/capabilities/research/schemas/artifacts.yaml +24 -0
  84. package/bundle/skills/agentera/capabilities/research/schemas/triggers.yaml +16 -0
  85. package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/validation.yaml +2 -2
  86. package/bundle/skills/agentera/capabilities/status/schemas/artifacts.yaml +72 -0
  87. package/bundle/skills/agentera/capabilities/status/schemas/triggers.yaml +22 -0
  88. package/bundle/skills/agentera/capabilities/{hej → status}/schemas/validation.yaml +5 -5
  89. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/artifacts.yaml +16 -16
  90. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/exit.yaml +7 -6
  91. package/bundle/skills/agentera/capabilities/vision/schemas/triggers.yaml +23 -0
  92. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/validation.yaml +18 -20
  93. package/bundle/skills/agentera/capability_schema_contract.yaml +200 -37
  94. package/bundle/skills/agentera/protocol.yaml +29 -29
  95. package/bundle/skills/agentera/references/contract.md +387 -329
  96. package/bundle/skills/agentera/route-phrases.yaml +81 -0
  97. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +5 -4
  98. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +40 -22
  99. package/bundle/skills/agentera/schemas/artifacts/design.yaml +5 -4
  100. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +15 -19
  101. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +145 -14
  102. package/bundle/skills/agentera/schemas/artifacts/health.yaml +58 -21
  103. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +22 -8
  104. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +327 -15
  105. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +51 -53
  106. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +82 -28
  107. package/bundle/skills/agentera/schemas/artifacts/vision.yaml +3 -3
  108. package/dist/analytics/extractCorpus/cli.js +191 -0
  109. package/dist/analytics/extractCorpus/cli.js.map +1 -0
  110. package/dist/analytics/extractCorpus/copilotSessions.js +276 -0
  111. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -0
  112. package/dist/analytics/extractCorpus/core.js +393 -0
  113. package/dist/analytics/extractCorpus/core.js.map +1 -0
  114. package/dist/analytics/extractCorpus/corpus.js +168 -0
  115. package/dist/analytics/extractCorpus/corpus.js.map +1 -0
  116. package/dist/analytics/extractCorpus/coverageAudit.js +261 -0
  117. package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -0
  118. package/dist/analytics/extractCorpus/cursorSessions.js +426 -0
  119. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -0
  120. package/dist/analytics/extractCorpus/evidenceTiers.js +561 -0
  121. package/dist/analytics/extractCorpus/evidenceTiers.js.map +1 -0
  122. package/dist/analytics/extractCorpus/extractCorpusParity.js +106 -0
  123. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -0
  124. package/dist/analytics/extractCorpus/filesystemSources.js +119 -0
  125. package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -0
  126. package/dist/analytics/extractCorpus/index.js +15 -0
  127. package/dist/analytics/extractCorpus/index.js.map +1 -0
  128. package/dist/analytics/extractCorpus/jsonlSessions.js +205 -0
  129. package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -0
  130. package/dist/analytics/extractCorpus/sqliteCaps.js +44 -0
  131. package/dist/analytics/extractCorpus/sqliteCaps.js.map +1 -0
  132. package/dist/analytics/extractCorpus/sqliteSessions.js +368 -0
  133. package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -0
  134. package/dist/analytics/extractCorpus/tierReader.js +109 -0
  135. package/dist/analytics/extractCorpus/tierReader.js.map +1 -0
  136. package/dist/analytics/extractCorpus.js +2 -1790
  137. package/dist/analytics/extractCorpus.js.map +1 -1
  138. package/dist/analytics/profileSignals.js +212 -0
  139. package/dist/analytics/profileSignals.js.map +1 -0
  140. package/dist/analytics/usageStats.js +191 -41
  141. package/dist/analytics/usageStats.js.map +1 -1
  142. package/dist/bin/agentera.js +3 -1
  143. package/dist/bin/agentera.js.map +1 -1
  144. package/dist/capabilities/audit/instructions.js +16 -0
  145. package/dist/capabilities/audit/instructions.js.map +1 -0
  146. package/dist/capabilities/build/instructions.js +18 -0
  147. package/dist/capabilities/build/instructions.js.map +1 -0
  148. package/dist/capabilities/design/instructions.js +5 -0
  149. package/dist/capabilities/design/instructions.js.map +1 -0
  150. package/dist/capabilities/discuss/instructions.js +16 -0
  151. package/dist/capabilities/discuss/instructions.js.map +1 -0
  152. package/dist/capabilities/document/instructions.js +12 -0
  153. package/dist/capabilities/document/instructions.js.map +1 -0
  154. package/dist/capabilities/index.js +39 -0
  155. package/dist/capabilities/index.js.map +1 -0
  156. package/dist/capabilities/optimize/instructions.js +14 -0
  157. package/dist/capabilities/optimize/instructions.js.map +1 -0
  158. package/dist/capabilities/orchestrate/instructions.js +41 -0
  159. package/dist/capabilities/orchestrate/instructions.js.map +1 -0
  160. package/dist/capabilities/plan/instructions.js +15 -0
  161. package/dist/capabilities/plan/instructions.js.map +1 -0
  162. package/dist/capabilities/profile/instructions.js +5 -0
  163. package/dist/capabilities/profile/instructions.js.map +1 -0
  164. package/dist/capabilities/research/instructions.js +6 -0
  165. package/dist/capabilities/research/instructions.js.map +1 -0
  166. package/dist/capabilities/status/instructions.js +5 -0
  167. package/dist/capabilities/status/instructions.js.map +1 -0
  168. package/dist/capabilities/status/startupInstructions.js +35 -0
  169. package/dist/capabilities/status/startupInstructions.js.map +1 -0
  170. package/dist/capabilities/vision/instructions.js +5 -0
  171. package/dist/capabilities/vision/instructions.js.map +1 -0
  172. package/dist/cli/appContext.js +30 -23
  173. package/dist/cli/appContext.js.map +1 -1
  174. package/dist/cli/argvalidate.js.map +1 -1
  175. package/dist/cli/capabilityContext/benchmark.js +564 -0
  176. package/dist/cli/capabilityContext/benchmark.js.map +1 -0
  177. package/dist/cli/capabilityContext/bespoke.js +44 -0
  178. package/dist/cli/capabilityContext/bespoke.js.map +1 -0
  179. package/dist/cli/capabilityContext/build.js +191 -0
  180. package/dist/cli/capabilityContext/build.js.map +1 -0
  181. package/dist/cli/capabilityContext/closeout.js +231 -0
  182. package/dist/cli/capabilityContext/closeout.js.map +1 -0
  183. package/dist/cli/capabilityContext/contract.js +214 -0
  184. package/dist/cli/capabilityContext/contract.js.map +1 -0
  185. package/dist/cli/capabilityContext/evidence.js +469 -0
  186. package/dist/cli/capabilityContext/evidence.js.map +1 -0
  187. package/dist/cli/capabilityContext/index.js +4 -0
  188. package/dist/cli/capabilityContext/index.js.map +1 -0
  189. package/dist/cli/capabilityContext/orchestration.js +128 -0
  190. package/dist/cli/capabilityContext/orchestration.js.map +1 -0
  191. package/dist/cli/capabilityContext/planState.js +280 -0
  192. package/dist/cli/capabilityContext/planState.js.map +1 -0
  193. package/dist/cli/capabilityContext/progress.js +143 -0
  194. package/dist/cli/capabilityContext/progress.js.map +1 -0
  195. package/dist/cli/capabilityContext/shared.js +100 -0
  196. package/dist/cli/capabilityContext/shared.js.map +1 -0
  197. package/dist/cli/capabilityContext/slim.js +153 -0
  198. package/dist/cli/capabilityContext/slim.js.map +1 -0
  199. package/dist/cli/capabilityContext/startup.js +257 -0
  200. package/dist/cli/capabilityContext/startup.js.map +1 -0
  201. package/dist/cli/capabilityContext/types.js +51 -0
  202. package/dist/cli/capabilityContext/types.js.map +1 -0
  203. package/dist/cli/capabilityContext.js +1 -2420
  204. package/dist/cli/capabilityContext.js.map +1 -1
  205. package/dist/cli/commands/appHome.js +23 -0
  206. package/dist/cli/commands/appHome.js.map +1 -0
  207. package/dist/cli/commands/capability.js +3 -10
  208. package/dist/cli/commands/capability.js.map +1 -1
  209. package/dist/cli/commands/compact.js +41 -12
  210. package/dist/cli/commands/compact.js.map +1 -1
  211. package/dist/cli/commands/doctor.js +59 -97
  212. package/dist/cli/commands/doctor.js.map +1 -1
  213. package/dist/cli/commands/durability.js +82 -0
  214. package/dist/cli/commands/durability.js.map +1 -0
  215. package/dist/cli/commands/entityMigrate.js +132 -0
  216. package/dist/cli/commands/entityMigrate.js.map +1 -0
  217. package/dist/cli/commands/lint.js +26 -43
  218. package/dist/cli/commands/lint.js.map +1 -1
  219. package/dist/cli/commands/prime/briefOrientation.js +592 -0
  220. package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
  221. package/dist/cli/commands/prime/bundleStatus.js +191 -0
  222. package/dist/cli/commands/prime/bundleStatus.js.map +1 -0
  223. package/dist/cli/commands/prime/collectEntityOrientation.js +260 -0
  224. package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -0
  225. package/dist/cli/commands/prime/collectOrientationState.js +180 -0
  226. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
  227. package/dist/cli/commands/prime/orientationOutput.js +350 -0
  228. package/dist/cli/commands/prime/orientationOutput.js.map +1 -0
  229. package/dist/cli/commands/prime/types.js +2 -0
  230. package/dist/cli/commands/prime/types.js.map +1 -0
  231. package/dist/cli/commands/prime/v1Migration.js +39 -0
  232. package/dist/cli/commands/prime/v1Migration.js.map +1 -0
  233. package/dist/cli/commands/prime.js +61 -556
  234. package/dist/cli/commands/prime.js.map +1 -1
  235. package/dist/cli/commands/query.js +66 -51
  236. package/dist/cli/commands/query.js.map +1 -1
  237. package/dist/cli/commands/report.js +100 -24
  238. package/dist/cli/commands/report.js.map +1 -1
  239. package/dist/cli/commands/route.js +142 -0
  240. package/dist/cli/commands/route.js.map +1 -0
  241. package/dist/cli/commands/schema.js +260 -78
  242. package/dist/cli/commands/schema.js.map +1 -1
  243. package/dist/cli/commands/state/decisions.js +388 -0
  244. package/dist/cli/commands/state/decisions.js.map +1 -0
  245. package/dist/cli/commands/state/docs.js +71 -0
  246. package/dist/cli/commands/state/docs.js.map +1 -0
  247. package/dist/cli/commands/state/experimentRecords.js +139 -0
  248. package/dist/cli/commands/state/experimentRecords.js.map +1 -0
  249. package/dist/cli/commands/state/experiments.js +15 -0
  250. package/dist/cli/commands/state/experiments.js.map +1 -0
  251. package/dist/cli/commands/state/get.js +127 -0
  252. package/dist/cli/commands/state/get.js.map +1 -0
  253. package/dist/cli/commands/state/health.js +15 -0
  254. package/dist/cli/commands/state/health.js.map +1 -0
  255. package/dist/cli/commands/state/index.js +60 -0
  256. package/dist/cli/commands/state/index.js.map +1 -0
  257. package/dist/cli/commands/state/list.js +176 -0
  258. package/dist/cli/commands/state/list.js.map +1 -0
  259. package/dist/cli/commands/state/objective.js +26 -0
  260. package/dist/cli/commands/state/objective.js.map +1 -0
  261. package/dist/cli/commands/state/plan.js +15 -0
  262. package/dist/cli/commands/state/plan.js.map +1 -0
  263. package/dist/cli/commands/state/planTasks.js +142 -0
  264. package/dist/cli/commands/state/planTasks.js.map +1 -0
  265. package/dist/cli/commands/state/plans.js +143 -0
  266. package/dist/cli/commands/state/plans.js.map +1 -0
  267. package/dist/cli/commands/state/progress.js +14 -0
  268. package/dist/cli/commands/state/progress.js.map +1 -0
  269. package/dist/cli/commands/state/shared.js +15 -0
  270. package/dist/cli/commands/state/shared.js.map +1 -0
  271. package/dist/cli/commands/state/todo.js +42 -0
  272. package/dist/cli/commands/state/todo.js.map +1 -0
  273. package/dist/cli/commands/state/write.js +418 -0
  274. package/dist/cli/commands/state/write.js.map +1 -0
  275. package/dist/cli/commands/upgrade.js +146 -4
  276. package/dist/cli/commands/upgrade.js.map +1 -1
  277. package/dist/cli/commands/upgradeVerify.js +119 -0
  278. package/dist/cli/commands/upgradeVerify.js.map +1 -0
  279. package/dist/cli/commands/validate.js +109 -209
  280. package/dist/cli/commands/validate.js.map +1 -1
  281. package/dist/cli/commands/verify.js +30 -8
  282. package/dist/cli/commands/verify.js.map +1 -1
  283. package/dist/cli/contracts/bundleStatus.js +2 -0
  284. package/dist/cli/contracts/bundleStatus.js.map +1 -0
  285. package/dist/cli/contracts/orientationState.js +2 -0
  286. package/dist/cli/contracts/orientationState.js.map +1 -0
  287. package/dist/cli/dispatch/argvParser.js +33 -0
  288. package/dist/cli/dispatch/argvParser.js.map +1 -0
  289. package/dist/cli/dispatch/check.js +390 -0
  290. package/dist/cli/dispatch/check.js.map +1 -0
  291. package/dist/cli/dispatch/commands.js +27 -0
  292. package/dist/cli/dispatch/commands.js.map +1 -0
  293. package/dist/cli/dispatch/index.js +226 -0
  294. package/dist/cli/dispatch/index.js.map +1 -0
  295. package/dist/cli/dispatch/lifecycle.js +653 -0
  296. package/dist/cli/dispatch/lifecycle.js.map +1 -0
  297. package/dist/cli/dispatch/prime.js +119 -0
  298. package/dist/cli/dispatch/prime.js.map +1 -0
  299. package/dist/cli/dispatch/shared.js +64 -0
  300. package/dist/cli/dispatch/shared.js.map +1 -0
  301. package/dist/cli/dispatch/state.js +174 -0
  302. package/dist/cli/dispatch/state.js.map +1 -0
  303. package/dist/cli/dispatch.js +1 -957
  304. package/dist/cli/dispatch.js.map +1 -1
  305. package/dist/cli/errors.js +53 -0
  306. package/dist/cli/errors.js.map +1 -0
  307. package/dist/cli/help.js +418 -0
  308. package/dist/cli/help.js.map +1 -0
  309. package/dist/cli/migrationRequired.js +87 -0
  310. package/dist/cli/migrationRequired.js.map +1 -0
  311. package/dist/cli/orientation/attention.js +67 -0
  312. package/dist/cli/orientation/attention.js.map +1 -0
  313. package/dist/cli/orientation/corpusCoverage.js +103 -0
  314. package/dist/cli/orientation/corpusCoverage.js.map +1 -0
  315. package/dist/cli/orientation.js +357 -148
  316. package/dist/cli/orientation.js.map +1 -1
  317. package/dist/cli/planArtifacts.js +351 -0
  318. package/dist/cli/planArtifacts.js.map +1 -0
  319. package/dist/cli/planEvidence.js +158 -0
  320. package/dist/cli/planEvidence.js.map +1 -0
  321. package/dist/cli/planLifecycleState.js +34 -0
  322. package/dist/cli/planLifecycleState.js.map +1 -0
  323. package/dist/cli/planTaskIndex.js +12 -0
  324. package/dist/cli/planTaskIndex.js.map +1 -0
  325. package/dist/cli/prime-blob.js +69 -2
  326. package/dist/cli/prime-blob.js.map +1 -1
  327. package/dist/cli/startupCompletenessContract.js +57 -0
  328. package/dist/cli/startupCompletenessContract.js.map +1 -0
  329. package/dist/cli/stateQuery.js +63 -10
  330. package/dist/cli/stateQuery.js.map +1 -1
  331. package/dist/cli/structured.js.map +1 -1
  332. package/dist/cli/todoMarkdown.js +33 -0
  333. package/dist/cli/todoMarkdown.js.map +1 -0
  334. package/dist/cli/todoSeverity.js +19 -0
  335. package/dist/cli/todoSeverity.js.map +1 -0
  336. package/dist/core/atomicWriter.js +21 -0
  337. package/dist/core/atomicWriter.js.map +1 -0
  338. package/dist/core/difflib.js.map +1 -1
  339. package/dist/core/envPaths.js +21 -0
  340. package/dist/core/envPaths.js.map +1 -0
  341. package/dist/core/jsonValue.js +6 -0
  342. package/dist/core/jsonValue.js.map +1 -0
  343. package/dist/core/paths.js.map +1 -1
  344. package/dist/core/pyjson.js +67 -2
  345. package/dist/core/pyjson.js.map +1 -1
  346. package/dist/core/skillIdentity.js +24 -0
  347. package/dist/core/skillIdentity.js.map +1 -0
  348. package/dist/core/sourceRoot.js.map +1 -1
  349. package/dist/core/text.js +11 -0
  350. package/dist/core/text.js.map +1 -0
  351. package/dist/core/toml.js.map +1 -1
  352. package/dist/core/yaml.js +8 -0
  353. package/dist/core/yaml.js.map +1 -1
  354. package/dist/eval/evalSkills.js +30 -25
  355. package/dist/eval/evalSkills.js.map +1 -1
  356. package/dist/eval/hybridRouteEvaluation.js +156 -0
  357. package/dist/eval/hybridRouteEvaluation.js.map +1 -0
  358. package/dist/eval/semanticEval.js +43 -19
  359. package/dist/eval/semanticEval.js.map +1 -1
  360. package/dist/eval/semanticFixtures.js +16 -4
  361. package/dist/eval/semanticFixtures.js.map +1 -1
  362. package/dist/hooks/common.js +10 -27
  363. package/dist/hooks/common.js.map +1 -1
  364. package/dist/hooks/compaction/apply.js +447 -0
  365. package/dist/hooks/compaction/apply.js.map +1 -0
  366. package/dist/hooks/compaction/dryRun.js +185 -0
  367. package/dist/hooks/compaction/dryRun.js.map +1 -0
  368. package/dist/hooks/compaction/index.js +23 -0
  369. package/dist/hooks/compaction/index.js.map +1 -0
  370. package/dist/hooks/compaction/parse.js +326 -0
  371. package/dist/hooks/compaction/parse.js.map +1 -0
  372. package/dist/hooks/compaction/retention.js +203 -0
  373. package/dist/hooks/compaction/retention.js.map +1 -0
  374. package/dist/hooks/compaction/status.js +361 -0
  375. package/dist/hooks/compaction/status.js.map +1 -0
  376. package/dist/hooks/compaction/types.js +6 -0
  377. package/dist/hooks/compaction/types.js.map +1 -0
  378. package/dist/hooks/cursorPreToolUse.js +1 -1
  379. package/dist/hooks/cursorPreToolUse.js.map +1 -1
  380. package/dist/hooks/cursorSessionStart.js +14 -21
  381. package/dist/hooks/cursorSessionStart.js.map +1 -1
  382. package/dist/hooks/projectHookInput.js +26 -0
  383. package/dist/hooks/projectHookInput.js.map +1 -0
  384. package/dist/hooks/sessionStart.js +55 -170
  385. package/dist/hooks/sessionStart.js.map +1 -1
  386. package/dist/hooks/sessionStop.js +12 -26
  387. package/dist/hooks/sessionStop.js.map +1 -1
  388. package/dist/hooks/validateArtifact/agentFacing.js +10 -0
  389. package/dist/hooks/validateArtifact/agentFacing.js.map +1 -0
  390. package/dist/hooks/validateArtifact/index.js +151 -0
  391. package/dist/hooks/validateArtifact/index.js.map +1 -0
  392. package/dist/hooks/validateArtifact/markdown.js +146 -0
  393. package/dist/hooks/validateArtifact/markdown.js.map +1 -0
  394. package/dist/hooks/validateArtifact/runtime.js +86 -0
  395. package/dist/hooks/validateArtifact/runtime.js.map +1 -0
  396. package/dist/hooks/validateArtifact/schema.js +541 -0
  397. package/dist/hooks/validateArtifact/schema.js.map +1 -0
  398. package/dist/hooks/validateArtifact/traversal.js +108 -0
  399. package/dist/hooks/validateArtifact/traversal.js.map +1 -0
  400. package/dist/hooks/validateArtifact/violations.js +108 -0
  401. package/dist/hooks/validateArtifact/violations.js.map +1 -0
  402. package/dist/migrate/v2HandoffManifest.js +455 -0
  403. package/dist/migrate/v2HandoffManifest.js.map +1 -0
  404. package/dist/registries/artifactProtocolIds.js +77 -0
  405. package/dist/registries/artifactProtocolIds.js.map +1 -0
  406. package/dist/registries/artifactRegistry.js +222 -62
  407. package/dist/registries/artifactRegistry.js.map +1 -1
  408. package/dist/registries/capabilityContract.js +141 -12
  409. package/dist/registries/capabilityContract.js.map +1 -1
  410. package/dist/registries/evaluatorHandoffContract.js +171 -0
  411. package/dist/registries/evaluatorHandoffContract.js.map +1 -0
  412. package/dist/registries/evidenceTierContract.js +362 -0
  413. package/dist/registries/evidenceTierContract.js.map +1 -0
  414. package/dist/registries/hybridRoute.js +203 -0
  415. package/dist/registries/hybridRoute.js.map +1 -0
  416. package/dist/registries/hybridRouteReceipt.js +221 -0
  417. package/dist/registries/hybridRouteReceipt.js.map +1 -0
  418. package/dist/registries/packageRegistry.js +90 -230
  419. package/dist/registries/packageRegistry.js.map +1 -1
  420. package/dist/registries/triggerLoader.js +175 -0
  421. package/dist/registries/triggerLoader.js.map +1 -0
  422. package/dist/registries/verbosityBudgetContract.js +206 -0
  423. package/dist/registries/verbosityBudgetContract.js.map +1 -0
  424. package/dist/release/releaseMetadata.js +319 -0
  425. package/dist/release/releaseMetadata.js.map +1 -0
  426. package/dist/runtime/lifecycleAdapterContract.js +458 -0
  427. package/dist/runtime/lifecycleAdapterContract.js.map +1 -0
  428. package/dist/runtime/lifecycleAdapters.js +778 -0
  429. package/dist/runtime/lifecycleAdapters.js.map +1 -0
  430. package/dist/runtime/lifecycleAuthority.js +454 -0
  431. package/dist/runtime/lifecycleAuthority.js.map +1 -0
  432. package/dist/runtime/lifecycleOperationContract.js +114 -0
  433. package/dist/runtime/lifecycleOperationContract.js.map +1 -0
  434. package/dist/runtime/lifecycleOperations.js +635 -0
  435. package/dist/runtime/lifecycleOperations.js.map +1 -0
  436. package/dist/runtime/lifecycleOwnershipJournal.js +623 -0
  437. package/dist/runtime/lifecycleOwnershipJournal.js.map +1 -0
  438. package/dist/runtime/lifecyclePublication.js +416 -0
  439. package/dist/runtime/lifecyclePublication.js.map +1 -0
  440. package/dist/runtime/lifecycleSnapshot.js +439 -0
  441. package/dist/runtime/lifecycleSnapshot.js.map +1 -0
  442. package/dist/runtime/nativeResourceCleanup.js +317 -0
  443. package/dist/runtime/nativeResourceCleanup.js.map +1 -0
  444. package/dist/setup/codex/cli.js +130 -0
  445. package/dist/setup/codex/cli.js.map +1 -0
  446. package/dist/setup/codex/configToml.js +558 -0
  447. package/dist/setup/codex/configToml.js.map +1 -0
  448. package/dist/setup/codex/constants.js +14 -0
  449. package/dist/setup/codex/constants.js.map +1 -0
  450. package/dist/setup/codex/installRoot.js +64 -0
  451. package/dist/setup/codex/installRoot.js.map +1 -0
  452. package/dist/setup/codex/state.js +252 -0
  453. package/dist/setup/codex/state.js.map +1 -0
  454. package/dist/setup/codex.js +9 -1055
  455. package/dist/setup/codex.js.map +1 -1
  456. package/dist/setup/opencode.js +21 -0
  457. package/dist/setup/opencode.js.map +1 -0
  458. package/dist/setup/opencodeConstants.js +2 -0
  459. package/dist/setup/opencodeConstants.js.map +1 -0
  460. package/dist/setup/sharedSkill.js +46 -0
  461. package/dist/setup/sharedSkill.js.map +1 -0
  462. package/dist/setup/smokeChecks.js +82 -0
  463. package/dist/setup/smokeChecks.js.map +1 -0
  464. package/dist/state/archiveDiscovery.js +578 -0
  465. package/dist/state/archiveDiscovery.js.map +1 -0
  466. package/dist/state/archivePublication.js +226 -0
  467. package/dist/state/archivePublication.js.map +1 -0
  468. package/dist/state/archiveRecovery.js +238 -0
  469. package/dist/state/archiveRecovery.js.map +1 -0
  470. package/dist/state/archiveReplay.js +54 -0
  471. package/dist/state/archiveReplay.js.map +1 -0
  472. package/dist/state/canonicalMigrationRecord.js +37 -0
  473. package/dist/state/canonicalMigrationRecord.js.map +1 -0
  474. package/dist/state/decisionEntities.js +322 -0
  475. package/dist/state/decisionEntities.js.map +1 -0
  476. package/dist/state/decisionLegacyValidation.js +216 -0
  477. package/dist/state/decisionLegacyValidation.js.map +1 -0
  478. package/dist/state/decisionMigrationProvenance.js +117 -0
  479. package/dist/state/decisionMigrationProvenance.js.map +1 -0
  480. package/dist/state/decisionOverlay.js +278 -0
  481. package/dist/state/decisionOverlay.js.map +1 -0
  482. package/dist/state/decisionRevision.js +632 -0
  483. package/dist/state/decisionRevision.js.map +1 -0
  484. package/dist/state/decisionRevisionPublication.js +532 -0
  485. package/dist/state/decisionRevisionPublication.js.map +1 -0
  486. package/dist/state/directRetrieval.js +373 -0
  487. package/dist/state/directRetrieval.js.map +1 -0
  488. package/dist/state/durability.js +325 -0
  489. package/dist/state/durability.js.map +1 -0
  490. package/dist/state/entityCutover.js +294 -0
  491. package/dist/state/entityCutover.js.map +1 -0
  492. package/dist/state/entityCutoverGit.js +128 -0
  493. package/dist/state/entityCutoverGit.js.map +1 -0
  494. package/dist/state/entityMigrationCausality.js +99 -0
  495. package/dist/state/entityMigrationCausality.js.map +1 -0
  496. package/dist/state/entityMigrationPreview.js +864 -0
  497. package/dist/state/entityMigrationPreview.js.map +1 -0
  498. package/dist/state/entityPublicationContext.js +662 -0
  499. package/dist/state/entityPublicationContext.js.map +1 -0
  500. package/dist/state/entityStorage.js +881 -0
  501. package/dist/state/entityStorage.js.map +1 -0
  502. package/dist/state/experimentArchive.js +64 -0
  503. package/dist/state/experimentArchive.js.map +1 -0
  504. package/dist/state/experimentIdentity.js +203 -0
  505. package/dist/state/experimentIdentity.js.map +1 -0
  506. package/dist/state/experimentRetrieval.js +447 -0
  507. package/dist/state/experimentRetrieval.js.map +1 -0
  508. package/dist/state/healthEntities.js +266 -0
  509. package/dist/state/healthEntities.js.map +1 -0
  510. package/dist/state/healthEntityValidation.js +19 -0
  511. package/dist/state/healthEntityValidation.js.map +1 -0
  512. package/dist/state/healthRepair.js +70 -0
  513. package/dist/state/healthRepair.js.map +1 -0
  514. package/dist/state/installRoot.js +64 -24
  515. package/dist/state/installRoot.js.map +1 -1
  516. package/dist/state/legacyEntityCutoverEvidence.js +66 -0
  517. package/dist/state/legacyEntityCutoverEvidence.js.map +1 -0
  518. package/dist/state/legacyIdentity.js +48 -0
  519. package/dist/state/legacyIdentity.js.map +1 -0
  520. package/dist/state/legacySummaryRecord.js +7 -0
  521. package/dist/state/legacySummaryRecord.js.map +1 -0
  522. package/dist/state/listAccounting.js +55 -0
  523. package/dist/state/listAccounting.js.map +1 -0
  524. package/dist/state/listClassification.js +18 -0
  525. package/dist/state/listClassification.js.map +1 -0
  526. package/dist/state/listCursor.js +43 -0
  527. package/dist/state/listCursor.js.map +1 -0
  528. package/dist/state/listRetrieval.js +813 -0
  529. package/dist/state/listRetrieval.js.map +1 -0
  530. package/dist/state/migrationSourceBinding.js +31 -0
  531. package/dist/state/migrationSourceBinding.js.map +1 -0
  532. package/dist/state/objectiveExperimentEntities.js +323 -0
  533. package/dist/state/objectiveExperimentEntities.js.map +1 -0
  534. package/dist/state/planEntities.js +444 -0
  535. package/dist/state/planEntities.js.map +1 -0
  536. package/dist/state/planIdentity.js +45 -0
  537. package/dist/state/planIdentity.js.map +1 -0
  538. package/dist/state/planRetrieval.js +314 -0
  539. package/dist/state/planRetrieval.js.map +1 -0
  540. package/dist/state/planTaskRetrieval.js +285 -0
  541. package/dist/state/planTaskRetrieval.js.map +1 -0
  542. package/dist/state/progressEntities.js +360 -0
  543. package/dist/state/progressEntities.js.map +1 -0
  544. package/dist/state/projectRoot.js +63 -0
  545. package/dist/state/projectRoot.js.map +1 -0
  546. package/dist/state/projectionPolicy.js +184 -0
  547. package/dist/state/projectionPolicy.js.map +1 -0
  548. package/dist/state/retrievalAuthority.js +343 -0
  549. package/dist/state/retrievalAuthority.js.map +1 -0
  550. package/dist/state/safeProjectFile.js +153 -0
  551. package/dist/state/safeProjectFile.js.map +1 -0
  552. package/dist/state/startupAnalysis/benchmark.js +433 -0
  553. package/dist/state/startupAnalysis/benchmark.js.map +1 -0
  554. package/dist/state/startupAnalysis/contract.js +126 -0
  555. package/dist/state/startupAnalysis/contract.js.map +1 -0
  556. package/dist/state/startupAnalysis/helpers.js +287 -0
  557. package/dist/state/startupAnalysis/helpers.js.map +1 -0
  558. package/dist/state/startupAnalysis/index.js +7 -0
  559. package/dist/state/startupAnalysis/index.js.map +1 -0
  560. package/dist/state/startupAnalysis/metrics.js +341 -0
  561. package/dist/state/startupAnalysis/metrics.js.map +1 -0
  562. package/dist/state/startupAnalysis/records.js +199 -0
  563. package/dist/state/startupAnalysis/records.js.map +1 -0
  564. package/dist/state/startupAnalysis/report.js +112 -0
  565. package/dist/state/startupAnalysis/report.js.map +1 -0
  566. package/dist/state/startupAnalysis/threshold.js +513 -0
  567. package/dist/state/startupAnalysis/threshold.js.map +1 -0
  568. package/dist/state/startupAnalysis.js +2 -1952
  569. package/dist/state/startupAnalysis.js.map +1 -1
  570. package/dist/state/startupProjection.js +567 -0
  571. package/dist/state/startupProjection.js.map +1 -0
  572. package/dist/state/stateMode.js +83 -0
  573. package/dist/state/stateMode.js.map +1 -0
  574. package/dist/state/summaryEntityRead.js +26 -0
  575. package/dist/state/summaryEntityRead.js.map +1 -0
  576. package/dist/state/summaryMigrationProvenance.js +67 -0
  577. package/dist/state/summaryMigrationProvenance.js.map +1 -0
  578. package/dist/state/summarySourceRowAuthority.js +37 -0
  579. package/dist/state/summarySourceRowAuthority.js.map +1 -0
  580. package/dist/state/todoDocsEntities.js +230 -0
  581. package/dist/state/todoDocsEntities.js.map +1 -0
  582. package/dist/state/todoDocsEntityValidation.js +26 -0
  583. package/dist/state/todoDocsEntityValidation.js.map +1 -0
  584. package/dist/state/write/assign.js +21 -0
  585. package/dist/state/write/assign.js.map +1 -0
  586. package/dist/state/write/candidateMutation.js +281 -0
  587. package/dist/state/write/candidateMutation.js.map +1 -0
  588. package/dist/state/write/errors.js +12 -0
  589. package/dist/state/write/errors.js.map +1 -0
  590. package/dist/state/write/experimentPublication.js +193 -0
  591. package/dist/state/write/experimentPublication.js.map +1 -0
  592. package/dist/state/write/explain.js +291 -0
  593. package/dist/state/write/explain.js.map +1 -0
  594. package/dist/state/write/fields.js +62 -0
  595. package/dist/state/write/fields.js.map +1 -0
  596. package/dist/state/write/helpers.js +30 -0
  597. package/dist/state/write/helpers.js.map +1 -0
  598. package/dist/state/write/index.js +12 -0
  599. package/dist/state/write/index.js.map +1 -0
  600. package/dist/state/write/input.js +22 -0
  601. package/dist/state/write/input.js.map +1 -0
  602. package/dist/state/write/lock.js +838 -0
  603. package/dist/state/write/lock.js.map +1 -0
  604. package/dist/state/write/mutation.js +235 -0
  605. package/dist/state/write/mutation.js.map +1 -0
  606. package/dist/state/write/operations.js +353 -0
  607. package/dist/state/write/operations.js.map +1 -0
  608. package/dist/state/write/planEvaluation.js +121 -0
  609. package/dist/state/write/planEvaluation.js.map +1 -0
  610. package/dist/state/write/planPublication.js +135 -0
  611. package/dist/state/write/planPublication.js.map +1 -0
  612. package/dist/state/write/serialize.js +2 -0
  613. package/dist/state/write/serialize.js.map +1 -0
  614. package/dist/state/write/transaction.js +44 -0
  615. package/dist/state/write/transaction.js.map +1 -0
  616. package/dist/state/write/validate.js +8 -0
  617. package/dist/state/write/validate.js.map +1 -0
  618. package/dist/upgrade/appContentRefresh.js +384 -0
  619. package/dist/upgrade/appContentRefresh.js.map +1 -0
  620. package/dist/upgrade/appModel.js +8 -6
  621. package/dist/upgrade/appModel.js.map +1 -1
  622. package/dist/upgrade/atomicWriter.js +2 -0
  623. package/dist/upgrade/atomicWriter.js.map +1 -0
  624. package/dist/upgrade/bundleEvidence.js +34 -0
  625. package/dist/upgrade/bundleEvidence.js.map +1 -0
  626. package/dist/upgrade/channels.js +21 -10
  627. package/dist/upgrade/channels.js.map +1 -1
  628. package/dist/upgrade/coexistenceProbe.js +105 -0
  629. package/dist/upgrade/coexistenceProbe.js.map +1 -0
  630. package/dist/upgrade/compatibility.js +56 -20
  631. package/dist/upgrade/compatibility.js.map +1 -1
  632. package/dist/upgrade/doctor.js +197 -191
  633. package/dist/upgrade/doctor.js.map +1 -1
  634. package/dist/upgrade/doctorClassifier.js +188 -0
  635. package/dist/upgrade/doctorClassifier.js.map +1 -0
  636. package/dist/upgrade/installedHooksRetirement.js +197 -0
  637. package/dist/upgrade/installedHooksRetirement.js.map +1 -0
  638. package/dist/upgrade/legacyAgentCleanup.js +283 -0
  639. package/dist/upgrade/legacyAgentCleanup.js.map +1 -0
  640. package/dist/upgrade/lifecycleUpgrade.js +114 -0
  641. package/dist/upgrade/lifecycleUpgrade.js.map +1 -0
  642. package/dist/upgrade/migrateArtifactsV2ToV3.js +363 -137
  643. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  644. package/dist/upgrade/migrationPublication.js +123 -0
  645. package/dist/upgrade/migrationPublication.js.map +1 -0
  646. package/dist/upgrade/nextMajorDoctor.js +156 -0
  647. package/dist/upgrade/nextMajorDoctor.js.map +1 -0
  648. package/dist/upgrade/npxPlatformStatus.js +23 -0
  649. package/dist/upgrade/npxPlatformStatus.js.map +1 -0
  650. package/dist/upgrade/projectIntegration.js +142 -171
  651. package/dist/upgrade/projectIntegration.js.map +1 -1
  652. package/dist/upgrade/projectIntegrationDecision.js +51 -0
  653. package/dist/upgrade/projectIntegrationDecision.js.map +1 -0
  654. package/dist/upgrade/runtimeMigration.js +336 -281
  655. package/dist/upgrade/runtimeMigration.js.map +1 -1
  656. package/dist/upgrade/upgradeCommands.js +9 -0
  657. package/dist/upgrade/upgradeCommands.js.map +1 -1
  658. package/dist/upgrade/upgradeLock.js +86 -0
  659. package/dist/upgrade/upgradeLock.js.map +1 -0
  660. package/dist/upgrade/upgradeOrchestrator.js +212 -56
  661. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  662. package/dist/upgrade/v3CapabilitySurface.js +15 -0
  663. package/dist/upgrade/v3CapabilitySurface.js.map +1 -0
  664. package/dist/upgrade/versionResolution.js +12 -4
  665. package/dist/upgrade/versionResolution.js.map +1 -1
  666. package/dist/validate/appHomeContract.js +5 -9
  667. package/dist/validate/appHomeContract.js.map +1 -1
  668. package/dist/validate/capability.js +144 -14
  669. package/dist/validate/capability.js.map +1 -1
  670. package/dist/validate/crossCapability.js +12 -9
  671. package/dist/validate/crossCapability.js.map +1 -1
  672. package/dist/validate/selfAudit.js +73 -36
  673. package/dist/validate/selfAudit.js.map +1 -1
  674. package/dist/validate/vocabularyAuthority.js +303 -0
  675. package/dist/validate/vocabularyAuthority.js.map +1 -0
  676. package/package.json +45 -27
  677. package/bundle/references/adapters/cursor.md +0 -213
  678. package/bundle/references/adapters/opencode.md +0 -530
  679. package/bundle/references/adapters/runtime-adapter-characterization.md +0 -79
  680. package/bundle/references/adapters/runtime-adapter-interface-model.yaml +0 -200
  681. package/bundle/references/adapters/runtime-adapter-registry.yaml +0 -548
  682. package/bundle/references/adapters/runtime-feature-parity.md +0 -189
  683. package/bundle/references/v1-section-mapping.md +0 -47
  684. package/bundle/skills/agentera/.claude-plugin/plugin.json +0 -27
  685. package/bundle/skills/agentera/agents/dokumentera.toml +0 -6
  686. package/bundle/skills/agentera/agents/hej.toml +0 -6
  687. package/bundle/skills/agentera/agents/inspektera.toml +0 -6
  688. package/bundle/skills/agentera/agents/inspirera.toml +0 -6
  689. package/bundle/skills/agentera/agents/optimera.toml +0 -6
  690. package/bundle/skills/agentera/agents/orkestrera.toml +0 -6
  691. package/bundle/skills/agentera/agents/planera.toml +0 -6
  692. package/bundle/skills/agentera/agents/profilera.toml +0 -6
  693. package/bundle/skills/agentera/agents/realisera.toml +0 -6
  694. package/bundle/skills/agentera/agents/resonera.toml +0 -6
  695. package/bundle/skills/agentera/agents/visionera.toml +0 -6
  696. package/bundle/skills/agentera/agents/visualisera.toml +0 -6
  697. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +0 -428
  698. package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +0 -73
  699. package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +0 -35
  700. package/bundle/skills/agentera/capabilities/hej/instructions.md +0 -331
  701. package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +0 -69
  702. package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +0 -58
  703. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +0 -514
  704. package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +0 -76
  705. package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +0 -38
  706. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +0 -280
  707. package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +0 -24
  708. package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +0 -34
  709. package/bundle/skills/agentera/capabilities/optimera/instructions.md +0 -437
  710. package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +0 -39
  711. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +0 -433
  712. package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +0 -64
  713. package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +0 -42
  714. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +0 -107
  715. package/bundle/skills/agentera/capabilities/planera/instructions.md +0 -368
  716. package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +0 -62
  717. package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +0 -34
  718. package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +0 -61
  719. package/bundle/skills/agentera/capabilities/profilera/instructions.md +0 -419
  720. package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +0 -45
  721. package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +0 -57
  722. package/bundle/skills/agentera/capabilities/realisera/instructions.md +0 -403
  723. package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +0 -80
  724. package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +0 -39
  725. package/bundle/skills/agentera/capabilities/resonera/instructions.md +0 -329
  726. package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +0 -47
  727. package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +0 -46
  728. package/bundle/skills/agentera/capabilities/visionera/instructions.md +0 -309
  729. package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +0 -41
  730. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +0 -400
  731. package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +0 -33
  732. package/bundle/skills/hej/.claude-plugin/plugin.json +0 -6
  733. package/bundle/skills/hej/SKILL.md +0 -69
  734. package/bundle/skills/hej/agents/hej.toml +0 -11
  735. package/bundle/skills/hej/agents/openai.yaml +0 -8
  736. package/dist/cli/commands/backfill.js +0 -84
  737. package/dist/cli/commands/backfill.js.map +0 -1
  738. package/dist/cli/commands/state.js +0 -1012
  739. package/dist/cli/commands/state.js.map +0 -1
  740. package/dist/core/git.js +0 -43
  741. package/dist/core/git.js.map +0 -1
  742. package/dist/hooks/compaction.js +0 -935
  743. package/dist/hooks/compaction.js.map +0 -1
  744. package/dist/hooks/validateArtifact.js +0 -933
  745. package/dist/hooks/validateArtifact.js.map +0 -1
  746. package/dist/registries/runtimeAdapterRegistry.js +0 -315
  747. package/dist/registries/runtimeAdapterRegistry.js.map +0 -1
  748. package/dist/setup/copilot.js +0 -227
  749. package/dist/setup/copilot.js.map +0 -1
  750. package/dist/setup/cursor.js +0 -127
  751. package/dist/setup/cursor.js.map +0 -1
  752. package/dist/setup/doctor.js +0 -1276
  753. package/dist/setup/doctor.js.map +0 -1
  754. package/dist/state/progressCommit.js +0 -289
  755. package/dist/state/progressCommit.js.map +0 -1
  756. package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -571
  757. package/dist/upgrade/migrateArtifactsV1ToV2.js.map +0 -1
  758. package/dist/validate/lifecycleAdapters.js +0 -772
  759. package/dist/validate/lifecycleAdapters.js.map +0 -1
  760. /package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/exit.yaml +0 -0
  761. /package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/exit.yaml +0 -0
  762. /package/bundle/skills/agentera/capabilities/{hej → status}/schemas/exit.yaml +0 -0
@@ -0,0 +1,2167 @@
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
+ current numbered archive and retrieval groups remain migration input while
23
+ that marker is absent; no independent legacy repair mutation remains.
24
+
25
+ entity_target:
26
+ status: progress_decisions_health_plan_objective_experiment_todo_and_docs_implemented_other_families_declared
27
+ decision: 94
28
+ activation: >-
29
+ This target becomes active persisted and structured state authority only
30
+ after entity_migration publishes a validated entity graph and writes the marker
31
+ last. Before then, legacy aggregates
32
+ remain migration input and explicitly labelled migration-evidence writer state;
33
+ ordinary public reads fail with migration_required instead of exposing them.
34
+ implementation_status:
35
+ progress: implemented
36
+ decisions: implemented
37
+ health: implemented
38
+ plan: implemented
39
+ objective: implemented
40
+ experiments: implemented
41
+ todo: implemented
42
+ docs: implemented
43
+ remaining_families: declared_not_implemented
44
+ rule: >-
45
+ Every implemented family selects entity behavior only when the durable
46
+ cutover marker is valid. Marker-absent ordinary consumers fail with
47
+ migration_required; the read-only migration preview and readiness checks do
48
+ not create entity state or write both authorities.
49
+ public_schema:
50
+ canonical_identity_field: id
51
+ canonical_classification_field: artifact
52
+ identity_and_classification_fields: [id, artifact]
53
+ entity_envelope:
54
+ required_fields: [id, artifact, record]
55
+ additional_identity_or_classification_fields: forbidden
56
+ forbidden_canonical_aliases:
57
+ - stable_id
58
+ - artifact_id
59
+ - entry_number
60
+ - number
61
+ - task_number
62
+ - experiment_number
63
+ - plan_id
64
+ - objective_id
65
+ - type_prefixed_id
66
+ exemptions:
67
+ - historical prose and immutable historical evidence
68
+ - internal TypeScript variable names that are not persisted or public structured output
69
+ - current pre-cutover contracts explicitly marked as implemented legacy authority
70
+ public_retrieval:
71
+ schema_version: agentera.entityPublicRetrieval.v1
72
+ status: final
73
+ commands:
74
+ progress:
75
+ list: agentera state progress list [--limit N] [--cursor TOKEN] --format json
76
+ get: agentera state progress get --id ID --format json
77
+ decisions:
78
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] --format json
79
+ get: agentera state decisions get --id ID --format json
80
+ health:
81
+ list: agentera state health list [--limit N] [--cursor TOKEN] --format json
82
+ get: agentera state health get --id ID --format json
83
+ plans:
84
+ list: agentera state plan list [--status open|complete|archived] [--limit N] [--cursor TOKEN] --format json
85
+ get: agentera state plan get --id ID --format json
86
+ plan_tasks:
87
+ list: agentera state plan tasks list [--limit N] [--cursor TOKEN] --format json
88
+ get: agentera state plan tasks get --id ID --format json
89
+ objective:
90
+ list: agentera state objective list [--limit N] [--cursor TOKEN] --format json
91
+ get: agentera state objective get --id ID --format json
92
+ experiments:
93
+ list: agentera state experiments list --objective ID [--limit N] [--cursor TOKEN] --format json
94
+ get: agentera state experiments get --id ID --format json
95
+ todo:
96
+ list: agentera state todo list [--limit N] [--cursor TOKEN] --format json
97
+ get: agentera state todo get --id ID --format json
98
+ docs:
99
+ list: agentera state docs list [--limit N] [--cursor TOKEN] --format json
100
+ get: agentera state docs get --id ID --format json
101
+ collections:
102
+ - { artifact: progress, identity: id, classification: artifact }
103
+ - { artifact: decisions, identity: id, classification: artifact }
104
+ - { artifact: health, identity: id, classification: artifact }
105
+ - { artifact: plan, boundary: plan, identity: id, classification: artifact }
106
+ - { artifact: plan, boundary: plan_task, identity: id, classification: artifact }
107
+ - { artifact: objective, identity: id, classification: artifact }
108
+ - { artifact: experiments, identity: id, classification: artifact }
109
+ - { artifact: todo, identity: id, classification: artifact }
110
+ - { artifact: docs, identity: id, classification: artifact }
111
+ identity:
112
+ scope: project_wide_across_all_entity_artifacts
113
+ alphabet: abcdefghijklmnopqrstuvwxyz
114
+ length: 10
115
+ accepted_pattern: '^[a-z]{10}$'
116
+ example: qjtrmnpvka
117
+ allocation: random_from_declared_alphabet
118
+ collision_rule: retry before publication; an existing ID is never reassigned or overwritten
119
+ prohibited_components: [prefix, sequence, timestamp, branch, writer, git_reference]
120
+ meaning_rule: >-
121
+ The ID is opaque and carries no artifact or entity-boundary information;
122
+ artifact is the sole public classification field.
123
+ storage_boundary:
124
+ rule: one independently mutable entity per writer-owned canonical file
125
+ aggregate_authority: forbidden
126
+ shared_primitives:
127
+ status: implemented
128
+ canonical_root: .agentera/entities
129
+ canonical_path_template: .agentera/entities/<artifact>/<boundary>/<id>.yaml
130
+ path_components: [artifact, boundary, id]
131
+ extension: .yaml
132
+ publication: exclusive_immutable_file
133
+ publication_context:
134
+ scope: shared_by_all_entity_families
135
+ binding: validated_project_root_and_exact_cutover_marker_snapshot
136
+ lifetime: mode_detection_through_writer_lock_and_final_publication_validation
137
+ pathname_race_contract: >-
138
+ Entity publication is rooted through held directory descriptors. The
139
+ root and exact valid marker identity and bytes are revalidated before
140
+ each directory, stage, and immutable-link boundary and after durable
141
+ publication before success. Because Node cannot make pathname
142
+ validation and mutation one kernel operation, a detected substitution
143
+ rolls back only attempt-owned links, stages, and empty directories by
144
+ pinned identity; final failure retains no attempt-owned entity state.
145
+ marker_change_after_detection: conflict_without_legacy_fallback
146
+ successor_preservation: never_remove_unmatched_or_unrelated_identity
147
+ allocation: provisional_candidate_until_publication
148
+ project_wide_id_claim:
149
+ synchronization: .agentera/.writer.lock
150
+ critical_section: final_project_wide_scan_through_durable_publication
151
+ interrupted_writer_recovery: dead_process_lock_reclamation
152
+ persistent_reservation: none
153
+ identical_replay: idempotent
154
+ replay_equality: recursive_key_sorted_logical_content_with_array_order_preserved
155
+ divergent_same_id: reject_without_overwrite
156
+ state_validation:
157
+ canonical_command: agentera check validate state
158
+ mutates: false
159
+ failure_exit: nonzero
160
+ diagnostics: bounded_structured_with_exact_recovery
161
+ same_entity_conflict: >-
162
+ Concurrent divergent edits to one entity remain an ordinary explicit file
163
+ conflict or validation conflict; no runtime silently selects a winner.
164
+ unrelated_entity_merge: >-
165
+ Independently created or changed entities occupy distinct canonical files
166
+ so ordinary Git can preserve both changes.
167
+ entities:
168
+ - boundary: progress_cycle
169
+ artifact: progress
170
+ independently_mutable: true
171
+ relationships: []
172
+ implementation: implemented
173
+ record:
174
+ required_fields: [timestamp, type, phase, what, context]
175
+ required_paths: [context.intent]
176
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
177
+ temporal_fields: [timestamp]
178
+ timestamp_format: 'YYYY-MM-DD HH:MM'
179
+ retrieval:
180
+ exact: agentera state progress get --id ID --format json
181
+ list: agentera state progress list [--limit N] [--cursor TOKEN] --format json
182
+ ordering: timestamp_desc_then_id_asc
183
+ default_limit: 20
184
+ maximum_limit: 100
185
+ max_utf8_bytes: 32768
186
+ cursor: opaque_snapshot_cursor
187
+ mutation_after_snapshot: cursor_snapshot_unavailable
188
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
189
+ scalar_truncation: forbidden
190
+ - boundary: progress_summary
191
+ artifact: progress
192
+ independently_mutable: false
193
+ relationships: []
194
+ implementation: implemented
195
+ publication: immutable
196
+ mutation: forbidden
197
+ record:
198
+ required_fields: [summary, migration_provenance]
199
+ required_paths: []
200
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
201
+ canonical_metadata:
202
+ summary_migration_provenance:
203
+ path: record.migration_provenance
204
+ required_fields: [source_path, source_record_sha256]
205
+ additional_fields: forbidden
206
+ source_path: project-relative v2 aggregate source path
207
+ sources:
208
+ - path: .agentera/progress.yaml
209
+ collections: [cycles, archive]
210
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
211
+ - boundary: decision
212
+ artifact: decisions
213
+ independently_mutable: true
214
+ relationships: []
215
+ implementation: implemented
216
+ publication: immutable
217
+ record:
218
+ required_fields: [date, question, context, alternatives, choice, reasoning, confidence]
219
+ required_paths: []
220
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, satisfaction]
221
+ canonical_metadata:
222
+ migration_provenance:
223
+ applicability: inherited_unsupported_confidence_only
224
+ required_fields: [kind, source, source_path, source_record_sha256, confidence]
225
+ additional_fields: forbidden
226
+ kind: inherited_decision_confidence
227
+ sources: [current_projection, verified_archive]
228
+ semantics: >-
229
+ Cutover persists this envelope-level metadata only when an authority-backed
230
+ complete-record classifier proves that high, medium, or low confidence is
231
+ the source record's sole schema violation. confidence must match the
232
+ canonical record, source_path is project-relative, and source_record_sha256
233
+ binds the complete parsed source record before canonical alias removal.
234
+ Current confidence values and ordinary decision writes omit this metadata.
235
+ retrieval:
236
+ exact: agentera state decisions get --id ID --format json
237
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] --format json
238
+ ordering: date_desc_then_id_asc
239
+ default_limit: 20
240
+ maximum_limit: 100
241
+ max_utf8_bytes: 32768
242
+ cursor: opaque_snapshot_cursor
243
+ mutation_after_snapshot: cursor_snapshot_unavailable
244
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
245
+ scalar_truncation: forbidden
246
+ - boundary: decision_satisfaction
247
+ artifact: decisions
248
+ independently_mutable: true
249
+ relationships: [decision]
250
+ implementation: implemented
251
+ publication: replace_owned_entity
252
+ ownership: { fields: [decision], cardinality: zero_or_one }
253
+ record:
254
+ required_fields: [decision, state]
255
+ required_paths: []
256
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
257
+ - boundary: decision_summary
258
+ artifact: decisions
259
+ independently_mutable: false
260
+ relationships: []
261
+ implementation: implemented
262
+ publication: immutable
263
+ mutation: forbidden
264
+ record:
265
+ required_fields: [summary, migration_provenance]
266
+ required_paths: []
267
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
268
+ canonical_metadata:
269
+ summary_migration_provenance:
270
+ path: record.migration_provenance
271
+ required_fields: [source_path, source_record_sha256]
272
+ additional_fields: forbidden
273
+ source_path: project-relative v2 aggregate source path
274
+ sources:
275
+ - path: .agentera/decisions.yaml
276
+ collections: [decisions, archive]
277
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
278
+ satisfaction: optional_inline_read_only_source_retained_field
279
+ - boundary: decision_revision
280
+ artifact: decisions
281
+ independently_mutable: true
282
+ includes: [amendment]
283
+ relationships: [decision]
284
+ implementation: implemented
285
+ publication: immutable
286
+ ownership: { fields: [decision, base_sha256], cardinality: zero_or_one }
287
+ record:
288
+ required_fields: [decision, date, provenance, base_sha256, changes]
289
+ required_paths: []
290
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, satisfaction]
291
+ - boundary: health_audit
292
+ artifact: health
293
+ independently_mutable: true
294
+ relationships: []
295
+ implementation: implemented
296
+ publication: immutable
297
+ record:
298
+ required_fields: [date, dimensions, findings_summary, trajectory, grades]
299
+ required_paths: []
300
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
301
+ cli_owned_append_fields: [appended_at]
302
+ legacy_optional_fields: [appended_at]
303
+ field_contract:
304
+ appended_at:
305
+ format: canonical_utc_iso8601
306
+ assignment: cli_writer_at_append
307
+ compatibility: >-
308
+ Legacy canonical health audits omit appended_at and remain valid without
309
+ reconstructed chronology.
310
+ retrieval:
311
+ exact: agentera state health get --id ID --format json
312
+ list: agentera state health list [--limit N] [--cursor TOKEN] --format json
313
+ ordering: appended_at_desc_then_id_asc_then_legacy_date_desc_then_id_asc
314
+ default_limit: 20
315
+ maximum_limit: 100
316
+ max_utf8_bytes: 32768
317
+ cursor: opaque_snapshot_cursor
318
+ mutation_after_snapshot: cursor_snapshot_unavailable
319
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
320
+ scalar_truncation: forbidden
321
+ repair: >-
322
+ Canonical health audit entities are immutable and cannot be row-deduplicated.
323
+ Malformed envelopes, duplicate IDs, or conflicting ownership fail before effects
324
+ and recover through agentera check validate state; no repair event is fabricated.
325
+ - boundary: health_summary
326
+ artifact: health
327
+ independently_mutable: false
328
+ relationships: []
329
+ implementation: implemented
330
+ publication: immutable
331
+ mutation: forbidden
332
+ record:
333
+ required_fields: [summary, migration_provenance]
334
+ required_paths: []
335
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
336
+ canonical_metadata:
337
+ summary_migration_provenance:
338
+ path: record.migration_provenance
339
+ required_fields: [source_path, source_record_sha256]
340
+ additional_fields: forbidden
341
+ source_path: project-relative v2 aggregate source path
342
+ sources:
343
+ - path: .agentera/health.yaml
344
+ collections: [audits, archive]
345
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
346
+ - boundary: plan
347
+ artifact: plan
348
+ independently_mutable: true
349
+ relationships: []
350
+ implementation: implemented
351
+ publication: replace_owned_entity
352
+ record:
353
+ required_fields: [header, what, why, scope]
354
+ required_paths: [header.title, header.created, header.status]
355
+ forbidden_fields: [id, artifact, stable_id, plan_id, tasks, previous_plan_archived]
356
+ field_shapes:
357
+ scope:
358
+ type: mapping
359
+ required_fields:
360
+ included: string_list
361
+ excluded: string_list
362
+ optional_fields:
363
+ deferred: string_list
364
+ additional_fields: forbidden
365
+ legacy_source_normalization: >-
366
+ A block-style, non-flow, exactly-one-pair mapping used directly as
367
+ an included, excluded, or deferred sequence item is the historical
368
+ block-colon string encoding and normalizes to one `key: value`
369
+ string only when both source nodes are string scalars. Explicit
370
+ flow mapping syntax never normalizes and remains invalid under the
371
+ canonical validator. A deliberate block single-pair mapping is
372
+ syntactically indistinguishable from the legacy encoding and falls
373
+ under this source-form rule; no semantic intent is inferred.
374
+ retrieval:
375
+ exact: agentera state plan get --id ID --format json
376
+ list: agentera state plan list [--limit N] [--cursor TOKEN] --format json
377
+ ordering: created_desc_then_id_asc
378
+ default_limit: 20
379
+ maximum_limit: 100
380
+ max_utf8_bytes: 32768
381
+ cursor: opaque_snapshot_cursor
382
+ mutation_after_snapshot: cursor_snapshot_unavailable
383
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
384
+ scalar_truncation: forbidden
385
+ - boundary: plan_task
386
+ artifact: plan
387
+ independently_mutable: true
388
+ relationships: [plan, depends_on_tasks, superseded_by]
389
+ implementation: implemented
390
+ publication: replace_owned_entity
391
+ record:
392
+ required_fields: [plan, name, status, depends_on, acceptance]
393
+ required_paths: []
394
+ forbidden_fields: [id, artifact, number, task_number, stable_id, plan_id]
395
+ - boundary: objective
396
+ artifact: objective
397
+ independently_mutable: true
398
+ relationships: []
399
+ implementation: implemented
400
+ publication: replace_owned_entity
401
+ record:
402
+ required_fields: [header, objective, metric, baseline, scope]
403
+ required_paths: [header.title, header.status, objective.description, objective.measurement]
404
+ forbidden_fields: [id, artifact, stable_id, objective_id]
405
+ retrieval:
406
+ exact: agentera state objective get --id ID --format json
407
+ list: agentera state objective list [--limit N] [--cursor TOKEN] --format json
408
+ ordering: created_desc_then_id_asc
409
+ default_limit: 20
410
+ maximum_limit: 100
411
+ max_utf8_bytes: 32768
412
+ cursor: opaque_snapshot_cursor
413
+ mutation_after_snapshot: cursor_snapshot_unavailable
414
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
415
+ scalar_truncation: forbidden
416
+ - boundary: experiment
417
+ artifact: experiments
418
+ independently_mutable: true
419
+ relationships: [objective]
420
+ implementation: implemented
421
+ publication: immutable
422
+ baseline:
423
+ field: status
424
+ value: baseline
425
+ cardinality: exactly_one_when_experiments_exist
426
+ record:
427
+ required_fields: [objective, date, label, hypothesis, method, change, metric, regression, status, conclusion]
428
+ required_paths: [objective, date, label, status]
429
+ forbidden_fields: [id, artifact, number, experiment_number, stable_id, objective_id]
430
+ retrieval:
431
+ exact: agentera state experiments get --id ID --format json
432
+ list: agentera state experiments list --objective ID [--limit N] [--cursor TOKEN] --format json
433
+ ordering: date_desc_then_id_asc
434
+ default_limit: 20
435
+ maximum_limit: 100
436
+ max_utf8_bytes: 32768
437
+ cursor: opaque_snapshot_cursor
438
+ mutation_after_snapshot: cursor_snapshot_unavailable
439
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
440
+ scalar_truncation: forbidden
441
+ - boundary: todo_item
442
+ artifact: todo
443
+ independently_mutable: true
444
+ relationships: []
445
+ implementation: implemented
446
+ publication: replace_owned_entity
447
+ record:
448
+ required_fields: [severity, status, description]
449
+ required_paths: []
450
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, path]
451
+ retrieval:
452
+ exact: agentera state todo get --id ID --format json
453
+ list: agentera state todo list [--limit N] [--cursor TOKEN] --format json
454
+ ordering: severity_then_status_then_id
455
+ default_limit: 20
456
+ maximum_limit: 100
457
+ max_utf8_bytes: 32768
458
+ cursor: opaque_snapshot_cursor
459
+ mutation_after_snapshot: cursor_snapshot_unavailable
460
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
461
+ scalar_truncation: forbidden
462
+ - boundary: documentation_inventory_entry
463
+ artifact: docs
464
+ independently_mutable: true
465
+ relationships: []
466
+ implementation: implemented
467
+ publication: replace_owned_entity
468
+ record:
469
+ required_fields: [document, path, last_updated, status]
470
+ required_paths: []
471
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
472
+ retrieval:
473
+ exact: agentera state docs get --id ID --format json
474
+ list: agentera state docs list [--limit N] [--cursor TOKEN] --format json
475
+ ordering: path_then_id
476
+ default_limit: 20
477
+ maximum_limit: 100
478
+ max_utf8_bytes: 32768
479
+ cursor: opaque_snapshot_cursor
480
+ mutation_after_snapshot: cursor_snapshot_unavailable
481
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
482
+ scalar_truncation: forbidden
483
+ relationships:
484
+ representation: bare target entity ID in the named record field
485
+ integrity: every non-null target must resolve to exactly one entity with the declared target boundary
486
+ unresolved_behavior: whole-state validation and migration cutover fail without creating a target
487
+ declarations:
488
+ - source: decision_satisfaction
489
+ field: decision
490
+ target: decision
491
+ cardinality: exactly_one
492
+ - source: decision_revision
493
+ field: decision
494
+ target: decision
495
+ cardinality: exactly_one
496
+ - source: plan_task
497
+ field: plan
498
+ target: plan
499
+ cardinality: exactly_one
500
+ - source: plan_task
501
+ field: depends_on
502
+ target: plan_task
503
+ cardinality: zero_or_many_same_plan
504
+ - source: plan_task
505
+ field: superseded_by
506
+ target: plan_task
507
+ cardinality: zero_or_many_same_plan
508
+ - source: experiment
509
+ field: objective
510
+ target: objective
511
+ cardinality: exactly_one
512
+ views:
513
+ authority: non_authoritative_cli_rendering
514
+ mutation: forbidden
515
+ source: canonical entity files only after cutover
516
+ requirements:
517
+ - bounded lists expose id and artifact and provide exact get by id
518
+ - ordering and cursors bind to an explicit snapshot and never imply identity
519
+ - omissions expose counts, reasons, and exact retrieval commands
520
+ - nested plan/task and objective/experiment views are relationship projections
521
+ - startup views use the same entities and may omit detail only under declared budgets
522
+ intentional_singletons:
523
+ exhaustive: true
524
+ additions_require_authority_amendment: true
525
+ boundaries:
526
+ - boundary: vision
527
+ reason: one project north star; excluded from execution-cycle mutation
528
+ - boundary: design
529
+ reason: one project visual identity editorial artifact
530
+ - boundary: changelog
531
+ reason: one ordered release-history editorial artifact
532
+ - boundary: profile
533
+ reason: one reusable decision-profile document per selected profile
534
+ - boundary: runtime_local_session_state
535
+ reason: runtime-local and not canonical project entity state
536
+ - boundary: docs_mapping
537
+ reason: one project path and documentation-policy mapping, distinct from documentation inventory entries
538
+ conflict_rule: concurrent edits remain explicit whole-document conflicts
539
+ excluded_from_entity_migration:
540
+ - all intentional_singletons
541
+ - immutable historical prose and evidence, except structured references explicitly declared for rewrite
542
+ - genuinely singleton editorial artifacts added by an authority amendment
543
+ declared_compacted_summary_contract:
544
+ status: implemented
545
+ activation: >-
546
+ The three summary boundaries are active entity and migration authority in
547
+ entity_target.entities. Ordinary summary readers and startup projection
548
+ expose retained degraded history without reconstructing missing detail.
549
+ runtime_boundary_source: entity_target.entities
550
+ runtime_exclusion: >-
551
+ No experiment_summary boundary is activated. Summary boundaries are
552
+ immutable/read-only and are not ordinary write targets.
553
+ source_scope:
554
+ included_artifacts: [progress, decisions, health]
555
+ excluded_artifacts:
556
+ - objective_experiments: protected v2 family; not a compacted-summary migration input
557
+ - runtime_local_session_state: runtime-local state is outside canonical project migration
558
+ - compacted_todo_rows: already satisfy the canonical TODO shape and are not remapped as summaries
559
+ authority_rule: >-
560
+ This implemented scope does not reconstruct Git history, normalize source
561
+ summaries, retain dual authority, or provide a repair or import command.
562
+ source_row_provenance:
563
+ semantic_id: v2_compacted_summary_physical_row.v1
564
+ status: implemented
565
+ accepted_parsed_row_values: [mapping, scalar_string]
566
+ normalization: >-
567
+ Preview normalizes either accepted parsed physical row value to canonical
568
+ retained summary content for matching and publication. A mapping retains
569
+ its source fields subject to canonical alias removal and declared metadata
570
+ injection; a scalar string becomes {summary: value}.
571
+ source_record_sha256:
572
+ format: lowercase_sha256_hex
573
+ input: >-
574
+ original parsed physical source row value, which may be a mapping or a
575
+ scalar string, before summary normalization, canonical alias removal, or
576
+ metadata injection
577
+ canonicalization: >-
578
+ SHA-256 of UTF-8 canonical JSON: recursively sort mapping keys, preserve
579
+ array order, serialize scalar strings with JSON.stringify, and emit no
580
+ insignificant whitespace.
581
+ diagnostics:
582
+ status: implemented
583
+ implementation: >-
584
+ Read-only migration preview classifies independent invalid source
585
+ identities as roots, then reports generated graph dependents separately.
586
+ Ordinary summary reads and startup do not expose these migration-only
587
+ fields.
588
+ counts:
589
+ blockers: total root_blockers plus dependent_blockers
590
+ root_blockers: independently invalid, ambiguous, conflicting, or unsupported source identities
591
+ dependent_blockers: >-
592
+ Downstream diagnostics caused by a named root blocker. Each dependent names
593
+ its root source identity and does not increase root corruption.
594
+ dependent_blocker_required_fields: [root_source_identity]
595
+ corruption_count: corrupt classification counts source roots only, never generated dependents
596
+ graph: >-
597
+ A resolved relationship to a root (including a chain) is a dependent
598
+ blocker. Missing references make their owning source a root. Cycles with
599
+ no source root choose their lexicographically first source identity as a
600
+ deterministic corrupt root; preview does not attempt graph recovery.
601
+ source_outcomes:
602
+ status: implemented
603
+ valid_compacted_summary:
604
+ outcome: ready_with_degraded_provenance
605
+ rule: >-
606
+ Map each valid supported v2 summary to its declared immutable summary
607
+ boundary, retain source fields and migration provenance, and never
608
+ reconstruct missing detail.
609
+ missing_detail_not_declared_summary:
610
+ outcome: blocked
611
+ rule: retain evidence and stop before publication; never infer omitted fields
612
+ inherited_confidence_only:
613
+ outcome: ready_with_legacy_caveat
614
+ rule: >-
615
+ Preserve an inherited full-decision high, medium, or low label exactly and
616
+ report its caveat. Only new or amended labels must use the current strict
617
+ vocabulary.
618
+ boundaries:
619
+ - boundary: progress_summary
620
+ artifact: progress
621
+ independently_mutable: false
622
+ implementation: implemented
623
+ publication: immutable
624
+ mutation: forbidden
625
+ canonical_representation: one_immutable_degraded_summary_entity_per_valid_v2_summary
626
+ relationships: []
627
+ record:
628
+ required_fields: [summary, migration_provenance]
629
+ additional_fields: source_retained_fields_plus_declared_metadata
630
+ declared_metadata_fields: [migration_provenance]
631
+ source_retained_fields: >-
632
+ Preserve every source-retained field in the canonical record except
633
+ public_schema.forbidden_canonical_aliases. migration_provenance is
634
+ declared canonical metadata, not a retained source field. Missing
635
+ full-detail fields remain absent; migration does not normalize or
636
+ reconstruct them.
637
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
638
+ migration_provenance:
639
+ path: record.migration_provenance
640
+ required_fields: [source_path, source_record_sha256]
641
+ additional_fields: forbidden
642
+ source_path: project-relative v2 aggregate source path
643
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
644
+ retrieval:
645
+ exact: agentera state progress get --id ID --format json
646
+ list: agentera state progress list [--limit N] [--cursor TOKEN] --format json
647
+ detail_availability: summary
648
+ compatibility: degraded
649
+ caveats: required
650
+ ordering: full_timestamp_desc_then_id_asc_then_summary_id_asc
651
+ summary_ordering: canonical_id_asc_without_chronology_claim
652
+ mutation: read_only
653
+ - boundary: decision_summary
654
+ artifact: decisions
655
+ independently_mutable: false
656
+ implementation: implemented
657
+ publication: immutable
658
+ mutation: forbidden
659
+ canonical_representation: one_immutable_degraded_summary_entity_per_valid_v2_summary
660
+ relationships: []
661
+ record:
662
+ required_fields: [summary, migration_provenance]
663
+ additional_fields: source_retained_fields_plus_declared_metadata
664
+ declared_metadata_fields: [migration_provenance]
665
+ source_retained_fields: >-
666
+ Preserve every source-retained field in the canonical record except
667
+ public_schema.forbidden_canonical_aliases. migration_provenance is
668
+ declared canonical metadata, not a retained source field. Missing
669
+ full-detail fields remain absent; migration does not normalize or
670
+ reconstruct them.
671
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
672
+ satisfaction: optional_inline_read_only_source_retained_field
673
+ satisfaction_rule: >-
674
+ Satisfaction may be absent. When retained, it remains inline and read-only;
675
+ a decision summary never creates or targets a decision_satisfaction entity.
676
+ migration_provenance:
677
+ path: record.migration_provenance
678
+ required_fields: [source_path, source_record_sha256]
679
+ additional_fields: forbidden
680
+ source_path: project-relative v2 aggregate source path
681
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
682
+ retrieval:
683
+ exact: agentera state decisions get --id ID --format json
684
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] --format json
685
+ detail_availability: summary
686
+ compatibility: degraded
687
+ caveats: required
688
+ ordering: full_date_desc_then_id_asc_then_summary_id_asc
689
+ summary_ordering: canonical_id_asc_without_chronology_claim
690
+ mutation: read_only
691
+ - boundary: health_summary
692
+ artifact: health
693
+ independently_mutable: false
694
+ implementation: implemented
695
+ publication: immutable
696
+ mutation: forbidden
697
+ canonical_representation: one_immutable_degraded_summary_entity_per_valid_v2_summary
698
+ relationships: []
699
+ record:
700
+ required_fields: [summary, migration_provenance]
701
+ additional_fields: source_retained_fields_plus_declared_metadata
702
+ declared_metadata_fields: [migration_provenance]
703
+ source_retained_fields: >-
704
+ Preserve every source-retained field in the canonical record except
705
+ public_schema.forbidden_canonical_aliases. migration_provenance is
706
+ declared canonical metadata, not a retained source field. Missing
707
+ full-detail fields remain absent; migration does not normalize or
708
+ reconstruct them.
709
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
710
+ migration_provenance:
711
+ path: record.migration_provenance
712
+ required_fields: [source_path, source_record_sha256]
713
+ additional_fields: forbidden
714
+ source_path: project-relative v2 aggregate source path
715
+ source_row_provenance: entity_target.declared_compacted_summary_contract.source_row_provenance
716
+ retrieval:
717
+ exact: agentera state health get --id ID --format json
718
+ list: agentera state health list [--limit N] [--cursor TOKEN] --format json
719
+ detail_availability: summary
720
+ compatibility: degraded
721
+ caveats: required
722
+ ordering: full_date_desc_then_id_asc_then_summary_id_asc
723
+ summary_ordering: canonical_id_asc_without_chronology_claim
724
+ mutation: read_only
725
+ measurement_contract:
726
+ status: implemented
727
+ environment: Linux, Node.js 22 or newer, one cold CLI process per sample
728
+ fixtures:
729
+ small: 100 valid entities distributed across every active entity_target.entities boundary
730
+ large: 1000 valid entities distributed across every active entity_target.entities boundary
731
+ relationship_rule: every active entity_target.relationships declaration has at least one valid fixture edge
732
+ sampling:
733
+ repetitions: 5
734
+ pass_rule: every repetition stays within every applicable limit
735
+ elapsed: wall-clock milliseconds from process start through complete serialized output
736
+ heap: process heapUsed peak minus heapUsed before fixture discovery
737
+ bytes: UTF-8 byte length of stdout including the trailing newline
738
+ targets:
739
+ exact_get:
740
+ max_latency_ms: 1000
741
+ max_heap_delta_bytes: 67108864
742
+ max_utf8_bytes: 1048576
743
+ bounded_list_small:
744
+ max_latency_ms: 5000
745
+ max_heap_delta_bytes: 67108864
746
+ max_utf8_bytes: 32768
747
+ bounded_list_large:
748
+ max_latency_ms: 15000
749
+ max_heap_delta_bytes: 268435456
750
+ max_utf8_bytes: 32768
751
+ startup_small:
752
+ max_latency_ms: 5000
753
+ max_heap_delta_bytes: 67108864
754
+ serialized_limits: budgets.startup.surfaces
755
+ startup_large:
756
+ max_latency_ms: 15000
757
+ max_heap_delta_bytes: 268435456
758
+ serialized_limits: budgets.startup.surfaces
759
+ failure_rule: >-
760
+ Over-budget results fail the target gate. They may return a measured
761
+ degraded envelope only where the referenced budget permits omission; they
762
+ never truncate bytes, omit required identity, or fabricate detail.
763
+
764
+ entity_migration:
765
+ status: one_way_forward_import_implemented
766
+ decision: 94
767
+ kind: single_full_upgrade_cutover
768
+ cutover_marker:
769
+ path: .agentera/state-mode.yaml
770
+ schema_version: agentera.stateMode.v1
771
+ entity_mode:
772
+ schemaVersion: agentera.stateMode.v1
773
+ mode: entities
774
+ absent_mode: legacy
775
+ invalid_behavior: fail_without_fallback
776
+ detection: read_only
777
+ publication_owner: development_channel_v2_to_v3_upgrade
778
+ selection: >-
779
+ Project state and CLI installation state are independent dimensions. A v3
780
+ CLI selects this cutover for recognized marker-absent v2 aggregate state
781
+ whether the CLI runs from a self-contained npm package or a source
782
+ checkout. Pending v1 Markdown state and marker-absent state with no
783
+ recognized v2 entity input are rejected with manual recovery instructions.
784
+ invocation:
785
+ explicit_apply: full_upgrade_yes_only
786
+ dry_run: optional_read_only_preview
787
+ ordinary_reads_migrate: false
788
+ ordinary_writes_migrate: false
789
+ apply_invokes_git: true
790
+ read_only_command: >-
791
+ npx -y agentera@next upgrade --channel development --project "$PWD" --dry-run
792
+ apply_command: >-
793
+ npx -y agentera@next upgrade --channel development --project "$PWD" --yes
794
+ apply_boundary: >-
795
+ Full upgrade serializes through the project writer lock, validates the
796
+ deterministic conversion, writes each missing canonical entity or accepts
797
+ an exact existing match, validates the complete graph, and writes the
798
+ authority marker last. There is no direct
799
+ entity apply, public operation ID, resume, rollback, or cross-major restore.
800
+ git_preflight:
801
+ required: true
802
+ project_root: exact_worktree_root
803
+ source: HEAD_commit
804
+ checkout: no_staged_modified_renamed_or_untracked_paths_except_exact_cutover_outputs
805
+ migration_inputs: regular_tracked_files_whose_bytes_and_executable_mode_match_HEAD
806
+ absent_input: absent_from_HEAD_and_worktree
807
+ ignored_or_untracked_input: refuse
808
+ verification: >-
809
+ Planning and apply resolve the current HEAD commit and prove every present
810
+ migration input is a safe regular tracked path whose bytes and executable
811
+ mode match that commit. Apply repeats the proof under the writer lock
812
+ before its first effect. Non-Git projects and dirty or unsupported source
813
+ state are refused before any selected upgrade effect.
814
+ upgrade_composition:
815
+ owner: development_channel_v2_to_v3_upgrade
816
+ selected_with: [full]
817
+ apply_consent: >-
818
+ The upgrade --yes consent derives all source and target bindings in
819
+ process. Users provide no hashes, approval files, migration IDs, --force,
820
+ or additional cutover consent. Any --only apply is rejected at this
821
+ cross-major boundary.
822
+ interruption: >-
823
+ A rerun recomputes the deterministic conversion from unchanged Git-bound
824
+ source, accepts existing canonical targets only when their bytes match,
825
+ writes the first missing target, validates the complete graph, and finishes
826
+ the marker forward. It never deletes or replaces canonical entities.
827
+ completed: >-
828
+ A valid entity marker makes legacy authority permanently inactive.
829
+ Repeated upgrade validates current entity state and reports a no-op;
830
+ normal entity writes may evolve records without reopening cutover.
831
+ preflight: >-
832
+ Upgrade plans artifact normalization, entity readiness, runtime work,
833
+ and cleanup read-only before any selected apply function runs. A detect,
834
+ artifact, or entity blocker prevents entity publication and activation.
835
+ Runtime or cleanup blockers do not prevent valid entity activation; their
836
+ resources remain untouched and are reported after the marker as
837
+ action-required work.
838
+ phase_filters: >-
839
+ Every --only apply is invalid during a v2-to-v3 boundary. Read-only
840
+ filtered preview may remain available.
841
+ legacy_projection: >-
842
+ Canonical v2 YAML and already-resolved v1 conversions are inventoried
843
+ directly. A pending v1 Markdown conversion is not projected through a
844
+ prerequisite write during planning and therefore blocks the composed
845
+ apply before effects.
846
+ lifecycle_normalization: >-
847
+ Deterministic legacy plan lifecycle normalization is part of entity
848
+ projection during cutover. Upgrade retains the original legacy YAML as
849
+ source and recovery evidence instead of rewriting it first.
850
+ empty_state: unsupported_unknown_source_with_manual_handoff
851
+ existing_entity_state: validate_then_no_op
852
+ source_scope:
853
+ included_entities: entity_target.entities
854
+ included_structured_relationships: entity_target.relationships.declarations
855
+ preserved_singletons: entity_target.intentional_singletons.boundaries
856
+ sources: >-
857
+ Current canonical files, verified immutable archives, overlays, revisions,
858
+ and validated source evidence are inventoried together without changing
859
+ their pre-cutover authority. Every present input must be recoverable from
860
+ the pinned Git commit.
861
+ recovered_projection_correlation: >-
862
+ Every archive carrying recovery_provenance must match the immutable
863
+ .agentera/archive/recovery/projection-correlation.yaml recovery set by
864
+ identity, archive bytes, final record SHA-256, parent/child Git proof or
865
+ legacy converter/source proof, current projection bytes, and overlay.
866
+ Missing, changed, new, replaced, or unlisted recovery evidence blocks.
867
+ internal_migration_diagnostic: true
868
+ read_only_preview:
869
+ implementation: implemented
870
+ ordering: artifact_then_boundary_then_source_identity_then_source_path
871
+ filter: complete_declared_inventory
872
+ source_fingerprint: >-
873
+ SHA-256 over canonical JSON containing every declared source path's
874
+ project-relative name, presence, byte length, byte SHA-256, permission
875
+ mode, regular-file type, device, and inode from one verified open
876
+ descriptor. Missing declared roots are represented explicitly with null
877
+ identity. No mtime, Git value, or cache participates.
878
+ project_root: >-
879
+ The selected root must exist, be a directory, and resolve without a
880
+ symbolic-link root or symbolic-link traversal. Failure is structured and
881
+ occurs before inventory or effects.
882
+ recursive_roots: >-
883
+ Every declared archive and objective inventory root is lstat-validated
884
+ before traversal and again when recursion enters it. Existing symbolic
885
+ links and non-directories are project-bound inventory failures; their
886
+ targets are never inventoried.
887
+ authority_binding: >-
888
+ The preview records the active state-storage authority schema version and
889
+ byte SHA-256. The complete preview digest includes both values, so any
890
+ authority-only change invalidates approval before an apply effect.
891
+ proposed_id: >-
892
+ Preview-only ten-letter candidates are deterministically allocated from a
893
+ domain-separated SHA-256 of the complete source fingerprint and canonical
894
+ source key. This is allocation of a new opaque target candidate, not
895
+ reconstruction of a missing source ID. A collision is a blocker. Apply
896
+ preserves the deterministic mapping in each canonical target path.
897
+ preview_digest: >-
898
+ SHA-256 over canonical JSON of the complete unbounded inventory, proposed
899
+ mapping, authority-validated final envelope byte SHA-256 values,
900
+ relationship rewrite map, counts, blockers, and source
901
+ fingerprint plus the project selector, complete-source filter, declared
902
+ order, and migration-authority binding before output omission.
903
+ target_validation: >-
904
+ Before preview can be ready or produce an approvable digest, every proposed
905
+ final envelope, record, public field vocabulary, and relationship graph is
906
+ validated through the same authority-backed canonical target validator used
907
+ defensively by upgrade apply and forward retry. A target failure is a corrupt blocker tied
908
+ to its source identity and recovery action; preserved nonentity residues are
909
+ excluded from target validation and publication.
910
+ output:
911
+ max_utf8_bytes: 32768
912
+ default_limit: 100
913
+ maximum_limit: 1000
914
+ omission: whole entries and diagnostics only
915
+ scalar_truncation: forbidden
916
+ required_omission_fields: [omitted, omitted_count, omission_reason, retrieval]
917
+ recovery: >-
918
+ --after SOURCE_IDENTITY advances from the last whole logical identity
919
+ returned only when accompanied by that page's --source-fingerprint and
920
+ --preview-digest. The digest binds the project selector, complete-source
921
+ filter, authority-declared order, migration authority, and complete
922
+ source snapshot. Any mismatch refuses continuation with a command that
923
+ omits --after and restarts from the current snapshot. Diagnostics travel
924
+ with their owning entry, so repeated use of retrieval.command recovers
925
+ every later omitted entry and diagnostic.
926
+ counts:
927
+ physical_records: every observed record before identity grouping
928
+ logical_identities: every source identity after grouping
929
+ mirrors: excess canonical-identical physical records grouped under one logical identity
930
+ duplicates: excess divergent physical records claiming one logical identity
931
+ conflicts: logical identities with divergent candidates plus proposed-target collisions
932
+ root_blockers: independently invalid source identities, counted once per source identity
933
+ dependent_blockers: generated relationship-to-root diagnostics, each carrying root_source_identity
934
+ blockers: root_blockers plus dependent_blockers
935
+ zero_write: >-
936
+ Inventory, preview, malformed-input handling, and source-binding checks
937
+ open no writer or upgrade lock and create no directory, temporary file,
938
+ mapping, snapshot, journal, cache, or state file.
939
+ binding: >-
940
+ Before any apply effect, recompute the complete preview and require its
941
+ source fingerprint and preview digest to match the Git-pinned preparation.
942
+ A mismatch refuses every selected effect.
943
+ source_outcomes:
944
+ valid_full:
945
+ outcome: ready
946
+ rule: map one complete validated source entity and every relationship exactly once
947
+ canonical_mirror:
948
+ outcome: ready_with_mirrored_provenance
949
+ rule: group canonical-identical physical records as one logical identity and retain every provenance class
950
+ degraded_recoverable:
951
+ outcome: ready_with_provenance
952
+ rule: admit only independently validated full detail and record its recovery provenance
953
+ valid_compacted_summary:
954
+ outcome: ready_with_degraded_provenance
955
+ rule: preserve retained summary fields and source-record provenance without reconstructing omitted detail
956
+ missing_detail_not_declared_summary:
957
+ outcome: blocked
958
+ rule: retain evidence and stop before publication; never reconstruct omitted fields
959
+ ambiguous_or_duplicate_identity:
960
+ outcome: blocked
961
+ rule: retain every candidate and require explicit disposition; never choose by order or recency
962
+ proposed_target_conflict:
963
+ outcome: blocked
964
+ rule: retain every colliding logical identity and allocate no winner
965
+ corrupt_or_unresolved_relationship:
966
+ outcome: blocked
967
+ rule: report the exact source and recovery action; never publish a partial graph
968
+ unsupported:
969
+ outcome: blocked
970
+ rule: preserve bytes and report the unsupported source contract
971
+ non_fabrication:
972
+ forbidden:
973
+ - synthetic entities for missing source detail
974
+ - inferred IDs from order, numbers, paths, timestamps, branches, writers, or Git references
975
+ - guessed relationship targets
976
+ - silent dropping, deduplication, or winner selection
977
+ partial_cutover_success: forbidden
978
+ forward_state:
979
+ persisted_recovery_state: none
980
+ publication_order: exact_or_missing_entities_then_graph_validation_then_marker
981
+ retry_rule: accept_exact_targets_and_continue_at_first_missing_path
982
+ divergent_target: stop_without_replacement_and_name_first_unresolved_path
983
+ forbidden_fields: [operation_id, migration_id, snapshots, source_bytes, inode_receipts, rollback_state]
984
+ historical_evidence: >-
985
+ Already committed .agentera/migrations content is inert and remains
986
+ byte-for-byte untouched. Read-only legacy manifest parsing is retained only
987
+ for public validation of entity markers created by the former cutover.
988
+ fault_test_hook: >-
989
+ Tests may set NODE_ENV=test and
990
+ AGENTERA_FAULT_INJECT_ENTITY_MIGRATION_AFTER_PHASE to one declared publication
991
+ phase. Other environments ignore the variable.
992
+ lifecycle:
993
+ - phase: inventory
994
+ mutates: false
995
+ exit: every source entity and relationship is classified
996
+ - phase: preview
997
+ mutates: false
998
+ exit: proposed graph, mapping, outcomes, blockers, and digest are complete
999
+ - phase: git_preflight
1000
+ mutates: false
1001
+ exit: project root, HEAD, clean checkout, source bytes, types, and modes match
1002
+ - phase: publishing_entities
1003
+ mutates: true
1004
+ exit: every canonical target is an exact match or is published once
1005
+ - phase: entities_published
1006
+ mutates: false
1007
+ exit: canonical source-to-target parity, uniqueness, ownership, relationships, and budgets pass
1008
+ - phase: marker
1009
+ mutates: true
1010
+ exit: one durable marker activates entity_target and retires writable legacy authority
1011
+
1012
+ scope:
1013
+ supported_artifacts:
1014
+ - artifact_id: progress
1015
+ current_projection_path: .agentera/progress.yaml
1016
+ entry_collection: cycles
1017
+ entry_number_field: number
1018
+ entry_kind: cycle
1019
+ - artifact_id: decisions
1020
+ current_projection_path: .agentera/decisions.yaml
1021
+ entry_collection: decisions
1022
+ entry_number_field: number
1023
+ entry_kind: decision
1024
+ - artifact_id: health
1025
+ current_projection_path: .agentera/health.yaml
1026
+ entry_collection: audits
1027
+ entry_number_field: number
1028
+ entry_kind: audit
1029
+ excluded_from_numbered_archive:
1030
+ - plan
1031
+ - vision
1032
+ - todo
1033
+ - changelog
1034
+ - docs
1035
+ - design
1036
+ - objective
1037
+ - experiments
1038
+
1039
+ retrieval:
1040
+ schema_version: agentera.stateRetrievalAuthority.v1
1041
+ status: plan_task_plan_and_experiment_retrieval_implemented
1042
+ implementation:
1043
+ plan_tasks: implemented
1044
+ plans: implemented
1045
+ experiments: implemented
1046
+ progress: implemented
1047
+ decisions: implemented
1048
+ health: implemented
1049
+ authority_boundary: >-
1050
+ This group owns public list/get envelopes, cursors, selectors, identities,
1051
+ omissions, and structured retrieval failures. It does not replace storage
1052
+ ownership: canonical entity files remain authoritative after the durable
1053
+ cutover marker; retained v2 aggregates are immutable migration evidence only.
1054
+ envelope:
1055
+ schema_version: agentera.stateRetrieval.v1
1056
+ required_fields:
1057
+ - schemaVersion
1058
+ - command
1059
+ - status
1060
+ - entries
1061
+ - counts
1062
+ - order
1063
+ - filters
1064
+ - snapshot
1065
+ - source
1066
+ - source_contract
1067
+ entry_required_fields:
1068
+ - id
1069
+ - artifact
1070
+ - boundary
1071
+ - detail_availability
1072
+ - compatibility
1073
+ - provenance
1074
+ - retrieval
1075
+ summary_boundary_entries:
1076
+ visibility: >-
1077
+ Progress, decision, and health list/get reads include both the full
1078
+ boundary and its corresponding immutable summary boundary under the
1079
+ same artifact vocabulary.
1080
+ full: { detail_availability: full, compatibility: current }
1081
+ summary:
1082
+ detail_availability: summary
1083
+ compatibility: degraded
1084
+ required_fields: [boundary, caveats, record.migration_provenance]
1085
+ provenance: record_level_summary_migration_provenance
1086
+ mutation: immutable_read_only
1087
+ ordering: >-
1088
+ Summary rows without a full-record temporal sort field sort after
1089
+ timestamped or dated full rows and then by canonical ID ascending.
1090
+ counts_required_fields: [total, returned, remaining, omitted]
1091
+ status_values: [ok, degraded]
1092
+ cursor:
1093
+ vocabulary: opaque_snapshot_cursor
1094
+ first_page: omit --cursor
1095
+ response_field: next_cursor
1096
+ binding: [collection, selectors, filters, order, snapshot]
1097
+ append_behavior: >-
1098
+ Records added after the first page are excluded from that cursor snapshot.
1099
+ Experiment cursors bind each original stable identity to immutable archive
1100
+ content when available, so unchanged full-to-summary or summary-to-drop
1101
+ projection rollover does not invalidate continuation. Without sufficient
1102
+ immutable or retained detail to prove an original identity unchanged, the
1103
+ cursor fails with cursor_snapshot_unavailable.
1104
+ invalid_behavior: cursor_invalid
1105
+ unavailable_behavior: cursor_snapshot_unavailable
1106
+ caller_rules: [do_not_parse, do_not_construct, do_not_compare_internals]
1107
+ omission:
1108
+ required_when_any_entry_is_not_returned:
1109
+ - omitted
1110
+ - omitted_count
1111
+ - omission_reason
1112
+ - retrieval
1113
+ semantics: >-
1114
+ Omission is explicit in both text and structured output. A response never
1115
+ silently slices a collection, truncates a scalar, or claims omitted detail
1116
+ is unavailable. Every omitted addressable item has an advancing cursor or
1117
+ exact get command; unaddressable legacy items retain compatibility
1118
+ diagnostics and are never assigned fabricated history.
1119
+ output_bounds:
1120
+ maximum_limit: 100
1121
+ max_serialized_utf8_bytes: 32768
1122
+ scalar_truncation: forbidden
1123
+ omission_unit: whole_entries
1124
+ identity:
1125
+ plan:
1126
+ canonical_format: 'plan:<lowercase-rfc9562-uuid>'
1127
+ persistence: stored in header.id when a plan is first published
1128
+ transition: the identical ID is copied unchanged into the immutable archive file
1129
+ legacy_format: 'legacy-plan:<sha256>'
1130
+ legacy_derivation: >-
1131
+ SHA-256 over RFC 8785 canonical JSON of the complete plan after the
1132
+ existing read-compatibility normalization of legacy status and task
1133
+ shape. The archive transition computes identity from the same normalized
1134
+ document before publication. Derivation is read-only and never rewrites
1135
+ active or archived bytes; a legacy identity may change while an active
1136
+ legacy plan is edited because no persisted historical identity exists.
1137
+ test_vectors:
1138
+ - canonical_json: '{"header":{"created":"2026-07-14","status":"open","title":"Plan: Complete bounded retrieval"},"tasks":[]}'
1139
+ stable_id: legacy-plan:b6f93d6fc5a0ac3ada017670ac311794ad92800fb436703f8f09e25ddce8b89a
1140
+ mirrored_example_paths: [.agentera/archive/PLAN-copy-a.yaml, .agentera/archive/PLAN-copy-b.yaml]
1141
+ identical_result: mirrored_provenance
1142
+ collision: >-
1143
+ Byte-equivalent normalized legacy plans are one logical identity with
1144
+ every physical path retained as mirrored provenance. Different plan
1145
+ documents carrying the same persisted ID, or a detected digest collision,
1146
+ are unaddressable; list reports compatibility=degraded and get returns
1147
+ ambiguous with every candidate provenance path. The CLI never chooses by
1148
+ mtime, archive filename, or discovery order.
1149
+ task:
1150
+ format: '<plan-id>/task:<positive-integer>'
1151
+ selector: --task N
1152
+ scope: task numbers are unique only inside one plan identity
1153
+ objective:
1154
+ canonical_format: 'objective:<lowercase-rfc9562-uuid>'
1155
+ persistence: stored in header.id and unchanged by title or directory rename
1156
+ canonical_root: .agentera/optimize/<objective-slug>
1157
+ legacy_root: .agentera/optimera/<objective-slug>
1158
+ legacy_format: 'legacy-objective:<sha256>'
1159
+ legacy_derivation: >-
1160
+ SHA-256 over RFC 8785 canonical JSON of the legacy objective's description,
1161
+ measurement, metric, baseline, gates, constraints, and scope; title,
1162
+ status, closure fields, directory root, and directory slug are excluded.
1163
+ This preserves identity across a title/path-only rename without rewriting
1164
+ history. Editing identity inputs may change a legacy identity and is
1165
+ reported as degraded compatibility.
1166
+ test_vectors:
1167
+ - canonical_json: '{"baseline":{"description":"100 ms"},"constraints":[],"description":"Reduce latency","gates":{},"measurement":"p95","metric":{"direction":"minimize","unit":"ms"},"scope":{"excluded":[],"included":["CLI"]}}'
1168
+ title_variants: [CLI latency, Faster CLI]
1169
+ root_variants: [.agentera/optimize/cli-latency, .agentera/optimera/faster-cli]
1170
+ stable_id: legacy-objective:aa987d92dadce65b8b2d8f54c741a10f5d024d864cb0ef309b4321b4e19e4ceb
1171
+ path_compatibility: >-
1172
+ Read both optimize and optimera roots. Identical records carrying one
1173
+ persisted objective ID are mirrored provenance. Different records with
1174
+ the same persisted or derived ID, or unresolved candidates in both roots,
1175
+ return ambiguous; canonical-root preference must not hide a collision.
1176
+ experiment:
1177
+ format: '<objective-id>/experiment:<non-negative-integer>'
1178
+ scope: experiment numbers are unique only within one objective identity
1179
+ zero: experiment 0 is valid and is normally the baseline
1180
+ collision: duplicate numbers inside one objective are ambiguous and never resolved by array order
1181
+ compatibility: >-
1182
+ Legacy full-detail or 10/40/50 summary entries with a missing or
1183
+ duplicate number remain visible in reads with addressable=false and an
1184
+ explicit compatibility caveat. Reads do not assign a number, choose a
1185
+ duplicate by array order, migrate a root, or rewrite retained bytes.
1186
+ publication_validation: >-
1187
+ Before any publication effect, require one unambiguous objective
1188
+ identity, a non-negative integer number, and no retained full-detail or
1189
+ summary entry with that number. Ambiguous canonical/legacy objective
1190
+ candidates, missing objective identity, and duplicate experiment
1191
+ identity fail validation without changing bytes.
1192
+ publication:
1193
+ command: agentera state experiments publish --objective OBJECTIVE_ID --number N --input EXPERIMENT.yaml --format json
1194
+ authority: typed_state_writer
1195
+ archive_ownership: experiment_archival
1196
+ storage_scope: objective_directory
1197
+ publication_order: archive_before_projection
1198
+ projection_policy: uniform_10_40_50
1199
+ input: one schema-valid experiment entry without the CLI-owned number field
1200
+ identity_assignment: the CLI assigns the validated --number to the published entry
1201
+ collision_rule: >-
1202
+ An existing matching identity and byte-equivalent experiment is an
1203
+ idempotent replay; the same identity with different content is a
1204
+ collision and leaves the projection unchanged.
1205
+ transaction: >-
1206
+ Validate objective identity, canonical/legacy ambiguity, experiment
1207
+ identity, existing projection schema, caller input schema, and final
1208
+ projection bytes before atomically replacing experiments.yaml.
1209
+ failure_atomicity: >-
1210
+ Validation, staging, and pre-publication failures preserve both active
1211
+ and one-line archive bytes. An interruption after atomic replacement
1212
+ may report failure after publication; retrying the same command must
1213
+ return the already-published entry without duplication.
1214
+ scope_boundary: >-
1215
+ Publication preserves the existing 10/40/50 projection contract and
1216
+ durably publishes its objective-scoped immutable archive before
1217
+ replacing the projection, as owned by experiment_archival.
1218
+ commands:
1219
+ plan_tasks:
1220
+ list: agentera state plan tasks list [--plan PLAN_ID] [--limit N] [--cursor TOKEN] --format json
1221
+ get: agentera state plan tasks get [--plan PLAN_ID] --task N --format json
1222
+ selectors:
1223
+ plan:
1224
+ list_required: false
1225
+ list_default: active plan resolved once and returned as filters.plan
1226
+ get_required: false
1227
+ get_default: active plan resolved once and returned in the response source
1228
+ pattern: '^(plan:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|legacy-plan:[0-9a-f]{64})$'
1229
+ task:
1230
+ get_required: true
1231
+ pattern: '^[1-9][0-9]*$'
1232
+ plans:
1233
+ list: agentera state plan list [--limit N] [--cursor TOKEN] --format json
1234
+ get: agentera state plan get --plan PLAN_ID --format json
1235
+ selectors:
1236
+ plan:
1237
+ get_required: true
1238
+ pattern: '^(plan:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|legacy-plan:[0-9a-f]{64})$'
1239
+ experiments:
1240
+ list: agentera state experiments list --objective OBJECTIVE_ID [--limit N] [--cursor TOKEN] --format json
1241
+ get: agentera state experiments get --objective OBJECTIVE_ID --number N --format json
1242
+ publish: agentera state experiments publish --objective OBJECTIVE_ID --number N --input EXPERIMENT.yaml --format json
1243
+ selectors:
1244
+ objective:
1245
+ list_required: true
1246
+ get_required: true
1247
+ pattern: '^(objective:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|legacy-objective:[0-9a-f]{64})$'
1248
+ number:
1249
+ get_required: true
1250
+ pattern: '^(0|[1-9][0-9]*)$'
1251
+ failures:
1252
+ schema_version: agentera.stateFailure.v1
1253
+ required_fields: [class, message, syntax, example, recovery]
1254
+ classes:
1255
+ invalid_request: malformed, duplicate, missing, or incompatible selector
1256
+ unsupported_artifact: collection is not exposed by the requested grammar
1257
+ not_found: a valid exact identity has no matching record
1258
+ ambiguous: legacy derivation, duplicate identity, or path compatibility has multiple candidates
1259
+ corrupt: selected state cannot be parsed or validated safely
1260
+ incomplete: selected record exists but required detail is unavailable
1261
+ cursor_invalid: cursor is malformed or bound to different selectors, filters, collection, or order
1262
+ cursor_snapshot_unavailable: the exact cursor snapshot cannot be resumed
1263
+ unsupported_state: authority cannot return a safe bounded envelope
1264
+ exit_codes:
1265
+ usage: 2
1266
+ state_or_compatibility_failure: 1
1267
+ legacy_diagnostic_rule: >-
1268
+ Compatibility failures include candidate provenance and a working recovery
1269
+ command but never synthesize an ID, objective scope, task, experiment, or
1270
+ archive event.
1271
+ collections:
1272
+ - collection_id: progress.records
1273
+ artifact_id: progress
1274
+ growth: append_only_unbounded
1275
+ identity: 'progress:<positive-entry-number>'
1276
+ storage_ownership: immutable_numbered_archive_with_bounded_current_projection
1277
+ ordering: entry_number_desc
1278
+ bounds: count_1_to_100_and_serialized_utf8_budget
1279
+ cursor: opaque_snapshot_cursor
1280
+ omission: explicit_with_advancing_cursor_or_exact_get
1281
+ get: agentera state progress get --number N --format json
1282
+ - collection_id: decisions.records
1283
+ artifact_id: decisions
1284
+ growth: append_only_unbounded_with_declared_mutable_overlay
1285
+ identity: 'decisions:<positive-entry-number>'
1286
+ storage_ownership: immutable_numbered_archive_plus_decision_overlay_with_bounded_current_projection
1287
+ ordering: entry_number_desc
1288
+ bounds: count_1_to_100_and_serialized_utf8_budget
1289
+ cursor: opaque_snapshot_cursor
1290
+ omission: explicit_with_advancing_cursor_or_exact_get
1291
+ get: agentera state decisions get --number N --format json
1292
+ - collection_id: health.records
1293
+ artifact_id: health
1294
+ growth: append_only_unbounded
1295
+ identity: 'health:<positive-entry-number>'
1296
+ storage_ownership: immutable_numbered_archive_with_bounded_current_projection
1297
+ ordering: entry_number_desc
1298
+ bounds: count_1_to_100_and_serialized_utf8_budget
1299
+ cursor: opaque_snapshot_cursor
1300
+ omission: explicit_with_advancing_cursor_or_exact_get
1301
+ get: agentera state health get --number N --format json
1302
+ - collection_id: plan.plans
1303
+ artifact_id: plan
1304
+ growth: one_active_plus_append_only_immutable_file_archives
1305
+ identity: retrieval.identity.plan
1306
+ storage_ownership: active_plan_file_and_immutable_plan_archive_files
1307
+ ordering: created_desc_then_plan_id_asc
1308
+ bounds: count_1_to_100_and_serialized_utf8_budget
1309
+ cursor: opaque_snapshot_cursor
1310
+ omission: explicit_with_advancing_cursor_or_exact_get
1311
+ get: retrieval.commands.plans.get
1312
+ - collection_id: plan.tasks
1313
+ artifact_id: plan
1314
+ growth: mutable_while_plan_active_then_immutable_with_archived_plan
1315
+ identity: retrieval.identity.task
1316
+ storage_ownership: owning_active_plan_file
1317
+ ordering: task_number_asc
1318
+ bounds: count_1_to_100_and_serialized_utf8_budget
1319
+ cursor: opaque_snapshot_cursor
1320
+ omission: explicit_with_advancing_cursor_or_exact_get
1321
+ get: retrieval.commands.plan_tasks.get
1322
+ - collection_id: experiments.records
1323
+ artifact_id: experiments
1324
+ growth: append_only_objective_scoped_with_10_full_40_summary_50_projection
1325
+ identity: retrieval.identity.experiment
1326
+ storage_ownership: objective_scoped_durable_records_and_bounded_10_40_50_projection
1327
+ ordering: experiment_number_desc
1328
+ bounds: count_1_to_100_serialized_utf8_budget_and_projection_10_40_50
1329
+ cursor: opaque_snapshot_cursor
1330
+ omission: explicit_with_advancing_cursor_or_exact_get_or_legacy_unavailable_diagnostic
1331
+ get: retrieval.commands.experiments.get
1332
+ - collection_id: todo.items
1333
+ artifact_id: todo
1334
+ growth: bounded_current_working_set_with_resolved_compaction
1335
+ identity: absent_legacy_markdown_item_identity
1336
+ storage_ownership: TODO.md
1337
+ ordering: severity_then_document_order
1338
+ bounds: 10_open_40_resolved_summary_50_total_projection
1339
+ cursor: none_not_publicly_pageable
1340
+ omission: current_query_must_report_omission_but_exact_get_is_unavailable
1341
+ get: unsupported_no_stable_identity
1342
+ - collection_id: docs.entries
1343
+ artifact_id: docs
1344
+ growth: bounded_document_inventory
1345
+ identity: canonical_document_path_when_present
1346
+ storage_ownership: .agentera/docs.yaml_or_docs_mapping
1347
+ ordering: document_order
1348
+ bounds: artifact_budget_and_projection_output_budget
1349
+ cursor: none_not_publicly_pageable
1350
+ omission: current_query_must_report_omission_but_exact_get_is_unavailable
1351
+ get: unsupported_no_public_get
1352
+ - collection_id: changelog.entries
1353
+ artifact_id: changelog
1354
+ growth: append_only_public_release_history
1355
+ identity: absent_markdown_entry_identity
1356
+ storage_ownership: CHANGELOG.md
1357
+ ordering: document_order_newest_release_first
1358
+ bounds: no_collection_page_contract
1359
+ cursor: none_not_publicly_pageable
1360
+ omission: query_result_may_be_filtered_but_must_not_claim_exact_retrieval
1361
+ get: unsupported_no_stable_identity
1362
+ non_collections:
1363
+ - artifact_id: vision
1364
+ behavior: singleton_document_no_list_or_get_grammar
1365
+ - artifact_id: design
1366
+ behavior: singleton_document_no_list_or_get_grammar
1367
+ - artifact_id: objective
1368
+ behavior: one_selected_objective_document; identity is only a required experiments selector in this task
1369
+ - artifact_id: plan_archive
1370
+ behavior: storage special case represented publicly by plan.plans
1371
+ - artifact_id: optimize_harness
1372
+ behavior: local harness storage, not public state retrieval
1373
+ gap_closure_evidence:
1374
+ - surface: agentera state plan --format json / plans
1375
+ declared_gap: PLAN_HISTORY_CATALOG_LIMIT capped catalog rows without collection-level omission recovery
1376
+ outcome: closed
1377
+ 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
1378
+ - surface: agentera state plan --format json / source.archive_paths
1379
+ declared_gap: archive paths were capped at 10 with only an omitted count and no stable recovery
1380
+ outcome: closed
1381
+ closure: source reports archive_paths_omitted, archive_paths_omitted_count, archive_paths_omission_reason, and plan list/get recovery instead of requiring path traversal
1382
+ - surface: agentera state plan text / tasks
1383
+ declared_gap: legacy text projection capped tasks at 10 and needed explicit whole-record omission recovery
1384
+ outcome: closed
1385
+ 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
1386
+ - surface: agentera state plan --format json / tasks
1387
+ declared_gap: structured plan projection needed deterministic whole-task byte omission and public recovery
1388
+ outcome: closed
1389
+ 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
1390
+ - surface: legacy agentera state experiments projection
1391
+ declared_gap: the pre-list/get projection is objective-selected rather than a stable cross-objective collection
1392
+ outcome: out_of_scope
1393
+ closure: objective-scoped experiments list/get is the supported retrieval surface; adding identity or pagination to the legacy projection would duplicate that contract
1394
+ plan_archive_diagnostics:
1395
+ classification: pre_existing_compatibility_caveat
1396
+ smoke_test_behavior: >-
1397
+ A lifecycle diagnostic on an unrelated archived plan degrades list/catalog
1398
+ status and remains visible, but does not fail exact retrieval of a different
1399
+ valid plan. Exact get fails only when the selected candidate is invalid,
1400
+ corrupt, or ambiguous. Read-only smoke tests assert diagnostics and never
1401
+ repair or rewrite archive history.
1402
+ known_live_diagnostics:
1403
+ - plan-2026-06-04-d56-parity-closeout.yaml
1404
+ - plan-2026-07-08-cliDistributionMajor-secondary-signal.yaml
1405
+
1406
+ consumer_matrix:
1407
+ status: active_authority
1408
+ purpose: >-
1409
+ Mechanically account for every capability source and bundled artifact-schema
1410
+ consumer of numbered decisions, progress, and health state. The artifact
1411
+ schemas remain the role authority; this matrix binds each declared consumer
1412
+ to the bounded startup and exact retrieval contracts below.
1413
+ source_root: packages/cli/src/capabilities/<capability>/instructions.ts
1414
+ bundle_root: skills/agentera/capabilities/<capability>/schemas/artifacts.yaml
1415
+ required_capabilities:
1416
+ - status
1417
+ - vision
1418
+ - discuss
1419
+ - research
1420
+ - plan
1421
+ - build
1422
+ - optimize
1423
+ - audit
1424
+ - document
1425
+ - profile
1426
+ - design
1427
+ - orchestrate
1428
+ access_contract:
1429
+ startup: agentera prime --context <capability> --format json
1430
+ list: agentera state <artifact-id> list --limit 20 --format json
1431
+ get: agentera state <artifact> get --id ID --format json
1432
+ policy: >-
1433
+ Use the bounded prime context first, then the bounded state list for
1434
+ discovery and exact state get for requested detail. Raw artifact or Git
1435
+ traversal is not a normal consumer path; it is allowed only for a named
1436
+ corruption or CLI-defect diagnostic exception, and must preserve missing,
1437
+ ambiguous, compacted, and satisfaction-incomplete provenance.
1438
+ capabilities:
1439
+ - name: status
1440
+ source: packages/cli/src/capabilities/status/instructions.ts
1441
+ bundle: skills/agentera/capabilities/status/schemas/artifacts.yaml
1442
+ state_consumers: [decisions, progress, health]
1443
+ - name: vision
1444
+ source: packages/cli/src/capabilities/vision/instructions.ts
1445
+ bundle: skills/agentera/capabilities/vision/schemas/artifacts.yaml
1446
+ state_consumers: [decisions, progress, health]
1447
+ - name: discuss
1448
+ source: packages/cli/src/capabilities/discuss/instructions.ts
1449
+ bundle: skills/agentera/capabilities/discuss/schemas/artifacts.yaml
1450
+ state_consumers: [decisions]
1451
+ - name: research
1452
+ source: packages/cli/src/capabilities/research/instructions.ts
1453
+ bundle: skills/agentera/capabilities/research/schemas/artifacts.yaml
1454
+ state_consumers: []
1455
+ - name: plan
1456
+ source: packages/cli/src/capabilities/plan/instructions.ts
1457
+ bundle: skills/agentera/capabilities/plan/schemas/artifacts.yaml
1458
+ state_consumers: [decisions, progress, health]
1459
+ - name: build
1460
+ source: packages/cli/src/capabilities/build/instructions.ts
1461
+ bundle: skills/agentera/capabilities/build/schemas/artifacts.yaml
1462
+ state_consumers: [decisions, progress, health]
1463
+ - name: optimize
1464
+ source: packages/cli/src/capabilities/optimize/instructions.ts
1465
+ bundle: skills/agentera/capabilities/optimize/schemas/artifacts.yaml
1466
+ state_consumers: [decisions, progress]
1467
+ - name: audit
1468
+ source: packages/cli/src/capabilities/audit/instructions.ts
1469
+ bundle: skills/agentera/capabilities/audit/schemas/artifacts.yaml
1470
+ state_consumers: [decisions, progress, health]
1471
+ - name: document
1472
+ source: packages/cli/src/capabilities/document/instructions.ts
1473
+ bundle: skills/agentera/capabilities/document/schemas/artifacts.yaml
1474
+ state_consumers: [decisions, progress, health]
1475
+ - name: profile
1476
+ source: packages/cli/src/capabilities/profile/instructions.ts
1477
+ bundle: skills/agentera/capabilities/profile/schemas/artifacts.yaml
1478
+ state_consumers: [decisions]
1479
+ - name: design
1480
+ source: packages/cli/src/capabilities/design/instructions.ts
1481
+ bundle: skills/agentera/capabilities/design/schemas/artifacts.yaml
1482
+ state_consumers: [progress]
1483
+ - name: orchestrate
1484
+ source: packages/cli/src/capabilities/orchestrate/instructions.ts
1485
+ bundle: skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml
1486
+ state_consumers: [decisions, progress, health]
1487
+ unchanged_archive_conventions:
1488
+ plan:
1489
+ location: .agentera/archive/plan-*.yaml
1490
+ role: existing plan lifecycle archive
1491
+ numbered_entry_discovery: forbidden
1492
+ execution: archived plans remain historical and non-executable
1493
+ vision:
1494
+ location: .agentera/archive/vision-*.yaml
1495
+ role: existing replace-mode vision archive
1496
+ numbered_entry_discovery: forbidden
1497
+ format: unchanged
1498
+
1499
+ experiment_archival:
1500
+ status: implemented
1501
+ authority_boundary: >-
1502
+ This is an objective-scoped full-detail publication archive for new
1503
+ experiments. It is not part of the numbered archive authority, does not
1504
+ migrate experiments into .agentera/archive, and does not reconstruct
1505
+ detail already dropped by legacy projection compaction.
1506
+ layout:
1507
+ path_template: .agentera/<objective-root>/<objective>/archive/experiments/<experiment-number>.yaml
1508
+ canonical_objective_root: optimize
1509
+ readable_legacy_objective_roots: [optimera]
1510
+ ownership: objective_directory
1511
+ path_override: forbidden
1512
+ identity:
1513
+ stable_id: '<objective-id>/experiment:<non-negative-integer>'
1514
+ path_selector: experiment_number
1515
+ objective_binding: envelope.objective_id must equal the resolved objective header.id
1516
+ content_binding: record.number must equal envelope.experiment_number
1517
+ envelope:
1518
+ schema_version: agentera.experimentArchive.v1
1519
+ required_fields:
1520
+ - schemaVersion
1521
+ - stable_id
1522
+ - objective_id
1523
+ - experiment_number
1524
+ - record
1525
+ - record_sha256
1526
+ - provenance
1527
+ provenance_required_fields: [authority, objective_id, experiment_id, storage_scope, publication_order]
1528
+ authority: references/artifacts/state-storage-authority.yaml
1529
+ hash: sha256_of_canonical_record_json
1530
+ publication:
1531
+ order:
1532
+ - validate_objective_identity
1533
+ - validate_full_experiment_record
1534
+ - validate_archive_envelope
1535
+ - stage_and_compact_projection
1536
+ - create_and_fsync_each_missing_archive_directory_entry
1537
+ - publish_and_fsync_immutable_archive
1538
+ - replace_and_fsync_projection
1539
+ archive_before_projection: true
1540
+ mutation_policy: no_overwrite_after_publication
1541
+ retry_policy: >-
1542
+ Byte-equivalent envelope bytes at the same stable identity are an
1543
+ idempotent replay. Different bytes at that identity are an immutable
1544
+ conflict and preserve both archive and projection bytes.
1545
+ interruption_policy: >-
1546
+ Failure before archive publication leaves archive and projection
1547
+ unchanged. Failure after durable archive publication may leave the new
1548
+ archive with the old projection; retry reuses that archive and publishes
1549
+ the projection without duplicating detail.
1550
+ directory_durability: >-
1551
+ Each newly created archive path component is followed by fsync of its
1552
+ parent before publication advances. In particular, creating the
1553
+ experiments directory requires fsync of the archive directory before an
1554
+ experiment record can be considered durably published.
1555
+ exact_full_replay_recovery: >-
1556
+ If the projection already contains the byte-equivalent full record but
1557
+ its required archive is absent, publication reconstructs that one archive
1558
+ from the exact retained detail before returning replay success. Summary-
1559
+ only and dropped legacy detail remain unavailable and are never inferred.
1560
+ projection:
1561
+ policy: uniform_10_40_50
1562
+ full_entries: 10
1563
+ summary_entries: 40
1564
+ total_entries: 50
1565
+ archive_effect: none
1566
+ compatibility:
1567
+ legacy_projection_records: readable_without_archive
1568
+ pre_feature_dropped_detail: unavailable_and_never_fabricated
1569
+
1570
+ storage:
1571
+ project_root:
1572
+ fixed: true
1573
+ resolution: >-
1574
+ The caller's selected project root. The archive is project-local and is
1575
+ never resolved through AGENTERA_HOME, a profile directory, XDG data, or a
1576
+ docs.yaml path override.
1577
+ archive_root: .agentera/archive
1578
+ archive_path_template: .agentera/archive/<artifact-id>/<entry-number>.yaml
1579
+ path_override: forbidden
1580
+ project_boundary: >-
1581
+ The resolved archive path and every parent must remain beneath the
1582
+ selected project root. URI paths, traversal segments, encoded traversal,
1583
+ and symlink escapes are invalid.
1584
+ archive:
1585
+ record_type: immutable_numbered_entry
1586
+ supported_artifact_directories: [progress, decisions, health]
1587
+ filename:
1588
+ entry_number: positive_integer
1589
+ canonical_form: base-10 decimal without a leading plus sign or leading zero
1590
+ accepted_pattern: '^[1-9][0-9]*$'
1591
+ directory_name: artifact_id
1592
+ extension: .yaml
1593
+ publication_order: archive_before_projection
1594
+ mutation_policy: no_overwrite_after_publication
1595
+ retry_policy: >-
1596
+ An identical artifact_id, entry_number, and canonical record is an
1597
+ idempotent replay. The same identity with different canonical content is
1598
+ an immutable conflict and must not replace existing bytes.
1599
+ discovery_policy: >-
1600
+ Only the exact supported path template is eligible. Malformed names,
1601
+ unsupported artifact directories, symlinks, duplicate logical identities,
1602
+ invalid envelopes, and hash mismatches are not valid records.
1603
+
1604
+ identity:
1605
+ stable_id:
1606
+ format: <artifact-id>:<entry-number>
1607
+ accepted_pattern: '^(progress|decisions|health):[1-9][0-9]*$'
1608
+ example: decisions:53
1609
+ components:
1610
+ artifact_id: one of the supported artifact values declared by scope
1611
+ entry_number: positive integer from the artifact's entry_number_field
1612
+ uniqueness: stable_id is unique within one project archive
1613
+ ordering:
1614
+ list: entry_number descending, numerically rather than lexicographically
1615
+ tie_breaker: stable_id ascending (defensive only; numbers are unique per artifact)
1616
+ get: exact stable_id match; no topic or summary scan is a substitute
1617
+ legacy_rows:
1618
+ canonical_number: >-
1619
+ A positive entry_number field, or an artifact-labelled summary beginning
1620
+ with Cycle N, Decision N, Audit N, or the decisions-only shorthand DNN.
1621
+ The number is accepted only from that explicit position; arbitrary prose
1622
+ and nested values never establish identity.
1623
+ unaddressable: >-
1624
+ A physical current or legacy-summary row without one explicit number.
1625
+ It is list-only and uses stable_id: null and entry_number: null; no
1626
+ synthetic number, position, or inferred reference is permitted.
1627
+ ambiguous: >-
1628
+ A row containing multiple explicit decision shorthands such as
1629
+ Staging D3+D4. It remains list-only with stable_id: null and is never
1630
+ assigned the first or most recent shorthand.
1631
+ physical_accounting: >-
1632
+ physical counts raw current rows, current archive-summary rows, and
1633
+ validated or rejected numbered archive files. addressable counts those
1634
+ physical rows carrying one explicit number; unaddressable and ambiguous
1635
+ partition the remaining physical rows. addressable_ids counts unique
1636
+ stable-ID groups. mirrored, duplicate, and conflict are non-additive
1637
+ redundancy classifications over addressable rows; omitted counts rows
1638
+ not emitted on the current bounded page.
1639
+
1640
+ envelope:
1641
+ schema_version: agentera.stateArchiveEntry.v1
1642
+ required_fields:
1643
+ - schemaVersion
1644
+ - artifact_id
1645
+ - entry_number
1646
+ - record
1647
+ - record_sha256
1648
+ field_contract:
1649
+ schemaVersion: exact string agentera.stateArchiveEntry.v1
1650
+ artifact_id: supported artifact ID matching the archive directory
1651
+ entry_number: positive integer matching the filename and record identity field
1652
+ record: complete pre-projection entry, not a compact summary
1653
+ record_sha256: lowercase SHA-256 of the canonical record bytes
1654
+ canonical_record:
1655
+ encoding: UTF-8
1656
+ serialization: canonical JSON with recursively sorted object keys and no whitespace
1657
+ arrays: preserve source order
1658
+ hash_input: record only, excluding the envelope
1659
+ identity_checks:
1660
+ - envelope.artifact_id matches the parent artifact directory
1661
+ - envelope.entry_number matches the filename
1662
+ - envelope.entry_number matches record.<artifact entry_number_field>
1663
+ - record_sha256 matches canonical_record
1664
+ forbidden_fields:
1665
+ - commit
1666
+ - commit_hash
1667
+ - git_commit
1668
+ - git_ref
1669
+ - parent_commit
1670
+ provenance_rule: >-
1671
+ Git provenance is durability evidence returned by a later diagnostic
1672
+ surface, never per-entry commit bookkeeping and never part of immutable
1673
+ record identity.
1674
+
1675
+ overlays:
1676
+ location: .agentera/overlays/decisions.yaml
1677
+ project_root_fixed: true
1678
+ docs_yaml_override: forbidden
1679
+ schema_version: agentera.decisionOverlay.v1
1680
+ supported_artifact: decisions
1681
+ identity_key: decisions:<decision-number>
1682
+ storage_shape: >-
1683
+ A mapping keyed by stable decision ID. Each value contains only the
1684
+ authority-declared mutable paths and never replaces the immutable archive
1685
+ record.
1686
+ mutable_paths:
1687
+ - satisfaction.state
1688
+ - satisfaction.evidence
1689
+ - satisfaction.user_confirmation.confirmed_by
1690
+ - satisfaction.user_confirmation.confirmed_at
1691
+ derived_paths:
1692
+ - satisfaction.review_needed
1693
+ - satisfaction.source
1694
+ - satisfaction.caveats
1695
+ immutable_paths:
1696
+ - number
1697
+ - date
1698
+ - question
1699
+ - context
1700
+ - alternatives
1701
+ - choice
1702
+ - reasoning
1703
+ - confidence
1704
+ - feeds_into
1705
+ state_values: [open, provisionally_satisfied, user_confirmed_satisfied]
1706
+ transition_rules:
1707
+ open:
1708
+ allowed_next: [open, provisionally_satisfied, user_confirmed_satisfied]
1709
+ provisional_requires: non_empty_satisfaction.evidence
1710
+ confirmed_requires: explicit_current_user_confirmation_metadata
1711
+ provisionally_satisfied:
1712
+ allowed_next: [open, provisionally_satisfied, user_confirmed_satisfied]
1713
+ provisional_requires: non_empty_satisfaction.evidence
1714
+ confirmed_requires: explicit_current_user_confirmation_metadata
1715
+ user_confirmed_satisfied:
1716
+ allowed_next: [user_confirmed_satisfied]
1717
+ downgrade: forbidden_without_explicit_current_user_confirmation
1718
+ decision_53_rules:
1719
+ missing_satisfaction: valid legacy state; derive review_needed=true
1720
+ open: review_needed=true
1721
+ provisional: review_needed=true until explicit user confirmation
1722
+ confirmed: review_needed=false only with confirmed_by and confirmed_at
1723
+ inference: forbidden from commits, downstream references, summaries, or Git history
1724
+ protected_review: unresolved decisions remain visible and never block archive storage
1725
+
1726
+ revisions:
1727
+ location: .agentera/revisions/decisions.yaml
1728
+ project_root_fixed: true
1729
+ docs_yaml_override: forbidden
1730
+ schema_version: agentera.decisionRevision.v1
1731
+ supported_artifact: decisions
1732
+ identity_key: decisions:<decision-number>
1733
+ storage_shape: >-
1734
+ A mapping keyed by stable decision ID. Each value is an ordered list of
1735
+ immutable revision records carrying only authority-declared amendable
1736
+ content paths plus revision provenance. A revision never replaces the
1737
+ immutable numbered archive record and never replaces the satisfaction
1738
+ overlay; it is additional immutable evidence composed at read time.
1739
+ amendable_paths:
1740
+ - question
1741
+ - context
1742
+ - alternatives
1743
+ - choice
1744
+ - reasoning
1745
+ - confidence
1746
+ - feeds_into
1747
+ identity_paths:
1748
+ - number
1749
+ temporal_paths:
1750
+ - date
1751
+ separation_from_overlay: >-
1752
+ Amendments never touch satisfaction overlay paths. Satisfaction updates
1753
+ remain under overlays; content amendments remain under revisions. Each
1754
+ authority composes its own evidence and neither rewrites the other.
1755
+ immutability: >-
1756
+ Original numbered archive records remain immutable historical evidence.
1757
+ Revisions are additional immutable evidence appended in declared order;
1758
+ no revision overwrites, reorders, or deletes a prior revision. A revision
1759
+ is byte-stable after publication and an identical revision is an
1760
+ idempotent replay.
1761
+ provenance: >-
1762
+ Revision evidence carries revision provenance only. It is never labeled
1763
+ as historical archive provenance. A revision bootstrapped from a complete
1764
+ legacy projection record may carry degraded_projection provenance and
1765
+ never historical_archive provenance.
1766
+ publication_order:
1767
+ - validate_target_identity
1768
+ - validate_amendment_vocabulary
1769
+ - stage_revision
1770
+ - publish_revision
1771
+ - update_effective_projection
1772
+ apply_state: implemented
1773
+ apply_state_note: >-
1774
+ The revision authority and amend command publish record-local amendments
1775
+ with recovery. A valid dry-run reports the exact revision, effective record,
1776
+ and projection effect without writing any file. Apply writes a
1777
+ record-local override to the revision document only (preserving unrelated
1778
+ entries' bytes), retries converge on a stable revision identity, and an
1779
+ identical re-submission is an idempotent replay. The decisions projection
1780
+ is never rewritten by an amendment; effective detail composes
1781
+ base→revisions→overlay. Amend execution still refuses before side effects
1782
+ for an unsafe target-only change, a duplicate-revision conflict, a stale
1783
+ base hash, or an unsafe target identity, returning an actionable retry or
1784
+ repair action. Discover the contract with
1785
+ `agentera state decisions explain --verb amend --format json`.
1786
+
1787
+ projections:
1788
+ archive:
1789
+ role: complete immutable historical detail
1790
+ source_of_truth_for: historical_record_fields
1791
+ omission: never omit fields from an archive record
1792
+ current:
1793
+ role: bounded active projection for current artifact consumers
1794
+ default_capacity:
1795
+ active_entries: 10
1796
+ summary_entries: 40
1797
+ total_entries: 50
1798
+ semantics: >-
1799
+ These are projection defaults, not retention or deletion limits. Entries
1800
+ outside the default display capacity remain in the numbered archive;
1801
+ entries whose archive cannot be verified remain full in the projection
1802
+ with recovery metadata rather than being discarded.
1803
+ legacy_summary_overflow:
1804
+ source: legacy_summary
1805
+ compatibility: degraded
1806
+ detail_availability: unavailable
1807
+ archive_verified: false
1808
+ semantics: >-
1809
+ Legacy inline summaries without a verified numbered record are bounded
1810
+ like every other projection item. If omitted, omission_provenance keeps
1811
+ their degraded and incomplete status explicit; omission never promotes
1812
+ them to archive-backed detail or reconstructs missing fields.
1813
+ paths:
1814
+ progress: .agentera/progress.yaml
1815
+ decisions: .agentera/decisions.yaml
1816
+ health: .agentera/health.yaml
1817
+ source_of_truth_for: current_projection_and_legacy_compatibility_state
1818
+ archive_relationship: >-
1819
+ A current entry may be full, summary-only, or absent from the projection;
1820
+ archive presence and hash verification determine whether full detail is
1821
+ available. Current mutable decision overlay values are composed at read
1822
+ time and do not rewrite archive bytes.
1823
+ summary:
1824
+ role: bounded list and startup representation
1825
+ required_item_fields: [stable_id, artifact_id, entry_number, addressable, classification, detail_availability, source]
1826
+ nullable_item_fields:
1827
+ - stable_id
1828
+ - entry_number
1829
+ detail_availability: [full, summary, unavailable]
1830
+ source_values: [archive, current_projection, legacy_full, legacy_summary]
1831
+ classification_values: [canonical, mirrored, duplicate, conflict, ambiguous, unaddressable, corrupt]
1832
+ counts:
1833
+ required: [physical, addressable, addressable_ids, unaddressable, ambiguous, mirrored, duplicate, conflict, omitted]
1834
+ reconciliation: >-
1835
+ physical = addressable + unaddressable + ambiguous;
1836
+ addressable_ids is the unique logical count and is not added to the
1837
+ physical count; mirrored, duplicate, and conflict are overlapping
1838
+ redundancy diagnostics, not partition buckets.
1839
+ omission: >-
1840
+ Omitted detail is represented by omitted=true, omitted_count,
1841
+ omission_reason, and a get command pointer. It is never silently
1842
+ truncated, represented as a fabricated summary, or treated as missing
1843
+ history without provenance.
1844
+ startup:
1845
+ role: bounded orientation and capability-startup projection
1846
+ required_fields: [command, status, source, source_contract]
1847
+ allowed_payload: >-
1848
+ Counts, bounded summaries, actionable stable IDs, detail availability,
1849
+ omission metadata, compatibility classification, and retrieval pointers.
1850
+ forbidden_payload: [raw_archive_records, raw_yaml, unbounded_entry_arrays, Git_history_scan]
1851
+ incomplete_state: >-
1852
+ Preserve degraded or blocked compatibility and omission metadata in
1853
+ source_contract; do not fall back to raw archive traversal merely to fill
1854
+ an omitted field.
1855
+
1856
+ api:
1857
+ namespace: agentera state
1858
+ artifact_syntax: agentera state <artifact-id>
1859
+ formats: [text, json, yaml]
1860
+ direct_get:
1861
+ command: agentera state <artifact-id> get --number N --format json
1862
+ examples:
1863
+ progress: agentera state progress get --number 747 --format json
1864
+ decisions: agentera state decisions get --number 53 --format json
1865
+ health: agentera state health get --number 29 --format json
1866
+ required_selector: --number N
1867
+ result: >-
1868
+ One complete record composed from the immutable archive and only the
1869
+ authority-declared current overlay fields, with stable_id, source,
1870
+ detail_availability, compatibility, and provenance metadata.
1871
+ archive_only: direct retrieval reads the exact numbered record without scanning unrelated records
1872
+ list:
1873
+ command: agentera state <artifact-id> list [--limit N] [--cursor TOKEN] --format json
1874
+ examples:
1875
+ progress: agentera state progress list --limit 20 --format json
1876
+ decisions_next_page: agentera state decisions list --limit 20 --cursor TOKEN --format json
1877
+ default_limit: 20
1878
+ minimum_limit: 1
1879
+ maximum_limit: 100
1880
+ ordering: identity.ordering.list
1881
+ response_fields:
1882
+ required: [command, status, entries, counts, source, filters, snapshot, source_contract]
1883
+ entry: [stable_id, artifact_id, entry_number, current_status, detail_availability, source, compatibility, provenance]
1884
+ optional_entry: [summary, record_status, overlay_applied, retrieval]
1885
+ empty_result: status=ok with entries=[] and counts.total=0; absence is not an error
1886
+ durability:
1887
+ command: agentera check durability [--project PATH] [--artifact ARTIFACT] [--number N] [--limit N] --format json
1888
+ entity_command: agentera check durability --project PATH --artifact ARTIFACT --id ID --format json
1889
+ formats: [text, json, yaml]
1890
+ selectors:
1891
+ artifact: optional supported numbered archive artifact ID
1892
+ number: optional positive entry number; requires artifact
1893
+ id: entity-mode bare entity ID; requires artifact and replaces number after cutover
1894
+ limit: optional bounded result count
1895
+ default_limit: 100
1896
+ maximum_limit: 100
1897
+ status_values: [complete, degraded, unavailable]
1898
+ local_values: [verified, unavailable, corrupt]
1899
+ git_values: [verified, degraded, unavailable]
1900
+ response_fields:
1901
+ required: [command, status, project, read_only, remote_contact, head, counts, entries, diagnostics, source_contract]
1902
+ entry: [stable_id, artifact_id, entry_number, status, local, git]
1903
+ guarantees:
1904
+ read_only: true
1905
+ remote_contact: forbidden
1906
+ writes_independent: true
1907
+ head_capture: >-
1908
+ Capture the local HEAD before inspection and after inspection. If the
1909
+ values differ, report changed_head and do not claim committed recovery.
1910
+ deterministic: >-
1911
+ With unchanged local files and reachable refs, repeated checks emit the
1912
+ same ordered result and do not create state or contact a remote.
1913
+ entity_migration_discovery:
1914
+ command: agentera state migrate entities --project PATH --dry-run --format json
1915
+ implementation: implemented
1916
+ read_only: true
1917
+ writes: forbidden
1918
+ authority: entity_migration.read_only_preview
1919
+ cursor:
1920
+ syntax: opaque TOKEN returned as response.next_cursor
1921
+ first_page: omit --cursor to establish a snapshot
1922
+ snapshot_identity: >-
1923
+ deterministic hash of ordered candidate IDs, archive hashes, legacy
1924
+ projection hashes when no archive exists, filters, and overlay revision.
1925
+ snapshot_scope: artifact and filters are bound to the cursor; limit may change between pages
1926
+ append_behavior: >-
1927
+ Entries appended after the first page are excluded from that cursor's
1928
+ snapshot. They appear only in a new listing without the old cursor.
1929
+ continuation: >-
1930
+ Continue strictly after the last emitted numeric entry number. Never
1931
+ restart from page one, skip an entry, or duplicate an entry.
1932
+ unavailable: return cursor_snapshot_unavailable rather than silently creating a new snapshot
1933
+ opacity: callers must not parse, construct, or compare token internals
1934
+ filters:
1935
+ allowed: artifact-specific existing filters plus --limit and --cursor
1936
+ filter_binding: every filter value is included in snapshot identity
1937
+ invalid_filters: structured failure with syntax, valid values, and example
1938
+
1939
+ failures:
1940
+ schema_version: agentera.stateFailure.v1
1941
+ envelope:
1942
+ required_fields: [schemaVersion, status, error]
1943
+ status: fail
1944
+ error_required_fields: [class, message, syntax, example, recovery]
1945
+ error_optional_fields: [artifact_id, entry_number, stable_id, details, valid_values]
1946
+ exit_codes:
1947
+ invalid_input: 2
1948
+ operational_failure: 1
1949
+ classes:
1950
+ invalid_request:
1951
+ exit_class: invalid_input
1952
+ use_for: malformed syntax, missing selector, invalid limit, or invalid cursor format
1953
+ unsupported_artifact:
1954
+ exit_class: invalid_input
1955
+ use_for: artifact outside scope.supported_artifacts
1956
+ not_found:
1957
+ exit_class: operational_failure
1958
+ use_for: requested stable ID has no available current or archive record
1959
+ ambiguous:
1960
+ exit_class: operational_failure
1961
+ use_for: multiple legacy candidates or conflicting identities prevent safe selection
1962
+ corrupt:
1963
+ exit_class: operational_failure
1964
+ use_for: malformed YAML, invalid envelope, hash mismatch, unsafe path, symlink, or duplicate identity
1965
+ incomplete:
1966
+ exit_class: operational_failure
1967
+ use_for: a requested complete record is represented only by an irrecoverable legacy summary
1968
+ immutable_conflict:
1969
+ exit_class: operational_failure
1970
+ use_for: same stable ID has different canonical content; existing bytes remain untouched
1971
+ cursor_invalid:
1972
+ exit_class: invalid_input
1973
+ use_for: token is malformed, bound to another artifact, or bound to different filters
1974
+ cursor_snapshot_unavailable:
1975
+ exit_class: operational_failure
1976
+ use_for: the original snapshot cannot be reproduced exactly
1977
+ project_boundary:
1978
+ exit_class: invalid_input
1979
+ use_for: path resolution would leave the selected project root
1980
+ unsupported_state:
1981
+ exit_class: operational_failure
1982
+ use_for: state format is outside the declared compatibility authority
1983
+ guidance_rule: >-
1984
+ Every failure includes the valid command syntax, a concrete example, and a
1985
+ recovery action. A failure must not silently downgrade a complete record,
1986
+ retry an invalid cursor as a fresh listing, or invent missing history.
1987
+
1988
+ compatibility:
1989
+ classifications: [complete, degraded, blocked, unsupported]
1990
+ dimensions:
1991
+ local_read: local project state and numbered archive availability
1992
+ detail: whether full record fields are available without inference
1993
+ git_durability: optional committed-history evidence only; never a write prerequisite
1994
+ cases:
1995
+ new:
1996
+ classification: complete
1997
+ local_read: complete
1998
+ detail: complete
1999
+ git_durability: optional
2000
+ behavior: numbered archive is canonical; current projection is bounded
2001
+ legacy_full:
2002
+ classification: degraded
2003
+ local_read: complete
2004
+ detail: complete
2005
+ git_durability: unavailable_until_migrated
2006
+ behavior: full inline current/legacy entry is usable, but provenance declares noncanonical storage and migration-needed
2007
+ legacy_summary:
2008
+ classification: degraded
2009
+ local_read: complete
2010
+ detail: incomplete
2011
+ git_durability: optional
2012
+ behavior: summary and retained fields are usable; missing fields stay missing and are never reconstructed
2013
+ non_git:
2014
+ classification: complete
2015
+ local_read: complete
2016
+ detail: based_on_local_records
2017
+ git_durability: unavailable
2018
+ behavior: local archive reads and writes remain supported; no Git operation is attempted
2019
+ shallow:
2020
+ classification: degraded
2021
+ local_read: complete_when_local_records_validate
2022
+ detail: based_on_local_records
2023
+ git_durability: history_unavailable
2024
+ behavior: do not claim historical recovery beyond reachable local records
2025
+ ambiguous:
2026
+ classification: blocked
2027
+ local_read: affected_identity_blocked
2028
+ detail: not_safe_to_select
2029
+ git_durability: not_evaluated
2030
+ behavior: preserve candidates and require explicit disambiguation; never choose by recency or Git guess
2031
+ corrupt:
2032
+ classification: blocked
2033
+ local_read: affected_record_blocked
2034
+ detail: not_trusted
2035
+ git_durability: not_evaluated
2036
+ behavior: reject the affected record, preserve its bytes for diagnostics, and continue only with independently valid records
2037
+ unsupported:
2038
+ classification: unsupported
2039
+ local_read: unsupported
2040
+ detail: unavailable
2041
+ git_durability: not_evaluated
2042
+ behavior: identify the unsupported artifact or format and return valid supported values
2043
+ precedence: corrupt > ambiguous > unsupported > degraded > complete
2044
+ no_reconstruction: >-
2045
+ Compatibility reports provenance and availability only. It does not
2046
+ reconstruct missing decision fields, promote summaries to full records, or
2047
+ use Git history to satisfy a current source contract.
2048
+ legacy_label_coexistence:
2049
+ dimensions:
2050
+ - confidence
2051
+ current_vocabulary: [firm, provisional, exploratory]
2052
+ current_vocabulary_ref: protocol.yaml DECISION_LABELS (DL1-DL3)
2053
+ known_legacy_examples: [high, medium, low]
2054
+ classification_rule: >-
2055
+ A label value is unsupported when it is not in current_vocabulary. An
2056
+ unsupported inherited label on a record the caller did not touch is
2057
+ explicit legacy state: it is preserved byte- and value-semantically,
2058
+ reported as a legacy caveat, never coerced to the current vocabulary,
2059
+ and never blocks an append, satisfaction update, or amend on a
2060
+ different target. A confidence label supplied by append or amend is new
2061
+ or amended content and must be a current_vocabulary value; otherwise the
2062
+ operation rejects before side effects.
2063
+ no_silent_normalization: >-
2064
+ Unsupported inherited labels are never rewritten to current values
2065
+ without explicit user migration consent. Reads classify them as legacy
2066
+ and never silently promote them to current vocabulary or claim stronger
2067
+ provenance than exists.
2068
+
2069
+ budgets:
2070
+ schema_version: agentera.stateOutputBudget.v1
2071
+ measurement:
2072
+ encoding: UTF-8
2073
+ bytes: serialized byte length after encoding, including the final newline
2074
+ json_serializer: JSON.stringify(value, null, 2) plus newline
2075
+ yaml_serializer: YAML.stringify(value) as emitted by the CLI
2076
+ measure_before_emit: true
2077
+ list:
2078
+ max_utf8_bytes: 32768
2079
+ benchmark:
2080
+ small:
2081
+ entries: 100
2082
+ max_latency_ms: 5000
2083
+ max_heap_delta_bytes: 67108864
2084
+ large:
2085
+ entries: 1000
2086
+ max_latency_ms: 15000
2087
+ max_heap_delta_bytes: 268435456
2088
+ response_max_utf8_bytes: 32768
2089
+ index_decision:
2090
+ decision: no_index
2091
+ trigger: >-
2092
+ Defer a persistent index until the large fixture exceeds any declared
2093
+ latency, heap, or response threshold on a reproducible authority test.
2094
+ projection:
2095
+ max_utf8_bytes: 32768
2096
+ applies_to: current, summary, and migration result responses
2097
+ required_when_over_budget: [omitted, omitted_count, omission_reason, retrieval]
2098
+ omission_semantics: >-
2099
+ Remove optional detail entries in deterministic numeric order from the
2100
+ response, retain required identity/count/source fields, and expose a next
2101
+ retrieval pointer. Never split UTF-8, truncate a scalar, or silently drop
2102
+ an entry. If required/source fields themselves exceed the budget, emit a
2103
+ measured minimal degraded envelope with projection output-budget error
2104
+ metadata rather than returning an over-budget payload.
2105
+ startup:
2106
+ source_manifest: scripts/json_output_surface_manifest.yaml
2107
+ source_work:
2108
+ schema_version: agentera.startupSourceWorkBudget.v1
2109
+ measurement: >-
2110
+ Count current projection entry rows and archive files inspected by the
2111
+ source-side metadata query. Full archive records are never retained by
2112
+ startup consumers.
2113
+ small:
2114
+ max_current_entries: 100
2115
+ max_archive_files: 100
2116
+ max_latency_ms: 5000
2117
+ max_heap_delta_bytes: 67108864
2118
+ large:
2119
+ max_current_entries: 1000
2120
+ max_archive_files: 1000
2121
+ max_latency_ms: 15000
2122
+ max_heap_delta_bytes: 268435456
2123
+ serialized_output:
2124
+ # Generic prime capability capsules retain the full instructions body.
2125
+ # The status capability is a separate one-call surface with a stricter
2126
+ # bound declared below and in the JSON surface manifest.
2127
+ prime_capability_context_max_utf8_bytes: 55000
2128
+ prime_status_context_max_utf8_bytes: 25000
2129
+ surfaces:
2130
+ prime_briefing:
2131
+ manifest_id: prime-briefing
2132
+ # Bounded default decision brief (Plan Task 3): the bare default
2133
+ # `agentera prime --format json` projects the full orientation payload
2134
+ # to routing-essential leaves plus named recovery pointers for omitted
2135
+ # rich state. Pretty UTF-8 JSON + trailing newline is measured and an
2136
+ # over-budget brief is rejected in favor of a bounded degraded envelope;
2137
+ # diagnostics stay on stderr. prime_dashboard keeps full current state
2138
+ # while omitting duplicated ordinary history entries with recovery.
2139
+ max_utf8_bytes: 12000
2140
+ prime_dashboard:
2141
+ manifest_id: prime-dashboard
2142
+ max_utf8_bytes: 35000
2143
+ prime_status_context:
2144
+ manifest_id: prime-status-context
2145
+ # Status startup includes the full instructions capsule as well as the
2146
+ # bounded Task 3 decision brief. Diagnostics remain on stderr.
2147
+ max_utf8_bytes: 25000
2148
+ prime_sparse:
2149
+ manifest_id: prime-fields-sparse
2150
+ max_utf8_bytes: 28000
2151
+ required_when_over_budget: [omitted, omitted_count, omission_reason, retrieval]
2152
+ omission_semantics: >-
2153
+ Omit optional historical detail and retain counts, actionable IDs,
2154
+ compatibility, source_contract, and exact get/list command pointers. The
2155
+ caller must be able to distinguish omitted detail from unavailable detail.
2156
+ The bare default briefing is a bounded decision brief: every required
2157
+ top-level field stays present (content projected to routing-essential
2158
+ leaves), missing versus present-but-empty stays distinguishable through
2159
+ state_presence, and each omitted rich-state family carries a named
2160
+ authoritative recovery command. When even the projected brief exceeds the
2161
+ budget, emit a measured bounded degraded envelope that keeps command,
2162
+ status, mode, state_presence, a brief source_contract, and the
2163
+ byte-budget error with a recovery command; never emit an over-budget
2164
+ payload. Diagnostics are measured on stderr separately.
2165
+ validation:
2166
+ authority: this file plus the referenced JSON surface manifest
2167
+ drift_rule: tests fail if manifest IDs or byte values disagree with this contract