agentera 3.0.0-dev.22 → 3.0.0-dev.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/bundle/.cursor/agents/agentera.md +1 -1
- package/bundle/.opencode/agents/agentera.md +1 -1
- package/bundle/CHANGELOG.md +15 -5
- package/bundle/README.md +9 -8
- package/bundle/UPGRADE.md +10 -24
- package/bundle/agents/openai.yaml +1 -1
- package/bundle/references/adapters/package-manifest-interface-model.yaml +2 -0
- package/bundle/references/adapters/package-registry.yaml +9 -0
- package/bundle/references/artifacts/state-storage-authority.yaml +842 -15
- package/bundle/references/cli/agent-ready-state-contract.yaml +25 -17
- package/bundle/references/cli/prime-consumer-compatibility.yaml +676 -0
- package/bundle/references/cli/update-channels.yaml +4 -2
- package/bundle/references/cli/vocabulary-index.yaml +3 -3
- package/bundle/references/cli/vocabulary.md +14 -7
- package/bundle/skills/agentera/SKILL.md +35 -20
- package/bundle/skills/agentera/agents/audit.toml +1 -1
- package/bundle/skills/agentera/agents/build.toml +1 -1
- package/bundle/skills/agentera/agents/design.toml +1 -1
- package/bundle/skills/agentera/agents/discuss.toml +1 -1
- package/bundle/skills/agentera/agents/document.toml +1 -1
- package/bundle/skills/agentera/agents/optimize.toml +1 -1
- package/bundle/skills/agentera/agents/orchestrate.toml +1 -1
- package/bundle/skills/agentera/agents/plan.toml +1 -1
- package/bundle/skills/agentera/agents/profile.toml +1 -1
- package/bundle/skills/agentera/agents/research.toml +1 -1
- package/bundle/skills/agentera/agents/status.toml +1 -1
- package/bundle/skills/agentera/agents/vision.toml +1 -1
- package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +12 -12
- package/bundle/skills/agentera/capabilities/audit/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +12 -12
- package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +8 -8
- package/bundle/skills/agentera/capabilities/design/schemas/artifacts.yaml +6 -6
- package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +7 -7
- package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +12 -12
- package/bundle/skills/agentera/capabilities/optimize/schemas/artifacts.yaml +9 -9
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +11 -11
- package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +9 -9
- package/bundle/skills/agentera/capabilities/profile/schemas/artifacts.yaml +2 -2
- package/bundle/skills/agentera/capabilities/research/schemas/artifacts.yaml +3 -3
- package/bundle/skills/agentera/capabilities/status/schemas/artifacts.yaml +11 -11
- package/bundle/skills/agentera/capabilities/vision/schemas/artifacts.yaml +8 -8
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +15 -2
- package/bundle/skills/agentera/schemas/artifacts/docs.yaml +4 -1
- package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +21 -21
- package/bundle/skills/agentera/schemas/artifacts/health.yaml +15 -2
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +36 -15
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +15 -2
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +4 -4
- package/dist/capabilities/audit/instructions.js +13 -1
- package/dist/capabilities/audit/instructions.js.map +1 -1
- package/dist/capabilities/build/instructions.js +14 -1
- package/dist/capabilities/build/instructions.js.map +1 -1
- package/dist/capabilities/discuss/instructions.js +11 -1
- package/dist/capabilities/discuss/instructions.js.map +1 -1
- package/dist/capabilities/document/instructions.js +9 -1
- package/dist/capabilities/document/instructions.js.map +1 -1
- package/dist/capabilities/index.js +9 -8
- package/dist/capabilities/index.js.map +1 -1
- package/dist/capabilities/optimize/instructions.js +10 -1
- package/dist/capabilities/optimize/instructions.js.map +1 -1
- package/dist/capabilities/orchestrate/instructions.js +13 -2
- package/dist/capabilities/orchestrate/instructions.js.map +1 -1
- package/dist/capabilities/plan/instructions.js +10 -1
- package/dist/capabilities/plan/instructions.js.map +1 -1
- package/dist/capabilities/status/startupInstructions.js +35 -0
- package/dist/capabilities/status/startupInstructions.js.map +1 -0
- package/dist/cli/capabilityContext/build.js +3 -3
- package/dist/cli/capabilityContext/build.js.map +1 -1
- package/dist/cli/capabilityContext/closeout.js +5 -5
- package/dist/cli/capabilityContext/closeout.js.map +1 -1
- package/dist/cli/capabilityContext/contract.js +14 -19
- package/dist/cli/capabilityContext/contract.js.map +1 -1
- package/dist/cli/capabilityContext/evidence.js +7 -7
- package/dist/cli/capabilityContext/evidence.js.map +1 -1
- package/dist/cli/capabilityContext/planState.js +12 -11
- package/dist/cli/capabilityContext/planState.js.map +1 -1
- package/dist/cli/capabilityContext/progress.js +1 -1
- package/dist/cli/capabilityContext/progress.js.map +1 -1
- package/dist/cli/capabilityContext/shared.js +8 -2
- package/dist/cli/capabilityContext/shared.js.map +1 -1
- package/dist/cli/capabilityContext/slim.js +2 -1
- package/dist/cli/capabilityContext/slim.js.map +1 -1
- package/dist/cli/capabilityContext/startup.js +22 -11
- package/dist/cli/capabilityContext/startup.js.map +1 -1
- package/dist/cli/capabilityContext/types.js +4 -4
- package/dist/cli/capabilityContext/types.js.map +1 -1
- package/dist/cli/commands/backfill.js +39 -2
- package/dist/cli/commands/backfill.js.map +1 -1
- package/dist/cli/commands/durability.js +34 -1
- package/dist/cli/commands/durability.js.map +1 -1
- package/dist/cli/commands/entityMigrate.js +128 -0
- package/dist/cli/commands/entityMigrate.js.map +1 -0
- package/dist/cli/commands/migrate.js +4 -0
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/prime/briefOrientation.js +584 -0
- package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
- package/dist/cli/commands/prime/collectEntityOrientation.js +148 -0
- package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -0
- package/dist/cli/commands/prime/collectOrientationState.js +21 -27
- package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
- package/dist/cli/commands/prime/orientationOutput.js +118 -24
- package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
- package/dist/cli/commands/prime.js +32 -3
- package/dist/cli/commands/prime.js.map +1 -1
- package/dist/cli/commands/query.js +41 -15
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/commands/schema.js +10 -34
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/state/decisions.js +13 -0
- package/dist/cli/commands/state/decisions.js.map +1 -1
- package/dist/cli/commands/state/docs.js +38 -0
- package/dist/cli/commands/state/docs.js.map +1 -1
- package/dist/cli/commands/state/experimentRecords.js +82 -0
- package/dist/cli/commands/state/experimentRecords.js.map +1 -1
- package/dist/cli/commands/state/experiments.js +13 -0
- package/dist/cli/commands/state/experiments.js.map +1 -1
- package/dist/cli/commands/state/get.js +69 -2
- package/dist/cli/commands/state/get.js.map +1 -1
- package/dist/cli/commands/state/health.js +13 -0
- package/dist/cli/commands/state/health.js.map +1 -1
- package/dist/cli/commands/state/index.js +9 -0
- package/dist/cli/commands/state/index.js.map +1 -1
- package/dist/cli/commands/state/list.js +40 -7
- package/dist/cli/commands/state/list.js.map +1 -1
- package/dist/cli/commands/state/objective.js +24 -0
- package/dist/cli/commands/state/objective.js.map +1 -1
- package/dist/cli/commands/state/plan.js +17 -2
- package/dist/cli/commands/state/plan.js.map +1 -1
- package/dist/cli/commands/state/planTasks.js +38 -25
- package/dist/cli/commands/state/planTasks.js.map +1 -1
- package/dist/cli/commands/state/plans.js +32 -16
- package/dist/cli/commands/state/plans.js.map +1 -1
- package/dist/cli/commands/state/progress.js +12 -0
- package/dist/cli/commands/state/progress.js.map +1 -1
- package/dist/cli/commands/state/shared.js.map +1 -1
- package/dist/cli/commands/state/todo.js +30 -0
- package/dist/cli/commands/state/todo.js.map +1 -1
- package/dist/cli/commands/state/write.js +79 -4
- package/dist/cli/commands/state/write.js.map +1 -1
- package/dist/cli/commands/upgrade.js +65 -31
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/upgradeVerify.js +46 -14
- package/dist/cli/commands/upgradeVerify.js.map +1 -1
- package/dist/cli/commands/validate.js +65 -0
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/dispatch/check.js +8 -1
- package/dist/cli/dispatch/check.js.map +1 -1
- package/dist/cli/dispatch/index.js +6 -0
- package/dist/cli/dispatch/index.js.map +1 -1
- package/dist/cli/dispatch/lifecycle.js +2 -5
- package/dist/cli/dispatch/lifecycle.js.map +1 -1
- package/dist/cli/dispatch/prime.js +15 -0
- package/dist/cli/dispatch/prime.js.map +1 -1
- package/dist/cli/dispatch/state.js +7 -1
- package/dist/cli/dispatch/state.js.map +1 -1
- package/dist/cli/help.js +79 -21
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/migrationRequired.js +84 -0
- package/dist/cli/migrationRequired.js.map +1 -0
- package/dist/cli/orientation/attention.js +2 -2
- package/dist/cli/orientation/attention.js.map +1 -1
- package/dist/cli/orientation.js +13 -10
- package/dist/cli/orientation.js.map +1 -1
- package/dist/cli/planArtifacts.js +192 -42
- package/dist/cli/planArtifacts.js.map +1 -1
- package/dist/cli/prime-blob.js +5 -5
- package/dist/cli/prime-blob.js.map +1 -1
- package/dist/cli/startupCompletenessContract.js +3 -3
- package/dist/cli/startupCompletenessContract.js.map +1 -1
- package/dist/cli/stateQuery.js +42 -5
- package/dist/cli/stateQuery.js.map +1 -1
- package/dist/hooks/compaction/status.js +25 -1
- package/dist/hooks/compaction/status.js.map +1 -1
- package/dist/hooks/cursorSessionStart.js +6 -0
- package/dist/hooks/cursorSessionStart.js.map +1 -1
- package/dist/hooks/sessionStart.js +62 -0
- package/dist/hooks/sessionStart.js.map +1 -1
- package/dist/registries/artifactRegistry.js +23 -14
- package/dist/registries/artifactRegistry.js.map +1 -1
- package/dist/registries/packageRegistry.js +1 -1
- package/dist/registries/packageRegistry.js.map +1 -1
- package/dist/state/archivePublication.js +3 -2
- package/dist/state/archivePublication.js.map +1 -1
- package/dist/state/decisionEntities.js +279 -0
- package/dist/state/decisionEntities.js.map +1 -0
- package/dist/state/decisionLegacyValidation.js +185 -0
- package/dist/state/decisionLegacyValidation.js.map +1 -0
- package/dist/state/decisionOverlay.js +26 -3
- package/dist/state/decisionOverlay.js.map +1 -1
- package/dist/state/decisionRevision.js +632 -0
- package/dist/state/decisionRevision.js.map +1 -0
- package/dist/state/decisionRevisionPublication.js +532 -0
- package/dist/state/decisionRevisionPublication.js.map +1 -0
- package/dist/state/directRetrieval.js +55 -4
- package/dist/state/directRetrieval.js.map +1 -1
- package/dist/state/durability.js +92 -1
- package/dist/state/durability.js.map +1 -1
- package/dist/state/entityCutover.js +390 -0
- package/dist/state/entityCutover.js.map +1 -0
- package/dist/state/entityCutoverGit.js +128 -0
- package/dist/state/entityCutoverGit.js.map +1 -0
- package/dist/state/entityMigrationPreview.js +803 -0
- package/dist/state/entityMigrationPreview.js.map +1 -0
- package/dist/state/entityPublicationContext.js +612 -0
- package/dist/state/entityPublicationContext.js.map +1 -0
- package/dist/state/entityStorage.js +807 -0
- package/dist/state/entityStorage.js.map +1 -0
- package/dist/state/experimentIdentity.js +23 -11
- package/dist/state/experimentIdentity.js.map +1 -1
- package/dist/state/gitBackfill.js.map +1 -1
- package/dist/state/healthEntities.js +227 -0
- package/dist/state/healthEntities.js.map +1 -0
- package/dist/state/healthEntityValidation.js +6 -0
- package/dist/state/healthEntityValidation.js.map +1 -0
- package/dist/state/legacyEntityCutoverEvidence.js +66 -0
- package/dist/state/legacyEntityCutoverEvidence.js.map +1 -0
- package/dist/state/listRetrieval.js +42 -11
- package/dist/state/listRetrieval.js.map +1 -1
- package/dist/state/objectiveExperimentEntities.js +321 -0
- package/dist/state/objectiveExperimentEntities.js.map +1 -0
- package/dist/state/planEntities.js +358 -0
- package/dist/state/planEntities.js.map +1 -0
- package/dist/state/progressEntities.js +382 -0
- package/dist/state/progressEntities.js.map +1 -0
- package/dist/state/projectRoot.js +63 -0
- package/dist/state/projectRoot.js.map +1 -0
- package/dist/state/projectionRecovery.js +458 -0
- package/dist/state/projectionRecovery.js.map +1 -0
- package/dist/state/retrievalAuthority.js +13 -6
- package/dist/state/retrievalAuthority.js.map +1 -1
- package/dist/state/safeProjectFile.js +153 -0
- package/dist/state/safeProjectFile.js.map +1 -0
- package/dist/state/startupProjection.js +68 -1
- package/dist/state/startupProjection.js.map +1 -1
- package/dist/state/stateMode.js +76 -0
- package/dist/state/stateMode.js.map +1 -0
- package/dist/state/todoDocsEntities.js +223 -0
- package/dist/state/todoDocsEntities.js.map +1 -0
- package/dist/state/todoDocsEntityValidation.js +26 -0
- package/dist/state/todoDocsEntityValidation.js.map +1 -0
- package/dist/state/write/candidateMutation.js +281 -0
- package/dist/state/write/candidateMutation.js.map +1 -0
- package/dist/state/write/explain.js +156 -33
- package/dist/state/write/explain.js.map +1 -1
- package/dist/state/write/helpers.js +22 -0
- package/dist/state/write/helpers.js.map +1 -1
- package/dist/state/write/lock.js +794 -87
- package/dist/state/write/lock.js.map +1 -1
- package/dist/state/write/mutation.js +47 -2
- package/dist/state/write/mutation.js.map +1 -1
- package/dist/state/write/operations.js +99 -6
- package/dist/state/write/operations.js.map +1 -1
- package/dist/state/write/planEvaluation.js +107 -0
- package/dist/state/write/planEvaluation.js.map +1 -0
- package/dist/state/write/planPublication.js +11 -55
- package/dist/state/write/planPublication.js.map +1 -1
- package/dist/state/write/transaction.js +111 -358
- package/dist/state/write/transaction.js.map +1 -1
- package/dist/upgrade/compatibility.js +4 -4
- package/dist/upgrade/compatibility.js.map +1 -1
- package/dist/upgrade/migrateArtifactsV2ToV3.js +13 -14
- package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
- package/dist/upgrade/upgradeOrchestrator.js +126 -23
- package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
- package/dist/validate/crossCapability.js +2 -2
- package/dist/validate/crossCapability.js.map +1 -1
- package/dist/validate/lifecycleAdapters/lifecycleMain.js +154 -0
- package/dist/validate/lifecycleAdapters/lifecycleMain.js.map +1 -0
- package/dist/validate/lifecycleAdapters.js +5 -156
- package/dist/validate/lifecycleAdapters.js.map +1 -1
- package/package.json +3 -3
- package/dist/upgrade/upgradeSnapshot.js +0 -93
- package/dist/upgrade/upgradeSnapshot.js.map +0 -1
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
// Capability instructions for optimize
|
|
2
2
|
// Served via `agentera prime --context optimize --format json`. RFC 2119 modal vocab.
|
|
3
3
|
export const instructions = JSON.parse(String.raw `"# OPTIMIZE\n\n**Objective Pursuit: Targeted Iterative Measurement. Experiment, Record, Advance.**\n\nGlyph: ⎘ (protocol ref: SG7).\n\nMetric-driven optimization: improve any measurable property one experiment at a time. User defines the objective, agent writes an eval harness, harness becomes the immutable judge. Improve + pass regression = keep; everything else is discarded.\n\nEach invocation = one experiment. After completing a cycle (orient through log, exit signal reported), **stop**. The next experiment starts only when the user explicitly requests it or switches to ⎈ orchestrate for autonomous multi-experiment execution. A compaction-continue prompt is not consent to start a new experiment.\n\n---\n\n## State artifacts\n\nOptimize reads project state and writes experiment logs. Artifact path resolution is owned by SKILL.md.\n\n| Artifact | Role | Path |\n|----------|------|------|\n| \u0060objective\u0060 | produces_and_consumes | \u0060.agentera/optimize/<name>/objective.yaml\u0060 |\n| \u0060optimize_harness\u0060 | produces | \u0060.agentera/optimize/<name>/harness\u0060 |\n| \u0060experiments\u0060 | produces_and_consumes | \u0060.agentera/optimize/<name>/experiments.yaml\u0060 |\n| \u0060progress\u0060 | consumes | \u0060.agentera/progress.yaml\u0060 |\n| \u0060decisions\u0060 | consumes | \u0060.agentera/decisions.yaml\u0060 |\n| \u0060profile\u0060 | consumes | \u0060status.profile\u0060 |\n| \u0060docs\u0060 | consumes | \u0060.agentera/docs.yaml\u0060 |\n| \u0060benchmark_context\u0060 | consumes | \u0060agentera prime --context optimize --format json\u0060 |\n| \u0060todo\u0060 | produces | \u0060TODO.md\u0060 |\n\n\u0060objective.yaml\u0060 and \u0060experiments.yaml\u0060 always live under \u0060.agentera/optimize/<objective-name>/\u0060 for the active objective; they are NOT resolved via docs.yaml mapping. Use the selected objective's stable \u0060header.id\u0060 as \u0060OBJECTIVE_ID\u0060. Read experiment history with \u0060agentera state experiments list --objective OBJECTIVE_ID [--limit N] [--cursor TOKEN] --format json\u0060, fetch exact detail with \u0060agentera state experiments get --objective OBJECTIVE_ID --number N --format json\u0060, and publish only through \u0060agentera state experiments publish --objective OBJECTIVE_ID --number N --input EXPERIMENT.yaml --format json\u0060. Lists use opaque snapshot cursors, report whole-entry omissions, and preserve full, summary-only, or unavailable detail without fabricating archive history.\n\n### objective.yaml\n\nEvergreen. Created via brainstorm on first run, refined only when the user explicitly asks. Outside those two cases, the agent reads it but never writes it.\n\n\u0060\u0060\u0060yaml\ntarget: Optimization target name\nstatus: active\nobjective: >-\n Precise metric, current value, and target value, for example reduce p95\n latency of /api/search from 320ms to under 100ms.\nwhy: >-\n What changes when the target is hit, who benefits, and what tradeoffs matter.\nmeasurement:\n command: .agentera/optimize/<objective-name>/harness\n metric: p95_latency_ms\n direction: lower\n baseline: 320\n target: 100\n budget:\n runs: 5\n time_limit: 10m\nconstraints:\n - Existing tests must pass.\n - Public API must not change.\nscope:\n included: [api/search]\n excluded: [public_api]\n\u0060\u0060\u0060\n\nThe objective MUST be precise enough to measure, constraints clear enough to enforce, and scope defined enough to prevent wandering. Fixed budgets are part of the measurement contract — keep them in objective.yaml and the locked harness.\n\n### harness\n\nEval script that measures the metric and outputs structured JSON. Written during brainstorm, approved by the user, then **locked**. MUST NOT be modified during optimization cycles.\n\nWraps the project's own tooling (test runners, benchmarks, linters) and translates output into a consistent format. Before writing a harness, inspect the project's existing test, benchmark, lint, or measurement commands.\n\n**Output contract** (minimal):\n\n\u0060\u0060\u0060json\n{\"metric\": <number>, \"direction\": \"higher\"|\"lower\"}\n\u0060\u0060\u0060\n\n**Output contract** (with optional fields for richer signal):\n\n\u0060\u0060\u0060json\n{\"metric\": 85.5, \"direction\": \"higher\", \"unit\": \"%\", \"detail\": \"42/50 tests passing\", \"breakdown\": [{\"name\": \"unit\", \"value\": 95.0}, {\"name\": \"integration\", \"value\": 60.0}]}\n\u0060\u0060\u0060\n\nThe harness is the **immutable ground truth**, separating measurement from optimization. If wrong, the user MUST explicitly ask to rebuild it.\n\n### experiments.yaml\n\n\u0060\u0060\u0060yaml\nexperiments:\n - number: N\n timestamp: YYYY-MM-DD HH:MM\n hypothesis: What we expected to improve and why.\n method: The approach taken to test the hypothesis.\n change: One-line summary of the code change.\n metric:\n before: 320\n after: 250\n direction: lower\n verdict: better\n regression: pass\n status: kept\n commit: <hash>\n inspiration: External source, if any.\n conclusion: What the experiment taught.\n next: What the result suggests trying next.\n context:\n intent: Why this experiment was chosen.\n constraints: Which objective constraints were in play.\n unknowns: What was uncertain before running it.\n scope: What scope boundaries were applied.\n\u0060\u0060\u0060\n\nObjective closure is recorded once in \u0060objective.yaml\u0060; do not hand-edit \u0060experiments.yaml\u0060 or append a separate closure record. The last published experiment already records the result that met the target.\n\nThe \"Next\" field from the previous experiment is a suggestion, not a mandate. Re-evaluate fresh each cycle based on the full experiment history.\n\n---\n\n## Workflow phases: The cycle\n\n### Brainstorm\n\nRuns when objective.yaml doesn't exist (first run) or when the user explicitly asks to refine the objective. In all other cases, skip straight to the cycle.\n\n1. **Objective**: \"What metric, current value, target?\" If code exists, run existing test/bench/lint commands first.\n2. **Motivation**: \"Why does this matter? What breaks at current value? What's possible at target?\"\n3. **Constraints**: \"What must NOT break? Off-limits files? Resource limits?\" If a decision profile exists, propose constraints from it.\n4. **Scope**: \"Which parts to focus on? Where are the biggest gains?\" Read codebase to propose informed boundaries.\n\nSynthesize into a precise charter. Before writing objective.yaml, run \u0060agentera check lint --artifact objective --text \"<draft>\"\u0060 to check verbosity overruns, abstraction creep, and filler accumulation. Max 3 revision attempts. Flag with [post-audit-flagged] if still failing. Write to \u0060.agentera/optimize/<objective-name>/objective.yaml\u0060. Present for approval.\n\nWrite the eval harness using the project's own tooling and the objective's measurement fields. The harness MUST output JSON with at least \u0060metric\u0060 and \u0060direction\u0060. Present, explain, get approval, run once to establish baseline.\n\nWhen **refining**, read current objective.yaml, show proposed changes with rationale, get confirmation. If the harness changes, the user MUST approve the new version. After brainstorm, proceed to experiment 1.\n\n### The cycle\n\nStep markers: display \u0060── step N/7: verb\u0060 before each step.\nSteps: orient, analyze, hypothesize, implement, measure, decide, log.\n\n### Step 1: Orient\n\n**Benchmark context**: for benchmark-oriented work, use \u0060benchmark_context\u0060 from \u0060agentera prime --context optimize --format json\u0060 before direct retained benchmark files. If \u0060benchmark_context.source_contract.complete_for_benchmark_context\u0060 is true, consume the bounded fields (\u0060latest_report\u0060, \u0060history_summary\u0060, \u0060runtime_coverage\u0060, \u0060state_access_metrics\u0060, \u0060token_impact\u0060, \u0060comparison\u0060, \u0060recommendation\u0060, \u0060manual_refresh\u0060). Do not read \u0060latest-report.json\u0060, \u0060latest-report.md\u0060, or \u0060runs.jsonl\u0060 during normal startup. If incomplete, follow \u0060benchmark_context.fallback_commands\u0060 and \u0060benchmark_context.manual_refresh\u0060 first. Direct benchmark file reads are last-resort diagnostics only. Never run \u0060mage bench:startupState\u0060 automatically; manual-only.\n\nWhen reporting benchmark evidence, preserve caveats about manual-only execution, missing or malformed retained evidence, empty local history, runtime coverage degradation, missing token estimates, non-comparable previous rows, and privacy boundaries. Do not expose raw transcripts, corpus files, intermediates, runtime store paths, session IDs, private salts, generated salted hashes, raw benchmark report bodies, or full local benchmark paths.\n\n**Active-objective inference**: before reading any per-objective artifact, determine which objective is active by inspecting \u0060.agentera/optimize/\u0060:\n\n- No objective subdirectories exist → run the brainstorm.\n- For each subdirectory with an objective.yaml, classify it as closed when \u0060status: closed\u0060. Do not reopen closed objectives.\n- User explicitly names a closed objective → load its artifacts read-only, summarize that it is closed, ask before defining successor work.\n- All subdirectories closed → ask the user for a successor objective.\n- One non-closed subdirectory → use it.\n- Multiple non-closed subdirectories → run \u0060git log -1 --format=%aI -- .agentera/optimize/<name>/experiments.yaml\u0060 for each and pick the most recent.\n- Ambiguous → ask the user to specify.\n\n1. **Experiment history**: run \u0060agentera state experiments list --objective OBJECTIVE_ID --limit 5 --format json\u0060; use exact \u0060get\u0060 only when full detail is needed and preserve returned compatibility, provenance, omission, and detail-availability fields.\n2. **objective.yaml**: the metric, target, constraints, and scope\n3. **Decision profile**: use \u0060status.profile\u0060 from prime. Apply confidence thresholds per protocol.yaml. If missing, proceed without persona grounding but flag it.\n4. **Project discovery** (experiment 1 or when unfamiliar): map directory structure within scope, read dependency manifests, and read README.md, AGENTS.md.\n5. \u0060git log --oneline -20\u0060 for recent changes\n\nBefore experimenting: in your response, list the current baseline, target, status, and constraints from objective.yaml.\n\n**Objective closure procedure**: when closing an objective, update objective.yaml with canonical closed state: \u0060status: closed\u0060, \u0060closed_at: <ISO-8601 UTC timestamp>\u0060, \u0060final_value: <value>\u0060, \u0060target: <target>\u0060, and \u0060reason: <reason>\u0060. Do not append a separate experiments closure entry; the objective document owns closure state.\n\n**Exit-early stop condition**: If objective.yaml or experiments.yaml evidence shows the target is already met and the objective is not already closed, run the objective closure procedure with reason \u0060already met at startup\u0060, report exit signal \u0060complete: objective achieved\u0060, and stop before Analyze.\n\n### Step 2: Analyze\n\nRun two checks:\n\n**2a. Experiment history**: if experiments.yaml has prior entries, run:\n\n\u0060\u0060\u0060bash\nagentera state experiments list --objective OBJECTIVE_ID --limit 5 --format json\n\u0060\u0060\u0060\n\nOutputs recent experiment status counts, metric deltas, conclusions, and next-step notes.\n\n**2b. Current metric**: run the eval harness to get the baseline for this experiment:\n\n\u0060\u0060\u0060bash\nchmod +x .agentera/optimize/<objective-name>/harness && .agentera/optimize/<objective-name>/harness\n\u0060\u0060\u0060\n\nParse the JSON output. Record the current metric as the baseline.\n\n**Plateau detection**: if \u0060plateau_detected: true\u0060 (no improvement in 3+ experiments), flag explicitly. Consider a radically different approach, ⬚ research, or escalate to the user.\n\n### Step 3: Hypothesize\n\nFormulate a single, focused hypothesis.\n\nEffort-bias check: if one hypothesis took more effort to construct, reset before selection. Choose by experiment history, expected metric impact, risk, constraints, and smallest falsifiable test; construction effort is not evidence.\n\n1. **Review history**: what's been tried, what worked, what failed?\n2. **Seek inspiration**: for non-trivial domains, 2-3 targeted web queries for techniques, libraries, or patterns.\n3. **Formulate**: \"I expect [change] to improve the metric because [reasoning].\" MUST be falsifiable.\n\nBe conservative early; escalate if conservative approaches plateau.\n\n### Step 4: Implement\n\n**Pre-spawn Git commit**: before creating the worktree, commit any pending artifact changes so the subagent branches from current state. Run \u0060git status --porcelain\u0060. If empty, skip to spawn. Stage only the artifact files this session wrote. Commit with \u0060chore(optimize): checkpoint before worktree dispatch\u0060. Do not pass \u0060--no-verify\u0060. If pre-commit hooks reject the commit: fix and retry. If retry also fails, abort the spawn.\n\n**Stale-base awareness**: before spawning, run \u0060git rev-list --count origin/main..HEAD\u0060. If the count is greater than zero, the worktree will be based on a stale commit. Proceed with spawn, but in Step 5 do NOT merge the worktree branch: fetch the diff and apply it to the main checkout. Re-run the eval harness in the main checkout.\n\nUse the runtime-native subagent surface (Task tool, \u0060@agent\u0060 descriptor, etc.) — never spawn by running \u0060agentera optimize\u0060 or other capability-name CLI commands.\n\nSpawn an implementation sub-agent in a worktree (\u0060isolation: \"worktree\"\u0060) with:\n\n- The hypothesis from step 3\n- Relevant context files (objective.yaml, recent experiments, source files being modified)\n- Clear constraint: implement the hypothesis and nothing else\n\n\u0060\u0060\u0060\nYou are implementing one optimization experiment for [project].\n\n## Hypothesis\n[The hypothesis]\n\n## Context\n- Current metric: [value] ([unit])\n- Target: [target value]\n- Scope: [files/modules in scope from objective.yaml]\n\n## Constraints\n- Implement ONLY what the hypothesis describes. No scope creep.\n- Do NOT modify the eval harness at .agentera/optimize/<objective-name>/harness.\n- Do NOT modify objective.yaml or experiments.yaml.\n- Follow existing code patterns and conventions.\n- Read the files you are modifying before changing them.\n- Keep the change as small as possible while testing the hypothesis.\n- If you encounter a bug unrelated to your task, note it but do not fix it.\n\u0060\u0060\u0060\n\nWait for the implementation agent to complete before proceeding.\n\n### Step 5: Measure\n\nAfter implementation completes, run two checks in sequence:\n\n**5a. Regression check**: run the project's existing test/build/lint suite. If the regression check fails, **stop here**. The experiment is discarded. Do not run the eval harness. Log the regression failure and move to Step 7.\n\n**5b. Metric measurement**: run the eval harness. Parse the JSON output. Compare the new metric against the baseline from Step 2.\n\n### Step 6: Decide\n\nPresent the decision conversationally: what the numbers say and what you'd recommend, then the structured gate below makes it official.\n\nApply the decision gate. **Both conditions MUST be true** to keep an experiment:\n\n1. **Regression check passed** (from Step 5a)\n2. **Metric improved**: the new value is strictly better than the baseline, in the direction declared by the harness (lower for \"lower\", higher for \"higher\")\n\nIf both pass: **keep**. Merge the worktree branch into the current branch. Commit with a conventional commit message:\n\n\u0060\u0060\u0060\nperf(scope): summary of what improved the metric\n\nMetric: <before> → <after> ⮉ (<unit>)\n\u0060\u0060\u0060\n\nIf either fails: **discard**. The worktree is abandoned. No merge. No commit.\n\nIf the kept experiment's new metric also meets the target in the harness direction, mark the objective as ready for closure after the experiment entry is logged in Step 7.\n\n### Step 7: Log\n\nBefore writing, run \u0060agentera check lint --artifact experiments --text \"<draft>\"\u0060 (or \u0060--file <path>\u0060) 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.\n\nSummarize the experiment for the user before writing the log: what moved, what didn't, and what it suggests trying next. Then write the structured record.\n\nWrite the schema-valid experiment entry without its CLI-owned \u0060number\u0060 field to a temporary YAML/JSON input, then run \u0060agentera state experiments publish --objective OBJECTIVE_ID --number N --input EXPERIMENT.yaml --format json\u0060. The writer validates identity and schema, durably publishes immutable full detail, atomically updates the bounded projection, and makes byte-equivalent retries idempotent.\n\nIf Step 6 marked the objective as ready for closure, immediately run the objective closure procedure with reason \u0060experiment met target\u0060. This closure is part of the same log step, after the experiment result is recorded.\n\nDo not compact or rewrite experiment history manually; publication owns the immutable archive and 10/40/50 projection.\n\nThen stop. One experiment complete.\n\n---\n\n## Safety rails\n\n<critical>\n\n- MUST NOT push to any remote. Local commits only.\n- MUST NOT modify the eval harness during an optimization cycle. Only during brainstorm (bootstrap) or user-requested refinement.\n- MUST NOT modify objective.yaml during a cycle except for canonical closure when the target is met. Other edits only happen during brainstorm or refine.\n- MUST NOT bypass the project's test/lint/build suite. Regression check before every metric measurement. Regression failure = automatic discard.\n- MUST NOT modify git config or skip git hooks.\n- MUST NOT force push, amend published commits, or run destructive git operations.\n- MUST NOT keep an experiment that causes a regression, even if the metric improved.\n- One experiment per invocation. MUST NOT attempt multiple experiments.\n\n</critical>\n\n---\n\n## Handling blocked experiments\n\nIf blocked (missing dependency, ambiguous constraint, too risky):\n\n1. Publish a schema-valid discarded experiment record with the blocker in its conclusion and context\n2. Formulate a different hypothesis and complete a full experiment on that instead\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060─── ⎘ optimize · <status> ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 bullet details below the summary.\n\n- **complete** (EX1): One experiment completed the full cycle: hypothesis formulated, implementation dispatched, regression check passed, metric measured, decision made (kept or discarded), and the experiment published through the typed writer.\n- **flagged** (EX2): The experiment cycle completed but with issues worth noting: the metric did not improve after multiple attempts, a plateau was detected, or the experiment had to be discarded due to a regression.\n- **stuck** (EX3): Cannot proceed because objective.yaml is missing and the brainstorm cannot be completed without user input, the eval harness is broken and cannot be repaired without user approval, or the regression check infrastructure is unavailable.\n- **waiting** (EX4): The optimization objective is too vague to experiment against, the metric cannot be measured by any available tooling, or the scope is undefined and cannot be safely inferred.\n\nBefore reporting any status, inspect the last 3 entries in \u0060.agentera/progress.yaml\u0060 via \u0060agentera state progress\u0060. If all 3 entries record failed or discarded experiments, this constitutes 3 consecutive failures: **stop the cycle**, log the failure pattern to TODO.md, and surface the situation to the user with a recommended course of action. Do not attempt a 4th consecutive experiment on the same problem.\n\nAfter reporting an exit signal, the cycle is over — the next experiment requires an explicit user request or ⎈ orchestrate.\n\n---\n\n## Cross-capability integration\n\nOptimize is part of a twelve-capability suite.\n\n### Invokes ⬚ research\n\nWhen the Hypothesize step needs external techniques (especially after a plateau), search for approaches the way ⬚ research would. Read the source deeply, extract transferable patterns, and fold them into the next hypothesis.\n\n### Reads ♾ profile output\n\nEvery experiment reads \u0060status.profile\u0060 from prime. Confidence thresholds (CS1-CS5) determine which entries are strong constraints vs suggestions. Stale or missing profile is a caveat, not approval to refresh profile state.\n\n### Uses ❈ discuss for objective decisions\n\nWhen the brainstorm surfaces ambiguity about what to optimize (competing metrics, unclear constraints, or tradeoffs between measurement approaches), suggest ❈ discuss to deliberate first. During Orient, use \u0060agentera state decisions list --limit 20 --format json\u0060 for prior deliberation context and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical context.\n\n### Audited by ⛶ audit\n\nWhen an audit reveals a poor dimension grade with a clearly measurable improvement path (test coverage, complexity score, dependency count), the finding can become an optimization objective. ⛶ audit may suggest ⎘ optimize when the metric and direction are clear.\n\n### Fed by ≡ plan\n\nWhen a plan includes optimization-shaped tasks (improving a measurable metric), plan can delegate those tasks to optimize. The plan's acceptance criteria inform the optimization objective.\n\n### Fed by ⧉ build\n\nWhen build picks optimization-shaped work, it delegates to optimize. Build provides the context; optimize runs the experiment loop.\n\n### Getting started\n\n**First optimization**: run \u0060/agentera profile\u0060 to generate or refresh the decision profile (skip if recent). Run \u0060/agentera optimize\u0060; the first run detects no objective.yaml, runs the brainstorm to define the objective and write the eval harness, then proceeds to experiment 1.\n\n**Resuming**: run \u0060/agentera optimize\u0060; if objective.yaml and the harness exist, experimenting starts immediately. Reads bounded experiment history with objective-scoped list/get commands.\n\n**Changing the target**: edit objective.yaml directly, or tell optimize to \"refine the objective\" for a guided session. If the measurement approach needs to change, the harness MUST be rebuilt and re-approved.\n\n**Drawing in external techniques**: run \u0060/agentera research <url>\u0060 with a relevant article, repo, or resource. The analysis surfaces optimization techniques applicable to the objective. The next experiment picks it up from the inspiration analysis.\n"`);
|
|
4
|
-
export default instructions
|
|
4
|
+
export default instructions
|
|
5
|
+
.replace(/## State artifacts[\s\S]*?## Workflow phases/, `## State artifacts
|
|
6
|
+
|
|
7
|
+
Objectives, experiments, progress cycles, and decisions use entity authority: each record has \`id\` and \`artifact\`, lives in one writer-owned entity file, and is read through bounded list or exact \`get --id ID\` commands. Use \`agentera state objective explain\` and \`agentera state experiments explain\` before typed entity writes; never edit entity paths directly. The benchmark harness, TODO, docs policy, and profile retain their declared file or singleton boundaries.
|
|
8
|
+
|
|
9
|
+
## Workflow phases`)
|
|
10
|
+
.replaceAll("--number N", "--id ID")
|
|
11
|
+
.replaceAll("--task N", "--id ID")
|
|
12
|
+
.replaceAll("`.agentera/progress.yaml`", "the progress entity view")
|
|
13
|
+
.replaceAll("`.agentera/decisions.yaml`", "the decisions entity view");
|
|
5
14
|
//# sourceMappingURL=instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/optimize/instructions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,sFAAsF;AACtF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,uztBAAuztB,CAAC,CAAC;AACl3tB,eAAe,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/optimize/instructions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,sFAAsF;AACtF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,uztBAAuztB,CAAC,CAAC;AACl3tB,eAAe,YAAY;KACxB,OAAO,CAAC,8CAA8C,EAAE;;;;mBAIxC,CAAC;KACjB,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC;KACnC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC;KACjC,UAAU,CAAC,2BAA2B,EAAE,0BAA0B,CAAC;KACnE,UAAU,CAAC,4BAA4B,EAAE,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
// Capability instructions for orchestrate
|
|
2
2
|
// Served via `agentera prime --context orchestrate --format json`. RFC 2119 modal vocab.
|
|
3
3
|
export const instructions = JSON.parse(String.raw `"# ORCHESTRATE\n\n**Orchestration Runtime: Knowledge-coordinated Execution Strategy, Targeted Routing. Evaluate, Resolve, Adapt.**\n\nGlyph: ⎈ (protocol ref: SG12).\n\nA meta-orchestrator that delegates capabilities as subagents, evaluates each task with audit, and loops through plans until work is done. The thin orchestrator: reads plans, routes tasks, gates quality. Never touches code. All creativity happens in delegated capabilities; orchestrate follows a deterministic state machine.\n\nEach invocation = one orchestration session. Multiple plan cycles within a single session. In orchestrate only, \u0060dispatch\u0060 and \u0060chain\u0060 are autonomous verbs inside the approved orchestration flow; \u0060suggest\u0060 waits for user confirmation before invoking.\n\n---\n\n## State artifacts\n\nOrchestrate produces no new artifact files. It reads and updates existing artifacts. Normal startup begins from \u0060agentera prime --context orchestrate --format json\u0060.\n\nTrust \u0060orchestration_context.source_contract\u0060. When \u0060complete_for_orchestration_context\u0060 is true, the context is authoritative — no raw plan, progress, health, TODO, or decisions reads for task selection or evaluator handoff. When incomplete, run listed fallback commands before any raw artifact read. Raw reads are last-resort diagnostics, not normal startup.\n\nThe \u0060agentera\u0060 CLI is a state interface. Do not run capability-name commands such as \u0060agentera build\u0060 or \u0060agentera plan\u0060.\n\n| Artifact | Role | Purpose |\n|----------|------|---------|\n| \u0060plan\u0060 | produces_and_consumes | Task queue. Use \u0060orchestration_context.task_queue\u0060 and \u0060selected_next_task\u0060; update status (pending → complete/blocked) only after evaluation. |\n| \u0060progress\u0060 | consumes | Cross-cycle context. Use \u0060orchestration_context.progress_verification\u0060; dispatched capabilities write their own entries. |\n| \u0060health\u0060 | consumes | Health context after plan completion to decide whether to start a new plan. |\n| \u0060todo\u0060 | produces | Blocked task logging. Write when a task exhausts its retry budget. |\n| \u0060decisions\u0060 | consumes | Decision context. Use included caveats or \u0060agentera state decisions list --limit 20 --format json\u0060; preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060. |\n| \u0060vision\u0060 | consumes | Direction context for bootstrap. If missing from context, treat as a caveat. |\n| \u0060profile\u0060 | consumes | Persona context. Preserve stale or missing caveats; do not refresh profile during orchestration. |\n| \u0060docs\u0060 | consumes | Artifact path resolution for write targets. |\n\n### Decision satisfaction authority\n\nWhen orchestration touches decision satisfaction, agents may mark provisional satisfaction with evidence only. Orchestrate MUST NOT mark, infer, or user-confirm final satisfaction; only the user confirms final satisfaction. If decisions are compacted, missing satisfaction state, open, provisional, or review-needed, preserve the caveat and review pressure in dispatch and evaluation context.\n\nVisual tokens: \u0060skills/agentera/protocol.yaml\u0060 (task states VT1-VT4, glyph SG12, exit signals EX1-EX4, severity SI1-SI4, decision labels DL1-DL3).\n\n---\n\n## The orchestration loop\n\nThe orchestrator follows a deterministic state machine. It does not reason creatively about orchestration; it follows the loop.\n\n### Step 0: Assess\n\nStart from \u0060agentera prime --context orchestrate --format json\u0060. Check \u0060orchestration_context.source_contract\u0060, the returned plan summary, and \u0060state_presence\u0060 before considering raw artifacts.\n\n- **No plan in returned state**: bootstrap mode. Delegate to research for vision-gap analysis, then plan for plan creation. If the vision artifact is also absent or caveated, suggest ⛥ vision first and wait for user confirmation.\n- **Plan exists, \u0060header.status: complete\u0060, and all tasks complete**: completed-plan closure. Run the staleness check, archive the plan, then spawn audit for a health check. If clean, chain research then plan for the next plan cycle. Include lineage, staleness findings, health issues, and source-contract caveats as context.\n- **Plan exists, but blocked or incomplete tasks remain**: do not archive it as successful completion. Route to the orchestration loop or replanning so incomplete evidence stays visible.\n- **Plan exists, tasks pending**: proceed to the loop using \u0060orchestration_context\u0060 task selection.\n\n**Staleness check** (plan completion): When all tasks are complete, check whether delegated capabilities updated their expected artifacts.\n\n1. **Identify delegated capabilities** from plan task history and progress summary in CLI context.\n2. **Compare modification dates**: for each expected artifact, check \u0060git log -1 --format=%aI -- <path>\u0060 against the plan's creation date. An artifact is stale if it was not modified since the plan's creation and the owning capability was delegated at least once during the plan.\n3. **Surface findings**: include stale artifact findings as informational context for the next plan cycle. Archive the plan with \u0060agentera state plan archive --format json\u0060. The writer owns immutable archive naming and active-plan removal.\n\n---\n\nStep markers: display \u0060── task N · step M/5: verb\u0060 before each step in the loop. N is the task number from the selected orchestration context task.\n\n### Step 1: Select task\n\nUse \u0060orchestration_context.selected_next_task\u0060 when present. Otherwise, use \u0060orchestration_context.task_queue.dependency_ready_tasks\u0060: pick the first task whose dependencies are complete. Treat \u0060orchestration_context.task_queue.blocked_tasks[*].blocked_reasons\u0060 as the dependency explanation.\n\nIf no tasks are eligible (all remaining tasks are blocked by incomplete dependencies), report \u0060stuck\u0060 with the dependency chain.\n\nUse decision state or caveats from the returned context first. If decisions are missing from startup context, run \u0060agentera state decisions list --limit 20 --format json\u0060. Preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 in dispatch and evaluation context instead of filling gaps by reconstruction.\n\n### Step 2: Delegate\n\nInfer which capability handles the task based on its description:\n\n| Task signals | Target capability |\n|--------------|-------------------|\n| Implementation, building, coding, feature, fix, refactor | ⧉ build |\n| Documentation, docs, README, CHANGELOG | ▤ document |\n| Health audit, architecture review, code quality check | ⛶ audit |\n| Research, external patterns, library evaluation | ⬚ research |\n| Optimization, performance, metric improvement, benchmark | ⎘ optimize |\n| Visual identity, design tokens, DESIGN.md | ◰ design |\n| Version bump | ⧉ build (with bump instructions from docs artifact) |\n\nIf the task does not clearly map, default to ⧉ build.\n\nSpawn the target capability through the runtime-native subagent substrate. Do not run capability-name CLI commands; the \u0060agentera\u0060 CLI remains a state interface.\n\n\u0060\u0060\u0060\nYou are executing a planned task for [project].\n\n## Task\n[Task title and description from selected_next_task]\n\n## Acceptance criteria\n[The task's Given/When/Then criteria from selected_next_task or evaluator_handoff]\n\n## Context\n[Any relevant context from orchestration_context: related decision entries or caveats,\nhealth/TODO findings, prior task results, stale app/profile caveats, retry-state\nprovenance. Keep brief.]\n\n## Constraints\n- Execute ONLY this task. No scope creep.\n- Follow existing code patterns and conventions.\n- Use the runtime-native subagent descriptor or Task surface for the selected capability.\n- Commit your changes with a conventional commit message.\n- You are working on a plan-driven task. Update the task status in the plan artifact\n to ■ complete when done.\n\u0060\u0060\u0060\n\nWait for the task-notification result.\n\n### Step 3: Evaluate\n\nEvaluation has two surfaces in sequence: an orchestrator-side presence check using latest progress verification, then an audit delegation whose prompt is extended with an evidence audit. Both surfaces must run before the task can be resolved.\n\n**Surface 1: Presence check from progress verification**\n\nWhen the delegated capability was build (or any capability that produces progress cycle entries), perform a cheap evidence presence check before spawning audit:\n\n1. Start with \u0060orchestration_context.progress_verification\u0060 and its \u0060latest_progress_verification_pointer\u0060.\n2. If unavailable or incomplete, run \u0060agentera state progress list --limit 20 --format json\u0060 before any raw artifact read.\n3. Look for a non-empty \u0060verified\u0060 field in the latest relevant progress entry.\n4. **Present and non-empty**: proceed to Surface 2.\n5. **Missing or empty**: treat the task as a failed evaluation. Go straight into Step 4's FAIL branch with \"missing or empty \u0060verified\u0060 field in progress Cycle N\" as the failure reason.\n\n**Surface 2: Audit delegation with evidence audit**\n\nOnce the presence check passes, spawn audit as a subagent to verify the work:\n\n\u0060\u0060\u0060\nYou are evaluating a completed task for [project].\n\n## Task that was completed\n[Task title and description from evaluator_handoff]\n\n## Acceptance criteria to verify\n[The task's Given/When/Then criteria from evaluator_handoff]\n\n## What to check\n- Verify each acceptance criterion against the current codebase state.\n- Check for unintended side effects from the implementation.\n- Verify the project's test/build suite still passes.\n\n## Verification evidence audit\n- Use the latest progress verification pointer and \u0060verified\u0060 evidence supplied by\n the orchestration context or \u0060agentera state progress list --limit 20 --format json\u0060.\n- Compare the recorded evidence to the task's acceptance criteria.\n- Report whether the evidence substantiates the criteria or is merely trivially\n populated (e.g., \"tests pass\" without any observation of the actual feature\n running counts as insufficient).\n- If the field is \u0060N/A: <tag>\u0060, confirm the tag is drawn from the allowlist\n (\u0060docs-only\u0060, \u0060refactor-no-behavior-change\u0060, \u0060chore-dep-bump\u0060,\n \u0060chore-build-config\u0060, \u0060test-only\u0060) AND that the tag fits the nature of the work.\n- If the field is a free-form N/A rationale, confirm it is at least 8 words long AND\n actually explains why the change has no observable behavior.\n- Flag the task as FAIL on the evidence audit if the recorded \u0060verified\u0060 content\n does not substantiate the acceptance criteria.\n\n## Source-contract caveats to preserve\n- Include compacted decision caveats, stale health/profile/app caveats, missing\n state-family caveats, and retry-state provenance exactly as supplied.\n- Do not treat missing retry attempts as an attempt count. If status is\n \u0060not_recorded\u0060 or \u0060unavailable\u0060, keep that status in the evaluation report.\n\n## Output format\nFor each acceptance criterion, report:\n- status: PASS or FAIL\n- evidence: what you checked and what you found\n- citation: \u0060<file>:<line>\u0060 OR \u0060not-applicable: <reason>\u0060 — **required for every FAIL row**\n- verify_command: exact \u0060grep\u0060 or \u0060git show\u0060 invocation — **required for every FAIL row\n with a file:line citation**; the command must reproduce the evidence at the cited line\n\nUse \u0060orchestration_context.evaluator_handoff.output_requirements\u0060 from prime context as\nthe machine-readable citation contract. FAIL rows without a valid citation are incomplete\nand must be treated as evaluation failures.\n\nThen report the verification evidence audit outcome (PASS or FAIL with reasoning).\n\nThen give an overall verdict: PASS (all criteria met and evidence audit passed) or FAIL\n(any criterion failed or evidence audit failed).\n\u0060\u0060\u0060\n\nWait for the audit verdict.\n\n### Step 4: Resolve\n\nBased on audit's verdict:\n\n**PASS**: Mark the task \u0060■ complete\u0060 (VT1) in the plan artifact (if the delegated capability did not already do so). Proceed to Step 5.\n\n**FAIL (retries < 2)**: Increment the retry count. Re-delegate to the same capability with audit's findings as additional context:\n\n\u0060\u0060\u0060\nYou are retrying a task that failed evaluation for [project].\n\n## Original task\n[Task title and description]\n\n## Acceptance criteria\n[The task's Given/When/Then criteria]\n\n## Evaluation findings (what failed)\n[Audit's failure report with evidence]\n\n## What to fix\nAddress each failure point. All acceptance criteria must pass on re-evaluation.\n\u0060\u0060\u0060\n\nReturn to Step 3.\n\n**FAIL (retries = 2)**: The task has exhausted its retry budget. Mark the task \u0060▨ blocked\u0060 (VT4) in the plan artifact. Log the failure to TODO.md with audit's findings as context. Proceed to Step 5.\n\nWhen writing to the plan artifact or TODO.md, use the task identity and caveats from \u0060orchestration_context\u0060. Do not refresh installed app/profile state, edit the vision artifact, or invent retry attempt counts.\n\n### Step 5: Log and loop\n\nCheck the plan state:\n\n- **More pending tasks with satisfied dependencies?** Return to Step 1.\n- **All tasks complete?** Return to Step 0 for completed-plan closure.\n- **Complete + blocked or incomplete tasks?** Keep the plan active and route to replanning or TODO logging; do not archive as successful completion.\n- **Context approaching budget limit?** Stop the session, report current progress.\n- **User interrupt?** Stop the session, report current progress.\n\n---\n\n## Safety rails\n\n<critical>\n\n- MUST NOT read implementation source code. The orchestrator delegates; it does not implement. Artifact files (\u0060.agentera/*.yaml\u0060, \u0060TODO.md\u0060) are state records, not source code; raw reads are last-resort after CLI context and listed fallback commands.\n- MUST NOT run tests, builds, linters, or implementation project commands directly. Delegated capabilities handle all verification.\n- MUST NOT modify the vision artifact. The orchestrator reads direction; it does not set it.\n- MUST NOT delegate to a capability without an active plan task justifying it (except during bootstrap in Step 0).\n- MUST NOT push to any remote. Local operations only.\n- MUST NOT retry a task more than 2 times. After the second failure, mark blocked and move on.\n- MUST NOT skip evaluation. Every completed task must be verified by audit before being marked complete.\n- MUST NOT make implementation decisions. Delegate to the appropriate capability.\n- MUST NOT write to progress, changelog, or other capability-owned artifacts. Dispatched capabilities write their own entries. Orchestrate changes plan lifecycle state only through \u0060agentera state plan set-status ...\u0060 and \u0060agentera state plan archive\u0060.\n- MUST NOT research external patterns or libraries. Delegate to research.\n- MUST NOT mark, infer, or user-confirm final decision satisfaction. Only the user confirms. Preserve caveats for missing, compacted, open, provisional, or review-needed satisfaction state.\n\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: emit \u0060⎈ orchestrate · <status>\u0060 on its own line, followed by a summary sentence. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a \u0060▸\u0060 (VT15) bullet below the summary identifying what needs attention.\n\n- **complete** (EX1): All plan tasks are complete, the health check passed, and the session concluded with all planned work finished.\n- **flagged** (EX2): The plan was executed but with issues: one or more tasks were blocked after exhausting retries, or the post-plan health check revealed problems. Each concern is listed explicitly.\n- **stuck** (EX3): Cannot proceed because the plan has circular dependencies preventing any task from becoming eligible, no target capabilities are available to delegate, or file access prevents reading or updating artifacts.\n- **waiting** (EX4): No plan exists and the bootstrap chain cannot proceed because the vision artifact is absent and the user has not confirmed how to create one, or a delegated capability returned \u0060waiting\u0060 status requiring user input.\n\n### Loop stop condition\n\nEach task gets max 2 retries before being blocked. Additionally, if 3 consecutive different tasks all fail evaluation (even after their retries), orchestrate stops the session and escalates:\n\n1. **Stop**: do not delegate more tasks.\n2. **Log**: file the pattern to TODO.md with what was attempted across the 3 tasks and what appears systematically wrong.\n3. **Surface**: tell the user and recommend a course of action (e.g., \"⛶ audit for a full audit\", \"❈ discuss to reconsider the plan\", \"the plan may need replanning via ≡ plan\").\n\n---\n\n## Cross-capability integration\n\nOrchestrate is the orchestration layer that chains all other capabilities together. Each active runtime provides its registry-declared subagent substrate: OpenCode: \u0060OpenCode .opencode/agents single primary agent (D73)\u0060; Codex CLI: \u0060Codex ~/.codex/agents TOML descriptors\u0060; Cursor IDE and cursor-agent are one Cursor identity: \u0060Cursor .cursor/agents single agent descriptor (D73)\u0060; Copilot CLI: \u0060Copilot CLI host-managed dispatch\u0060. Orchestrator-side instructions, retry logic, and audit evaluation gating stay unchanged across runtimes; only the concrete delegation surface differs.\n\n### Delegation targets\n\n- **⧉ build**: Implementation, feature, fix, refactor tasks. Build runs its full cycle as a subagent and writes progress and changelog entries.\n- **⛶ audit**: Two roles — evaluator after each task completion (verifying acceptance criteria), and health checker after plan completion (producing health grades). Audit is the discriminator in the evaluate-then-proceed pattern.\n- **▤ document**: Documentation tasks — docs updates, README changes, documentation coverage.\n- **⬚ research**: Research tasks. During bootstrap, orchestrate chains research for vision-gap analysis before plan creates a plan.\n- **⎘ optimize**: Optimization-shaped tasks (metric improvement, performance tuning) route to optimize.\n- **◰ design**: Visual identity tasks (DESIGN.md updates, design token changes).\n- **≡ plan**: When no plan exists or the current plan is complete, orchestrate invokes plan to create the next plan.\n\n### State consumers\n\n- **❈ discuss**: Decision state provides firm constraints during task selection. Preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 from returned decision entries.\n- **⛺ vision**: Direction context during bootstrap. If vision is missing, preserve the caveat and ask before creating direction.\n- **♾ profile**: Persona context for calibrating delegation. Do not refresh profile state during orchestration; if unavailable, proceed without persona grounding and preserve the caveat.\n\n### When to use orchestrate\n\nExecute an existing plan: create the plan first (\u0060/agentera plan\u0060), then run \u0060/agentera orchestrate\u0060 to execute it with evaluation gating.\n\nFull autonomous session: \u0060/agentera orchestrate\u0060 with no plan triggers bootstrap (research → plan → execute).\n\nAfter a deliberation: \u0060/agentera discuss\u0060 → \u0060/agentera plan\u0060 → \u0060/agentera orchestrate\u0060.\n\nUse orchestrate instead of a host loop for plan-aware, evaluated, multi-cycle execution. Use it when the user explicitly requests autonomous multi-task execution.\n"`);
|
|
4
|
-
export default `${instructions
|
|
4
|
+
export default `${instructions
|
|
5
|
+
.replace(/## State artifacts[\s\S]*?## The orchestration loop/, `## State artifacts
|
|
6
|
+
|
|
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
|
+
|
|
9
|
+
Advance tasks with \`agentera state plan set-status --id ID\` and persist evaluator outcomes with \`agentera state plan record-evaluation --id ID\`.
|
|
10
|
+
|
|
11
|
+
## The orchestration loop`)
|
|
12
|
+
.replaceAll("--number N", "--id ID")
|
|
13
|
+
.replaceAll("--task N", "--id ID")
|
|
14
|
+
.replace("task N · step M/5", "task ID · step M/5")
|
|
15
|
+
.replace("N is the task number from the selected orchestration context task.", "ID is the bare ID from the selected orchestration context task.")}
|
|
5
16
|
|
|
6
17
|
## Evaluation Retry State
|
|
7
18
|
|
|
8
|
-
After every evaluator verdict, persist it with \`agentera state plan record-evaluation --
|
|
19
|
+
After every evaluator verdict, persist it with \`agentera state plan record-evaluation --id ID --attempt-id ATTEMPT --verdict {pass,fail} --provenance SOURCE --format json\`. A failed verdict also requires \`--failure-evidence\`. Reuse the same stable attempt ID after an interrupted retry; the writer owns attempt counts, retains the latest failure evidence and provenance, and blocks the task after its second failed evaluation. Do not reconstruct retry state from conversation memory or modify decision satisfaction.
|
|
9
20
|
`;
|
|
10
21
|
//# sourceMappingURL=instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/orchestrate/instructions.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,gtnBAAgtnB,CAAC,CAAC;AAC3wnB,eAAe,GAAG,YAAY;;;;;
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/orchestrate/instructions.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,gtnBAAgtnB,CAAC,CAAC;AAC3wnB,eAAe,GAAG,YAAY;KAC3B,OAAO,CAAC,qDAAqD,EAAE;;;;;;0BAMxC,CAAC;KACxB,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC;KACnC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC;KACjC,OAAO,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;KAClD,OAAO,CAAC,oEAAoE,EAAE,iEAAiE,CAAC;;;;;CAKlJ,CAAC"}
|
|
@@ -2,5 +2,14 @@
|
|
|
2
2
|
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
3
|
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
4
|
export const instructions = JSON.parse(String.raw `"# PLAN\n\n**Planning Logic: Behavioral Requirements Decomposition. Enumerate, Refine, Assign**\n\nGlyph: **≡** (protocol ref: SG5). Scale-adaptive planning bridging deliberation and execution. PLAN artifact with behavioral acceptance criteria for build. Plan owns WHAT and WHY; build owns HOW. Three levels: skip (trivial work, route directly to build), light (single-cycle), full (multi-cycle with adversarial review).\n\nVoice: adopt the conversational voice declared in the project's vision artifact \u0060identity.voice\u0060 field when available — do not improvise a separate personality. In Create mode before a vision exists, use a neutral operational stance: describe behavior, not personality.\n\n---\n\n## State artifacts\n\nOne write target and one archive directory in \u0060.agentera/\u0060.\n\n| Artifact | Role | Source |\n|---|---|---|\n| \u0060plan\u0060 | produces_and_consumes | \u0060.agentera/plan.yaml\u0060 (or docs-mapped path) |\n| \u0060plan_archive\u0060 | produces | \u0060.agentera/archive/plan-{date}.yaml\u0060 |\n| \u0060vision\u0060 | consumes | \u0060planning_context\u0060 family |\n| \u0060decisions\u0060 | consumes | firm (DL1) entries via \u0060agentera state decisions list --limit 20 --format json\u0060 |\n| \u0060todo\u0060 | consumes | \u0060planning_context\u0060 family |\n| \u0060health\u0060 | consumes | \u0060planning_context\u0060 family |\n| \u0060progress\u0060 | consumes | \u0060planning_context\u0060 family |\n| \u0060profile\u0060 | consumes | \u0060planning_context.profile.path\u0060 |\n| \u0060docs\u0060 | consumes | docs artifact mapping for path overrides and versioning block |\n\n**Read contract for PLAN artifact consumers**: tasks carry status from the \u0060status\u0060 enum (\u0060pending\u0060, \u0060in_progress\u0060, \u0060complete\u0060, \u0060skipped\u0060); surprises and unknowns land in their respective top-level lists. When all tasks are \u0060complete\u0060, the planner (or build at cycle closeout) runs \u0060agentera state plan archive --format json\u0060. The writer owns immutable archive naming, crash-consistent closeout, and active-plan removal. The full consumption flow lives in build's and orchestrate's own instructions; plan declares only what the artifact shape guarantees.\n\n**Startup contract**: trust \u0060planning_context.startup_contract\u0060 and \u0060raw_artifact_read_policy\u0060 from \u0060agentera prime --context plan --format json\u0060. When \u0060source_contract.complete_for_plan_artifact\u0060 is true, \u0060agentera state plan --format json\u0060 already serves summary, tasks, dependencies, acceptance, evidence, surprises, unknowns, and previous-plan archive references — do not reread the persisted artifact defensively. Raw plan artifact access is for writing, archiving, validation, corruption diagnostics, or after CLI fallbacks fail. The runtime owns the planning-level taxonomy, required step list, step-marker format, task-coherence rule, cli-first-orientation policy, artifact access boundaries, and handoff expectations — do not re-encode them here. Artifact path resolution is owned by SKILL.md; visual-token families by \u0060skills/agentera/protocol.yaml\u0060.\n\nDirect invocation of ≡ plan on an already-complete plan: archiving before writing its replacement is implicit in the direct invocation and does not require separate pre-write confirmation. Human-initiated replacement plans still require plan approval before the write. Replacing, discarding, or archiving an active or incomplete plan is not implicit; ask for explicit confirmation.\n\n---\n\n## Workflow phases\n\nMode-split shape: Step 0 detects level (skip/light/full), then the mode-specific steps run. Step labels — orient, specify, review, audit, write, handoff — are owned by \u0060planning_context.startup_contract.required_steps\u0060; the runtime owns the step-marker format.\n\n### Step 0: Detect level\n\nAssess work complexity. Read the description (user, \u0060decisions\u0060 artifact, or \u0060todo\u0060 artifact). Scan codebase if needed.\n\n| Signal | Level |\n|---|---|\n| Single-file change, localized defect fix, or config tweak **and** touches no shared abstraction | **Skip** |\n| One module affected, clear scope, fits one build cycle | **Light** |\n| Multiple modules, multi-file changes, 3+ logical steps, new feature spanning architecture | **Full** |\n\n**Skip**: This doesn't need a plan. Suggest ⧉ build and wait for confirmation unless the user already asked to implement now. Stop here.\n\n**Light or Full**: Proceed to planning.\n\nIf uncertain between light and full, default to light.\n\n### Step 1: Orient\n\nTrust \u0060planning_context\u0060 from \u0060agentera prime --context plan --format json\u0060 and read state families by name (\u0060plan\u0060, \u0060vision\u0060, \u0060decisions\u0060, \u0060todo\u0060, \u0060health\u0060, \u0060progress\u0060, \u0060docs\u0060, \u0060profile\u0060). Use listed \u0060fallback_commands\u0060 for missing families before any last-resort raw artifact read.\n\n- **vision**: the north star (if present)\n- **decisions**: firm (DL1) entries are hard constraints for planning. Read via \u0060agentera state decisions list --limit 20 --format json\u0060 and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical context.\n- **health**: latest codebase health grades (if present)\n- **todo**: related known issues (if present)\n- **progress**: what was built recently (if present)\n- **profile**: served via \u0060planning_context.profile.path\u0060 — read directly when \u0060status: loaded\u0060; if missing or stale, proceed without persona grounding. Staleness is a caveat, not approval to refresh profile state.\n\n**Project discovery** (if unfamiliar with the repo): map directory structure, read README.md and AGENTS.md, dependency manifests, identify build/test/lint commands.\n\nBefore decomposing: summarize the constraints from \u0060vision\u0060 and \u0060decisions\u0060.\n\n### Step 2: Specify\n\nDefine WHAT and WHY. Intent layer, not implementation details.\n\n#### Light plans\n\nBrief conversation (2-3 questions):\n\n- **What**: one-paragraph description of the change\n- **Why**: what value it delivers or what problem it solves\n- **Constraints**: what must NOT break, what's out of scope\n- **Acceptance criteria**: 3-5 behavioral criteria in Given/When/Then format\n\nWrite PLAN. Present for approval (human-initiated) or proceed (autonomous).\n\n#### Full plans\n\nDeeper conversation:\n\n- **What**: detailed description\n- **Why**: motivation, user impact, relationship to \u0060vision\u0060\n- **Constraints**: architectural boundaries, off-limits modules\n- **Scope**: what's in, out, deferred\n- **Design**: approach at the level of subsystems and phases. MUST NOT name modules, libraries, file paths, or code structure; those belong in scope or task-level acceptance. Design SHOULD describe how subsystems interrelate and the order phases SHOULD run in.\n- **Task decomposition**: Ordered tasks, each one build cycle, within a coherent lifecycle boundary. Split only when work crosses a real lifecycle or coherence boundary. Per task: description, dependencies, 3-5 behavioral Given/When/Then acceptance criteria\n- **Test proportionality**: for tasks with tests, add a proportionality target. Default: one pass + one fail per testable unit. Override only with explicit rationale.\n- **Plan-level current-state check**: every full plan ends with a final state sync task depending on all prior tasks.\n- **Version bump check**: add a bump task when the \u0060docs\u0060 artifact \u0060versioning\u0060 block exists and the plan includes \u0060feat\u0060/\u0060fix\u0060 work.\n- **Fog identification**: every full plan surfaces at least one known-unknown — a planning-time question whose answer determines whether downstream tasks are still needed as written. Each unknown lists the question, the task it affects, and how the answer resolves (\u0060resolve_by\u0060).\n- **Overall acceptance criteria**: behavioral criteria for the complete feature\n\nPresent for approval or proceed to adversarial review.\n\n### Step 3: Review (full plans only)\n\nSpawn an adversarial critic. The critic MUST find issues.\n\n\u0060\u0060\u0060\nYou are reviewing a development plan for [project]. Your job is to find problems.\n\n## The plan\n[Full PLAN artifact content]\n\n## Your mandate\nYou MUST identify at least one issue. \"Looks good\" is not acceptable.\n\nLook for:\n- Tasks too large for a single implementation cycle\n- Missing dependencies between tasks\n- Acceptance criteria too vague to verify\n- Acceptance criteria that leak implementation details\n- Scope gaps or scope creep\n- Ordering issues\n- Conflicting constraints\n- Unacknowledged risks\n- Fog treated as resolved\n\u0060\u0060\u0060\n\nAddress legitimate issues; dismiss false positives with rationale. Record each dismissal in the artifact's \u0060rejected:\u0060 list with the issue text and the rationale, so downstream consumers (build, orchestrate, audit) inherit the adjudication rather than relitigating.\n\nPresent reviewed plan.\n\n### Step 4: Validate and publish\n\nOptionally run \u0060agentera check lint --artifact plan --file PATH --strict --format json\u0060 for early draft feedback. The typed writer is the sole publication gate: it validates strict prose lint and schema against the final candidate before publishing.\n\nSave the approved complete plan document to temporary YAML/JSON input and run \u0060agentera state plan create --input PATH --format json\u0060 (or \u0060--input -\u0060). The writer validates the final bytes, archives a complete predecessor, injects lineage, and publishes to the docs-mapped path. Replacing an incomplete predecessor requires the approved \u0060--force\u0060 override.\n\n#### Light plan format\n\n\u0060\u0060\u0060yaml\nheader:\n level: light\n created: 2026-07-13\n status: open\n title: \"Plan: Short Title\"\nwhat: Deliver one bounded outcome.\nwhy: Keep the work ready for one build cycle.\nconstraints: Preserve the stated delivery boundary.\noverall_acceptance: GIVEN the plan is published WHEN build reads it THEN the next task is clear.\nscope:\n included: [bounded outcome]\n excluded: [unrelated work]\ntasks:\n - number: 1\n name: Deliver outcome\n depends_on: []\n status: pending\n acceptance:\n - GIVEN the work is complete WHEN behavior is checked THEN the outcome is available.\nsurprises: []\n\u0060\u0060\u0060\n\n#### Full plan format\n\nOmit \u0060rejected:\u0060 when no critic finding is dismissed; never write an empty \u0060rejected: []\u0060 section.\n\n\u0060\u0060\u0060yaml\nheader:\n level: full\n created: 2026-07-13\n status: open\n reviewed: 2026-07-13\n critic_issues: \"1 found, 0 addressed, 1 dismissed\"\n title: \"Plan: Short Title\"\nwhat: Deliver a validated multi-task outcome.\nwhy: Keep dependent work behaviorally ordered.\nconstraints: Preserve the stated delivery boundary.\noverall_acceptance: GIVEN all tasks complete WHEN the plan is evaluated THEN the intended outcome is available.\nscope:\n included: [validated outcome]\n excluded: [unrelated work]\n deferred: []\ndesign: Sequence observable outcomes without prescribing implementation.\nunknowns:\n - question: \"Will the dependent outcome remain necessary after task 1?\"\n affects_task: 2\n resolve_by: \"Use task 1 evidence before beginning task 2.\"\nrejected:\n - issue: \"Specify an implementation library in task acceptance.\"\n rationale: \"Behavioral acceptance remains implementation-independent.\"\ntasks:\n - number: 1\n name: Establish outcome\n depends_on: []\n status: pending\n acceptance:\n - GIVEN the first task completes WHEN behavior is checked THEN its outcome is available.\n - number: 2\n name: Verify dependent outcome\n depends_on: [\"1\"]\n status: pending\n acceptance:\n - GIVEN task 1 completes WHEN the dependent behavior is checked THEN its outcome is available.\nsurprises: []\n\u0060\u0060\u0060\n\n### Step 5: Handoff\n\n- **Single-task plan**: suggest ⧉ build to execute and wait for confirmation.\n- **Full plan**: suggest ⎈ orchestrate to execute the entire plan and wait for confirmation.\n\nIf \u0060unknowns:\u0060 lists fog at planning time, name the foreshadow in the handoff: \"Build will resolve unknowns; re-invoke ≡ plan if surprises on one task alter the acceptance criteria of downstream tasks.\"\n\n---\n\n## Safety rails\n\n<critical>\n- Plan MUST NOT include implementation details in the PLAN artifact. Plan owns WHAT and WHY; build owns HOW.\n- Plan MUST NOT write acceptance criteria that reference implementation. Use behavioral, domain-language criteria only.\n- Plan MUST keep all tasks within a coherent lifecycle boundary. Split only at real lifecycle or coherence boundaries; do not split solely to satisfy an arbitrary task count.\n- Plan MUST NOT modify the PLAN artifact during a build cycle except to update task status and add surprises.\n- Plan MUST NOT skip adversarial review for full plans.\n- Plan MUST NOT auto-approve plans when human-initiated. Present for approval.\n- Plan MUST NOT plan trivial work. If skip level, say so and route to build.\n- Plan MUST NOT invoke build, optimize, or orchestrate without the user's explicit consent. Suggest, don't dispatch.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion.\n\nFormat: \u0060─── ≡ plan · <status> ───\u0060 on its own line, followed by a one-sentence summary. For \u0060flagged\u0060, \u0060stuck\u0060, and \u0060waiting\u0060, add a ▸ bullet below the summary identifying what needs attention.\n\n- **complete**: PLAN artifact written and approved, adversarial review ran for full plans, handoff suggested.\n- **flagged**: Plan produced with caveats — critic issues dismissed rather than resolved, scope larger than ideal, acceptance criteria not fully behavioral, or planning-time unknowns still open at handoff.\n- **stuck**: Cannot plan because the work description is too ambiguous to decompose, required context artifacts contradict, or the user declined to approve the plan with no clear revision path.\n- **waiting**: The feature or change is not specified with enough detail to produce acceptance criteria, or key architectural constraints are unknown and cannot be inferred from the codebase.\n\n---\n\n## Cross-capability integration\n\nPlan is the bridge between deliberation and execution.\n\n### Fed by ❈ discuss\n\nWhen discuss's deliberation concludes with a decision to build, plan is the next step. The \u0060decisions\u0060 artifact carries the \"why\" context as hard constraints.\n\n### Feeds ⧉ build\n\nPLAN tasks become build's work queue. Task acceptance criteria become cycle exit conditions. Build updates task status and logs surprises. The read contract is declared in §2; build's consumption flow lives in build's instructions.\n\n### Feeds ⎘ optimize\n\nWhen a plan includes optimization-shaped tasks (measurable changes with apply/rollback semantics), those tasks delegate to optimize.\n\n### Informed by ⛶ audit\n\n\u0060health\u0060 findings can trigger remediation plans. Audit reveals structural issues; plan produces a plan to address them.\n\n### Informed by ♾ profile\n\nDecision profile calibrates planning depth and pattern preferences.\n\n### Informed by ⬚ research\n\nWhen research recommends patterns or libraries, plan incorporates them into the plan's design section.\n\n### Reads ⛥ vision\n\n\u0060vision\u0060 provides the north star read during Orient.\n\n### Fed by ▤ document (docs-first workflow)\n\nIn the docs-first workflow, document writes intent docs first, then plan decomposes them into tasks.\n\n### Reads ▤ document versioning\n\nPlan reads the \u0060versioning\u0060 block from the \u0060docs\u0060 artifact. When the plan includes \u0060feat\u0060/\u0060fix\u0060 work, plan appends a version bump task.\n\n### Getting started\n\n**Planning a new feature**: ❈ discuss → ≡ plan → ⧉ build or ⎈ orchestrate.\n\n**Planning a remediation**: ⛶ audit → ≡ plan → ⧉ build.\n\n**Mid-feature replanning**: when surprises logged on one task alter the acceptance criteria of downstream tasks, re-invoke ≡ plan to reassess. Read the surprises, surface new unknowns, archive or amend, then resume ⧉ build. If surprises are isolated and acceptance criteria of downstream tasks remain intact, build can continue without replanning.\n\n**Skipping the plan**: trivial work (skip level) routes to ⧉ build directly.\n"`);
|
|
5
|
-
export default instructions
|
|
5
|
+
export default instructions
|
|
6
|
+
.replace(/## State artifacts[\s\S]*?## Workflow phases/, `## State artifacts
|
|
7
|
+
|
|
8
|
+
Plans and tasks use entity authority: each plan and task has \`id\` and \`artifact\` and lives in one writer-owned entity file; task relationships carry the bare plan ID. Read plans and tasks through bounded list or exact \`get --id ID\` commands. Discover creation and mutation contracts with \`agentera state plan explain --verb <verb> --format json\`, and use bare task IDs for task writes. Never edit entity paths directly. Vision, docs policy, design, changelog, and profile retain their declared singleton boundaries.
|
|
9
|
+
|
|
10
|
+
Create with \`agentera state plan create --input PATH --format json\`, update tasks through the discovered bare-ID commands, and archive completed plan entities with \`agentera state plan archive --format json\`.
|
|
11
|
+
|
|
12
|
+
## Workflow phases`)
|
|
13
|
+
.replaceAll("--number N", "--id ID")
|
|
14
|
+
.replaceAll("--task N", "--id ID");
|
|
6
15
|
//# sourceMappingURL=instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/plan/instructions.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,yygBAAyygB,CAAC,CAAC;AACp2gB,eAAe,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/plan/instructions.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,yygBAAyygB,CAAC,CAAC;AACp2gB,eAAe,YAAY;KACxB,OAAO,CAAC,8CAA8C,EAAE;;;;;;mBAMxC,CAAC;KACjB,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC;KACnC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status has one authoritative startup capsule: its instructions and bounded
|
|
3
|
+
* state arrive together from `prime --context status`. Keep the established
|
|
4
|
+
* status vocabulary by adapting the canonical instructions rather than
|
|
5
|
+
* maintaining a second dashboard description.
|
|
6
|
+
*/
|
|
7
|
+
export function statusStartupInstructions(canonical) {
|
|
8
|
+
const replacements = [
|
|
9
|
+
[
|
|
10
|
+
"Glyph: **⌂** (SG1). Status reads suite state through `agentera prime` and writes nothing.",
|
|
11
|
+
"Glyph: **⌂** (SG1). Status reads its startup capsule through `agentera prime --context status --format json` and writes nothing.",
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"Status MUST source state from `agentera prime --format json` and write nothing. The `source_contract.capability_startup` field declares whether prime is complete for capability startup; when complete, status MUST NOT run separate artifact queries or raw `.agentera/*.yaml` reads. If prime fails or reports incomplete state, fall back to commands listed in `source_contract.cli_fallback` as a last resort.",
|
|
15
|
+
"Status MUST source both instructions and bounded state from `agentera prime --context status --format json` and write nothing. Read `capability_context.instructions` in full and render from `capability_context.context.status_context`; its `source_contract.capability_startup` field declares whether the included state is complete for capability startup. Status MUST NOT run a separate bare-prime call or raw `.agentera/*.yaml` read. If the status capsule fails or reports incomplete state, use commands listed in `capability_context.state.fallback_commands` as a last resort, then name the omitted detail and its authoritative recovery command.",
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"Build the dashboard from `agentera prime --format json` output.",
|
|
19
|
+
"Build the dashboard from `capability_context.context.status_context` in the status startup response.",
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"Use the `mode` field from `agentera prime` to detect fresh vs returning:",
|
|
23
|
+
"Use the `mode` field from `capability_context.context.status_context` to detect fresh vs returning:",
|
|
24
|
+
],
|
|
25
|
+
];
|
|
26
|
+
let adapted = canonical;
|
|
27
|
+
for (const [from, to] of replacements) {
|
|
28
|
+
if (!adapted.includes(from)) {
|
|
29
|
+
throw new Error(`status startup instructions no longer contain the expected vocabulary: ${from.slice(0, 48)}`);
|
|
30
|
+
}
|
|
31
|
+
adapted = adapted.replace(from, to);
|
|
32
|
+
}
|
|
33
|
+
return adapted;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=startupInstructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startupInstructions.js","sourceRoot":"","sources":["../../../src/capabilities/status/startupInstructions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,SAAiB;IACzD,MAAM,YAAY,GAA4B;QAC5C;YACE,2FAA2F;YAC3F,kIAAkI;SACnI;QACD;YACE,sZAAsZ;YACtZ,soBAAsoB;SACvoB;QACD;YACE,iEAAiE;YACjE,sGAAsG;SACvG;QACD;YACE,0EAA0E;YAC1E,qGAAqG;SACtG;KACF,CAAC;IAEF,IAAI,OAAO,GAAG,SAAS,CAAC;IACxB,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC;QACtC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,0EAA0E,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QACjH,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -118,7 +118,7 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
118
118
|
status: acceptance.length > 0 ? "available" : "incomplete",
|
|
119
119
|
items: acceptance,
|
|
120
120
|
count: acceptance.length,
|
|
121
|
-
source_provenance: sourceProvenance("plan",
|
|
121
|
+
source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance"),
|
|
122
122
|
},
|
|
123
123
|
constraints: {
|
|
124
124
|
plan_constraints_present: hasRecordedValue(planContextField(plan, "constraints")),
|
|
@@ -133,13 +133,13 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
133
133
|
"no commit/push/tag/publication without explicit approval",
|
|
134
134
|
],
|
|
135
135
|
unsupported_cli_command_policy: "Do not introduce capability-name or slash-alias CLI commands for Build.",
|
|
136
|
-
source_provenance: sourceProvenance("plan",
|
|
136
|
+
source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "summary.constraints"),
|
|
137
137
|
},
|
|
138
138
|
scope_boundary: scopeBoundary,
|
|
139
139
|
verification_expectations: {
|
|
140
140
|
latest_progress_verification: progressVerification,
|
|
141
141
|
expected_commands: ["focused pytest targets", "Build capability validation", "self-validation", "agentera check compact", "compaction check", "git diff --check"],
|
|
142
|
-
source_provenance: sourceProvenance("plan",
|
|
142
|
+
source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance"),
|
|
143
143
|
},
|
|
144
144
|
artifact_update_requirements: buildArtifactUpdateRequirements(plan, docs),
|
|
145
145
|
progress_logging_requirements: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../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,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EACL,yBAAyB,EAEzB,wBAAwB,EACxB,gBAAgB,EAChB,+BAA+B,EAC/B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D,MAAM,UAAU,qBAAqB,CACnC,UAAyB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
status: ok ? "available" : "unavailable",
|
|
16
|
-
source_provenance: sourceProvenance("docs",
|
|
16
|
+
source_provenance: sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs, "summary.mapping"),
|
|
17
17
|
entries: mapping,
|
|
18
18
|
mapping_entries: mapping.length,
|
|
19
19
|
caveats: ok ? [] : ["Docs artifact mappings are unavailable or empty in CLI docs state."],
|
|
@@ -27,7 +27,7 @@ export function closeoutVersionPolicy(docs) {
|
|
|
27
27
|
const available = Object.keys(semverPolicy).length > 0;
|
|
28
28
|
return {
|
|
29
29
|
status: available ? "available" : "unavailable",
|
|
30
|
-
source_provenance: sourceProvenance("docs",
|
|
30
|
+
source_provenance: sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs, "summary.conventions"),
|
|
31
31
|
version_files: versionFiles,
|
|
32
32
|
version_files_registry: registry,
|
|
33
33
|
semver_policy: semverPolicy,
|
|
@@ -39,7 +39,7 @@ export function closeoutTodoBlockers(schemas, todoItems) {
|
|
|
39
39
|
const exists = fs.existsSync(artifactPath(info, "todo"));
|
|
40
40
|
return {
|
|
41
41
|
status: exists ? "available" : "unavailable",
|
|
42
|
-
source_provenance: sourceProvenance("todo",
|
|
42
|
+
source_provenance: sourceProvenance("todo", STATE_FAMILY_FALLBACK_COMMANDS.todo),
|
|
43
43
|
open_count: todoItems.length,
|
|
44
44
|
items: todoItems,
|
|
45
45
|
caveats: exists ? [] : ["TODO state is unavailable in CLI state."],
|
|
@@ -51,7 +51,7 @@ export function closeoutBenchmarkEvidence(docs) {
|
|
|
51
51
|
if (testsSummary && testsSummary.toLowerCase().includes("benchmark")) {
|
|
52
52
|
return {
|
|
53
53
|
status: "available",
|
|
54
|
-
source_provenance: sourceProvenance("docs",
|
|
54
|
+
source_provenance: sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs, "summary.coverage.tests"),
|
|
55
55
|
summary_present: true,
|
|
56
56
|
non_empty_evidence_present: true,
|
|
57
57
|
history_scope: "cli_visible_summary",
|
|
@@ -62,7 +62,7 @@ export function closeoutBenchmarkEvidence(docs) {
|
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
64
|
status: "unavailable",
|
|
65
|
-
source_provenance: sourceProvenance("docs",
|
|
65
|
+
source_provenance: sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs, "summary.coverage.tests"),
|
|
66
66
|
summary_present: false,
|
|
67
67
|
non_empty_evidence_present: false,
|
|
68
68
|
history_scope: "not_exposed_by_supported_cli_state",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeout.js","sourceRoot":"","sources":["../../../src/cli/capabilityContext/closeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,eAAe,EAAe,gBAAgB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAG5D,MAAM,UAAU,wBAAwB,CAAC,IAAgB;IACvD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IACtD,OAAO;QACL,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CA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H,OAAO;QACL,UAAU,EAAE,UAAU;QACtB,iBAAiB,EAAE,gBAAgB;QACnC,cAAc,EAAE,aAAa;QAC7B,aAAa,EAAE,YAAY;QAC3B,kBAAkB,EAAE,iBAAiB;QACrC,gBAAgB,EAAE,eAAe;QACjC,iBAAiB,EAAE,gBAAgB;QACnC,kBAAkB,EAAE,iBAAiB;QACrC,wBAAwB,EAAE,cAAc;QACxC,oBAAoB,EAAE,YAAY;QAClC,iBAAiB,EAAE,gBAAgB;QACnC,eAAe,EAAE;YACf,6BAA6B,EAAE,eAAe,CAAC,MAAM,KAAK,CAAC;YAC3D,QAAQ,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC;YACjC,2BAA2B,EAAE,KAAK;YAClC,wBAAwB,EACtB,4GAA4G;gBAC5G,yHAAyH;YAC3H,uBAAuB,EAAE,kBAAkB,CAAC,uBAAuB,IAAI,EAAE;YACzE,sBAAsB,EAAE,kBAAkB,CAAC,sBAAsB,IAAI,EAAE;YACvE,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,CAAC;YACrG,uBAAuB,EAAE,aAAa;YACtC,+BAA+B,EAAE,eAAe;YAChD,iBAAiB,EAAE,gBAAgB;YACnC,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE;gBACJ,mBAAmB;gBACnB,gBAAgB;gBAChB,eAAe;gBACf,kCAAkC;gBAClC,gDAAgD;gBAChD,0BAA0B;gBAC1B,kDAAkD;gBAClD,oCAAoC;gBACpC,kDAAkD;gBAClD,mBAAmB;gBACnB,iBAAiB;gBACjB,4BAA4B;aAC7B;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { PLAN_COMPLETED_PLAN_ARCHIVE_CONFIRMATION, PLAN_INSTRUCTIONS_AUTHORITY_E
|
|
|
7
7
|
import { CAPABILITY_INSTRUCTIONS, capabilityInstructionModulePath } from "../../capabilities/index.js";
|
|
8
8
|
import { isFile, pyRepr, appendUnique } from "./shared.js";
|
|
9
9
|
import { stateWriterContract } from "../../state/write/operations.js";
|
|
10
|
-
import { loadStateRetrievalAuthority } from "../../state/retrievalAuthority.js";
|
|
10
|
+
import { entityPublicRetrieval, loadStateRetrievalAuthority } from "../../state/retrievalAuthority.js";
|
|
11
11
|
function stateRetrievalContract(needs) {
|
|
12
12
|
const surfaces = [
|
|
13
13
|
...(needs.includes("plan") ? ["plan_tasks", "plans"] : []),
|
|
@@ -16,23 +16,18 @@ function stateRetrievalContract(needs) {
|
|
|
16
16
|
if (surfaces.length === 0)
|
|
17
17
|
return null;
|
|
18
18
|
const loaded = loadStateRetrievalAuthority();
|
|
19
|
-
const retrieval =
|
|
20
|
-
const
|
|
21
|
-
...(needs.includes("plan") ? ["plan
|
|
22
|
-
...(needs.includes("experiments") ? ["
|
|
19
|
+
const retrieval = entityPublicRetrieval();
|
|
20
|
+
const boundaries = [
|
|
21
|
+
...(needs.includes("plan") ? ["plan", "plan_task"] : []),
|
|
22
|
+
...(needs.includes("experiments") ? ["experiment"] : []),
|
|
23
23
|
];
|
|
24
24
|
return {
|
|
25
25
|
authority: loaded.authority,
|
|
26
26
|
schema_version: retrieval.schema_version,
|
|
27
|
+
status: retrieval.status,
|
|
27
28
|
commands: Object.fromEntries(surfaces.map((surface) => [surface, retrieval.commands[surface]])),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
output_bounds: retrieval.output_bounds,
|
|
31
|
-
detail_availability: retrieval.envelope.entry_required_fields.includes("detail_availability"),
|
|
32
|
-
failures: retrieval.failures,
|
|
33
|
-
storage_ownership: retrieval.collections
|
|
34
|
-
.filter((entry) => collections.includes(String(entry.collection_id)))
|
|
35
|
-
.map((entry) => ({ collection_id: entry.collection_id, storage_ownership: entry.storage_ownership })),
|
|
29
|
+
collections: retrieval.collections
|
|
30
|
+
.filter((entry) => boundaries.includes(String(entry.boundary ?? entry.artifact))),
|
|
36
31
|
};
|
|
37
32
|
}
|
|
38
33
|
export function capabilityInstructionContractPath() {
|
|
@@ -113,17 +108,17 @@ export function planStartupContract() {
|
|
|
113
108
|
},
|
|
114
109
|
cli_first_orientation: {
|
|
115
110
|
use_startup_state_first: true,
|
|
116
|
-
current_plan_command:
|
|
111
|
+
current_plan_command: STATE_FAMILY_FALLBACK_COMMANDS.plan,
|
|
117
112
|
complete_plan_contract_key: "source_contract.complete_for_plan_artifact",
|
|
118
113
|
fallback_policy: "Use CLI-provided fallback commands for missing or incomplete state families " +
|
|
119
114
|
"before any last-resort raw artifact read.",
|
|
120
115
|
},
|
|
121
116
|
artifact_access_boundaries: {
|
|
122
|
-
skip_raw_plan_artifact_when:
|
|
117
|
+
skip_raw_plan_artifact_when: `\`${STATE_FAMILY_FALLBACK_COMMANDS.plan}\` reports source_contract.complete_for_plan_artifact=true ` +
|
|
123
118
|
"during normal read-only startup or evaluation.",
|
|
124
119
|
raw_plan_artifact_allowed_for: PLAN_RAW_PLAN_ACCESS_ALLOWED_FOR,
|
|
125
120
|
completed_plan_archive_confirmation: PLAN_COMPLETED_PLAN_ARCHIVE_CONFIRMATION,
|
|
126
|
-
artifact_mapping_source:
|
|
121
|
+
artifact_mapping_source: STATE_FAMILY_FALLBACK_COMMANDS.docs,
|
|
127
122
|
},
|
|
128
123
|
handoff_expectations: [
|
|
129
124
|
"skip level suggests ⧉ build and waits for confirmation unless the user already asked to implement now",
|
|
@@ -133,7 +128,7 @@ export function planStartupContract() {
|
|
|
133
128
|
unsupported_command_boundary: {
|
|
134
129
|
capability_cli_commands_added: true,
|
|
135
130
|
forbidden_examples: [],
|
|
136
|
-
route_boundary: "Use `/agentera plan` for routing, `agentera plan` for plan state, " +
|
|
131
|
+
route_boundary: "Use `/agentera plan` for routing, `agentera state plan` for plan state, " +
|
|
137
132
|
"and `agentera plan` for capability routing guidance only.",
|
|
138
133
|
},
|
|
139
134
|
seam_decision: {
|
|
@@ -169,10 +164,10 @@ export function capabilityArtifactInventory(capability) {
|
|
|
169
164
|
continue;
|
|
170
165
|
}
|
|
171
166
|
const e = entry;
|
|
172
|
-
const artifactId = String(e.
|
|
167
|
+
const artifactId = String(e.artifact ?? "").trim();
|
|
173
168
|
const localRole = String(e.local_role ?? "").trim();
|
|
174
169
|
if (!artifactId) {
|
|
175
|
-
errors.push(`entry ${key} is missing
|
|
170
|
+
errors.push(`entry ${key} is missing artifact`);
|
|
176
171
|
continue;
|
|
177
172
|
}
|
|
178
173
|
if (localRole === "consumes")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/cli/capabilityContext/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EACL,wCAAwC,EACxC,sCAAsC,EACtC,oBAAoB,EACpB,gCAAgC,EAChC,6BAA6B,EAC7B,eAAe,EACf,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/cli/capabilityContext/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe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E,EAAE,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAC,CAAC;IACzI,MAAM,OAAO,GAAe;QAC1B,UAAU;QACV,qBAAqB,EAAE,2BAA2B,CAAC,UAAU,CAAC;QAC9D,oBAAoB,EAAE,KAAK;QAC3B,sBAAsB,EAAE,YAAY;QACpC,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC;QACjD,kBAAkB,EAAE,sBAAsB,CAAC,KAAK,CAAC;QACjD,kBAAkB,EAAE,SAAS;QAC7B,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,+BAA+B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1F,sBAAsB,EAAE,OAAO;QAC/B,YAAY,EAAE,WAAW;QACzB,wBAAwB,EACtB,4EAA4E;YAC5E,kHAAkH;QACpH,YAAY,EAAE,KAAK;KACpB,CAAC;IACF,IAAI,UAAU,KAAK,MAAM;QAAE,OAAO,CAAC,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC5E,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -42,7 +42,7 @@ export function evidenceDocsState(docs) {
|
|
|
42
42
|
const [currentState, currentStateCaveat] = currentStateStatus(docs.last_audit, "Docs");
|
|
43
43
|
return {
|
|
44
44
|
status: available ? "available" : "unavailable",
|
|
45
|
-
source_provenance: sourceProvenance("docs",
|
|
45
|
+
source_provenance: sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs),
|
|
46
46
|
mapping_entries: docs.mapping_entries ?? 0,
|
|
47
47
|
indexed_documents: docs.indexed_documents ?? 0,
|
|
48
48
|
last_audit: docs.last_audit ?? null,
|
|
@@ -57,14 +57,14 @@ export function evidenceDocsState(docs) {
|
|
|
57
57
|
}
|
|
58
58
|
export function evidenceHealthState(health) {
|
|
59
59
|
const available = Boolean(health.exists);
|
|
60
|
-
const
|
|
61
|
-
const nonEmptyFields = ["audit_number", "trajectory", "grade"].filter((f) => hasRecordedValue(merged[f]));
|
|
60
|
+
const nonEmptyFields = ["id", "artifact", "trajectory", "grade"].filter((f) => hasRecordedValue(health[f]));
|
|
62
61
|
const auditDate = health.date ?? health.timestamp ?? null;
|
|
63
62
|
const [currentState, currentStateCaveat] = currentStateStatus(auditDate, "Health");
|
|
64
63
|
return {
|
|
65
64
|
status: available ? "available" : "unavailable",
|
|
66
65
|
source_provenance: sourceProvenance("health", STATE_FAMILY_LIST_COMMANDS.health),
|
|
67
|
-
|
|
66
|
+
id: health.id ?? null,
|
|
67
|
+
artifact: health.artifact ?? "health",
|
|
68
68
|
date: auditDate,
|
|
69
69
|
timestamp: auditDate,
|
|
70
70
|
trajectory: health.trajectory ?? null,
|
|
@@ -84,7 +84,7 @@ export function evidenceTodoState(schemas, todoItems) {
|
|
|
84
84
|
const exists = fs.existsSync(artifactPath(info, "todo"));
|
|
85
85
|
return {
|
|
86
86
|
status: exists ? "available" : "unavailable",
|
|
87
|
-
source_provenance: sourceProvenance("todo",
|
|
87
|
+
source_provenance: sourceProvenance("todo", STATE_FAMILY_FALLBACK_COMMANDS.todo),
|
|
88
88
|
open_count: todoItems.length,
|
|
89
89
|
items: todoItems,
|
|
90
90
|
non_empty_evidence_present: todoItems.length > 0,
|
|
@@ -123,7 +123,7 @@ export function evidenceVersionChecks(docs) {
|
|
|
123
123
|
const conventions = docsConventions(docs);
|
|
124
124
|
const versionFiles = asList(conventions.version_files);
|
|
125
125
|
const semverPolicy = conventions.semver_policy && typeof conventions.semver_policy === "object" && !Array.isArray(conventions.semver_policy) ? conventions.semver_policy : {};
|
|
126
|
-
const source = sourceProvenance("docs",
|
|
126
|
+
const source = sourceProvenance("docs", STATE_FAMILY_FALLBACK_COMMANDS.docs, "summary.conventions");
|
|
127
127
|
const ec = (field) => sourceProvenance("evidence_context", "agentera prime --context audit --format json", field);
|
|
128
128
|
const checks = [
|
|
129
129
|
{
|
|
@@ -188,7 +188,7 @@ export function evidencePlanCriteria(plan, target) {
|
|
|
188
188
|
const criteria = selected && typeof selected === "object" ? asList(selected.acceptance) : [];
|
|
189
189
|
return {
|
|
190
190
|
status: criteria.length > 0 ? "available" : "incomplete",
|
|
191
|
-
source_provenance: sourceProvenance("plan",
|
|
191
|
+
source_provenance: sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance"),
|
|
192
192
|
target: taskRefObj,
|
|
193
193
|
criteria,
|
|
194
194
|
criteria_count: criteria.length,
|