agentera 3.0.0-dev.7 → 3.0.0-dev.72
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/LICENSE +201 -0
- package/README.md +118 -22
- package/bundle/CHANGELOG.md +1361 -0
- package/bundle/DESIGN.md +229 -0
- package/bundle/LICENSE +201 -0
- package/bundle/README.md +143 -0
- package/bundle/UPGRADE.md +252 -0
- package/bundle/extract-corpus-parity.json +2 -4
- package/bundle/fixtures/routing/hybrid-corpus.yaml +154 -0
- package/bundle/references/adapters/package-publication.json +488 -0
- package/bundle/references/adapters/package-registry.yaml +435 -188
- package/bundle/references/adapters/package-surface-characterization.md +66 -34
- package/bundle/references/adapters/runtime-lifecycle-adapters.yaml +74 -0
- package/bundle/references/adapters/runtime-lifecycle-authority.yaml +62 -0
- package/bundle/references/adapters/runtime-lifecycle-operation-contract.yaml +84 -0
- package/bundle/references/adapters/runtime-retired-resources.yaml +333 -0
- package/bundle/references/analysis/evidence-tier-authority.yaml +518 -0
- package/bundle/references/analysis/verification-policy.yaml +266 -0
- package/bundle/references/artifacts/artifact-registry-interface-model.yaml +17 -8
- package/bundle/references/artifacts/glossary-entry-contract.yaml +1254 -0
- package/bundle/references/artifacts/state-storage-authority.yaml +3061 -0
- package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
- package/bundle/references/cli/app-lifecycle-vocabulary.yaml +3 -4
- package/bundle/references/cli/capability-instruction-contract.yaml +11 -14
- package/bundle/references/cli/hybrid-route-contract.yaml +438 -0
- package/bundle/references/cli/routing-model.md +152 -93
- package/bundle/references/cli/trigger-schema-enrichment.md +57 -46
- package/bundle/references/cli/update-channels.yaml +4 -2
- package/bundle/references/cli/vocabulary-index.yaml +5 -7
- package/bundle/references/cli/vocabulary.md +51 -93
- package/bundle/references/meta/retained-reference-authority.yaml +151 -0
- package/bundle/skills/agentera/SKILL.md +183 -63
- package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +27 -19
- package/bundle/skills/agentera/capabilities/audit/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/audit/schemas/triggers.yaml +13 -35
- package/bundle/skills/agentera/capabilities/audit/schemas/validation.yaml +30 -11
- package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +44 -21
- package/bundle/skills/agentera/capabilities/build/schemas/exit.yaml +8 -6
- package/bundle/skills/agentera/capabilities/build/schemas/triggers.yaml +14 -36
- package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +95 -21
- package/bundle/skills/agentera/capabilities/design/schemas/artifacts.yaml +6 -6
- package/bundle/skills/agentera/capabilities/design/schemas/exit.yaml +5 -5
- package/bundle/skills/agentera/capabilities/design/schemas/triggers.yaml +5 -34
- package/bundle/skills/agentera/capabilities/design/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +17 -13
- package/bundle/skills/agentera/capabilities/discuss/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/discuss/schemas/triggers.yaml +6 -40
- package/bundle/skills/agentera/capabilities/discuss/schemas/validation.yaml +72 -5
- package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +24 -17
- package/bundle/skills/agentera/capabilities/document/schemas/triggers.yaml +5 -35
- package/bundle/skills/agentera/capabilities/document/schemas/validation.yaml +13 -13
- package/bundle/skills/agentera/capabilities/optimize/schemas/artifacts.yaml +10 -10
- package/bundle/skills/agentera/capabilities/optimize/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/optimize/schemas/triggers.yaml +4 -35
- package/bundle/skills/agentera/capabilities/optimize/schemas/validation.yaml +3 -3
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +34 -22
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/exit.yaml +9 -7
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/triggers.yaml +5 -37
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/validation.yaml +38 -37
- package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +20 -16
- package/bundle/skills/agentera/capabilities/plan/schemas/triggers.yaml +8 -31
- package/bundle/skills/agentera/capabilities/plan/schemas/validation.yaml +66 -6
- package/bundle/skills/agentera/capabilities/profile/schemas/artifacts.yaml +9 -4
- package/bundle/skills/agentera/capabilities/profile/schemas/exit.yaml +4 -4
- package/bundle/skills/agentera/capabilities/profile/schemas/triggers.yaml +8 -37
- package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +61 -3
- package/bundle/skills/agentera/capabilities/research/schemas/artifacts.yaml +6 -6
- package/bundle/skills/agentera/capabilities/research/schemas/triggers.yaml +5 -29
- package/bundle/skills/agentera/capabilities/status/schemas/artifacts.yaml +13 -12
- package/bundle/skills/agentera/capabilities/status/schemas/triggers.yaml +7 -49
- package/bundle/skills/agentera/capabilities/vision/schemas/artifacts.yaml +8 -8
- package/bundle/skills/agentera/capabilities/vision/schemas/exit.yaml +7 -6
- package/bundle/skills/agentera/capabilities/vision/schemas/triggers.yaml +7 -39
- package/bundle/skills/agentera/capabilities/vision/schemas/validation.yaml +14 -16
- package/bundle/skills/agentera/capability_schema_contract.yaml +32 -32
- package/bundle/skills/agentera/protocol.yaml +4 -4
- package/bundle/skills/agentera/route-phrases.yaml +81 -0
- package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +1 -0
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +30 -12
- package/bundle/skills/agentera/schemas/artifacts/design.yaml +1 -0
- package/bundle/skills/agentera/schemas/artifacts/docs.yaml +7 -12
- package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +140 -9
- package/bundle/skills/agentera/schemas/artifacts/glossary.yaml +82 -0
- package/bundle/skills/agentera/schemas/artifacts/health.yaml +56 -19
- package/bundle/skills/agentera/schemas/artifacts/objective.yaml +18 -4
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +457 -32
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +131 -18
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +302 -7
- package/dist/analytics/extractCorpus/cli.js +52 -11
- package/dist/analytics/extractCorpus/copilotSessions.js +6 -4
- package/dist/analytics/extractCorpus/core.js +40 -12
- package/dist/analytics/extractCorpus/corpus.js +39 -17
- package/dist/analytics/extractCorpus/coverageAudit.js +44 -45
- package/dist/analytics/extractCorpus/cursorSessions.js +6 -4
- package/dist/analytics/extractCorpus/evidenceTiers.js +603 -0
- package/dist/analytics/extractCorpus/extractCorpusParity.js +4 -4
- package/dist/analytics/extractCorpus/filesystemSources.js +1 -5
- package/dist/analytics/extractCorpus/index.js +3 -1
- package/dist/analytics/extractCorpus/jsonlSessions.js +24 -5
- package/dist/analytics/extractCorpus/sqliteCaps.js +0 -1
- package/dist/analytics/extractCorpus/sqliteSessions.js +0 -1
- package/dist/analytics/extractCorpus/tierReader.js +108 -0
- package/dist/analytics/extractCorpus.js +0 -1
- package/dist/analytics/glossaryAdviceResolution.js +166 -0
- package/dist/analytics/glossaryInputAcquisition.js +319 -0
- package/dist/analytics/personalGlossaryAdmission.js +133 -0
- package/dist/analytics/personalGlossaryProfile.js +219 -0
- package/dist/analytics/profileSignals.js +211 -0
- package/dist/analytics/usageStats.js +150 -23
- package/dist/audit/terminologyDrift.js +281 -0
- package/dist/bin/agentera.js +3 -2
- package/dist/capabilities/audit/instructions.js +16 -6
- package/dist/capabilities/build/instructions.js +59 -6
- package/dist/capabilities/design/instructions.js +3 -4
- package/dist/capabilities/discuss/instructions.js +29 -6
- package/dist/capabilities/document/instructions.js +11 -6
- package/dist/capabilities/index.js +16 -14
- package/dist/capabilities/optimize/instructions.js +14 -6
- package/dist/capabilities/orchestrate/instructions.js +42 -6
- package/dist/capabilities/plan/instructions.js +30 -3
- package/dist/capabilities/profile/instructions.js +70 -6
- package/dist/capabilities/research/instructions.js +4 -5
- package/dist/capabilities/status/instructions.js +15 -6
- package/dist/capabilities/status/startupInstructions.js +34 -0
- package/dist/capabilities/vision/instructions.js +3 -5
- package/dist/cli/appContext.js +14 -7
- package/dist/cli/argvalidate.js +0 -1
- package/dist/cli/capabilityContext/benchmark.js +5 -4
- package/dist/cli/capabilityContext/bespoke.js +14 -6
- package/dist/cli/capabilityContext/build.js +116 -42
- package/dist/cli/capabilityContext/closeout.js +30 -27
- package/dist/cli/capabilityContext/contract.js +18 -27
- package/dist/cli/capabilityContext/evidence.js +84 -77
- package/dist/cli/capabilityContext/index.js +0 -1
- package/dist/cli/capabilityContext/orchestration.js +42 -18
- package/dist/cli/capabilityContext/planState.js +89 -96
- package/dist/cli/capabilityContext/progress.js +51 -12
- package/dist/cli/capabilityContext/projectVerification.js +409 -0
- package/dist/cli/capabilityContext/shared.js +9 -20
- package/dist/cli/capabilityContext/slim.js +52 -8
- package/dist/cli/capabilityContext/startup.js +51 -114
- package/dist/cli/capabilityContext/startupAggregation.js +68 -0
- package/dist/cli/capabilityContext/types.js +26 -10
- package/dist/cli/capabilityContext.js +0 -1
- package/dist/cli/commands/appHome.js +0 -1
- package/dist/cli/commands/capability.js +2 -2
- package/dist/cli/commands/compact.js +163 -13
- package/dist/cli/commands/doctor.js +117 -11
- package/dist/cli/commands/durability.js +81 -0
- package/dist/cli/commands/glossaryAdvice.js +138 -0
- package/dist/cli/commands/lint.js +22 -8
- package/dist/cli/commands/personalGlossary.js +176 -0
- package/dist/cli/commands/prime/briefOrientation.js +746 -0
- package/dist/cli/commands/prime/buildExecutionRequest.js +165 -0
- package/dist/cli/commands/prime/bundleStatus.js +54 -4
- package/dist/cli/commands/prime/collectEntityOrientation.js +326 -0
- package/dist/cli/commands/prime/collectOrientationState.js +126 -63
- package/dist/cli/commands/prime/orientationOutput.js +267 -56
- package/dist/cli/commands/prime/types.js +0 -1
- package/dist/cli/commands/prime/v1Migration.js +0 -1
- package/dist/cli/commands/prime.js +76 -11
- package/dist/cli/commands/profileGrounding.js +55 -0
- package/dist/cli/commands/query.js +74 -52
- package/dist/cli/commands/report.js +73 -19
- package/dist/cli/commands/route.js +142 -0
- package/dist/cli/commands/schema.js +257 -138
- package/dist/cli/commands/state/decisions.js +40 -56
- package/dist/cli/commands/state/docs.js +58 -85
- package/dist/cli/commands/state/experimentRecords.js +151 -0
- package/dist/cli/commands/state/experiments.js +11 -65
- package/dist/cli/commands/state/get.js +129 -0
- package/dist/cli/commands/state/health.js +11 -113
- package/dist/cli/commands/state/index.js +6 -41
- package/dist/cli/commands/state/list.js +194 -0
- package/dist/cli/commands/state/objective.js +21 -65
- package/dist/cli/commands/state/plan.js +11 -170
- package/dist/cli/commands/state/planTasks.js +154 -0
- package/dist/cli/commands/state/plans.js +154 -0
- package/dist/cli/commands/state/progress.js +11 -45
- package/dist/cli/commands/state/shared.js +0 -1
- package/dist/cli/commands/state/todo.js +28 -107
- package/dist/cli/commands/state/write.js +433 -0
- package/dist/cli/commands/upgrade.js +146 -5
- package/dist/cli/commands/upgradeVerify.js +118 -0
- package/dist/cli/commands/validate.js +235 -136
- package/dist/cli/commands/verify.js +23 -8
- package/dist/cli/contracts/bundleStatus.js +0 -1
- package/dist/cli/contracts/orientationState.js +0 -1
- package/dist/cli/dispatch/argvParser.js +0 -1
- package/dist/cli/dispatch/check.js +84 -40
- package/dist/cli/dispatch/commands.js +3 -3
- package/dist/cli/dispatch/index.js +77 -52
- package/dist/cli/dispatch/lifecycle.js +117 -62
- package/dist/cli/dispatch/prime.js +37 -2
- package/dist/cli/dispatch/projections.js +17 -0
- package/dist/cli/dispatch/shared.js +1 -2
- package/dist/cli/dispatch/state.js +62 -66
- package/dist/cli/dispatch.js +0 -1
- package/dist/cli/errors.js +16 -17
- package/dist/cli/help.js +358 -39
- package/dist/cli/migrationRequired.js +122 -0
- package/dist/cli/orientation/attention.js +19 -19
- package/dist/cli/orientation/corpusCoverage.js +32 -1
- package/dist/cli/orientation.js +346 -129
- package/dist/cli/planArtifacts.js +350 -0
- package/dist/cli/planEvidence.js +157 -0
- package/dist/cli/planLifecycleState.js +36 -0
- package/dist/cli/planTaskIndex.js +11 -0
- package/dist/cli/preCutoverCommand.js +32 -0
- package/dist/cli/prime-blob.js +71 -3
- package/dist/cli/profileAcquisition.js +167 -0
- package/dist/cli/startupCompletenessContract.js +11 -8
- package/dist/cli/stateQuery.js +47 -12
- package/dist/cli/structured.js +0 -1
- package/dist/cli/todoMarkdown.js +25 -12
- package/dist/cli/todoReadinessSelection.js +192 -0
- package/dist/cli/todoSeverity.js +0 -1
- package/dist/core/atomicWriter.js +20 -0
- package/dist/core/developmentChannel.js +1 -0
- package/dist/core/developmentInvocation.js +374 -0
- package/dist/core/difflib.js +0 -1
- package/dist/core/envPaths.js +0 -1
- package/dist/core/jsonValue.js +0 -1
- package/dist/core/paths.js +0 -1
- package/dist/core/pyjson.js +0 -1
- package/dist/core/shell.js +4 -0
- package/dist/core/skillIdentity.js +23 -0
- package/dist/core/sourceRoot.js +9 -12
- package/dist/core/text.js +10 -0
- package/dist/core/toml.js +0 -1
- package/dist/core/yaml.js +8 -1
- package/dist/eval/evalSkills.js +13 -14
- package/dist/eval/hybridRouteEvaluation.js +155 -0
- package/dist/eval/semanticEval.js +0 -1
- package/dist/eval/semanticFixtures.js +0 -1
- package/dist/hooks/common.js +3 -56
- package/dist/hooks/compaction/apply.js +224 -47
- package/dist/hooks/compaction/dryRun.js +2 -1
- package/dist/hooks/compaction/index.js +5 -6
- package/dist/hooks/compaction/parse.js +73 -6
- package/dist/hooks/compaction/retention.js +28 -25
- package/dist/hooks/compaction/status.js +145 -26
- package/dist/hooks/compaction/types.js +0 -1
- package/dist/hooks/validateArtifact/agentFacing.js +0 -1
- package/dist/hooks/validateArtifact/index.js +6 -65
- package/dist/hooks/validateArtifact/markdown.js +9 -10
- package/dist/hooks/validateArtifact/schema.js +96 -9
- package/dist/hooks/validateArtifact/traversal.js +12 -11
- package/dist/hooks/validateArtifact/violations.js +5 -3
- package/dist/migrate/v2HandoffManifest.js +8 -3
- package/dist/registries/activationContract.js +2 -0
- package/dist/registries/activationTuples.js +108 -0
- package/dist/registries/artifactProtocolIds.js +2 -1
- package/dist/registries/artifactRegistry.js +207 -60
- package/dist/registries/artifactSchemaProjection.js +45 -0
- package/dist/registries/capabilityContract.js +5 -21
- package/dist/registries/evaluatorHandoffContract.js +0 -1
- package/dist/registries/evidenceTierContract.js +371 -0
- package/dist/registries/glossaryAdviceContract.js +79 -0
- package/dist/registries/glossaryCaveatContract.js +67 -0
- package/dist/registries/glossaryConsumerContractValidation.js +787 -0
- package/dist/registries/glossaryEntryContract.js +757 -0
- package/dist/registries/glossaryTermIdentity.js +17 -0
- package/dist/registries/glossaryTermOccurrence.js +20 -0
- package/dist/registries/hybridRoute.js +274 -0
- package/dist/registries/hybridRouteReceipt.js +221 -0
- package/dist/registries/packagePublication.js +273 -0
- package/dist/registries/packageRegistry.js +184 -209
- package/dist/registries/todoReadinessContract.js +448 -0
- package/dist/registries/triggerLoader.js +7 -44
- package/dist/registries/verbosityBudgetContract.js +205 -0
- package/dist/release/releaseMetadata.js +155 -5
- package/dist/runtime/lifecycleAdapterContract.js +457 -0
- package/dist/runtime/lifecycleAdapters.js +777 -0
- package/dist/runtime/lifecycleAuthority.js +453 -0
- package/dist/runtime/lifecycleOperationContract.js +123 -0
- package/dist/runtime/lifecycleOperations.js +634 -0
- package/dist/runtime/lifecycleOwnershipJournal.js +622 -0
- package/dist/runtime/lifecyclePublication.js +415 -0
- package/dist/runtime/lifecycleSnapshot.js +438 -0
- package/dist/runtime/nativeResourceCleanup.js +502 -0
- package/dist/setup/opencode.js +20 -13
- package/dist/setup/opencodeConstants.js +1 -0
- package/dist/setup/sharedSkill.js +45 -0
- package/dist/setup/smokeChecks.js +14 -75
- package/dist/state/archiveDiscovery.js +580 -0
- package/dist/state/archivePublication.js +225 -0
- package/dist/state/archiveRecovery.js +237 -0
- package/dist/state/archiveReplay.js +53 -0
- package/dist/state/canonicalMigrationRecord.js +36 -0
- package/dist/state/changelog.js +221 -0
- package/dist/state/decisionEntities.js +367 -0
- package/dist/state/decisionLegacyValidation.js +215 -0
- package/dist/state/decisionMigrationProvenance.js +199 -0
- package/dist/state/decisionOverlay.js +254 -0
- package/dist/state/decisionRevision.js +256 -0
- package/dist/state/decisionRevisionMigration.js +89 -0
- package/dist/state/directRetrieval.js +323 -0
- package/dist/state/durability.js +324 -0
- package/dist/state/entityCutover.js +459 -0
- package/dist/state/entityCutoverGit.js +127 -0
- package/dist/state/entityGlossaryAuthority.js +13 -0
- package/dist/state/entityListProjection.js +187 -0
- package/dist/state/entityListRuntimeRegistry.js +85 -0
- package/dist/state/entityMigrationCausality.js +97 -0
- package/dist/state/entityMigrationIdentity.js +5 -0
- package/dist/state/entityMigrationPreview.js +840 -0
- package/dist/state/entityMigrationTodo.js +133 -0
- package/dist/state/entityPublicationContext.js +859 -0
- package/dist/state/entityRetrievalHelp.js +506 -0
- package/dist/state/entityStorage.js +899 -0
- package/dist/state/exactReplacementRecovery.js +18 -0
- package/dist/state/experimentArchive.js +63 -0
- package/dist/state/experimentIdentity.js +202 -0
- package/dist/state/healthEntities.js +262 -0
- package/dist/state/healthEntityValidation.js +18 -0
- package/dist/state/healthRepair.js +69 -0
- package/dist/state/installRoot.js +15 -7
- package/dist/state/legacyEntityCutoverEvidence.js +65 -0
- package/dist/state/legacyIdentity.js +47 -0
- package/dist/state/legacySummaryRecord.js +6 -0
- package/dist/state/listAccounting.js +54 -0
- package/dist/state/listClassification.js +17 -0
- package/dist/state/listCursor.js +42 -0
- package/dist/state/listRetrieval.js +781 -0
- package/dist/state/migrationSourceBinding.js +30 -0
- package/dist/state/objectiveExperimentEntities.js +322 -0
- package/dist/state/planEntities.js +1027 -0
- package/dist/state/planIdentity.js +47 -0
- package/dist/state/planLineageValidation.js +52 -0
- package/dist/state/planReplacementTransaction.js +475 -0
- package/dist/state/planRetrieval.js +313 -0
- package/dist/state/planTaskRetrieval.js +294 -0
- package/dist/state/progressEntities.js +512 -0
- package/dist/state/progressGlossaryCaveat.js +168 -0
- package/dist/state/progressPublicationOrder.js +19 -0
- package/dist/state/progressWritePolicy.js +33 -0
- package/dist/state/projectRoot.js +62 -0
- package/dist/state/projectionPolicy.js +190 -0
- package/dist/state/retrievalAuthority.js +156 -0
- package/dist/state/safeProjectFile.js +155 -0
- package/dist/state/startupAnalysis/benchmark.js +70 -9
- package/dist/state/startupAnalysis/contract.js +44 -10
- package/dist/state/startupAnalysis/helpers.js +1 -2
- package/dist/state/startupAnalysis/index.js +0 -1
- package/dist/state/startupAnalysis/metrics.js +0 -1
- package/dist/state/startupAnalysis/records.js +0 -1
- package/dist/state/startupAnalysis/report.js +0 -1
- package/dist/state/startupAnalysis/threshold.js +13 -1
- package/dist/state/startupAnalysis.js +0 -1
- package/dist/state/startupProjection.js +499 -0
- package/dist/state/stateMode.js +222 -0
- package/dist/state/stateStorageAuthority.js +47 -0
- package/dist/state/summaryEntityRead.js +25 -0
- package/dist/state/summaryMigrationProvenance.js +66 -0
- package/dist/state/summarySourceRowAuthority.js +36 -0
- package/dist/state/todoActivationSafety.js +58 -0
- package/dist/state/todoDocsEntities.js +1124 -0
- package/dist/state/todoDocsEntityValidation.js +158 -0
- package/dist/state/todoMarkdownProjection.js +51 -0
- package/dist/state/todoReconciliationActivation.js +182 -0
- package/dist/state/todoReconciliationInspection.js +171 -0
- package/dist/state/todoReconciliationRepair.js +318 -0
- package/dist/state/todoReconciliationTransaction.js +595 -0
- package/dist/state/write/assign.js +20 -0
- package/dist/state/write/candidateMutation.js +269 -0
- package/dist/state/write/errors.js +11 -0
- package/dist/state/write/experimentPublication.js +192 -0
- package/dist/state/write/explain.js +377 -0
- package/dist/state/write/fields.js +61 -0
- package/dist/state/write/glossaryPublication.js +263 -0
- package/dist/state/write/grammar.js +285 -0
- package/dist/state/write/helpers.js +29 -0
- package/dist/state/write/index.js +12 -0
- package/dist/state/write/input.js +391 -0
- package/dist/state/write/lock.js +837 -0
- package/dist/state/write/mutation.js +234 -0
- package/dist/state/write/operations.js +170 -0
- package/dist/state/write/planEvaluation.js +128 -0
- package/dist/state/write/planPublication.js +179 -0
- package/dist/state/write/runtimeOperations.js +146 -0
- package/dist/state/write/serialize.js +1 -0
- package/dist/state/write/transaction.js +57 -0
- package/dist/state/write/validate.js +7 -0
- package/dist/upgrade/appContentRefresh.js +77 -36
- package/dist/upgrade/appModel.js +0 -1
- package/dist/upgrade/atomicWriter.js +1 -0
- package/dist/upgrade/bundleEvidence.js +0 -1
- package/dist/upgrade/channels.js +6 -9
- package/dist/upgrade/compatibility.js +43 -17
- package/dist/upgrade/doctor.js +55 -32
- package/dist/upgrade/doctorClassifier.js +11 -1
- package/dist/upgrade/installedHooksRetirement.js +46 -40
- package/dist/upgrade/legacyAgentCleanup.js +187 -21
- package/dist/upgrade/lifecycleUpgrade.js +113 -0
- package/dist/upgrade/migrateArtifactsV2ToV3.js +334 -64
- package/dist/upgrade/migrationPublication.js +122 -0
- package/dist/upgrade/nextMajorDoctor.js +0 -1
- package/dist/upgrade/npxPlatformStatus.js +0 -1
- package/dist/upgrade/projectIntegration.js +121 -159
- package/dist/upgrade/projectIntegrationDecision.js +42 -85
- package/dist/upgrade/retiredResourceDiagnostics.js +117 -0
- package/dist/upgrade/runtimeMigration.js +262 -453
- package/dist/upgrade/upgradeCommands.js +14 -1
- package/dist/upgrade/upgradeLock.js +85 -0
- package/dist/upgrade/upgradeOrchestrator.js +263 -59
- package/dist/upgrade/v3CapabilitySurface.js +2 -3
- package/dist/upgrade/versionResolution.js +0 -1
- package/dist/validate/activationArtifactEvidence.js +852 -0
- package/dist/validate/activationArtifactEvidenceTypes.js +12 -0
- package/dist/validate/activationConjunction.js +816 -0
- package/dist/validate/activationEvidenceManifest.js +531 -0
- package/dist/validate/activationPackageSemantics.js +29 -0
- package/dist/validate/appHomeContract.js +1 -7
- package/dist/validate/bootstrapAuthority.js +44 -0
- package/dist/validate/capability.js +11 -3
- package/dist/validate/crossCapability.js +14 -9
- package/dist/validate/retainedReferenceAuthority.js +879 -0
- package/dist/validate/selfAudit.js +39 -45
- package/dist/validate/v1LegacyCruft.js +131 -0
- package/dist/validate/vocabularyAuthority.js +8 -8
- package/package.json +41 -13
- package/bundle/references/adapters/cursor.md +0 -214
- package/bundle/references/adapters/opencode.md +0 -530
- package/bundle/references/adapters/package-manifest-interface-model.yaml +0 -337
- package/bundle/references/adapters/runtime-adapter-characterization.md +0 -79
- package/bundle/references/adapters/runtime-adapter-interface-model.yaml +0 -200
- package/bundle/references/adapters/runtime-adapter-registry.yaml +0 -554
- package/bundle/references/adapters/runtime-feature-parity.md +0 -189
- package/bundle/references/analysis/benchmark.md +0 -267
- package/bundle/references/analysis/startup-measurement-contract.yaml +0 -424
- package/bundle/references/cli/agent-ready-state-contract.yaml +0 -953
- package/bundle/references/cli/audience-namespace-cli-migration.yaml +0 -369
- package/bundle/references/cli/bundle-skill-vocabulary.yaml +0 -250
- package/bundle/references/cli/capability-tool-classification.yaml +0 -53
- package/bundle/references/cli/coexistence-probe.yaml +0 -13
- package/bundle/references/cli/parity-expected-actual-template.md +0 -30
- package/bundle/references/cli/routing-execution-vocabulary.yaml +0 -281
- package/bundle/references/cli/single-name-protocol.yaml +0 -42
- package/bundle/references/cli/upgrade-repair-wording.md +0 -45
- package/bundle/references/cli/v3-handoff-manifest.schema.yaml +0 -98
- package/bundle/references/meta/documentation-inventory.md +0 -49
- package/bundle/skills/agentera/.claude-plugin/plugin.json +0 -27
- package/bundle/skills/agentera/agents/audit.toml +0 -6
- package/bundle/skills/agentera/agents/build.toml +0 -6
- package/bundle/skills/agentera/agents/design.toml +0 -6
- package/bundle/skills/agentera/agents/discuss.toml +0 -6
- package/bundle/skills/agentera/agents/document.toml +0 -6
- package/bundle/skills/agentera/agents/optimize.toml +0 -6
- package/bundle/skills/agentera/agents/orchestrate.toml +0 -6
- package/bundle/skills/agentera/agents/plan.toml +0 -6
- package/bundle/skills/agentera/agents/profile.toml +0 -6
- package/bundle/skills/agentera/agents/research.toml +0 -6
- package/bundle/skills/agentera/agents/status.toml +0 -6
- package/bundle/skills/agentera/agents/vision.toml +0 -6
- package/bundle/skills/agentera/references/contract.md +0 -1048
- package/dist/analytics/extractCorpus/cli.js.map +0 -1
- package/dist/analytics/extractCorpus/copilotSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/core.js.map +0 -1
- package/dist/analytics/extractCorpus/corpus.js.map +0 -1
- package/dist/analytics/extractCorpus/coverageAudit.js.map +0 -1
- package/dist/analytics/extractCorpus/cursorSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/extractCorpusParity.js.map +0 -1
- package/dist/analytics/extractCorpus/filesystemSources.js.map +0 -1
- package/dist/analytics/extractCorpus/index.js.map +0 -1
- package/dist/analytics/extractCorpus/jsonlSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/sqliteCaps.js.map +0 -1
- package/dist/analytics/extractCorpus/sqliteSessions.js.map +0 -1
- package/dist/analytics/extractCorpus.js.map +0 -1
- package/dist/analytics/usageStats.js.map +0 -1
- package/dist/bin/agentera.js.map +0 -1
- package/dist/capabilities/audit/instructions.js.map +0 -1
- package/dist/capabilities/build/instructions.js.map +0 -1
- package/dist/capabilities/design/instructions.js.map +0 -1
- package/dist/capabilities/discuss/instructions.js.map +0 -1
- package/dist/capabilities/document/instructions.js.map +0 -1
- package/dist/capabilities/dokumentera/instructions.js +0 -6
- package/dist/capabilities/dokumentera/instructions.js.map +0 -1
- package/dist/capabilities/hej/instructions.js +0 -6
- package/dist/capabilities/hej/instructions.js.map +0 -1
- package/dist/capabilities/index.js.map +0 -1
- package/dist/capabilities/inspektera/instructions.js +0 -6
- package/dist/capabilities/inspektera/instructions.js.map +0 -1
- package/dist/capabilities/inspirera/instructions.js +0 -6
- package/dist/capabilities/inspirera/instructions.js.map +0 -1
- package/dist/capabilities/optimera/instructions.js +0 -6
- package/dist/capabilities/optimera/instructions.js.map +0 -1
- package/dist/capabilities/optimize/instructions.js.map +0 -1
- package/dist/capabilities/orchestrate/instructions.js.map +0 -1
- package/dist/capabilities/orkestrera/instructions.js +0 -6
- package/dist/capabilities/orkestrera/instructions.js.map +0 -1
- package/dist/capabilities/plan/instructions.js.map +0 -1
- package/dist/capabilities/planera/instructions.js +0 -6
- package/dist/capabilities/planera/instructions.js.map +0 -1
- package/dist/capabilities/profile/instructions.js.map +0 -1
- package/dist/capabilities/profilera/instructions.js +0 -6
- package/dist/capabilities/profilera/instructions.js.map +0 -1
- package/dist/capabilities/realisera/instructions.js +0 -6
- package/dist/capabilities/realisera/instructions.js.map +0 -1
- package/dist/capabilities/research/instructions.js.map +0 -1
- package/dist/capabilities/resonera/instructions.js +0 -6
- package/dist/capabilities/resonera/instructions.js.map +0 -1
- package/dist/capabilities/status/instructions.js.map +0 -1
- package/dist/capabilities/vision/instructions.js.map +0 -1
- package/dist/capabilities/visionera/instructions.js +0 -6
- package/dist/capabilities/visionera/instructions.js.map +0 -1
- package/dist/capabilities/visualisera/instructions.js +0 -5
- package/dist/capabilities/visualisera/instructions.js.map +0 -1
- package/dist/cli/appContext.js.map +0 -1
- package/dist/cli/argvalidate.js.map +0 -1
- package/dist/cli/capabilityContext/benchmark.js.map +0 -1
- package/dist/cli/capabilityContext/bespoke.js.map +0 -1
- package/dist/cli/capabilityContext/build.js.map +0 -1
- package/dist/cli/capabilityContext/closeout.js.map +0 -1
- package/dist/cli/capabilityContext/contract.js.map +0 -1
- package/dist/cli/capabilityContext/evidence.js.map +0 -1
- package/dist/cli/capabilityContext/index.js.map +0 -1
- package/dist/cli/capabilityContext/orchestration.js.map +0 -1
- package/dist/cli/capabilityContext/planState.js.map +0 -1
- package/dist/cli/capabilityContext/progress.js.map +0 -1
- package/dist/cli/capabilityContext/realisera.js +0 -174
- package/dist/cli/capabilityContext/realisera.js.map +0 -1
- package/dist/cli/capabilityContext/shared.js.map +0 -1
- package/dist/cli/capabilityContext/slim.js.map +0 -1
- package/dist/cli/capabilityContext/startup.js.map +0 -1
- package/dist/cli/capabilityContext/types.js.map +0 -1
- package/dist/cli/capabilityContext.js.map +0 -1
- package/dist/cli/commands/appHome.js.map +0 -1
- package/dist/cli/commands/backfill.js +0 -84
- package/dist/cli/commands/backfill.js.map +0 -1
- package/dist/cli/commands/capability.js.map +0 -1
- package/dist/cli/commands/compact.js.map +0 -1
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/lint.js.map +0 -1
- package/dist/cli/commands/prime/bundleStatus.js.map +0 -1
- package/dist/cli/commands/prime/collectOrientationState.js.map +0 -1
- package/dist/cli/commands/prime/orientationOutput.js.map +0 -1
- package/dist/cli/commands/prime/routeOutput.js +0 -50
- package/dist/cli/commands/prime/routeOutput.js.map +0 -1
- package/dist/cli/commands/prime/types.js.map +0 -1
- package/dist/cli/commands/prime/v1Migration.js.map +0 -1
- package/dist/cli/commands/prime.js.map +0 -1
- package/dist/cli/commands/query.js.map +0 -1
- package/dist/cli/commands/report.js.map +0 -1
- package/dist/cli/commands/schema.js.map +0 -1
- package/dist/cli/commands/state/decisions.js.map +0 -1
- package/dist/cli/commands/state/docs.js.map +0 -1
- package/dist/cli/commands/state/experiments.js.map +0 -1
- package/dist/cli/commands/state/health.js.map +0 -1
- package/dist/cli/commands/state/index.js.map +0 -1
- package/dist/cli/commands/state/objective.js.map +0 -1
- package/dist/cli/commands/state/plan.js.map +0 -1
- package/dist/cli/commands/state/progress.js.map +0 -1
- package/dist/cli/commands/state/shared.js.map +0 -1
- package/dist/cli/commands/state/todo.js.map +0 -1
- package/dist/cli/commands/state.js +0 -1023
- package/dist/cli/commands/state.js.map +0 -1
- package/dist/cli/commands/upgrade.js.map +0 -1
- package/dist/cli/commands/validate.js.map +0 -1
- package/dist/cli/commands/verify.js.map +0 -1
- package/dist/cli/contracts/bundleStatus.js.map +0 -1
- package/dist/cli/contracts/orientationState.js.map +0 -1
- package/dist/cli/dispatch/argvParser.js.map +0 -1
- package/dist/cli/dispatch/check.js.map +0 -1
- package/dist/cli/dispatch/commands.js.map +0 -1
- package/dist/cli/dispatch/index.js.map +0 -1
- package/dist/cli/dispatch/lifecycle.js.map +0 -1
- package/dist/cli/dispatch/prime.js.map +0 -1
- package/dist/cli/dispatch/shared.js.map +0 -1
- package/dist/cli/dispatch/state.js.map +0 -1
- package/dist/cli/dispatch.js.map +0 -1
- package/dist/cli/errors.js.map +0 -1
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/orientation/attention.js.map +0 -1
- package/dist/cli/orientation/corpusCoverage.js.map +0 -1
- package/dist/cli/orientation.js.map +0 -1
- package/dist/cli/prime-blob.js.map +0 -1
- package/dist/cli/startupCompletenessContract.js.map +0 -1
- package/dist/cli/stateQuery.js.map +0 -1
- package/dist/cli/structured.js.map +0 -1
- package/dist/cli/todoMarkdown.js.map +0 -1
- package/dist/cli/todoSeverity.js.map +0 -1
- package/dist/core/difflib.js.map +0 -1
- package/dist/core/envPaths.js.map +0 -1
- package/dist/core/git.js +0 -43
- package/dist/core/git.js.map +0 -1
- package/dist/core/jsonValue.js.map +0 -1
- package/dist/core/paths.js.map +0 -1
- package/dist/core/pyjson.js.map +0 -1
- package/dist/core/sourceRoot.js.map +0 -1
- package/dist/core/toml.js.map +0 -1
- package/dist/core/yaml.js.map +0 -1
- package/dist/eval/evalSkills.js.map +0 -1
- package/dist/eval/semanticEval.js.map +0 -1
- package/dist/eval/semanticFixtures.js.map +0 -1
- package/dist/hooks/common.js.map +0 -1
- package/dist/hooks/compaction/apply.js.map +0 -1
- package/dist/hooks/compaction/dryRun.js.map +0 -1
- package/dist/hooks/compaction/index.js.map +0 -1
- package/dist/hooks/compaction/parse.js.map +0 -1
- package/dist/hooks/compaction/retention.js.map +0 -1
- package/dist/hooks/compaction/status.js.map +0 -1
- package/dist/hooks/compaction/todoResolved.js +0 -137
- package/dist/hooks/compaction/todoResolved.js.map +0 -1
- package/dist/hooks/compaction/types.js.map +0 -1
- package/dist/hooks/compaction.js +0 -935
- package/dist/hooks/compaction.js.map +0 -1
- package/dist/hooks/cursorPreToolUse.js +0 -19
- package/dist/hooks/cursorPreToolUse.js.map +0 -1
- package/dist/hooks/cursorSessionStart.js +0 -79
- package/dist/hooks/cursorSessionStart.js.map +0 -1
- package/dist/hooks/sessionStart.js +0 -216
- package/dist/hooks/sessionStart.js.map +0 -1
- package/dist/hooks/sessionStop.js +0 -206
- package/dist/hooks/sessionStop.js.map +0 -1
- package/dist/hooks/todoLayout.js +0 -177
- package/dist/hooks/todoLayout.js.map +0 -1
- package/dist/hooks/validateArtifact/agentFacing.js.map +0 -1
- package/dist/hooks/validateArtifact/index.js.map +0 -1
- package/dist/hooks/validateArtifact/markdown.js.map +0 -1
- package/dist/hooks/validateArtifact/runtime.js +0 -86
- package/dist/hooks/validateArtifact/runtime.js.map +0 -1
- package/dist/hooks/validateArtifact/schema.js.map +0 -1
- package/dist/hooks/validateArtifact/traversal.js.map +0 -1
- package/dist/hooks/validateArtifact/violations.js.map +0 -1
- package/dist/hooks/validateArtifact.js +0 -924
- package/dist/hooks/validateArtifact.js.map +0 -1
- package/dist/migrate/v2HandoffManifest.js.map +0 -1
- package/dist/registries/artifactProtocolIds.js.map +0 -1
- package/dist/registries/artifactRegistry.js.map +0 -1
- package/dist/registries/capabilityContract.js.map +0 -1
- package/dist/registries/evaluatorHandoffContract.js.map +0 -1
- package/dist/registries/packageRegistry.js.map +0 -1
- package/dist/registries/runtimeAdapterRegistry.js +0 -316
- package/dist/registries/runtimeAdapterRegistry.js.map +0 -1
- package/dist/registries/triggerLoader.js.map +0 -1
- package/dist/release/releaseMetadata.js.map +0 -1
- package/dist/routing/index.js +0 -2
- package/dist/routing/index.js.map +0 -1
- package/dist/routing/routeEngine.js +0 -189
- package/dist/routing/routeEngine.js.map +0 -1
- package/dist/setup/codex/agents.js +0 -96
- package/dist/setup/codex/agents.js.map +0 -1
- package/dist/setup/codex/cli.js +0 -161
- package/dist/setup/codex/cli.js.map +0 -1
- package/dist/setup/codex/configToml.js +0 -639
- package/dist/setup/codex/configToml.js.map +0 -1
- package/dist/setup/codex/constants.js +0 -29
- package/dist/setup/codex/constants.js.map +0 -1
- package/dist/setup/codex/installRoot.js +0 -64
- package/dist/setup/codex/installRoot.js.map +0 -1
- package/dist/setup/codex/state.js +0 -270
- package/dist/setup/codex/state.js.map +0 -1
- package/dist/setup/codex.js +0 -12
- package/dist/setup/codex.js.map +0 -1
- package/dist/setup/copilot.js +0 -227
- package/dist/setup/copilot.js.map +0 -1
- package/dist/setup/cursor.js +0 -129
- package/dist/setup/cursor.js.map +0 -1
- package/dist/setup/cursorSurfaces.js +0 -67
- package/dist/setup/cursorSurfaces.js.map +0 -1
- package/dist/setup/doctor/core.js +0 -300
- package/dist/setup/doctor/core.js.map +0 -1
- package/dist/setup/doctor/diagnostics.js +0 -240
- package/dist/setup/doctor/diagnostics.js.map +0 -1
- package/dist/setup/doctor/opencode.js +0 -313
- package/dist/setup/doctor/opencode.js.map +0 -1
- package/dist/setup/doctor/report.js +0 -425
- package/dist/setup/doctor/report.js.map +0 -1
- package/dist/setup/doctor.js +0 -10
- package/dist/setup/doctor.js.map +0 -1
- package/dist/setup/opencode.js.map +0 -1
- package/dist/setup/smokeChecks.js.map +0 -1
- package/dist/state/installRoot.js.map +0 -1
- package/dist/state/progressCommit.js +0 -289
- package/dist/state/progressCommit.js.map +0 -1
- package/dist/state/startupAnalysis/benchmark.js.map +0 -1
- package/dist/state/startupAnalysis/contract.js.map +0 -1
- package/dist/state/startupAnalysis/helpers.js.map +0 -1
- package/dist/state/startupAnalysis/index.js.map +0 -1
- package/dist/state/startupAnalysis/metrics.js.map +0 -1
- package/dist/state/startupAnalysis/records.js.map +0 -1
- package/dist/state/startupAnalysis/report.js.map +0 -1
- package/dist/state/startupAnalysis/threshold.js.map +0 -1
- package/dist/state/startupAnalysis.js.map +0 -1
- package/dist/upgrade/appContentRefresh.js.map +0 -1
- package/dist/upgrade/appModel.js.map +0 -1
- package/dist/upgrade/bundleEvidence.js.map +0 -1
- package/dist/upgrade/channels.js.map +0 -1
- package/dist/upgrade/cliProbe.js +0 -22
- package/dist/upgrade/cliProbe.js.map +0 -1
- package/dist/upgrade/coexistenceProbe.js +0 -107
- package/dist/upgrade/coexistenceProbe.js.map +0 -1
- package/dist/upgrade/compatibility.js.map +0 -1
- package/dist/upgrade/doctor.js.map +0 -1
- package/dist/upgrade/doctorClassifier.js.map +0 -1
- package/dist/upgrade/installedHooksRetirement.js.map +0 -1
- package/dist/upgrade/legacyAgentCleanup.js.map +0 -1
- package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -570
- package/dist/upgrade/migrateArtifactsV1ToV2.js.map +0 -1
- package/dist/upgrade/migrateArtifactsV2ToV3.js.map +0 -1
- package/dist/upgrade/nextMajorDoctor.js.map +0 -1
- package/dist/upgrade/npxPlatformStatus.js.map +0 -1
- package/dist/upgrade/projectIntegration.js.map +0 -1
- package/dist/upgrade/projectIntegrationDecision.js.map +0 -1
- package/dist/upgrade/runtimeMigration.js.map +0 -1
- package/dist/upgrade/upgradeCommands.js.map +0 -1
- package/dist/upgrade/upgradeOrchestrator.js.map +0 -1
- package/dist/upgrade/v3CapabilitySurface.js.map +0 -1
- package/dist/upgrade/versionResolution.js.map +0 -1
- package/dist/validate/appHomeContract.js.map +0 -1
- package/dist/validate/capability.js.map +0 -1
- package/dist/validate/crossCapability.js.map +0 -1
- package/dist/validate/lifecycleAdapters/legacyPythonParity.js +0 -93
- package/dist/validate/lifecycleAdapters/legacyPythonParity.js.map +0 -1
- package/dist/validate/lifecycleAdapters/nodeFormChecks.js +0 -488
- package/dist/validate/lifecycleAdapters/nodeFormChecks.js.map +0 -1
- package/dist/validate/lifecycleAdapters/shared.js +0 -198
- package/dist/validate/lifecycleAdapters/shared.js.map +0 -1
- package/dist/validate/lifecycleAdapters.js +0 -62
- package/dist/validate/lifecycleAdapters.js.map +0 -1
- package/dist/validate/selfAudit.js.map +0 -1
- package/dist/validate/vocabularyAuthority.js.map +0 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
-
export const instructions = JSON.parse(String.raw `"# VISION\n\n**Visionary Inception: Strategic Imagination, Observation Nexus. Envision, Refine, Anchor**\n\nThe strategic steward of the canonical vision artifact, stored as \u0060.agentera/vision.yaml\u0060 unless mapped otherwise. Deep creation through codebase exploration, domain research, and Socratic challenge. Ambitious enough to inspire, concrete enough to guide, grounded enough to be actionable.\n\nTwo modes: **create** (new projects) and **refine** (evolve existing visions).\n\n---\n\n## Visual identity\n\nGlyph: **⛥** (protocol ref: SG6). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne agent-facing file in \u0060.agentera/\u0060 by default.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060VISION.md\u0060 | Canonical vision artifact. North star, direction, principles, personas, aspirations. An evergreen constitution. | Created via deep brainstorm session, written to \u0060.agentera/vision.yaml\u0060 by default. |\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060vision\u0060 to locate the active installed schema; do not search Agentera directories manually. Existing vision artifacts provide repository-local examples of the shape. Vision adapts and expands them based on the conversation.\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, check if \u0060.agentera/docs.yaml\u0060 exists. If it has an Artifact Mapping section, use the path specified for each canonical filename (VISION.md, etc.). If \u0060.agentera/docs.yaml\u0060 doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at \u0060.agentera/vision.yaml\u0060; other agent-facing artifacts at \u0060.agentera/*.yaml\u0060. This applies to all artifact references in this capability, including cross-capability reads (.agentera/decisions.yaml, .agentera/health.yaml, .agentera/progress.yaml, TODO.md).\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: severity arrows VT5-VT8, trend arrows VT12-VT13, progress bar VT18, inline separator VT16 (·), list item VT15 (▸), section divider VT14, flow/target VT17 (→). Skill glyph SG6 for the exit marker. Exit signals EX1-EX4 for the exit marker. Confidence scale CS1-CS5 for decision profile consumption.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference for ambiguous cases or cross-checking.\n\n---\n\n## vision.yaml shape\n\n\u0060\u0060\u0060yaml\nproject_name: Project Name\nnorth_star: The dream. Not what the software does, but what it makes possible.\npersonas:\n - name: Persona name\n description: Their day, frustrations, and workflow.\nprinciples:\n - name: Principle name\n description: What this principle optimizes for and what it resists.\ndirection: Where this project is heading. Aspirational, not prescriptive.\n\nEach principle MUST state a tradeoff direction (\"A over B when they conflict\"). Principles SHOULD name what each one actively prevents. Principles MUST NOT name specific libraries, modules, file paths, or implementation patterns — those belong in constraints or task scope. \"Tests over time-to-first-commit\" is a principle; \"use vitest\" is not.\nidentity:\n personality: adjective · adjective · adjective\n voice: How it communicates.\n emotional_register: What it feels like to use.\n naming: Convention or philosophy.\ntension: The hardest tension in the vision.\n\u0060\u0060\u0060\n\nVision must be ambitious enough for months of development, personas concrete enough for \"who is this for?\" debates, direction clear enough to derive next steps, and identity vivid enough to guide decisions from error messages to module names. If DESIGN.md exists, Identity should cohere with the visual system.\n\n---\n\n## Step 0: Detect mode\n\n**If the vision artifact does NOT exist**: Proceed to **Create** mode (Step 1).\n\n**If the vision artifact exists**: Present the mode choice.\n\nNarration voice (riff, don't script):\n\n- \"You've already got a vision. Sharpen it or start over?\" · \"Found your vision. Refine what's there, or fresh start?\"\n\nOffer:\n\n> **Refine**: Evolve the existing vision based on what you've learned. Reads the current vision, the codebase state, and recent progress to propose informed updates.\n>\n> **Replace**: Start fresh with a deep brainstorm. Archives the current vision and creates a new one from scratch.\n\nIf **Refine**, skip to Refine mode.\nIf **Replace**, archive the current vision artifact to \u0060.agentera/archive/vision-{date}.yaml\u0060, then proceed to Create mode.\n\n---\n\n## Create mode\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: explore, research, converse, audit, write.\n\n### Step 1: Explore the codebase\n\nIf code exists, read deeply before asking questions. You arrive informed.\n\n1. Map structure: directory layout, key modules, entry points\n2. Read dependency manifests: stack, libraries, what choices reveal\n3. Read README.md, CLAUDE.md, AGENTS.md if they exist\n4. Read key source files to understand what the software does today\n5. Read PROGRESS.md, TODO.md, DECISIONS.md for trajectory; use \u0060agentera decisions --format json\u0060 for normal decision context and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical decision context.\n6. Read HEALTH.md for current quality\n7. Read DESIGN.md for existing visual identity\n8. **Decision profile**: read \u0060$AGENTERA_PROFILE_DIR/PROFILE.md\u0060 (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060) directly per protocol confidence scale (CS1-CS5) conventions. If missing, proceed without persona grounding.\n9. \u0060git log --oneline -30\u0060 for recent story\n\nSynthesize: \"The project does X, built with Y, moving toward Z. Strongest patterns: A. Gaps: B.\"\n\nGreenfield? Skip to Step 2.\n\n### Step 2: Research the domain\n\nSearch for context grounding the vision in reality:\n\n1. **What exists**: similar tools, competing approaches, adjacent projects\n2. **State of the art**: recent developments, emerging patterns\n3. **What's missing**: suite gaps this project could fill\n4. **Who talks about it**: communities, forums, common frustrations\n\n3-5 targeted searches. Synthesize: \"The gap is X. The opportunity is Y.\"\n\n### Step 3: The conversation\n\nEngage the user. Ask one question at a time through the runtime question tool\n(\u0060AskUserQuestion\u0060, always include \u0060Done\u0060 option).\n\n**Personality**: the sharp colleague, here to dream with you. Pushes past safe answers: \"That's good, but what if it was more?\"\n\nFollow a narrative arc, not a checklist. Adapt, but cover:\n\n1. **The dream**: \"Based on what I see in the codebase [and the domain research], here's where I think this wants to go: [synthesis]. But I bet you're thinking bigger than that. What does this project make possible if it wildly succeeds?\"\n\n Push beyond utility: \"It does X faster, but why does that matter? What can they do that they couldn't before?\"\n\n2. **The people**: \"Who reaches for this? Not 'developers,' a specific person. Their Tuesday morning. The frustration that makes them think 'I need something better'?\"\n\n Challenge abstract personas: \"'Data engineers': the one at a startup with 3 services, or the one at a bank with 3,000?\"\n\n3. **The principles**: \"What principles should guide every decision? What do you optimize for when you can't have everything? What do you actively resist?\"\n\n If decision profile exists, propose principles from it: \"Your profile says you value X over Y. Should that be a principle here?\"\n\n4. **The direction**: \"Given all of that, where is this heading? Not features. Capabilities. What kind of tool does this become in a year? What would surprise you?\"\n\n5. **The identity**: \"If this product were a person, bold and direct, or quiet and precise? How does it talk? How should it feel to use? What emotion does a successful interaction leave?\" Also naming: \"Convention, cultural reference, philosophy?\"\n\n If DESIGN.md exists: \"Your visual system says X. Does the verbal identity match?\"\n\n6. **The tension**: \"What's the hardest tension in this vision? Where do the principles conflict? What will you have to give up to get what matters most?\"\n\n This question often produces the most useful material for the vision document.\n\n### Step 4: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 5: Write the vision artifact\n\nSynthesize into an aspirational north star. **Tone**: evocative, not clinical. A rallying cry, not a requirements doc. **Structure**: follow template but adapt; add dimensions that emerged, omit sections that produced nothing interesting.\n\nOutput constraint: ≤20 words per principle.\n\nPresent the draft to the user. Get explicit approval before writing.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n**Exit marker**: emit \u0060⛥ vision · <status>\u0060 on its own line, followed by a one-sentence summary. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a \u0060▸\u0060 (VT15) bullet below the summary identifying what needs resolution. The exit marker is mandatory on every invocation.\n\n---\n\n## Refine mode\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: read, research, propose, audit, update.\n\n### Step 1: Read the current state\n\n1. Read the current vision artifact\n2. Read the codebase (same depth as Create Step 1)\n3. Read PROGRESS.md for what's been built since the vision was created\n4. Use \u0060agentera decisions --format json\u0060 for what decisions have shifted thinking; carry compacted/missing-field caveats forward rather than reconstructing absent historical context.\n5. Read HEALTH.md for what structural realities constrain the vision\n6. Read TODO.md for what recurring problems suggest the vision needs adjustment\n\n### Step 2: Research updates\n\nSearch for domain developments since the vision was written: new tools, community shifts, things the user might not have seen.\n\n### Step 3: Propose changes\n\nPresent your assessment:\n\n> Here's what's changed since the vision was written:\n>\n> - The project has built [A, B, C] (from PROGRESS.md)\n> - Decision [X] shifted thinking about [Y] (from DECISIONS.md)\n> - The domain has moved: [Z] (from research)\n>\n> I'd suggest updating:\n>\n> - [Section]: [what to change and why]\n> - [Section]: [what to change and why]\n>\n> What resonates? What's off?\n\nBrief conversation (2-4 exchanges) to refine proposed changes.\n\n### Step 4: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 5: Update the vision artifact\n\nShow the updated vision as a diff (what changed and why). Get explicit approval before writing.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER write the vision artifact without explicit user approval. Present drafts and get confirmation.\n- NEVER modify the vision artifact during a build cycle. Vision changes happen in dedicated vision sessions only.\n- NEVER produce a clinical, requirements-style document. The vision should inspire, not specify. If it reads like a PRD, rewrite it.\n- NEVER skip the codebase exploration (Step 1) when code exists. Arriving informed is the whole point.\n- NEVER propose a vision so vague it can't guide autonomous development. \"Make a great tool\" is not a vision. \"Make it possible for a solo developer to ship production-grade systems by letting an AI team handle the parts they'd otherwise skip\" is.\n- NEVER dismiss the user's ambition. If they dream big, help them articulate it. If they think small, push them bigger. But never cap their aspiration.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060⛥ vision · <status>\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 (VT15) bullet details below the summary.\n\n- **complete** (EX1): The vision artifact was written (Create/Replace mode) or updated (Refine mode) with explicit user approval; the vision is ambitious, concrete, and structured to sustain autonomous development.\n- **flagged** (EX2): The vision was produced but with weaknesses worth surfacing: the user settled for a less ambitious or less specific vision than the capability pushed for, key sections (personas, principles, direction) are thin due to limited conversation depth, or the vision has unresolved tensions with existing DECISIONS.md entries.\n- **stuck** (EX3): Cannot write the vision artifact because the user declined to approve the draft and no actionable revision direction was given, or codebase exploration failed in a way that would make the vision unreliable (e.g., inaccessible repo).\n- **waiting** (EX4): The user has not provided enough about the project's purpose or direction to write a meaningful vision, and the codebase (if any) does not provide sufficient signal to proceed without a conversation.\n\n---\n\n## Cross-capability integration\n\nVision is part of a twelve-capability suite. It is the strategic layer, the capability that defines where the project is going.\n\n### Vision produces what build consumes\n\nThe vision artifact is the north star that drives build's work selection every cycle. When vision is installed, build defers to it for vision creation and refinement. When vision is NOT installed, build falls back to its own quick brainstorm. Both paths produce the same \u0060.agentera/vision.yaml\u0060 shape by default; the capabilities are interchangeable at the artifact level.\n\n### Vision is informed by discuss\n\nDECISIONS.md entries provide context for vision refinement: what choices have been made and why. When vision detects that decisions have shifted thinking away from the current vision, it surfaces this during refine mode.\n\n### Vision is informed by profile\n\nThe decision profile calibrates the vision conversation: what patterns the user values, what principles they've established across projects, what they resist. High-confidence entries (CS1-CS2, 70+) become proposed principles in the vision.\n\n### Vision is informed by research\n\nWhen research analysis has shifted thinking about the project's direction, vision reads DECISIONS.md for these insights and incorporates them into vision refinement.\n\n### Vision is informed by audit\n\nHEALTH.md tells vision what structural realities constrain the vision. A project with D-grade architecture may need a vision adjustment, or the vision may confirm that the architecture needs to change.\n\n### Vision reads design output\n\nIf DESIGN.md exists, vision reads it during codebase exploration to understand the project's visual identity. The \u0060identity\u0060 section in the vision artifact should be coherent with the visual system declared in DESIGN.md. Vision reads DESIGN.md for context but never writes it; design owns all DESIGN.md writes.\n\n### Vision reads document output\n\nDOCS.md provides artifact path resolution for the canonical vision artifact. Document's documentation coverage tracking helps vision understand what documentation exists in the project.\n\n### Vision feeds plan\n\nWhen a new or refined vision changes the project's direction, plan can produce a plan to realign the codebase with the updated vision.\n\n---\n\n## Getting started\n\n### New project\n\n1. ⛥ vision: deep creation of the vision artifact through codebase exploration, domain research, and aspirational conversation\n2. ≡ plan: plan the first features (if complex)\n3. ⧉ build: start building\n\n### Existing project without a vision\n\n1. ⛥ vision: reads the codebase, understands what exists, then pushes the user to articulate where it should go\n\n### Vision refinement\n\n1. ⛥ vision: detects the existing vision artifact, offers refine mode, reads progress and decisions since last update, proposes informed changes\n\n### Without vision installed\n\nBuild's built-in quick brainstorm creates a workable vision artifact. Vision adds depth and stewardship but is not required for the suite to function.\n"`);
|
|
1
|
+
// Capability instructions for vision (canonical per D57; D65 relocated from .md to .ts)
|
|
2
|
+
// Served via `agentera prime --context vision --format json`. RFC 2119 modal vocab per D71.
|
|
3
|
+
export const instructions = JSON.parse(String.raw `"# VISION\n\n**Strategic Layer. Envision, Refine, Anchor**\n\nThe strategic steward of the canonical vision artifact, stored as \u0060.agentera/vision.yaml\u0060 unless mapped otherwise. Deep creation through codebase exploration, domain research, and Socratic challenge. Ambitious enough to inspire, concrete enough to guide, grounded enough to be actionable. Glyph: **⛥** (protocol ref: SG6), used in the mandatory exit marker.\n\nTwo modes: **create** (new projects) and **refine** (evolve existing visions).\n\nVision MUST source state from \u0060agentera prime --context vision --format json\u0060 and write only the vision artifact, archived-vision history under \u0060.agentera/archive/\u0060, and \u0060.agentera/docs.yaml\u0060 artifact-mapping updates if a new path override is required. Read \u0060capability_context.startup\u0060. Observe \u0060outcome\u0060; use bounded context already served for an \u0060included\u0060 availability row, and run a \u0060deferred\u0060 row\u0027s exact \u0060detail_command\u0060 before any raw artifact diagnostic. If startup is \u0060blocked\u0060, use \u0060detail_discovery.schema\u0060 to inspect recovery; do not raw-read \u0060.agentera/*.yaml\u0060.\n\n---\n\n## State artifacts\n\nOne agent-facing file in \u0060.agentera/\u0060 by default, plus a per-project archive directory.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060vision\u0060 | Canonical vision artifact. North star, direction, principles, personas, aspirations, identity, tension. An evergreen constitution. | Created via deep brainstorm session, written to \u0060.agentera/vision.yaml\u0060 by default. |\n| \u0060.agentera/archive/\u0060 | Completed Replace-mode predecessors, retained as corrective context. | Created on first Replace-mode archive; files named \u0060vision-{date}.yaml\u0060. |\n\nRead-needs (sourced via \u0060vision_startup_context\u0060 when complete): vision, decisions, progress, health, todo, design, docs, profile. Write-targets: vision only.\n\nUse \u0060agentera schema --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060vision\u0060 to locate the active installed schema; do not search Agentera directories manually. Existing vision artifacts provide repository-local examples of the shape. Vision adapts and expands them based on the conversation.\n\n### vision.yaml shape\n\n\u0060\u0060\u0060yaml\nproject_name: Project Name\nnorth_star: The dream. Not what the software does, but what it makes possible.\npersonas:\n - name: Persona name\n description: Their day, frustrations, and workflow.\nprinciples:\n - name: Principle name\n description: What this principle optimizes for and what it resists.\ndirection: Where this project is heading. Aspirational, not prescriptive.\nidentity:\n personality: adjective · adjective · adjective\n voice: How it communicates.\n emotional_register: What it feels like to use.\n naming: Convention or philosophy.\ntension: The hardest tension in the vision.\n\u0060\u0060\u0060\n\nEach principle MUST state a tradeoff direction (\"A over B when they conflict\"). Principles SHOULD name what each one actively prevents. Principles MUST NOT name specific libraries, modules, file paths, or implementation patterns — those belong in constraints or task scope. \"Tests over time-to-first-commit\" is a principle; \"use vitest\" is not.\n\nVision MUST be ambitious enough for months of development, personas concrete enough for \"who is this for?\" debates, direction clear enough to derive next steps, and identity vivid enough to guide decisions from error messages to module names. If DESIGN.md exists, the \u0060identity\u0060 section SHOULD cohere with the visual system declared there.\n\n---\n\n## Workflow phases (mode-split: Step 0 detect, then Create 1-5 or Refine 1-5; emit \u0060── step N/5: verb\u0060 before each step — verbs listed per mode below)\n\n### Step 0: Detect mode\n\nRun \u0060agentera state query vision --format json\u0060. If \u0060source.exists=false\u0060, proceed to **Create** mode. If \u0060source.exists=true\u0060, present the mode choice:\n\n> **Refine**: Evolve the existing vision based on what you've learned. Reads the current vision, the codebase state, and recent progress to propose informed updates.\n>\n> **Replace**: Start fresh with a deep brainstorm. Archives the current vision and creates a new one from scratch.\n\nIf **Refine**, skip to Refine mode. If **Replace**, archive the current vision artifact to \u0060.agentera/archive/vision-{date}.yaml\u0060, then proceed to Create mode (which will read the archive as corrective context in Step 1).\n\n### Pre-write self-audit (shared by Create Step 4 and Refine Step 4)\n\nBefore writing the vision artifact, run \u0060agentera check lint --artifact vision --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (≥1 concrete anchor per principle), and filler accumulation (banned patterns). Max 3 revision attempts. Flag with \u0060[post-audit-flagged]\u0060 if still failing after 3 attempts.\n\n---\n\n### Create mode\n\nSteps: explore, research, converse, audit, write.\n\n#### Step 1: Explore the codebase\n\nIf code exists, read deeply before asking questions. You arrive informed.\n\n1. Source state from \u0060agentera prime --context vision --format json\u0060's \u0060vision_startup_context\u0060 body — progress (latest cycle), health (grade + trajectory), todo (open counts by severity), profile (path; if \u0060stale=true\u0060, carry the caveat forward; do NOT invoke profile to refresh state during a vision cycle — prime covers only reading).\n2. For \u0060decisions\u0060: when its \u0060capability_context.startup.availability\u0060 row is \u0060deferred\u0060, run that row\u0027s exact \u0060detail_command\u0060; preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure rather than raw-reading historical decision context.\n3. For \u0060vision\u0060 itself when in Replace mode: read \u0060.agentera/archive/vision-{date}.yaml\u0060 (the artifact just archived in Step 0) for context on what to avoid.\n4. Map project structure: directory layout, key modules, entry points.\n5. Read dependency manifests: stack, libraries, what choices reveal.\n6. Read \u0060README.md\u0060 and \u0060AGENTS.md\u0060 (v3 canonical project guidance) if they exist.\n7. Read key source files to understand what the software does today.\n8. Read \u0060DESIGN.md\u0060 (project root) if it exists, for existing visual identity. The \u0060design\u0060 artifact family is \u0060deferred\u0060 in \u0060capability_context.startup.availability\u0060; use its exact \u0060detail_command\u0060 before a filesystem diagnostic.\n9. \u0060git log --oneline -30\u0060 for the recent story.\n\nSynthesize: \"The project does X, built with Y, moving toward Z. Strongest patterns: A. Gaps: B.\"\n\nGreenfield (no code exists)? Skip to Step 2.\n\n#### Step 2: Research the domain\n\nSearch for context grounding the vision in reality:\n\n1. **What exists**: similar tools, competing approaches, adjacent projects\n2. **State of the art**: recent developments, emerging patterns\n3. **What's missing**: suite gaps this project could fill\n4. **Who talks about it**: communities, forums, common frustrations\n\n3-5 targeted searches. Synthesize: \"The gap is X. The opportunity is Y.\"\n\n#### Step 3: The conversation\n\nEngage the user. Ask one question at a time through the native question tool (always include a \u0060Done\u0060 option). Adopt the conversational voice defined 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, run with a neutral operational stance; personality emerges from arc 5 below and is captured in the artifact.\n\nOperational stance: Socratic. Push past safe answers. Vision's job is to surface an inarticulate dream through challenge, not interview the user through a checklist.\n\nFollow a narrative arc, not a checklist. Adapt, but cover:\n\n1. **The dream**: \"Based on what I see in the codebase [and the domain research], here's where I think this wants to go: [synthesis]. But I bet you're thinking bigger than that. What does this project make possible if it wildly succeeds?\" Push beyond utility: \"It does X faster, but why does that matter? What can they do that they couldn't before?\"\n\n2. **The people**: \"Who reaches for this? Not 'developers,' a specific person. Their Tuesday morning. The frustration that makes them think 'I need something better'?\" Challenge abstract personas: \"'Data engineers': the one at a startup with 3 services, or the one at a bank with 3,000?\"\n\n3. **The principles**: \"What principles should guide every decision? What do you optimize for when you can't have everything? What do you actively resist?\" If decision profile exists, propose principles from it: \"Your profile says you value X over Y. Should that be a principle here?\"\n\n4. **The direction**: \"Given all of that, where is this heading? Not features. Capabilities. What kind of tool does this become in a year? What would surprise you?\" Also ask what it should NOT become: \"In five years you give up and move to a competitor — what killed it? Name that trait and exclude it here.\" Fold the answer into \u0060direction\u0060 as a scope boundary.\n\n5. **The identity**: \"If this product were a person, bold and direct, or quiet and precise? How does it talk? How should it feel to use? What emotion does a successful interaction leave?\" Also naming: \"Convention, cultural reference, philosophy?\" If DESIGN.md exists: \"Your visual system says X. Does the verbal identity match?\"\n\n6. **The tension**: \"What's the hardest tension in this vision? Where do the principles conflict? What will you have to give up to get what matters most?\"\n\n#### Step 4: Pre-write self-audit\n\nExercise the shared pre-write self-audit rule (declared above under Workflow phases).\n\n#### Step 5: Write the vision artifact\n\nSynthesize into an aspirational north star. **Tone**: evocative, not clinical. A rallying cry, not a requirements doc. **Structure**: follow template but adapt; add dimensions that emerged, omit sections that produced nothing interesting.\n\nPresent the draft to the user.\n\n\n---\n\n### Refine mode\n\nSteps: read, research, propose, audit, update.\n\n#### Step 1: Read the current state\n\n1. Run \u0060agentera state query vision --format json\u0060 for the current vision artifact's content and \u0060source.path\u0060.\n2. Source state from \u0060agentera prime --context vision --format json\u0060's \u0060vision_startup_context\u0060 body — progress, health, todo, profile (with same stale-case handling as Create Step 1).\n3. For decisions: when its \u0060capability_context.startup.availability\u0060 row is \u0060deferred\u0060, run that row\u0027s exact \u0060detail_command\u0060; carry \u0060compacted\u0060 / \u0060missing_fields\u0060 / \u0060caveats\u0060 / \u0060satisfaction.review_needed\u0060 pressure forward rather than reconstructing absent historical context.\n4. Read the codebase (same depth as Create Step 1 — rows 4–9: structure, manifests, README/AGENTS, source files, DESIGN.md if present, git log).\n5. Review the todo slice for recurring problems that suggest the vision needs adjustment.\n\n#### Step 2: Research updates\n\nSearch for domain developments since the vision was written: new tools, community shifts, things the user might not have seen.\n\n#### Step 3: Propose changes\n\nPresent your assessment:\n\n> Here's what's changed since the vision was written:\n>\n> - The project has built [A, B, C] (from progress state)\n> - Decision [X] shifted thinking about [Y] (from decisions state)\n> - The domain has moved: [Z] (from research)\n> - Recurring TODO items suggest: [W] (from todo state)\n>\n> I'd suggest updating:\n>\n> - [Section]: [what to change and why]\n>\n> What resonates? What's off?\n\nBrief conversation (2–4 exchanges) to refine proposed changes.\n\n#### Step 4: Pre-write self-audit\n\nExercise the shared pre-write self-audit rule (declared above under Workflow phases).\n\n#### Step 5: Update the vision artifact\n\nShow the updated vision as a diff (what changed and why).\n\n---\n\n## Safety rails\n\n<critical>\n- MUST NOT write the vision artifact without explicit user approval. Present drafts and get confirmation.\n- MUST NOT modify the vision artifact during a build cycle; changes belong in dedicated vision sessions.\n- MUST NOT produce a clinical, requirements-style document. The vision SHOULD inspire, not specify. If it reads like a PRD, rewrite it.\n- MUST NOT skip the codebase exploration (Step 1) when code exists.\n- MUST NOT propose a vision so vague it cannot guide autonomous development. \"Make a great tool\" is not a vision. \"Make it possible for a solo developer to ship production-grade systems by letting an AI team handle the parts they'd otherwise skip\" is.\n- MUST NOT dismiss the user's ambition. If they dream big, help them articulate it. If they think small, push them bigger. Never cap aspiration.\n- MUST NOT invoke profile to refresh PROFILE.md during a vision cycle. Profile state is read-only context for vision; refreshing mutates state outside vision's contract.\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⛥ vision · <status>\u0060 on its own line, followed by a one-sentence summary. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a \u0060▸\u0060 (VT15) bullet below the summary identifying what needs resolution. The exit marker is mandatory on every invocation.\n\n- **complete** (EX1): The vision artifact was written (Create/Replace mode) or updated (Refine mode) with explicit user approval; the vision is ambitious, concrete, and structured to sustain autonomous development.\n- **flagged** (EX2): The vision was produced but with weaknesses worth surfacing: the user settled for a less ambitious or less specific vision than the capability pushed for, key sections (personas, principles, direction) are thin due to limited conversation depth, or the vision has unresolved tensions with existing decision entries.\n- **stuck** (EX3): Cannot write the vision artifact because the user declined to approve the draft and no actionable revision direction was given, or codebase exploration failed in a way that would make the vision unreliable (e.g., inaccessible repo).\n- **waiting** (EX4): The user has not provided enough about the project's purpose or direction to write a meaningful vision, and the codebase (if any) does not provide sufficient signal to proceed without a conversation.\n\n---\n\n## Cross-capability integration\n\nVision is the strategic layer — the capability that defines where the project is going within the twelve-capability suite.\n\n### Vision produces what build consumes\n\nThe vision artifact drives build's work selection every cycle. When vision is installed, build defers to it; otherwise build runs its own quick brainstorm. Both produce the same \u0060.agentera/vision.yaml\u0060 shape — the capabilities are interchangeable at the artifact level.\n\n### Vision is informed by discuss\n\nDecision entries provide context for vision refinement: what choices have been made and why. When vision detects that decisions have shifted thinking away from the current vision, it surfaces this during refine mode.\n\n### Vision is informed by profile\n\nThe decision profile calibrates the vision conversation: what patterns the user values, what principles they've established across projects, what they resist. High-confidence entries (CS1-CS2, 70+) become proposed principles in the vision.\n\n### Vision is informed by research\n\nResearch that shifts the project's direction lands in the decisions artifact; vision picks up the captured insight during refine mode.\n\n### Vision is informed by audit\n\nThe health artifact tells vision what structural realities constrain the vision. A project with D-grade architecture may need a vision adjustment, or the vision may confirm that the architecture needs to change.\n\n### Vision reads design output\n\nVision reads DESIGN.md (in Create Step 1) for the project's visual identity. The \u0060identity\u0060 section SHOULD cohere with this visual system. Vision never writes DESIGN.md; design owns all writes.\n\n### Vision reads document output\n\nDOCS.md provides artifact path resolution for the canonical vision artifact and signals what documentation exists in the project.\n\n### Vision feeds plan\n\nWhen a new or refined vision changes the project's direction, plan can produce a plan to realign the codebase with the updated vision.\n\n### Invocation guidance (consumer perspective)\n\n**New project**: invoke ⛥ vision for deep creation of the vision artifact through codebase exploration, domain research, and aspirational conversation. Then ≡ plan to plan the first features (if complex), then ⧉ build to start building.\n\n**Existing project without a vision**: invoke ⛥ vision to read the codebase, understand what exists, then push the user to articulate where it should go.\n\n**Vision refinement**: invoke ⛥ vision to detect the existing vision artifact, offer refine mode, read progress and decisions since last update, propose informed changes.\n\n**Without vision installed**: build's built-in quick brainstorm creates a workable vision artifact. Vision adds depth and stewardship but is not required for the suite to function.\n"`);
|
|
5
4
|
export default instructions;
|
|
6
|
-
//# sourceMappingURL=instructions.js.map
|
package/dist/cli/appContext.js
CHANGED
|
@@ -76,6 +76,19 @@ export function modelPath(model, key) {
|
|
|
76
76
|
export function discoverSchemasDir(model = activeAppModel()) {
|
|
77
77
|
return path.join(modelPath(model, "skillRoot"), "schemas", "artifacts");
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Resolve the artifact-registry model backing a discovered schemas directory.
|
|
81
|
+
* Prefers a co-located model beside the skills root (so checkout/bundle/managed
|
|
82
|
+
* apps each load their own model); falls back to the production default when no
|
|
83
|
+
* co-located model is present.
|
|
84
|
+
*/
|
|
85
|
+
export function resolveRegistryModelPath(schemasDir) {
|
|
86
|
+
const root = path.resolve(schemasDir, "..", "..", "..", "..");
|
|
87
|
+
const candidate = path.join(root, "references", "artifacts", "artifact-registry-interface-model.yaml");
|
|
88
|
+
if (isFileSafe(candidate))
|
|
89
|
+
return candidate;
|
|
90
|
+
return registryModelPath();
|
|
91
|
+
}
|
|
79
92
|
const FIELD_SKIP = new Set([
|
|
80
93
|
"meta",
|
|
81
94
|
"GROUP_PREFIXES",
|
|
@@ -101,13 +114,8 @@ export function discoverFields(schema) {
|
|
|
101
114
|
return fields;
|
|
102
115
|
}
|
|
103
116
|
export function loadRegistryForSchemas(schemasDir) {
|
|
104
|
-
const root = path.resolve(schemasDir, "..", "..", "..", "..");
|
|
105
|
-
let modelPathArg = path.join(root, "references", "artifacts", "artifact-registry-interface-model.yaml");
|
|
106
|
-
if (!isFileSafe(modelPathArg)) {
|
|
107
|
-
modelPathArg = registryModelPath();
|
|
108
|
-
}
|
|
109
117
|
try {
|
|
110
|
-
return loadArtifactRegistry(schemasDir,
|
|
118
|
+
return loadArtifactRegistry(schemasDir, resolveRegistryModelPath(schemasDir));
|
|
111
119
|
}
|
|
112
120
|
catch (exc) {
|
|
113
121
|
process.stderr.write(`warning: failed to load artifact registry for schemas: ${exc.message}\n`);
|
|
@@ -222,4 +230,3 @@ export function artifactPath(info, schemaName) {
|
|
|
222
230
|
const record = info.record;
|
|
223
231
|
return resolveArtifactPathLocal(info.path, schemaName, record ?? null);
|
|
224
232
|
}
|
|
225
|
-
//# sourceMappingURL=appContext.js.map
|
package/dist/cli/argvalidate.js
CHANGED
|
@@ -4,7 +4,9 @@ import os from "node:os";
|
|
|
4
4
|
import { resolveProfileDirOverride, resolveXdgDataHome } from "../../core/envPaths.js";
|
|
5
5
|
import { expanduser } from "../../core/paths.js";
|
|
6
6
|
import { sourceProvenance, uniqueList } from "./shared.js";
|
|
7
|
-
|
|
7
|
+
import { STATE_FAMILY_FALLBACK_COMMANDS } from "./types.js";
|
|
8
|
+
import { preCutoverCommand } from "../preCutoverCommand.js";
|
|
9
|
+
export const BENCHMARK_CONTEXT_CMD = preCutoverCommand("prime --context optimize --format json");
|
|
8
10
|
export const BENCHMARK_LATEST_REPORT_LABEL = "startup_benchmark_latest_report";
|
|
9
11
|
export const BENCHMARK_HISTORY_LABEL = "startup_benchmark_history";
|
|
10
12
|
export const BENCHMARK_CONTEXT_SOURCE_LABELS = [BENCHMARK_LATEST_REPORT_LABEL, BENCHMARK_HISTORY_LABEL];
|
|
@@ -503,7 +505,7 @@ export function optimizeBenchmarkContext(capability) {
|
|
|
503
505
|
...(recommendation.caveats ?? []),
|
|
504
506
|
...(manualRefresh.caveats ?? []),
|
|
505
507
|
]);
|
|
506
|
-
const fallbackCommands = [
|
|
508
|
+
const fallbackCommands = [STATE_FAMILY_FALLBACK_COMMANDS.docs, preCutoverCommand("state query --list-artifacts --format json")];
|
|
507
509
|
return {
|
|
508
510
|
capability: "optimize",
|
|
509
511
|
benchmark_source: {
|
|
@@ -529,7 +531,7 @@ export function optimizeBenchmarkContext(capability) {
|
|
|
529
531
|
complete_for_benchmark_context: complete,
|
|
530
532
|
caveated: caveats.length > 0,
|
|
531
533
|
raw_artifact_reads_required: false,
|
|
532
|
-
raw_artifact_read_policy:
|
|
534
|
+
raw_artifact_read_policy: `Use this benchmark_context from \`${preCutoverCommand("prime --context optimize --format json")}\` first. ` +
|
|
533
535
|
"If incomplete, follow fallback_commands and manual_refresh before any last-resort direct latest-report.json, " +
|
|
534
536
|
"latest-report.md, or runs.jsonl diagnostic read.",
|
|
535
537
|
benchmark_state_families: [
|
|
@@ -561,4 +563,3 @@ export function optimizeBenchmarkContext(capability) {
|
|
|
561
563
|
},
|
|
562
564
|
};
|
|
563
565
|
}
|
|
564
|
-
//# sourceMappingURL=benchmark.js.map
|
|
@@ -3,7 +3,7 @@ import { documentCloseoutContext } from "./closeout.js";
|
|
|
3
3
|
import { auditEvidenceContext } from "./evidence.js";
|
|
4
4
|
import { optimizeBenchmarkContext } from "./benchmark.js";
|
|
5
5
|
import { buildExecutionContext } from "./build.js";
|
|
6
|
-
import { slimOrchestrationContext, slimEvidenceContext, slimCloseoutContext } from "./slim.js";
|
|
6
|
+
import { slimOrchestrationContext, slimEvidenceContext, slimCloseoutContext, slimBenchmarkContext } from "./slim.js";
|
|
7
7
|
export function slimBespokeContext(name, value) {
|
|
8
8
|
if (name === "orchestration_context")
|
|
9
9
|
return slimOrchestrationContext(value);
|
|
@@ -11,9 +11,11 @@ export function slimBespokeContext(name, value) {
|
|
|
11
11
|
return slimEvidenceContext(value);
|
|
12
12
|
if (name === "closeout_context")
|
|
13
13
|
return slimCloseoutContext(value);
|
|
14
|
+
if (name === "benchmark_context")
|
|
15
|
+
return slimBenchmarkContext(value);
|
|
14
16
|
return value;
|
|
15
17
|
}
|
|
16
|
-
export function bespokeCapabilityContexts(capabilityName, state) {
|
|
18
|
+
export function bespokeCapabilityContexts(capabilityName, state, buildRequest = null) {
|
|
17
19
|
// cast: orientation state fields are assembled from parsed .agentera artifacts;
|
|
18
20
|
// bespoke builders consume JsonObject/typed shapes for these state families.
|
|
19
21
|
const plan = state.plan;
|
|
@@ -25,12 +27,18 @@ export function bespokeCapabilityContexts(capabilityName, state) {
|
|
|
25
27
|
const bundle = state.app;
|
|
26
28
|
const todoItems = state.todo_items;
|
|
27
29
|
const schemas = state.schemas;
|
|
30
|
+
const projectRoot = String(state.project_root);
|
|
31
|
+
const history = state.history && typeof state.history === "object" && !Array.isArray(state.history)
|
|
32
|
+
? state.history
|
|
33
|
+
: {};
|
|
34
|
+
const decisionHistory = history.decisions && typeof history.decisions === "object" && !Array.isArray(history.decisions)
|
|
35
|
+
? history.decisions
|
|
36
|
+
: {};
|
|
28
37
|
return {
|
|
29
38
|
orchestration_context: orchestrationContext(capabilityName, plan, progress, health, todoItems, docs, profile, nextAction),
|
|
30
|
-
closeout_context: documentCloseoutContext(capabilityName, schemas, plan, progress, todoItems, docs, profile, bundle),
|
|
31
|
-
evidence_context: auditEvidenceContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle),
|
|
39
|
+
closeout_context: documentCloseoutContext(capabilityName, schemas, plan, progress, todoItems, docs, profile, bundle, decisionHistory, projectRoot),
|
|
40
|
+
evidence_context: auditEvidenceContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle, decisionHistory),
|
|
32
41
|
benchmark_context: optimizeBenchmarkContext(capabilityName),
|
|
33
|
-
execution_context: buildExecutionContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle),
|
|
42
|
+
execution_context: buildExecutionContext(capabilityName, schemas, plan, progress, health, todoItems, docs, profile, bundle, projectRoot, buildRequest),
|
|
34
43
|
};
|
|
35
44
|
}
|
|
36
|
-
//# sourceMappingURL=bespoke.js.map
|
|
@@ -3,20 +3,47 @@ import { capabilityContext } from "./contract.js";
|
|
|
3
3
|
import { sourceProvenance, uniqueList, hasRecordedValue, taskRef } from "./shared.js";
|
|
4
4
|
import { closeoutChangelogBoundary, orchestrationTaskSummary, planContextField, buildArtifactUpdateRequirements, buildPlanCompletionSweep, buildScopeBoundary, selectEvidenceTarget, taskByRef, } from "./planState.js";
|
|
5
5
|
import { progressVerificationSummary } from "./progress.js";
|
|
6
|
-
|
|
6
|
+
import { STATE_FAMILY_FALLBACK_COMMANDS, STATE_FAMILY_LIST_COMMANDS } from "./types.js";
|
|
7
|
+
import { planLifecycleState } from "../planLifecycleState.js";
|
|
8
|
+
import { discoverProjectVerification } from "./projectVerification.js";
|
|
9
|
+
import { deferredStartupFamilies } from "./startupAggregation.js";
|
|
10
|
+
import { preCutoverCommand } from "../preCutoverCommand.js";
|
|
11
|
+
import { progressWritePolicy } from "../../state/progressWritePolicy.js";
|
|
12
|
+
const TRANSIENT_BUILD_INPUT_COMMAND = preCutoverCommand("prime --context build --input <file|-> --format json");
|
|
13
|
+
const TRANSIENT_BUILD_STDIN_COMMAND = preCutoverCommand("prime --context build --input - --format json");
|
|
14
|
+
function transientSourceProvenance(request, field) {
|
|
15
|
+
return {
|
|
16
|
+
source_family: "transient_build_execution_request",
|
|
17
|
+
command: TRANSIENT_BUILD_INPUT_COMMAND,
|
|
18
|
+
field,
|
|
19
|
+
schema_version: request.schema_version,
|
|
20
|
+
source_kind: request.source.kind,
|
|
21
|
+
persisted: false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function buildExecutionContext(capability, schemas, plan, progress, health, todoItems, docs, profile, bundle, projectRoot, buildRequest = null) {
|
|
7
25
|
if (capability !== "build")
|
|
8
26
|
return null;
|
|
9
27
|
const capabilityContract = capabilityContext(capability) ?? {};
|
|
10
|
-
const
|
|
28
|
+
const lifecycle = planLifecycleState(plan);
|
|
29
|
+
const tasks = lifecycle.current_plan_degraded === true
|
|
30
|
+
? []
|
|
31
|
+
: asList(plan.tasks).filter((t) => t && typeof t === "object" && !Array.isArray(t));
|
|
11
32
|
const target = selectEvidenceTarget(plan);
|
|
12
33
|
const selected = taskByRef(plan, (target && typeof target === "object" ? target.task : null));
|
|
13
|
-
const acceptance =
|
|
34
|
+
const acceptance = buildRequest?.acceptance
|
|
35
|
+
?? (selected && typeof selected === "object" ? asList(selected.acceptance) : []);
|
|
14
36
|
const progressVerification = progressVerificationSummary(progress);
|
|
15
|
-
const changelogBoundary = closeoutChangelogBoundary(
|
|
37
|
+
const changelogBoundary = closeoutChangelogBoundary(projectRoot, plan);
|
|
16
38
|
const sweep = buildPlanCompletionSweep(plan);
|
|
39
|
+
const archiveOnly = Boolean(plan.exists) && plan.active === false;
|
|
17
40
|
let mode;
|
|
18
|
-
if (plan.complete_plan)
|
|
41
|
+
if (plan.active === true && plan.complete_plan)
|
|
19
42
|
mode = "completed_plan_sweep";
|
|
43
|
+
else if (buildRequest !== null && plan.active !== true)
|
|
44
|
+
mode = "no_plan";
|
|
45
|
+
else if (archiveOnly)
|
|
46
|
+
mode = "archive_only_history";
|
|
20
47
|
else if (!plan.exists || tasks.length === 0)
|
|
21
48
|
mode = "no_plan";
|
|
22
49
|
else if (target.status === "selected" && selected !== null)
|
|
@@ -25,43 +52,42 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
25
52
|
mode = "blocked_or_dependency_unready";
|
|
26
53
|
let stateCaveats = [];
|
|
27
54
|
let fallbackCommands = [];
|
|
28
|
-
for (const family of (capabilityContract
|
|
29
|
-
stateCaveats.push(`${family}
|
|
55
|
+
for (const family of deferredStartupFamilies(capabilityContract)) {
|
|
56
|
+
stateCaveats.push(`${family} detail is deferred from prime --context startup.`);
|
|
30
57
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fallbackCommands.push("agentera state plan --format json");
|
|
58
|
+
if (lifecycle.status === "degraded") {
|
|
59
|
+
stateCaveats.push(...(lifecycle.caveats ?? []));
|
|
60
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.plan);
|
|
35
61
|
}
|
|
36
62
|
if (mode === "blocked_or_dependency_unready") {
|
|
37
63
|
stateCaveats.push("No dependency-ready pending plan task is available in CLI plan state.");
|
|
38
|
-
fallbackCommands.push(
|
|
64
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.plan);
|
|
39
65
|
}
|
|
40
66
|
if (mode === "plan_driven" && acceptance.length === 0) {
|
|
41
67
|
stateCaveats.push("Selected Build task has no acceptance criteria in CLI plan state.");
|
|
42
|
-
fallbackCommands.push(
|
|
68
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.plan);
|
|
43
69
|
}
|
|
44
70
|
if (!progress.exists) {
|
|
45
71
|
stateCaveats.push("progress state is unavailable; progress logging context is incomplete.");
|
|
46
|
-
fallbackCommands.push(
|
|
72
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.progress);
|
|
47
73
|
}
|
|
48
74
|
if (!health.exists) {
|
|
49
75
|
stateCaveats.push("health state is unavailable or incomplete.");
|
|
50
|
-
fallbackCommands.push(
|
|
76
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.health);
|
|
51
77
|
}
|
|
52
78
|
if (!docs.exists) {
|
|
53
79
|
stateCaveats.push("docs mapping state is unavailable or incomplete.");
|
|
54
|
-
fallbackCommands.push(
|
|
80
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.docs);
|
|
55
81
|
}
|
|
56
82
|
if (todoItems.length === 0) {
|
|
57
83
|
stateCaveats.push("todo state has no open entries in prime --context response; absence may mean none open or unavailable.");
|
|
58
|
-
fallbackCommands.push(
|
|
84
|
+
fallbackCommands.push(STATE_FAMILY_FALLBACK_COMMANDS.todo);
|
|
59
85
|
}
|
|
60
86
|
if (changelogBoundary.status !== "available") {
|
|
61
87
|
stateCaveats.push(...(changelogBoundary.caveats ?? []));
|
|
62
|
-
fallbackCommands.push("
|
|
88
|
+
fallbackCommands.push(preCutoverCommand("state query changelog --format json"));
|
|
63
89
|
}
|
|
64
|
-
if (profile.status !== "
|
|
90
|
+
if (profile.status !== "valid") {
|
|
65
91
|
stateCaveats.push("profile-derived state is unavailable in prime --context response.");
|
|
66
92
|
}
|
|
67
93
|
else if (profile.stale === true) {
|
|
@@ -70,48 +96,94 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
70
96
|
if (bundle.status !== "up_to_date") {
|
|
71
97
|
stateCaveats.push("Agentera app files are not up to date; this is a caveat, not approval to repair or update app files.");
|
|
72
98
|
}
|
|
73
|
-
const scopeBoundary =
|
|
99
|
+
const scopeBoundary = buildRequest === null
|
|
100
|
+
? buildScopeBoundary(plan, selected)
|
|
101
|
+
: {
|
|
102
|
+
artifact_families: ["progress", "todo", "docs", "health", "changelog", "decisions", "vision", "profile", "design"],
|
|
103
|
+
explicit_scope: buildRequest.scope,
|
|
104
|
+
source_scope: {
|
|
105
|
+
status: "unspecified",
|
|
106
|
+
explicit_paths: [],
|
|
107
|
+
policy: "The transient scope defines work intent only; no source-file allowlist or exclusion is inferred from its text.",
|
|
108
|
+
},
|
|
109
|
+
source_provenance: transientSourceProvenance(buildRequest, "scope"),
|
|
110
|
+
};
|
|
74
111
|
const sourceScope = scopeBoundary.source_scope && typeof scopeBoundary.source_scope === "object" && !Array.isArray(scopeBoundary.source_scope)
|
|
75
112
|
? scopeBoundary.source_scope
|
|
76
113
|
: {};
|
|
77
114
|
if (sourceScope.status === "unspecified") {
|
|
78
115
|
stateCaveats.push("source-file scope is unspecified; no allowed or prohibited source paths were inferred.");
|
|
79
116
|
}
|
|
117
|
+
const noCurrentPlan = plan.active !== true && lifecycle.status !== "degraded";
|
|
118
|
+
if (noCurrentPlan) {
|
|
119
|
+
fallbackCommands = fallbackCommands.filter((command) => command !== STATE_FAMILY_FALLBACK_COMMANDS.plan);
|
|
120
|
+
if (buildRequest === null) {
|
|
121
|
+
stateCaveats.push("Explicit no-plan scope and acceptance are required before Build can execute without a current plan.");
|
|
122
|
+
fallbackCommands.push(TRANSIENT_BUILD_STDIN_COMMAND);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
80
125
|
fallbackCommands = uniqueList(fallbackCommands);
|
|
81
126
|
stateCaveats = uniqueList(stateCaveats);
|
|
82
127
|
const requiredState = {
|
|
83
|
-
work_selection: mode === "plan_driven" || mode === "completed_plan_sweep",
|
|
128
|
+
work_selection: mode === "plan_driven" || mode === "completed_plan_sweep" || buildRequest !== null,
|
|
84
129
|
acceptance_criteria: mode === "completed_plan_sweep" || acceptance.length > 0,
|
|
85
130
|
artifact_update_requirements: Boolean(docs.exists),
|
|
86
131
|
progress_logging_requirements: progressVerification.status === "available" || (progressVerification.caveats ?? []).length > 0,
|
|
87
132
|
changelog_boundary: changelogBoundary.status === "available",
|
|
88
133
|
scope_boundary: true,
|
|
89
134
|
safety_boundaries: true,
|
|
135
|
+
plan_state_healthy: lifecycle.status !== "degraded",
|
|
90
136
|
};
|
|
91
137
|
const missingRequired = Object.entries(requiredState).filter(([, present]) => !present).map(([name]) => name);
|
|
92
138
|
const caveated = stateCaveats.length > 0;
|
|
93
|
-
const complete = (mode === "plan_driven" || mode === "completed_plan_sweep"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
work_selection: {
|
|
139
|
+
const complete = (mode === "plan_driven" || mode === "completed_plan_sweep" || buildRequest !== null)
|
|
140
|
+
&& missingRequired.length === 0;
|
|
141
|
+
const workSelection = buildRequest === null
|
|
142
|
+
? {
|
|
98
143
|
status: target.status,
|
|
99
144
|
selection_reason: target.selection_reason,
|
|
100
145
|
task: selected && typeof selected === "object" ? taskRef(selected) : null,
|
|
101
146
|
source_provenance: target.source_provenance,
|
|
102
147
|
caveats: target.caveats ?? [],
|
|
103
|
-
}
|
|
148
|
+
}
|
|
149
|
+
: {
|
|
150
|
+
status: "selected",
|
|
151
|
+
selection_reason: "explicit_no_plan_scope",
|
|
152
|
+
task: null,
|
|
153
|
+
scope: buildRequest.scope,
|
|
154
|
+
source_provenance: transientSourceProvenance(buildRequest, "scope"),
|
|
155
|
+
caveats: [],
|
|
156
|
+
};
|
|
157
|
+
const artifactUpdateRequirements = buildArtifactUpdateRequirements(plan, docs);
|
|
158
|
+
if (buildRequest !== null) {
|
|
159
|
+
artifactUpdateRequirements.required_families = ["todo", "changelog"];
|
|
160
|
+
artifactUpdateRequirements.conditional_families = ["progress"];
|
|
161
|
+
artifactUpdateRequirements.plan_status_update_required = false;
|
|
162
|
+
artifactUpdateRequirements.policy = "Transient no-plan work does not create, mutate, or require plan state.";
|
|
163
|
+
}
|
|
164
|
+
const progressRequirement = archiveOnly
|
|
165
|
+
? "none"
|
|
166
|
+
: mode === "completed_plan_sweep"
|
|
167
|
+
? "required"
|
|
168
|
+
: "conditional";
|
|
169
|
+
return {
|
|
170
|
+
capability: "build",
|
|
171
|
+
mode,
|
|
172
|
+
work_selection: workSelection,
|
|
104
173
|
plan_task: selected && typeof selected === "object" ? orchestrationTaskSummary(selected) : null,
|
|
105
174
|
acceptance_criteria: {
|
|
106
175
|
status: acceptance.length > 0 ? "available" : "incomplete",
|
|
107
176
|
items: acceptance,
|
|
108
177
|
count: acceptance.length,
|
|
109
|
-
source_provenance:
|
|
178
|
+
source_provenance: buildRequest === null
|
|
179
|
+
? sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "entries.acceptance")
|
|
180
|
+
: transientSourceProvenance(buildRequest, "acceptance"),
|
|
110
181
|
},
|
|
111
182
|
constraints: {
|
|
112
|
-
plan_constraints_present: hasRecordedValue(planContextField(plan, "constraints")),
|
|
113
|
-
plan_constraints_summary:
|
|
114
|
-
"run the plan CLI fallback only if full wording is needed."
|
|
183
|
+
plan_constraints_present: buildRequest === null && hasRecordedValue(planContextField(plan, "constraints")),
|
|
184
|
+
plan_constraints_summary: buildRequest === null
|
|
185
|
+
? "Plan constraints are represented here as structured safety and fallback policy; run the plan CLI fallback only if full wording is needed."
|
|
186
|
+
: "Transient no-plan input supplies scope and acceptance only; no plan constraints are inferred.",
|
|
115
187
|
protected_actions: [
|
|
116
188
|
"no profile refresh",
|
|
117
189
|
"no installed app refresh",
|
|
@@ -121,29 +193,33 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
121
193
|
"no commit/push/tag/publication without explicit approval",
|
|
122
194
|
],
|
|
123
195
|
unsupported_cli_command_policy: "Do not introduce capability-name or slash-alias CLI commands for Build.",
|
|
124
|
-
source_provenance:
|
|
196
|
+
source_provenance: buildRequest === null
|
|
197
|
+
? sourceProvenance("plan", STATE_FAMILY_FALLBACK_COMMANDS.plan, "summary.constraints")
|
|
198
|
+
: transientSourceProvenance(buildRequest, "scope"),
|
|
125
199
|
},
|
|
126
200
|
scope_boundary: scopeBoundary,
|
|
127
201
|
verification_expectations: {
|
|
128
202
|
latest_progress_verification: progressVerification,
|
|
129
|
-
|
|
130
|
-
source_provenance: sourceProvenance("plan", "agentera plan --format json", "entries.acceptance"),
|
|
203
|
+
...discoverProjectVerification(projectRoot),
|
|
131
204
|
},
|
|
132
|
-
artifact_update_requirements:
|
|
205
|
+
artifact_update_requirements: artifactUpdateRequirements,
|
|
133
206
|
progress_logging_requirements: {
|
|
134
|
-
|
|
135
|
-
|
|
207
|
+
requirement: progressRequirement,
|
|
208
|
+
verified_field_mandatory_when_appended: true,
|
|
209
|
+
policy: progressWritePolicy(),
|
|
210
|
+
guidance_command: preCutoverCommand("state progress explain --verb append --format json"),
|
|
136
211
|
latest_progress_verification_pointer: progressVerification.latest_progress_verification_pointer ?? null,
|
|
137
|
-
source_provenance: sourceProvenance("progress",
|
|
212
|
+
source_provenance: sourceProvenance("progress", STATE_FAMILY_LIST_COMMANDS.progress),
|
|
138
213
|
},
|
|
139
214
|
changelog_boundary: changelogBoundary,
|
|
140
215
|
git_boundary: {
|
|
141
216
|
remote_push_allowed: false,
|
|
142
217
|
commit_allowed_only_with_explicit_user_request: true,
|
|
143
218
|
tag_or_publication_allowed: false,
|
|
144
|
-
source_provenance: sourceProvenance("execution_context", "
|
|
219
|
+
source_provenance: sourceProvenance("execution_context", preCutoverCommand("prime --context build --format json"), "git_boundary"),
|
|
145
220
|
},
|
|
146
221
|
plan_completion_sweep: sweep,
|
|
222
|
+
plan_lifecycle_state: lifecycle,
|
|
147
223
|
state_family_caveats: stateCaveats,
|
|
148
224
|
fallback_commands: fallbackCommands,
|
|
149
225
|
source_contract: {
|
|
@@ -152,8 +228,6 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
152
228
|
raw_artifact_reads_required: false,
|
|
153
229
|
raw_artifact_read_policy: "Use this execution_context and included status state first. Run listed routine/query CLI fallback commands " +
|
|
154
230
|
"for missing or incomplete execution state; raw artifact reads are last-resort diagnostics, not normal Build startup behavior.",
|
|
155
|
-
included_state_families: capabilityContract.included_state_families ?? [],
|
|
156
|
-
missing_state_families: capabilityContract.missing_state_families ?? [],
|
|
157
231
|
required_execution_state: requiredState,
|
|
158
232
|
missing_required_execution_state: missingRequired,
|
|
159
233
|
fallback_commands: fallbackCommands,
|
|
@@ -169,9 +243,9 @@ export function buildExecutionContext(capability, schemas, plan, progress, healt
|
|
|
169
243
|
"scope boundary",
|
|
170
244
|
"read-only plan completion sweep metadata",
|
|
171
245
|
"truthful completeness metadata",
|
|
246
|
+
"plan lifecycle state",
|
|
172
247
|
],
|
|
173
248
|
deferred: [],
|
|
174
249
|
},
|
|
175
250
|
};
|
|
176
251
|
}
|
|
177
|
-
//# sourceMappingURL=build.js.map
|