agentera 3.0.0-dev.22 → 3.0.0-dev.25

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 (274) hide show
  1. package/README.md +9 -5
  2. package/bundle/.cursor/agents/agentera.md +1 -1
  3. package/bundle/.opencode/agents/agentera.md +1 -1
  4. package/bundle/CHANGELOG.md +15 -5
  5. package/bundle/README.md +9 -8
  6. package/bundle/UPGRADE.md +10 -24
  7. package/bundle/agents/openai.yaml +1 -1
  8. package/bundle/references/adapters/package-manifest-interface-model.yaml +2 -0
  9. package/bundle/references/adapters/package-registry.yaml +9 -0
  10. package/bundle/references/artifacts/state-storage-authority.yaml +842 -15
  11. package/bundle/references/cli/agent-ready-state-contract.yaml +25 -17
  12. package/bundle/references/cli/prime-consumer-compatibility.yaml +676 -0
  13. package/bundle/references/cli/update-channels.yaml +4 -2
  14. package/bundle/references/cli/vocabulary-index.yaml +3 -3
  15. package/bundle/references/cli/vocabulary.md +14 -7
  16. package/bundle/skills/agentera/SKILL.md +35 -20
  17. package/bundle/skills/agentera/agents/audit.toml +1 -1
  18. package/bundle/skills/agentera/agents/build.toml +1 -1
  19. package/bundle/skills/agentera/agents/design.toml +1 -1
  20. package/bundle/skills/agentera/agents/discuss.toml +1 -1
  21. package/bundle/skills/agentera/agents/document.toml +1 -1
  22. package/bundle/skills/agentera/agents/optimize.toml +1 -1
  23. package/bundle/skills/agentera/agents/orchestrate.toml +1 -1
  24. package/bundle/skills/agentera/agents/plan.toml +1 -1
  25. package/bundle/skills/agentera/agents/profile.toml +1 -1
  26. package/bundle/skills/agentera/agents/research.toml +1 -1
  27. package/bundle/skills/agentera/agents/status.toml +1 -1
  28. package/bundle/skills/agentera/agents/vision.toml +1 -1
  29. package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +12 -12
  30. package/bundle/skills/agentera/capabilities/audit/schemas/validation.yaml +2 -2
  31. package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +12 -12
  32. package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +8 -8
  33. package/bundle/skills/agentera/capabilities/design/schemas/artifacts.yaml +6 -6
  34. package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +7 -7
  35. package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +12 -12
  36. package/bundle/skills/agentera/capabilities/optimize/schemas/artifacts.yaml +9 -9
  37. package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +11 -11
  38. package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +9 -9
  39. package/bundle/skills/agentera/capabilities/profile/schemas/artifacts.yaml +2 -2
  40. package/bundle/skills/agentera/capabilities/research/schemas/artifacts.yaml +3 -3
  41. package/bundle/skills/agentera/capabilities/status/schemas/artifacts.yaml +11 -11
  42. package/bundle/skills/agentera/capabilities/vision/schemas/artifacts.yaml +8 -8
  43. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +15 -2
  44. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +4 -1
  45. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +21 -21
  46. package/bundle/skills/agentera/schemas/artifacts/health.yaml +15 -2
  47. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +36 -15
  48. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +15 -2
  49. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +4 -4
  50. package/dist/capabilities/audit/instructions.js +13 -1
  51. package/dist/capabilities/audit/instructions.js.map +1 -1
  52. package/dist/capabilities/build/instructions.js +14 -1
  53. package/dist/capabilities/build/instructions.js.map +1 -1
  54. package/dist/capabilities/discuss/instructions.js +11 -1
  55. package/dist/capabilities/discuss/instructions.js.map +1 -1
  56. package/dist/capabilities/document/instructions.js +9 -1
  57. package/dist/capabilities/document/instructions.js.map +1 -1
  58. package/dist/capabilities/index.js +9 -8
  59. package/dist/capabilities/index.js.map +1 -1
  60. package/dist/capabilities/optimize/instructions.js +10 -1
  61. package/dist/capabilities/optimize/instructions.js.map +1 -1
  62. package/dist/capabilities/orchestrate/instructions.js +13 -2
  63. package/dist/capabilities/orchestrate/instructions.js.map +1 -1
  64. package/dist/capabilities/plan/instructions.js +10 -1
  65. package/dist/capabilities/plan/instructions.js.map +1 -1
  66. package/dist/capabilities/status/startupInstructions.js +35 -0
  67. package/dist/capabilities/status/startupInstructions.js.map +1 -0
  68. package/dist/cli/capabilityContext/build.js +3 -3
  69. package/dist/cli/capabilityContext/build.js.map +1 -1
  70. package/dist/cli/capabilityContext/closeout.js +5 -5
  71. package/dist/cli/capabilityContext/closeout.js.map +1 -1
  72. package/dist/cli/capabilityContext/contract.js +14 -19
  73. package/dist/cli/capabilityContext/contract.js.map +1 -1
  74. package/dist/cli/capabilityContext/evidence.js +7 -7
  75. package/dist/cli/capabilityContext/evidence.js.map +1 -1
  76. package/dist/cli/capabilityContext/planState.js +12 -11
  77. package/dist/cli/capabilityContext/planState.js.map +1 -1
  78. package/dist/cli/capabilityContext/progress.js +1 -1
  79. package/dist/cli/capabilityContext/progress.js.map +1 -1
  80. package/dist/cli/capabilityContext/shared.js +8 -2
  81. package/dist/cli/capabilityContext/shared.js.map +1 -1
  82. package/dist/cli/capabilityContext/slim.js +2 -1
  83. package/dist/cli/capabilityContext/slim.js.map +1 -1
  84. package/dist/cli/capabilityContext/startup.js +22 -11
  85. package/dist/cli/capabilityContext/startup.js.map +1 -1
  86. package/dist/cli/capabilityContext/types.js +4 -4
  87. package/dist/cli/capabilityContext/types.js.map +1 -1
  88. package/dist/cli/commands/backfill.js +39 -2
  89. package/dist/cli/commands/backfill.js.map +1 -1
  90. package/dist/cli/commands/durability.js +34 -1
  91. package/dist/cli/commands/durability.js.map +1 -1
  92. package/dist/cli/commands/entityMigrate.js +128 -0
  93. package/dist/cli/commands/entityMigrate.js.map +1 -0
  94. package/dist/cli/commands/migrate.js +4 -0
  95. package/dist/cli/commands/migrate.js.map +1 -1
  96. package/dist/cli/commands/prime/briefOrientation.js +584 -0
  97. package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
  98. package/dist/cli/commands/prime/collectEntityOrientation.js +148 -0
  99. package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -0
  100. package/dist/cli/commands/prime/collectOrientationState.js +21 -27
  101. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  102. package/dist/cli/commands/prime/orientationOutput.js +118 -24
  103. package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
  104. package/dist/cli/commands/prime.js +32 -3
  105. package/dist/cli/commands/prime.js.map +1 -1
  106. package/dist/cli/commands/query.js +41 -15
  107. package/dist/cli/commands/query.js.map +1 -1
  108. package/dist/cli/commands/schema.js +10 -34
  109. package/dist/cli/commands/schema.js.map +1 -1
  110. package/dist/cli/commands/state/decisions.js +13 -0
  111. package/dist/cli/commands/state/decisions.js.map +1 -1
  112. package/dist/cli/commands/state/docs.js +38 -0
  113. package/dist/cli/commands/state/docs.js.map +1 -1
  114. package/dist/cli/commands/state/experimentRecords.js +82 -0
  115. package/dist/cli/commands/state/experimentRecords.js.map +1 -1
  116. package/dist/cli/commands/state/experiments.js +13 -0
  117. package/dist/cli/commands/state/experiments.js.map +1 -1
  118. package/dist/cli/commands/state/get.js +69 -2
  119. package/dist/cli/commands/state/get.js.map +1 -1
  120. package/dist/cli/commands/state/health.js +13 -0
  121. package/dist/cli/commands/state/health.js.map +1 -1
  122. package/dist/cli/commands/state/index.js +9 -0
  123. package/dist/cli/commands/state/index.js.map +1 -1
  124. package/dist/cli/commands/state/list.js +40 -7
  125. package/dist/cli/commands/state/list.js.map +1 -1
  126. package/dist/cli/commands/state/objective.js +24 -0
  127. package/dist/cli/commands/state/objective.js.map +1 -1
  128. package/dist/cli/commands/state/plan.js +17 -2
  129. package/dist/cli/commands/state/plan.js.map +1 -1
  130. package/dist/cli/commands/state/planTasks.js +38 -25
  131. package/dist/cli/commands/state/planTasks.js.map +1 -1
  132. package/dist/cli/commands/state/plans.js +32 -16
  133. package/dist/cli/commands/state/plans.js.map +1 -1
  134. package/dist/cli/commands/state/progress.js +12 -0
  135. package/dist/cli/commands/state/progress.js.map +1 -1
  136. package/dist/cli/commands/state/shared.js.map +1 -1
  137. package/dist/cli/commands/state/todo.js +30 -0
  138. package/dist/cli/commands/state/todo.js.map +1 -1
  139. package/dist/cli/commands/state/write.js +79 -4
  140. package/dist/cli/commands/state/write.js.map +1 -1
  141. package/dist/cli/commands/upgrade.js +65 -31
  142. package/dist/cli/commands/upgrade.js.map +1 -1
  143. package/dist/cli/commands/upgradeVerify.js +46 -14
  144. package/dist/cli/commands/upgradeVerify.js.map +1 -1
  145. package/dist/cli/commands/validate.js +65 -0
  146. package/dist/cli/commands/validate.js.map +1 -1
  147. package/dist/cli/dispatch/check.js +8 -1
  148. package/dist/cli/dispatch/check.js.map +1 -1
  149. package/dist/cli/dispatch/index.js +6 -0
  150. package/dist/cli/dispatch/index.js.map +1 -1
  151. package/dist/cli/dispatch/lifecycle.js +2 -5
  152. package/dist/cli/dispatch/lifecycle.js.map +1 -1
  153. package/dist/cli/dispatch/prime.js +15 -0
  154. package/dist/cli/dispatch/prime.js.map +1 -1
  155. package/dist/cli/dispatch/state.js +7 -1
  156. package/dist/cli/dispatch/state.js.map +1 -1
  157. package/dist/cli/help.js +79 -21
  158. package/dist/cli/help.js.map +1 -1
  159. package/dist/cli/migrationRequired.js +84 -0
  160. package/dist/cli/migrationRequired.js.map +1 -0
  161. package/dist/cli/orientation/attention.js +2 -2
  162. package/dist/cli/orientation/attention.js.map +1 -1
  163. package/dist/cli/orientation.js +13 -10
  164. package/dist/cli/orientation.js.map +1 -1
  165. package/dist/cli/planArtifacts.js +192 -42
  166. package/dist/cli/planArtifacts.js.map +1 -1
  167. package/dist/cli/prime-blob.js +5 -5
  168. package/dist/cli/prime-blob.js.map +1 -1
  169. package/dist/cli/startupCompletenessContract.js +3 -3
  170. package/dist/cli/startupCompletenessContract.js.map +1 -1
  171. package/dist/cli/stateQuery.js +42 -5
  172. package/dist/cli/stateQuery.js.map +1 -1
  173. package/dist/hooks/compaction/status.js +25 -1
  174. package/dist/hooks/compaction/status.js.map +1 -1
  175. package/dist/hooks/cursorSessionStart.js +6 -0
  176. package/dist/hooks/cursorSessionStart.js.map +1 -1
  177. package/dist/hooks/sessionStart.js +62 -0
  178. package/dist/hooks/sessionStart.js.map +1 -1
  179. package/dist/registries/artifactRegistry.js +23 -14
  180. package/dist/registries/artifactRegistry.js.map +1 -1
  181. package/dist/registries/packageRegistry.js +1 -1
  182. package/dist/registries/packageRegistry.js.map +1 -1
  183. package/dist/state/archivePublication.js +3 -2
  184. package/dist/state/archivePublication.js.map +1 -1
  185. package/dist/state/decisionEntities.js +279 -0
  186. package/dist/state/decisionEntities.js.map +1 -0
  187. package/dist/state/decisionLegacyValidation.js +185 -0
  188. package/dist/state/decisionLegacyValidation.js.map +1 -0
  189. package/dist/state/decisionOverlay.js +26 -3
  190. package/dist/state/decisionOverlay.js.map +1 -1
  191. package/dist/state/decisionRevision.js +632 -0
  192. package/dist/state/decisionRevision.js.map +1 -0
  193. package/dist/state/decisionRevisionPublication.js +532 -0
  194. package/dist/state/decisionRevisionPublication.js.map +1 -0
  195. package/dist/state/directRetrieval.js +55 -4
  196. package/dist/state/directRetrieval.js.map +1 -1
  197. package/dist/state/durability.js +92 -1
  198. package/dist/state/durability.js.map +1 -1
  199. package/dist/state/entityCutover.js +390 -0
  200. package/dist/state/entityCutover.js.map +1 -0
  201. package/dist/state/entityCutoverGit.js +128 -0
  202. package/dist/state/entityCutoverGit.js.map +1 -0
  203. package/dist/state/entityMigrationPreview.js +803 -0
  204. package/dist/state/entityMigrationPreview.js.map +1 -0
  205. package/dist/state/entityPublicationContext.js +612 -0
  206. package/dist/state/entityPublicationContext.js.map +1 -0
  207. package/dist/state/entityStorage.js +807 -0
  208. package/dist/state/entityStorage.js.map +1 -0
  209. package/dist/state/experimentIdentity.js +23 -11
  210. package/dist/state/experimentIdentity.js.map +1 -1
  211. package/dist/state/gitBackfill.js.map +1 -1
  212. package/dist/state/healthEntities.js +227 -0
  213. package/dist/state/healthEntities.js.map +1 -0
  214. package/dist/state/healthEntityValidation.js +6 -0
  215. package/dist/state/healthEntityValidation.js.map +1 -0
  216. package/dist/state/legacyEntityCutoverEvidence.js +66 -0
  217. package/dist/state/legacyEntityCutoverEvidence.js.map +1 -0
  218. package/dist/state/listRetrieval.js +42 -11
  219. package/dist/state/listRetrieval.js.map +1 -1
  220. package/dist/state/objectiveExperimentEntities.js +321 -0
  221. package/dist/state/objectiveExperimentEntities.js.map +1 -0
  222. package/dist/state/planEntities.js +358 -0
  223. package/dist/state/planEntities.js.map +1 -0
  224. package/dist/state/progressEntities.js +382 -0
  225. package/dist/state/progressEntities.js.map +1 -0
  226. package/dist/state/projectRoot.js +63 -0
  227. package/dist/state/projectRoot.js.map +1 -0
  228. package/dist/state/projectionRecovery.js +458 -0
  229. package/dist/state/projectionRecovery.js.map +1 -0
  230. package/dist/state/retrievalAuthority.js +13 -6
  231. package/dist/state/retrievalAuthority.js.map +1 -1
  232. package/dist/state/safeProjectFile.js +153 -0
  233. package/dist/state/safeProjectFile.js.map +1 -0
  234. package/dist/state/startupProjection.js +68 -1
  235. package/dist/state/startupProjection.js.map +1 -1
  236. package/dist/state/stateMode.js +76 -0
  237. package/dist/state/stateMode.js.map +1 -0
  238. package/dist/state/todoDocsEntities.js +223 -0
  239. package/dist/state/todoDocsEntities.js.map +1 -0
  240. package/dist/state/todoDocsEntityValidation.js +26 -0
  241. package/dist/state/todoDocsEntityValidation.js.map +1 -0
  242. package/dist/state/write/candidateMutation.js +281 -0
  243. package/dist/state/write/candidateMutation.js.map +1 -0
  244. package/dist/state/write/explain.js +156 -33
  245. package/dist/state/write/explain.js.map +1 -1
  246. package/dist/state/write/helpers.js +22 -0
  247. package/dist/state/write/helpers.js.map +1 -1
  248. package/dist/state/write/lock.js +794 -87
  249. package/dist/state/write/lock.js.map +1 -1
  250. package/dist/state/write/mutation.js +47 -2
  251. package/dist/state/write/mutation.js.map +1 -1
  252. package/dist/state/write/operations.js +99 -6
  253. package/dist/state/write/operations.js.map +1 -1
  254. package/dist/state/write/planEvaluation.js +107 -0
  255. package/dist/state/write/planEvaluation.js.map +1 -0
  256. package/dist/state/write/planPublication.js +11 -55
  257. package/dist/state/write/planPublication.js.map +1 -1
  258. package/dist/state/write/transaction.js +111 -358
  259. package/dist/state/write/transaction.js.map +1 -1
  260. package/dist/upgrade/compatibility.js +4 -4
  261. package/dist/upgrade/compatibility.js.map +1 -1
  262. package/dist/upgrade/migrateArtifactsV2ToV3.js +13 -14
  263. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  264. package/dist/upgrade/upgradeOrchestrator.js +126 -23
  265. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  266. package/dist/validate/crossCapability.js +2 -2
  267. package/dist/validate/crossCapability.js.map +1 -1
  268. package/dist/validate/lifecycleAdapters/lifecycleMain.js +154 -0
  269. package/dist/validate/lifecycleAdapters/lifecycleMain.js.map +1 -0
  270. package/dist/validate/lifecycleAdapters.js +5 -156
  271. package/dist/validate/lifecycleAdapters.js.map +1 -1
  272. package/package.json +3 -3
  273. package/dist/upgrade/upgradeSnapshot.js +0 -93
  274. package/dist/upgrade/upgradeSnapshot.js.map +0 -1
@@ -1,24 +1,744 @@
1
1
  schema_version: agentera.stateStorageAuthority.v1
2
2
  status: active_authority
3
3
  purpose: >-
4
- Define the public bounded-retrieval vocabulary for every state collection
5
- while keeping each collection's storage authority explicit. It also defines
6
- the lossless numbered-archive, project path, direct state API, compatibility,
7
- projection, and serialized-output contracts for progress, decisions, and
8
- health, plus objective-scoped immutable archival for newly published
9
- experiments.
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.
10
8
  authority:
11
9
  source: references/artifacts/state-storage-authority.yaml
12
10
  single_source_rule: >-
13
11
  Runtime readers, writers, validators, tests, help, and capability source
14
12
  contracts may project this authority but must not create a second map of
15
13
  archive paths, API verbs, compatibility classes, mutable overlay fields,
16
- failure classes, or byte limits.
14
+ amendment revision paths, legacy label coexistence rules, failure classes,
15
+ or byte limits.
17
16
  implementation_boundary: >-
18
- This contract does not migrate legacy state or change existing plan and
19
- vision archive behavior. The maintenance-only Git backfill surface declared
20
- by api.backfill may inventory reachable local history and publish only an
21
- exact immutable archive record after explicit apply intent.
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 Git cutover, 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 implemented legacy
23
+ authority while that marker is absent. The maintenance-only Git backfill
24
+ surface declared by api.backfill remains a separate legacy repair operation
25
+ and is not the Decision 94 cutover.
26
+
27
+ entity_target:
28
+ status: progress_decisions_health_plan_objective_experiment_todo_and_docs_implemented_other_families_declared
29
+ decision: 94
30
+ activation: >-
31
+ This target becomes active persisted and structured state authority only
32
+ after entity_migration publishes a validated entity graph and writes the marker
33
+ last. Before then, legacy aggregates
34
+ remain migration input and explicitly labelled migration-evidence writer state;
35
+ ordinary public reads fail with migration_required instead of exposing them.
36
+ implementation_status:
37
+ progress: implemented
38
+ decisions: implemented
39
+ health: implemented
40
+ plan: implemented
41
+ objective: implemented
42
+ experiments: implemented
43
+ todo: implemented
44
+ docs: implemented
45
+ remaining_families: declared_not_implemented
46
+ rule: >-
47
+ Every implemented family selects entity behavior only when the durable
48
+ cutover marker is valid. Marker-absent ordinary consumers fail with
49
+ migration_required; the read-only migration preview and readiness checks do
50
+ not create entity state or write both authorities.
51
+ public_schema:
52
+ canonical_identity_field: id
53
+ canonical_classification_field: artifact
54
+ identity_and_classification_fields: [id, artifact]
55
+ entity_envelope:
56
+ required_fields: [id, artifact, record]
57
+ additional_identity_or_classification_fields: forbidden
58
+ forbidden_canonical_aliases:
59
+ - stable_id
60
+ - artifact_id
61
+ - entry_number
62
+ - number
63
+ - task_number
64
+ - experiment_number
65
+ - plan_id
66
+ - objective_id
67
+ - type_prefixed_id
68
+ exemptions:
69
+ - historical prose and immutable historical evidence
70
+ - internal TypeScript variable names that are not persisted or public structured output
71
+ - current pre-cutover contracts explicitly marked as implemented legacy authority
72
+ public_retrieval:
73
+ schema_version: agentera.entityPublicRetrieval.v1
74
+ status: final
75
+ commands:
76
+ progress:
77
+ list: agentera state progress list [--limit N] [--cursor TOKEN] --format json
78
+ get: agentera state progress get --id ID --format json
79
+ decisions:
80
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] --format json
81
+ get: agentera state decisions get --id ID --format json
82
+ health:
83
+ list: agentera state health list [--limit N] [--cursor TOKEN] --format json
84
+ get: agentera state health get --id ID --format json
85
+ plans:
86
+ list: agentera state plan list [--status open|complete|archived] [--limit N] [--cursor TOKEN] --format json
87
+ get: agentera state plan get --id ID --format json
88
+ plan_tasks:
89
+ list: agentera state plan tasks list [--limit N] [--cursor TOKEN] --format json
90
+ get: agentera state plan tasks get --id ID --format json
91
+ objective:
92
+ list: agentera state objective list [--limit N] [--cursor TOKEN] --format json
93
+ get: agentera state objective get --id ID --format json
94
+ experiments:
95
+ list: agentera state experiments list --objective ID [--limit N] [--cursor TOKEN] --format json
96
+ get: agentera state experiments get --id ID --format json
97
+ todo:
98
+ list: agentera state todo list [--limit N] [--cursor TOKEN] --format json
99
+ get: agentera state todo get --id ID --format json
100
+ docs:
101
+ list: agentera state docs list [--limit N] [--cursor TOKEN] --format json
102
+ get: agentera state docs get --id ID --format json
103
+ collections:
104
+ - { artifact: progress, identity: id, classification: artifact }
105
+ - { artifact: decisions, identity: id, classification: artifact }
106
+ - { artifact: health, identity: id, classification: artifact }
107
+ - { artifact: plan, boundary: plan, identity: id, classification: artifact }
108
+ - { artifact: plan, boundary: plan_task, identity: id, classification: artifact }
109
+ - { artifact: objective, identity: id, classification: artifact }
110
+ - { artifact: experiments, identity: id, classification: artifact }
111
+ - { artifact: todo, identity: id, classification: artifact }
112
+ - { artifact: docs, identity: id, classification: artifact }
113
+ identity:
114
+ scope: project_wide_across_all_entity_artifacts
115
+ alphabet: abcdefghijklmnopqrstuvwxyz
116
+ length: 10
117
+ accepted_pattern: '^[a-z]{10}$'
118
+ example: qjtrmnpvka
119
+ allocation: random_from_declared_alphabet
120
+ collision_rule: retry before publication; an existing ID is never reassigned or overwritten
121
+ prohibited_components: [prefix, sequence, timestamp, branch, writer, git_reference]
122
+ meaning_rule: >-
123
+ The ID is opaque and carries no artifact or entity-boundary information;
124
+ artifact is the sole public classification field.
125
+ storage_boundary:
126
+ rule: one independently mutable entity per writer-owned canonical file
127
+ aggregate_authority: forbidden
128
+ shared_primitives:
129
+ status: implemented
130
+ canonical_root: .agentera/entities
131
+ canonical_path_template: .agentera/entities/<artifact>/<boundary>/<id>.yaml
132
+ path_components: [artifact, boundary, id]
133
+ extension: .yaml
134
+ publication: exclusive_immutable_file
135
+ publication_context:
136
+ scope: shared_by_all_entity_families
137
+ binding: validated_project_root_and_exact_cutover_marker_snapshot
138
+ lifetime: mode_detection_through_writer_lock_and_final_publication_validation
139
+ pathname_race_contract: >-
140
+ Entity publication is rooted through held directory descriptors. The
141
+ root and exact valid marker identity and bytes are revalidated before
142
+ each directory, stage, and immutable-link boundary and after durable
143
+ publication before success. Because Node cannot make pathname
144
+ validation and mutation one kernel operation, a detected substitution
145
+ rolls back only attempt-owned links, stages, and empty directories by
146
+ pinned identity; final failure retains no attempt-owned entity state.
147
+ marker_change_after_detection: conflict_without_legacy_fallback
148
+ successor_preservation: never_remove_unmatched_or_unrelated_identity
149
+ allocation: provisional_candidate_until_publication
150
+ project_wide_id_claim:
151
+ synchronization: .agentera/.writer.lock
152
+ critical_section: final_project_wide_scan_through_durable_publication
153
+ interrupted_writer_recovery: dead_process_lock_reclamation
154
+ persistent_reservation: none
155
+ identical_replay: idempotent
156
+ replay_equality: recursive_key_sorted_logical_content_with_array_order_preserved
157
+ divergent_same_id: reject_without_overwrite
158
+ state_validation:
159
+ canonical_command: agentera check validate state
160
+ mutates: false
161
+ failure_exit: nonzero
162
+ diagnostics: bounded_structured_with_exact_recovery
163
+ same_entity_conflict: >-
164
+ Concurrent divergent edits to one entity remain an ordinary explicit file
165
+ conflict or validation conflict; no runtime silently selects a winner.
166
+ unrelated_entity_merge: >-
167
+ Independently created or changed entities occupy distinct canonical files
168
+ so ordinary Git can preserve both changes.
169
+ entities:
170
+ - boundary: progress_cycle
171
+ artifact: progress
172
+ independently_mutable: true
173
+ relationships: []
174
+ implementation: implemented
175
+ record:
176
+ required_fields: [timestamp, type, phase, what, context]
177
+ required_paths: [context.intent]
178
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
179
+ temporal_fields: [timestamp]
180
+ timestamp_format: 'YYYY-MM-DD HH:MM'
181
+ retrieval:
182
+ exact: agentera state progress get --id ID --format json
183
+ list: agentera state progress list [--limit N] [--cursor TOKEN] --format json
184
+ ordering: timestamp_desc_then_id_asc
185
+ default_limit: 20
186
+ maximum_limit: 100
187
+ max_utf8_bytes: 32768
188
+ cursor: opaque_snapshot_cursor
189
+ mutation_after_snapshot: cursor_snapshot_unavailable
190
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
191
+ scalar_truncation: forbidden
192
+ - boundary: decision
193
+ artifact: decisions
194
+ independently_mutable: true
195
+ relationships: []
196
+ implementation: implemented
197
+ publication: immutable
198
+ record:
199
+ required_fields: [date, question, context, alternatives, choice, reasoning, confidence]
200
+ required_paths: []
201
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, satisfaction]
202
+ retrieval:
203
+ exact: agentera state decisions get --id ID --format json
204
+ list: agentera state decisions list [--limit N] [--cursor TOKEN] --format json
205
+ ordering: date_desc_then_id_asc
206
+ default_limit: 20
207
+ maximum_limit: 100
208
+ max_utf8_bytes: 32768
209
+ cursor: opaque_snapshot_cursor
210
+ mutation_after_snapshot: cursor_snapshot_unavailable
211
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
212
+ scalar_truncation: forbidden
213
+ - boundary: decision_satisfaction
214
+ artifact: decisions
215
+ independently_mutable: true
216
+ relationships: [decision]
217
+ implementation: implemented
218
+ publication: replace_owned_entity
219
+ ownership: { fields: [decision], cardinality: zero_or_one }
220
+ record:
221
+ required_fields: [decision, state]
222
+ required_paths: []
223
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
224
+ - boundary: decision_revision
225
+ artifact: decisions
226
+ independently_mutable: true
227
+ includes: [amendment]
228
+ relationships: [decision]
229
+ implementation: implemented
230
+ publication: immutable
231
+ ownership: { fields: [decision, base_sha256], cardinality: zero_or_one }
232
+ record:
233
+ required_fields: [decision, date, provenance, base_sha256, changes]
234
+ required_paths: []
235
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, satisfaction]
236
+ - boundary: health_audit
237
+ artifact: health
238
+ independently_mutable: true
239
+ relationships: []
240
+ implementation: implemented
241
+ publication: immutable
242
+ record:
243
+ required_fields: [date, dimensions, findings_summary, trajectory, grades]
244
+ required_paths: []
245
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
246
+ retrieval:
247
+ exact: agentera state health get --id ID --format json
248
+ list: agentera state health list [--limit N] [--cursor TOKEN] --format json
249
+ ordering: date_desc_then_id_asc
250
+ default_limit: 20
251
+ maximum_limit: 100
252
+ max_utf8_bytes: 32768
253
+ cursor: opaque_snapshot_cursor
254
+ mutation_after_snapshot: cursor_snapshot_unavailable
255
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
256
+ scalar_truncation: forbidden
257
+ repair: >-
258
+ Canonical health audit entities are immutable and cannot be row-deduplicated.
259
+ Malformed envelopes, duplicate IDs, or conflicting ownership fail before effects
260
+ and recover through agentera check validate state; no repair event is fabricated.
261
+ - boundary: plan
262
+ artifact: plan
263
+ independently_mutable: true
264
+ relationships: []
265
+ implementation: implemented
266
+ publication: replace_owned_entity
267
+ record:
268
+ required_fields: [header, what, why, scope]
269
+ required_paths: [header.title, header.created, header.status]
270
+ forbidden_fields: [id, artifact, stable_id, plan_id, tasks, previous_plan_archived]
271
+ field_shapes:
272
+ scope:
273
+ type: mapping
274
+ required_fields:
275
+ included: string_list
276
+ excluded: string_list
277
+ optional_fields:
278
+ deferred: string_list
279
+ additional_fields: forbidden
280
+ legacy_source_normalization: >-
281
+ A block-style, non-flow, exactly-one-pair mapping used directly as
282
+ an included, excluded, or deferred sequence item is the historical
283
+ block-colon string encoding and normalizes to one `key: value`
284
+ string only when both source nodes are string scalars. Explicit
285
+ flow mapping syntax never normalizes and remains invalid under the
286
+ canonical validator. A deliberate block single-pair mapping is
287
+ syntactically indistinguishable from the legacy encoding and falls
288
+ under this source-form rule; no semantic intent is inferred.
289
+ retrieval:
290
+ exact: agentera state plan get --id ID --format json
291
+ list: agentera state plan list [--limit N] [--cursor TOKEN] --format json
292
+ ordering: created_desc_then_id_asc
293
+ default_limit: 20
294
+ maximum_limit: 100
295
+ max_utf8_bytes: 32768
296
+ cursor: opaque_snapshot_cursor
297
+ mutation_after_snapshot: cursor_snapshot_unavailable
298
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
299
+ scalar_truncation: forbidden
300
+ - boundary: plan_task
301
+ artifact: plan
302
+ independently_mutable: true
303
+ relationships: [plan, depends_on_tasks]
304
+ implementation: implemented
305
+ publication: replace_owned_entity
306
+ record:
307
+ required_fields: [plan, name, status, depends_on, acceptance]
308
+ required_paths: []
309
+ forbidden_fields: [id, artifact, number, task_number, stable_id, plan_id]
310
+ - boundary: objective
311
+ artifact: objective
312
+ independently_mutable: true
313
+ relationships: []
314
+ implementation: implemented
315
+ publication: replace_owned_entity
316
+ record:
317
+ required_fields: [header, objective, metric, baseline, scope]
318
+ required_paths: [header.title, header.status, objective.description, objective.measurement]
319
+ forbidden_fields: [id, artifact, stable_id, objective_id]
320
+ retrieval:
321
+ exact: agentera state objective get --id ID --format json
322
+ list: agentera state objective list [--limit N] [--cursor TOKEN] --format json
323
+ ordering: created_desc_then_id_asc
324
+ default_limit: 20
325
+ maximum_limit: 100
326
+ max_utf8_bytes: 32768
327
+ cursor: opaque_snapshot_cursor
328
+ mutation_after_snapshot: cursor_snapshot_unavailable
329
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
330
+ scalar_truncation: forbidden
331
+ - boundary: experiment
332
+ artifact: experiments
333
+ independently_mutable: true
334
+ relationships: [objective]
335
+ implementation: implemented
336
+ publication: immutable
337
+ baseline:
338
+ field: status
339
+ value: baseline
340
+ cardinality: exactly_one_when_experiments_exist
341
+ record:
342
+ required_fields: [objective, date, label, hypothesis, method, change, metric, regression, status, conclusion]
343
+ required_paths: [objective, date, label, status]
344
+ forbidden_fields: [id, artifact, number, experiment_number, stable_id, objective_id]
345
+ retrieval:
346
+ exact: agentera state experiments get --id ID --format json
347
+ list: agentera state experiments list --objective ID [--limit N] [--cursor TOKEN] --format json
348
+ ordering: date_desc_then_id_asc
349
+ default_limit: 20
350
+ maximum_limit: 100
351
+ max_utf8_bytes: 32768
352
+ cursor: opaque_snapshot_cursor
353
+ mutation_after_snapshot: cursor_snapshot_unavailable
354
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
355
+ scalar_truncation: forbidden
356
+ - boundary: todo_item
357
+ artifact: todo
358
+ independently_mutable: true
359
+ relationships: []
360
+ implementation: implemented
361
+ publication: replace_owned_entity
362
+ record:
363
+ required_fields: [severity, status, description]
364
+ required_paths: []
365
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number, path]
366
+ retrieval:
367
+ exact: agentera state todo get --id ID --format json
368
+ list: agentera state todo list [--limit N] [--cursor TOKEN] --format json
369
+ ordering: severity_then_status_then_id
370
+ default_limit: 20
371
+ maximum_limit: 100
372
+ max_utf8_bytes: 32768
373
+ cursor: opaque_snapshot_cursor
374
+ mutation_after_snapshot: cursor_snapshot_unavailable
375
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
376
+ scalar_truncation: forbidden
377
+ - boundary: documentation_inventory_entry
378
+ artifact: docs
379
+ independently_mutable: true
380
+ relationships: []
381
+ implementation: implemented
382
+ publication: replace_owned_entity
383
+ record:
384
+ required_fields: [document, path, last_updated, status]
385
+ required_paths: []
386
+ forbidden_fields: [id, artifact, number, stable_id, artifact_id, entry_number]
387
+ retrieval:
388
+ exact: agentera state docs get --id ID --format json
389
+ list: agentera state docs list [--limit N] [--cursor TOKEN] --format json
390
+ ordering: path_then_id
391
+ default_limit: 20
392
+ maximum_limit: 100
393
+ max_utf8_bytes: 32768
394
+ cursor: opaque_snapshot_cursor
395
+ mutation_after_snapshot: cursor_snapshot_unavailable
396
+ omission: whole_entries_only_with_count_reason_continuation_and_exact_get
397
+ scalar_truncation: forbidden
398
+ relationships:
399
+ representation: bare target entity ID in the named record field
400
+ integrity: every non-null target must resolve to exactly one entity with the declared target boundary
401
+ unresolved_behavior: whole-state validation and migration cutover fail without creating a target
402
+ declarations:
403
+ - source: decision_satisfaction
404
+ field: decision
405
+ target: decision
406
+ cardinality: exactly_one
407
+ - source: decision_revision
408
+ field: decision
409
+ target: decision
410
+ cardinality: exactly_one
411
+ - source: plan_task
412
+ field: plan
413
+ target: plan
414
+ cardinality: exactly_one
415
+ - source: plan_task
416
+ field: depends_on
417
+ target: plan_task
418
+ cardinality: zero_or_many_same_plan
419
+ - source: experiment
420
+ field: objective
421
+ target: objective
422
+ cardinality: exactly_one
423
+ views:
424
+ authority: non_authoritative_cli_rendering
425
+ mutation: forbidden
426
+ source: canonical entity files only after cutover
427
+ requirements:
428
+ - bounded lists expose id and artifact and provide exact get by id
429
+ - ordering and cursors bind to an explicit snapshot and never imply identity
430
+ - omissions expose counts, reasons, and exact retrieval commands
431
+ - nested plan/task and objective/experiment views are relationship projections
432
+ - startup views use the same entities and may omit detail only under declared budgets
433
+ intentional_singletons:
434
+ exhaustive: true
435
+ additions_require_authority_amendment: true
436
+ boundaries:
437
+ - boundary: vision
438
+ reason: one project north star; excluded from execution-cycle mutation
439
+ - boundary: design
440
+ reason: one project visual identity editorial artifact
441
+ - boundary: changelog
442
+ reason: one ordered release-history editorial artifact
443
+ - boundary: profile
444
+ reason: one reusable decision-profile document per selected profile
445
+ - boundary: runtime_local_session_state
446
+ reason: runtime-local and not canonical project entity state
447
+ - boundary: docs_mapping
448
+ reason: one project path and documentation-policy mapping, distinct from documentation inventory entries
449
+ conflict_rule: concurrent edits remain explicit whole-document conflicts
450
+ excluded_from_entity_migration:
451
+ - all intentional_singletons
452
+ - immutable historical prose and evidence, except structured references explicitly declared for rewrite
453
+ - genuinely singleton editorial artifacts added by an authority amendment
454
+ measurement_contract:
455
+ status: target_gate_not_yet_implemented
456
+ environment: Linux, Node.js 22 or newer, one cold CLI process per sample
457
+ fixtures:
458
+ small: 100 valid entities distributed across every declared entity boundary
459
+ large: 1000 valid entities distributed across every declared entity boundary
460
+ relationship_rule: every declared relationship has at least one valid fixture edge
461
+ sampling:
462
+ repetitions: 5
463
+ pass_rule: every repetition stays within every applicable limit
464
+ elapsed: wall-clock milliseconds from process start through complete serialized output
465
+ heap: process heapUsed peak minus heapUsed before fixture discovery
466
+ bytes: UTF-8 byte length of stdout including the trailing newline
467
+ targets:
468
+ exact_get:
469
+ max_latency_ms: 1000
470
+ max_heap_delta_bytes: 67108864
471
+ max_utf8_bytes: 1048576
472
+ bounded_list_small:
473
+ max_latency_ms: 5000
474
+ max_heap_delta_bytes: 67108864
475
+ max_utf8_bytes: 32768
476
+ bounded_list_large:
477
+ max_latency_ms: 15000
478
+ max_heap_delta_bytes: 268435456
479
+ max_utf8_bytes: 32768
480
+ startup_small:
481
+ max_latency_ms: 5000
482
+ max_heap_delta_bytes: 67108864
483
+ serialized_limits: budgets.startup.surfaces
484
+ startup_large:
485
+ max_latency_ms: 15000
486
+ max_heap_delta_bytes: 268435456
487
+ serialized_limits: budgets.startup.surfaces
488
+ failure_rule: >-
489
+ Over-budget results fail the target gate. They may return a measured
490
+ degraded envelope only where the referenced budget permits omission; they
491
+ never truncate bytes, omit required identity, or fabricate detail.
492
+
493
+ entity_migration:
494
+ status: one_way_git_cutover_implemented
495
+ decision: 94
496
+ kind: single_full_upgrade_cutover
497
+ cutover_marker:
498
+ path: .agentera/state-mode.yaml
499
+ schema_version: agentera.stateMode.v1
500
+ entity_mode:
501
+ schemaVersion: agentera.stateMode.v1
502
+ mode: entities
503
+ absent_mode: legacy
504
+ invalid_behavior: fail_without_fallback
505
+ detection: read_only
506
+ publication_owner: development_channel_v2_to_v3_upgrade
507
+ invocation:
508
+ explicit_apply: full_upgrade_yes_only
509
+ dry_run: optional_read_only_preview
510
+ ordinary_reads_migrate: false
511
+ ordinary_writes_migrate: false
512
+ apply_invokes_git: true
513
+ read_only_command: >-
514
+ npx -y agentera@next upgrade --channel development --project "$PWD" --dry-run
515
+ apply_command: >-
516
+ npx -y agentera@next upgrade --channel development --project "$PWD" --yes
517
+ apply_boundary: >-
518
+ Full upgrade serializes through the project writer lock, stages and graph-
519
+ validates deterministic entities, publishes them without deleting a
520
+ canonical entity, and writes the authority marker last. There is no direct
521
+ entity apply, public operation ID, resume, rollback, or cross-major restore.
522
+ git_preflight:
523
+ required: true
524
+ project_root: exact_worktree_root
525
+ source: HEAD_commit
526
+ checkout: no_staged_modified_renamed_or_untracked_paths_except_exact_cutover_outputs
527
+ migration_inputs: regular_tracked_files_whose_bytes_and_executable_mode_match_HEAD
528
+ absent_input: absent_from_HEAD_and_worktree
529
+ ignored_or_untracked_input: refuse
530
+ verification: >-
531
+ Planning and apply resolve the current HEAD commit and prove every present
532
+ migration input is a safe regular tracked path whose bytes and executable
533
+ mode match that commit. Apply repeats the proof under the writer lock
534
+ before its first effect. Non-Git projects and dirty or unsupported source
535
+ state are refused before any selected upgrade effect.
536
+ upgrade_composition:
537
+ owner: development_channel_v2_to_v3_upgrade
538
+ selected_with: [full]
539
+ apply_consent: >-
540
+ The upgrade --yes consent derives all source and target bindings in
541
+ process. Users provide no hashes, approval files, migration IDs, --force,
542
+ or additional cutover consent. Any --only apply is rejected at this
543
+ cross-major boundary.
544
+ interruption: >-
545
+ Before forward-manifest publication, a rerun may discard only the fixed
546
+ migration-owned staging path and recompute it from the same Git-bound
547
+ source. After manifest or canonical publication, a rerun validates the
548
+ manifest binding and every existing canonical target, republishes only
549
+ missing targets from recomputed staging, validates the graph, and finishes
550
+ the marker forward. It never deletes canonical entities.
551
+ completed: >-
552
+ A valid entity marker makes legacy authority permanently inactive.
553
+ Repeated upgrade validates current entity state and reports a no-op;
554
+ normal entity writes may evolve records without reopening cutover.
555
+ preflight: >-
556
+ Upgrade plans artifact normalization, entity readiness, runtime work,
557
+ and cleanup read-only before any selected apply function runs. Any
558
+ blocker prevents every selected effect.
559
+ phase_filters: >-
560
+ Every --only apply is invalid during a v2-to-v3 boundary. Read-only
561
+ filtered preview may remain available.
562
+ legacy_projection: >-
563
+ Canonical v2 YAML and already-resolved v1 conversions are inventoried
564
+ directly. A pending v1 Markdown conversion is not projected through a
565
+ prerequisite write during planning and therefore blocks the composed
566
+ apply before effects.
567
+ lifecycle_normalization: >-
568
+ Deterministic legacy plan lifecycle normalization is part of entity
569
+ projection during cutover. Upgrade retains the original legacy YAML as
570
+ source and recovery evidence instead of rewriting it first.
571
+ empty_state: valid_empty_initialization
572
+ existing_entity_state: validate_then_no_op
573
+ source_scope:
574
+ included_entities: entity_target.entities
575
+ included_structured_relationships: entity_target.relationships.declarations
576
+ preserved_singletons: entity_target.intentional_singletons.boundaries
577
+ sources: >-
578
+ Current canonical files, verified immutable archives, overlays, revisions,
579
+ and validated source evidence are inventoried together without changing
580
+ their pre-cutover authority. Every present input must be recoverable from
581
+ the pinned Git commit.
582
+ recovered_projection_correlation: >-
583
+ Every archive carrying recovery_provenance must match the immutable
584
+ .agentera/archive/recovery/projection-correlation.yaml recovery set by
585
+ identity, archive bytes, final record SHA-256, parent/child Git proof or
586
+ legacy converter/source proof, current projection bytes, and overlay.
587
+ Missing, changed, new, replaced, or unlisted recovery evidence blocks.
588
+ internal_migration_diagnostic: true
589
+ read_only_preview:
590
+ implementation: implemented
591
+ ordering: artifact_then_boundary_then_source_identity_then_source_path
592
+ filter: complete_declared_inventory
593
+ source_fingerprint: >-
594
+ SHA-256 over canonical JSON containing every declared source path's
595
+ project-relative name, presence, byte length, byte SHA-256, permission
596
+ mode, regular-file type, device, and inode from one verified open
597
+ descriptor. Missing declared roots are represented explicitly with null
598
+ identity. No mtime, Git value, or cache participates.
599
+ project_root: >-
600
+ The selected root must exist, be a directory, and resolve without a
601
+ symbolic-link root or symbolic-link traversal. Failure is structured and
602
+ occurs before inventory or effects.
603
+ recursive_roots: >-
604
+ Every declared archive and objective inventory root is lstat-validated
605
+ before traversal and again when recursion enters it. Existing symbolic
606
+ links and non-directories are project-bound inventory failures; their
607
+ targets are never inventoried.
608
+ authority_binding: >-
609
+ The preview records the active state-storage authority schema version and
610
+ byte SHA-256. The complete preview digest includes both values, so any
611
+ authority-only change invalidates approval before an apply effect.
612
+ proposed_id: >-
613
+ Preview-only ten-letter candidates are deterministically allocated from a
614
+ domain-separated SHA-256 of the complete source fingerprint and canonical
615
+ source key. This is allocation of a new opaque target candidate, not
616
+ reconstruction of a missing source ID. A collision is a blocker. Apply
617
+ preserves the deterministic mapping in staged canonical paths and the
618
+ bounded forward manifest before canonical publication.
619
+ preview_digest: >-
620
+ SHA-256 over canonical JSON of the complete unbounded inventory, proposed
621
+ mapping, authority-validated final envelope byte SHA-256 values,
622
+ relationship rewrite map, counts, blockers, and source
623
+ fingerprint plus the project selector, complete-source filter, declared
624
+ order, and migration-authority binding before output omission.
625
+ target_validation: >-
626
+ Before preview can be ready or produce an approvable digest, every proposed
627
+ final envelope, record, public field vocabulary, and relationship graph is
628
+ validated through the same authority-backed canonical target validator used
629
+ defensively by upgrade apply and forward continuation. A target failure is a corrupt blocker tied
630
+ to its source identity and recovery action; preserved nonentity residues are
631
+ excluded from target validation and publication.
632
+ output:
633
+ max_utf8_bytes: 32768
634
+ default_limit: 100
635
+ maximum_limit: 1000
636
+ omission: whole entries and diagnostics only
637
+ scalar_truncation: forbidden
638
+ required_omission_fields: [omitted, omitted_count, omission_reason, retrieval]
639
+ recovery: >-
640
+ --after SOURCE_IDENTITY advances from the last whole logical identity
641
+ returned only when accompanied by that page's --source-fingerprint and
642
+ --preview-digest. The digest binds the project selector, complete-source
643
+ filter, authority-declared order, migration authority, and complete
644
+ source snapshot. Any mismatch refuses continuation with a command that
645
+ omits --after and restarts from the current snapshot. Diagnostics travel
646
+ with their owning entry, so repeated use of retrieval.command recovers
647
+ every later omitted entry and diagnostic.
648
+ counts:
649
+ physical_records: every observed record before identity grouping
650
+ logical_identities: every source identity after grouping
651
+ mirrors: excess canonical-identical physical records grouped under one logical identity
652
+ duplicates: excess divergent physical records claiming one logical identity
653
+ conflicts: logical identities with divergent candidates plus proposed-target collisions
654
+ zero_write: >-
655
+ Inventory, preview, malformed-input handling, and source-binding checks
656
+ open no writer or upgrade lock and create no directory, temporary file,
657
+ mapping, snapshot, journal, cache, or state file.
658
+ binding: >-
659
+ Before any apply effect, recompute the complete preview and require its
660
+ source fingerprint and preview digest to match the Git-pinned preparation
661
+ or retained forward manifest. A mismatch refuses every selected effect.
662
+ source_outcomes:
663
+ valid_full:
664
+ outcome: ready
665
+ rule: map one complete validated source entity and every relationship exactly once
666
+ canonical_mirror:
667
+ outcome: ready_with_mirrored_provenance
668
+ rule: group canonical-identical physical records as one logical identity and retain every provenance class
669
+ degraded_recoverable:
670
+ outcome: ready_with_provenance
671
+ rule: admit only independently validated full detail and record its recovery provenance
672
+ summary_only_or_missing_detail:
673
+ outcome: blocked
674
+ rule: retain evidence and stop before publication; never reconstruct omitted fields
675
+ ambiguous_or_duplicate_identity:
676
+ outcome: blocked
677
+ rule: retain every candidate and require explicit disposition; never choose by order or recency
678
+ proposed_target_conflict:
679
+ outcome: blocked
680
+ rule: retain every colliding logical identity and allocate no winner
681
+ corrupt_or_unresolved_relationship:
682
+ outcome: blocked
683
+ rule: report the exact source and recovery action; never publish a partial graph
684
+ unsupported:
685
+ outcome: blocked
686
+ rule: preserve bytes and report the unsupported source contract
687
+ non_fabrication:
688
+ forbidden:
689
+ - synthetic entities for missing source detail
690
+ - inferred IDs from order, numbers, paths, timestamps, branches, writers, or Git references
691
+ - guessed relationship targets
692
+ - silent dropping, deduplication, or winner selection
693
+ partial_cutover_success: forbidden
694
+ forward_state:
695
+ root: .agentera/migrations/entities
696
+ staging: .agentera/migrations/entities/staging
697
+ manifest: .agentera/migrations/entities/forward.yaml
698
+ manifest_schema_version: agentera.entityCutoverManifest.v1
699
+ manifest_fields: [schemaVersion, phase, source, targets, marker]
700
+ source_fields: [head, source_fingerprint, preview_digest]
701
+ target_fields: [path, sha256]
702
+ marker_fields: [path, sha256]
703
+ phases: [publishing_entities, entities_published]
704
+ forbidden_fields:
705
+ - operation_id
706
+ - migration_id
707
+ - snapshots
708
+ - source_bytes
709
+ - inode_receipts
710
+ - rollback_state
711
+ publication_order: staging_then_forward_manifest_then_entities_then_marker
712
+ historical_evidence: >-
713
+ Already committed .agentera/migrations content is inert and remains
714
+ byte-for-byte untouched. Read-only legacy manifest parsing is retained only
715
+ for public validation of entity markers created by the former cutover.
716
+ fault_test_hook: >-
717
+ Tests may set NODE_ENV=test and
718
+ AGENTERA_FAULT_INJECT_ENTITY_MIGRATION_AFTER_PHASE to one declared durable
719
+ phase. Other environments ignore the variable.
720
+ lifecycle:
721
+ - phase: inventory
722
+ mutates: false
723
+ exit: every source entity and relationship is classified
724
+ - phase: preview
725
+ mutates: false
726
+ exit: proposed graph, mapping, outcomes, blockers, and digest are complete
727
+ - phase: git_preflight
728
+ mutates: false
729
+ exit: project root, HEAD, clean checkout, source bytes, types, and modes match
730
+ - phase: stage_entities
731
+ mutates: true
732
+ exit: deterministic entity bytes and graph validate under the fixed staging path
733
+ - phase: publishing_entities
734
+ mutates: true
735
+ exit: one bounded forward manifest exists and every canonical target matches or is published once
736
+ - phase: entities_published
737
+ mutates: false
738
+ exit: canonical source-to-target parity, uniqueness, ownership, relationships, and budgets pass
739
+ - phase: marker
740
+ mutates: true
741
+ exit: one durable marker activates entity_target and retires writable legacy authority
22
742
 
23
743
  scope:
24
744
  supported_artifacts:
@@ -421,7 +1141,7 @@ consumer_matrix:
421
1141
  access_contract:
422
1142
  startup: agentera prime --context <capability> --format json
423
1143
  list: agentera state <artifact-id> list --limit 20 --format json
424
- get: agentera state <artifact-id> get --number N --format json
1144
+ get: agentera state <artifact> get --id ID --format json
425
1145
  policy: >-
426
1146
  Use the bounded prime context first, then the bounded state list for
427
1147
  discovery and exact state get for requested detail. Raw artifact or Git
@@ -600,7 +1320,7 @@ identity:
600
1320
  accepted_pattern: '^(progress|decisions|health):[1-9][0-9]*$'
601
1321
  example: decisions:53
602
1322
  components:
603
- artifact_id: one of scope.supported_artifacts.artifact_id
1323
+ artifact_id: one of the supported artifact values declared by scope
604
1324
  entry_number: positive integer from the artifact's entry_number_field
605
1325
  uniqueness: stable_id is unique within one project archive
606
1326
  ordering:
@@ -716,6 +1436,67 @@ overlays:
716
1436
  inference: forbidden from commits, downstream references, summaries, or Git history
717
1437
  protected_review: unresolved decisions remain visible and never block archive storage
718
1438
 
1439
+ revisions:
1440
+ location: .agentera/revisions/decisions.yaml
1441
+ project_root_fixed: true
1442
+ docs_yaml_override: forbidden
1443
+ schema_version: agentera.decisionRevision.v1
1444
+ supported_artifact: decisions
1445
+ identity_key: decisions:<decision-number>
1446
+ storage_shape: >-
1447
+ A mapping keyed by stable decision ID. Each value is an ordered list of
1448
+ immutable revision records carrying only authority-declared amendable
1449
+ content paths plus revision provenance. A revision never replaces the
1450
+ immutable numbered archive record and never replaces the satisfaction
1451
+ overlay; it is additional immutable evidence composed at read time.
1452
+ amendable_paths:
1453
+ - question
1454
+ - context
1455
+ - alternatives
1456
+ - choice
1457
+ - reasoning
1458
+ - confidence
1459
+ - feeds_into
1460
+ identity_paths:
1461
+ - number
1462
+ temporal_paths:
1463
+ - date
1464
+ separation_from_overlay: >-
1465
+ Amendments never touch satisfaction overlay paths. Satisfaction updates
1466
+ remain under overlays; content amendments remain under revisions. Each
1467
+ authority composes its own evidence and neither rewrites the other.
1468
+ immutability: >-
1469
+ Original numbered archive records remain immutable historical evidence.
1470
+ Revisions are additional immutable evidence appended in declared order;
1471
+ no revision overwrites, reorders, or deletes a prior revision. A revision
1472
+ is byte-stable after publication and an identical revision is an
1473
+ idempotent replay.
1474
+ provenance: >-
1475
+ Revision evidence carries revision provenance only. It is never labeled
1476
+ as historical archive provenance. A revision bootstrapped from a complete
1477
+ legacy projection record may carry degraded_projection provenance and
1478
+ never historical_archive provenance.
1479
+ publication_order:
1480
+ - validate_target_identity
1481
+ - validate_amendment_vocabulary
1482
+ - stage_revision
1483
+ - publish_revision
1484
+ - update_effective_projection
1485
+ apply_state: implemented
1486
+ apply_state_note: >-
1487
+ The revision authority and amend command publish record-local amendments
1488
+ with recovery. A valid dry-run reports the exact revision, effective record,
1489
+ and projection effect without writing any file. Apply writes a
1490
+ record-local override to the revision document only (preserving unrelated
1491
+ entries' bytes), retries converge on a stable revision identity, and an
1492
+ identical re-submission is an idempotent replay. The decisions projection
1493
+ is never rewritten by an amendment; effective detail composes
1494
+ base→revisions→overlay. Amend execution still refuses before side effects
1495
+ for an unsafe target-only change, a duplicate-revision conflict, a stale
1496
+ base hash, or an unsafe target identity, returning an actionable retry or
1497
+ repair action. Discover the contract with
1498
+ `agentera state decisions explain --verb amend --format json`.
1499
+
719
1500
  projections:
720
1501
  archive:
721
1502
  role: complete immutable historical detail
@@ -817,10 +1598,12 @@ api:
817
1598
  empty_result: status=ok with entries=[] and counts.total=0; absence is not an error
818
1599
  durability:
819
1600
  command: agentera check durability [--project PATH] [--artifact ARTIFACT] [--number N] [--limit N] --format json
1601
+ entity_command: agentera check durability --project PATH --artifact ARTIFACT --id ID --format json
820
1602
  formats: [text, json, yaml]
821
1603
  selectors:
822
1604
  artifact: optional supported numbered archive artifact ID
823
1605
  number: optional positive entry number; requires artifact
1606
+ id: entity-mode bare entity ID; requires artifact and replaces number after cutover
824
1607
  limit: optional bounded result count
825
1608
  default_limit: 100
826
1609
  maximum_limit: 100
@@ -1369,6 +2152,26 @@ compatibility:
1369
2152
  Compatibility reports provenance and availability only. It does not
1370
2153
  reconstruct missing decision fields, promote summaries to full records, or
1371
2154
  use Git history to satisfy a current source contract.
2155
+ legacy_label_coexistence:
2156
+ dimensions:
2157
+ - confidence
2158
+ current_vocabulary: [firm, provisional, exploratory]
2159
+ current_vocabulary_ref: protocol.yaml DECISION_LABELS (DL1-DL3)
2160
+ known_legacy_examples: [high, medium, low]
2161
+ classification_rule: >-
2162
+ A label value is unsupported when it is not in current_vocabulary. An
2163
+ unsupported inherited label on a record the caller did not touch is
2164
+ explicit legacy state: it is preserved byte- and value-semantically,
2165
+ reported as a legacy caveat, never coerced to the current vocabulary,
2166
+ and never blocks an append, satisfaction update, or amend on a
2167
+ different target. A confidence label supplied by append or amend is new
2168
+ or amended content and must be a current_vocabulary value; otherwise the
2169
+ operation rejects before side effects.
2170
+ no_silent_normalization: >-
2171
+ Unsupported inherited labels are never rewritten to current values
2172
+ without explicit user migration consent. Reads classify them as legacy
2173
+ and never silently promote them to current vocabulary or claim stronger
2174
+ provenance than exists.
1372
2175
 
1373
2176
  budgets:
1374
2177
  schema_version: agentera.stateOutputBudget.v1
@@ -1425,14 +2228,29 @@ budgets:
1425
2228
  max_latency_ms: 15000
1426
2229
  max_heap_delta_bytes: 268435456
1427
2230
  serialized_output:
1428
- prime_capability_context_max_utf8_bytes: 50000
2231
+ # Generic prime capability capsules retain the full instructions body.
2232
+ # The status capability is a separate one-call surface with a stricter
2233
+ # bound declared below and in the JSON surface manifest.
2234
+ prime_capability_context_max_utf8_bytes: 55000
2235
+ prime_status_context_max_utf8_bytes: 25000
1429
2236
  surfaces:
1430
2237
  prime_briefing:
1431
2238
  manifest_id: prime-briefing
1432
- max_utf8_bytes: 35000
2239
+ # Bounded default decision brief (Plan Task 3): the bare default
2240
+ # `agentera prime --format json` projects the full orientation payload
2241
+ # to routing-essential leaves plus named recovery pointers for omitted
2242
+ # rich state. Pretty UTF-8 JSON + trailing newline is measured and an
2243
+ # over-budget brief is rejected in favor of a bounded degraded envelope;
2244
+ # diagnostics stay on stderr. prime_dashboard keeps full fidelity.
2245
+ max_utf8_bytes: 12000
1433
2246
  prime_dashboard:
1434
2247
  manifest_id: prime-dashboard
1435
2248
  max_utf8_bytes: 35000
2249
+ prime_status_context:
2250
+ manifest_id: prime-status-context
2251
+ # Status startup includes the full instructions capsule as well as the
2252
+ # bounded Task 3 decision brief. Diagnostics remain on stderr.
2253
+ max_utf8_bytes: 25000
1436
2254
  prime_sparse:
1437
2255
  manifest_id: prime-fields-sparse
1438
2256
  max_utf8_bytes: 28000
@@ -1441,6 +2259,15 @@ budgets:
1441
2259
  Omit optional historical detail and retain counts, actionable IDs,
1442
2260
  compatibility, source_contract, and exact get/list command pointers. The
1443
2261
  caller must be able to distinguish omitted detail from unavailable detail.
2262
+ The bare default briefing is a bounded decision brief: every required
2263
+ top-level field stays present (content projected to routing-essential
2264
+ leaves), missing versus present-but-empty stays distinguishable through
2265
+ state_presence, and each omitted rich-state family carries a named
2266
+ authoritative recovery command. When even the projected brief exceeds the
2267
+ budget, emit a measured bounded degraded envelope that keeps command,
2268
+ status, mode, state_presence, a brief source_contract, and the
2269
+ byte-budget error with a recovery command; never emit an over-budget
2270
+ payload. Diagnostics are measured on stderr separately.
1444
2271
  validation:
1445
2272
  authority: this file plus the referenced JSON surface manifest
1446
2273
  drift_rule: tests fail if manifest IDs or byte values disagree with this contract