agentera 3.0.0-dev.6 → 3.0.0-dev.7
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/bundle/extract-corpus-parity.json +23 -0
- package/bundle/references/adapters/cursor.md +10 -9
- package/bundle/references/adapters/opencode.md +26 -26
- package/bundle/references/adapters/runtime-adapter-characterization.md +1 -1
- package/bundle/references/adapters/runtime-adapter-registry.yaml +16 -10
- package/bundle/references/adapters/runtime-feature-parity.md +2 -2
- package/bundle/references/analysis/benchmark.md +1 -1
- package/bundle/references/analysis/startup-measurement-contract.yaml +7 -7
- package/bundle/references/artifacts/artifact-registry-interface-model.yaml +4 -3
- package/bundle/references/cli/agent-ready-state-contract.yaml +6 -6
- package/bundle/references/cli/app-lifecycle-vocabulary.yaml +4 -4
- package/bundle/references/cli/capability-tool-classification.yaml +12 -12
- package/bundle/references/cli/coexistence-probe.yaml +4 -0
- package/bundle/references/cli/parity-expected-actual-template.md +30 -0
- package/bundle/references/cli/routing-execution-vocabulary.yaml +6 -6
- package/bundle/references/cli/routing-model.md +96 -0
- package/bundle/references/cli/trigger-schema-enrichment.md +136 -0
- package/bundle/references/cli/update-channels.yaml +16 -1
- package/bundle/references/cli/upgrade-repair-wording.md +17 -3
- package/bundle/references/cli/vocabulary-index.yaml +17 -12
- package/bundle/references/cli/vocabulary.md +314 -309
- package/bundle/registry.json +13 -13
- package/bundle/skills/agentera/.claude-plugin/plugin.json +13 -13
- package/bundle/skills/agentera/SKILL.md +99 -415
- package/bundle/skills/agentera/agents/audit.toml +6 -0
- package/bundle/skills/agentera/agents/build.toml +6 -0
- package/bundle/skills/agentera/agents/design.toml +6 -0
- package/bundle/skills/agentera/agents/{planera.toml → discuss.toml} +3 -3
- package/bundle/skills/agentera/agents/{resonera.toml → document.toml} +3 -3
- package/bundle/skills/agentera/agents/{optimera.toml → optimize.toml} +2 -2
- package/bundle/skills/agentera/agents/orchestrate.toml +6 -0
- package/bundle/skills/agentera/agents/plan.toml +6 -0
- package/bundle/skills/agentera/agents/profile.toml +6 -0
- package/bundle/skills/agentera/agents/research.toml +6 -0
- package/bundle/skills/agentera/agents/status.toml +6 -0
- package/bundle/skills/agentera/agents/vision.toml +6 -0
- package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/artifacts.yaml +10 -10
- package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/triggers.yaml +15 -6
- package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/validation.yaml +9 -9
- package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/artifacts.yaml +11 -11
- package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/triggers.yaml +13 -3
- package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/validation.yaml +7 -7
- package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/artifacts.yaml +6 -6
- package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/triggers.yaml +15 -3
- package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/validation.yaml +5 -5
- package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/artifacts.yaml +6 -6
- package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/triggers.yaml +11 -3
- package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/validation.yaml +4 -4
- package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/artifacts.yaml +10 -10
- package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/triggers.yaml +14 -3
- package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/validation.yaml +8 -8
- package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/artifacts.yaml +8 -8
- package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/triggers.yaml +11 -3
- package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/validation.yaml +7 -7
- package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/artifacts.yaml +10 -10
- package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/triggers.yaml +16 -3
- package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/validation.yaml +27 -27
- package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/artifacts.yaml +8 -8
- package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/triggers.yaml +15 -3
- package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/validation.yaml +3 -3
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/artifacts.yaml +2 -2
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/exit.yaml +2 -1
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/triggers.yaml +7 -3
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/artifacts.yaml +5 -5
- package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/triggers.yaml +9 -3
- package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/{hej → status}/schemas/artifacts.yaml +14 -11
- package/bundle/skills/agentera/capabilities/{hej → status}/schemas/triggers.yaml +10 -4
- package/bundle/skills/agentera/capabilities/{hej → status}/schemas/validation.yaml +5 -5
- package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/artifacts.yaml +8 -8
- package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/triggers.yaml +17 -3
- package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/validation.yaml +7 -7
- package/bundle/skills/agentera/capability_schema_contract.yaml +178 -34
- package/bundle/skills/agentera/protocol.yaml +29 -29
- package/bundle/skills/agentera/references/contract.md +328 -319
- package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +4 -4
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +9 -9
- package/bundle/skills/agentera/schemas/artifacts/design.yaml +4 -4
- package/bundle/skills/agentera/schemas/artifacts/docs.yaml +8 -7
- package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +5 -5
- package/bundle/skills/agentera/schemas/artifacts/health.yaml +5 -5
- package/bundle/skills/agentera/schemas/artifacts/objective.yaml +4 -4
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +5 -5
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +5 -5
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +40 -35
- package/bundle/skills/agentera/schemas/artifacts/vision.yaml +3 -3
- package/dist/analytics/extractCorpus/cli.js +49 -1
- package/dist/analytics/extractCorpus/cli.js.map +1 -1
- package/dist/analytics/extractCorpus/copilotSessions.js +47 -5
- package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -1
- package/dist/analytics/extractCorpus/core.js +19 -12
- package/dist/analytics/extractCorpus/core.js.map +1 -1
- package/dist/analytics/extractCorpus/corpus.js +26 -13
- package/dist/analytics/extractCorpus/corpus.js.map +1 -1
- package/dist/analytics/extractCorpus/coverageAudit.js +261 -0
- package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -0
- package/dist/analytics/extractCorpus/cursorSessions.js +6 -3
- package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -1
- package/dist/analytics/extractCorpus/extractCorpusParity.js +105 -0
- package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -0
- package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -1
- package/dist/analytics/extractCorpus/index.js +3 -0
- package/dist/analytics/extractCorpus/index.js.map +1 -1
- package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -1
- package/dist/analytics/extractCorpus/sqliteCaps.js +44 -0
- package/dist/analytics/extractCorpus/sqliteCaps.js.map +1 -0
- package/dist/analytics/extractCorpus/sqliteSessions.js +98 -5
- package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -1
- package/dist/analytics/usageStats.js +19 -19
- package/dist/analytics/usageStats.js.map +1 -1
- package/dist/capabilities/audit/instructions.js +6 -0
- package/dist/capabilities/audit/instructions.js.map +1 -0
- package/dist/capabilities/build/instructions.js +6 -0
- package/dist/capabilities/build/instructions.js.map +1 -0
- package/dist/capabilities/design/instructions.js +5 -0
- package/dist/capabilities/design/instructions.js.map +1 -0
- package/dist/capabilities/discuss/instructions.js +6 -0
- package/dist/capabilities/discuss/instructions.js.map +1 -0
- package/dist/capabilities/document/instructions.js +6 -0
- package/dist/capabilities/document/instructions.js.map +1 -0
- package/dist/capabilities/index.js +24 -24
- package/dist/capabilities/index.js.map +1 -1
- package/dist/capabilities/inspirera/instructions.js +1 -1
- package/dist/capabilities/inspirera/instructions.js.map +1 -1
- package/dist/capabilities/optimize/instructions.js +6 -0
- package/dist/capabilities/optimize/instructions.js.map +1 -0
- package/dist/capabilities/orchestrate/instructions.js +6 -0
- package/dist/capabilities/orchestrate/instructions.js.map +1 -0
- package/dist/capabilities/plan/instructions.js +6 -0
- package/dist/capabilities/plan/instructions.js.map +1 -0
- package/dist/capabilities/planera/instructions.js +1 -1
- package/dist/capabilities/planera/instructions.js.map +1 -1
- package/dist/capabilities/profile/instructions.js +6 -0
- package/dist/capabilities/profile/instructions.js.map +1 -0
- package/dist/capabilities/profilera/instructions.js +1 -1
- package/dist/capabilities/profilera/instructions.js.map +1 -1
- package/dist/capabilities/realisera/instructions.js +1 -1
- package/dist/capabilities/realisera/instructions.js.map +1 -1
- package/dist/capabilities/research/instructions.js +6 -0
- package/dist/capabilities/research/instructions.js.map +1 -0
- package/dist/capabilities/resonera/instructions.js +1 -1
- package/dist/capabilities/resonera/instructions.js.map +1 -1
- package/dist/capabilities/status/instructions.js +6 -0
- package/dist/capabilities/status/instructions.js.map +1 -0
- package/dist/capabilities/vision/instructions.js +6 -0
- package/dist/capabilities/vision/instructions.js.map +1 -0
- package/dist/capabilities/visionera/instructions.js +1 -1
- package/dist/capabilities/visionera/instructions.js.map +1 -1
- package/dist/capabilities/visualisera/instructions.js +3 -4
- package/dist/capabilities/visualisera/instructions.js.map +1 -1
- package/dist/cli/appContext.js +16 -17
- package/dist/cli/appContext.js.map +1 -1
- package/dist/cli/capabilityContext/benchmark.js +23 -16
- package/dist/cli/capabilityContext/benchmark.js.map +1 -1
- package/dist/cli/capabilityContext/bespoke.js +20 -9
- package/dist/cli/capabilityContext/bespoke.js.map +1 -1
- package/dist/cli/capabilityContext/build.js +177 -0
- package/dist/cli/capabilityContext/build.js.map +1 -0
- package/dist/cli/capabilityContext/closeout.js +11 -11
- package/dist/cli/capabilityContext/closeout.js.map +1 -1
- package/dist/cli/capabilityContext/contract.js +24 -22
- package/dist/cli/capabilityContext/contract.js.map +1 -1
- package/dist/cli/capabilityContext/evidence.js +35 -25
- package/dist/cli/capabilityContext/evidence.js.map +1 -1
- package/dist/cli/capabilityContext/index.js +1 -1
- package/dist/cli/capabilityContext/index.js.map +1 -1
- package/dist/cli/capabilityContext/orchestration.js +8 -8
- package/dist/cli/capabilityContext/orchestration.js.map +1 -1
- package/dist/cli/capabilityContext/planState.js +4 -4
- package/dist/cli/capabilityContext/planState.js.map +1 -1
- package/dist/cli/capabilityContext/progress.js +9 -2
- package/dist/cli/capabilityContext/progress.js.map +1 -1
- package/dist/cli/capabilityContext/realisera.js +21 -21
- package/dist/cli/capabilityContext/realisera.js.map +1 -1
- package/dist/cli/capabilityContext/shared.js +1 -1
- package/dist/cli/capabilityContext/shared.js.map +1 -1
- package/dist/cli/capabilityContext/slim.js +4 -2
- package/dist/cli/capabilityContext/slim.js.map +1 -1
- package/dist/cli/capabilityContext/startup.js +23 -18
- package/dist/cli/capabilityContext/startup.js.map +1 -1
- package/dist/cli/capabilityContext/types.js +20 -23
- package/dist/cli/capabilityContext/types.js.map +1 -1
- package/dist/cli/capabilityContext.js +1 -1
- package/dist/cli/capabilityContext.js.map +1 -1
- package/dist/cli/commands/appHome.js +23 -0
- package/dist/cli/commands/appHome.js.map +1 -0
- package/dist/cli/commands/capability.js +2 -2
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/compact.js.map +1 -1
- package/dist/cli/commands/doctor.js +9 -107
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/prime/bundleStatus.js +140 -0
- package/dist/cli/commands/prime/bundleStatus.js.map +1 -0
- package/dist/cli/commands/prime/collectOrientationState.js +156 -0
- package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
- package/dist/cli/commands/prime/orientationOutput.js +210 -0
- package/dist/cli/commands/prime/orientationOutput.js.map +1 -0
- package/dist/cli/commands/prime/routeOutput.js +50 -0
- package/dist/cli/commands/prime/routeOutput.js.map +1 -0
- package/dist/cli/commands/prime/types.js +2 -0
- package/dist/cli/commands/prime/types.js.map +1 -0
- package/dist/cli/commands/prime/v1Migration.js +39 -0
- package/dist/cli/commands/prime/v1Migration.js.map +1 -0
- package/dist/cli/commands/prime.js +11 -554
- package/dist/cli/commands/prime.js.map +1 -1
- package/dist/cli/commands/query.js +4 -1
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/commands/report.js +17 -9
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/schema.js +23 -18
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/state/decisions.js +11 -5
- package/dist/cli/commands/state/decisions.js.map +1 -1
- package/dist/cli/commands/state/docs.js +8 -4
- package/dist/cli/commands/state/docs.js.map +1 -1
- package/dist/cli/commands/state/experiments.js +1 -0
- package/dist/cli/commands/state/experiments.js.map +1 -1
- package/dist/cli/commands/state/health.js +3 -1
- package/dist/cli/commands/state/health.js.map +1 -1
- package/dist/cli/commands/state/objective.js +1 -0
- package/dist/cli/commands/state/objective.js.map +1 -1
- package/dist/cli/commands/state/plan.js +2 -1
- package/dist/cli/commands/state/plan.js.map +1 -1
- package/dist/cli/commands/state/progress.js +1 -1
- package/dist/cli/commands/state/shared.js.map +1 -1
- package/dist/cli/commands/state/todo.js +1 -1
- package/dist/cli/commands/state/todo.js.map +1 -1
- package/dist/cli/commands/validate.js +21 -85
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/commands/verify.js +1 -1
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/contracts/bundleStatus.js +2 -0
- package/dist/cli/contracts/bundleStatus.js.map +1 -0
- package/dist/cli/contracts/orientationState.js +2 -0
- package/dist/cli/contracts/orientationState.js.map +1 -0
- package/dist/cli/dispatch/argvParser.js +33 -0
- package/dist/cli/dispatch/argvParser.js.map +1 -0
- package/dist/cli/dispatch/check.js +19 -19
- package/dist/cli/dispatch/check.js.map +1 -1
- package/dist/cli/dispatch/commands.js +27 -0
- package/dist/cli/dispatch/commands.js.map +1 -0
- package/dist/cli/dispatch/index.js +6 -1
- package/dist/cli/dispatch/index.js.map +1 -1
- package/dist/cli/dispatch/lifecycle.js +160 -55
- package/dist/cli/dispatch/lifecycle.js.map +1 -1
- package/dist/cli/dispatch/prime.js +31 -27
- package/dist/cli/dispatch/prime.js.map +1 -1
- package/dist/cli/dispatch/state.js +11 -16
- package/dist/cli/dispatch/state.js.map +1 -1
- package/dist/cli/help.js +41 -6
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/orientation/attention.js +61 -0
- package/dist/cli/orientation/attention.js.map +1 -0
- package/dist/cli/orientation/corpusCoverage.js +71 -0
- package/dist/cli/orientation/corpusCoverage.js.map +1 -0
- package/dist/cli/orientation.js +128 -77
- package/dist/cli/orientation.js.map +1 -1
- package/dist/cli/prime-blob.js +1 -1
- package/dist/cli/startupCompletenessContract.js +56 -0
- package/dist/cli/startupCompletenessContract.js.map +1 -0
- package/dist/cli/stateQuery.js +9 -2
- package/dist/cli/stateQuery.js.map +1 -1
- package/dist/cli/todoSeverity.js +19 -0
- package/dist/cli/todoSeverity.js.map +1 -0
- package/dist/core/envPaths.js +21 -0
- package/dist/core/envPaths.js.map +1 -0
- package/dist/core/jsonValue.js +6 -0
- package/dist/core/jsonValue.js.map +1 -0
- package/dist/core/pyjson.js +67 -2
- package/dist/core/pyjson.js.map +1 -1
- package/dist/eval/evalSkills.js +17 -12
- package/dist/eval/evalSkills.js.map +1 -1
- package/dist/eval/semanticEval.js +43 -19
- package/dist/eval/semanticEval.js.map +1 -1
- package/dist/eval/semanticFixtures.js +16 -4
- package/dist/eval/semanticFixtures.js.map +1 -1
- package/dist/hooks/compaction/apply.js +31 -6
- package/dist/hooks/compaction/apply.js.map +1 -1
- package/dist/hooks/compaction/dryRun.js +5 -3
- package/dist/hooks/compaction/dryRun.js.map +1 -1
- package/dist/hooks/compaction/index.js +2 -2
- package/dist/hooks/compaction/index.js.map +1 -1
- package/dist/hooks/compaction/parse.js +132 -3
- package/dist/hooks/compaction/parse.js.map +1 -1
- package/dist/hooks/compaction/retention.js +3 -1
- package/dist/hooks/compaction/retention.js.map +1 -1
- package/dist/hooks/compaction/status.js +7 -9
- package/dist/hooks/compaction/status.js.map +1 -1
- package/dist/hooks/compaction/todoResolved.js +137 -0
- package/dist/hooks/compaction/todoResolved.js.map +1 -0
- package/dist/hooks/cursorSessionStart.js +10 -2
- package/dist/hooks/cursorSessionStart.js.map +1 -1
- package/dist/hooks/sessionStart.js +14 -7
- package/dist/hooks/sessionStart.js.map +1 -1
- package/dist/hooks/sessionStop.js +3 -0
- package/dist/hooks/sessionStop.js.map +1 -1
- package/dist/hooks/todoLayout.js +177 -0
- package/dist/hooks/todoLayout.js.map +1 -0
- package/dist/hooks/validateArtifact/index.js +3 -1
- package/dist/hooks/validateArtifact/index.js.map +1 -1
- package/dist/hooks/validateArtifact/markdown.js +57 -6
- package/dist/hooks/validateArtifact/markdown.js.map +1 -1
- package/dist/hooks/validateArtifact/runtime.js +6 -3
- package/dist/hooks/validateArtifact/runtime.js.map +1 -1
- package/dist/hooks/validateArtifact/schema.js +15 -11
- package/dist/hooks/validateArtifact/schema.js.map +1 -1
- package/dist/hooks/validateArtifact/traversal.js +1 -0
- package/dist/hooks/validateArtifact/traversal.js.map +1 -1
- package/dist/hooks/validateArtifact/violations.js +2 -2
- package/dist/hooks/validateArtifact/violations.js.map +1 -1
- package/dist/migrate/v2HandoffManifest.js +119 -5
- package/dist/migrate/v2HandoffManifest.js.map +1 -1
- package/dist/registries/artifactRegistry.js +23 -9
- package/dist/registries/artifactRegistry.js.map +1 -1
- package/dist/registries/capabilityContract.js +144 -1
- package/dist/registries/capabilityContract.js.map +1 -1
- package/dist/registries/evaluatorHandoffContract.js +2 -2
- package/dist/registries/evaluatorHandoffContract.js.map +1 -1
- package/dist/registries/packageRegistry.js +4 -3
- package/dist/registries/packageRegistry.js.map +1 -1
- package/dist/registries/runtimeAdapterRegistry.js +5 -4
- package/dist/registries/runtimeAdapterRegistry.js.map +1 -1
- package/dist/registries/triggerLoader.js +211 -0
- package/dist/registries/triggerLoader.js.map +1 -0
- package/dist/release/releaseMetadata.js +1 -1
- package/dist/release/releaseMetadata.js.map +1 -1
- package/dist/routing/index.js +2 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/routeEngine.js +189 -0
- package/dist/routing/routeEngine.js.map +1 -0
- package/dist/setup/codex/configToml.js +10 -15
- package/dist/setup/codex/configToml.js.map +1 -1
- package/dist/setup/codex/constants.js +12 -12
- package/dist/setup/codex/constants.js.map +1 -1
- package/dist/setup/cursor.js +6 -4
- package/dist/setup/cursor.js.map +1 -1
- package/dist/setup/cursorSurfaces.js +67 -0
- package/dist/setup/cursorSurfaces.js.map +1 -0
- package/dist/setup/doctor/core.js +6 -6
- package/dist/setup/doctor/core.js.map +1 -1
- package/dist/setup/doctor/diagnostics.js +16 -23
- package/dist/setup/doctor/diagnostics.js.map +1 -1
- package/dist/setup/doctor/opencode.js +32 -0
- package/dist/setup/doctor/opencode.js.map +1 -1
- package/dist/setup/doctor/report.js +27 -76
- package/dist/setup/doctor/report.js.map +1 -1
- package/dist/setup/smokeChecks.js +10 -10
- package/dist/setup/smokeChecks.js.map +1 -1
- package/dist/state/installRoot.js +49 -18
- package/dist/state/installRoot.js.map +1 -1
- package/dist/state/startupAnalysis/benchmark.js +22 -18
- package/dist/state/startupAnalysis/benchmark.js.map +1 -1
- package/dist/state/startupAnalysis/contract.js +5 -1
- package/dist/state/startupAnalysis/contract.js.map +1 -1
- package/dist/state/startupAnalysis/helpers.js +26 -71
- package/dist/state/startupAnalysis/helpers.js.map +1 -1
- package/dist/state/startupAnalysis/index.js.map +1 -1
- package/dist/state/startupAnalysis/metrics.js +25 -18
- package/dist/state/startupAnalysis/metrics.js.map +1 -1
- package/dist/state/startupAnalysis/records.js +13 -9
- package/dist/state/startupAnalysis/records.js.map +1 -1
- package/dist/state/startupAnalysis/report.js +26 -37
- package/dist/state/startupAnalysis/report.js.map +1 -1
- package/dist/state/startupAnalysis/threshold.js +6 -6
- package/dist/state/startupAnalysis/threshold.js.map +1 -1
- package/dist/upgrade/appContentRefresh.js +342 -0
- package/dist/upgrade/appContentRefresh.js.map +1 -0
- package/dist/upgrade/appModel.js +8 -6
- package/dist/upgrade/appModel.js.map +1 -1
- package/dist/upgrade/bundleEvidence.js +34 -0
- package/dist/upgrade/bundleEvidence.js.map +1 -0
- package/dist/upgrade/channels.js +11 -4
- package/dist/upgrade/channels.js.map +1 -1
- package/dist/upgrade/cliProbe.js +22 -0
- package/dist/upgrade/cliProbe.js.map +1 -0
- package/dist/upgrade/coexistenceProbe.js +29 -5
- package/dist/upgrade/coexistenceProbe.js.map +1 -1
- package/dist/upgrade/compatibility.js +13 -4
- package/dist/upgrade/compatibility.js.map +1 -1
- package/dist/upgrade/doctor.js +130 -187
- package/dist/upgrade/doctor.js.map +1 -1
- package/dist/upgrade/doctorClassifier.js +177 -0
- package/dist/upgrade/doctorClassifier.js.map +1 -0
- package/dist/upgrade/installedHooksRetirement.js +190 -0
- package/dist/upgrade/installedHooksRetirement.js.map +1 -0
- package/dist/upgrade/legacyAgentCleanup.js +116 -0
- package/dist/upgrade/legacyAgentCleanup.js.map +1 -0
- package/dist/upgrade/migrateArtifactsV2ToV3.js +57 -31
- package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
- package/dist/upgrade/nextMajorDoctor.js +29 -9
- package/dist/upgrade/nextMajorDoctor.js.map +1 -1
- package/dist/upgrade/npxPlatformStatus.js +23 -0
- package/dist/upgrade/npxPlatformStatus.js.map +1 -0
- package/dist/upgrade/projectIntegration.js +69 -75
- package/dist/upgrade/projectIntegration.js.map +1 -1
- package/dist/upgrade/projectIntegrationDecision.js +93 -0
- package/dist/upgrade/projectIntegrationDecision.js.map +1 -0
- package/dist/upgrade/runtimeMigration.js +156 -66
- package/dist/upgrade/runtimeMigration.js.map +1 -1
- package/dist/upgrade/versionResolution.js +2 -2
- package/dist/upgrade/versionResolution.js.map +1 -1
- package/dist/validate/appHomeContract.js +1 -1
- package/dist/validate/appHomeContract.js.map +1 -1
- package/dist/validate/capability.js +124 -11
- package/dist/validate/capability.js.map +1 -1
- package/dist/validate/crossCapability.js +1 -1
- package/dist/validate/crossCapability.js.map +1 -1
- package/dist/validate/lifecycleAdapters/legacyPythonParity.js +93 -0
- package/dist/validate/lifecycleAdapters/legacyPythonParity.js.map +1 -0
- package/dist/validate/lifecycleAdapters/nodeFormChecks.js +488 -0
- package/dist/validate/lifecycleAdapters/nodeFormChecks.js.map +1 -0
- package/dist/validate/lifecycleAdapters/shared.js +198 -0
- package/dist/validate/lifecycleAdapters/shared.js.map +1 -0
- package/dist/validate/lifecycleAdapters.js +13 -723
- package/dist/validate/lifecycleAdapters.js.map +1 -1
- package/dist/validate/vocabularyAuthority.js +10 -5
- package/dist/validate/vocabularyAuthority.js.map +1 -1
- package/package.json +26 -23
- package/bundle/skills/agentera/agents/dokumentera.toml +0 -6
- package/bundle/skills/agentera/agents/hej.toml +0 -6
- package/bundle/skills/agentera/agents/inspektera.toml +0 -6
- package/bundle/skills/agentera/agents/inspirera.toml +0 -6
- package/bundle/skills/agentera/agents/orkestrera.toml +0 -6
- package/bundle/skills/agentera/agents/profilera.toml +0 -6
- package/bundle/skills/agentera/agents/realisera.toml +0 -6
- package/bundle/skills/agentera/agents/visionera.toml +0 -6
- package/bundle/skills/agentera/agents/visualisera.toml +0 -6
- /package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{hej → status}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/exit.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Release history maintained by
|
|
3
|
+
# Release history maintained by build. Tracks versioned releases with
|
|
4
4
|
# categorized changes (Added, Changed, Fixed, Removed).
|
|
5
5
|
#
|
|
6
6
|
# Note: CHANGELOG.md is a human-facing Markdown artifact. It remains at the
|
|
@@ -11,12 +11,12 @@ meta:
|
|
|
11
11
|
name: changelog
|
|
12
12
|
version: "1.0.0"
|
|
13
13
|
description: >-
|
|
14
|
-
Release history. Produced by
|
|
14
|
+
Release history. Produced by build. Consumed by users and agents
|
|
15
15
|
for version context. Human-facing: remains Markdown at project root.
|
|
16
16
|
artifact_type: human_facing
|
|
17
17
|
path: "CHANGELOG.md"
|
|
18
|
-
producer:
|
|
19
|
-
consumers: [
|
|
18
|
+
producer: build
|
|
19
|
+
consumers: [status, all_skills]
|
|
20
20
|
format: markdown
|
|
21
21
|
|
|
22
22
|
GROUP_PREFIXES:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Decisions Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Reasoning trail maintained by
|
|
4
|
-
# one entry. Decisions are referenced by
|
|
3
|
+
# Reasoning trail maintained by discuss. Each deliberation session appends
|
|
4
|
+
# one entry. Decisions are referenced by build, optimize, and profile
|
|
5
5
|
# for context on why choices were made.
|
|
6
6
|
#
|
|
7
7
|
# Structural pattern: UPPER_CASE groups with numbered entries and stable IDs,
|
|
@@ -32,14 +32,14 @@ meta:
|
|
|
32
32
|
name: decisions
|
|
33
33
|
version: "1.0.0"
|
|
34
34
|
description: >-
|
|
35
|
-
Reasoning trail maintained by
|
|
36
|
-
appends one entry. Decisions are referenced by
|
|
37
|
-
|
|
38
|
-
and
|
|
35
|
+
Reasoning trail maintained by discuss. Each deliberation session
|
|
36
|
+
appends one entry. Decisions are referenced by build, optimize,
|
|
37
|
+
profile, plan, audit, status, document, vision, discuss,
|
|
38
|
+
and orchestrate for context on why choices were made.
|
|
39
39
|
artifact_type: agent_facing
|
|
40
40
|
path: ".agentera/decisions.yaml"
|
|
41
|
-
producer:
|
|
42
|
-
consumers: [
|
|
41
|
+
producer: discuss
|
|
42
|
+
consumers: [document, status, audit, optimize, orchestrate, plan, profile, build, discuss, vision]
|
|
43
43
|
format: yaml
|
|
44
44
|
|
|
45
45
|
GROUP_PREFIXES:
|
|
@@ -103,7 +103,7 @@ COMPACTION:
|
|
|
103
103
|
Decisions older than 50 are dropped entirely.
|
|
104
104
|
5:
|
|
105
105
|
id: DX5
|
|
106
|
-
trigger: "When
|
|
106
|
+
trigger: "When discuss writes a new decision"
|
|
107
107
|
description: >-
|
|
108
108
|
Compaction runs when the producing skill writes a new entry.
|
|
109
109
|
If >10 full-detail entries exist, collapse the oldest to one-line.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Design Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Visual identity system maintained by
|
|
3
|
+
# Visual identity system maintained by design. Defines design tokens,
|
|
4
4
|
# palette, typography, spacing, and component styling rules.
|
|
5
5
|
#
|
|
6
6
|
# Note: DESIGN.md is a human-facing Markdown artifact. It remains at the
|
|
@@ -11,12 +11,12 @@ meta:
|
|
|
11
11
|
name: design
|
|
12
12
|
version: "1.0.0"
|
|
13
13
|
description: >-
|
|
14
|
-
Visual identity system. Produced by
|
|
14
|
+
Visual identity system. Produced by design. Consumed by capabilities
|
|
15
15
|
that need visual identity context. Human-facing: remains Markdown at root.
|
|
16
16
|
artifact_type: human_facing
|
|
17
17
|
path: "DESIGN.md"
|
|
18
|
-
producer:
|
|
19
|
-
consumers: [
|
|
18
|
+
producer: design
|
|
19
|
+
consumers: [document, status, audit, build, vision, design]
|
|
20
20
|
format: markdown
|
|
21
21
|
|
|
22
22
|
GROUP_PREFIXES:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Docs Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Documentation contract maintained by
|
|
3
|
+
# Documentation contract maintained by document. Tracks project doc
|
|
4
4
|
# conventions, artifact path overrides, document index with status, coverage
|
|
5
5
|
# metrics, and timestamped audit findings.
|
|
6
6
|
#
|
|
@@ -47,11 +47,11 @@ meta:
|
|
|
47
47
|
name: docs
|
|
48
48
|
version: "1.0.0"
|
|
49
49
|
description: >-
|
|
50
|
-
Documentation contract. Produced by
|
|
50
|
+
Documentation contract. Produced by document. Consumed by all skills
|
|
51
51
|
for artifact path resolution and doc status tracking.
|
|
52
52
|
artifact_type: agent_facing
|
|
53
53
|
path: ".agentera/docs.yaml"
|
|
54
|
-
producer:
|
|
54
|
+
producer: document
|
|
55
55
|
consumers: [all_skills]
|
|
56
56
|
format: yaml
|
|
57
57
|
|
|
@@ -123,7 +123,7 @@ CONVENTIONS:
|
|
|
123
123
|
required: true
|
|
124
124
|
description: >-
|
|
125
125
|
Files whose content changes indicate a version bump is needed.
|
|
126
|
-
Tracked by
|
|
126
|
+
Tracked by plan, audit, and build for bump discipline.
|
|
127
127
|
validation:
|
|
128
128
|
- "At least one entry required"
|
|
129
129
|
5:
|
|
@@ -177,8 +177,9 @@ MAPPING:
|
|
|
177
177
|
required: true
|
|
178
178
|
description: >-
|
|
179
179
|
File path for this artifact. May be absolute or relative.
|
|
180
|
-
Environment variable references (e.g., $
|
|
181
|
-
are resolved at read
|
|
180
|
+
Environment variable references (e.g., $AGENTERA_PROFILE_DIR or
|
|
181
|
+
the deprecated $PROFILERA_PROFILE_DIR alias) are resolved at read
|
|
182
|
+
time with AGENTERA_PROFILE_DIR taking precedence.
|
|
182
183
|
validation:
|
|
183
184
|
- "Non-empty string"
|
|
184
185
|
4:
|
|
@@ -288,7 +289,7 @@ AUDIT_LOG:
|
|
|
288
289
|
type: map
|
|
289
290
|
required: false
|
|
290
291
|
description: >-
|
|
291
|
-
Each audit log entry. Timestamped findings from
|
|
292
|
+
Each audit log entry. Timestamped findings from document audits.
|
|
292
293
|
Appended when an audit is performed.
|
|
293
294
|
2:
|
|
294
295
|
id: DA2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Experiments Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Experiment log maintained by
|
|
3
|
+
# Experiment log maintained by optimize. Each experiment records hypothesis,
|
|
4
4
|
# method, metric results, kept/discarded status, and conclusions. Lives
|
|
5
5
|
# alongside OBJECTIVE.md in .agentera/optimera/<name>/.
|
|
6
6
|
#
|
|
@@ -40,12 +40,12 @@ meta:
|
|
|
40
40
|
name: experiments
|
|
41
41
|
version: "1.0.0"
|
|
42
42
|
description: >-
|
|
43
|
-
Experiment log for
|
|
43
|
+
Experiment log for optimize objectives. Produced and consumed by optimize.
|
|
44
44
|
Lives in .agentera/optimera/<name>/ alongside the objective.
|
|
45
45
|
artifact_type: agent_facing
|
|
46
46
|
path: ".agentera/optimera/<name>/experiments.yaml"
|
|
47
|
-
producer:
|
|
48
|
-
consumers: [
|
|
47
|
+
producer: optimize
|
|
48
|
+
consumers: [status, optimize]
|
|
49
49
|
format: yaml
|
|
50
50
|
|
|
51
51
|
GROUP_PREFIXES:
|
|
@@ -108,7 +108,7 @@ COMPACTION:
|
|
|
108
108
|
Experiments older than 50 are dropped entirely.
|
|
109
109
|
5:
|
|
110
110
|
id: EX_CMP5
|
|
111
|
-
trigger: "When
|
|
111
|
+
trigger: "When optimize writes a new experiment"
|
|
112
112
|
description: >-
|
|
113
113
|
Compaction runs when the producing skill writes a new entry.
|
|
114
114
|
If >10 full-detail entries exist, collapse the oldest to one-line.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Health Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Audit log maintained by
|
|
3
|
+
# Audit log maintained by audit. Each audit entry records assessed
|
|
4
4
|
# dimensions, findings (critical/warning/info counts), overall trajectory,
|
|
5
5
|
# per-dimension grades (A-F), per-dimension findings with confidence, and
|
|
6
6
|
# trend analysis against the prior audit.
|
|
@@ -49,12 +49,12 @@ meta:
|
|
|
49
49
|
name: health
|
|
50
50
|
version: "1.0.0"
|
|
51
51
|
description: >-
|
|
52
|
-
Audit log maintained by
|
|
52
|
+
Audit log maintained by audit. Consumed by capabilities that need
|
|
53
53
|
codebase health context.
|
|
54
54
|
artifact_type: agent_facing
|
|
55
55
|
path: ".agentera/health.yaml"
|
|
56
|
-
producer:
|
|
57
|
-
consumers: [
|
|
56
|
+
producer: audit
|
|
57
|
+
consumers: [document, status, audit, orchestrate, plan, build, vision]
|
|
58
58
|
format: yaml
|
|
59
59
|
|
|
60
60
|
GROUP_PREFIXES:
|
|
@@ -119,7 +119,7 @@ COMPACTION:
|
|
|
119
119
|
Audits older than 50 are dropped entirely.
|
|
120
120
|
5:
|
|
121
121
|
id: HX5
|
|
122
|
-
trigger: "When
|
|
122
|
+
trigger: "When audit writes a new audit"
|
|
123
123
|
description: >-
|
|
124
124
|
Compaction runs when the producing skill writes a new entry.
|
|
125
125
|
If >10 full-detail entries exist, collapse the oldest to one-line.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Objective Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Optimization objective maintained by
|
|
3
|
+
# Optimization objective maintained by optimize. Each objective lives in its
|
|
4
4
|
# own subdirectory under .agentera/optimera/<name>/ and captures the metric,
|
|
5
5
|
# target, baseline, constraints, measurement method, gates, and scope.
|
|
6
6
|
#
|
|
@@ -47,12 +47,12 @@ meta:
|
|
|
47
47
|
name: objective
|
|
48
48
|
version: "1.0.0"
|
|
49
49
|
description: >-
|
|
50
|
-
Optimization objective. Produced by
|
|
50
|
+
Optimization objective. Produced by optimize and discuss. Each objective
|
|
51
51
|
lives in its own subdirectory under .agentera/optimera/<name>/.
|
|
52
52
|
artifact_type: agent_facing
|
|
53
53
|
path: ".agentera/optimera/<name>/objective.yaml"
|
|
54
|
-
producer: [
|
|
55
|
-
consumers: [
|
|
54
|
+
producer: [optimize, discuss]
|
|
55
|
+
consumers: [status, optimize, discuss]
|
|
56
56
|
format: yaml
|
|
57
57
|
|
|
58
58
|
GROUP_PREFIXES:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Plan Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Active work plan maintained by
|
|
3
|
+
# Active work plan maintained by plan. Each plan captures what will be built,
|
|
4
4
|
# why, constraints, scope boundaries, design approach, tasks with dependencies
|
|
5
5
|
# and acceptance criteria, overall acceptance, and surprises.
|
|
6
6
|
#
|
|
@@ -41,12 +41,12 @@ meta:
|
|
|
41
41
|
name: plan
|
|
42
42
|
version: "1.0.0"
|
|
43
43
|
description: >-
|
|
44
|
-
Active work plan. Produced by
|
|
44
|
+
Active work plan. Produced by plan and updated by plan executors.
|
|
45
45
|
Consumed by capabilities that inspect or execute plan state.
|
|
46
46
|
artifact_type: agent_facing
|
|
47
47
|
path: ".agentera/plan.yaml"
|
|
48
|
-
producer: [
|
|
49
|
-
consumers: [
|
|
48
|
+
producer: [orchestrate, plan, build]
|
|
49
|
+
consumers: [status, audit, orchestrate, plan, build]
|
|
50
50
|
format: yaml
|
|
51
51
|
|
|
52
52
|
GROUP_PREFIXES:
|
|
@@ -191,7 +191,7 @@ PLAN:
|
|
|
191
191
|
required: false
|
|
192
192
|
description: >-
|
|
193
193
|
Runtime surprises discovered during plan execution. Populated
|
|
194
|
-
by
|
|
194
|
+
by build when reality diverges from plan. Default: empty.
|
|
195
195
|
7:
|
|
196
196
|
id: PL22
|
|
197
197
|
field: previous_plan_archived
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Progress Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Cycle-by-cycle operational log for
|
|
3
|
+
# Cycle-by-cycle operational log for build. Each entry records what happened
|
|
4
4
|
# in one development cycle: phase, work done, discoveries, verification,
|
|
5
5
|
# next steps, and context envelope.
|
|
6
6
|
#
|
|
@@ -36,12 +36,12 @@ meta:
|
|
|
36
36
|
name: progress
|
|
37
37
|
version: "1.0.0"
|
|
38
38
|
description: >-
|
|
39
|
-
Cycle-by-cycle operational log. Produced by
|
|
39
|
+
Cycle-by-cycle operational log. Produced by build. Consumed by
|
|
40
40
|
capabilities that need recent work history and verification evidence.
|
|
41
41
|
artifact_type: agent_facing
|
|
42
42
|
path: ".agentera/progress.yaml"
|
|
43
|
-
producer:
|
|
44
|
-
consumers: [
|
|
43
|
+
producer: build
|
|
44
|
+
consumers: [document, status, audit, optimize, orchestrate, plan, build, vision, design]
|
|
45
45
|
format: yaml
|
|
46
46
|
|
|
47
47
|
GROUP_PREFIXES:
|
|
@@ -104,7 +104,7 @@ COMPACTION:
|
|
|
104
104
|
Cycles older than 50 are dropped entirely.
|
|
105
105
|
5:
|
|
106
106
|
id: PX5
|
|
107
|
-
trigger: "When
|
|
107
|
+
trigger: "When build writes a new cycle entry"
|
|
108
108
|
description: >-
|
|
109
109
|
Compaction runs when the producing skill writes a new entry.
|
|
110
110
|
If >10 full-detail entries exist, collapse the oldest to one-line.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Todo Artifact Schema
|
|
2
2
|
#
|
|
3
|
-
# Open issues and tasks maintained by
|
|
3
|
+
# Open issues and tasks maintained by build and audit. Severity-ranked
|
|
4
4
|
# checklist of work to be done, resolved items, and deferred work.
|
|
5
5
|
#
|
|
6
6
|
# Note: TODO.md is a human-facing Markdown artifact. It remains at the
|
|
@@ -16,17 +16,8 @@ meta:
|
|
|
16
16
|
artifact_type: human_facing
|
|
17
17
|
path: "TODO.md"
|
|
18
18
|
producer:
|
|
19
|
-
[
|
|
20
|
-
|
|
21
|
-
inspektera,
|
|
22
|
-
inspirera,
|
|
23
|
-
optimera,
|
|
24
|
-
orkestrera,
|
|
25
|
-
realisera,
|
|
26
|
-
resonera,
|
|
27
|
-
visualisera,
|
|
28
|
-
]
|
|
29
|
-
consumers: [hej, all_skills]
|
|
19
|
+
[document, audit, research, optimize, orchestrate, build, discuss, design]
|
|
20
|
+
consumers: [status, all_skills]
|
|
30
21
|
format: markdown
|
|
31
22
|
|
|
32
23
|
GROUP_PREFIXES:
|
|
@@ -76,16 +67,17 @@ CONVENTION:
|
|
|
76
67
|
field: type_tag
|
|
77
68
|
level: advisory
|
|
78
69
|
description: >-
|
|
79
|
-
Each item should carry a type tag such as [fix], [feat], [
|
|
80
|
-
[test], [perf], or [docs] for commit-scope alignment and
|
|
81
|
-
discoverability.
|
|
70
|
+
Each item should carry a type tag such as [fix], [feat], [refactor],
|
|
71
|
+
[chore], [test], [perf], or [docs] for commit-scope alignment and
|
|
72
|
+
scan discoverability.
|
|
82
73
|
2:
|
|
83
74
|
id: TC2
|
|
84
75
|
field: version_suffix
|
|
85
76
|
level: advisory
|
|
86
77
|
description: >-
|
|
87
|
-
|
|
88
|
-
|
|
78
|
+
Optional train scope in `[type:train]` form, e.g. `[fix:train]`, when
|
|
79
|
+
the work targets a specific release train; most common on feat and fix
|
|
80
|
+
items. Omit the train suffix when the item is not train-scoped.
|
|
89
81
|
3:
|
|
90
82
|
id: TC3
|
|
91
83
|
field: title_format
|
|
@@ -95,30 +87,43 @@ CONVENTION:
|
|
|
95
87
|
either all plain prose or all "**BoldTitle**: description".
|
|
96
88
|
4:
|
|
97
89
|
id: TC4
|
|
98
|
-
field:
|
|
90
|
+
field: resolved_checkbox
|
|
99
91
|
level: advisory
|
|
100
92
|
description: >-
|
|
101
|
-
Resolved items should
|
|
102
|
-
|
|
93
|
+
Resolved items should use a checked GitHub task-list checkbox
|
|
94
|
+
(`- [x]`) before the task text. Open items use `- [ ]`. The
|
|
95
|
+
checkbox state is the canonical completion marker; do not wrap
|
|
96
|
+
resolved text in Markdown strikethrough.
|
|
103
97
|
5:
|
|
104
98
|
id: TC5
|
|
105
|
-
field:
|
|
106
|
-
level:
|
|
99
|
+
field: severity_band_policy
|
|
100
|
+
level: required
|
|
107
101
|
description: >-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
Severity band policy: all four severity bands (⇶ Critical, ⇉
|
|
103
|
+
Degraded, → Normal, ⇢ Annoying) may be header-only when they
|
|
104
|
+
have no open work. Open items use `- [ ]` only. Resolved items
|
|
105
|
+
must not appear in severity bands (see TC6). Executable checks
|
|
106
|
+
live in packages/cli/src/hooks/validateArtifact/markdown.ts
|
|
107
|
+
`validateMdItems` and packages/cli/src/hooks/compaction/parse.ts.
|
|
111
108
|
6:
|
|
112
109
|
id: TC6
|
|
113
|
-
field:
|
|
110
|
+
field: resolved_section_placement
|
|
114
111
|
level: required
|
|
115
112
|
description: >-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
113
|
+
Resolved ledger policy: completed items live only under
|
|
114
|
+
`## ✓ Resolved` as `- [x] [type:train]` checkboxes. Severity
|
|
115
|
+
bands must not contain `- [x]` or legacy `~~` strikethrough
|
|
116
|
+
resolved rows. The compaction gate counts every resolved row
|
|
117
|
+
(including mis-placed rows until migrated) against the uniform
|
|
118
|
+
10/40/50 retention cap. `compact --mode fix` migrates mis-placed
|
|
119
|
+
rows into `## ✓ Resolved` before applying retention.
|
|
120
|
+
7:
|
|
121
|
+
id: TC7
|
|
122
|
+
field: resolved_line_provenance
|
|
123
|
+
level: advisory
|
|
124
|
+
description: >-
|
|
125
|
+
Resolved provenance uses `resolved YYYY-MM-DD` or `resolved @
|
|
126
|
+
<semver>` after the item description. Do not use `resolved on
|
|
127
|
+
feat/v3 @ <hash>` or dual-branch hash reconciliation; git history
|
|
128
|
+
is the archaeology source. Fold the Resolved move into the
|
|
129
|
+
implementation commit — no follow-up hash-backfill commit.
|
|
@@ -35,13 +35,13 @@ meta:
|
|
|
35
35
|
name: vision
|
|
36
36
|
version: "1.0.0"
|
|
37
37
|
description: >-
|
|
38
|
-
Project vision. Produced by
|
|
38
|
+
Project vision. Produced by vision and direction-shaping capabilities.
|
|
39
39
|
Consumed by capabilities that need strategic alignment. No compaction:
|
|
40
40
|
vision is not a growing artifact.
|
|
41
41
|
artifact_type: agent_facing
|
|
42
42
|
path: ".agentera/vision.yaml"
|
|
43
|
-
producer: [
|
|
44
|
-
consumers: [
|
|
43
|
+
producer: [research, build, discuss, vision]
|
|
44
|
+
consumers: [document, status, audit, orchestrate, plan, build, discuss, vision, design]
|
|
45
45
|
format: yaml
|
|
46
46
|
|
|
47
47
|
GROUP_PREFIXES:
|
|
@@ -4,9 +4,11 @@ import path from "node:path";
|
|
|
4
4
|
import { pyJsonIndent } from "../../core/pyjson.js";
|
|
5
5
|
import { defaultOutputPath, } from "./core.js";
|
|
6
6
|
import { buildCorpus } from "./corpus.js";
|
|
7
|
+
import { COVERAGE_EXIT_FLAGGED, corpusEnvelopeCoverage, formatCoverageSummaryText, runCoverageAudit, } from "./coverageAudit.js";
|
|
8
|
+
import { formatTruncationWarnings, resolveSqliteCaps } from "./sqliteCaps.js";
|
|
7
9
|
import { resolveCopilotStorePath, resolveCursorChatsPath, resolveCursorProjectsPath, resolveOpencodeDbPath, } from "./cursorSessions.js";
|
|
8
10
|
export function parseExtractArgs(argv, env = process.env, platform = process.platform) {
|
|
9
|
-
const home = os.homedir();
|
|
11
|
+
const home = env.HOME || (platform === "win32" ? env.USERPROFILE : undefined) || os.homedir();
|
|
10
12
|
const args = {
|
|
11
13
|
output: defaultOutputPath(env, platform),
|
|
12
14
|
projectRoot: [],
|
|
@@ -21,6 +23,9 @@ export function parseExtractArgs(argv, env = process.env, platform = process.pla
|
|
|
21
23
|
noOpencode: false,
|
|
22
24
|
noCopilot: false,
|
|
23
25
|
noCursor: false,
|
|
26
|
+
acceptCoverageGap: false,
|
|
27
|
+
coverageAuditOnly: false,
|
|
28
|
+
format: "text",
|
|
24
29
|
};
|
|
25
30
|
for (let i = 0; i < argv.length; i++) {
|
|
26
31
|
const a = argv[i];
|
|
@@ -58,6 +63,27 @@ export function parseExtractArgs(argv, env = process.env, platform = process.pla
|
|
|
58
63
|
args.noCopilot = true;
|
|
59
64
|
else if (a === "--no-cursor")
|
|
60
65
|
args.noCursor = true;
|
|
66
|
+
else if (a === "--accept-coverage-gap")
|
|
67
|
+
args.acceptCoverageGap = true;
|
|
68
|
+
else if (a === "--coverage-audit-only")
|
|
69
|
+
args.coverageAuditOnly = true;
|
|
70
|
+
else if ((v = val("--max-sqlite-sessions")) !== null) {
|
|
71
|
+
args.maxSqliteSessions = Number.parseInt(v, 10);
|
|
72
|
+
if (!Number.isFinite(args.maxSqliteSessions) || args.maxSqliteSessions < 1) {
|
|
73
|
+
throw new Error(`extract-corpus: invalid --max-sqlite-sessions: ${v}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else if ((v = val("--max-sqlite-rows")) !== null) {
|
|
77
|
+
args.maxSqliteRows = Number.parseInt(v, 10);
|
|
78
|
+
if (!Number.isFinite(args.maxSqliteRows) || args.maxSqliteRows < 1) {
|
|
79
|
+
throw new Error(`extract-corpus: invalid --max-sqlite-rows: ${v}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else if ((v = val("--format")) !== null) {
|
|
83
|
+
if (v !== "text" && v !== "json")
|
|
84
|
+
throw new Error(`extract-corpus: unsupported format '${v}'`);
|
|
85
|
+
args.format = v;
|
|
86
|
+
}
|
|
61
87
|
else
|
|
62
88
|
throw new Error(`extract-corpus: unrecognized argument: ${a}`);
|
|
63
89
|
}
|
|
@@ -79,6 +105,23 @@ export function extractCorpusMain(argv, io = {}) {
|
|
|
79
105
|
return 2;
|
|
80
106
|
}
|
|
81
107
|
const projectRoots = args.projectRoot.length > 0 ? args.projectRoot : [cwd];
|
|
108
|
+
const audit = runCoverageAudit(args, env, platform, args.acceptCoverageGap);
|
|
109
|
+
if (args.format === "json") {
|
|
110
|
+
out(JSON.stringify({ coverage_audit: audit }, null, 2));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
out(formatCoverageSummaryText(audit));
|
|
114
|
+
}
|
|
115
|
+
if (audit.coverage_gap_flagged) {
|
|
116
|
+
err("coverage gap flagged (EX2): available runtime(s) skipped; pass --accept-coverage-gap to proceed");
|
|
117
|
+
return COVERAGE_EXIT_FLAGGED;
|
|
118
|
+
}
|
|
119
|
+
if (args.coverageAuditOnly)
|
|
120
|
+
return 0;
|
|
121
|
+
const sqliteCaps = resolveSqliteCaps(env, {
|
|
122
|
+
maxSessions: args.maxSqliteSessions,
|
|
123
|
+
maxRows: args.maxSqliteRows,
|
|
124
|
+
});
|
|
82
125
|
const skipCursor = args.noCursor;
|
|
83
126
|
const corpus = buildCorpus({
|
|
84
127
|
projectRoots,
|
|
@@ -88,9 +131,14 @@ export function extractCorpusMain(argv, io = {}) {
|
|
|
88
131
|
copilotConversationsDir: args.noCopilot ? null : args.copilotConversationsDir || resolveCopilotStorePath(env),
|
|
89
132
|
cursorProjectsDir: skipCursor ? null : args.cursorProjectsDir || resolveCursorProjectsPath(env),
|
|
90
133
|
cursorChatsDir: skipCursor ? null : args.cursorChatsDir || resolveCursorChatsPath(env),
|
|
134
|
+
coverage: corpusEnvelopeCoverage(audit),
|
|
135
|
+
sqliteCaps,
|
|
91
136
|
});
|
|
92
137
|
fs.mkdirSync(path.dirname(args.output), { recursive: true });
|
|
93
138
|
fs.writeFileSync(args.output, pyJsonIndent(corpus) + "\n", "utf-8");
|
|
139
|
+
const truncationWarning = formatTruncationWarnings(corpus.metadata.runtime_statuses);
|
|
140
|
+
if (truncationWarning)
|
|
141
|
+
err(truncationWarning);
|
|
94
142
|
const total = corpus.metadata.total_records;
|
|
95
143
|
const familyBits = Object.entries(corpus.metadata.families)
|
|
96
144
|
.map(([name, summary]) => `${name}=${summary.count}`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/analytics/extractCorpus/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/analytics/extractCorpus/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAEL,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAuB7B,MAAM,UAAU,gBAAgB,CAAC,IAAc,EAAE,MAAW,OAAO,CAAC,GAAG,EAAE,WAA4B,OAAO,CAAC,QAAQ;IACn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ime, record, signalType, textFromContent, } from "./core.js";
|
|
4
4
|
import { isPlainObject, rglob, isFilePath } from "./core.js";
|
|
5
|
+
import { resolveSqliteCaps, } from "./sqliteCaps.js";
|
|
5
6
|
import { PermissionDeniedError, openSqlite, sqliteTimestamp, tableColumns, firstColumn, qualified, } from "./sqliteSessions.js";
|
|
6
7
|
function copilotDbCandidates(storePath) {
|
|
7
8
|
if (isFilePath(storePath))
|
|
8
9
|
return [storePath];
|
|
9
10
|
return rglob(storePath, "session-store.db");
|
|
10
11
|
}
|
|
11
|
-
function copilotRows(conn) {
|
|
12
|
+
function copilotRows(conn, caps) {
|
|
12
13
|
const tables = new Set(conn.prepare("SELECT name FROM sqlite_master WHERE type = 'table'").all().map((r) => String(r.name)));
|
|
13
14
|
for (const t of ["sessions", "turns"]) {
|
|
14
15
|
if (!tables.has(t)) {
|
|
@@ -61,7 +62,44 @@ function copilotRows(conn) {
|
|
|
61
62
|
${idExpr}
|
|
62
63
|
LIMIT ?
|
|
63
64
|
`;
|
|
64
|
-
return conn.prepare(query).all(
|
|
65
|
+
return conn.prepare(query).all(caps.maxRows);
|
|
66
|
+
}
|
|
67
|
+
export function probeCopilotTruncation(conn, caps, fallback) {
|
|
68
|
+
const tables = new Set(conn.prepare("SELECT name FROM sqlite_master WHERE type = 'table'").all().map((r) => String(r.name)));
|
|
69
|
+
if (!tables.has("sessions") || !tables.has("turns"))
|
|
70
|
+
return null;
|
|
71
|
+
const sessionCols = tableColumns(conn, "sessions");
|
|
72
|
+
const turnCols = tableColumns(conn, "turns");
|
|
73
|
+
const sessionId = firstColumn(sessionCols, ["id", "session_id", "sessionID"]);
|
|
74
|
+
const turnSession = firstColumn(turnCols, ["session_id", "sessionID", "session", "sessionId"]);
|
|
75
|
+
const roleCol = firstColumn(turnCols, ["role", "actor", "author"]);
|
|
76
|
+
if (!(sessionId && turnSession && roleCol))
|
|
77
|
+
return null;
|
|
78
|
+
const turnId = firstColumn(turnCols, ["id", "turn_id", "turnID"]);
|
|
79
|
+
const sessionTime = firstColumn(sessionCols, ["time", "timestamp", "created_at", "createdAt"]);
|
|
80
|
+
const turnTime = firstColumn(turnCols, ["time", "timestamp", "created_at", "createdAt"]);
|
|
81
|
+
const turnOrder = firstColumn(turnCols, ["turn_index", "turnIndex", "idx", "position", "sequence"]);
|
|
82
|
+
const orderExpr = turnOrder ? `t."${turnOrder}"` : `t."${turnTime || turnSession}"`;
|
|
83
|
+
const idExpr = turnId ? `t."${turnId}"` : "t.rowid";
|
|
84
|
+
const turnCount = Number(conn.prepare("SELECT COUNT(*) AS c FROM turns t JOIN sessions s ON t.\"" + turnSession + "\" = s.\"" + sessionId + "\"").get()?.c ?? 0);
|
|
85
|
+
if (turnCount <= caps.maxRows)
|
|
86
|
+
return null;
|
|
87
|
+
const timeExpr = `COALESCE(t."${turnTime || turnSession}", s."${sessionTime || sessionId}")`;
|
|
88
|
+
const query = `
|
|
89
|
+
SELECT MIN(turn_ts) AS truncated_at
|
|
90
|
+
FROM (
|
|
91
|
+
SELECT ${timeExpr} AS turn_ts
|
|
92
|
+
FROM turns t
|
|
93
|
+
JOIN sessions s ON t."${turnSession}" = s."${sessionId}"
|
|
94
|
+
ORDER BY COALESCE(${orderExpr}, t."${turnSession}"),
|
|
95
|
+
CASE LOWER(t."${roleCol}") WHEN 'user' THEN 0 WHEN 'assistant' THEN 1 ELSE 2 END,
|
|
96
|
+
${idExpr}
|
|
97
|
+
LIMIT -1 OFFSET ?
|
|
98
|
+
)
|
|
99
|
+
`;
|
|
100
|
+
const row = conn.prepare(query).get(caps.maxRows);
|
|
101
|
+
const truncatedAt = sqliteTimestamp(row?.truncated_at, fallback);
|
|
102
|
+
return { truncatedAt, cap: "rows", limit: caps.maxRows };
|
|
65
103
|
}
|
|
66
104
|
function copilotArgumentDict(value) {
|
|
67
105
|
if (isPlainObject(value)) {
|
|
@@ -135,9 +173,10 @@ function copilotRowTools(row, errors) {
|
|
|
135
173
|
}
|
|
136
174
|
return tools.filter((t) => typeof t.tool_name === "string" && t.tool_name);
|
|
137
175
|
}
|
|
138
|
-
export function extractCopilotSessions(storePath, errors) {
|
|
176
|
+
export function extractCopilotSessions(storePath, errors, ctx) {
|
|
139
177
|
if (storePath === null || !fs.existsSync(storePath))
|
|
140
178
|
return [];
|
|
179
|
+
const caps = ctx?.sqliteCaps ?? resolveSqliteCaps();
|
|
141
180
|
const records = [];
|
|
142
181
|
for (const dbPath of copilotDbCandidates(storePath).slice(0, 1)) {
|
|
143
182
|
const fallbackTimestamp = isoFromMtime(dbPath);
|
|
@@ -145,7 +184,10 @@ export function extractCopilotSessions(storePath, errors) {
|
|
|
145
184
|
let conn = null;
|
|
146
185
|
try {
|
|
147
186
|
conn = openSqlite(dbPath);
|
|
148
|
-
|
|
187
|
+
const truncation = probeCopilotTruncation(conn, caps, fallbackTimestamp);
|
|
188
|
+
if (truncation && ctx)
|
|
189
|
+
ctx.truncation = truncation;
|
|
190
|
+
rows = copilotRows(conn, caps);
|
|
149
191
|
}
|
|
150
192
|
catch (exc) {
|
|
151
193
|
const msg = exc.message || "";
|