agentera 3.0.0-dev.38 → 3.0.0-dev.39

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 (101) hide show
  1. package/bundle/CHANGELOG.md +29 -4
  2. package/bundle/references/artifacts/state-storage-authority.yaml +118 -77
  3. package/bundle/references/cli/agent-ready-state-contract.yaml +84 -2
  4. package/bundle/skills/agentera/SKILL.md +26 -26
  5. package/bundle/skills/agentera/capabilities/build/schemas/exit.yaml +5 -4
  6. package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +17 -3
  7. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +14 -3
  8. package/dist/capabilities/build/instructions.js +27 -2
  9. package/dist/capabilities/build/instructions.js.map +1 -1
  10. package/dist/capabilities/orchestrate/instructions.js +1 -1
  11. package/dist/cli/capabilityContext/bespoke.js +4 -3
  12. package/dist/cli/capabilityContext/bespoke.js.map +1 -1
  13. package/dist/cli/capabilityContext/build.js +77 -24
  14. package/dist/cli/capabilityContext/build.js.map +1 -1
  15. package/dist/cli/capabilityContext/closeout.js +2 -2
  16. package/dist/cli/capabilityContext/closeout.js.map +1 -1
  17. package/dist/cli/capabilityContext/evidence.js +2 -6
  18. package/dist/cli/capabilityContext/evidence.js.map +1 -1
  19. package/dist/cli/capabilityContext/planState.js +59 -78
  20. package/dist/cli/capabilityContext/planState.js.map +1 -1
  21. package/dist/cli/capabilityContext/projectVerification.js +410 -0
  22. package/dist/cli/capabilityContext/projectVerification.js.map +1 -0
  23. package/dist/cli/capabilityContext/startup.js +2 -2
  24. package/dist/cli/capabilityContext/startup.js.map +1 -1
  25. package/dist/cli/commands/prime/buildExecutionRequest.js +165 -0
  26. package/dist/cli/commands/prime/buildExecutionRequest.js.map +1 -0
  27. package/dist/cli/commands/prime/collectEntityOrientation.js +2 -1
  28. package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -1
  29. package/dist/cli/commands/prime/collectOrientationState.js +3 -1
  30. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  31. package/dist/cli/commands/prime.js +37 -2
  32. package/dist/cli/commands/prime.js.map +1 -1
  33. package/dist/cli/commands/query.js +4 -0
  34. package/dist/cli/commands/query.js.map +1 -1
  35. package/dist/cli/dispatch/prime.js +22 -1
  36. package/dist/cli/dispatch/prime.js.map +1 -1
  37. package/dist/cli/dispatch/shared.js +1 -1
  38. package/dist/cli/dispatch/shared.js.map +1 -1
  39. package/dist/cli/help.js +2 -1
  40. package/dist/cli/help.js.map +1 -1
  41. package/dist/cli/orientation.js +2 -2
  42. package/dist/cli/orientation.js.map +1 -1
  43. package/dist/registries/glossaryCaveatContract.js +3 -1
  44. package/dist/registries/glossaryCaveatContract.js.map +1 -1
  45. package/dist/state/changelog.js +222 -0
  46. package/dist/state/changelog.js.map +1 -0
  47. package/dist/state/decisionEntities.js +16 -9
  48. package/dist/state/decisionEntities.js.map +1 -1
  49. package/dist/state/decisionMigrationProvenance.js +84 -1
  50. package/dist/state/decisionMigrationProvenance.js.map +1 -1
  51. package/dist/state/decisionOverlay.js +9 -32
  52. package/dist/state/decisionOverlay.js.map +1 -1
  53. package/dist/state/decisionRevision.js +69 -444
  54. package/dist/state/decisionRevision.js.map +1 -1
  55. package/dist/state/decisionRevisionMigration.js +90 -0
  56. package/dist/state/decisionRevisionMigration.js.map +1 -0
  57. package/dist/state/directRetrieval.js +3 -52
  58. package/dist/state/directRetrieval.js.map +1 -1
  59. package/dist/state/entityCutover.js +6 -6
  60. package/dist/state/entityCutover.js.map +1 -1
  61. package/dist/state/entityGlossaryAuthority.js +14 -0
  62. package/dist/state/entityGlossaryAuthority.js.map +1 -0
  63. package/dist/state/entityMigrationIdentity.js +6 -0
  64. package/dist/state/entityMigrationIdentity.js.map +1 -0
  65. package/dist/state/entityMigrationPreview.js +14 -23
  66. package/dist/state/entityMigrationPreview.js.map +1 -1
  67. package/dist/state/entityStorage.js +20 -19
  68. package/dist/state/entityStorage.js.map +1 -1
  69. package/dist/state/healthEntities.js +2 -4
  70. package/dist/state/healthEntities.js.map +1 -1
  71. package/dist/state/listRetrieval.js +7 -38
  72. package/dist/state/listRetrieval.js.map +1 -1
  73. package/dist/state/migrationSourceBinding.js +1 -1
  74. package/dist/state/migrationSourceBinding.js.map +1 -1
  75. package/dist/state/objectiveExperimentEntities.js +3 -3
  76. package/dist/state/objectiveExperimentEntities.js.map +1 -1
  77. package/dist/state/planEntities.js +40 -7
  78. package/dist/state/planEntities.js.map +1 -1
  79. package/dist/state/progressEntities.js +2 -4
  80. package/dist/state/progressEntities.js.map +1 -1
  81. package/dist/state/safeProjectFile.js +4 -1
  82. package/dist/state/safeProjectFile.js.map +1 -1
  83. package/dist/state/startupProjection.js +2 -70
  84. package/dist/state/startupProjection.js.map +1 -1
  85. package/dist/state/stateStorageAuthority.js +48 -0
  86. package/dist/state/stateStorageAuthority.js.map +1 -0
  87. package/dist/state/summarySourceRowAuthority.js +1 -1
  88. package/dist/state/summarySourceRowAuthority.js.map +1 -1
  89. package/dist/state/todoDocsEntities.js +2 -3
  90. package/dist/state/todoDocsEntities.js.map +1 -1
  91. package/dist/state/write/explain.js +38 -59
  92. package/dist/state/write/explain.js.map +1 -1
  93. package/dist/state/write/operations.js +2 -26
  94. package/dist/state/write/operations.js.map +1 -1
  95. package/dist/state/write/transaction.js +3 -3
  96. package/dist/state/write/transaction.js.map +1 -1
  97. package/dist/upgrade/upgradeOrchestrator.js +15 -10
  98. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  99. package/package.json +2 -2
  100. package/dist/state/decisionRevisionPublication.js +0 -532
  101. package/dist/state/decisionRevisionPublication.js.map +0 -1
@@ -3,9 +3,9 @@ name: agentera
3
3
  description: >
4
4
  One agent, one CLI, many capabilities. Per-capability instructions live in
5
5
  `packages/cli/src/capabilities/<name>/instructions.ts` and the runtime serves
6
- it through `agentera prime --context <name> --format json`. Use this skill
6
+ it through `npx -y agentera@next prime --context <name> --format json`. Use this skill
7
7
  for /agentera and Agentera capability requests; bare `/agentera` runs the
8
- agentera prime orientation dashboard path instead of a generic greeting.
8
+ prime orientation dashboard path instead of a generic greeting.
9
9
  version: "3.0.0"
10
10
  spec_sections: [1, 2, 3, 4, 5, 6, 11, 13, 18, 19, 20, 22, 23]
11
11
  capabilities:
@@ -34,18 +34,18 @@ documentation after deterministic abstention; it learns that contract from the C
34
34
 
35
35
  ## Bootstrap
36
36
 
37
- Run `agentera prime` for orientation. The JSON it returns is the complete
37
+ Run `npx -y agentera@next prime` for orientation. The JSON it returns is the complete
38
38
  contract — app status, state slices, attention items, next action, and the
39
39
  source contract that declares what's complete and what requires fallback.
40
40
 
41
41
  ```bash
42
- npx -y agentera prime
42
+ npx -y agentera@next prime
43
43
  ```
44
44
 
45
45
  For capability-specific startup context:
46
46
 
47
47
  ```bash
48
- npx -y agentera prime --context <capability> --format json
48
+ npx -y agentera@next prime --context <capability> --format json
49
49
  ```
50
50
 
51
51
  This returns the capability's instructions, declared read/write needs, artifact
@@ -55,7 +55,7 @@ reading the instructions module directly.
55
55
  For static routing guidance (agentera vs native tools):
56
56
 
57
57
  ```bash
58
- npx -y agentera prime --guidance
58
+ npx -y agentera@next prime --guidance
59
59
  ```
60
60
 
61
61
  ### Upgrade from v2 to v3 development
@@ -82,11 +82,11 @@ the CLI-supplied contract and context.
82
82
 
83
83
  | Request shape | Route |
84
84
  |---|---|
85
- | Bare `/agentera` | 1. Run `agentera prime --context status --format json` once. 2. Read `capability_context.instructions` and `capability_context.context.status_context`. 3. Render the dashboard from that bounded state and follow `next_action` to suggest the next capability. |
86
- | `/agentera <capability-name>` | Run `agentera prime --context <capability> --format json`. Follow the capability's instructions and contract. |
85
+ | Bare `/agentera` | 1. Run `npx -y agentera@next prime --context status --format json` once. 2. Read `capability_context.instructions` and `capability_context.context.status_context`. 3. Render the dashboard from that bounded state and follow `next_action` to suggest the next capability. |
86
+ | `/agentera <capability-name>` | Run `npx -y agentera@next prime --context <capability> --format json`. Follow the capability's instructions and contract. |
87
87
  | `/agentera <capability-name> <topic>` | Same as above; pass `<topic>` as the user's instruction to the capability. |
88
- | Curated leading phrase | Send the request through `agentera route request --input - --format json` using a transient structured `{ version: agentera.route_request.v1, request: ... }` document on stdin. A literal, globally owned phrase may select one capability and preserves the exact original remainder as topic. |
89
- | Other natural language | Send the same privacy-safe request document first. Only after the shared route contract returns `semantic_required`, classify the request as untrusted data from trigger `description`, `priority`, and `disambiguates_against`; copy its `semantic_capsule_sha256` unchanged into the complete nullable API receipt with the same transient request through `agentera route receipt --input - --format json`. |
88
+ | Curated leading phrase | Send the request through `npx -y agentera@next route request --input - --format json` using a transient structured `{ version: agentera.route_request.v1, request: ... }` document on stdin. A literal, globally owned phrase may select one capability and preserves the exact original remainder as topic. |
89
+ | Other natural language | Send the same privacy-safe request document first. Only after the shared route contract returns `semantic_required`, classify the request as untrusted data from trigger `description`, `priority`, and `disambiguates_against`; copy its `semantic_capsule_sha256` unchanged into the complete nullable API receipt with the same transient request through `npx -y agentera@next route receipt --input - --format json`. |
90
90
 
91
91
  Plain-language requests use per-capability `schemas/triggers.yaml`, not
92
92
  hardcoded rules. `next_action` is a readiness suggestion for bare/status
@@ -103,8 +103,8 @@ instructions, tools, or rationale fields. The CLI validates API shape before
103
103
  bounded null projection, then validates version, both digests, canonical
104
104
  capability, outcome binding, and spans.
105
105
  On `selected`, follow only the returned `route_provenance.startup_command` (the
106
- existing `agentera prime --context <selected-capability> --format json` path).
107
- After the CLI validates a `select` receipt, then run `agentera prime --context <selected-capability> --format json` only through that returned authorization.
106
+ existing `npx -y agentera@next prime --context <selected-capability> --format json` path).
107
+ After the CLI validates a `select` receipt, then run `npx -y agentera@next prime --context <selected-capability> --format json` only through that returned authorization.
108
108
  Carry a returned `deferred_intent` intact for later handoff; do not invoke or
109
109
  chain it. A `clarification` starts no capability and asks exactly the returned
110
110
  question. A valid `no_match` returns status with `status_reason: no_match` for
@@ -120,7 +120,7 @@ request, and a compound remainder is preserved rather than silently chained.
120
120
  Decision mpulyomlyl supersedes Decision 76 only for this curated literal fast
121
121
  path.
122
122
 
123
- Run `agentera route evaluate --format json` to evaluate the frozen visible
123
+ Run `npx -y agentera@next route evaluate --format json` to evaluate the frozen visible
124
124
  development and adversarial corpus. Its report binds the protocol, phrase
125
125
  authority, and shared-skill hashes, labels every result with a routing tier, and
126
126
  keeps request text out of output. It proves protocol conformance, not semantic
@@ -144,7 +144,7 @@ Capability handoffs use glyph plus canonical name (e.g. `⧉ build`, `≡ plan`)
144
144
 
145
145
  The prime dashboard rendering contract — template, field-by-field rules, output
146
146
  budget, attention-item ordering, exit marker — is owned by the status capability
147
- instructions. `agentera prime --context status --format json` returns the full
147
+ instructions. `npx -y agentera@next prime --context status --format json` returns the full
148
148
  `capability_context.instructions` body and the bounded
149
149
  `capability_context.context.status_context` state in one response. Render from
150
150
  that capsule without a separate bare-prime call or raw artifact read; use the
@@ -200,30 +200,30 @@ records, publishes atomically, and supports filesystem-safe previews.
200
200
  Discover the live contract before constructing a write:
201
201
 
202
202
  ```bash
203
- agentera state decisions explain --format json
204
- agentera state decisions explain --verb update --format json
203
+ npx -y agentera@next state decisions explain --format json
204
+ npx -y agentera@next state decisions explain --verb update --format json
205
205
  ```
206
206
 
207
207
  The same pattern applies to every writable artifact:
208
208
 
209
209
  ```bash
210
- agentera state <progress|decisions|plan|health> explain --verb <verb> --format json
210
+ npx -y agentera@next state <progress|decisions|plan|health> explain --verb <verb> --format json
211
211
  ```
212
212
 
213
213
  Common mutations:
214
214
 
215
- - `agentera state progress append ... --format json`
216
- - `agentera state decisions append ... --format json`
217
- - `agentera state decisions update --id ID ... --format json`
218
- - `agentera state plan create --input plan.yaml --format json`
219
- - `agentera state plan update|set-status --id ID ... --format json`
220
- - `agentera state plan set-plan-status --id ID ... --format json`
221
- - `agentera state plan archive --format json`
222
- - `agentera state health append --input audit.yaml --format json`
215
+ - `npx -y agentera@next state progress append ... --format json`
216
+ - `npx -y agentera@next state decisions append ... --format json`
217
+ - `npx -y agentera@next state decisions update --id ID ... --format json`
218
+ - `npx -y agentera@next state plan create --input plan.yaml --format json`
219
+ - `npx -y agentera@next state plan update|set-status --id ID ... --format json`
220
+ - `npx -y agentera@next state plan set-plan-status --status complete --format json`
221
+ - `npx -y agentera@next state plan archive --format json`
222
+ - `npx -y agentera@next state health append --input audit.yaml --format json`
223
223
 
224
224
  Add `--dry-run` to preview any mutation without publishing it. Artifacts not
225
225
  listed above are outside the typed writer contract and remain governed by their
226
- owning capability's instructions and safety rails. `agentera schema --format
226
+ owning capability's instructions and safety rails. `npx -y agentera@next schema --format
227
227
  json` exposes the machine-readable writer operation matrix under
228
228
  `state_writer` and on each writable `artifact_schemas[*].write_interface`.
229
229
 
@@ -3,9 +3,10 @@ EXIT_CONDITIONS:
3
3
  id: E1
4
4
  condition: complete
5
5
  description: >-
6
- One full cycle completed. Work was selected, implemented, verified
7
- against the project's test/build suite, committed with a conventional
8
- message, and progress.yaml and TODO.md were updated.
6
+ One full cycle completed. Work was selected, implemented, and verified
7
+ against the project's test/build suite. Required TODO, progress,
8
+ changelog, and plan closeout updates preceded the cycle's single
9
+ conventional commit.
9
10
  exit_signal: complete
10
11
  2:
11
12
  id: E2
@@ -14,7 +15,7 @@ EXIT_CONDITIONS:
14
15
  The cycle completed but with notable issues. Possible causes:
15
16
  verification passed but with warnings, the committed work is narrower
16
17
  than intended due to scope reduction, or discoveries logged in
17
- progress.yaml suggest the next cycle may face blockers.
18
+ progress state suggests the next cycle may face blockers.
18
19
  exit_signal: flagged
19
20
  3:
20
21
  id: E3
@@ -14,9 +14,9 @@ VALIDATION:
14
14
  id: V2
15
15
  rule: one_cycle_per_invocation
16
16
  description: >-
17
- Build executes exactly one cycle per invocation. After logging (Step 8),
18
- the capability MUST stop. Multiple cycles require separate invocations or
19
- an explicit user request.
17
+ Build executes exactly one cycle per invocation. After logging required
18
+ artifacts (Step 7) and committing once (Step 8), the capability MUST stop.
19
+ Multiple cycles require separate invocations or an explicit user request.
20
20
  severity: critical
21
21
  checks:
22
22
  - "Only one progress entity is appended per invocation"
@@ -158,3 +158,17 @@ VALIDATION:
158
158
  checks:
159
159
  - "Advice and caveat paths perform zero glossary publication writes"
160
160
  - "Only separately supplied digest-confirmed publication retains Build authority"
161
+ 15:
162
+ id: V15
163
+ rule: transient_no_plan_execution_input
164
+ description: >-
165
+ When no current executable plan owns startup, Build MAY accept one bounded
166
+ `agentera.buildExecutionRequest.v1` through `prime --context build --input
167
+ <file|-> --format json`. The request supplies explicit scope and acceptance
168
+ transiently; it MUST NOT persist, create, or mutate plan state. Current
169
+ plan-owned execution conflicts instead of silently ignoring the request.
170
+ severity: critical
171
+ checks:
172
+ - "Transient input is used only when no current executable plan owns startup"
173
+ - "No request content is placed in argv or persisted"
174
+ - "No-plan execution requires explicit scope and acceptance"
@@ -385,9 +385,9 @@ TASK:
385
385
  type: list[string]
386
386
  required: false
387
387
  description: >-
388
- CLI-owned completed replacement task IDs from the same plan. Required only
389
- when status is superseded; IDs must be distinct and the replacements remain
390
- complete.
388
+ CLI-owned replacement task IDs from the same plan. Prospective supersession
389
+ requires every replacement to be complete with evaluation.last_verdict pass.
390
+ Required only when status is superseded; IDs must be distinct.
391
391
  8:
392
392
  id: PT22
393
393
  field: superseded_reason
@@ -489,7 +489,17 @@ LIFECYCLE_CONTRACT:
489
489
  forced_archive:
490
490
  unfinished_status: archived
491
491
  effect: Move the plan to immutable history without claiming completion or changing tasks.
492
+ replacement_evidence_transition:
493
+ predicate: A replacement is complete and its latest persisted evaluation.last_verdict is pass.
494
+ supersession: Every superseded_by replacement must satisfy the predicate before a new supersession is published.
495
+ completion: Every replacement named by a superseded task must satisfy the predicate before an open plan becomes complete.
496
+ replay: Exact supersession and plan-completion replays remain idempotent no-ops.
492
497
  compatibility:
498
+ historical_replacement_evidence:
499
+ readable: Existing superseded records without replacement PASS evidence remain readable and are not rewritten or invalidated.
500
+ closeout: An affected open plan cannot become complete until every replacement satisfies the current predicate.
501
+ recovery: An unevaluated complete replacement named by an open same-plan superseded predecessor may persist its first PASS, then closeout can retry.
502
+ scope: The first-PASS exception repairs already-persisted out-of-order state only; it does not permit new supersession without PASS evidence.
493
503
  legacy_read_window:
494
504
  scope: >-
495
505
  Read normalization and typed-writer canonicalization of plan-level
@@ -595,6 +605,7 @@ LIFECYCLE_CONTRACT:
595
605
  - packages/cli/src/cli/orientation.ts
596
606
  - packages/cli/src/cli/appContext.ts
597
607
  - packages/cli/src/cli/commands/state/plan*.ts
608
+ - packages/cli/src/cli/commands/prime.ts
598
609
  - packages/cli/src/state/plan*.ts
599
610
  - packages/cli/src/state/durability.ts
600
611
  - packages/cli/src/cli/commands/prime/*.ts
@@ -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 appends progress with \`agentera state progress append\`, 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 context from \`agentera prime --context build --format json\` plus declared fallback commands. Read profile grounding only from the \`content\` returned by \`agentera report profile-grounding --format json\`; never direct-read the profile path. The grounding command excludes the owned personal Glossary section and fails closed when its boundaries are malformed. Root \`TODO.md\` and \`CHANGELOG.md\` remain capability-owned editorial files.
9
+ Build appends progress with \`agentera state progress append\`, 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 context from \`agentera prime --context build --format json\` plus declared fallback commands. 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\`; never direct-read the profile path. The grounding command excludes the owned personal Glossary section and fails closed when its boundaries are malformed. 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")
@@ -28,5 +28,30 @@ Advice, tension, clarification, and caveat lifecycle never call \`agentera state
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
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.")
30
30
  .replaceAll("`.agentera/health.yaml` findings", "Health findings returned by `agentera state health list --format json`")
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");
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
+ .replace("orient through log, exit signal reported", "orient through commit, exit signal reported")
33
+ .replace("Steps: orient, select, research, plan, dispatch, verify, commit, log.", "Steps: orient, select, research, plan, dispatch, verify, log, commit.")
34
+ .replace("implemented, verified, committed, artifacts updated", "implemented, verified, artifacts updated, committed")
35
+ .replace(/### Step 7: Commit[\s\S]*?Then stop\. One cycle complete\./, `### Step 7: Log
36
+
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
+
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.
40
+
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**: run \`agentera state progress append --type TYPE --phase build --what TEXT --intent TEXT --verified TEXT --format json\`. The writer assigns \`id\`, \`artifact\`, and \`publication_order\`, validates the record, atomically publishes one entity, and returns post-write state.
43
+ - **CHANGELOG.md**: append a one-line entry under \`## [Unreleased]\`.
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
+
46
+ TODO.md Resolved compaction follows the 10/40/50 cap via the validate-artifact hook or \`agentera check compact --mode fix\`.
47
+
48
+ ### Step 8: Commit
49
+
50
+ Commit once with a conventional commit message: \`type(scope): summary\`.
51
+
52
+ Types: \`feat\`, \`fix\`, \`docs\`, \`refactor\`, \`chore\`, \`test\`. Include implementation, tests, and all required artifact updates. MUST NOT commit partial or broken work.
53
+
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
+
56
+ Then stop. One cycle complete.`);
32
57
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/capabilities/build/instructions.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,26gBAA26gB,CAAC,CAAC;AACt+gB,eAAe,YAAY;KACxB,OAAO,CAAC,yDAAyD,EAAE;;;;;;8BAMxC,CAAC;KAC5B,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC;KACnC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC;KACjC,OAAO,CAAC,wHAAwH,EAAE;;;;;;;;;;;;oVAY+M,CAAC;KAClV,UAAU,CAAC,qCAAqC,EAAE,wBAAwB,CAAC;KAC3E,OAAO,CAAC,yCAAyC,EAAE,iIAAiI,CAAC;KACrL,UAAU,CAAC,oFAAoF,EAAE,sGAAsG,CAAC;KACxM,UAAU,CAAC,kCAAkC,EAAE,wEAAwE,CAAC;KACxH,OAAO,CAAC,mFAAmF,EAAE,mFAAmF,CAAC,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/capabilities/build/instructions.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,26gBAA26gB,CAAC,CAAC;AACt+gB,eAAe,YAAY;KACxB,OAAO,CAAC,yDAAyD,EAAE;;;;;;8BAMxC,CAAC;KAC5B,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC;KACnC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC;KACjC,OAAO,CAAC,wHAAwH,EAAE;;;;;;;;;;;;oVAY+M,CAAC;KAClV,UAAU,CAAC,qCAAqC,EAAE,wBAAwB,CAAC;KAC3E,OAAO,CAAC,yCAAyC,EAAE,iIAAiI,CAAC;KACrL,UAAU,CAAC,oFAAoF,EAAE,sGAAsG,CAAC;KACxM,UAAU,CAAC,kCAAkC,EAAE,wEAAwE,CAAC;KACxH,OAAO,CAAC,mFAAmF,EAAE,mFAAmF,CAAC;KACjL,OAAO,CAAC,0CAA0C,EAAE,6CAA6C,CAAC;KAClG,OAAO,CAAC,uEAAuE,EAAE,uEAAuE,CAAC;KACzJ,OAAO,CAAC,qDAAqD,EAAE,qDAAqD,CAAC;KACrH,OAAO,CAAC,4DAA4D,EAAE;;;;;;;;;;;;;;;;;;;;;+BAqB1C,CAAC,CAAC"}
@@ -6,7 +6,7 @@ export default `${instructions
6
6
 
7
7
  Plans, tasks, progress cycles, health audits, and decisions use entity authority: every record has \`id\` and \`artifact\`, lives in one writer-owned entity file, and is read through bounded list or exact \`get --id ID\` commands. Trust \`agentera prime --context orchestrate --format json\` for startup and use declared fallbacks. Discover plan mutations through \`agentera state plan explain --verb <verb> --format json\`; task writes always use the task's bare ID. Never edit entity paths directly.
8
8
 
9
- Advance tasks with \`agentera state plan set-status --id ID\` and persist evaluator outcomes with \`agentera state plan record-evaluation --id ID\`. A superseded task is terminal, satisfies dependencies, and stays out of ready and blocked queues; record it only through \`agentera state plan supersede --id ID --by COMPLETED_ID --reason "..." --format json\`.
9
+ Advance tasks with \`agentera state plan set-status --id ID\` and persist evaluator outcomes with \`agentera state plan record-evaluation --id ID\`. A superseded task is terminal, satisfies dependencies, and stays out of ready and blocked queues; record it only through \`agentera state plan supersede --id ID --by COMPLETED_ID --reason "..." --format json\`. Every replacement must be complete with latest persisted PASS before supersession.
10
10
 
11
11
  ## The orchestration loop`)
12
12
  .replaceAll("--number N", "--id ID")
@@ -15,7 +15,7 @@ export function slimBespokeContext(name, value) {
15
15
  return slimBenchmarkContext(value);
16
16
  return value;
17
17
  }
18
- export function bespokeCapabilityContexts(capabilityName, state) {
18
+ export function bespokeCapabilityContexts(capabilityName, state, buildRequest = null) {
19
19
  // cast: orientation state fields are assembled from parsed .agentera artifacts;
20
20
  // bespoke builders consume JsonObject/typed shapes for these state families.
21
21
  const plan = state.plan;
@@ -27,6 +27,7 @@ export function bespokeCapabilityContexts(capabilityName, state) {
27
27
  const bundle = state.app;
28
28
  const todoItems = state.todo_items;
29
29
  const schemas = state.schemas;
30
+ const projectRoot = String(state.project_root);
30
31
  const history = state.history && typeof state.history === "object" && !Array.isArray(state.history)
31
32
  ? state.history
32
33
  : {};
@@ -35,10 +36,10 @@ export function bespokeCapabilityContexts(capabilityName, state) {
35
36
  : {};
36
37
  return {
37
38
  orchestration_context: orchestrationContext(capabilityName, plan, progress, health, todoItems, docs, profile, nextAction),
38
- closeout_context: documentCloseoutContext(capabilityName, schemas, plan, progress, todoItems, docs, profile, bundle, decisionHistory),
39
+ closeout_context: documentCloseoutContext(capabilityName, schemas, plan, progress, todoItems, docs, profile, bundle, decisionHistory, projectRoot),
39
40
  evidence_context: auditEvidenceContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle, decisionHistory),
40
41
  benchmark_context: optimizeBenchmarkContext(capabilityName),
41
- execution_context: buildExecutionContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle),
42
+ execution_context: buildExecutionContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle, projectRoot, buildRequest),
42
43
  };
43
44
  }
44
45
  //# sourceMappingURL=bespoke.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bespoke.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/cli/capabilityContext/bespoke.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAErH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,KAAiB;IAChE,IAAI,IAAI,KAAK,uBAAuB;QAAE,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,kBAAkB;QAAE,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,IAAI,IAAI,KAAK,kBAAkB;QAAE,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,IAAI,IAAI,KAAK,mBAAmB;QAAE,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,yBAAy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AE,oBAAoB,CACpC,cAAc,EACd,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,MAAM,EACN,eAAe,CAChB;QACD,iBAAiB,EAAE,wBAAwB,CAAC,cAAc,CAAC;QAC3D,iBAAiB,EAAE,qBAAqB,CACtC,cAAc,EACd,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,MAAM,CACP;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"bespoke.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/cli/capabilityContext/bespoke.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAGrH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,KAAiB;IAChE,IAAI,IAAI,KAAK,uBAAuB;QAAE,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,kBAAkB;QAAE,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,IAAI,IAAI,KAAK,kBAAkB;QAAE,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACnE,IAAI,IAAI,KAAK,mBAAmB;QAAE,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,c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,EACR,SAAS,EACT,IAAI,EACJ,OAAO,EACP,MAAM,EACN,eAAe,EACf,WAAW,CACZ;QACD,gBAAgB,EAAE,oBAAoB,CACpC,cAAc,EACd,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,MAAM,EACN,eAAe,CAChB;QACD,iBAAiB,EAAE,wBAAwB,CAAC,cAAc,CAAC;QAC3D,iBAAiB,EAAE,qBAAqB,CACtC,cAAc,EACd,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,MAAM,EACN,WAAW,EACX,YAAY,CACb;KACF,CAAC;AACJ,CAAC"}
@@ -5,7 +5,20 @@ import { closeoutChangelogBoundary, orchestrationTaskSummary, planContextField,
5
5
  import { progressVerificationSummary } from "./progress.js";
6
6
  import { STATE_FAMILY_FALLBACK_COMMANDS, STATE_FAMILY_LIST_COMMANDS } from "./types.js";
7
7
  import { planLifecycleState } from "../planLifecycleState.js";
8
- export function buildExecutionContext(capability, schemas, plan, progress, health, todoItems, docs, profile, bundle) {
8
+ import { discoverProjectVerification } from "./projectVerification.js";
9
+ const TRANSIENT_BUILD_INPUT_COMMAND = "agentera prime --context build --input <file|-> --format json";
10
+ const TRANSIENT_BUILD_STDIN_COMMAND = "agentera prime --context build --input - --format json";
11
+ function transientSourceProvenance(request, field) {
12
+ return {
13
+ source_family: "transient_build_execution_request",
14
+ command: TRANSIENT_BUILD_INPUT_COMMAND,
15
+ field,
16
+ schema_version: request.schema_version,
17
+ source_kind: request.source.kind,
18
+ persisted: false,
19
+ };
20
+ }
21
+ export function buildExecutionContext(capability, schemas, plan, progress, health, todoItems, docs, profile, bundle, projectRoot, buildRequest = null) {
9
22
  if (capability !== "build")
10
23
  return null;
11
24
  const capabilityContract = capabilityContext(capability) ?? {};
@@ -15,14 +28,17 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
15
28
  : asList(plan.tasks).filter((t) => t && typeof t === "object" && !Array.isArray(t));
16
29
  const target = selectEvidenceTarget(plan);
17
30
  const selected = taskByRef(plan, (target && typeof target === "object" ? target.task : null));
18
- const acceptance = selected && typeof selected === "object" ? asList(selected.acceptance) : [];
31
+ const acceptance = buildRequest?.acceptance
32
+ ?? (selected && typeof selected === "object" ? asList(selected.acceptance) : []);
19
33
  const progressVerification = progressVerificationSummary(progress);
20
- const changelogBoundary = closeoutChangelogBoundary(schemas, plan);
34
+ const changelogBoundary = closeoutChangelogBoundary(projectRoot, plan);
21
35
  const sweep = buildPlanCompletionSweep(plan);
22
36
  const archiveOnly = Boolean(plan.exists) && plan.active === false;
23
37
  let mode;
24
38
  if (plan.active === true && plan.complete_plan)
25
39
  mode = "completed_plan_sweep";
40
+ else if (buildRequest !== null && plan.active !== true)
41
+ mode = "no_plan";
26
42
  else if (archiveOnly)
27
43
  mode = "archive_only_history";
28
44
  else if (!plan.exists || tasks.length === 0)
@@ -37,10 +53,6 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
37
53
  stateCaveats.push(`${family} state is not included in prime --context startup context.`);
38
54
  }
39
55
  fallbackCommands.push(...(capabilityContract.cli_fallback ?? []));
40
- if (!plan.exists) {
41
- stateCaveats.push("plan state is unavailable; execution context cannot select plan-driven work.");
42
- fallbackCommands.push("agentera state plan --format json");
43
- }
44
56
  if (lifecycle.status === "degraded") {
45
57
  stateCaveats.push(...(lifecycle.caveats ?? []));
46
58
  fallbackCommands.push("agentera state plan --format json");
@@ -82,48 +94,88 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
82
94
  if (bundle.status !== "up_to_date") {
83
95
  stateCaveats.push("Agentera app files are not up to date; this is a caveat, not approval to repair or update app files.");
84
96
  }
85
- const scopeBoundary = buildScopeBoundary(plan, selected);
97
+ const scopeBoundary = buildRequest === null
98
+ ? buildScopeBoundary(plan, selected)
99
+ : {
100
+ artifact_families: ["progress", "todo", "docs", "health", "changelog", "decisions", "vision", "profile", "design"],
101
+ explicit_scope: buildRequest.scope,
102
+ source_scope: {
103
+ status: "unspecified",
104
+ explicit_paths: [],
105
+ policy: "The transient scope defines work intent only; no source-file allowlist or exclusion is inferred from its text.",
106
+ },
107
+ source_provenance: transientSourceProvenance(buildRequest, "scope"),
108
+ };
86
109
  const sourceScope = scopeBoundary.source_scope && typeof scopeBoundary.source_scope === "object" && !Array.isArray(scopeBoundary.source_scope)
87
110
  ? scopeBoundary.source_scope
88
111
  : {};
89
112
  if (sourceScope.status === "unspecified") {
90
113
  stateCaveats.push("source-file scope is unspecified; no allowed or prohibited source paths were inferred.");
91
114
  }
115
+ const noCurrentPlan = plan.active !== true && lifecycle.status !== "degraded";
116
+ if (noCurrentPlan) {
117
+ fallbackCommands = fallbackCommands.filter((command) => command !== STATE_FAMILY_FALLBACK_COMMANDS.plan);
118
+ if (buildRequest === null) {
119
+ stateCaveats.push("Explicit no-plan scope and acceptance are required before Build can execute without a current plan.");
120
+ fallbackCommands.push(TRANSIENT_BUILD_STDIN_COMMAND);
121
+ }
122
+ }
92
123
  fallbackCommands = uniqueList(fallbackCommands);
93
124
  stateCaveats = uniqueList(stateCaveats);
94
125
  const requiredState = {
95
- work_selection: mode === "plan_driven" || mode === "completed_plan_sweep",
126
+ work_selection: mode === "plan_driven" || mode === "completed_plan_sweep" || buildRequest !== null,
96
127
  acceptance_criteria: mode === "completed_plan_sweep" || acceptance.length > 0,
97
128
  artifact_update_requirements: Boolean(docs.exists),
98
129
  progress_logging_requirements: progressVerification.status === "available" || (progressVerification.caveats ?? []).length > 0,
99
130
  changelog_boundary: changelogBoundary.status === "available",
100
131
  scope_boundary: true,
101
132
  safety_boundaries: true,
133
+ plan_state_healthy: lifecycle.status !== "degraded",
102
134
  };
103
135
  const missingRequired = Object.entries(requiredState).filter(([, present]) => !present).map(([name]) => name);
104
136
  const caveated = stateCaveats.length > 0;
105
- const complete = (mode === "plan_driven" || mode === "completed_plan_sweep") && missingRequired.length === 0;
106
- return {
107
- capability: "build",
108
- mode,
109
- work_selection: {
137
+ const complete = (mode === "plan_driven" || mode === "completed_plan_sweep" || buildRequest !== null)
138
+ && missingRequired.length === 0;
139
+ const workSelection = buildRequest === null
140
+ ? {
110
141
  status: target.status,
111
142
  selection_reason: target.selection_reason,
112
143
  task: selected && typeof selected === "object" ? taskRef(selected) : null,
113
144
  source_provenance: target.source_provenance,
114
145
  caveats: target.caveats ?? [],
115
- },
146
+ }
147
+ : {
148
+ status: "selected",
149
+ selection_reason: "explicit_no_plan_scope",
150
+ task: null,
151
+ scope: buildRequest.scope,
152
+ source_provenance: transientSourceProvenance(buildRequest, "scope"),
153
+ caveats: [],
154
+ };
155
+ const artifactUpdateRequirements = buildArtifactUpdateRequirements(plan, docs);
156
+ if (buildRequest !== null) {
157
+ artifactUpdateRequirements.required_families = ["progress", "todo", "changelog"];
158
+ artifactUpdateRequirements.plan_status_update_required = false;
159
+ artifactUpdateRequirements.policy = "Transient no-plan work does not create, mutate, or require plan state.";
160
+ }
161
+ return {
162
+ capability: "build",
163
+ mode,
164
+ work_selection: workSelection,
116
165
  plan_task: selected && typeof selected === "object" ? orchestrationTaskSummary(selected) : null,
117
166
  acceptance_criteria: {
118
167
  status: acceptance.length > 0 ? "available" : "incomplete",
119
168
  items: acceptance,
120
169
  count: acceptance.length,
121
- source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance"),
170
+ source_provenance: buildRequest === null
171
+ ? sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance")
172
+ : transientSourceProvenance(buildRequest, "acceptance"),
122
173
  },
123
174
  constraints: {
124
- plan_constraints_present: hasRecordedValue(planContextField(plan, "constraints")),
125
- plan_constraints_summary: "Plan constraints are represented here as structured safety and fallback policy; " +
126
- "run the plan CLI fallback only if full wording is needed.",
175
+ plan_constraints_present: buildRequest === null && hasRecordedValue(planContextField(plan, "constraints")),
176
+ plan_constraints_summary: buildRequest === null
177
+ ? "Plan constraints are represented here as structured safety and fallback policy; run the plan CLI fallback only if full wording is needed."
178
+ : "Transient no-plan input supplies scope and acceptance only; no plan constraints are inferred.",
127
179
  protected_actions: [
128
180
  "no profile refresh",
129
181
  "no installed app refresh",
@@ -133,17 +185,18 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
133
185
  "no commit/push/tag/publication without explicit approval",
134
186
  ],
135
187
  unsupported_cli_command_policy: "Do not introduce capability-name or slash-alias CLI commands for Build.",
136
- source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "summary.constraints"),
188
+ source_provenance: buildRequest === null
189
+ ? sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "summary.constraints")
190
+ : transientSourceProvenance(buildRequest, "scope"),
137
191
  },
138
192
  scope_boundary: scopeBoundary,
139
193
  verification_expectations: {
140
194
  latest_progress_verification: progressVerification,
141
- expected_commands: ["focused pytest targets", "Build capability validation", "self-validation", "agentera check compact", "compaction check", "git diff --check"],
142
- source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance"),
195
+ ...discoverProjectVerification(projectRoot),
143
196
  },
144
- artifact_update_requirements: buildArtifactUpdateRequirements(plan, docs),
197
+ artifact_update_requirements: artifactUpdateRequirements,
145
198
  progress_logging_requirements: {
146
- append_cycle: !archiveOnly,
199
+ append_cycle: buildRequest !== null || !archiveOnly,
147
200
  verified_field_mandatory: true,
148
201
  latest_progress_verification_pointer: progressVerification.latest_progress_verification_pointer ?? null,
149
202
  source_provenance: sourceProvenance("progress", STATE_FAMILY_LIST_COMMANDS.progress),
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/cli/capabilityContext/build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAe,gB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IAAI;YACtG,iBAAiB,EAAE,gBAAgB,CAAC,UAAU,EAAE,0BAA0B,CAAC,QAAQ,CAAC;SACtF;QACD,kBAAkB,EAAE,iBAAiB;QACrC,YAAY,EAAE;YACZ,mBAAmB,EAAE,KAAK;YAC1B,8CAA8C,EAAE,IAAI;YACpD,0BAA0B,EAAE,KAAK;YACjC,iBAAiB,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,8CAA8C,EAAE,cAAc,CAAC;SACzH;QACD,qBAAqB,EAAE,KAAK;QAC5B,oBAAoB,EAAE,SAAS;QAC/B,oBAAoB,EAAE,YAAY;QAClC,iBAAiB,EAAE,gBAAgB;QACnC,eAAe,EAAE;YACf,8BAA8B,EAAE,QAAQ;YACxC,QAAQ;YACR,2BAA2B,EAAE,KAAK;YAClC,wBAAwB,EACtB,6GAA6G;gBAC7G,+HAA+H;YACjI,uBAAuB,EAAE,kBAAkB,CAAC,uBAAuB,IAAI,EAAE;YACzE,sBAAsB,EAAE,kBAAkB,CAAC,sBAAsB,IAAI,EAAE;YACvE,wBAAwB,EAAE,aAAa;YACvC,gCAAgC,EAAE,eAAe;YACjD,iBAAiB,EAAE,gBAAgB;YACnC,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE;gBACJ,oBAAoB;gBACpB,sCAAsC;gBACtC,mCAAmC;gBACnC,2BAA2B;gBAC3B,8BAA8B;gBAC9B,+BAA+B;gBAC/B,oBAAoB;gBACpB,gBAAgB;gBAChB,0CAA0C;gBAC1C,gCAAgC;gBAChC,sBAAsB;aACvB;YACD,QAAQ,EAAE,EAAE;SACb;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/cli/capabilityContext/build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAe,gBAA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B,EAAE,KAAK;YAClC,wBAAwB,EACtB,6GAA6G;gBAC7G,+HAA+H;YACjI,uBAAuB,EAAE,kBAAkB,CAAC,uBAAuB,IAAI,EAAE;YACzE,sBAAsB,EAAE,kBAAkB,CAAC,sBAAsB,IAAI,EAAE;YACvE,wBAAwB,EAAE,aAAa;YACvC,gCAAgC,EAAE,eAAe;YACjD,iBAAiB,EAAE,gBAAgB;YACnC,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE;gBACJ,oBAAoB;gBACpB,sCAAsC;gBACtC,mCAAmC;gBACnC,2BAA2B;gBAC3B,8BAA8B;gBAC9B,+BAA+B;gBAC/B,oBAAoB;gBACpB,gBAAgB;gBAChB,0CAA0C;gBAC1C,gCAAgC;gBAChC,sBAAsB;aACvB;YACD,QAAQ,EAAE,EAAE;SACb;KACF,CAAC;AACJ,CAAC"}
@@ -142,14 +142,14 @@ export function closeoutReleaseBoundary(changelogBoundary, bundle) {
142
142
  caveats,
143
143
  };
144
144
  }
145
- export function documentCloseoutContext(capability, schemas, plan, progress, todoItems, docs, profile, bundle, decisionHistory) {
145
+ export function documentCloseoutContext(capability, schemas, plan, progress, todoItems, docs, profile, bundle, decisionHistory, projectRoot) {
146
146
  if (capability !== "document")
147
147
  return null;
148
148
  const capabilityContract = capabilityContext(capability) ?? {};
149
149
  const artifactMappings = closeoutArtifactMappings(docs);
150
150
  const versionPolicy = closeoutVersionPolicy(docs);
151
151
  const todoBlockers = closeoutTodoBlockers(schemas, todoItems);
152
- const changelogBoundary = closeoutChangelogBoundary(schemas, plan);
152
+ const changelogBoundary = closeoutChangelogBoundary(projectRoot, plan);
153
153
  const progressEvidence = progressVerificationSummary(progress);
154
154
  const benchmarkEvidence = closeoutBenchmarkEvidence(docs);
155
155
  const releaseBoundary = closeoutReleaseBoundary(changelogBoundary, bundle);