agentera 3.0.0-dev.51 → 3.0.0-dev.69
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.
- package/README.md +5 -5
- package/bundle/CHANGELOG.md +21 -11
- package/bundle/UPGRADE.md +23 -7
- package/bundle/references/adapters/package-publication.json +68 -17
- package/bundle/references/adapters/package-registry.yaml +145 -145
- package/bundle/references/analysis/verification-policy.yaml +93 -18
- package/bundle/references/artifacts/state-storage-authority.yaml +50 -11
- package/bundle/skills/agentera/SKILL.md +7 -5
- package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +7 -6
- package/bundle/skills/agentera/capabilities/build/schemas/exit.yaml +6 -5
- package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +18 -10
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +3 -0
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +8 -6
- package/dist/capabilities/build/instructions.js +8 -5
- package/dist/cli/capabilityContext/build.js +12 -3
- package/dist/cli/capabilityContext/planState.js +6 -2
- package/dist/cli/capabilityContext/startupAggregation.js +1 -1
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/prime/briefOrientation.js +0 -1
- package/dist/cli/commands/prime/collectOrientationState.js +13 -6
- package/dist/cli/commands/prime/orientationOutput.js +27 -5
- package/dist/cli/commands/state/write.js +4 -1
- package/dist/cli/dispatch/index.js +1 -1
- package/dist/cli/help.js +1 -0
- package/dist/cli/migrationRequired.js +40 -5
- package/dist/registries/activationTuples.js +3 -2
- package/dist/registries/packagePublication.js +51 -7
- package/dist/state/entityMigrationPreview.js +3 -9
- package/dist/state/entityPublicationContext.js +56 -3
- package/dist/state/planEntities.js +49 -4
- package/dist/state/progressWritePolicy.js +33 -0
- package/dist/state/stateMode.js +138 -1
- package/dist/state/todoDocsEntities.js +62 -7
- package/dist/state/todoReconciliationActivation.js +46 -4
- package/dist/state/todoReconciliationInspection.js +5 -3
- package/dist/state/todoReconciliationRepair.js +149 -1
- package/dist/state/todoReconciliationTransaction.js +20 -7
- package/dist/state/write/explain.js +17 -3
- package/dist/state/write/input.js +25 -1
- package/dist/state/write/runtimeOperations.js +4 -2
- package/dist/state/write/transaction.js +6 -1
- package/dist/validate/activationArtifactEvidence.js +49 -41
- package/dist/validate/activationArtifactEvidenceTypes.js +12 -0
- package/dist/validate/activationEvidenceManifest.js +26 -10
- package/package.json +11 -6
|
@@ -10,13 +10,11 @@ inventory:
|
|
|
10
10
|
rules:
|
|
11
11
|
- owner: stress
|
|
12
12
|
path: packages/cli/test/stress/entityStorageStress.test.ts
|
|
13
|
-
- owner: performance
|
|
14
|
-
path: packages/cli/test/performance/analyticsEvidenceTierCap.test.ts
|
|
15
|
-
- owner: performance
|
|
16
|
-
path: packages/cli/test/performance/entityMigrationPreviewCap.test.ts
|
|
17
13
|
- owner: performance
|
|
18
14
|
path: packages/cli/test/performance/entityAuthorityPerformance.test.ts
|
|
19
15
|
evidence_producer: true
|
|
16
|
+
- owner: capacity
|
|
17
|
+
prefix: packages/cli/test/capacity/
|
|
20
18
|
- owner: package
|
|
21
19
|
prefix: packages/cli/test/packaging/
|
|
22
20
|
|
|
@@ -48,12 +46,14 @@ release_qualification:
|
|
|
48
46
|
overlap stops new work at the contract cleanup margin, settles owned children,
|
|
49
47
|
removes its generated state on failure, and returns before the contract parent margin
|
|
50
48
|
isolation: distinct_home_cache_user_global_config_and_report_per_child
|
|
51
|
-
resource_isolation:
|
|
49
|
+
resource_isolation: performance_runs_alone_after_batch_a_settles_with_one_worker_and_no_other_marked_owner_then_capacity_runs_serially_before_readers
|
|
52
50
|
failure:
|
|
53
51
|
first_observed_owner: preserved
|
|
54
52
|
cancellable_process_groups: cancel
|
|
55
53
|
generated_overlap: cooperative_stop_settle_and_cleanup_without_parent_force_kill
|
|
56
54
|
performance_after_batch_failure: forbidden
|
|
55
|
+
capacity_after_performance_failure: forbidden
|
|
56
|
+
barrier_b_after_capacity_failure: forbidden
|
|
57
57
|
barrier_b_after_performance_failure: forbidden
|
|
58
58
|
barrier_b_after_batch_failure: forbidden
|
|
59
59
|
receipt_after_any_failure: forbidden
|
|
@@ -74,6 +74,17 @@ owners:
|
|
|
74
74
|
performance:
|
|
75
75
|
config: packages/cli/vite.config.ts
|
|
76
76
|
correction: Run `pnpm -C packages/cli test:performance`; check runner conditions and fix the named budget regression.
|
|
77
|
+
execution:
|
|
78
|
+
workers: 1
|
|
79
|
+
authoritative_runner:
|
|
80
|
+
provider: github_actions
|
|
81
|
+
runs_on: ubuntu-24.04
|
|
82
|
+
runner_class: github-hosted-ubuntu-24.04
|
|
83
|
+
runner_class_environment: AGENTERA_PERFORMANCE_RUNNER_CLASS
|
|
84
|
+
runner_identity_environment: AGENTERA_PERFORMANCE_RUNNER_IDENTITY
|
|
85
|
+
actions_environment: GITHUB_ACTIONS
|
|
86
|
+
platform: linux
|
|
87
|
+
architecture: x64
|
|
77
88
|
integration:
|
|
78
89
|
path: packages/cli/test/integration/performanceOwner.integration.mjs
|
|
79
90
|
command: [pnpm, run, test:performance:integration]
|
|
@@ -109,16 +120,76 @@ owners:
|
|
|
109
120
|
--outputFile: output redirection can suppress the evidence line
|
|
110
121
|
--silent: output suppression can hide the evidence line
|
|
111
122
|
--hideSkippedTests: output filtering can hide owner diagnostics
|
|
123
|
+
capacity:
|
|
124
|
+
config: packages/cli/vite.config.ts
|
|
125
|
+
correction: Run `pnpm -C packages/cli test:capacity`; fix the named production-capacity invariant or its fixture.
|
|
126
|
+
execution:
|
|
127
|
+
workers: 1
|
|
112
128
|
package:
|
|
113
129
|
config: packages/cli/vite.package.config.ts
|
|
114
130
|
correction: Run `pnpm -C packages/cli verify:package`; fix package construction or the extracted-package assertion.
|
|
131
|
+
execution:
|
|
132
|
+
wall_time_budget_ms: 60000
|
|
133
|
+
budget_basis:
|
|
134
|
+
baseline:
|
|
135
|
+
source: docs/packaging/v3-release-workflow-baseline.json#measurements.package
|
|
136
|
+
command: pnpm -C packages/cli run verify:package
|
|
137
|
+
serial_runs_ms: [611675, 386578, 307207]
|
|
138
|
+
minimum_ms: 307207
|
|
139
|
+
note: Task 1 recorded a contention fingerprint, so the minimum is a historical ceiling rather than a direct target.
|
|
140
|
+
controlled_measurement:
|
|
141
|
+
measured_on: 2026-08-10
|
|
142
|
+
command: pnpm -C packages/cli run verify:package
|
|
143
|
+
serial_runs_ms: [12376, 11666, 11047]
|
|
144
|
+
owner_wall_time_runs_ms: [11415, 10789, 10202]
|
|
145
|
+
minimum_ms: 11047
|
|
146
|
+
median_ms: 11666
|
|
147
|
+
maximum_ms: 12376
|
|
148
|
+
test_files: 2
|
|
149
|
+
passed_tests: 11
|
|
150
|
+
fixture_construction_cycles: 2
|
|
151
|
+
deterministic_pack_runs: 2
|
|
152
|
+
extracted_smoke_runs: 1
|
|
153
|
+
machine:
|
|
154
|
+
platform: Linux x86_64
|
|
155
|
+
processor: AMD Ryzen 7 9800X3D
|
|
156
|
+
logical_cpus: 16
|
|
157
|
+
node: 22.23.2
|
|
158
|
+
pnpm: 10.30.3
|
|
159
|
+
load_average_at_start:
|
|
160
|
+
- [15.69, 16.16, 15.30]
|
|
161
|
+
- [13.97, 15.76, 15.18]
|
|
162
|
+
- [12.79, 15.38, 15.07]
|
|
163
|
+
conditions: Serial commands with existing dependencies and caches, no intentional verification overlap, and two independent construction roots per command.
|
|
164
|
+
remote_cold_measurement:
|
|
165
|
+
measured_on: 2026-08-12
|
|
166
|
+
owner_wall_time_ms: 28714
|
|
167
|
+
conditions: GitHub-hosted Ubuntu 24.04 with a shared Corepack download cache and otherwise isolated package state.
|
|
168
|
+
calibration_history:
|
|
169
|
+
superseded_single_construction_command_runs_ms: [7500, 7738, 7604, 11733, 11012, 9967, 14293]
|
|
170
|
+
note: These runs calibrated the candidate limits but do not represent the final two-construction snapshot.
|
|
171
|
+
rejected_candidate:
|
|
172
|
+
budget_ms: 10000
|
|
173
|
+
owner_wall_time_ms: 10429
|
|
174
|
+
command_wall_time_ms: 11733
|
|
175
|
+
outcome: tests_passed_budget_failed
|
|
176
|
+
stricter_candidate_validation:
|
|
177
|
+
budget_ms: 15000
|
|
178
|
+
owner_wall_time_runs_ms: [9859, 8962, 13069]
|
|
179
|
+
command_wall_time_runs_ms: [11012, 9967, 14293]
|
|
180
|
+
outcome: passed_repeatedly_before_final_fixture_strengthening
|
|
181
|
+
derivation:
|
|
182
|
+
formula: min(baseline_minimum_ms, max(ceil(controlled_maximum_ms * 1.25 / 5000) * 5000, ceil(remote_cold_ms * 2 / 5000) * 5000))
|
|
183
|
+
controlled_headroom_multiplier: 1.25
|
|
184
|
+
remote_cold_headroom_multiplier: 2
|
|
185
|
+
rounding_quantum_ms: 5000
|
|
115
186
|
|
|
116
187
|
# Deterministic simultaneous-publication and stale-lock recovery evidence remains
|
|
117
188
|
# source-owned. The independent 100-repetition stale-lock race is stress-owned.
|
|
118
189
|
mixed_files: []
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
# scheduled/release.
|
|
190
|
+
# Deterministic response-cap behavior remains source-owned. Production-scale
|
|
191
|
+
# capacity and machine-sensitive performance have separate owners and run in
|
|
192
|
+
# that order during scheduled/release verification.
|
|
122
193
|
|
|
123
194
|
policies:
|
|
124
195
|
targeted: [source]
|
|
@@ -126,23 +197,19 @@ policies:
|
|
|
126
197
|
fast: [source]
|
|
127
198
|
local: [source]
|
|
128
199
|
merge: [source, package]
|
|
129
|
-
scheduled: [source, stress, performance]
|
|
130
|
-
release: [source, stress, performance, package]
|
|
200
|
+
scheduled: [source, stress, performance, capacity]
|
|
201
|
+
release: [source, stress, performance, capacity, package]
|
|
131
202
|
|
|
132
203
|
# Task 1 classified probabilistic stale-lock repetition as scheduled/release
|
|
133
204
|
# evidence after proportional deterministic lock correctness remained in source.
|
|
134
205
|
# Therefore merge receives lock evidence through source, while scheduled also
|
|
135
206
|
# executes the stress owner.
|
|
136
207
|
|
|
137
|
-
# Pre-commit routing
|
|
138
|
-
# surfaces
|
|
208
|
+
# Pre-commit routing marks authority, verification, and specialized-owner
|
|
209
|
+
# surfaces as ci_owned. The local hook runs only source-owned route guards and
|
|
210
|
+
# typecheck; required CI executes the unchanged release policy authoritatively.
|
|
211
|
+
# All other paths retain targeted source routing.
|
|
139
212
|
conservative_routing:
|
|
140
|
-
receipt_reuse:
|
|
141
|
-
environment: AGENTERA_PRECOMMIT_SOURCE_CANDIDATE_DIR
|
|
142
|
-
command: [node, scripts/release-qualification.mjs, source-check]
|
|
143
|
-
success: skip_source_or_release_policy_only
|
|
144
|
-
absent_or_invalid: preserve_existing_policy
|
|
145
|
-
path_is_authority: false
|
|
146
213
|
exact:
|
|
147
214
|
- .lefthook.yml
|
|
148
215
|
- protocol.yaml
|
|
@@ -168,23 +235,31 @@ conservative_routing:
|
|
|
168
235
|
- packages/cli/scripts/reject-direct-prepack.mjs
|
|
169
236
|
- packages/cli/scripts/publication-transaction.mjs
|
|
170
237
|
- packages/cli/scripts/release-qualification.mjs
|
|
238
|
+
- packages/cli/scripts/release-readiness.mjs
|
|
171
239
|
- packages/cli/scripts/release-benchmark.mjs
|
|
172
240
|
- packages/cli/src/validate/activationConjunction.ts
|
|
173
241
|
- packages/cli/src/validate/activationArtifactEvidence.ts
|
|
242
|
+
- packages/cli/src/validate/activationArtifactEvidenceTypes.ts
|
|
174
243
|
- packages/cli/src/validate/activationEvidenceManifest.ts
|
|
175
244
|
- packages/cli/src/validate/activationPackageSemantics.ts
|
|
176
245
|
- packages/cli/src/validate/bootstrapAuthority.ts
|
|
177
246
|
- packages/cli/src/registries/activationTuples.ts
|
|
178
247
|
- packages/cli/src/registries/packagePublication.ts
|
|
179
248
|
- packages/cli/test/sourceSetup.ts
|
|
249
|
+
- packages/cli/test/state/todoDocsEntities.test.ts
|
|
250
|
+
- packages/cli/test/upgrade/upgradeEntityCutover.test.ts
|
|
251
|
+
- packages/cli/test/scripts/precommitVitest.test.ts
|
|
180
252
|
- packages/cli/test/helpers/sourceSubprocess.ts
|
|
181
253
|
- packages/cli/test/helpers/runtimeBootstrapMatrix.ts
|
|
182
254
|
- packages/cli/test/helpers/preCutoverBootstrapDispatcher.mjs
|
|
183
255
|
- packages/cli/test/helpers/runtimeProofCliBoundary.mjs
|
|
256
|
+
- packages/cli/test/integration/runtimeBootstrapMatrix.test.ts
|
|
257
|
+
- packages/cli/test/integration/sourcePackageParity.test.ts
|
|
184
258
|
- references/analysis/verification-policy.yaml
|
|
185
259
|
- scripts/precommit-vitest.sh
|
|
186
260
|
prefixes:
|
|
187
261
|
- .github/workflows/
|
|
262
|
+
- packages/cli/test/capacity/
|
|
188
263
|
- packages/cli/test/packaging/
|
|
189
264
|
- references/adapters/
|
|
190
265
|
- references/artifacts/
|
|
@@ -17,11 +17,14 @@ authority:
|
|
|
17
17
|
Shared entity storage plus the progress, decisions, health, plan, objective,
|
|
18
18
|
experiment, TODO-item, and documentation-inventory family writers and retrieval,
|
|
19
19
|
plus one-way forward import, are implemented but activate entity authority only
|
|
20
|
-
from the durable cutover marker.
|
|
20
|
+
from the durable cutover marker. A marker-absent Git root with no .agentera
|
|
21
|
+
residue is fresh_uninitialized and may publish that marker only with its first
|
|
22
|
+
complete Plan create. The preserved
|
|
21
23
|
singleton families remain legacy files. The
|
|
22
24
|
numbered archives, aggregate overlays, and aggregate revision documents
|
|
23
25
|
remain migration input while that marker is absent; no independent legacy
|
|
24
|
-
read or repair mutation remains
|
|
26
|
+
read or repair mutation remains, and every other marker-absent residue fails
|
|
27
|
+
closed without publication.
|
|
25
28
|
|
|
26
29
|
entity_target:
|
|
27
30
|
status: progress_decisions_health_plan_objective_experiment_todo_and_docs_implemented_other_families_declared
|
|
@@ -44,9 +47,11 @@ entity_target:
|
|
|
44
47
|
remaining_families: declared_not_implemented
|
|
45
48
|
rule: >-
|
|
46
49
|
Every implemented family selects entity behavior only when the durable
|
|
47
|
-
cutover marker is valid.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
cutover marker is valid. The sole marker-absent exception is fresh Plan
|
|
51
|
+
create at a proven fresh_uninitialized Git root; it publishes one complete
|
|
52
|
+
plan graph and marker or rolls back. Other marker-absent consumers fail
|
|
53
|
+
closed; the read-only migration preview and readiness checks do not create
|
|
54
|
+
entity state or write both authorities.
|
|
50
55
|
public_schema:
|
|
51
56
|
canonical_identity_field: id
|
|
52
57
|
canonical_classification_field: artifact
|
|
@@ -1193,16 +1198,30 @@ entity_migration:
|
|
|
1193
1198
|
mode: entities
|
|
1194
1199
|
source_fingerprint: lowercase_sha256_of_bound_migration_inputs
|
|
1195
1200
|
preview_digest: lowercase_sha256_of_bound_migration_preview
|
|
1196
|
-
absent_mode:
|
|
1201
|
+
absent_mode: classified
|
|
1197
1202
|
invalid_behavior: fail_without_fallback
|
|
1198
1203
|
detection: read_only
|
|
1199
|
-
publication_owner:
|
|
1204
|
+
publication_owner: recognized_legacy_development_upgrade_or_fresh_plan_create
|
|
1200
1205
|
selection: >-
|
|
1201
1206
|
Project state and CLI installation state are independent dimensions. A v3
|
|
1202
1207
|
CLI selects this cutover for recognized marker-absent v2 aggregate state
|
|
1203
1208
|
whether the CLI runs from a self-contained npm package or a source
|
|
1204
|
-
checkout.
|
|
1205
|
-
|
|
1209
|
+
checkout. A Git-root project with no .agentera path is fresh_uninitialized:
|
|
1210
|
+
Plan startup remains read-only and its first Plan create is the sole
|
|
1211
|
+
initializer. Pending v1 Markdown, partial, corrupt, and unknown
|
|
1212
|
+
marker-absent state are rejected with their read-only recovery instructions.
|
|
1213
|
+
fresh_initialization:
|
|
1214
|
+
classification: >-
|
|
1215
|
+
fresh_uninitialized requires an exact Git root, absent .agentera state
|
|
1216
|
+
root, no entity records, no recognized aggregate migration input, and no
|
|
1217
|
+
unknown Agentera-owned residue. Ordinary root documents, table-based TODO
|
|
1218
|
+
files, and report directories are user-owned and do not participate.
|
|
1219
|
+
startup: plan_context_is_read_only_and_operable_without_upgrade_apply
|
|
1220
|
+
writer: state_plan_create_only
|
|
1221
|
+
dry_run: previews_marker_plan_and_tasks_without_filesystem_effects
|
|
1222
|
+
apply: publishes_plan_and_tasks_then_marker_with_ordinary_rollback_on_failure
|
|
1223
|
+
other_writers: reject_without_initialization_route
|
|
1224
|
+
global_runtime_resources: not_read_or_changed
|
|
1206
1225
|
invocation:
|
|
1207
1226
|
explicit_apply: full_upgrade_yes_only
|
|
1208
1227
|
dry_run: optional_read_only_preview
|
|
@@ -1269,7 +1288,7 @@ entity_migration:
|
|
|
1269
1288
|
Deterministic legacy plan lifecycle normalization is part of entity
|
|
1270
1289
|
projection during cutover. Upgrade retains the original legacy YAML as
|
|
1271
1290
|
source and recovery evidence instead of rewriting it first.
|
|
1272
|
-
empty_state:
|
|
1291
|
+
empty_state: fresh_plan_create_only_other_marker_absent_state_manual_handoff
|
|
1273
1292
|
existing_entity_state: validate_then_no_op
|
|
1274
1293
|
source_scope:
|
|
1275
1294
|
included_entities: entity_target.entities
|
|
@@ -2854,7 +2873,7 @@ mutation_grammar:
|
|
|
2854
2873
|
preconditions: [entity_mode_marker_is_valid, activation_is_absent_or_replay, todo_reconciliation_is_valid, inactive_projection_is_complete_one_to_one_and_safe, confirmed_effect_sha256_is_authorized_for_preview_or_replay]
|
|
2855
2874
|
owned_fields: [reconciliation, public_document, activation]
|
|
2856
2875
|
input: { mode: none, sources: [], cli_owned_fields: [] }
|
|
2857
|
-
recovery: Preview and review every reported safe activation effect before explicit confirmed apply; unsafe inactive evidence requires
|
|
2876
|
+
recovery: Preview and review every reported safe activation effect before explicit confirmed apply; unsafe inactive evidence requires the separate effect-bound owner-correction operation.
|
|
2858
2877
|
examples: ['npx -y agentera@next state todo activate --dry-run --format json', 'npx -y agentera@next state todo activate --effect-sha256 EFFECT_SHA256 --yes --format json']
|
|
2859
2878
|
bounds: { max_input_utf8_bytes: 0, max_collection_items: 256 }
|
|
2860
2879
|
compacts: true
|
|
@@ -2877,6 +2896,26 @@ mutation_grammar:
|
|
|
2877
2896
|
- { flag: --effect-sha256, field: effect_sha256, kind: string }
|
|
2878
2897
|
- { flag: --yes, field: confirmed, kind: boolean }
|
|
2879
2898
|
|
|
2899
|
+
- artifact: todo
|
|
2900
|
+
verb: correct-owners
|
|
2901
|
+
class: batch_transaction
|
|
2902
|
+
selectors: []
|
|
2903
|
+
preconditions: [entity_mode_marker_is_valid, reconciliation_marker_is_absent_and_unsafe_inactive_or_exact_effect_replay, input_is_complete_one_to_one_owner_mapping, completed_markdown_work_is_not_reopened, confirmed_effect_sha256_and_owner_mapping_are_authorized_for_preview_or_replay]
|
|
2904
|
+
owned_fields: [reconciliation, public_document, activation]
|
|
2905
|
+
input:
|
|
2906
|
+
mode: structured
|
|
2907
|
+
root: one unsafe TODO owner mapping
|
|
2908
|
+
sources: [file, stdin]
|
|
2909
|
+
structured_sources: [file, stdin]
|
|
2910
|
+
cli_owned_fields: []
|
|
2911
|
+
recovery: Supply one complete id/source_line owner mapping, preview its bounded effect, then apply only the exact returned effect; malformed, ambiguous, unmatched, or stale evidence is rejected without effects.
|
|
2912
|
+
examples: ['npx -y agentera@next state todo correct-owners --input owner-mapping.yaml --dry-run --format json', 'npx -y agentera@next state todo correct-owners --input owner-mapping.yaml --effect-sha256 EFFECT_SHA256 --yes --format json']
|
|
2913
|
+
bounds: { max_input_utf8_bytes: 32768, max_collection_items: 256 }
|
|
2914
|
+
compacts: true
|
|
2915
|
+
fields:
|
|
2916
|
+
- { flag: --effect-sha256, field: effect_sha256, kind: string }
|
|
2917
|
+
- { flag: --yes, field: confirmed, kind: boolean }
|
|
2918
|
+
|
|
2880
2919
|
- artifact: todo
|
|
2881
2920
|
verb: create
|
|
2882
2921
|
class: record_payload
|
|
@@ -34,11 +34,13 @@ documentation after deterministic abstention; it learns that contract from the C
|
|
|
34
34
|
|
|
35
35
|
## Bootstrap
|
|
36
36
|
|
|
37
|
-
Run one pre-cutover `@next` call for orientation. It is read-only in
|
|
38
|
-
partially migrated, and v3 projects.
|
|
39
|
-
`
|
|
40
|
-
`
|
|
41
|
-
|
|
37
|
+
Run one pre-cutover `@next` call for orientation. It is read-only in fresh, v2,
|
|
38
|
+
partially migrated, and v3 projects. A Git-root project with no `.agentera`
|
|
39
|
+
state is `fresh_uninitialized`: `prime --context plan` is operable and its first
|
|
40
|
+
`state plan create` is the sole initializer. Recognized v2 state returns the
|
|
41
|
+
full entity-upgrade recovery; partial, corrupt, and unknown marker-absent state
|
|
42
|
+
returns read-only recovery. V3 returns `ok` unless health is degraded. The JSON
|
|
43
|
+
also returns bounded app status, state slices, attention, and startup
|
|
42
44
|
availability.
|
|
43
45
|
|
|
44
46
|
```bash
|
|
@@ -28,12 +28,13 @@ ARTIFACTS:
|
|
|
28
28
|
artifact: progress
|
|
29
29
|
local_role: produces_and_consumes
|
|
30
30
|
description: >-
|
|
31
|
-
|
|
32
|
-
glossary caveat lifecycle evidence. Build consumes latest
|
|
33
|
-
execution_context first, then bounded `npx -y
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
Durable project-outcome log and the sole durable channel for bounded
|
|
32
|
+
autonomous glossary caveat lifecycle evidence. Build consumes latest
|
|
33
|
+
progress evidence from execution_context first, then bounded `npx -y
|
|
34
|
+
agentera@next state progress list --limit 20 --format json` discovery or
|
|
35
|
+
exact `state progress get --id ID` retrieval. The typed writer's
|
|
36
|
+
progress_write_policy governs whether a cycle appends zero or one record;
|
|
37
|
+
every appended cycle has a mandatory non-empty verified field.
|
|
37
38
|
5:
|
|
38
39
|
id: A5
|
|
39
40
|
artifact: health
|
|
@@ -4,9 +4,10 @@ EXIT_CONDITIONS:
|
|
|
4
4
|
condition: complete
|
|
5
5
|
description: >-
|
|
6
6
|
One full cycle completed. Work was selected, implemented, and verified
|
|
7
|
-
against the project's test/build suite. Required
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
against the project's test/build suite. Required artifact updates
|
|
8
|
+
preceded the cycle's single conventional commit. They include TODO,
|
|
9
|
+
changelog, and plan updates. Progress is present for policy-required
|
|
10
|
+
cases and optional for allowed durable outcomes.
|
|
10
11
|
exit_signal: complete
|
|
11
12
|
2:
|
|
12
13
|
id: E2
|
|
@@ -14,8 +15,8 @@ EXIT_CONDITIONS:
|
|
|
14
15
|
description: >-
|
|
15
16
|
The cycle completed but with notable issues. Possible causes:
|
|
16
17
|
verification passed but with warnings, the committed work is narrower
|
|
17
|
-
than intended due to scope reduction, or discoveries
|
|
18
|
-
progress state
|
|
18
|
+
than intended due to scope reduction, or durable discoveries recorded in
|
|
19
|
+
progress state suggest the next cycle may face blockers.
|
|
19
20
|
exit_signal: flagged
|
|
20
21
|
3:
|
|
21
22
|
id: E3
|
|
@@ -3,9 +3,10 @@ VALIDATION:
|
|
|
3
3
|
id: V1
|
|
4
4
|
rule: verified_field_mandatory
|
|
5
5
|
description: >-
|
|
6
|
-
Every progress entity record MUST have a
|
|
7
|
-
carries either observed output from the primary
|
|
8
|
-
N/A tag, or a free-form rationale of at least 8
|
|
6
|
+
Every progress entity record appended by Build MUST have a non-empty
|
|
7
|
+
verified field. The field carries either observed output from the primary
|
|
8
|
+
entrypoint, an allowlisted N/A tag, or a free-form rationale of at least 8
|
|
9
|
+
words.
|
|
9
10
|
severity: critical
|
|
10
11
|
checks:
|
|
11
12
|
- "Every cycle entry has a verified field"
|
|
@@ -16,10 +17,15 @@ VALIDATION:
|
|
|
16
17
|
description: >-
|
|
17
18
|
Build executes exactly one cycle per invocation. After logging required
|
|
18
19
|
artifacts (Step 7) and committing once (Step 8), the capability MUST stop.
|
|
19
|
-
|
|
20
|
+
The typed progress_write_policy determines whether the cycle appends zero
|
|
21
|
+
or one progress record. Multiple cycles require separate invocations or an
|
|
22
|
+
explicit user request.
|
|
20
23
|
severity: critical
|
|
21
24
|
checks:
|
|
22
|
-
- "
|
|
25
|
+
- "At most one progress entity is appended per invocation"
|
|
26
|
+
- "Durable outcomes needed by future work may append one verified record"
|
|
27
|
+
- "Required glossary caveats and plan-completion sweeps append one verified record"
|
|
28
|
+
- "Attempt-only cycles with no durable project truth append no record"
|
|
23
29
|
3:
|
|
24
30
|
id: V3
|
|
25
31
|
rule: no_remote_push
|
|
@@ -41,14 +47,16 @@ VALIDATION:
|
|
|
41
47
|
- "Vision artifact not modified outside brainstorm"
|
|
42
48
|
5:
|
|
43
49
|
id: V5
|
|
44
|
-
rule:
|
|
50
|
+
rule: attempt_history_authority
|
|
45
51
|
description: >-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
Build MUST NOT reconstruct task or release attempt history from progress.
|
|
53
|
+
Plan evaluations own task attempts, while qualification and publication
|
|
54
|
+
receipts own release attempts and retry state. Missing retry state does
|
|
55
|
+
not authorize an attempt-only progress record.
|
|
49
56
|
severity: critical
|
|
50
57
|
checks:
|
|
51
|
-
- "
|
|
58
|
+
- "Progress is not used as task or release attempt history"
|
|
59
|
+
- "Retry state comes only from its owning plan or receipt authority"
|
|
52
60
|
6:
|
|
53
61
|
id: V6
|
|
54
62
|
rule: artifact_path_resolution
|
|
@@ -705,12 +705,15 @@ LIFECYCLE_CONTRACT:
|
|
|
705
705
|
- packages/cli/src/cli/commands/prime/*.ts
|
|
706
706
|
- packages/cli/src/cli/capabilityContext/*.ts
|
|
707
707
|
- packages/cli/src/cli/contracts/orientationState.ts
|
|
708
|
+
- packages/cli/src/cli/migrationRequired.ts
|
|
708
709
|
- packages/cli/src/cli/startupCompletenessContract.ts
|
|
709
710
|
- packages/cli/src/hooks/sessionStart.ts
|
|
710
711
|
- packages/cli/src/eval/evalSkills.ts
|
|
712
|
+
- packages/cli/src/state/stateMode.ts
|
|
711
713
|
writers:
|
|
712
714
|
- packages/cli/src/state/write/*.ts
|
|
713
715
|
- packages/cli/src/state/entityStorage.ts
|
|
716
|
+
- packages/cli/src/state/entityPublicationContext.ts
|
|
714
717
|
- packages/cli/src/cli/commands/state/write.ts
|
|
715
718
|
migrators:
|
|
716
719
|
- packages/cli/src/upgrade/migrateArtifacts*.ts
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Progress Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
3
|
+
# Durable project-outcome log for build. A Build invocation can produce zero or
|
|
4
|
+
# one entry. The typed writer's progress_write_policy decides whether future
|
|
5
|
+
# work needs the outcome or a governed glossary caveat. Attempt-only evidence
|
|
6
|
+
# stays outside progress.
|
|
6
7
|
#
|
|
7
8
|
# The optional glossary_caveat envelope, Build writer, and bounded prime reader
|
|
8
9
|
# are active. Build remains the sole progress producer; Plan may only emit the
|
|
@@ -42,8 +43,8 @@ meta:
|
|
|
42
43
|
name: progress
|
|
43
44
|
version: "1.0.0"
|
|
44
45
|
description: >-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
Durable project-outcome log. Produced by build. Consumed by capabilities
|
|
47
|
+
that need recent project truth and verification evidence.
|
|
47
48
|
artifact_type: agent_facing
|
|
48
49
|
path: ".agentera/progress.yaml"
|
|
49
50
|
authority: legacy_migration_input_only
|
|
@@ -59,6 +60,7 @@ ENTITY_AUTHORITY:
|
|
|
59
60
|
list: npx -y agentera@next state progress list --format json
|
|
60
61
|
get: npx -y agentera@next state progress get --id ID --format json
|
|
61
62
|
mutation: npx -y agentera@next state progress explain --verb append --format json
|
|
63
|
+
write_policy: input_schema.semantics.progress_write_policy
|
|
62
64
|
direct_file_edits: forbidden
|
|
63
65
|
legacy_schema_below: migration_input_only
|
|
64
66
|
semantic_recency:
|
|
@@ -141,7 +143,7 @@ COMPACTION:
|
|
|
141
143
|
use the direct state get contract.
|
|
142
144
|
5:
|
|
143
145
|
id: PX5
|
|
144
|
-
trigger: "When build writes a new
|
|
146
|
+
trigger: "When build writes a new durable outcome entry"
|
|
145
147
|
description: >-
|
|
146
148
|
Compaction runs when the producing skill writes a new entry.
|
|
147
149
|
If >10 full-detail entries exist and their numbered archives verify,
|
|
@@ -6,7 +6,7 @@ export default instructions
|
|
|
6
6
|
|
|
7
7
|
Progress, plans, health audits, and decisions use entity authority: each record has \`id\` and \`artifact\`, lives in one writer-owned entity file, and is read through exact, list, or bounded CLI commands. Use \`agentera state <artifact> explain --format json\` before every supported mutation; never edit entity paths directly. Vision, docs policy, changelog, design, and profile remain intentional singletons.
|
|
8
8
|
|
|
9
|
-
Build
|
|
9
|
+
Build reads whether progress is allowed or required from the \`guidance\` and \`input_schema.semantics.progress_write_policy\` returned by \`agentera state progress explain --verb append --format json\`. Required cases append through the typed writer; allowed durable outcomes may append when future work needs them. Build advances a plan task with its bare ID through \`agentera state plan set-status --id ID\`, and is the sole owner of explicitly confirmed project terminology publication through \`agentera state glossary publish --input REQUEST\`. Glossary publication records the approval and shared entry atomically; it does not authorize glossary lookup, personal-profile mutation, or docs-mapping mutation. Build reads \`capability_context.startup.outcome\` and availability from \`agentera prime --context build --format json\`; use a deferred row's exact \`detail_command\` for detail. When no current executable plan exists, explicit transient work may instead start through \`agentera prime --context build --input <file|-> --format json\` with an \`agentera.buildExecutionRequest.v1\` mapping containing exactly \`schema_version\`, \`scope\`, and \`acceptance\`. This input is bounded, read-only, never persists or creates plan state, and conflicts with current plan-owned execution. Read profile grounding only from the \`content\` returned by \`agentera report profile-grounding --format json\` when its shared validity is \`valid\`; preserve exact absent or repair-needed recovery and never direct-read PROFILE.md. The grounding command excludes the owned personal Glossary section and fails closed on invalid sources. Root \`TODO.md\` and \`CHANGELOG.md\` remain capability-owned editorial files.
|
|
10
10
|
|
|
11
11
|
## Workflow phases: The cycle`)
|
|
12
12
|
.replaceAll("--number N", "--id ID")
|
|
@@ -26,7 +26,7 @@ When autonomous or no-pause execution cannot resolve required review, do not use
|
|
|
26
26
|
Advice, tension, clarification, and caveat lifecycle never call \`agentera state glossary publish\`, create or reuse an approval, replace proposal-digest confirmation, satisfy decisions or plan state, or grant Discuss or Audit publication authority. Explicit project publication remains the separate Build-owned digest-confirmed operation.`)
|
|
27
27
|
.replaceAll("progress.yaml aggregate cycle entry", "progress entity record")
|
|
28
28
|
.replace("Every cycle runs the effective profile.", "Every cycle uses only the sanitized non-glossary profile content returned by `agentera report profile-grounding --format json`.")
|
|
29
|
-
.replaceAll("**Dual-write**: build maintains `.agentera/progress.yaml` and root `CHANGELOG.md`.", "Build records entity progress through the typed writer and maintains root `CHANGELOG.md` separately.")
|
|
29
|
+
.replaceAll("**Dual-write**: build maintains `.agentera/progress.yaml` and root `CHANGELOG.md`.", "Build conditionally records entity progress through the typed writer and maintains root `CHANGELOG.md` separately.")
|
|
30
30
|
.replaceAll("`.agentera/health.yaml` findings", "Health findings returned by `agentera state health list --format json`")
|
|
31
31
|
.replace("If `.agentera/plan.yaml` has `header.status: complete` and every task is complete", "If the selected plan entity is complete and every related task entity is complete")
|
|
32
32
|
.replace("orient through log, exit signal reported", "orient through commit, exit signal reported")
|
|
@@ -36,10 +36,10 @@ Advice, tension, clarification, and caveat lifecycle never call \`agentera state
|
|
|
36
36
|
|
|
37
37
|
**Before writing**, run \`agentera check lint --artifact <artifact> --text "<draft>"\` (or \`--file <path>\`) on the draft entry to check verbosity overruns, abstraction creep, and filler accumulation. Max 3 revision attempts. Flag with \`[post-audit-flagged]\` if still failing.
|
|
38
38
|
|
|
39
|
-
Build records entity progress through the typed writer and maintains root \`CHANGELOG.md\` separately. Complete every required artifact update before committing so implementation, tests, and cycle state land together.
|
|
39
|
+
Build conditionally records entity progress through the typed writer and maintains root \`CHANGELOG.md\` separately. Complete every required artifact update before committing so implementation, tests, and cycle state land together.
|
|
40
40
|
|
|
41
41
|
- **TODO.md**: add newly discovered open issues in severity bands with \`- [ ]\`. Move completed work to \`## ✓ Resolved\` as \`- [x]\` with a resolution summary.
|
|
42
|
-
- **progress**: write one YAML/JSON cycle mapping and run \`agentera state progress append --input <path|-> --format json\`. The writer assigns \`id\`, \`artifact\`, and \`publication_order\`, validates the record, atomically publishes one entity, and returns post-write state. Record-content flags are retired.
|
|
42
|
+
- **progress**: run \`agentera state progress explain --verb append --format json\` and apply its \`progress_write_policy\`. If it requires progress, write one YAML/JSON cycle mapping and run \`agentera state progress append --input <path|-> --format json\`. If it only allows progress, write at most one record when future work needs the durable outcome as a milestone. Otherwise make no progress write. Every appended record has a non-empty \`verified\` field. The writer assigns \`id\`, \`artifact\`, and \`publication_order\`, validates the record, atomically publishes one entity, and returns post-write state. Record-content flags are retired.
|
|
43
43
|
- **CHANGELOG.md**: append a one-line entry under \`## [Unreleased]\`.
|
|
44
44
|
- **plan**: when a plan task closes, run \`agentera state plan set-status --id ID --status complete --format json\` rather than editing the plan directly.
|
|
45
45
|
|
|
@@ -53,4 +53,7 @@ Types: \`feat\`, \`fix\`, \`docs\`, \`refactor\`, \`chore\`, \`test\`. Include i
|
|
|
53
53
|
|
|
54
54
|
If the current task is a version bump: read \`.agentera/docs.yaml\` for the \`versioning\` section. Update every file in \`version_files\` before committing.
|
|
55
55
|
|
|
56
|
-
Then stop. One cycle complete.`)
|
|
56
|
+
Then stop. One cycle complete.`)
|
|
57
|
+
.replace("- `artifact_update_requirements`: plan, TODO, changelog, and progress update obligations\n- `changelog_boundary`", "- `artifact_update_requirements`: plan, TODO, changelog, and progress update obligations\n- `progress_logging_requirements`: required, conditional, or absent progress status plus the authoritative writer policy and guidance command\n- `changelog_boundary`")
|
|
58
|
+
.replace("1. Log blocker in TODO.md with context and decision needed\n2. Log skipped attempt in progress.yaml\n3. Pick different work and complete a full cycle on that instead", "1. Log a durable blocker in TODO.md with context and the decision needed\n2. Apply the typed progress writer guidance; do not record attempt-only detail when no durable project truth changed\n3. Pick different work and complete a full cycle on that instead")
|
|
59
|
+
.replace("Before reporting any status, inspect the last 3 entries in progress.yaml. If all 3 record failed cycles, stop, log the failure pattern to TODO.md, and surface to the user. Do not attempt a 4th consecutive cycle on the same failing problem.", "Do not reconstruct attempt or retry history from progress. Plan evaluation owns task attempts, and qualification or publication receipts own release attempts. Use those authorities when explicit retry state is available; absence of retry state is not evidence of a progress record.");
|
|
@@ -8,6 +8,7 @@ import { planLifecycleState } from "../planLifecycleState.js";
|
|
|
8
8
|
import { discoverProjectVerification } from "./projectVerification.js";
|
|
9
9
|
import { deferredStartupFamilies } from "./startupAggregation.js";
|
|
10
10
|
import { preCutoverCommand } from "../preCutoverCommand.js";
|
|
11
|
+
import { progressWritePolicy } from "../../state/progressWritePolicy.js";
|
|
11
12
|
const TRANSIENT_BUILD_INPUT_COMMAND = preCutoverCommand("prime --context build --input <file|-> --format json");
|
|
12
13
|
const TRANSIENT_BUILD_STDIN_COMMAND = preCutoverCommand("prime --context build --input - --format json");
|
|
13
14
|
function transientSourceProvenance(request, field) {
|
|
@@ -155,10 +156,16 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
155
156
|
};
|
|
156
157
|
const artifactUpdateRequirements = buildArtifactUpdateRequirements(plan, docs);
|
|
157
158
|
if (buildRequest !== null) {
|
|
158
|
-
artifactUpdateRequirements.required_families = ["
|
|
159
|
+
artifactUpdateRequirements.required_families = ["todo", "changelog"];
|
|
160
|
+
artifactUpdateRequirements.conditional_families = ["progress"];
|
|
159
161
|
artifactUpdateRequirements.plan_status_update_required = false;
|
|
160
162
|
artifactUpdateRequirements.policy = "Transient no-plan work does not create, mutate, or require plan state.";
|
|
161
163
|
}
|
|
164
|
+
const progressRequirement = archiveOnly
|
|
165
|
+
? "none"
|
|
166
|
+
: mode === "completed_plan_sweep"
|
|
167
|
+
? "required"
|
|
168
|
+
: "conditional";
|
|
162
169
|
return {
|
|
163
170
|
capability: "build",
|
|
164
171
|
mode,
|
|
@@ -197,8 +204,10 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
197
204
|
},
|
|
198
205
|
artifact_update_requirements: artifactUpdateRequirements,
|
|
199
206
|
progress_logging_requirements: {
|
|
200
|
-
|
|
201
|
-
|
|
207
|
+
requirement: progressRequirement,
|
|
208
|
+
verified_field_mandatory_when_appended: true,
|
|
209
|
+
policy: progressWritePolicy(),
|
|
210
|
+
guidance_command: preCutoverCommand("state progress explain --verb append --format json"),
|
|
202
211
|
latest_progress_verification_pointer: progressVerification.latest_progress_verification_pointer ?? null,
|
|
203
212
|
source_provenance: sourceProvenance("progress", STATE_FAMILY_LIST_COMMANDS.progress),
|
|
204
213
|
},
|
|
@@ -168,15 +168,19 @@ export function buildArtifactUpdateRequirements(plan, docs) {
|
|
|
168
168
|
const mapping = asList(docs.mapping);
|
|
169
169
|
const mapped = mapping.filter((e) => e && typeof e === "object" && e.artifact).map((e) => e.artifact);
|
|
170
170
|
const archiveOnly = Boolean(plan.exists) && plan.active === false;
|
|
171
|
+
const completionSweep = plan.active === true && Boolean(plan.complete_plan);
|
|
171
172
|
return {
|
|
172
|
-
required_families: archiveOnly
|
|
173
|
+
required_families: archiveOnly
|
|
174
|
+
? []
|
|
175
|
+
: ["plan", "todo", "changelog", ...(completionSweep ? ["progress"] : [])],
|
|
176
|
+
conditional_families: archiveOnly || completionSweep ? [] : ["progress"],
|
|
173
177
|
protected_families: ["vision", "objective", "profile", "installed_app"],
|
|
174
178
|
docs_mapping_available: Boolean(docs.exists && mapping.length > 0),
|
|
175
179
|
mapped_artifacts: mapped,
|
|
176
180
|
plan_status_update_required: plan.active === true,
|
|
177
181
|
policy: archiveOnly
|
|
178
182
|
? "Archived plan history is non-executable and requires no execution artifact updates."
|
|
179
|
-
: "Update execution artifacts during the cycle; do not mutate protected state without explicit approval.",
|
|
183
|
+
: "Update required execution artifacts during the cycle; evaluate conditional progress through its typed writer guidance and do not mutate protected state without explicit approval.",
|
|
180
184
|
source_provenance: sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs, "summary.mapping"),
|
|
181
185
|
};
|
|
182
186
|
}
|
|
@@ -50,7 +50,7 @@ export function deferredStartupFamilies(contract) {
|
|
|
50
50
|
* only through `agentera schema`, never through a startup payload.
|
|
51
51
|
*/
|
|
52
52
|
export function startupAggregation(contract, health, cutover = null, todoReconciliation = null) {
|
|
53
|
-
const cutoverRequired = cutover?.status
|
|
53
|
+
const cutoverRequired = cutover?.status === "required" || cutover?.status === "invalid_lifecycle";
|
|
54
54
|
const reconciliationRequired = todoReconciliation?.status === "action_required";
|
|
55
55
|
const blocked = cutoverRequired || reconciliationRequired || (typeof contract.schema_error === "string" && contract.schema_error.length > 0);
|
|
56
56
|
const degraded = health.startup_outcome === "degraded";
|
|
@@ -121,7 +121,7 @@ export function renderDoctorStatus(status, retiredResources) {
|
|
|
121
121
|
}
|
|
122
122
|
else if (unsafeInactiveTodo) {
|
|
123
123
|
lines.push("");
|
|
124
|
-
lines.push("Next:
|
|
124
|
+
lines.push("Next: supply the complete owner mapping, preview the reported correction, then use its exact apply_command.");
|
|
125
125
|
}
|
|
126
126
|
else if (todoReconciliation) {
|
|
127
127
|
lines.push("");
|
|
@@ -732,7 +732,6 @@ function degradedBriefEnvelope(payload, budget, attemptedBytes, mode) {
|
|
|
732
732
|
budget_utf8_bytes: budget,
|
|
733
733
|
projection: "degraded",
|
|
734
734
|
attempted_utf8_bytes: attemptedBytes,
|
|
735
|
-
path_diagnostics_recovery: PATH_DIAGNOSTICS_RECOVERY,
|
|
736
735
|
error: {
|
|
737
736
|
class: "brief_output_budget",
|
|
738
737
|
message: "the configured budget cannot contain the detailed recovery envelope",
|