agentera 3.0.0-dev.20 → 3.0.0-dev.22

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 (265) hide show
  1. package/README.md +19 -0
  2. package/bundle/CHANGELOG.md +72 -70
  3. package/bundle/README.md +17 -0
  4. package/bundle/UPGRADE.md +38 -0
  5. package/bundle/references/adapters/package-surface-characterization.md +7 -0
  6. package/bundle/references/analysis/evidence-tier-authority.yaml +516 -0
  7. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +3 -3
  8. package/bundle/references/artifacts/state-storage-authority.yaml +1446 -0
  9. package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
  10. package/bundle/references/cli/agent-ready-state-contract.yaml +11 -39
  11. package/bundle/references/cli/audience-namespace-cli-migration.yaml +30 -15
  12. package/bundle/references/meta/documentation-inventory.md +1 -0
  13. package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +18 -10
  14. package/bundle/skills/agentera/capabilities/audit/schemas/validation.yaml +10 -10
  15. package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +11 -6
  16. package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +3 -2
  17. package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +15 -8
  18. package/bundle/skills/agentera/capabilities/document/schemas/validation.yaml +13 -13
  19. package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +15 -9
  20. package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +31 -3
  21. package/bundle/skills/agentera/references/contract.md +65 -23
  22. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +1 -0
  23. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +15 -10
  24. package/bundle/skills/agentera/schemas/artifacts/design.yaml +1 -0
  25. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +134 -3
  26. package/bundle/skills/agentera/schemas/artifacts/health.yaml +16 -10
  27. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +18 -4
  28. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +23 -1
  29. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +16 -10
  30. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +35 -0
  31. package/dist/analytics/extractCorpus/cli.js +33 -5
  32. package/dist/analytics/extractCorpus/cli.js.map +1 -1
  33. package/dist/analytics/extractCorpus/evidenceTiers.js +561 -0
  34. package/dist/analytics/extractCorpus/evidenceTiers.js.map +1 -0
  35. package/dist/analytics/extractCorpus/extractCorpusParity.js +1 -0
  36. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -1
  37. package/dist/analytics/extractCorpus/index.js +3 -0
  38. package/dist/analytics/extractCorpus/index.js.map +1 -1
  39. package/dist/analytics/extractCorpus/tierReader.js +109 -0
  40. package/dist/analytics/extractCorpus/tierReader.js.map +1 -0
  41. package/dist/analytics/profileSignals.js +212 -0
  42. package/dist/analytics/profileSignals.js.map +1 -0
  43. package/dist/analytics/usageStats.js +104 -20
  44. package/dist/analytics/usageStats.js.map +1 -1
  45. package/dist/capabilities/audit/instructions.js +1 -1
  46. package/dist/capabilities/audit/instructions.js.map +1 -1
  47. package/dist/capabilities/build/instructions.js +1 -1
  48. package/dist/capabilities/build/instructions.js.map +1 -1
  49. package/dist/capabilities/discuss/instructions.js +1 -1
  50. package/dist/capabilities/discuss/instructions.js.map +1 -1
  51. package/dist/capabilities/document/instructions.js +1 -1
  52. package/dist/capabilities/document/instructions.js.map +1 -1
  53. package/dist/capabilities/optimize/instructions.js +1 -1
  54. package/dist/capabilities/optimize/instructions.js.map +1 -1
  55. package/dist/capabilities/orchestrate/instructions.js +1 -1
  56. package/dist/capabilities/orchestrate/instructions.js.map +1 -1
  57. package/dist/capabilities/plan/instructions.js +1 -1
  58. package/dist/capabilities/plan/instructions.js.map +1 -1
  59. package/dist/capabilities/profile/instructions.js +1 -1
  60. package/dist/capabilities/profile/instructions.js.map +1 -1
  61. package/dist/capabilities/vision/instructions.js +1 -1
  62. package/dist/capabilities/vision/instructions.js.map +1 -1
  63. package/dist/cli/appContext.js +14 -6
  64. package/dist/cli/appContext.js.map +1 -1
  65. package/dist/cli/capabilityContext/bespoke.js +3 -1
  66. package/dist/cli/capabilityContext/bespoke.js.map +1 -1
  67. package/dist/cli/capabilityContext/build.js +5 -4
  68. package/dist/cli/capabilityContext/build.js.map +1 -1
  69. package/dist/cli/capabilityContext/closeout.js +2 -1
  70. package/dist/cli/capabilityContext/closeout.js.map +1 -1
  71. package/dist/cli/capabilityContext/contract.js +29 -0
  72. package/dist/cli/capabilityContext/contract.js.map +1 -1
  73. package/dist/cli/capabilityContext/evidence.js +21 -20
  74. package/dist/cli/capabilityContext/evidence.js.map +1 -1
  75. package/dist/cli/capabilityContext/orchestration.js +3 -2
  76. package/dist/cli/capabilityContext/orchestration.js.map +1 -1
  77. package/dist/cli/capabilityContext/progress.js +9 -4
  78. package/dist/cli/capabilityContext/progress.js.map +1 -1
  79. package/dist/cli/capabilityContext/shared.js +1 -1
  80. package/dist/cli/capabilityContext/shared.js.map +1 -1
  81. package/dist/cli/capabilityContext/slim.js +37 -6
  82. package/dist/cli/capabilityContext/slim.js.map +1 -1
  83. package/dist/cli/capabilityContext/startup.js +30 -6
  84. package/dist/cli/capabilityContext/startup.js.map +1 -1
  85. package/dist/cli/capabilityContext/types.js +14 -4
  86. package/dist/cli/capabilityContext/types.js.map +1 -1
  87. package/dist/cli/commands/backfill.js +194 -0
  88. package/dist/cli/commands/backfill.js.map +1 -0
  89. package/dist/cli/commands/compact.js +40 -11
  90. package/dist/cli/commands/compact.js.map +1 -1
  91. package/dist/cli/commands/durability.js +85 -0
  92. package/dist/cli/commands/durability.js.map +1 -0
  93. package/dist/cli/commands/lint.js +10 -2
  94. package/dist/cli/commands/lint.js.map +1 -1
  95. package/dist/cli/commands/migrate.js +677 -0
  96. package/dist/cli/commands/migrate.js.map +1 -0
  97. package/dist/cli/commands/prime/collectOrientationState.js +26 -0
  98. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  99. package/dist/cli/commands/prime/orientationOutput.js +4 -2
  100. package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
  101. package/dist/cli/commands/query.js +20 -2
  102. package/dist/cli/commands/query.js.map +1 -1
  103. package/dist/cli/commands/report.js +55 -15
  104. package/dist/cli/commands/report.js.map +1 -1
  105. package/dist/cli/commands/schema.js +247 -69
  106. package/dist/cli/commands/schema.js.map +1 -1
  107. package/dist/cli/commands/state/decisions.js +28 -10
  108. package/dist/cli/commands/state/decisions.js.map +1 -1
  109. package/dist/cli/commands/state/experimentRecords.js +156 -0
  110. package/dist/cli/commands/state/experimentRecords.js.map +1 -0
  111. package/dist/cli/commands/state/get.js +141 -0
  112. package/dist/cli/commands/state/get.js.map +1 -0
  113. package/dist/cli/commands/state/index.js +2 -2
  114. package/dist/cli/commands/state/index.js.map +1 -1
  115. package/dist/cli/commands/state/list.js +159 -0
  116. package/dist/cli/commands/state/list.js.map +1 -0
  117. package/dist/cli/commands/state/plan.js +146 -41
  118. package/dist/cli/commands/state/plan.js.map +1 -1
  119. package/dist/cli/commands/state/planTasks.js +164 -0
  120. package/dist/cli/commands/state/planTasks.js.map +1 -0
  121. package/dist/cli/commands/state/plans.js +154 -0
  122. package/dist/cli/commands/state/plans.js.map +1 -0
  123. package/dist/cli/commands/state/write.js +8 -3
  124. package/dist/cli/commands/state/write.js.map +1 -1
  125. package/dist/cli/dispatch/check.js +71 -4
  126. package/dist/cli/dispatch/check.js.map +1 -1
  127. package/dist/cli/dispatch/index.js +48 -30
  128. package/dist/cli/dispatch/index.js.map +1 -1
  129. package/dist/cli/dispatch/lifecycle.js +4 -4
  130. package/dist/cli/dispatch/lifecycle.js.map +1 -1
  131. package/dist/cli/dispatch/state.js +23 -3
  132. package/dist/cli/dispatch/state.js.map +1 -1
  133. package/dist/cli/errors.js +13 -14
  134. package/dist/cli/errors.js.map +1 -1
  135. package/dist/cli/help.js +162 -3
  136. package/dist/cli/help.js.map +1 -1
  137. package/dist/cli/orientation/corpusCoverage.js +32 -0
  138. package/dist/cli/orientation/corpusCoverage.js.map +1 -1
  139. package/dist/cli/orientation.js +146 -34
  140. package/dist/cli/orientation.js.map +1 -1
  141. package/dist/cli/planArtifacts.js +31 -2
  142. package/dist/cli/planArtifacts.js.map +1 -1
  143. package/dist/cli/prime-blob.js +1 -0
  144. package/dist/cli/prime-blob.js.map +1 -1
  145. package/dist/cli/startupCompletenessContract.js +3 -2
  146. package/dist/cli/startupCompletenessContract.js.map +1 -1
  147. package/dist/cli/stateQuery.js +5 -3
  148. package/dist/cli/stateQuery.js.map +1 -1
  149. package/dist/core/text.js +11 -0
  150. package/dist/core/text.js.map +1 -0
  151. package/dist/hooks/compaction/apply.js +224 -46
  152. package/dist/hooks/compaction/apply.js.map +1 -1
  153. package/dist/hooks/compaction/dryRun.js +2 -0
  154. package/dist/hooks/compaction/dryRun.js.map +1 -1
  155. package/dist/hooks/compaction/index.js +4 -4
  156. package/dist/hooks/compaction/index.js.map +1 -1
  157. package/dist/hooks/compaction/parse.js +73 -5
  158. package/dist/hooks/compaction/parse.js.map +1 -1
  159. package/dist/hooks/compaction/retention.js +22 -21
  160. package/dist/hooks/compaction/retention.js.map +1 -1
  161. package/dist/hooks/compaction/status.js +116 -23
  162. package/dist/hooks/compaction/status.js.map +1 -1
  163. package/dist/hooks/sessionStart.js +39 -7
  164. package/dist/hooks/sessionStart.js.map +1 -1
  165. package/dist/hooks/validateArtifact/index.js +2 -2
  166. package/dist/hooks/validateArtifact/index.js.map +1 -1
  167. package/dist/hooks/validateArtifact/markdown.js +9 -9
  168. package/dist/hooks/validateArtifact/markdown.js.map +1 -1
  169. package/dist/hooks/validateArtifact/traversal.js +11 -9
  170. package/dist/hooks/validateArtifact/traversal.js.map +1 -1
  171. package/dist/registries/artifactRegistry.js +147 -44
  172. package/dist/registries/artifactRegistry.js.map +1 -1
  173. package/dist/registries/evidenceTierContract.js +362 -0
  174. package/dist/registries/evidenceTierContract.js.map +1 -0
  175. package/dist/registries/verbosityBudgetContract.js +206 -0
  176. package/dist/registries/verbosityBudgetContract.js.map +1 -0
  177. package/dist/release/releaseMetadata.js +95 -1
  178. package/dist/release/releaseMetadata.js.map +1 -1
  179. package/dist/state/archiveDiscovery.js +589 -0
  180. package/dist/state/archiveDiscovery.js.map +1 -0
  181. package/dist/state/archivePublication.js +225 -0
  182. package/dist/state/archivePublication.js.map +1 -0
  183. package/dist/state/archiveRecovery.js +238 -0
  184. package/dist/state/archiveRecovery.js.map +1 -0
  185. package/dist/state/archiveReplay.js +54 -0
  186. package/dist/state/archiveReplay.js.map +1 -0
  187. package/dist/state/decisionOverlay.js +255 -0
  188. package/dist/state/decisionOverlay.js.map +1 -0
  189. package/dist/state/directRetrieval.js +322 -0
  190. package/dist/state/directRetrieval.js.map +1 -0
  191. package/dist/state/durability.js +451 -0
  192. package/dist/state/durability.js.map +1 -0
  193. package/dist/state/experimentArchive.js +64 -0
  194. package/dist/state/experimentArchive.js.map +1 -0
  195. package/dist/state/experimentIdentity.js +191 -0
  196. package/dist/state/experimentIdentity.js.map +1 -0
  197. package/dist/state/experimentRetrieval.js +447 -0
  198. package/dist/state/experimentRetrieval.js.map +1 -0
  199. package/dist/state/gitBackfill.js +561 -0
  200. package/dist/state/gitBackfill.js.map +1 -0
  201. package/dist/state/gitBackfillAuthority.js +141 -0
  202. package/dist/state/gitBackfillAuthority.js.map +1 -0
  203. package/dist/state/gitBackfillHistory.js +278 -0
  204. package/dist/state/gitBackfillHistory.js.map +1 -0
  205. package/dist/state/gitBackfillOutput.js +209 -0
  206. package/dist/state/gitBackfillOutput.js.map +1 -0
  207. package/dist/state/healthRepair.js +70 -0
  208. package/dist/state/healthRepair.js.map +1 -0
  209. package/dist/state/legacyIdentity.js +48 -0
  210. package/dist/state/legacyIdentity.js.map +1 -0
  211. package/dist/state/legacyMigration.js +516 -0
  212. package/dist/state/legacyMigration.js.map +1 -0
  213. package/dist/state/legacyMigrationParser.js +489 -0
  214. package/dist/state/legacyMigrationParser.js.map +1 -0
  215. package/dist/state/listAccounting.js +55 -0
  216. package/dist/state/listAccounting.js.map +1 -0
  217. package/dist/state/listClassification.js +18 -0
  218. package/dist/state/listClassification.js.map +1 -0
  219. package/dist/state/listRetrieval.js +782 -0
  220. package/dist/state/listRetrieval.js.map +1 -0
  221. package/dist/state/migrationAuthority.js +413 -0
  222. package/dist/state/migrationAuthority.js.map +1 -0
  223. package/dist/state/migrationEnrichment.js +35 -0
  224. package/dist/state/migrationEnrichment.js.map +1 -0
  225. package/dist/state/planIdentity.js +45 -0
  226. package/dist/state/planIdentity.js.map +1 -0
  227. package/dist/state/planRetrieval.js +314 -0
  228. package/dist/state/planRetrieval.js.map +1 -0
  229. package/dist/state/planTaskRetrieval.js +285 -0
  230. package/dist/state/planTaskRetrieval.js.map +1 -0
  231. package/dist/state/projectionPolicy.js +184 -0
  232. package/dist/state/projectionPolicy.js.map +1 -0
  233. package/dist/state/retrievalAuthority.js +326 -0
  234. package/dist/state/retrievalAuthority.js.map +1 -0
  235. package/dist/state/startupAnalysis/benchmark.js +70 -8
  236. package/dist/state/startupAnalysis/benchmark.js.map +1 -1
  237. package/dist/state/startupAnalysis/threshold.js +13 -0
  238. package/dist/state/startupAnalysis/threshold.js.map +1 -1
  239. package/dist/state/startupProjection.js +498 -0
  240. package/dist/state/startupProjection.js.map +1 -0
  241. package/dist/state/write/experimentPublication.js +193 -0
  242. package/dist/state/write/experimentPublication.js.map +1 -0
  243. package/dist/state/write/explain.js +28 -14
  244. package/dist/state/write/explain.js.map +1 -1
  245. package/dist/state/write/helpers.js +8 -0
  246. package/dist/state/write/helpers.js.map +1 -0
  247. package/dist/state/write/index.js +1 -0
  248. package/dist/state/write/index.js.map +1 -1
  249. package/dist/state/write/lock.js +24 -1
  250. package/dist/state/write/lock.js.map +1 -1
  251. package/dist/state/write/mutation.js +190 -0
  252. package/dist/state/write/mutation.js.map +1 -0
  253. package/dist/state/write/operations.js +36 -2
  254. package/dist/state/write/operations.js.map +1 -1
  255. package/dist/state/write/planPublication.js +172 -0
  256. package/dist/state/write/planPublication.js.map +1 -0
  257. package/dist/state/write/transaction.js +238 -225
  258. package/dist/state/write/transaction.js.map +1 -1
  259. package/dist/upgrade/migrateArtifactsV2ToV3.js +2 -2
  260. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  261. package/dist/validate/crossCapability.js +9 -6
  262. package/dist/validate/crossCapability.js.map +1 -1
  263. package/dist/validate/selfAudit.js +38 -43
  264. package/dist/validate/selfAudit.js.map +1 -1
  265. package/package.json +2 -2
package/README.md CHANGED
@@ -48,6 +48,25 @@ It can remove only the exact Agentera-owned legacy link. Historical transcript
48
48
  import is also explicit (`agentera report refresh --import-source claude`) and
49
49
  is excluded from default active-runtime analytics.
50
50
 
51
+ ## Bounded state retrieval
52
+
53
+ The executable contract is
54
+ [`references/artifacts/state-storage-authority.yaml`](../../references/artifacts/state-storage-authority.yaml)
55
+ and is projected by `agentera schema --format json`.
56
+
57
+ ```bash
58
+ agentera state plan list --format json
59
+ agentera state plan get --plan PLAN_ID --format json
60
+ agentera state plan tasks list --limit 20 --format json
61
+ agentera state experiments list --objective OBJECTIVE_ID --format json
62
+ agentera state experiments get --objective OBJECTIVE_ID --number N --format json
63
+ ```
64
+
65
+ Pages use opaque snapshot cursors, explicit omission fields, whole-entry output
66
+ bounds, and exact retrieval. Plan history is owned by active/archive plan files;
67
+ plan task retrieval is active-only. Experiment history is objective-scoped and
68
+ reports full, summary-only, or unavailable detail without fabricating archives.
69
+
51
70
  See [UPGRADE.md](../../UPGRADE.md) for ownership, recovery, and migration
52
71
  details and [runtime feature parity](../../references/adapters/runtime-feature-parity.md)
53
72
  for host-specific behavior.
@@ -2,13 +2,53 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ### Changed
6
+
7
+ - Eliminated the monolithic `corpus.json` publication output from the extract CLI; report dry-run diagnostics now reference tier files and the `privacy.corpus_write` field is renamed to `privacy.tier_write`.
8
+ - Changed `agentera check lint` verbosity checks to consume schema-owned full-file and per-entry word limits, skip no-limit and token-only dimensions, and report authority failures without fallback budgets.
9
+ - Corrected packaged experiment-publication authority to declare validated objective-scoped archive-before-projection ownership and reject contradictory structured scope metadata.
10
+ - Synchronized bounded plan, plan-task, and experiment retrieval across help, schema introspection, capability guidance, operator docs, packaged contracts, output bounds, archive ownership, and structured recovery errors.
11
+
5
12
  ### Added
6
13
 
14
+ - Added an authoritative evidence-tier contract (`references/analysis/evidence-tier-authority.yaml`) and contract-model loader (`packages/cli/src/registries/evidenceTierContract.ts`) fixing the bounded full-evidence and signal tiers, supported Codex, Cursor, OpenCode, Copilot, and historical Claude source coverage, the consumer field-supply map including the latent startup-analysis reader, reserved signal semantics for the deferred glossary, and deterministic recovery outcomes for oversized, legacy, missing, corrupt, and incomplete state.
15
+ - Added bounded tier publication and direct retrieval (`packages/cli/src/analytics/extractCorpus/evidenceTiers.ts`): complete local evidence is retained as independently bounded, source-family shards that split when exceeding the reader cap; a derived, content-addressable bounded signal tier carries only contract-required fields plus a resolvable `evidence_anchor`; generations are staged and revealed by an atomic current-pointer swap so no consumer observes a partial publication; and direct retrieval resolves a signal identity to its full record. The monolithic `corpus.json` write is eliminated; tiers are the only canonical publication output.
16
+ - Added bounded tier-aware reads for usage analytics, report status, prime corpus coverage, startup analysis, and profile synthesis so every analytics consumer reads from bounded evidence shards one at a time instead of loading the monolithic `corpus.json`. A new `tierReader.ts` module projects contract compatibility states and recovery guidance, streams full-evidence records, and reads signal-tier metadata. A new `profileSignals.ts` module reads the bounded signal tier, assesses per-family retention sufficiency against the contract threshold, and resolves synthesized claims' evidence anchors to retained full-evidence shards. Legacy `corpus.json` remains a fallback when no tiers are published; oversized legacy state is never loaded whole.
17
+ - Added a schema-owned verbosity-budget authority that classifies numeric word limits, explicit no-limit declarations, and token-only budgets while rejecting malformed, ambiguous, unreadable, and unsupported ownership without fallback limits.
18
+ - Added a `profile_sufficiency` section to the evidence-tier authority defining `minimum_family_retention=0.5`, profile signal types (decision, question, correction, instruction, configuration), and insufficiency rules so bounded profile synthesis surfaces underrepresented families without fabricating confidence.
19
+ - Added `agentera state experiments list|get --objective OBJECTIVE_ID` with newest-first bounded pages, snapshot-bound opaque cursors, merged projection/archive identity, verified archive-first detail, explicit provenance and detail availability, and structured compatibility failures.
20
+ - Added objective-scoped immutable full-detail archives under `.agentera/optimize/<objective>/archive/experiments/<number>.yaml` before 10/40/50 projection replacement, with explicit provenance, conflict rejection, and crash-consistent idempotent retries.
21
+ - Added `agentera state experiments publish --objective OBJECTIVE_ID --number N --input EXPERIMENT.yaml` with schema and identity preflight, atomic projection replacement, idempotent interruption retry, collision safety, and existing 10/40/50 projection behavior.
22
+ - Added stable objective UUID and objective-scoped experiment identity validation, including experiment `0`, rename continuity, canonical `optimize` plus legacy `optimera` discovery, readable missing/duplicate legacy entries, and effect-free ambiguity rejection for future publication.
23
+ - Added `agentera state plan list` and `agentera state plan get --plan PLAN_ID` for deterministic, cursor-paginated active and archived plan retrieval, full-plan exact reads, lifecycle provenance, and explicit legacy, invalid, missing, and ambiguous archive outcomes.
24
+ - Added persisted plan identity across active-to-archive transitions, deterministic read-only identity for legacy plans, explicit lifecycle provenance, mirrored-path reporting, and structured ambiguity failures for identity collisions.
25
+ - Added `agentera state plan tasks list` and `agentera state plan tasks get --task N` for bounded active-plan task retrieval with declared task-number order, opaque snapshot cursors, structured not-found and compatibility errors, and exact omission recovery in text and JSON plan output.
26
+
27
+ - Added an executable bounded-retrieval authority and reserved CLI grammar for plan tasks, plans, and objective-scoped experiments, including stable and legacy identity rules, experiment `0`, opaque cursors, explicit omissions, and structured compatibility errors; retrieval execution remains staged for subsequent tasks.
7
28
  - Added a canonical runtime lifecycle projection with deterministic snapshot identity, applicability, ownership, action classes, counts, and command eligibility for OpenCode, Codex, Cursor, and Copilot.
8
29
  - Added bounded prime/status lifecycle attention rows with runtime-scoped repair previews, exact manual procedures, and doctor diagnostics for non-executable blockers.
30
+ - Added runtime lifecycle schemas and adapters for skills, plugins, hooks, agents, configuration, enablement, trust, and native actions across all four active runtimes.
31
+ - Added append-only ownership-journal recovery, exact operation dependencies, Linux secure directory-relative publication, and outcomes `applied`, `noop`, `failed`, `blocked_unowned`, `skipped_dependency`, and `action_required`.
32
+ - Added explicit retired cleanup through `agentera upgrade --legacy-cleanup claude --dry-run|--yes`; it can remove only the ledger-owned legacy Agentera skill link and excludes user data.
33
+ - Added typed artifact writes under `agentera state`: progress/decision/audit appends, decision satisfaction updates, plan create/task/status/archive lifecycle operations, schema-derived `explain`, server-assigned identifiers, exact retry replay, dry-run diffs, project locking, strict mapped-path safety, staged 10/40/50 compaction, final-byte validation, and atomic publication.
34
+ - Added `install_track` to `prime --format json` (`app_home.install_track`) and `doctor --format json`. Values are `v2`, `v3`, `source`, and `unknown`.
35
+ - Added the native TypeScript CLI on the npm development channel (`npx -y agentera@next`), bundling app data at pack time via `prepack` (`tsc` + `scripts/copy-bundle.mjs`) and the `.agentera-npx-bundle.json` sentinel checked by `packages/cli/test/packaging/prepack.test.ts`.
36
+ - Added `bash scripts/single-binary.sh` and the packaging contract in `docs/packaging/v3-packaging.md` for Bun `--compile` single-binary delivery alongside the npm tarball.
37
+ - Added `packages/cli/src/migrate/v2HandoffManifest.ts` to read `v3-handoff.json` during v2→v3 cleanup preflight per `references/cli/v3-handoff-manifest.schema.yaml`.
38
+ - Added v3 `agentera doctor` coexistence detection in `packages/cli/src/upgrade/coexistenceProbe.ts` with regression coverage in `packages/cli/test/cli/coexistenceProbe.test.ts`.
39
+ - Added maintainer gates under `agentera check` (`validate`, `verify`, `lint`, `compact`) with JSON parity oracles for validate families, verify eval targets, invalid-input envelopes, and `source_contract` emissions on `prime`, `prime --context`, `state plan`, and `state query --list-artifacts`.
40
+ - Added per-channel `next_major` metadata in `references/cli/update-channels.yaml` and a six-line successor advisory at the head of `agentera doctor` on the stable channel, sourced from `packages/cli/src/upgrade/nextMajorDoctor.ts`.
41
+ - Added a 1000-line monolith lint regression in `packages/cli/test/lint/monolithLint.test.ts` after splitting the eight largest `packages/cli/src/**/*.ts` modules by responsibility.
9
42
 
10
43
  ### Changed
11
44
 
45
+ - Changed `agentera state migrate` to inventory legacy project state locally within
46
+ bounded file and byte limits, retain custom names with explicit provenance, and
47
+ require exact selectors plus `--apply --force` before immutable archive, backup,
48
+ and projection publication.
49
+ - Changed `agentera state backfill` to remain optional local-Git enrichment: direct
50
+ `--apply --force` revalidates the project, `HEAD`, candidate, reachability, and
51
+ immutable target, while bounded history and no-remote behavior remain explicit.
12
52
  - Changed `agentera upgrade --only artifacts` to preview and apply deterministic
13
53
  plan lifecycle migration for docs-mapped current plans and archives. Legacy
14
54
  `active` and `completed` plan statuses become `open` and `complete` without
@@ -27,88 +67,42 @@
27
67
  - Changed lifecycle repair to fail closed on incomplete ownership provenance, isolate narrowed runtime selectors, and count explicit Claude cleanup separately from active-runtime work.
28
68
  - Changed corrupt or disconnected ownership-journal blockers to report stable causes without volatile event filenames across preview and apply.
29
69
  - Synchronized lifecycle projections across prime, status, project integration, and doctor while keeping Cursor CLI required, IDE conditional, and Claude cleanup explicit.
30
-
31
- ### Fixed
32
-
33
- - Fixed full-plan task guidance and startup metadata to use lifecycle and coherence boundaries instead of a fixed task-count ceiling; typed publication still validates task identity and dependencies.
34
- - Fixed `agentera state plan create` and `archive` publication to use stable archive identities across retries, validate final serialized bytes with strict prose lint and schema checks, and retain canonical `overall acceptance` vocabulary.
35
- - Fixed `agentera state plan`: `set-status --task` accepts task values, and `set-plan-status` accepts `open` or `complete`.
36
- - Fixed plan discovery to derive activity from canonical paths: archive-only history is non-executable and cannot trigger a Build completion sweep; next work is dependency-ready, lifecycle diagnostics are shared, and evaluator state is retry-safe through `state plan record-evaluation`.
37
-
38
- ## [3.0.0] · 2026-07-12
39
-
40
- ### Key highlights
41
-
42
- - **One runtime lifecycle contract**: OpenCode, Codex, Cursor, and GitHub Copilot now share one authority, one canonical skill at `~/.agents/skills/agentera`, one eight-category diagnosis model, and one ownership-safe operation engine.
43
- - **Bounded status, detailed diagnosis**: `agentera prime` exposes a compact four-runtime summary while `agentera doctor` reports complete evidence, support-floor gaps, ownership state, and exact host-native actions from the same snapshot.
44
- - **Previewable, convergent repair**: `agentera upgrade --runtime all|opencode|codex|cursor|copilot --dry-run` is side-effect free; rerunning the selection with `--yes` applies only declared Agentera-owned resources and safely resumes partial work.
45
- - **Claude retirement and one Cursor identity**: Claude Code active support and package manifests are removed. Cursor Agent CLI is required and Cursor IDE is conditional beneath the single `cursor` runtime identity.
46
-
47
- ### Added
48
-
49
- - Added runtime lifecycle schemas and adapters for skills, plugins, hooks, agents, configuration, enablement, trust, and native actions across all four active runtimes.
50
- - Added append-only ownership-journal recovery, exact operation dependencies, Linux secure directory-relative publication, and outcomes `applied`, `noop`, `failed`, `blocked_unowned`, `skipped_dependency`, and `action_required`.
51
- - Added explicit retired cleanup through `agentera upgrade --legacy-cleanup claude --dry-run|--yes`; it can remove only the ledger-owned legacy Agentera skill link and excludes user data.
52
- - Added typed artifact writes under `agentera state`: progress/decision/audit appends, decision satisfaction updates, plan create/task/status/archive lifecycle operations, schema-derived `explain`, server-assigned identifiers, exact retry replay, dry-run diffs, project locking, strict mapped-path safety, staged 10/40/50 compaction, final-byte validation, and atomic publication.
53
- - Added `install_track` to `prime --format json` (`app_home.install_track`) and `doctor --format json`. Values are `v2`, `v3`, `source`, and `unknown`.
54
-
55
- ### Removed
56
-
57
- - Removed Claude Code as an active runtime, runtime selector, installation target, plugin marketplace, and default analytics source. Historical transcript parsing remains available only with explicit `--import-source claude` consent and inactive provenance.
58
- - Removed `cursor-agent` as an independent runtime identity. Its binary and corpus source now map to the single `cursor` identity.
59
- - Removed `rootStatus` from public JSON output (`prime --format json` and `doctor --format json`). The field remains internal for classifier logic but is no longer exposed in diagnostic output.
60
-
61
- ### Changed
62
-
63
70
  - Changed lifecycle apply so native installation, update, authentication, enablement, and trust are always user-owned `action_required` steps. Automatic filesystem apply is Linux-only; other platforms retain complete preview and diagnosis.
64
71
  - Changed the npm package to include every declared OpenCode, Codex, Cursor, and GitHub Copilot manifest/hook/agent source and to reject package, documentation, runtime-ID, or version parity drift during validation.
65
72
  - Renamed the top-level `bundle` field to `app` in `prime --format json`. Nested names are now `activeAppRoot`, `cliApp`, and `legacyAppRoot`; this is a breaking JSON output change.
66
73
  - Added v2/v3 coexistence warning to the orientation attention list when a v2 managed app is detected at the app home alongside a v3 CLI runtime. Uses the existing "pick one line" contract message from `references/cli/coexistence-probe.yaml`.
67
74
  - Promoted English names to canonical v3 capability IDs (`status`, `vision`, `discuss`, `research`, `plan`, `build`, `optimize`, `audit`, `document`, `profile`, `design`, `orchestrate`) and retired Swedish `-era` IDs from the active command surface.
68
75
  - Removed top-level `hej`, `describe`, `gate`, and routine-state names from the v3 command tree; use `prime`, `schema`, `check`, and `state` namespaces.
76
+ - Replaced the Python managed-app entrypoint on the development channel with the npm self-contained model; `upgrade --channel development` rewires runtime hooks to `npx -y agentera@next` and runs irreversible v2→v3 cleanup when previewed with `--dry-run` and applied with `--yes`.
77
+ - Enforced the single-name protocol boundary: capability instructions live in `packages/cli/src/capabilities/<name>/instructions.ts` (`instruction_module` in the capability contract), startup JSON is `agentera prime --context <name> --format json`, and storage paths use canonical `.agentera/*.yaml` names instead of legacy Markdown artifact filenames in protocol surfaces.
78
+ - Split `capabilityContext`, `startupAnalysis`, `extractCorpus`, `doctor`, `state`, `codex`, `compaction`, and `validateArtifact` into focused submodules so every `packages/cli/src/**/*.ts` file stays at or under 1000 lines.
79
+ - Grouped CLI help and dispatch under audience namespaces (`state`, `report`, `check`) with `prime` as the default orientation entry; `agentera --help` lists only canonical top-level commands while legacy invocations still delegate with stderr deprecation.
69
80
 
70
81
  ### Fixed
71
82
 
83
+ - Fixed the npm shim to diagnose a configured `AGENTERA_HOME` whose managed script is missing or not runnable before continuing through repository and `uvx` fallback resolution.
84
+ - Fixed `agentera check lint` to report findings without failing by default, fail the same findings with `--strict`, and keep invalid input, authority failures, and validated plan publication nonzero.
85
+ - Fixed schema/runtime alias parity: introspection now advertises exactly the six Phase 3 transitional aliases, Build startup and compaction guidance use canonical `agentera check compact`, check/fix output reports `command: "check compact"`, top-level `compact` remains behavior-compatible, and removed names such as `gate` return structured runnable corrections.
86
+ - Fixed archive-only plan catalogs to expose executable list/get recovery, plan-task cursors to validate explicit plan selectors before lookup, and legacy plan text to omit oversized whole rows instead of truncating Unicode scalars.
87
+ - Fixed bounded plan and experiment retrieval to declare legacy projection omissions with public recovery, enforce plan-task YAML byte limits, reject wrong-family and wrong-objective cursors, and fail closed when plan snapshot diagnostics change.
88
+ - Fixed experiment snapshot cursors to survive append-driven 10/40/50 full-to-summary and summary-to-drop rollover when immutable archives prove original identities unchanged, while still rejecting mutations, deletion, archive damage, and unsubstantiated rollover.
89
+ - Fixed `packages/cli/src/state/archivePublication.ts` to fsync each newly created archive directory entry and reconstruct missing experiment archives from exact full projection replays before success.
90
+ - Fixed generic `agentera state experiments explain --format json` discovery to return the valid `publish` operation instead of rejecting an invalid `append` default.
91
+ - Fixed plan-list entries to declare full-detail availability, enforced the 32 KiB serialized output budget for YAML as well as JSON, and synchronized retrieval implementation status across authority, schema introspection, help, and runtime behavior.
92
+ - Fixed `agentera state plan --help` to match task-get authority and runtime behavior: `--plan` is optional and omission defaults retrieval to the active plan.
93
+ - Fixed TODO compaction to require one `## ✓ Resolved` section, retain the
94
+ newest 10 full-detail and 40 summarized rows before dropping older rows, and
95
+ clarify that Git recovery applies only to previously committed content.
96
+ - Fixed prime dashboard, sparse, and capability startup output to truncate strings at Unicode code-point boundaries instead of splitting emoji surrogate pairs.
97
+ - Fixed full-plan task guidance and startup metadata to use lifecycle and coherence boundaries instead of a fixed task-count ceiling; typed publication still validates task identity and dependencies.
98
+ - Fixed `agentera state plan create` and `archive` publication to use stable archive identities across retries, validate final serialized bytes with strict prose lint and schema checks, and retain canonical `overall acceptance` vocabulary.
99
+ - Fixed `agentera state plan`: `set-status --task` accepts task values, and `set-plan-status` accepts `open` or `complete`.
100
+ - Fixed plan discovery to derive activity from canonical paths: archive-only history returns a complete empty current-plan state with a bounded history catalog, cannot trigger a Build completion sweep, and no longer degrades into omitted current tasks without a retrieval route; next work is dependency-ready, lifecycle diagnostics are shared, and evaluator state is retry-safe through `state plan record-evaluation`.
72
101
  - Fixed lifecycle retries after partial writes, stale locks, ownership-journal publication interruption, malformed/forked history, and dependency failures so completed operations remain safe and pending operations converge without adopting user-owned files.
73
102
  - Fixed state writes rejecting legacy scalar health archives, accepting missing or circular plan dependencies, following symlinked lock/archive directories outside the project, and advertising invalid plan mutation examples.
74
103
  - Fixed `cliDistributionMajor` silently defaulting to v2 when `registry.json` version-authority was missing or corrupted. The function now reads `package.json#version` as a secondary signal before falling back to 2, and emits a one-time stderr diagnostic when both primary and secondary signals miss — preventing v3 installs with corrupted registry assets from being misclassified as v2 in runtime inference, cross-major boundary detection, channel resolution, and next-major doctor rendering.
75
104
  - Fixed `pnpm install` failing on hosts with a system-wide `vips` (Arch, Fedora, Nix with vips overlay, Homebrew on macOS): sharp's `useGlobalLibvips()` check returned true and the install hook fell through to a `node-gyp` source build that needed `node-addon-api`. Migrated the deprecated `pnpm.onlyBuiltDependencies` and `pnpm.overrides` from `package.json#pnpm` to `pnpm-workspace.yaml` (pnpm 10+ ignores the legacy key) and added a `preinstall` hook that re-execs `pnpm install` with `SHARP_IGNORE_GLOBAL_LIBVIPS=true` so sharp's prebuilt binary is always used.
76
105
  - Fixed `pnpm install` emitting `Failed to replace env in config: ${NPM_TOKEN}` on every invocation: scoped the npm auth config from repo root to `packages/cli/.npmrc`. Both publishing packages (the `agentera` 3.0 CLI on `@next` and the `agentera` 0.0.x shim on `@latest`) find the auth via npm's parent-directory walk; `pnpm install` from the repo root no longer reads any auth-bearing `.npmrc`.
77
-
78
- ### Migration notes
79
-
80
- - **npm shim 0.0.2 v3 deprecation hint**: the `agentera@0.0.2` npm shim on `@latest` now emits a three-line stderr banner on every invocation pointing users to `npx -y agentera@next prime` for the v3 TypeScript CLI. `--help` lists the `@next` command; the install-help failure path leads with the `@next` pointer; `--version` stays banner-free so `--json` and pipe consumers stay clean. Set `AGENTERA_NO_V3_HINT=1` to suppress for CI and scripted invocations.
81
- - **npm shim 0.0.0 cwd preservation**: the `agentera@0.0.0` npm shim on `@latest` now forwards the user's working directory to the installed Python CLI for the `app-home` backend, so `npx -y agentera` state and prime reads resolve the project's `.agentera/` artifacts instead of the app home. The shim remains the 2.x transitional entry point; the native TypeScript CLI is `npx -y agentera@next` until the 3.0 cutover graduates `@latest`.
82
-
83
- ## [3.0.0-dev.0] · 2026-06-04
84
-
85
- ### Key highlights
86
-
87
- - **npm TypeScript CLI**: `npx -y agentera@next` ships a self-contained package (`dist/bin/agentera.js` plus `bundle/` with skills, schemas, and `registry.json`) with no repo checkout, no Python, and no `AGENTERA_HOME` for normal use; `agentera prime`, `agentera state <name>`, `agentera check validate`, `agentera doctor`, and `agentera upgrade` run from the published tarball.
88
- - **Audience-namespace command tree**: top-level `--help` groups `prime`, `schema`, `state`, eleven capability routing commands, `upgrade`, `doctor`, `report`, and `check`; legacy top-level names (`hej`, `describe`, `plan`, `validate`, …) still forward with a one-line stderr alias to the canonical command.
89
- - **v2→v3 migration preflight**: v3 `upgrade --channel development` reads `{app_home}/v3-handoff.json` when present (written by the stable v2 CLI) to classify preserved user state in under 100ms, with a full app-home scan fallback when the manifest is missing or invalid.
90
- - **Coexistence doctor warnings**: `agentera doctor` prepends a `Coexistence` section when a v2 managed app home sits beside a v3 npm install (and the stable v2 CLI emits the symmetric warning when npm `@next` is present); both use `references/cli/coexistence-probe.yaml` with three resolution choices.
91
- - **Bun single-binary build**: `bash scripts/single-binary.sh` compiles `packages/cli/dist/bin/agentera.js` into `packages/cli/dist/bin/agentera-single-binary` after `pnpm -C packages/cli build` and `bundle:data`, for drop-in executables without a Node install.
92
-
93
- ### Added
94
-
95
- - Added the native TypeScript CLI on the npm development channel (`npx -y agentera@next`), bundling app data at pack time via `prepack` (`tsc` + `scripts/copy-bundle.mjs`) and the `.agentera-npx-bundle.json` sentinel checked by `packages/cli/test/packaging/prepack.test.ts`.
96
- - Added `bash scripts/single-binary.sh` and the packaging contract in `docs/packaging/v3-packaging.md` for Bun `--compile` single-binary delivery alongside the npm tarball.
97
- - Added `packages/cli/src/migrate/v2HandoffManifest.ts` to read `v3-handoff.json` during v2→v3 cleanup preflight per `references/cli/v3-handoff-manifest.schema.yaml`.
98
- - Added v3 `agentera doctor` coexistence detection in `packages/cli/src/upgrade/coexistenceProbe.ts` with regression coverage in `packages/cli/test/cli/coexistenceProbe.test.ts`.
99
- - Added maintainer gates under `agentera check` (`validate`, `verify`, `lint`, `compact`) with JSON parity oracles for validate families, verify eval targets, invalid-input envelopes, and `source_contract` emissions on `prime`, `prime --context`, `state plan`, and `state query --list-artifacts`.
100
- - Added per-channel `next_major` metadata in `references/cli/update-channels.yaml` and a six-line successor advisory at the head of `agentera doctor` on the stable channel, sourced from `packages/cli/src/upgrade/nextMajorDoctor.ts`.
101
- - Added a 1000-line monolith lint regression in `packages/cli/test/lint/monolithLint.test.ts` after splitting the eight largest `packages/cli/src/**/*.ts` modules by responsibility.
102
-
103
- ### Changed
104
-
105
- - Replaced the Python managed-app entrypoint on the development channel with the npm self-contained model; `upgrade --channel development` rewires runtime hooks to `npx -y agentera@next` and runs irreversible v2→v3 cleanup when previewed with `--dry-run` and applied with `--yes`.
106
- - Enforced the single-name protocol boundary: capability instructions live in `packages/cli/src/capabilities/<name>/instructions.ts` (`instruction_module` in the capability contract), startup JSON is `agentera prime --context <name> --format json`, and storage paths use canonical `.agentera/*.yaml` names instead of legacy Markdown artifact filenames in protocol surfaces.
107
- - Split `capabilityContext`, `startupAnalysis`, `extractCorpus`, `doctor`, `state`, `codex`, `compaction`, and `validateArtifact` into focused submodules so every `packages/cli/src/**/*.ts` file stays at or under 1000 lines.
108
- - Grouped CLI help and dispatch under audience namespaces (`state`, `report`, `check`) with `prime` as the default orientation entry; `agentera --help` lists only canonical top-level commands while legacy invocations still delegate with stderr deprecation.
109
-
110
- ### Fixed
111
-
112
106
  - Fixed v3 `agentera upgrade` skipping in-tree `.cursor/agents/*.md` copy-agent steps when the project already uses v3 capability instruction modules, so managed Cursor agents keep `Run agentera prime --context <name> --format json` instead of regressing to `Read …/capabilities/<name>/instructions.md`.
113
107
  - Fixed `agentera prime --context orkestrera --format json` returning empty `dependency_ready_tasks` when plan `depends_on` references were complete but normalized differently from task numbers.
114
108
  - Fixed v2→v3 migration tests leaking OpenCode skill symlinks into the developer's real home by requiring `MigrationContext.env` in `planRuntimeMigrationItems` and adding `noHomeLeak.test.ts`.
@@ -116,10 +110,18 @@
116
110
 
117
111
  ### Removed
118
112
 
113
+ - Removed Claude Code as an active runtime, runtime selector, installation target, plugin marketplace, and default analytics source. Historical transcript parsing remains available only with explicit `--import-source claude` consent and inactive provenance.
114
+ - Removed `cursor-agent` as an independent runtime identity. Its binary and corpus source now map to the single `cursor` identity.
115
+ - Removed `rootStatus` from public JSON output (`prime --format json` and `doctor --format json`). The field remains internal for classifier logic but is no longer exposed in diagnostic output.
119
116
  - Removed v1 legacy migration paths, standalone skill bundle wording, and obsolete v1 fixture assumptions from the 3.x tree after the 3.0 boundary (`packages/cli/test/cli/v1LegacyCruft.test.ts` guards against reintroduction).
120
- - Removed `hej`, `describe`, and `gate` from top-level `agentera --help`; use `agentera prime`, `agentera schema`, and `agentera check compact` instead (legacy names still run with a stderr alias).
117
+ - Removed `hej`, `describe`, and `gate` from top-level `agentera --help` and dispatch; unsupported structured requests return runnable corrections to `agentera prime`, `agentera schema`, and `agentera check compact`.
121
118
  - Removed the requirement for `uv` or a git checkout on the development channel; `uvx --from git+https://github.com/jgabor/agentera@main agentera` remains the stable 2.x Python line only.
122
119
 
120
+ ### Migration notes
121
+
122
+ - **npm shim 0.0.2 v3 deprecation hint**: the `agentera@0.0.2` npm shim on `@latest` now emits a three-line stderr banner on every invocation pointing users to `npx -y agentera@next prime` for the v3 TypeScript CLI. `--help` lists the `@next` command; the install-help failure path leads with the `@next` pointer; `--version` stays banner-free so `--json` and pipe consumers stay clean. Set `AGENTERA_NO_V3_HINT=1` to suppress for CI and scripted invocations.
123
+ - **npm shim 0.0.0 cwd preservation**: the `agentera@0.0.0` npm shim on `@latest` now forwards the user's working directory to the installed Python CLI for the `app-home` backend, so `npx -y agentera` state and prime reads resolve the project's `.agentera/` artifacts instead of the app home. The shim remains the 2.x transitional entry point; the native TypeScript CLI is `npx -y agentera@next` until the 3.0 cutover graduates `@latest`.
124
+
123
125
  ## [2.7.7] · 2026-06-03
124
126
 
125
127
  ### Changed
@@ -460,7 +462,7 @@
460
462
  - 2.3.4 patch release readiness is recorded locally without publication, installed app refresh, tag, or remote push; version-bearing package, plugin, registry, lockfile, OpenCode marker, and skill frontmatter surfaces are aligned.
461
463
  - PLAN artifact fallback closeout is synchronized without a selected release target:
462
464
  focused CLI/contract tests passed with 88 selected tests, `agentera plan
463
- --format json --fields source_contract` reports
465
+ --format json --fields source_contract` reports
464
466
  `complete_for_plan_artifact=true` and `raw_artifact_reads_required=false`, the
465
467
  mixed-window benchmark recorded `245` estimated redundant tokens saved versus
466
468
  the previous row, and a clean post-fix probe produced zero raw/redundant
package/bundle/README.md CHANGED
@@ -93,6 +93,23 @@ agentera state query --list-artifacts
93
93
  agentera state progress explain --verb append --format json
94
94
  ```
95
95
 
96
+ Bounded collection retrieval uses stable identities, opaque snapshot cursors,
97
+ explicit omissions, and exact detail commands. The runtime contract is
98
+ [`references/artifacts/state-storage-authority.yaml`](./references/artifacts/state-storage-authority.yaml).
99
+
100
+ ```bash
101
+ agentera state plan list --format json
102
+ agentera state plan get --plan PLAN_ID --format json
103
+ agentera state plan tasks list --limit 20 --format json
104
+ agentera state experiments list --objective OBJECTIVE_ID --format json
105
+ agentera state experiments get --objective OBJECTIVE_ID --number N --format json
106
+ ```
107
+
108
+ Plan list/get spans the active plan and immutable plan archives. Plan task
109
+ list/get is active-plan-only. Experiment retrieval merges its bounded projection
110
+ with objective-owned immutable archives and reports detail as full, summary-only,
111
+ or unavailable.
112
+
96
113
  The standard project state is:
97
114
 
98
115
  - `.agentera/vision.yaml` — product direction
package/bundle/UPGRADE.md CHANGED
@@ -191,6 +191,44 @@ not select an Agentera runtime identity or limit lifecycle diagnosis. Use
191
191
  combined with `--only`. Development-channel dry-runs without `--runtime` still
192
192
  observe all active lifecycle runtimes.
193
193
 
194
+ ## Legacy state and optional Git enrichment
195
+
196
+ Project-state migration and historical Git enrichment are separate local
197
+ operations. Migration does not read Git, contact a remote, or remove its source
198
+ files. Its default inventory and `--dry-run` are read-only; apply requires the
199
+ exact artifact and entry selectors with `--apply --force`:
200
+
201
+ ```bash
202
+ npx -y agentera@next state migrate --project "$PWD" --artifact progress --number N --dry-run --format json
203
+ npx -y agentera@next state migrate --project "$PWD" --artifact progress --number N --apply --force --format json
204
+ ```
205
+
206
+ Git enrichment is optional. A preview is useful but not required before direct
207
+ apply. Inventory and preview may use the current working directory when
208
+ `--project` is omitted; direct apply must name `--project PATH` explicitly.
209
+ Apply revalidates the selected project, current `HEAD`, allowed-ref
210
+ reachability, candidate provenance and content, and the immutable archive target
211
+ immediately before publication:
212
+
213
+ ```bash
214
+ npx -y agentera@next state backfill --project "$PWD" --artifact progress --number N --dry-run --format json
215
+ npx -y agentera@next state backfill --project "$PWD" --artifact progress --number N --apply --force --format json
216
+ ```
217
+
218
+ The backfill contract is bounded to 100 result rows, 500 history units, and
219
+ 16 MiB of Git output. It inspects only `HEAD`, local heads, and tags; remote and
220
+ custom refs and operations are excluded. Returned provenance keeps the commit,
221
+ path, blob ID, stable entry ID, content hash, and reachability so a result can
222
+ be traced without adding commit fields to the archive record.
223
+
224
+ `complete`, `degraded`, `blocked`, and `unavailable` are explicit outcomes.
225
+ Changed, shallow, rewritten, ambiguous, corrupt, missing, bounded, unavailable,
226
+ and immutable-conflict results are reported rather than guessed. Resolve the
227
+ reported local condition and retry the same selectors; refused operations leave
228
+ active projections and existing archives unchanged, and identical publication
229
+ converges as a replay. The full command, limits, failure, recovery, and
230
+ traceability contract is `references/artifacts/state-storage-authority.yaml`.
231
+
194
232
  ## Verification and recovery
195
233
 
196
234
  After apply:
@@ -23,6 +23,13 @@ development pre-release suffix, but its `X.Y.Z` core must match the suite:
23
23
  `.opencode/package.json` is a runtime package manifest but intentionally has no
24
24
  suite-version field.
25
25
 
26
+ `packages/cli/package.json#agentera.gitRef` identifies the last substantive
27
+ package-source commit, not a later verification-only commit. Repository-local
28
+ release validation requires that commit to exist and compares the package
29
+ contract, compiled-source inputs, scripts, and bundled-data inputs against it.
30
+ Only the package version and `gitRef`, project state, and the release validator
31
+ implementing this check are excluded, avoiding a circular source reference.
32
+
26
33
  ## Active runtime manifests
27
34
 
28
35
  The runtime manifest set covers exactly OpenCode, Codex, Cursor, and GitHub