agentera 3.0.0-dev.20 → 3.0.0-dev.21

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 (228) hide show
  1. package/README.md +19 -0
  2. package/bundle/CHANGELOG.md +63 -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/artifacts/artifact-registry-interface-model.yaml +3 -3
  7. package/bundle/references/artifacts/state-storage-authority.yaml +1446 -0
  8. package/bundle/references/cli/agent-ready-state-contract.yaml +11 -39
  9. package/bundle/references/cli/audience-namespace-cli-migration.yaml +30 -15
  10. package/bundle/references/meta/documentation-inventory.md +1 -0
  11. package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +18 -10
  12. package/bundle/skills/agentera/capabilities/audit/schemas/validation.yaml +10 -10
  13. package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +11 -6
  14. package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +3 -2
  15. package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +15 -8
  16. package/bundle/skills/agentera/capabilities/document/schemas/validation.yaml +13 -13
  17. package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +15 -9
  18. package/bundle/skills/agentera/references/contract.md +65 -23
  19. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +15 -10
  20. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +134 -3
  21. package/bundle/skills/agentera/schemas/artifacts/health.yaml +16 -10
  22. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +18 -4
  23. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +23 -1
  24. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +16 -10
  25. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +34 -0
  26. package/dist/capabilities/audit/instructions.js +1 -1
  27. package/dist/capabilities/audit/instructions.js.map +1 -1
  28. package/dist/capabilities/build/instructions.js +1 -1
  29. package/dist/capabilities/build/instructions.js.map +1 -1
  30. package/dist/capabilities/discuss/instructions.js +1 -1
  31. package/dist/capabilities/discuss/instructions.js.map +1 -1
  32. package/dist/capabilities/document/instructions.js +1 -1
  33. package/dist/capabilities/document/instructions.js.map +1 -1
  34. package/dist/capabilities/optimize/instructions.js +1 -1
  35. package/dist/capabilities/optimize/instructions.js.map +1 -1
  36. package/dist/capabilities/orchestrate/instructions.js +1 -1
  37. package/dist/capabilities/orchestrate/instructions.js.map +1 -1
  38. package/dist/capabilities/plan/instructions.js +1 -1
  39. package/dist/capabilities/plan/instructions.js.map +1 -1
  40. package/dist/capabilities/profile/instructions.js +1 -1
  41. package/dist/capabilities/profile/instructions.js.map +1 -1
  42. package/dist/capabilities/vision/instructions.js +1 -1
  43. package/dist/capabilities/vision/instructions.js.map +1 -1
  44. package/dist/cli/appContext.js +14 -6
  45. package/dist/cli/appContext.js.map +1 -1
  46. package/dist/cli/capabilityContext/bespoke.js +3 -1
  47. package/dist/cli/capabilityContext/bespoke.js.map +1 -1
  48. package/dist/cli/capabilityContext/build.js +5 -4
  49. package/dist/cli/capabilityContext/build.js.map +1 -1
  50. package/dist/cli/capabilityContext/closeout.js +2 -1
  51. package/dist/cli/capabilityContext/closeout.js.map +1 -1
  52. package/dist/cli/capabilityContext/contract.js +29 -0
  53. package/dist/cli/capabilityContext/contract.js.map +1 -1
  54. package/dist/cli/capabilityContext/evidence.js +21 -20
  55. package/dist/cli/capabilityContext/evidence.js.map +1 -1
  56. package/dist/cli/capabilityContext/orchestration.js +3 -2
  57. package/dist/cli/capabilityContext/orchestration.js.map +1 -1
  58. package/dist/cli/capabilityContext/progress.js +9 -4
  59. package/dist/cli/capabilityContext/progress.js.map +1 -1
  60. package/dist/cli/capabilityContext/slim.js +37 -6
  61. package/dist/cli/capabilityContext/slim.js.map +1 -1
  62. package/dist/cli/capabilityContext/startup.js +30 -6
  63. package/dist/cli/capabilityContext/startup.js.map +1 -1
  64. package/dist/cli/capabilityContext/types.js +14 -4
  65. package/dist/cli/capabilityContext/types.js.map +1 -1
  66. package/dist/cli/commands/backfill.js +194 -0
  67. package/dist/cli/commands/backfill.js.map +1 -0
  68. package/dist/cli/commands/compact.js +40 -11
  69. package/dist/cli/commands/compact.js.map +1 -1
  70. package/dist/cli/commands/durability.js +85 -0
  71. package/dist/cli/commands/durability.js.map +1 -0
  72. package/dist/cli/commands/migrate.js +677 -0
  73. package/dist/cli/commands/migrate.js.map +1 -0
  74. package/dist/cli/commands/prime/collectOrientationState.js +23 -0
  75. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  76. package/dist/cli/commands/prime/orientationOutput.js +4 -2
  77. package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
  78. package/dist/cli/commands/query.js +20 -2
  79. package/dist/cli/commands/query.js.map +1 -1
  80. package/dist/cli/commands/schema.js +247 -69
  81. package/dist/cli/commands/schema.js.map +1 -1
  82. package/dist/cli/commands/state/decisions.js +28 -10
  83. package/dist/cli/commands/state/decisions.js.map +1 -1
  84. package/dist/cli/commands/state/experimentRecords.js +156 -0
  85. package/dist/cli/commands/state/experimentRecords.js.map +1 -0
  86. package/dist/cli/commands/state/get.js +141 -0
  87. package/dist/cli/commands/state/get.js.map +1 -0
  88. package/dist/cli/commands/state/index.js +2 -2
  89. package/dist/cli/commands/state/index.js.map +1 -1
  90. package/dist/cli/commands/state/list.js +159 -0
  91. package/dist/cli/commands/state/list.js.map +1 -0
  92. package/dist/cli/commands/state/plan.js +146 -41
  93. package/dist/cli/commands/state/plan.js.map +1 -1
  94. package/dist/cli/commands/state/planTasks.js +164 -0
  95. package/dist/cli/commands/state/planTasks.js.map +1 -0
  96. package/dist/cli/commands/state/plans.js +154 -0
  97. package/dist/cli/commands/state/plans.js.map +1 -0
  98. package/dist/cli/commands/state/write.js +8 -3
  99. package/dist/cli/commands/state/write.js.map +1 -1
  100. package/dist/cli/dispatch/check.js +71 -4
  101. package/dist/cli/dispatch/check.js.map +1 -1
  102. package/dist/cli/dispatch/index.js +48 -30
  103. package/dist/cli/dispatch/index.js.map +1 -1
  104. package/dist/cli/dispatch/lifecycle.js +4 -4
  105. package/dist/cli/dispatch/lifecycle.js.map +1 -1
  106. package/dist/cli/dispatch/state.js +23 -3
  107. package/dist/cli/dispatch/state.js.map +1 -1
  108. package/dist/cli/errors.js +13 -14
  109. package/dist/cli/errors.js.map +1 -1
  110. package/dist/cli/help.js +162 -3
  111. package/dist/cli/help.js.map +1 -1
  112. package/dist/cli/orientation.js +146 -34
  113. package/dist/cli/orientation.js.map +1 -1
  114. package/dist/cli/planArtifacts.js +31 -2
  115. package/dist/cli/planArtifacts.js.map +1 -1
  116. package/dist/cli/prime-blob.js +1 -0
  117. package/dist/cli/prime-blob.js.map +1 -1
  118. package/dist/cli/startupCompletenessContract.js +3 -2
  119. package/dist/cli/startupCompletenessContract.js.map +1 -1
  120. package/dist/cli/stateQuery.js +5 -3
  121. package/dist/cli/stateQuery.js.map +1 -1
  122. package/dist/core/text.js +11 -0
  123. package/dist/core/text.js.map +1 -0
  124. package/dist/hooks/compaction/apply.js +224 -46
  125. package/dist/hooks/compaction/apply.js.map +1 -1
  126. package/dist/hooks/compaction/dryRun.js +2 -0
  127. package/dist/hooks/compaction/dryRun.js.map +1 -1
  128. package/dist/hooks/compaction/index.js +4 -4
  129. package/dist/hooks/compaction/index.js.map +1 -1
  130. package/dist/hooks/compaction/parse.js +73 -5
  131. package/dist/hooks/compaction/parse.js.map +1 -1
  132. package/dist/hooks/compaction/retention.js +22 -21
  133. package/dist/hooks/compaction/retention.js.map +1 -1
  134. package/dist/hooks/compaction/status.js +116 -23
  135. package/dist/hooks/compaction/status.js.map +1 -1
  136. package/dist/hooks/sessionStart.js +39 -7
  137. package/dist/hooks/sessionStart.js.map +1 -1
  138. package/dist/hooks/validateArtifact/index.js +2 -2
  139. package/dist/hooks/validateArtifact/index.js.map +1 -1
  140. package/dist/hooks/validateArtifact/markdown.js +9 -9
  141. package/dist/hooks/validateArtifact/markdown.js.map +1 -1
  142. package/dist/hooks/validateArtifact/traversal.js +11 -9
  143. package/dist/hooks/validateArtifact/traversal.js.map +1 -1
  144. package/dist/registries/artifactRegistry.js +147 -44
  145. package/dist/registries/artifactRegistry.js.map +1 -1
  146. package/dist/release/releaseMetadata.js +95 -1
  147. package/dist/release/releaseMetadata.js.map +1 -1
  148. package/dist/state/archiveDiscovery.js +589 -0
  149. package/dist/state/archiveDiscovery.js.map +1 -0
  150. package/dist/state/archivePublication.js +225 -0
  151. package/dist/state/archivePublication.js.map +1 -0
  152. package/dist/state/archiveRecovery.js +238 -0
  153. package/dist/state/archiveRecovery.js.map +1 -0
  154. package/dist/state/archiveReplay.js +54 -0
  155. package/dist/state/archiveReplay.js.map +1 -0
  156. package/dist/state/decisionOverlay.js +255 -0
  157. package/dist/state/decisionOverlay.js.map +1 -0
  158. package/dist/state/directRetrieval.js +322 -0
  159. package/dist/state/directRetrieval.js.map +1 -0
  160. package/dist/state/durability.js +451 -0
  161. package/dist/state/durability.js.map +1 -0
  162. package/dist/state/experimentArchive.js +64 -0
  163. package/dist/state/experimentArchive.js.map +1 -0
  164. package/dist/state/experimentIdentity.js +191 -0
  165. package/dist/state/experimentIdentity.js.map +1 -0
  166. package/dist/state/experimentRetrieval.js +447 -0
  167. package/dist/state/experimentRetrieval.js.map +1 -0
  168. package/dist/state/gitBackfill.js +561 -0
  169. package/dist/state/gitBackfill.js.map +1 -0
  170. package/dist/state/gitBackfillAuthority.js +141 -0
  171. package/dist/state/gitBackfillAuthority.js.map +1 -0
  172. package/dist/state/gitBackfillHistory.js +278 -0
  173. package/dist/state/gitBackfillHistory.js.map +1 -0
  174. package/dist/state/gitBackfillOutput.js +209 -0
  175. package/dist/state/gitBackfillOutput.js.map +1 -0
  176. package/dist/state/healthRepair.js +70 -0
  177. package/dist/state/healthRepair.js.map +1 -0
  178. package/dist/state/legacyIdentity.js +48 -0
  179. package/dist/state/legacyIdentity.js.map +1 -0
  180. package/dist/state/legacyMigration.js +516 -0
  181. package/dist/state/legacyMigration.js.map +1 -0
  182. package/dist/state/legacyMigrationParser.js +489 -0
  183. package/dist/state/legacyMigrationParser.js.map +1 -0
  184. package/dist/state/listAccounting.js +55 -0
  185. package/dist/state/listAccounting.js.map +1 -0
  186. package/dist/state/listClassification.js +18 -0
  187. package/dist/state/listClassification.js.map +1 -0
  188. package/dist/state/listRetrieval.js +782 -0
  189. package/dist/state/listRetrieval.js.map +1 -0
  190. package/dist/state/migrationAuthority.js +413 -0
  191. package/dist/state/migrationAuthority.js.map +1 -0
  192. package/dist/state/migrationEnrichment.js +35 -0
  193. package/dist/state/migrationEnrichment.js.map +1 -0
  194. package/dist/state/planIdentity.js +45 -0
  195. package/dist/state/planIdentity.js.map +1 -0
  196. package/dist/state/planRetrieval.js +314 -0
  197. package/dist/state/planRetrieval.js.map +1 -0
  198. package/dist/state/planTaskRetrieval.js +285 -0
  199. package/dist/state/planTaskRetrieval.js.map +1 -0
  200. package/dist/state/projectionPolicy.js +184 -0
  201. package/dist/state/projectionPolicy.js.map +1 -0
  202. package/dist/state/retrievalAuthority.js +326 -0
  203. package/dist/state/retrievalAuthority.js.map +1 -0
  204. package/dist/state/startupProjection.js +498 -0
  205. package/dist/state/startupProjection.js.map +1 -0
  206. package/dist/state/write/experimentPublication.js +193 -0
  207. package/dist/state/write/experimentPublication.js.map +1 -0
  208. package/dist/state/write/explain.js +28 -14
  209. package/dist/state/write/explain.js.map +1 -1
  210. package/dist/state/write/helpers.js +8 -0
  211. package/dist/state/write/helpers.js.map +1 -0
  212. package/dist/state/write/index.js +1 -0
  213. package/dist/state/write/index.js.map +1 -1
  214. package/dist/state/write/lock.js +24 -1
  215. package/dist/state/write/lock.js.map +1 -1
  216. package/dist/state/write/mutation.js +190 -0
  217. package/dist/state/write/mutation.js.map +1 -0
  218. package/dist/state/write/operations.js +36 -2
  219. package/dist/state/write/operations.js.map +1 -1
  220. package/dist/state/write/planPublication.js +172 -0
  221. package/dist/state/write/planPublication.js.map +1 -0
  222. package/dist/state/write/transaction.js +238 -225
  223. package/dist/state/write/transaction.js.map +1 -1
  224. package/dist/upgrade/migrateArtifactsV2ToV3.js +2 -2
  225. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  226. package/dist/validate/crossCapability.js +9 -6
  227. package/dist/validate/crossCapability.js.map +1 -1
  228. package/package.json +2 -2
@@ -79,14 +79,12 @@ doctor:
79
79
  - codebase quality audit findings
80
80
  - inspektera architecture, test, dependency, or documentation audit output
81
81
  adjacent_surfaces:
82
- project_artifact_health: agentera health
83
82
  codebase_audit: /agentera audit routes to inspektera
84
83
  setup_specific_diagnostics: packages/cli/src/setup/doctor.ts
85
84
  rationale: >-
86
85
  Decision 45 rejects `bundle-status` as too narrow and rejects an alias for
87
- release-clean vocabulary. `doctor` is Agentera CLI/install/runtime
88
- self-check vocabulary only; artifact health and codebase audits remain owned
89
- by `agentera health` and inspektera.
86
+ release-clean vocabulary; `doctor` is the CLI/install/runtime self-check
87
+ vocabulary, while artifact health and codebase audits remain separate concerns.
90
88
  schema:
91
89
  status: implemented_runtime_introspection
92
90
  command: schema
@@ -328,8 +326,9 @@ structured_output:
328
326
  `agentera prime --format json` may include one bounded `decision_attention`
329
327
  payload when returned decisions require satisfaction review. The payload
330
328
  derives from the same `_decision_context_entry` and
331
- `_decision_satisfaction_context` semantics as `agentera decisions --format
332
- json`, never infers satisfaction, never mutates `.agentera/decisions.yaml`,
329
+ `_decision_satisfaction_context` semantics as bounded `agentera state
330
+ decisions list --limit 20 --format json` plus exact `state decisions
331
+ get --number N`, never infers satisfaction, never mutates `.agentera/decisions.yaml`,
333
332
  keeps top-level attention bounded, and must not change `next_action`
334
333
  routing priority.
335
334
  evidence_context_target_contract: evidence_context_target_contract
@@ -361,8 +360,6 @@ startup_completeness:
361
360
  artifact reads for normal capability startup.
362
361
  current_cli_fallback:
363
362
  - agentera plan --format json
364
- - agentera docs --format json
365
- - agentera progress --format json
366
363
  state_families_added:
367
364
  - plan task details, dependencies, acceptance criteria, and evidence summaries
368
365
  - docs artifact mapping and source-contract completeness metadata
@@ -405,7 +402,7 @@ evidence_context_target_contract:
405
402
  - vision
406
403
  - profile
407
404
  fallback_commands:
408
- - agentera decisions --format json
405
+ - agentera state decisions list --limit 20 --format json
409
406
  caveats:
410
407
  - profile-derived state is stale and must not trigger profile refresh
411
408
  - orchestration_context is incomplete for missing decisions, vision, and profile state
@@ -419,14 +416,6 @@ evidence_context_target_contract:
419
416
  - previous_plan_archived pointer
420
417
  missing_state: []
421
418
  raw_artifact_reads_required: false
422
- - command: agentera progress --format json
423
- included_state:
424
- - latest progress cycles
425
- - latest verification text
426
- - cycle provenance
427
- missing_state:
428
- - explicit retry-attempt count
429
- raw_artifact_reads_required: false
430
419
  - command: agentera docs --format json
431
420
  included_state:
432
421
  - artifact mapping
@@ -435,14 +424,6 @@ evidence_context_target_contract:
435
424
  - indexed document freshness
436
425
  missing_state: []
437
426
  raw_artifact_reads_required: false
438
- - command: agentera health --format json
439
- included_state:
440
- - latest audit
441
- - dimension grades
442
- - findings
443
- - trajectory
444
- missing_state: []
445
- raw_artifact_reads_required: false
446
427
  - command: agentera todo --format json
447
428
  included_state:
448
429
  - open 2.3.10 evidence-context TODO
@@ -450,15 +431,6 @@ evidence_context_target_contract:
450
431
  - known open issues
451
432
  missing_state: []
452
433
  raw_artifact_reads_required: false
453
- - command: agentera decisions --format json
454
- included_state:
455
- - decisions 51 and 52 with complete context
456
- - compacted historical decision summaries
457
- missing_state:
458
- - full context for 40 compacted historical entries
459
- raw_artifact_reads_required: false
460
- caveats:
461
- - compacted decisions expose missing_fields and caveats instead of reconstructed history
462
434
  last_resort_raw_fallbacks:
463
435
  - reason: archived previous-plan status is not exposed by routine CLI state
464
436
  path: .agentera/archive/PLAN-2026-05-15-2-3-9-dokumentera-closeout-context-source-contract.yaml
@@ -514,14 +486,14 @@ evidence_context_target_contract:
514
486
  source: agentera plan --format json entries.acceptance
515
487
  fallback: none when complete_for_plan_artifact is true
516
488
  - family: progress_verification
517
- source: agentera progress --format json latest verification
518
- fallback: agentera progress --format json
489
+ source: agentera state progress list --limit 20 --format json latest verification
490
+ fallback: agentera state progress get --number N --format json
519
491
  - family: docs_state
520
492
  source: agentera docs --format json summary and entries
521
493
  fallback: agentera docs --format json
522
494
  - family: health_state
523
- source: agentera health --format json latest audit
524
- fallback: agentera health --format json
495
+ source: agentera state health list --limit 20 --format json latest audit
496
+ fallback: agentera state health get --number N --format json
525
497
  - family: todo_state
526
498
  source: agentera todo --format json known issues and source-contract TODOs
527
499
  fallback: agentera todo --format json
@@ -530,7 +502,7 @@ evidence_context_target_contract:
530
502
  fallback: listed existing CLI commands before raw reads
531
503
  optional_or_caveated_for_normal_task_evaluation:
532
504
  - family: decisions_context
533
- source: agentera decisions --format json
505
+ source: agentera state decisions list --limit 20 --format json
534
506
  caveat: compacted historical entries remain incomplete and must not be reconstructed from raw artifacts
535
507
  - family: vision_context
536
508
  source: hej startup only when included by capability context
@@ -186,16 +186,17 @@ audience_namespaces:
186
186
  canonical_shape: agentera check compact [--project PATH] [--mode check|fix] [--format text|json]
187
187
  delegates_from:
188
188
  - compact
189
- - gate
190
189
  notes: >-
191
- `check compact` in default check-only mode matches today's `agentera gate`.
192
- Artifact compaction budget checks remain on `check compact`.
193
- legacy_top_level_aliases:
194
- - validate
190
+ `check compact` owns check-only and fix modes. Top-level `gate` was
191
+ removed in Phase 3; artifact compaction budget checks remain on
192
+ `check compact`.
193
+ transitional_top_level_aliases:
194
+ - query
195
+ - compact
195
196
  - verify
197
+ - stats
196
198
  - lint
197
- - gate
198
- - compact
199
+ - validate
199
200
  help_grouping:
200
201
  agent: [prime, state, schema, capabilities]
201
202
  user: [upgrade, doctor, report]
@@ -263,25 +264,25 @@ plan_routing_distinction:
263
264
  state_read:
264
265
  invocation: agentera state plan
265
266
  legacy_alias: >-
266
- Top-level `agentera plan` was removed on the npm 3.x CLI in Phase 3; use
267
- `agentera state plan`.
267
+ Top-level `agentera plan` is capability routing, not a state-read alias;
268
+ use `agentera state plan` for project state.
268
269
  surface: CLI routine state read
269
270
  meaning: >-
270
271
  Read-only access to the active plan artifact summary, tasks, acceptance
271
272
  criteria, evidence, and source_contract. Does not invoke Planera workflow
272
273
  execution.
273
274
  capability_top:
274
- invocation: agentera planera
275
+ invocation: agentera plan
275
276
  surface: CLI top-level capability routing command
276
277
  meaning: >-
277
- Emits Planera routing guidance prose/schemas pointers. Does not replace
278
+ Emits plan capability routing guidance prose/schemas pointers. Does not replace
278
279
  `state plan` reads or `/agentera plan` slash routing. Capability startup JSON
279
- for Planera remains `agentera prime --context planera --format json`.
280
+ remains `agentera prime --context plan --format json`.
280
281
  agent_guidance: >-
281
282
  Use `/agentera plan` when the user wants planning work routed to Planera; use
282
283
  `agentera state plan` when the agent needs plan artifact state; use
283
- `agentera planera` for capability routing guidance; use
284
- `agentera prime --context planera` for bounded Planera startup context.
284
+ `agentera plan` for capability routing guidance; use
285
+ `agentera prime --context plan` for bounded plan startup context.
285
286
  migration_phases:
286
287
  phase_1:
287
288
  name: add_namespaces_and_delegate
@@ -344,9 +345,9 @@ command_tree_target:
344
345
  removed_top_level_commands:
345
346
  # Phase 3 on npm 3.x: removed from help and dispatch (unsupported_target)
346
347
  - hej
348
+ - status
347
349
  - describe
348
350
  - gate
349
- - plan
350
351
  - progress
351
352
  - health
352
353
  - todo
@@ -355,6 +356,20 @@ removed_top_level_commands:
355
356
  - objective
356
357
  - experiments
357
358
 
359
+ removed_top_level_corrections:
360
+ # Unsupported Phase 3 names return these canonical runnable corrections.
361
+ - { legacy: hej, canonical: prime }
362
+ - { legacy: status, canonical: prime }
363
+ - { legacy: describe, canonical: schema }
364
+ - { legacy: gate, canonical: "check compact" }
365
+ - { legacy: progress, canonical: "state progress" }
366
+ - { legacy: health, canonical: "state health" }
367
+ - { legacy: todo, canonical: "state todo" }
368
+ - { legacy: decisions, canonical: "state decisions" }
369
+ - { legacy: docs, canonical: "state docs" }
370
+ - { legacy: objective, canonical: "state objective" }
371
+ - { legacy: experiments, canonical: "state experiments" }
372
+
358
373
  transitional_stderr_aliases:
359
374
  # Still delegate with one-line stderr deprecation on npm 3.x
360
375
  - { legacy: query, canonical: "state query" }
@@ -23,6 +23,7 @@ guides — not under `docs/`.
23
23
  | Human vocabulary index | `references/cli/vocabulary.md` |
24
24
  | Benchmark contract | `references/analysis/startup-measurement-contract.yaml` |
25
25
  | Benchmark runbook | `references/analysis/benchmark.md` |
26
+ | State storage, path, API, compatibility, and output authority | `references/artifacts/state-storage-authority.yaml` |
26
27
  | JSON surface budgets | `scripts/json_output_surface_manifest.yaml` |
27
28
  | Project drafts | `docs/` (gitignored except `docs/README.md`, `docs/packaging/`, `docs/consolidation/`) |
28
29
 
@@ -8,7 +8,9 @@ ARTIFACTS:
8
8
  Audit writes audit entries with per-dimension grades, findings with
9
9
  severity and confidence scores, trend comparisons, and de facto
10
10
  architecture patterns. During evaluation startup, Audit consumes health
11
- state through CLI `evidence_context` before raw health artifact fallback.
11
+ state through CLI `evidence_context`, then bounded `agentera state health
12
+ list --limit 20 --format json` and exact `state health get --number N`.
13
+ Raw health reads are diagnostic-only for corruption or CLI-defect investigation.
12
14
  2:
13
15
  id: A2
14
16
  artifact_id: vision
@@ -22,9 +24,11 @@ ARTIFACTS:
22
24
  artifact_id: decisions
23
25
  local_role: consumes
24
26
  description: >-
25
- Audit consumes decision caveats through CLI `evidence_context` and the
26
- listed `agentera decisions --format json` fallback before raw decisions artifact fallback.
27
- Compacted decision caveats must be preserved rather than reconstructed.
27
+ Audit consumes decision caveats through CLI `evidence_context`, then
28
+ bounded `agentera state decisions list --limit 20 --format json` discovery
29
+ and exact `state decisions get --number N` retrieval. Raw decision reads
30
+ are diagnostic-only for corruption or CLI-defect investigation. Compacted
31
+ decision caveats must be preserved rather than reconstructed.
28
32
  4:
29
33
  id: A4
30
34
  artifact_id: todo
@@ -33,21 +37,25 @@ ARTIFACTS:
33
37
  Audit reads this to avoid re-reporting known issues and writes to it
34
38
  with user confirmation when filing
35
39
  critical and warning findings. During evaluation startup, known TODO state is
36
- consumed through CLI `evidence_context` before raw TODO artifact fallback.
40
+ consumed through CLI `evidence_context`; raw TODO reads are diagnostic-only
41
+ for corruption or CLI-defect investigation.
37
42
  5:
38
43
  id: A5
39
44
  artifact_id: progress
40
45
  local_role: consumes
41
46
  description: >-
42
47
  Audit consumes latest progress verification and progress caveats through
43
- CLI `evidence_context` before raw progress artifact fallback.
48
+ CLI `evidence_context`, then bounded `agentera state progress list --limit
49
+ 20 --format json` discovery and exact `state progress get --number N`
50
+ retrieval. Raw progress reads are diagnostic-only for corruption or
51
+ CLI-defect investigation.
44
52
  6:
45
53
  id: A6
46
54
  artifact_id: plan
47
55
  local_role: consumes
48
56
  description: >-
49
57
  Audit consumes evaluation target and plan criteria through CLI
50
- `evidence_context` before raw plan artifact fallback. The plan's Created date
58
+ `evidence_context` before any diagnostic-only raw plan read. The plan's Created date
51
59
  still provides the artifact-current-state baseline when that state is needed.
52
60
  7:
53
61
  id: A7
@@ -55,8 +63,8 @@ ARTIFACTS:
55
63
  local_role: consumes
56
64
  description: >-
57
65
  Audit treats design state as optional during evidence-context startup;
58
- missing design caveats from CLI `evidence_context` are preserved before any raw
59
- design artifact fallback.
66
+ missing design caveats from CLI `evidence_context` are preserved before any
67
+ diagnostic-only raw design read.
60
68
  8:
61
69
  id: A8
62
70
  artifact_id: docs
@@ -65,7 +73,7 @@ ARTIFACTS:
65
73
  Audit reads this first to resolve project-local artifact mappings
66
74
  and checks the versioning convention for the version health dimension. During
67
75
  evaluation startup, docs state and version-boundary caveats are consumed through
68
- CLI `evidence_context` before raw docs artifact fallback.
76
+ CLI `evidence_context` before any diagnostic-only raw docs read.
69
77
  9:
70
78
  id: A9
71
79
  artifact_id: profile
@@ -66,25 +66,25 @@ VALIDATION:
66
66
  id: V7
67
67
  rule: evidence_context_first
68
68
  description: >-
69
- Audit evaluation startup MUST begin with `agentera prime --context
70
- audit --format json` and use complete CLI `evidence_context` before
71
- raw plan, progress, docs, health, TODO, or decisions artifacts.
69
+ Audit evaluation startup MUST begin with `agentera prime --context
70
+ audit --format json` and use complete CLI `evidence_context` before
71
+ bounded state list/get contracts for plan, progress, docs, health, TODO,
72
+ or decisions. Raw artifact access is diagnostic-only.
72
73
  severity: critical
73
74
  checks:
74
- - "Evidence context is requested through prime --context before raw artifacts"
75
- - "Complete evidence_context is used for evaluation target, criteria, evidence, caveats, and residual risks"
75
+ - "Evidence context is requested through prime --context before bounded state list/get"
76
76
  8:
77
77
  id: V8
78
78
  rule: evidence_context_fallback_before_raw
79
79
  description: >-
80
80
  When evidence_context is absent, incomplete, or caveated for needed state,
81
- Audit MUST run listed existing CLI fallback commands before any last-resort
82
- raw artifact read.
81
+ Audit MUST run listed bounded CLI fallback commands before any
82
+ diagnostic-only raw artifact read.
83
83
  severity: critical
84
84
  checks:
85
- - "evidence_context.fallback_commands are attempted before raw artifact reads"
86
- - "capability_context.state.fallback_commands is used when evidence_context is unavailable"
87
- - "Raw artifact reads are last-resort diagnostics, not normal evaluation startup"
85
+ - "evidence_context.fallback_commands are attempted before diagnostic-only raw reads"
86
+ - "capability_context.state.fallback_commands is used when evidence_context is unavailable"
87
+ - "Raw artifact reads are diagnostic-only, not normal evaluation startup"
88
88
  9:
89
89
  id: V9
90
90
  rule: evidence_context_caveats_preserved
@@ -29,24 +29,29 @@ ARTIFACTS:
29
29
  local_role: produces_and_consumes
30
30
  description: >-
31
31
  Operational cycle log. Build consumes latest progress evidence from
32
- execution_context first, then appends one entry per cycle with mandatory
33
- Verified field. Compacted by applying schema COMPACTION rules.
32
+ execution_context first, then bounded `agentera state progress list --limit
33
+ 20 --format json` discovery or exact `state progress get --number N`
34
+ retrieval, and appends one entry per cycle with mandatory Verified field.
35
+ Compacted by applying schema COMPACTION rules.
34
36
  5:
35
37
  id: A5
36
38
  artifact_id: health
37
39
  local_role: consumes
38
40
  description: >-
39
41
  Build consumes health state from execution_context and included status
40
- state before direct reads, focusing on critical and degraded findings for
41
- work selection.
42
+ state before bounded `agentera state health list --limit 20 --format json`
43
+ discovery or exact `state health get --number N` retrieval, focusing on
44
+ critical and degraded findings for work selection. Raw reads are
45
+ diagnostic-only for corruption or CLI-defect investigation.
42
46
  6:
43
47
  id: A6
44
48
  artifact_id: decisions
45
49
  local_role: consumes
46
50
  description: >-
47
- Build consumes decision caveats and fallback commands from
51
+ Build consumes decision caveats and bounded list/get fallback commands from
48
52
  execution_context first. Firm (DL1) entries are constraints and exploratory
49
- (DL3) entries are uncertain foundations during work selection.
53
+ (DL3) entries are uncertain foundations during work selection. Raw reads are
54
+ diagnostic-only for corruption or CLI-defect investigation.
50
55
  7:
51
56
  id: A7
52
57
  artifact_id: plan
@@ -5,8 +5,9 @@ ARTIFACTS:
5
5
  local_role: produces_and_consumes
6
6
  description: >-
7
7
  Reasoning trail with confidence labels. Discuss reads existing decisions
8
- through `agentera state decisions --format json` and its source_contract
9
- to avoid re-deliberation, and writes new decision entries with confidence
8
+ through bounded `agentera state decisions list --limit 20 --format json`
9
+ discovery plus exact `agentera state decisions get --number N --format json`
10
+ retrieval and its source_contract to avoid re-deliberation, and writes new decision entries with confidence
10
11
  (DL1 firm, DL2 provisional, DL3 exploratory). Compact older entries by
11
12
  applying schema COMPACTION rules; incomplete compacted entries are
12
13
  caveated context, not a reason for historical reconstruction during
@@ -8,8 +8,8 @@ ARTIFACTS:
8
8
  documentation index. Document writes and reads doc root, style
9
9
  conventions, auto-generated doc tracking, project-local artifact mappings,
10
10
  and a status index (current/stale/missing) for tracked docs. During
11
- closeout, Document consumes docs state through CLI `closeout_context`
12
- before raw artifact fallback.
11
+ closeout, Document consumes docs state through CLI `closeout_context`;
12
+ raw reads are diagnostic-only for corruption or CLI-defect investigation.
13
13
  2:
14
14
  id: A2
15
15
  artifact_id: vision
@@ -24,22 +24,29 @@ ARTIFACTS:
24
24
  description: >-
25
25
  Document reads this during explore-and-generate mode to understand
26
26
  recent project context. During closeout, latest progress evidence and
27
- verification pointers are consumed through CLI `closeout_context` before
28
- raw artifact fallback.
27
+ verification pointers are consumed through CLI `closeout_context`, then
28
+ bounded `agentera state progress list --limit 20 --format json` discovery
29
+ or exact `state progress get --number N` retrieval. Raw reads are
30
+ diagnostic-only for corruption or CLI-defect investigation.
29
31
  4:
30
32
  id: A4
31
33
  artifact_id: decisions
32
34
  local_role: consumes
33
35
  description: >-
34
36
  Document reads this during explore-and-generate mode for project
35
- context and decision awareness.
37
+ context and decision awareness through bounded `agentera state decisions
38
+ list --limit 20 --format json` discovery or exact `state decisions get
39
+ --number N` retrieval. Raw reads are diagnostic-only for corruption or
40
+ CLI-defect investigation.
36
41
  5:
37
42
  id: A5
38
43
  artifact_id: health
39
44
  local_role: consumes
40
45
  description: >-
41
- Document reads this to discover documentation gaps surfaced
42
- during health audits.
46
+ Document reads this to discover documentation gaps surfaced during health
47
+ audits through bounded `agentera state health list --limit 20 --format
48
+ json` discovery or exact `state health get --number N` retrieval. Raw reads
49
+ are diagnostic-only for corruption or CLI-defect investigation.
43
50
  6:
44
51
  id: A6
45
52
  artifact_id: todo
@@ -48,7 +55,7 @@ ARTIFACTS:
48
55
  Document writes to this when code diverges from docs (per DTC,
49
56
  the code is wrong). Also reads for context during documentation work;
50
57
  closeout blocker state is consumed through CLI `closeout_context` before
51
- raw artifact fallback.
58
+ any diagnostic-only raw TODO read.
52
59
  7:
53
60
  id: A7
54
61
  artifact_id: design
@@ -85,12 +85,13 @@ VALIDATION:
85
85
  id: V9
86
86
  rule: closeout_context_first
87
87
  description: >-
88
- During final synchronization, Document MUST use `agentera prime
89
- --context document --format json` and its `closeout_context`
90
- before reading TODO, docs, changelog, or progress artifacts directly.
91
- Complete closeout context is the normal source for mappings, version
92
- policy, blockers, boundaries, progress evidence, benchmark evidence,
93
- caveats, fallback commands, raw-read policy, and completeness.
88
+ During final synchronization, Document MUST use `agentera prime
89
+ --context document --format json` and its `closeout_context`
90
+ before using bounded state list/get contracts for TODO, docs, changelog,
91
+ or progress. Raw artifact access is diagnostic-only or a write target.
92
+ Complete closeout context is the normal source for mappings, version
93
+ policy, blockers, boundaries, progress evidence, benchmark evidence,
94
+ caveats, fallback commands, raw-read policy, and completeness.
94
95
  severity: critical
95
96
  checks:
96
97
  - "Closeout starts from status capability context"
@@ -100,15 +101,14 @@ VALIDATION:
100
101
  id: V10
101
102
  rule: closeout_fallback_before_raw
102
103
  description: >-
103
- If closeout context is incomplete or caveated, Document MUST run the
104
- listed existing CLI fallback commands before any last-resort raw artifact
105
- read. No unsupported capability-name command or new closeout command may
106
- be introduced.
104
+ If closeout context is incomplete or caveated, Document MUST run the
105
+ listed bounded CLI fallback commands before any diagnostic-only raw
106
+ artifact read. No unsupported capability-name command or new closeout command may
107
+ be introduced.
107
108
  severity: critical
108
109
  checks:
109
- - "Listed CLI fallback commands run before raw artifact reads"
110
- - "Raw reads are last-resort diagnostics or write targets only"
111
- - "No unsupported capability-name command is introduced"
110
+ - "Listed bounded CLI fallback commands run before diagnostic-only raw reads"
111
+ - "Raw reads are diagnostic-only or write targets"
112
112
  11:
113
113
  id: V11
114
114
  rule: closeout_caveat_preservation
@@ -15,16 +15,20 @@ ARTIFACTS:
15
15
  local_role: consumes
16
16
  description: >-
17
17
  Orchestrate consumes progress verification state from the returned
18
- orchestration context first, then routine CLI fallback output before any
19
- last-resort raw artifact read for the Step 3 presence check.
18
+ orchestration context first, then bounded `agentera state progress list
19
+ --limit 20 --format json` fallback output. Exact detail uses `state
20
+ progress get --number N`; raw reads are diagnostic-only for corruption or
21
+ CLI-defect investigation.
20
22
  3:
21
23
  id: A3
22
24
  artifact_id: health
23
25
  local_role: consumes
24
26
  description: >-
25
27
  Orchestrate consumes returned health state first after plan completion to
26
- decide whether to start a new plan cycle; raw reads are last-resort after
27
- listed CLI fallbacks.
28
+ decide whether to start a new plan cycle; bounded `agentera state health
29
+ list --limit 20 --format json` and exact `state health get --number N`
30
+ are the fallback contracts. Raw reads are diagnostic-only for corruption
31
+ or CLI-defect investigation.
28
32
  4:
29
33
  id: A4
30
34
  artifact_id: todo
@@ -37,9 +41,11 @@ ARTIFACTS:
37
41
  artifact_id: decisions
38
42
  local_role: consumes
39
43
  description: >-
40
- Orchestrate consumes included decision context or the listed
41
- `agentera decisions --format json` fallback before raw access, preserving
42
- firm constraints, exploratory uncertainties, and compacted-entry caveats.
44
+ Orchestrate consumes included decision context or bounded
45
+ `agentera state decisions list --limit 20 --format json` discovery and
46
+ exact `state decisions get --number N` retrieval, preserving firm
47
+ constraints, exploratory uncertainties, and compacted-entry caveats.
48
+ Raw reads are diagnostic-only for corruption or CLI-defect investigation.
43
49
  6:
44
50
  id: A6
45
51
  artifact_id: vision
@@ -61,5 +67,5 @@ ARTIFACTS:
61
67
  local_role: consumes
62
68
  description: >-
63
69
  Orchestrate uses docs mapping from CLI startup context first to resolve
64
- project-local artifact mappings before any last-resort raw artifact read
65
- or artifact write.
70
+ project-local artifact mappings before any diagnostic-only raw artifact
71
+ read or artifact write.