agentera 3.0.0-dev.21 → 3.0.0-dev.23

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 (129) hide show
  1. package/README.md +7 -3
  2. package/bundle/.cursor/agents/agentera.md +1 -1
  3. package/bundle/.opencode/agents/agentera.md +1 -1
  4. package/bundle/CHANGELOG.md +11 -0
  5. package/bundle/references/analysis/evidence-tier-authority.yaml +516 -0
  6. package/bundle/references/artifacts/state-storage-authority.yaml +109 -3
  7. package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
  8. package/bundle/references/cli/agent-ready-state-contract.yaml +22 -14
  9. package/bundle/references/cli/prime-consumer-compatibility.yaml +676 -0
  10. package/bundle/references/cli/vocabulary-index.yaml +3 -3
  11. package/bundle/references/cli/vocabulary.md +10 -3
  12. package/bundle/skills/agentera/SKILL.md +7 -6
  13. package/bundle/skills/agentera/agents/audit.toml +1 -1
  14. package/bundle/skills/agentera/agents/build.toml +1 -1
  15. package/bundle/skills/agentera/agents/design.toml +1 -1
  16. package/bundle/skills/agentera/agents/discuss.toml +1 -1
  17. package/bundle/skills/agentera/agents/document.toml +1 -1
  18. package/bundle/skills/agentera/agents/optimize.toml +1 -1
  19. package/bundle/skills/agentera/agents/orchestrate.toml +1 -1
  20. package/bundle/skills/agentera/agents/plan.toml +1 -1
  21. package/bundle/skills/agentera/agents/profile.toml +1 -1
  22. package/bundle/skills/agentera/agents/research.toml +1 -1
  23. package/bundle/skills/agentera/agents/status.toml +1 -1
  24. package/bundle/skills/agentera/agents/vision.toml +1 -1
  25. package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +31 -3
  26. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +1 -0
  27. package/bundle/skills/agentera/schemas/artifacts/design.yaml +1 -0
  28. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +1 -0
  29. package/dist/analytics/extractCorpus/cli.js +33 -5
  30. package/dist/analytics/extractCorpus/cli.js.map +1 -1
  31. package/dist/analytics/extractCorpus/evidenceTiers.js +561 -0
  32. package/dist/analytics/extractCorpus/evidenceTiers.js.map +1 -0
  33. package/dist/analytics/extractCorpus/extractCorpusParity.js +1 -0
  34. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -1
  35. package/dist/analytics/extractCorpus/index.js +3 -0
  36. package/dist/analytics/extractCorpus/index.js.map +1 -1
  37. package/dist/analytics/extractCorpus/tierReader.js +109 -0
  38. package/dist/analytics/extractCorpus/tierReader.js.map +1 -0
  39. package/dist/analytics/profileSignals.js +212 -0
  40. package/dist/analytics/profileSignals.js.map +1 -0
  41. package/dist/analytics/usageStats.js +104 -20
  42. package/dist/analytics/usageStats.js.map +1 -1
  43. package/dist/capabilities/index.js +2 -1
  44. package/dist/capabilities/index.js.map +1 -1
  45. package/dist/capabilities/profile/instructions.js +1 -1
  46. package/dist/capabilities/profile/instructions.js.map +1 -1
  47. package/dist/capabilities/status/startupInstructions.js +35 -0
  48. package/dist/capabilities/status/startupInstructions.js.map +1 -0
  49. package/dist/cli/capabilityContext/build.js +3 -3
  50. package/dist/cli/capabilityContext/build.js.map +1 -1
  51. package/dist/cli/capabilityContext/closeout.js +5 -5
  52. package/dist/cli/capabilityContext/closeout.js.map +1 -1
  53. package/dist/cli/capabilityContext/contract.js +4 -4
  54. package/dist/cli/capabilityContext/contract.js.map +1 -1
  55. package/dist/cli/capabilityContext/evidence.js +4 -4
  56. package/dist/cli/capabilityContext/evidence.js.map +1 -1
  57. package/dist/cli/capabilityContext/planState.js +7 -6
  58. package/dist/cli/capabilityContext/planState.js.map +1 -1
  59. package/dist/cli/capabilityContext/shared.js +1 -1
  60. package/dist/cli/capabilityContext/shared.js.map +1 -1
  61. package/dist/cli/capabilityContext/startup.js +4 -4
  62. package/dist/cli/capabilityContext/startup.js.map +1 -1
  63. package/dist/cli/commands/lint.js +10 -2
  64. package/dist/cli/commands/lint.js.map +1 -1
  65. package/dist/cli/commands/prime/briefOrientation.js +582 -0
  66. package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
  67. package/dist/cli/commands/prime/collectOrientationState.js +3 -0
  68. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  69. package/dist/cli/commands/prime/orientationOutput.js +117 -23
  70. package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
  71. package/dist/cli/commands/prime.js +30 -3
  72. package/dist/cli/commands/prime.js.map +1 -1
  73. package/dist/cli/commands/report.js +55 -15
  74. package/dist/cli/commands/report.js.map +1 -1
  75. package/dist/cli/commands/schema.js +3 -29
  76. package/dist/cli/commands/schema.js.map +1 -1
  77. package/dist/cli/commands/state/plan.js +3 -2
  78. package/dist/cli/commands/state/plan.js.map +1 -1
  79. package/dist/cli/help.js +1 -1
  80. package/dist/cli/help.js.map +1 -1
  81. package/dist/cli/orientation/corpusCoverage.js +32 -0
  82. package/dist/cli/orientation/corpusCoverage.js.map +1 -1
  83. package/dist/cli/orientation.js +3 -3
  84. package/dist/cli/orientation.js.map +1 -1
  85. package/dist/cli/startupCompletenessContract.js +3 -3
  86. package/dist/cli/startupCompletenessContract.js.map +1 -1
  87. package/dist/cli/stateQuery.js +37 -0
  88. package/dist/cli/stateQuery.js.map +1 -1
  89. package/dist/registries/evidenceTierContract.js +362 -0
  90. package/dist/registries/evidenceTierContract.js.map +1 -0
  91. package/dist/registries/verbosityBudgetContract.js +206 -0
  92. package/dist/registries/verbosityBudgetContract.js.map +1 -0
  93. package/dist/state/decisionLegacyValidation.js +185 -0
  94. package/dist/state/decisionLegacyValidation.js.map +1 -0
  95. package/dist/state/decisionOverlay.js +24 -1
  96. package/dist/state/decisionOverlay.js.map +1 -1
  97. package/dist/state/decisionRevision.js +622 -0
  98. package/dist/state/decisionRevision.js.map +1 -0
  99. package/dist/state/decisionRevisionPublication.js +532 -0
  100. package/dist/state/decisionRevisionPublication.js.map +1 -0
  101. package/dist/state/directRetrieval.js +55 -4
  102. package/dist/state/directRetrieval.js.map +1 -1
  103. package/dist/state/listRetrieval.js +42 -11
  104. package/dist/state/listRetrieval.js.map +1 -1
  105. package/dist/state/startupAnalysis/benchmark.js +70 -8
  106. package/dist/state/startupAnalysis/benchmark.js.map +1 -1
  107. package/dist/state/startupAnalysis/threshold.js +13 -0
  108. package/dist/state/startupAnalysis/threshold.js.map +1 -1
  109. package/dist/state/startupProjection.js +68 -1
  110. package/dist/state/startupProjection.js.map +1 -1
  111. package/dist/state/write/candidateMutation.js +331 -0
  112. package/dist/state/write/candidateMutation.js.map +1 -0
  113. package/dist/state/write/explain.js +36 -12
  114. package/dist/state/write/explain.js.map +1 -1
  115. package/dist/state/write/helpers.js +22 -0
  116. package/dist/state/write/helpers.js.map +1 -1
  117. package/dist/state/write/mutation.js +42 -0
  118. package/dist/state/write/mutation.js.map +1 -1
  119. package/dist/state/write/operations.js +49 -1
  120. package/dist/state/write/operations.js.map +1 -1
  121. package/dist/state/write/transaction.js +23 -357
  122. package/dist/state/write/transaction.js.map +1 -1
  123. package/dist/validate/lifecycleAdapters/lifecycleMain.js +154 -0
  124. package/dist/validate/lifecycleAdapters/lifecycleMain.js.map +1 -0
  125. package/dist/validate/lifecycleAdapters.js +5 -156
  126. package/dist/validate/lifecycleAdapters.js.map +1 -1
  127. package/dist/validate/selfAudit.js +38 -43
  128. package/dist/validate/selfAudit.js.map +1 -1
  129. package/package.json +2 -2
@@ -13,7 +13,8 @@ authority:
13
13
  Runtime readers, writers, validators, tests, help, and capability source
14
14
  contracts may project this authority but must not create a second map of
15
15
  archive paths, API verbs, compatibility classes, mutable overlay fields,
16
- failure classes, or byte limits.
16
+ amendment revision paths, legacy label coexistence rules, failure classes,
17
+ or byte limits.
17
18
  implementation_boundary: >-
18
19
  This contract does not migrate legacy state or change existing plan and
19
20
  vision archive behavior. The maintenance-only Git backfill surface declared
@@ -716,6 +717,67 @@ overlays:
716
717
  inference: forbidden from commits, downstream references, summaries, or Git history
717
718
  protected_review: unresolved decisions remain visible and never block archive storage
718
719
 
720
+ revisions:
721
+ location: .agentera/revisions/decisions.yaml
722
+ project_root_fixed: true
723
+ docs_yaml_override: forbidden
724
+ schema_version: agentera.decisionRevision.v1
725
+ supported_artifact: decisions
726
+ identity_key: decisions:<decision-number>
727
+ storage_shape: >-
728
+ A mapping keyed by stable decision ID. Each value is an ordered list of
729
+ immutable revision records carrying only authority-declared amendable
730
+ content paths plus revision provenance. A revision never replaces the
731
+ immutable numbered archive record and never replaces the satisfaction
732
+ overlay; it is additional immutable evidence composed at read time.
733
+ amendable_paths:
734
+ - question
735
+ - context
736
+ - alternatives
737
+ - choice
738
+ - reasoning
739
+ - confidence
740
+ - feeds_into
741
+ identity_paths:
742
+ - number
743
+ temporal_paths:
744
+ - date
745
+ separation_from_overlay: >-
746
+ Amendments never touch satisfaction overlay paths. Satisfaction updates
747
+ remain under overlays; content amendments remain under revisions. Each
748
+ authority composes its own evidence and neither rewrites the other.
749
+ immutability: >-
750
+ Original numbered archive records remain immutable historical evidence.
751
+ Revisions are additional immutable evidence appended in declared order;
752
+ no revision overwrites, reorders, or deletes a prior revision. A revision
753
+ is byte-stable after publication and an identical revision is an
754
+ idempotent replay.
755
+ provenance: >-
756
+ Revision evidence carries revision provenance only. It is never labeled
757
+ as historical archive provenance. A revision bootstrapped from a complete
758
+ legacy projection record may carry degraded_projection provenance and
759
+ never historical_archive provenance.
760
+ publication_order:
761
+ - validate_target_identity
762
+ - validate_amendment_vocabulary
763
+ - stage_revision
764
+ - publish_revision
765
+ - update_effective_projection
766
+ apply_state: implemented
767
+ apply_state_note: >-
768
+ The revision authority and amend command publish record-local amendments
769
+ with recovery. A valid dry-run reports the exact revision, effective record,
770
+ and projection effect without writing any file. Apply writes a
771
+ record-local override to the revision document only (preserving unrelated
772
+ entries' bytes), retries converge on a stable revision identity, and an
773
+ identical re-submission is an idempotent replay. The decisions projection
774
+ is never rewritten by an amendment; effective detail composes
775
+ base→revisions→overlay. Amend execution still refuses before side effects
776
+ for an unsafe target-only change, a duplicate-revision conflict, a stale
777
+ base hash, or an unsafe target identity, returning an actionable retry or
778
+ repair action. Discover the contract with
779
+ `agentera state decisions explain --verb amend --format json`.
780
+
719
781
  projections:
720
782
  archive:
721
783
  role: complete immutable historical detail
@@ -1369,6 +1431,26 @@ compatibility:
1369
1431
  Compatibility reports provenance and availability only. It does not
1370
1432
  reconstruct missing decision fields, promote summaries to full records, or
1371
1433
  use Git history to satisfy a current source contract.
1434
+ legacy_label_coexistence:
1435
+ dimensions:
1436
+ - confidence
1437
+ current_vocabulary: [firm, provisional, exploratory]
1438
+ current_vocabulary_ref: protocol.yaml DECISION_LABELS (DL1-DL3)
1439
+ known_legacy_examples: [high, medium, low]
1440
+ classification_rule: >-
1441
+ A label value is unsupported when it is not in current_vocabulary. An
1442
+ unsupported inherited label on a record the caller did not touch is
1443
+ explicit legacy state: it is preserved byte- and value-semantically,
1444
+ reported as a legacy caveat, never coerced to the current vocabulary,
1445
+ and never blocks an append, satisfaction update, or amend on a
1446
+ different target. A confidence label supplied by append or amend is new
1447
+ or amended content and must be a current_vocabulary value; otherwise the
1448
+ operation rejects before side effects.
1449
+ no_silent_normalization: >-
1450
+ Unsupported inherited labels are never rewritten to current values
1451
+ without explicit user migration consent. Reads classify them as legacy
1452
+ and never silently promote them to current vocabulary or claim stronger
1453
+ provenance than exists.
1372
1454
 
1373
1455
  budgets:
1374
1456
  schema_version: agentera.stateOutputBudget.v1
@@ -1425,14 +1507,29 @@ budgets:
1425
1507
  max_latency_ms: 15000
1426
1508
  max_heap_delta_bytes: 268435456
1427
1509
  serialized_output:
1428
- prime_capability_context_max_utf8_bytes: 50000
1510
+ # Generic prime capability capsules retain the full instructions body.
1511
+ # The status capability is a separate one-call surface with a stricter
1512
+ # bound declared below and in the JSON surface manifest.
1513
+ prime_capability_context_max_utf8_bytes: 55000
1514
+ prime_status_context_max_utf8_bytes: 25000
1429
1515
  surfaces:
1430
1516
  prime_briefing:
1431
1517
  manifest_id: prime-briefing
1432
- max_utf8_bytes: 35000
1518
+ # Bounded default decision brief (Plan Task 3): the bare default
1519
+ # `agentera prime --format json` projects the full orientation payload
1520
+ # to routing-essential leaves plus named recovery pointers for omitted
1521
+ # rich state. Pretty UTF-8 JSON + trailing newline is measured and an
1522
+ # over-budget brief is rejected in favor of a bounded degraded envelope;
1523
+ # diagnostics stay on stderr. prime_dashboard keeps full fidelity.
1524
+ max_utf8_bytes: 12000
1433
1525
  prime_dashboard:
1434
1526
  manifest_id: prime-dashboard
1435
1527
  max_utf8_bytes: 35000
1528
+ prime_status_context:
1529
+ manifest_id: prime-status-context
1530
+ # Status startup includes the full instructions capsule as well as the
1531
+ # bounded Task 3 decision brief. Diagnostics remain on stderr.
1532
+ max_utf8_bytes: 25000
1436
1533
  prime_sparse:
1437
1534
  manifest_id: prime-fields-sparse
1438
1535
  max_utf8_bytes: 28000
@@ -1441,6 +1538,15 @@ budgets:
1441
1538
  Omit optional historical detail and retain counts, actionable IDs,
1442
1539
  compatibility, source_contract, and exact get/list command pointers. The
1443
1540
  caller must be able to distinguish omitted detail from unavailable detail.
1541
+ The bare default briefing is a bounded decision brief: every required
1542
+ top-level field stays present (content projected to routing-essential
1543
+ leaves), missing versus present-but-empty stays distinguishable through
1544
+ state_presence, and each omitted rich-state family carries a named
1545
+ authoritative recovery command. When even the projected brief exceeds the
1546
+ budget, emit a measured bounded degraded envelope that keeps command,
1547
+ status, mode, state_presence, a brief source_contract, and the
1548
+ byte-budget error with a recovery command; never emit an over-budget
1549
+ payload. Diagnostics are measured on stderr separately.
1444
1550
  validation:
1445
1551
  authority: this file plus the referenced JSON surface manifest
1446
1552
  drift_rule: tests fail if manifest IDs or byte values disagree with this contract
@@ -0,0 +1,42 @@
1
+ schema_version: agentera.verbosityBudgetAuthority.v1
2
+ status: active_authority
3
+ purpose: >-
4
+ Define which artifact schema owns each verbosity budget. Budget values stay
5
+ in the owning schema so validators and future consumers cannot introduce a
6
+ second value table.
7
+ authority:
8
+ source: references/artifacts/verbosity-budget-authority.yaml
9
+ schema_directory: ../../skills/agentera/schemas/artifacts
10
+ single_source_rule: >-
11
+ Each supported artifact resolves to exactly one schema BUDGET group.
12
+ Missing, unreadable, duplicate, or malformed declarations are authority
13
+ errors; consumers must not substitute generic or historical limits.
14
+ classification:
15
+ numeric_limit: A positive max_words value.
16
+ explicit_no_limit: A null max_words value.
17
+ non_word_unit: A positive token_budget value; it does not authorize word lint.
18
+ invalid_declaration: A missing, duplicate, ambiguous, or malformed declaration.
19
+ scope:
20
+ supported_artifacts:
21
+ - artifact_id: changelog
22
+ schema: changelog.yaml
23
+ - artifact_id: decisions
24
+ schema: decisions.yaml
25
+ - artifact_id: design
26
+ schema: design.yaml
27
+ - artifact_id: docs
28
+ schema: docs.yaml
29
+ - artifact_id: experiments
30
+ schema: experiments.yaml
31
+ - artifact_id: health
32
+ schema: health.yaml
33
+ - artifact_id: objective
34
+ schema: objective.yaml
35
+ - artifact_id: plan
36
+ schema: plan.yaml
37
+ - artifact_id: progress
38
+ schema: progress.yaml
39
+ - artifact_id: todo
40
+ schema: todo.yaml
41
+ - artifact_id: vision
42
+ schema: vision.yaml
@@ -62,7 +62,7 @@ slash_route_aliases:
62
62
  Decision 43 aliases are exact `/agentera <alias>` routes, not CLI state
63
63
  commands. Teaching `status`, `build`, `audit`, or `document` as CLI commands
64
64
  would blur route vocabulary with state access; the shared word `plan` keeps
65
- separate meanings as `/agentera plan` routing and `agentera plan` state.
65
+ separate meanings as `/agentera plan` routing and `agentera state plan` state.
66
66
  doctor:
67
67
  status: implemented_hard_rename
68
68
  command: doctor
@@ -170,7 +170,7 @@ structured_output:
170
170
  - summary_fields
171
171
  - entry_fields
172
172
  complete_semantics: >-
173
- When `complete_for_plan_artifact` is true, `agentera plan --format
173
+ When `complete_for_plan_artifact` is true, `agentera state plan --format
174
174
  json` includes plan summary metadata, tasks, dependencies, acceptance
175
175
  criteria, evidence, overall acceptance, surprises, and previous-plan
176
176
  archive references needed for normal read-only startup/evaluation
@@ -222,7 +222,8 @@ structured_output:
222
222
  fields:
223
223
  - command
224
224
  - status
225
- - bundle
225
+ - app_home
226
+ - app
226
227
  - mode
227
228
  - profile
228
229
  - v1_migration
@@ -233,7 +234,10 @@ structured_output:
233
234
  - progress
234
235
  - objective
235
236
  - state_presence
237
+ - project_integration
236
238
  - attention
239
+ - history
240
+ - runtime_lifecycle
237
241
  - decision_attention
238
242
  - next_action
239
243
  - orchestration_context
@@ -359,7 +363,7 @@ startup_completeness:
359
363
  before any raw artifact read. Complete startup state must never require raw
360
364
  artifact reads for normal capability startup.
361
365
  current_cli_fallback:
362
- - agentera plan --format json
366
+ - agentera state plan --format json
363
367
  state_families_added:
364
368
  - plan task details, dependencies, acceptance criteria, and evidence summaries
365
369
  - docs artifact mapping and source-contract completeness metadata
@@ -406,7 +410,7 @@ evidence_context_target_contract:
406
410
  caveats:
407
411
  - profile-derived state is stale and must not trigger profile refresh
408
412
  - orchestration_context is incomplete for missing decisions, vision, and profile state
409
- - command: agentera plan --format json
413
+ - command: agentera state plan --format json
410
414
  included_state:
411
415
  - active plan header and summary
412
416
  - task dependencies
@@ -416,7 +420,7 @@ evidence_context_target_contract:
416
420
  - previous_plan_archived pointer
417
421
  missing_state: []
418
422
  raw_artifact_reads_required: false
419
- - command: agentera docs --format json
423
+ - command: agentera state docs --format json
420
424
  included_state:
421
425
  - artifact mapping
422
426
  - version files
@@ -424,7 +428,7 @@ evidence_context_target_contract:
424
428
  - indexed document freshness
425
429
  missing_state: []
426
430
  raw_artifact_reads_required: false
427
- - command: agentera todo --format json
431
+ - command: agentera state todo --format json
428
432
  included_state:
429
433
  - open 2.3.10 evidence-context TODO
430
434
  - deferred 2.3.11 and 2.3.12 source-contract TODOs
@@ -481,22 +485,22 @@ evidence_context_target_contract:
481
485
  required_for_normal_task_evaluation:
482
486
  - family: evaluation_target
483
487
  source: plan/orchestration CLI state
484
- fallback: agentera plan --format json
488
+ fallback: agentera state plan --format json
485
489
  - family: plan_criteria
486
- source: agentera plan --format json entries.acceptance
490
+ source: agentera state plan --format json entries.acceptance
487
491
  fallback: none when complete_for_plan_artifact is true
488
492
  - family: progress_verification
489
493
  source: agentera state progress list --limit 20 --format json latest verification
490
494
  fallback: agentera state progress get --number N --format json
491
495
  - family: docs_state
492
- source: agentera docs --format json summary and entries
493
- fallback: agentera docs --format json
496
+ source: agentera state docs --format json summary and entries
497
+ fallback: agentera state docs --format json
494
498
  - family: health_state
495
499
  source: agentera state health list --limit 20 --format json latest audit
496
500
  fallback: agentera state health get --number N --format json
497
501
  - family: todo_state
498
- source: agentera todo --format json known issues and source-contract TODOs
499
- fallback: agentera todo --format json
502
+ source: agentera state todo --format json known issues and source-contract TODOs
503
+ fallback: agentera state todo --format json
500
504
  - family: source_contract
501
505
  source: evidence_context.source_contract
502
506
  fallback: listed existing CLI commands before raw reads
@@ -556,7 +560,8 @@ field_selection:
556
560
  fields:
557
561
  - command
558
562
  - status
559
- - bundle
563
+ - app_home
564
+ - app
560
565
  - mode
561
566
  - profile
562
567
  - v1_migration
@@ -567,7 +572,10 @@ field_selection:
567
572
  - progress
568
573
  - objective
569
574
  - state_presence
575
+ - project_integration
570
576
  - attention
577
+ - history
578
+ - runtime_lifecycle
571
579
  - decision_attention
572
580
  - next_action
573
581
  - orchestration_context