@ai-atomic-framework/cli 0.1.0-beta.0 → 0.1.0-beta.2
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/dist/_vendor/agent-pack-claude-code/dist/index.js +40 -0
- package/dist/_vendor/agent-pack-claude-code/templates/atm-bootstrap.md.tmpl +9 -0
- package/dist/_vendor/agent-pack-claude-code/templates/atm-evidence.md.tmpl +10 -0
- package/dist/_vendor/agent-pack-claude-code/templates/atm-handoff.md.tmpl +9 -0
- package/dist/_vendor/agent-pack-claude-code/templates/atm-lock.md.tmpl +10 -0
- package/dist/_vendor/agent-pack-claude-code/templates/atm-next.md.tmpl +12 -0
- package/dist/_vendor/agent-pack-claude-code/templates/atm-verify.md.tmpl +8 -0
- package/dist/_vendor/agent-pack-copilot/dist/index.js +30 -0
- package/dist/_vendor/agent-pack-cursor/dist/index.js +30 -0
- package/dist/_vendor/agent-pack-gemini/dist/index.js +30 -0
- package/dist/_vendor/agent-pack-sdk/dist/experimental/index.js +54 -0
- package/dist/_vendor/agent-pack-sdk/dist/index.js +40 -0
- package/dist/_vendor/agent-pack-sdk/dist/install-manifest.js +49 -0
- package/dist/_vendor/agent-pack-windsurf/dist/index.js +54 -0
- package/dist/_vendor/atm-markdown-task-source/dist/index.js +87 -0
- package/dist/_vendor/atm-markdown-task-source/dist/task-card-parser.js +1 -0
- package/dist/_vendor/atm-markdown-task-source/dist/templates.js +48 -0
- package/dist/_vendor/atm-markdown-task-source/templates/aao-l2-split-template.md +47 -0
- package/dist/_vendor/core/dist/agent-execute/execute-agent-task.js +295 -0
- package/dist/_vendor/core/dist/agent-execute/execution-constants.js +16 -0
- package/dist/_vendor/core/dist/agent-execute/execution-documents.js +83 -0
- package/dist/_vendor/core/dist/agent-execute/execution-validation.js +97 -0
- package/dist/_vendor/core/dist/agent-prompt/build-agent-prompt.js +191 -0
- package/dist/_vendor/core/dist/architecture/index.js +1 -0
- package/dist/_vendor/core/dist/architecture/module-boundary.js +167 -0
- package/dist/_vendor/core/dist/batch/plan-run-journal.js +181 -0
- package/dist/_vendor/core/dist/broker/adapters/atom-map.js +205 -0
- package/dist/_vendor/core/dist/broker/adapters/batch-planner.js +121 -0
- package/dist/_vendor/core/dist/broker/adapters/cas.js +26 -0
- package/dist/_vendor/core/dist/broker/adapters/fallback-file-lock.js +64 -0
- package/dist/_vendor/core/dist/broker/adapters/index.js +8 -0
- package/dist/_vendor/core/dist/broker/adapters/json-record.js +170 -0
- package/dist/_vendor/core/dist/broker/adapters/numeric-scalar.js +155 -0
- package/dist/_vendor/core/dist/broker/adapters/registry.js +79 -0
- package/dist/_vendor/core/dist/broker/adapters/text-range.js +143 -0
- package/dist/_vendor/core/dist/broker/admission/contracts.js +1 -0
- package/dist/_vendor/core/dist/broker/admission/evaluate-broker-admission.js +127 -0
- package/dist/_vendor/core/dist/broker/agr.js +22 -0
- package/dist/_vendor/core/dist/broker/apply-evidence.js +32 -0
- package/dist/_vendor/core/dist/broker/atm-core-scope.js +139 -0
- package/dist/_vendor/core/dist/broker/boundaries/content-anchor.js +60 -0
- package/dist/_vendor/core/dist/broker/boundaries/index.js +2 -0
- package/dist/_vendor/core/dist/broker/boundaries/resolver.js +76 -0
- package/dist/_vendor/core/dist/broker/candidate-bridge.js +76 -0
- package/dist/_vendor/core/dist/broker/census/index.js +40 -0
- package/dist/_vendor/core/dist/broker/compose.js +187 -0
- package/dist/_vendor/core/dist/broker/conflict-key-overlap.js +59 -0
- package/dist/_vendor/core/dist/broker/conflict-matrix.js +350 -0
- package/dist/_vendor/core/dist/broker/cross-task-mutation-guard.js +507 -0
- package/dist/_vendor/core/dist/broker/decision/admission.js +58 -0
- package/dist/_vendor/core/dist/broker/decision/decomposition.js +188 -0
- package/dist/_vendor/core/dist/broker/decision/failure.js +5 -0
- package/dist/_vendor/core/dist/broker/decision/physical-overlap.js +78 -0
- package/dist/_vendor/core/dist/broker/decision/proposal-overlap.js +173 -0
- package/dist/_vendor/core/dist/broker/decision/surfaces.js +12 -0
- package/dist/_vendor/core/dist/broker/decision.js +213 -0
- package/dist/_vendor/core/dist/broker/failure-reason.js +79 -0
- package/dist/_vendor/core/dist/broker/foreign-generated-residue-disposition.js +66 -0
- package/dist/_vendor/core/dist/broker/freeze.js +126 -0
- package/dist/_vendor/core/dist/broker/generated-projection-steward.js +213 -0
- package/dist/_vendor/core/dist/broker/global-resource-projection.js +116 -0
- package/dist/_vendor/core/dist/broker/historical-work-admission-attestation.js +173 -0
- package/dist/_vendor/core/dist/broker/index.js +44 -0
- package/dist/_vendor/core/dist/broker/intent-enrichment.js +10 -0
- package/dist/_vendor/core/dist/broker/lifecycle/index.js +149 -0
- package/dist/_vendor/core/dist/broker/lifecycle.js +242 -0
- package/dist/_vendor/core/dist/broker/merge-plan.js +83 -0
- package/dist/_vendor/core/dist/broker/orphan-cleanup.js +108 -0
- package/dist/_vendor/core/dist/broker/parallel-admission-policy.js +229 -0
- package/dist/_vendor/core/dist/broker/patch-candidate-materializer.js +126 -0
- package/dist/_vendor/core/dist/broker/patch-envelope-atm-core.js +45 -0
- package/dist/_vendor/core/dist/broker/patch-envelope.js +97 -0
- package/dist/_vendor/core/dist/broker/policy.js +89 -0
- package/dist/_vendor/core/dist/broker/post-compose-semantic-validation-policy.js +199 -0
- package/dist/_vendor/core/dist/broker/projections/atomic-broker-projection.js +142 -0
- package/dist/_vendor/core/dist/broker/proposal.js +203 -0
- package/dist/_vendor/core/dist/broker/reconcile/broker-projection-reconcile.js +57 -0
- package/dist/_vendor/core/dist/broker/recovery.js +182 -0
- package/dist/_vendor/core/dist/broker/registry-store.js +176 -0
- package/dist/_vendor/core/dist/broker/registry.js +365 -0
- package/dist/_vendor/core/dist/broker/related-task-batching.js +34 -0
- package/dist/_vendor/core/dist/broker/replay/dashboard.js +130 -0
- package/dist/_vendor/core/dist/broker/replay/index.js +164 -0
- package/dist/_vendor/core/dist/broker/replay/lifecycle-receipt-observability.js +133 -0
- package/dist/_vendor/core/dist/broker/replay/lifecycle-receipt-types.js +47 -0
- package/dist/_vendor/core/dist/broker/replay/lifecycle-receipt-validation.js +13 -0
- package/dist/_vendor/core/dist/broker/replay/lifecycle-receipts.js +261 -0
- package/dist/_vendor/core/dist/broker/replay/runner-discrimination.js +311 -0
- package/dist/_vendor/core/dist/broker/resource-overlap.js +203 -0
- package/dist/_vendor/core/dist/broker/runner-bootstrap.js +65 -0
- package/dist/_vendor/core/dist/broker/runner-build-output-inventory.js +359 -0
- package/dist/_vendor/core/dist/broker/runner-execution-attestation.js +24 -0
- package/dist/_vendor/core/dist/broker/runner-ref-store.js +65 -0
- package/dist/_vendor/core/dist/broker/runner-registry-snapshot.js +58 -0
- package/dist/_vendor/core/dist/broker/runner-selection-verification-ports.js +1 -0
- package/dist/_vendor/core/dist/broker/runner-shadow-feedback-sink.js +12 -0
- package/dist/_vendor/core/dist/broker/runner-submit-pipeline.js +67 -0
- package/dist/_vendor/core/dist/broker/runner-sync-session.js +302 -0
- package/dist/_vendor/core/dist/broker/runner-sync-steward-queue.js +436 -0
- package/dist/_vendor/core/dist/broker/runner-version-contract.js +188 -0
- package/dist/_vendor/core/dist/broker/runner-version-registry.js +163 -0
- package/dist/_vendor/core/dist/broker/runner-version-selection-verifier.js +182 -0
- package/dist/_vendor/core/dist/broker/runner-version-state.js +63 -0
- package/dist/_vendor/core/dist/broker/semantic-adjudication/index.js +1 -0
- package/dist/_vendor/core/dist/broker/semantic-adjudication/policy.js +122 -0
- package/dist/_vendor/core/dist/broker/semantic-contract.js +1 -0
- package/dist/_vendor/core/dist/broker/shared-delivery-commit.js +177 -0
- package/dist/_vendor/core/dist/broker/shared-delivery-saga.js +187 -0
- package/dist/_vendor/core/dist/broker/shared-surface-queue.js +185 -0
- package/dist/_vendor/core/dist/broker/shared-write-provenance-policy.js +252 -0
- package/dist/_vendor/core/dist/broker/steward-transactional-apply.js +369 -0
- package/dist/_vendor/core/dist/broker/steward.js +464 -0
- package/dist/_vendor/core/dist/broker/team-lane/support.js +186 -0
- package/dist/_vendor/core/dist/broker/team-lane.js +357 -0
- package/dist/_vendor/core/dist/broker/team-wave-admission.js +111 -0
- package/dist/_vendor/core/dist/broker/team-wave-checkpoint.js +52 -0
- package/dist/_vendor/core/dist/broker/team-wave-envelope.js +59 -0
- package/dist/_vendor/core/dist/broker/team-wave-evidence.js +56 -0
- package/dist/_vendor/core/dist/broker/team-wave-planner.js +142 -0
- package/dist/_vendor/core/dist/broker/team-worker-report.js +63 -0
- package/dist/_vendor/core/dist/broker/terminal-history-entitlement.js +79 -0
- package/dist/_vendor/core/dist/broker/test-case-contribution.js +142 -0
- package/dist/_vendor/core/dist/broker/ticket-authority/index.js +114 -0
- package/dist/_vendor/core/dist/broker/ticket-policy.js +65 -0
- package/dist/_vendor/core/dist/broker/ticket-state.js +106 -0
- package/dist/_vendor/core/dist/broker/ticket-store.js +476 -0
- package/dist/_vendor/core/dist/broker/transaction-authority.js +125 -0
- package/dist/_vendor/core/dist/broker/transactional-composer.js +205 -0
- package/dist/_vendor/core/dist/broker/types.js +27 -0
- package/dist/_vendor/core/dist/broker/unified-patch.js +116 -0
- package/dist/_vendor/core/dist/broker/wave-broker-scheduler.js +190 -0
- package/dist/_vendor/core/dist/broker/wave-generated-executor.js +194 -0
- package/dist/_vendor/core/dist/broker/wave-manifest.js +138 -0
- package/dist/_vendor/core/dist/broker/work-admission-ticket.js +301 -0
- package/dist/_vendor/core/dist/broker/workspace-topology-policy.js +46 -0
- package/dist/_vendor/core/dist/broker/write-scope-policy.js +220 -0
- package/dist/_vendor/core/dist/broker/write-ticket.js +61 -0
- package/dist/_vendor/core/dist/cache/guide-cache.js +234 -0
- package/dist/_vendor/core/dist/commit-attribution/sealed-commit-bundle.js +209 -0
- package/dist/_vendor/core/dist/commit-candidate/commit-candidate-store.js +96 -0
- package/dist/_vendor/core/dist/commit-candidate/commit-candidate.js +134 -0
- package/dist/_vendor/core/dist/daemon/daemon-config.js +143 -0
- package/dist/_vendor/core/dist/daemon/daemon-watcher.js +150 -0
- package/dist/_vendor/core/dist/equivalence/run-map-equivalence.js +358 -0
- package/dist/_vendor/core/dist/error-code-registry.generated.js +3 -0
- package/dist/_vendor/core/dist/evidence/acceptance-predicate.js +109 -0
- package/dist/_vendor/core/dist/evidence/acceptance-spec-mutation.js +22 -0
- package/dist/_vendor/core/dist/evidence/adapter-parity.js +91 -0
- package/dist/_vendor/core/dist/evidence/anti-gaming-control.js +20 -0
- package/dist/_vendor/core/dist/evidence/causal-neighborhood.js +17 -0
- package/dist/_vendor/core/dist/evidence/closure-assurance-machine.js +248 -0
- package/dist/_vendor/core/dist/evidence/complexity-interface-size.js +17 -0
- package/dist/_vendor/core/dist/evidence/concurrency-fuzz-generators.js +22 -0
- package/dist/_vendor/core/dist/evidence/concurrency-schedule-obligations.js +67 -0
- package/dist/_vendor/core/dist/evidence/constraint-solver.js +137 -0
- package/dist/_vendor/core/dist/evidence/coverage-certificate.js +24 -0
- package/dist/_vendor/core/dist/evidence/coverage-ratchet-baseline.js +47 -0
- package/dist/_vendor/core/dist/evidence/coverage-semantics.js +94 -0
- package/dist/_vendor/core/dist/evidence/coverage-universe-compiler.js +204 -0
- package/dist/_vendor/core/dist/evidence/dependency-graph-bypass-gate.js +98 -0
- package/dist/_vendor/core/dist/evidence/diagnostic-loop.js +145 -0
- package/dist/_vendor/core/dist/evidence/diff-evidence.js +200 -0
- package/dist/_vendor/core/dist/evidence/evidence-freshness-certificate.js +39 -0
- package/dist/_vendor/core/dist/evidence/evidence-ledger.js +49 -0
- package/dist/_vendor/core/dist/evidence/example-branch-generators.js +27 -0
- package/dist/_vendor/core/dist/evidence/fault-fingerprint.js +56 -0
- package/dist/_vendor/core/dist/evidence/four-plan-independent-certificate.js +291 -0
- package/dist/_vendor/core/dist/evidence/gap-planning.js +105 -0
- package/dist/_vendor/core/dist/evidence/git-boundary-evidence.js +61 -0
- package/dist/_vendor/core/dist/evidence/governance-model-adapters.js +43 -0
- package/dist/_vendor/core/dist/evidence/hostile-dogfood.js +136 -0
- package/dist/_vendor/core/dist/evidence/index.js +50 -0
- package/dist/_vendor/core/dist/evidence/legal-recovery-checkpoints.js +46 -0
- package/dist/_vendor/core/dist/evidence/mutation-lineage.js +321 -0
- package/dist/_vendor/core/dist/evidence/obligation-inventory.js +144 -0
- package/dist/_vendor/core/dist/evidence/observed-source-adapters.js +9 -0
- package/dist/_vendor/core/dist/evidence/observed-source.js +68 -0
- package/dist/_vendor/core/dist/evidence/oracle-adjudication.js +18 -0
- package/dist/_vendor/core/dist/evidence/performance-resilience-ratchet.js +62 -0
- package/dist/_vendor/core/dist/evidence/phase-suite.js +128 -0
- package/dist/_vendor/core/dist/evidence/plan-closeout-dashboard.js +124 -0
- package/dist/_vendor/core/dist/evidence/property-metamorphic-generators.js +103 -0
- package/dist/_vendor/core/dist/evidence/quality-authority.js +16 -0
- package/dist/_vendor/core/dist/evidence/quality-gauntlet.js +162 -0
- package/dist/_vendor/core/dist/evidence/quality-vector.js +12 -0
- package/dist/_vendor/core/dist/evidence/realness.js +116 -0
- package/dist/_vendor/core/dist/evidence/regression-family.js +69 -0
- package/dist/_vendor/core/dist/evidence/sandboxed-test-patch.js +65 -0
- package/dist/_vendor/core/dist/evidence/security-quality-receipts.js +53 -0
- package/dist/_vendor/core/dist/evidence/shadow-comparison.js +147 -0
- package/dist/_vendor/core/dist/evidence/state-replay.js +109 -0
- package/dist/_vendor/core/dist/evidence/structural-coverage.js +106 -0
- package/dist/_vendor/core/dist/evidence/tdd-cycle.js +285 -0
- package/dist/_vendor/core/dist/evidence/test-case-catalog.js +427 -0
- package/dist/_vendor/core/dist/evidence/validation-contract.js +350 -0
- package/dist/_vendor/core/dist/evidence/validation-receipt.js +315 -0
- package/dist/_vendor/core/dist/evidence/validator-catalog-selection.js +221 -0
- package/dist/_vendor/core/dist/evidence/validator-lifecycle.js +160 -0
- package/dist/_vendor/core/dist/evidence/wave-exit-observer-input-digest.js +107 -0
- package/dist/_vendor/core/dist/evidence/wave-exit-observer-receipt-writer.js +288 -0
- package/dist/_vendor/core/dist/evidence/wave-exit-observer-receipt.js +445 -0
- package/dist/_vendor/core/dist/git/admission.js +376 -0
- package/dist/_vendor/core/dist/git/diff-mutation-request.js +161 -0
- package/dist/_vendor/core/dist/git/format-adapter-bridge.js +370 -0
- package/dist/_vendor/core/dist/git/index.js +4 -0
- package/dist/_vendor/core/dist/git/publication-delivery-slice.js +180 -0
- package/dist/_vendor/core/dist/governance/operation-cleanup-contract.js +47 -0
- package/dist/_vendor/core/dist/governance/scope-lock.js +284 -0
- package/dist/_vendor/core/dist/guidance/first-layer-command-contracts.js +172 -0
- package/dist/_vendor/core/dist/guidance/guidance-packet.js +73 -0
- package/dist/_vendor/core/dist/guidance/index.js +8 -0
- package/dist/_vendor/core/dist/guidance/intent-classifier.js +495 -0
- package/dist/_vendor/core/dist/guidance/legacy-route-plan.js +317 -0
- package/dist/_vendor/core/dist/guidance/mutation-gate.js +120 -0
- package/dist/_vendor/core/dist/guidance/project-probe.js +370 -0
- package/dist/_vendor/core/dist/guidance/route-engine.js +253 -0
- package/dist/_vendor/core/dist/guidance/session-store.js +104 -0
- package/dist/_vendor/core/dist/hash-lock/hash-lock.js +89 -0
- package/dist/_vendor/core/dist/index.js +26 -0
- package/dist/_vendor/core/dist/lane/lane-capability-provider.js +242 -0
- package/dist/_vendor/core/dist/lane/lifecycle.js +62 -0
- package/dist/_vendor/core/dist/lane/wip-ownership-transition.js +134 -0
- package/dist/_vendor/core/dist/manager/atom-generator.js +455 -0
- package/dist/_vendor/core/dist/manager/atom-space.js +41 -0
- package/dist/_vendor/core/dist/manager/id-allocator.js +80 -0
- package/dist/_vendor/core/dist/manager/map-generator/errors.js +15 -0
- package/dist/_vendor/core/dist/manager/map-generator/normalize-fields.js +70 -0
- package/dist/_vendor/core/dist/manager/map-generator/normalize-lineage.js +76 -0
- package/dist/_vendor/core/dist/manager/map-generator/runtime-support.js +194 -0
- package/dist/_vendor/core/dist/manager/map-generator/spec-support.js +164 -0
- package/dist/_vendor/core/dist/manager/map-generator/types.js +1 -0
- package/dist/_vendor/core/dist/manager/map-generator.js +151 -0
- package/dist/_vendor/core/dist/manager/map-id-allocator.js +68 -0
- package/dist/_vendor/core/dist/manager/scaffold.js +144 -0
- package/dist/_vendor/core/dist/manager/test-runner/report-support.js +212 -0
- package/dist/_vendor/core/dist/manager/test-runner.js +417 -0
- package/dist/_vendor/core/dist/maps/atom-memo-cache.js +102 -0
- package/dist/_vendor/core/dist/maps/edge-contract-runner.js +133 -0
- package/dist/_vendor/core/dist/maps/fingerprint-checker.js +81 -0
- package/dist/_vendor/core/dist/maps/map-health-report.js +137 -0
- package/dist/_vendor/core/dist/maps/mermaid-gen.js +55 -0
- package/dist/_vendor/core/dist/maps/shadow-comparator.js +127 -0
- package/dist/_vendor/core/dist/police/constants.js +2 -0
- package/dist/_vendor/core/dist/police/dependency-graph.js +109 -0
- package/dist/_vendor/core/dist/police/family.js +295 -0
- package/dist/_vendor/core/dist/police/forbidden-import-scanner.js +72 -0
- package/dist/_vendor/core/dist/police/index.js +41 -0
- package/dist/_vendor/core/dist/police/layer-boundary.js +94 -0
- package/dist/_vendor/core/dist/police/registry-consistency.js +52 -0
- package/dist/_vendor/core/dist/police/regression-compare.js +197 -0
- package/dist/_vendor/core/dist/police/rescue-family.js +299 -0
- package/dist/_vendor/core/dist/police/role-registry.js +29 -0
- package/dist/_vendor/core/dist/police/roles/adopter-neutrality.js +44 -0
- package/dist/_vendor/core/dist/police/roles/atomization.js +81 -0
- package/dist/_vendor/core/dist/police/roles/decomposition.js +115 -0
- package/dist/_vendor/core/dist/police/roles/dedup.js +84 -0
- package/dist/_vendor/core/dist/police/roles/demand.js +40 -0
- package/dist/_vendor/core/dist/police/roles/evidence-integrity.js +107 -0
- package/dist/_vendor/core/dist/police/roles/evolution.js +115 -0
- package/dist/_vendor/core/dist/police/roles/map-integration.js +77 -0
- package/dist/_vendor/core/dist/police/roles/noise-control.js +45 -0
- package/dist/_vendor/core/dist/police/roles/polymorph.js +143 -0
- package/dist/_vendor/core/dist/police/roles/quality.js +85 -0
- package/dist/_vendor/core/dist/police/roles/reversibility.js +48 -0
- package/dist/_vendor/core/dist/police/roles/rollback.js +98 -0
- package/dist/_vendor/core/dist/police/schema-validator.js +84 -0
- package/dist/_vendor/core/dist/police/shared.js +103 -0
- package/dist/_vendor/core/dist/police/suppression-keys.js +22 -0
- package/dist/_vendor/core/dist/police/types.js +1 -0
- package/dist/_vendor/core/dist/polymorph/dimension-detector.js +41 -0
- package/dist/_vendor/core/dist/polymorph/impact.js +226 -0
- package/dist/_vendor/core/dist/polymorph/template.js +60 -0
- package/dist/_vendor/core/dist/registry/atom-capsule.js +147 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability/callsites.js +131 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability/catalog.js +201 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability/files.js +51 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability/render.js +84 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability/reports.js +46 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability/types.js +32 -0
- package/dist/_vendor/core/dist/registry/atom-ref-readability.js +95 -0
- package/dist/_vendor/core/dist/registry/atom-runtime.generated.js +48 -0
- package/dist/_vendor/core/dist/registry/atom-runtime.js +42 -0
- package/dist/_vendor/core/dist/registry/capsule-registry.js +119 -0
- package/dist/_vendor/core/dist/registry/catalog-category-deriver.js +60 -0
- package/dist/_vendor/core/dist/registry/decomposition-plan.js +332 -0
- package/dist/_vendor/core/dist/registry/diff.js +275 -0
- package/dist/_vendor/core/dist/registry/map-capsule-registry.js +75 -0
- package/dist/_vendor/core/dist/registry/map-capsule.js +116 -0
- package/dist/_vendor/core/dist/registry/map-hash.js +53 -0
- package/dist/_vendor/core/dist/registry/map-registry.js +81 -0
- package/dist/_vendor/core/dist/registry/progression-policy.js +229 -0
- package/dist/_vendor/core/dist/registry/registry/document.js +53 -0
- package/dist/_vendor/core/dist/registry/registry/drift.js +61 -0
- package/dist/_vendor/core/dist/registry/registry/entry.js +150 -0
- package/dist/_vendor/core/dist/registry/registry/paths.js +67 -0
- package/dist/_vendor/core/dist/registry/registry/types.js +1 -0
- package/dist/_vendor/core/dist/registry/registry/validation.js +400 -0
- package/dist/_vendor/core/dist/registry/registry-catalog.js +171 -0
- package/dist/_vendor/core/dist/registry/registry-index.js +183 -0
- package/dist/_vendor/core/dist/registry/registry-migration.js +71 -0
- package/dist/_vendor/core/dist/registry/registry.js +6 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/constants.js +20 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/evidence.js +162 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/support.js +88 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/target.js +62 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/transition.js +102 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/types.js +5 -0
- package/dist/_vendor/core/dist/registry/replacement-lane/validation.js +128 -0
- package/dist/_vendor/core/dist/registry/replacement-lane.js +2 -0
- package/dist/_vendor/core/dist/registry/retirement-proof.js +71 -0
- package/dist/_vendor/core/dist/registry/rollback-map.js +91 -0
- package/dist/_vendor/core/dist/registry/rollback-proof.js +66 -0
- package/dist/_vendor/core/dist/registry/rollback-registry-helpers.js +18 -0
- package/dist/_vendor/core/dist/registry/rollback-types.js +6 -0
- package/dist/_vendor/core/dist/registry/rollback.js +156 -0
- package/dist/_vendor/core/dist/registry/semantic-fingerprint.js +93 -0
- package/dist/_vendor/core/dist/registry/status-machine.js +293 -0
- package/dist/_vendor/core/dist/registry/status-migration.js +33 -0
- package/dist/_vendor/core/dist/registry/urn.js +179 -0
- package/dist/_vendor/core/dist/rescue/atom-reloader.js +96 -0
- package/dist/_vendor/core/dist/rescue/disaster-recovery.js +156 -0
- package/dist/_vendor/core/dist/rescue/lineage-replayer.js +81 -0
- package/dist/_vendor/core/dist/rescue/registry-rebuilder.js +176 -0
- package/dist/_vendor/core/dist/routing/index.js +1 -0
- package/dist/_vendor/core/dist/routing/route-context.js +150 -0
- package/dist/_vendor/core/dist/schemas/broker-ticket.js +1 -0
- package/dist/_vendor/core/dist/schemas/command-manifest.js +1 -0
- package/dist/_vendor/core/dist/schemas/linked-surface-closure.js +1 -0
- package/dist/_vendor/core/dist/schemas/parallel-replay-scenario.js +1 -0
- package/dist/_vendor/core/dist/scope/linked-surface/index.js +125 -0
- package/dist/_vendor/core/dist/skills/engineering-change-method.js +106 -0
- package/dist/_vendor/core/dist/skills/incident-learning-candidate.js +150 -0
- package/dist/_vendor/core/dist/skills/index.js +2 -0
- package/dist/_vendor/core/dist/source-inventory/source-inventory.js +64 -0
- package/dist/_vendor/core/dist/spec/parse-spec/types.js +1 -0
- package/dist/_vendor/core/dist/spec/parse-spec.js +404 -0
- package/dist/_vendor/core/dist/team-agents/index.js +1 -0
- package/dist/_vendor/core/dist/team-agents/restricted-execution-gateway.js +413 -0
- package/dist/_vendor/core/dist/team-agents/worker-executor.js +158 -0
- package/dist/_vendor/core/dist/team-runtime/context-manifest.js +27 -0
- package/dist/_vendor/core/dist/team-runtime/contribution-manifest.js +31 -0
- package/dist/_vendor/core/dist/team-runtime/execution-orchestrator.js +55 -0
- package/dist/_vendor/core/dist/team-runtime/handoff-ledger.js +153 -0
- package/dist/_vendor/core/dist/team-runtime/nodejs-worker-adapter.js +78 -0
- package/dist/_vendor/core/dist/team-runtime/observability.js +148 -0
- package/dist/_vendor/core/dist/team-runtime/permission-broker.js +247 -0
- package/dist/_vendor/core/dist/team-runtime/pricing/cost-accounting.js +97 -0
- package/dist/_vendor/core/dist/team-runtime/provider-contract.js +59 -0
- package/dist/_vendor/core/dist/team-runtime/provider-registry.js +48 -0
- package/dist/_vendor/core/dist/team-runtime/provider-selection.js +122 -0
- package/dist/_vendor/core/dist/team-runtime/providers/anthropic.js +184 -0
- package/dist/_vendor/core/dist/team-runtime/providers/azure-openai.js +235 -0
- package/dist/_vendor/core/dist/team-runtime/providers/claude-code.js +307 -0
- package/dist/_vendor/core/dist/team-runtime/providers/gemini-direct.js +107 -0
- package/dist/_vendor/core/dist/team-runtime/providers/gemini.js +154 -0
- package/dist/_vendor/core/dist/team-runtime/providers/microsoft-foundry.js +254 -0
- package/dist/_vendor/core/dist/team-runtime/providers/openai.js +394 -0
- package/dist/_vendor/core/dist/telemetry/broker/decision-outcome.js +350 -0
- package/dist/_vendor/core/dist/telemetry/broker/index.js +1 -0
- package/dist/_vendor/core/dist/telemetry/compact-receipts.js +105 -0
- package/dist/_vendor/core/dist/telemetry/index.js +353 -0
- package/dist/_vendor/core/dist/telemetry/observation.js +123 -0
- package/dist/_vendor/core/dist/telemetry/parallel-replay/index.js +61 -0
- package/dist/_vendor/core/dist/telemetry/shared-write-coverage.js +52 -0
- package/dist/_vendor/core/dist/test-runner/map-integration.js +197 -0
- package/dist/_vendor/core/dist/test-runner/metrics-collector.js +33 -0
- package/dist/_vendor/core/dist/test-runner/propagation.js +217 -0
- package/dist/_vendor/core/dist/upgrade/behaviors/reshape.js +248 -0
- package/dist/_vendor/core/dist/upgrade/behaviors/retire.js +170 -0
- package/dist/_vendor/core/dist/upgrade/decomposition-decision.js +54 -0
- package/dist/_vendor/core/dist/upgrade/evolution-draft.js +208 -0
- package/dist/_vendor/core/dist/upgrade/map-curator/types.js +1 -0
- package/dist/_vendor/core/dist/upgrade/map-curator.js +458 -0
- package/dist/_vendor/core/dist/upgrade/map-propose.js +94 -0
- package/dist/_vendor/core/dist/upgrade/metrics-to-proposal.js +126 -0
- package/dist/_vendor/core/dist/upgrade/propose/failure-reason.js +33 -0
- package/dist/_vendor/core/dist/upgrade/propose/gates.js +392 -0
- package/dist/_vendor/core/dist/upgrade/propose/normalize-input.js +183 -0
- package/dist/_vendor/core/dist/upgrade/propose.js +363 -0
- package/dist/_vendor/core/dist/validation/ajv-factory.js +38 -0
- package/dist/_vendor/integration-claude-code/dist/index.js +20 -0
- package/dist/_vendor/integration-codex/dist/index.js +20 -0
- package/dist/_vendor/integration-copilot/dist/index.js +20 -0
- package/dist/_vendor/integration-cursor/dist/index.js +20 -0
- package/dist/_vendor/integration-gemini/dist/index.js +96 -0
- package/dist/_vendor/integrations-core/dist/compiler/charter-block.js +138 -0
- package/dist/_vendor/integrations-core/dist/compiler/compile.js +285 -0
- package/dist/_vendor/integrations-core/dist/compiler/skill-projection-parity.js +148 -0
- package/dist/_vendor/integrations-core/dist/compiler/skill-source-universe.js +104 -0
- package/dist/_vendor/integrations-core/dist/compiler/skill-templates.js +354 -0
- package/dist/_vendor/integrations-core/dist/distribution/editor-global-overlay.js +230 -0
- package/dist/_vendor/integrations-core/dist/distribution/external-skill-catalog.js +332 -0
- package/dist/_vendor/integrations-core/dist/distribution/install-profile.js +71 -0
- package/dist/_vendor/integrations-core/dist/distribution/skill-catalog.js +39 -0
- package/dist/_vendor/integrations-core/dist/distribution/skill-distribution-manager.js +102 -0
- package/dist/_vendor/integrations-core/dist/index.js +30 -0
- package/dist/_vendor/integrations-core/dist/manifest/construct.js +157 -0
- package/dist/_vendor/integrations-core/dist/manifest/schema.js +43 -0
- package/dist/_vendor/integrations-core/dist/manifest/types.js +1 -0
- package/dist/_vendor/integrations-core/dist/verify/types.js +9 -0
- package/dist/_vendor/integrations-core/dist/verify/uninstall-safety.js +63 -0
- package/dist/_vendor/integrations-core/dist/verify/verify-installed.js +45 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-atom-map-refactor.skill.md +145 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-bug-backlog.skill.md +101 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-create.skill.md +50 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-deep-module-refactor.files/references/deepening.md +28 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-deep-module-refactor.files/references/design-it-twice.md +21 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-deep-module-refactor.skill.md +124 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-diagnostic-loop.skill.md +92 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-dispatch.skill.md +456 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-error-code-resolver.skill.md +117 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-evidence.skill.md +121 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-framework-quickfix.skill.md +83 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-framework-temp-claim.skill.md +275 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-git-pathspec-emergency-commit.skill.md +172 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/boundary-confusion.md +42 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/entry-friction.md +29 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/fallback-design.md +23 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/index.md +84 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/learning-loop.md +22 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/route-interpretation.md +19 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.files/references/tooling-mismatch.md +97 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-governance-router.skill.md +482 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-handoff.skill.md +100 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-internal-build-sync.skill.md +72 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-lock.skill.md +57 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-memory-consolidate.skill.md +75 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-minimal-patch-rebuilder.skill.md +103 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-next.skill.md +309 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-orient.skill.md +59 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-plan-authoring.skill.md +147 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-residue-cleanup.skill.md +35 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-task-card-authoring.skill.md +433 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-task-intent-resolver.skill.md +112 -0
- package/dist/_vendor/integrations-core/templates/skills/atm-upgrade-scan.skill.md +50 -0
- package/dist/_vendor/integrations-core/templates/skills/mailbox-worker-execution.skill.md +93 -0
- package/dist/_vendor/integrations-core/templates/skills/skill.schema.json +172 -0
- package/dist/_vendor/language-csharp/dist/index.js +16 -0
- package/dist/_vendor/language-csharp/dist/language-csharp-adapter.js +240 -0
- package/dist/_vendor/language-js/dist/index.js +16 -0
- package/dist/_vendor/language-js/dist/language-js-adapter.js +423 -0
- package/dist/_vendor/language-python/dist/index.js +19 -0
- package/dist/_vendor/language-python/dist/language-python-adapter/planning.js +197 -0
- package/dist/_vendor/language-python/dist/language-python-adapter/profile.js +199 -0
- package/dist/_vendor/language-python/dist/language-python-adapter/scanner.js +77 -0
- package/dist/_vendor/language-python/dist/language-python-adapter/shared.js +37 -0
- package/dist/_vendor/language-python/dist/language-python-adapter/validation.js +42 -0
- package/dist/_vendor/language-python/dist/language-python-adapter.js +37 -0
- package/dist/_vendor/plugin-experience-loop/dist/index.js +411 -0
- package/dist/_vendor/plugin-experience-loop/schemas/memory-nudge.schema.json +29 -0
- package/dist/_vendor/plugin-experience-loop/schemas/skill-amendment.schema.json +49 -0
- package/dist/_vendor/plugin-experience-loop/schemas/skill-candidate.schema.json +69 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/bootstrap/bootstrap-support.js +462 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/bootstrap/implementation.js +483 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/bootstrap/root-entry-patching.js +129 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/bootstrap.js +1 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/budget.js +75 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/prompt.js +101 -0
- package/dist/_vendor/plugin-governance-local/dist/bootstrap/types.js +1 -0
- package/dist/_vendor/plugin-governance-local/dist/default-guards.js +51 -0
- package/dist/_vendor/plugin-governance-local/dist/index.js +23 -0
- package/dist/_vendor/plugin-governance-local/dist/layout.js +22 -0
- package/dist/_vendor/plugin-governance-local/dist/stores/helpers.js +293 -0
- package/dist/_vendor/plugin-governance-local/dist/stores.js +484 -0
- package/dist/_vendor/plugin-governance-local/dist/versioning.js +68 -0
- package/dist/_vendor/plugin-human-review/dist/decision-log.js +130 -0
- package/dist/_vendor/plugin-human-review/dist/index.js +8 -0
- package/dist/_vendor/plugin-human-review/dist/map-curator-bridge.js +67 -0
- package/dist/_vendor/plugin-human-review/dist/queue.js +196 -0
- package/dist/_vendor/plugin-review-advisory/dist/conversation-machine-findings.js +191 -0
- package/dist/_vendor/plugin-review-advisory/dist/deep-module-provider.js +99 -0
- package/dist/_vendor/plugin-review-advisory/dist/index.js +306 -0
- package/dist/_vendor/plugin-review-advisory/dist/promotion-gates.js +145 -0
- package/dist/_vendor/plugin-rule-guard/dist/index.js +8 -0
- package/dist/_vendor/plugin-rule-guard/dist/lifecycle-police.js +116 -0
- package/dist/_vendor/plugin-rule-guard/dist/neutrality-scanner.js +188 -0
- package/dist/_vendor/plugin-rule-guard/dist/rule-justification.js +27 -0
- package/dist/_vendor/plugin-sdk/dist/atomization-planning.js +157 -0
- package/dist/_vendor/plugin-sdk/dist/behavior-registry.js +145 -0
- package/dist/_vendor/plugin-sdk/dist/behavior.js +6 -0
- package/dist/_vendor/plugin-sdk/dist/capability.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/conversation/conversation-evidence-extractor.js +130 -0
- package/dist/_vendor/plugin-sdk/dist/conversation/conversation-feedback-loop.js +178 -0
- package/dist/_vendor/plugin-sdk/dist/conversation/conversation-patch-draft-bridge.js +246 -0
- package/dist/_vendor/plugin-sdk/dist/conversation/conversation-review-finding.js +6 -0
- package/dist/_vendor/plugin-sdk/dist/conversation/conversation-transcript-reviewer.js +177 -0
- package/dist/_vendor/plugin-sdk/dist/conversation/index.js +5 -0
- package/dist/_vendor/plugin-sdk/dist/detector/evidence-pattern-detector.js +184 -0
- package/dist/_vendor/plugin-sdk/dist/detector/index.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/effect-node.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/external-task-source.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/governance/index.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/governance/layout.js +17 -0
- package/dist/_vendor/plugin-sdk/dist/governance/stores.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/index.js +12 -0
- package/dist/_vendor/plugin-sdk/dist/injector-plugin.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/language-adapter.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/lifecycle.js +5 -0
- package/dist/_vendor/plugin-sdk/dist/police.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/project-adapter.js +1 -0
- package/dist/_vendor/plugin-sdk/dist/test-runner.js +1 -0
- package/dist/commands/agent-pack.js +6 -6
- package/dist/commands/atm-chart/constants.js +2 -2
- package/dist/commands/atm-chart/render-verify.js +1 -1
- package/dist/commands/atm-chart.js +1 -1
- package/dist/commands/atom-capsule.js +2 -2
- package/dist/commands/atom-ref.js +1 -1
- package/dist/commands/batch/implementation.js +3 -3
- package/dist/commands/batch/plan-executor.js +3 -3
- package/dist/commands/bootstrap.js +1 -1
- package/dist/commands/broker/batch-execute-actions.js +5 -5
- package/dist/commands/broker/broker-decision-observation.js +1 -1
- package/dist/commands/broker/census/index.js +1 -1
- package/dist/commands/broker/migrate/implementation.js +2 -2
- package/dist/commands/broker/parallel-admission/final-verdict.js +1 -1
- package/dist/commands/broker/parser.js +1 -1
- package/dist/commands/broker/persistence.js +2 -2
- package/dist/commands/broker/plan-batch-action.js +4 -4
- package/dist/commands/broker/policy-actions.js +1 -1
- package/dist/commands/broker/post-compose-semantic-validation.js +1 -1
- package/dist/commands/broker/proposal-actions.js +1 -1
- package/dist/commands/broker/reconcile/implementation.js +3 -3
- package/dist/commands/broker/registry-actions.js +8 -8
- package/dist/commands/broker/replay/dashboard-view-model.js +1 -1
- package/dist/commands/broker/replay/dashboard.js +1 -1
- package/dist/commands/broker/replay/implementation.js +1 -1
- package/dist/commands/broker/runner-sync-supersession.js +1 -1
- package/dist/commands/broker/shared-delivery-commit-transaction.js +1 -1
- package/dist/commands/broker/shared-surface.js +3 -3
- package/dist/commands/broker/steward-queues.js +2 -2
- package/dist/commands/broker/steward-runtime-actions.js +5 -5
- package/dist/commands/broker/wave-scheduler-actions.js +1 -1
- package/dist/commands/broker-conflict-resolution.js +1 -1
- package/dist/commands/budget.js +1 -1
- package/dist/commands/cache.js +1 -1
- package/dist/commands/candidates.js +4 -4
- package/dist/commands/create-map.js +2 -2
- package/dist/commands/create.js +1 -1
- package/dist/commands/daemon.js +4 -4
- package/dist/commands/doctor/lifecycle.js +18 -1
- package/dist/commands/doctor/run-doctor.js +1 -1
- package/dist/commands/doctor/utilities.js +1 -1
- package/dist/commands/evidence/bundle-io/implementation.js +1 -1
- package/dist/commands/evidence/command-runs.js +1 -1
- package/dist/commands/evidence/observed-source-loader.js +1 -1
- package/dist/commands/evidence/verbs/diagnose.js +1 -1
- package/dist/commands/evidence/verbs/run.js +2 -2
- package/dist/commands/evidence/verbs/wave-exit-observer.js +2 -2
- package/dist/commands/experience.js +4 -4
- package/dist/commands/explain.js +1 -1
- package/dist/commands/framework-development/closure-packet-schema/implementation.js +2 -2
- package/dist/commands/framework-development/framework-temp-lock-projection.js +1 -1
- package/dist/commands/framework-development/framework-temp-publication-capability.js +10 -3
- package/dist/commands/framework-development/runner-publication-close-handoff.js +1 -1
- package/dist/commands/framework-development/runner-publication-lifecycle.js +1 -1
- package/dist/commands/framework-development/runner-sync-admission.js +1 -1
- package/dist/commands/git-governance/implementation/admission-command.js +5 -5
- package/dist/commands/git-governance/implementation/broker-hook-bypass-preflight.js +1 -1
- package/dist/commands/git-governance/implementation/commit-attempt-boundary.js +9 -1
- package/dist/commands/git-governance/implementation/commit-authority-scopes.js +21 -7
- package/dist/commands/git-governance/implementation/commit-bundle-resolution.js +1 -1
- package/dist/commands/git-governance/implementation/commit-command.js +12 -1
- package/dist/commands/git-governance/implementation/git-head-evidence-transaction.js +1 -1
- package/dist/commands/git-governance/implementation/identity-check-command.js +1 -1
- package/dist/commands/git-governance/implementation/push-command.js +2 -2
- package/dist/commands/git-governance/implementation/sealed-commit-attribution.js +1 -1
- package/dist/commands/git-governance/implementation/task-scope-staging.js +13 -1
- package/dist/commands/git-governance/protected-governance-state.js +1 -1
- package/dist/commands/git-governance/work-admission-check.js +37 -8
- package/dist/commands/git-governance.js +2 -2
- package/dist/commands/git.js +1 -1
- package/dist/commands/guard.js +1 -1
- package/dist/commands/guide.js +1 -1
- package/dist/commands/handoff.js +1 -1
- package/dist/commands/health-report.js +1 -1
- package/dist/commands/hook/commit-range-guard/implementation.js +1 -1
- package/dist/commands/hook/pre-commit/implementation.js +2 -2
- package/dist/commands/hook/pre-commit/scope-ownership.js +2 -2
- package/dist/commands/hook/pre-commit/support.js +21 -1
- package/dist/commands/integration/adapter-parity.js +1 -1
- package/dist/commands/integration/adapters.js +5 -5
- package/dist/commands/integration/health.js +1 -1
- package/dist/commands/integration-hooks/implementation.js +1 -1
- package/dist/commands/lane-session/mutation-authority-adapter.js +1 -1
- package/dist/commands/lock.js +1 -1
- package/dist/commands/map-capsule.js +3 -3
- package/dist/commands/next/claim-admission.js +1 -1
- package/dist/commands/next/claim-helpers.js +1 -1
- package/dist/commands/next/claim-orchestration.js +1 -1
- package/dist/commands/next/plan-scoped-preflight.js +1 -1
- package/dist/commands/next/playbook-projection/legacy-guidance.js +1 -1
- package/dist/commands/next/result-compaction.js +1 -1
- package/dist/commands/next/route-resolution/pending-worktree.js +2 -2
- package/dist/commands/next.js +2 -2
- package/dist/commands/orient.js +1 -1
- package/dist/commands/police.js +1 -1
- package/dist/commands/registry-diff.js +1 -1
- package/dist/commands/registry-shared.js +2 -2
- package/dist/commands/registry.js +4 -4
- package/dist/commands/replacement-lane.js +1 -1
- package/dist/commands/rescue.js +2 -2
- package/dist/commands/review-advisory.js +2 -2
- package/dist/commands/review.js +4 -4
- package/dist/commands/rollback.js +2 -2
- package/dist/commands/route/freeze-patch.js +3 -3
- package/dist/commands/route/lifecycle.js +1 -1
- package/dist/commands/route/takeover.js +1 -1
- package/dist/commands/runtime-adapter-readiness.js +4 -4
- package/dist/commands/self-host-alpha.js +1 -1
- package/dist/commands/shared/result-core.js +24 -1
- package/dist/commands/spec-shared.js +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/taskflow/auto-evidence-mapper.js +1 -1
- package/dist/commands/taskflow/broker-gate.js +2 -2
- package/dist/commands/taskflow/close-owned-delivery-dirty-admission.js +1 -1
- package/dist/commands/taskflow/close-preflight.js +3 -3
- package/dist/commands/taskflow/implementation.js +4 -4
- package/dist/commands/taskflow/runner-publication-close-queue.js +1 -1
- package/dist/commands/taskflow/runner-selection-evidence.js +2 -2
- package/dist/commands/taskflow/write-readiness.js +1 -1
- package/dist/commands/tasks/acceptance-evidence-import.js +1 -1
- package/dist/commands/tasks/claim-orchestrator.js +2 -2
- package/dist/commands/tasks/claim-repair-diagnostics.js +3 -3
- package/dist/commands/tasks/claim-work-admission.js +4 -4
- package/dist/commands/tasks/close-orchestrator/acceptance-evidence-gate.js +1 -1
- package/dist/commands/tasks/close-orchestrator.js +1 -1
- package/dist/commands/tasks/dependency-gate.js +1 -1
- package/dist/commands/tasks/import-orchestrator.js +9 -0
- package/dist/commands/tasks/legacy/implementation.js +2 -2
- package/dist/commands/tasks/planning-mirror-reconcile.js +82 -0
- package/dist/commands/tasks/reconcile-orchestrator.js +12 -1
- package/dist/commands/tasks/release-wip-transaction.js +1 -1
- package/dist/commands/tasks/scope-amendment/implementation.js +2 -2
- package/dist/commands/tasks/scope-preflight/implementation.js +1 -1
- package/dist/commands/tasks/task-card-contract-import.js +1 -1
- package/dist/commands/tasks/task-work-admission-import.js +1 -1
- package/dist/commands/tasks.js +1 -1
- package/dist/commands/team/legacy/broker-observability.js +3 -3
- package/dist/commands/team/legacy/handoff-handler.js +2 -2
- package/dist/commands/team/legacy/patrol-handler.js +1 -1
- package/dist/commands/team/legacy/plan-orchestration.js +2 -2
- package/dist/commands/team/legacy/planning-context.js +1 -1
- package/dist/commands/team/legacy/provider-execution.js +7 -7
- package/dist/commands/team/legacy/runtime-governance.js +1 -1
- package/dist/commands/team/legacy/team-run-runtime.js +1 -1
- package/dist/commands/team/role-provider-resolution.js +1 -1
- package/dist/commands/team/role-skill-packs.js +2 -2
- package/dist/commands/team/runtime-bridges.js +7 -7
- package/dist/commands/team/scheduler.js +2 -2
- package/dist/commands/team-runtime-gates.js +1 -1
- package/dist/commands/team-wave.js +5 -5
- package/dist/commands/telemetry.js +2 -2
- package/dist/commands/test-catalog.js +2 -2
- package/dist/commands/test.js +7 -7
- package/dist/commands/upgrade/experimental.js +1 -1
- package/dist/commands/upgrade/proposal/context-budget.js +2 -2
- package/dist/commands/upgrade/proposal/guided-legacy.js +1 -1
- package/dist/commands/upgrade/scan.js +1 -1
- package/dist/commands/upgrade-map-propose.js +1 -1
- package/dist/commands/upgrade.js +1 -1
- package/dist/commands/validate.js +1 -1
- package/dist/commands/verify.js +2 -2
- package/dist/commands/welcome.js +1 -1
- package/dist/commands/write-ticket.js +2 -2
- package/dist/compatibility-matrix.json +30 -0
- package/dist/compatibility-matrix.legacy.json +17 -0
- package/dist/known-bad-versions.json +4 -0
- package/dist/release/integrity.json +23 -0
- package/dist/schemas/governance/default-guards.schema.json +121 -0
- package/dist/templates/root-drop/.atm/charter/atm-first-principles.template.md +33 -0
- package/dist/templates/root-drop/.atm/charter/atomic-charter.template.md +104 -0
- package/dist/templates/root-drop/.atm/charter/charter-invariants.template.json +215 -0
- package/dist/templates/root-drop/.atm/context/INITIAL_SUMMARY.md +11 -0
- package/dist/templates/root-drop/.atm/profile/default.md +21 -0
- package/dist/templates/root-drop/.atm/scripts/WRAPPER_DEDUP_PLAN.md +169 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-create.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-evidence.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-handoff.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-lock.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-next.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-orient.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/ps/atm-upgrade-scan.ps1 +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-create.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-evidence.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-handoff.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-lock.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-next.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-orient.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/sh/atm-upgrade-scan.sh +5 -0
- package/dist/templates/root-drop/.atm/scripts/wrappers.json +55 -0
- package/dist/templates/root-drop/AGENTS.md +56 -0
- package/package.json +26 -14
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { calculateBrokerDecision } from './decision.js';
|
|
4
|
+
import { buildVirtualAtomInUseRegistry, cleanupStale, loadRegistry } from './registry.js';
|
|
5
|
+
import { readGitHeadCommit } from './steward.js';
|
|
6
|
+
import { buildFileHashesBefore, deriveTeamAtomRefs, deriveTeamProposalAdmission, normalizePathList, normalizeStringList, readGitBranchRef, readSessionId, toSyntheticAtomSlug, toProposalAdmissionRequest } from './team-lane/support.js';
|
|
7
|
+
export const DEFAULT_TEAM_STEWARD_ID = 'neutral-write-steward';
|
|
8
|
+
export const DEFAULT_BROKER_REGISTRY_RELATIVE_PATH = '.atm/runtime/write-broker.registry.json';
|
|
9
|
+
const HOT_FILE_BASENAMES = new Set(['tasks.ts', 'next.ts', 'evidence.ts', 'hook.ts', 'team.ts', 'broker.ts']);
|
|
10
|
+
export function buildTeamBrokerRunRecord(input) {
|
|
11
|
+
const taskId = input.request.taskId?.trim();
|
|
12
|
+
const transactionIds = normalizeStringList(input.transactionIds ?? []);
|
|
13
|
+
return {
|
|
14
|
+
schemaId: 'atm.brokerOperationRunRecord.v1',
|
|
15
|
+
specVersion: '0.1.0',
|
|
16
|
+
migration: {
|
|
17
|
+
strategy: 'none',
|
|
18
|
+
fromVersion: null,
|
|
19
|
+
notes: 'team lane run record'
|
|
20
|
+
},
|
|
21
|
+
runId: input.runId,
|
|
22
|
+
planId: input.planId,
|
|
23
|
+
request_identity: [input.request.requestId],
|
|
24
|
+
actor_ids: [input.request.actorId],
|
|
25
|
+
request_files: [input.request.filePath],
|
|
26
|
+
adapter_choice: input.adapterChoice,
|
|
27
|
+
applied_files: input.appliedFiles ?? [input.request.filePath],
|
|
28
|
+
lane_decision: input.laneDecision,
|
|
29
|
+
merge_verdict: input.mergeVerdict,
|
|
30
|
+
evidence_path: input.evidencePath,
|
|
31
|
+
...(taskId ? { task_ids: [taskId] } : {}),
|
|
32
|
+
...(input.commitSha ? { commit_sha: input.commitSha } : {}),
|
|
33
|
+
...(transactionIds.length > 0 ? { transaction_ids: transactionIds } : {})
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function buildTeamBrokerRunRecordEnvelope(input) {
|
|
37
|
+
return {
|
|
38
|
+
schemaId: 'atm.brokerOperationRunRecordEnvelope.v1',
|
|
39
|
+
specVersion: '0.1.0',
|
|
40
|
+
migration: {
|
|
41
|
+
strategy: 'none',
|
|
42
|
+
fromVersion: null,
|
|
43
|
+
notes: 'team lane run record'
|
|
44
|
+
},
|
|
45
|
+
runId: input.runId,
|
|
46
|
+
planId: input.planId,
|
|
47
|
+
records: [...input.records]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function buildTeamWriteIntent(input) {
|
|
51
|
+
const task = input.task;
|
|
52
|
+
const baseCommit = readGitHeadCommit(path.resolve(input.cwd)) ?? 'unknown-base-commit';
|
|
53
|
+
const targetFiles = [...new Set(input.writePaths.map((entry) => entry.replace(/\\/g, '/')).filter(Boolean))]
|
|
54
|
+
.sort((left, right) => left.localeCompare(right));
|
|
55
|
+
const hotFiles = targetFiles.filter((entry) => HOT_FILE_BASENAMES.has(path.posix.basename(entry)));
|
|
56
|
+
const proposalAdmission = deriveTeamProposalAdmission(task, hotFiles);
|
|
57
|
+
return {
|
|
58
|
+
schemaId: 'atm.writeIntent.v1',
|
|
59
|
+
specVersion: '0.1.0',
|
|
60
|
+
migration: { strategy: 'none', fromVersion: null, notes: 'team plan/start broker lane' },
|
|
61
|
+
taskId: input.taskId,
|
|
62
|
+
actorId: input.actorId,
|
|
63
|
+
baseCommit,
|
|
64
|
+
targetFiles,
|
|
65
|
+
atomRefs: deriveTeamAtomRefs(task, input.taskId),
|
|
66
|
+
sharedSurfaces: {
|
|
67
|
+
generators: [],
|
|
68
|
+
projections: [],
|
|
69
|
+
registries: [],
|
|
70
|
+
validators: [],
|
|
71
|
+
artifacts: []
|
|
72
|
+
},
|
|
73
|
+
requestedLane: 'auto',
|
|
74
|
+
...(proposalAdmission ? { proposalAdmission } : {})
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export function resolveTeamBrokerLane(decision) {
|
|
78
|
+
if (decision.admission?.state === 'proposal-submitted') {
|
|
79
|
+
return {
|
|
80
|
+
chosenLane: 'direct-brokered',
|
|
81
|
+
stewardId: null,
|
|
82
|
+
composerPath: null,
|
|
83
|
+
safeToStart: false,
|
|
84
|
+
blockedReasons: [decision.admission.reason]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (decision.verdict === 'blocked-cid-conflict'
|
|
88
|
+
|| decision.verdict === 'blocked-shared-surface'
|
|
89
|
+
|| decision.verdict === 'blocked-active-lease'
|
|
90
|
+
|| decision.lane === 'blocked') {
|
|
91
|
+
return {
|
|
92
|
+
chosenLane: 'blocked',
|
|
93
|
+
stewardId: null,
|
|
94
|
+
composerPath: null,
|
|
95
|
+
safeToStart: false,
|
|
96
|
+
blockedReasons: [
|
|
97
|
+
decision.reason,
|
|
98
|
+
...decision.conflicts.map((conflict) => conflict.detail)
|
|
99
|
+
]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (decision.verdict === 'needs-physical-split') {
|
|
103
|
+
return {
|
|
104
|
+
chosenLane: 'neutral-steward',
|
|
105
|
+
stewardId: DEFAULT_TEAM_STEWARD_ID,
|
|
106
|
+
composerPath: 'broker compose -> steward plan/apply',
|
|
107
|
+
safeToStart: true,
|
|
108
|
+
blockedReasons: []
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (decision.lane === 'deterministic-composer') {
|
|
112
|
+
return {
|
|
113
|
+
chosenLane: 'deterministic-composer',
|
|
114
|
+
stewardId: null,
|
|
115
|
+
composerPath: 'broker compose',
|
|
116
|
+
safeToStart: true,
|
|
117
|
+
blockedReasons: []
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
chosenLane: decision.lane === 'serial' ? 'serial' : 'direct-brokered',
|
|
122
|
+
stewardId: null,
|
|
123
|
+
composerPath: null,
|
|
124
|
+
safeToStart: true,
|
|
125
|
+
blockedReasons: []
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export function evaluateTeamBrokerLane(input) {
|
|
129
|
+
const registryPath = input.registryPath ?? path.join(path.resolve(input.cwd), DEFAULT_BROKER_REGISTRY_RELATIVE_PATH);
|
|
130
|
+
const writeIntent = buildTeamWriteIntent(input);
|
|
131
|
+
const registry = cleanupStale(loadRegistry(registryPath, { persistCleanup: input.readOnly !== true }));
|
|
132
|
+
const virtualAtomInUseRegistry = buildVirtualAtomInUseRegistry(registry);
|
|
133
|
+
const decision = calculateBrokerDecision(writeIntent, registry);
|
|
134
|
+
const resolution = resolveTeamBrokerLane(decision);
|
|
135
|
+
const writeTransaction = buildTeamBrokerWriteTransactionEvidence({
|
|
136
|
+
cwd: input.cwd,
|
|
137
|
+
taskId: input.taskId,
|
|
138
|
+
actorId: input.actorId,
|
|
139
|
+
writeIntent,
|
|
140
|
+
decision,
|
|
141
|
+
writePaths: input.writePaths
|
|
142
|
+
});
|
|
143
|
+
const admission = decision.admission ?? {
|
|
144
|
+
trigger: 'not-required',
|
|
145
|
+
state: 'not-required',
|
|
146
|
+
requiresProposal: false,
|
|
147
|
+
summarySubmitted: false,
|
|
148
|
+
hotFiles: [],
|
|
149
|
+
boundedRegions: [],
|
|
150
|
+
rearbitrationRequired: false,
|
|
151
|
+
reason: 'No proposal admission evidence was emitted.'
|
|
152
|
+
};
|
|
153
|
+
const evidence = {
|
|
154
|
+
schemaId: 'atm.teamBrokerLaneEvidence.v1',
|
|
155
|
+
specVersion: '0.1.0',
|
|
156
|
+
taskId: input.taskId,
|
|
157
|
+
actorId: input.actorId,
|
|
158
|
+
registryPath: DEFAULT_BROKER_REGISTRY_RELATIVE_PATH,
|
|
159
|
+
writeIntent,
|
|
160
|
+
writeTransaction,
|
|
161
|
+
decision,
|
|
162
|
+
admission,
|
|
163
|
+
virtualAtomInUseRegistry,
|
|
164
|
+
chosenLane: resolution.chosenLane,
|
|
165
|
+
stewardId: resolution.stewardId,
|
|
166
|
+
composerPath: resolution.composerPath,
|
|
167
|
+
safeToStart: resolution.safeToStart,
|
|
168
|
+
blockedReasons: resolution.blockedReasons
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
ok: resolution.safeToStart,
|
|
172
|
+
evidence
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export function buildTeamBrokerEvidence(result) {
|
|
176
|
+
return result.evidence;
|
|
177
|
+
}
|
|
178
|
+
export function buildTeamBrokerWriteTransactionEvidence(input) {
|
|
179
|
+
const cwd = path.resolve(input.cwd);
|
|
180
|
+
const allowedFiles = normalizePathList(input.writePaths);
|
|
181
|
+
const readSet = normalizePathList([
|
|
182
|
+
...allowedFiles,
|
|
183
|
+
...input.writeIntent.atomRefs.map((ref) => ref.sourceRange?.filePath ?? '').filter(Boolean)
|
|
184
|
+
]);
|
|
185
|
+
const writeSet = normalizePathList(input.writeIntent.targetFiles);
|
|
186
|
+
const startedAt = new Date().toISOString();
|
|
187
|
+
const leaseEpoch = Date.now();
|
|
188
|
+
const leaseSeconds = Math.max(1, Math.floor(input.writeIntent.leaseBounds?.requestedSeconds ?? 1800));
|
|
189
|
+
const expiresAt = new Date(Date.now() + leaseSeconds * 1000).toISOString();
|
|
190
|
+
const transactionSeed = [
|
|
191
|
+
input.taskId,
|
|
192
|
+
input.actorId,
|
|
193
|
+
input.writeIntent.baseCommit,
|
|
194
|
+
input.decision.intentId,
|
|
195
|
+
leaseEpoch,
|
|
196
|
+
...writeSet
|
|
197
|
+
].join('\n');
|
|
198
|
+
return {
|
|
199
|
+
schemaId: 'atm.teamBrokerWriteTransaction.v1',
|
|
200
|
+
transactionId: `txn-${createHash('sha256').update(transactionSeed).digest('hex').slice(0, 16)}`,
|
|
201
|
+
taskId: input.taskId,
|
|
202
|
+
principalId: input.actorId,
|
|
203
|
+
actorId: input.actorId,
|
|
204
|
+
sessionId: readSessionId(),
|
|
205
|
+
instanceId: `${input.actorId}@local`,
|
|
206
|
+
worktreeId: cwd,
|
|
207
|
+
branchRef: readGitBranchRef(cwd),
|
|
208
|
+
baseHead: input.writeIntent.baseCommit,
|
|
209
|
+
leaseEpoch,
|
|
210
|
+
allowedFiles,
|
|
211
|
+
readSet,
|
|
212
|
+
writeSet,
|
|
213
|
+
fileHashesBefore: buildFileHashesBefore(cwd, writeSet),
|
|
214
|
+
brokerDecision: {
|
|
215
|
+
verdict: input.decision.verdict,
|
|
216
|
+
lane: input.decision.lane,
|
|
217
|
+
intentId: input.decision.intentId,
|
|
218
|
+
parallelSafetyReason: input.decision.verdict === 'parallel-safe'
|
|
219
|
+
? 'no-known-textual-or-resource-conflict'
|
|
220
|
+
: null
|
|
221
|
+
},
|
|
222
|
+
admissionState: input.decision.admission?.state ?? 'not-required',
|
|
223
|
+
startedAt,
|
|
224
|
+
expiresAt,
|
|
225
|
+
heartbeatAt: startedAt
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
export function buildTeamBrokerRuntimeActivationHandshake(input) {
|
|
229
|
+
const laneResult = evaluateTeamBrokerLane(input);
|
|
230
|
+
const approved = laneResult.ok && laneResult.evidence.safeToStart;
|
|
231
|
+
const allowedFiles = [...new Set(input.writePaths.map((entry) => entry.replace(/\\/g, '/')).filter(Boolean))]
|
|
232
|
+
.sort((left, right) => left.localeCompare(right));
|
|
233
|
+
const evidence = {
|
|
234
|
+
schemaId: 'atm.teamBrokerRuntimeActivationHandshake.v1',
|
|
235
|
+
specVersion: '0.1.0',
|
|
236
|
+
taskId: input.taskId,
|
|
237
|
+
actorId: input.actorId,
|
|
238
|
+
registryPath: laneResult.evidence.registryPath,
|
|
239
|
+
brokerLane: laneResult.evidence,
|
|
240
|
+
activationState: approved ? 'activated' : 'blocked',
|
|
241
|
+
scopedWriteExecution: {
|
|
242
|
+
approved,
|
|
243
|
+
allowedFiles,
|
|
244
|
+
evidencePath: input.evidencePath ?? null,
|
|
245
|
+
acceptedInputs: ['PatchProposal', 'MergePlan', 'StewardPlan']
|
|
246
|
+
},
|
|
247
|
+
runtimeBoundary: {
|
|
248
|
+
gitWrite: false,
|
|
249
|
+
taskLifecycle: false,
|
|
250
|
+
selfClose: false
|
|
251
|
+
},
|
|
252
|
+
blockedReasons: approved ? [] : [...laneResult.evidence.blockedReasons]
|
|
253
|
+
};
|
|
254
|
+
return {
|
|
255
|
+
ok: approved,
|
|
256
|
+
evidence
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
export function brokerLaneToFindings(result) {
|
|
260
|
+
if (result.ok) {
|
|
261
|
+
return [];
|
|
262
|
+
}
|
|
263
|
+
const { decision, blockedReasons } = result.evidence;
|
|
264
|
+
const code = decision.verdict === 'blocked-shared-surface'
|
|
265
|
+
? 'blocked-broker-shared-surface'
|
|
266
|
+
: 'blocked-broker-cid-conflict';
|
|
267
|
+
return [{
|
|
268
|
+
level: 'error',
|
|
269
|
+
code,
|
|
270
|
+
detail: blockedReasons[0] ?? decision.reason,
|
|
271
|
+
paths: decision.conflicts
|
|
272
|
+
.filter((conflict) => conflict.kind === 'file-range')
|
|
273
|
+
.map((conflict) => {
|
|
274
|
+
const match = /'([^']+)'/.exec(conflict.detail);
|
|
275
|
+
return match?.[1] ?? '';
|
|
276
|
+
})
|
|
277
|
+
.filter(Boolean)
|
|
278
|
+
}];
|
|
279
|
+
}
|
|
280
|
+
function rehydrateWriteIntentFromActiveIntent(activeIntent) {
|
|
281
|
+
const atomRefs = activeIntent.resourceKeys.atomIds.map((atomId, index) => {
|
|
282
|
+
const atomCid = activeIntent.resourceKeys.atomCids[index] ?? toSyntheticAtomSlug(atomId);
|
|
283
|
+
const sourceRange = activeIntent.resourceKeys.atomRanges?.find((range) => range.atomCid === atomCid);
|
|
284
|
+
return {
|
|
285
|
+
atomId,
|
|
286
|
+
atomCid,
|
|
287
|
+
operation: 'modify',
|
|
288
|
+
...(sourceRange ? {
|
|
289
|
+
sourceRange: {
|
|
290
|
+
filePath: sourceRange.filePath,
|
|
291
|
+
lineStart: sourceRange.lineStart,
|
|
292
|
+
lineEnd: sourceRange.lineEnd
|
|
293
|
+
}
|
|
294
|
+
} : {})
|
|
295
|
+
};
|
|
296
|
+
});
|
|
297
|
+
return {
|
|
298
|
+
schemaId: 'atm.writeIntent.v1',
|
|
299
|
+
specVersion: '0.1.0',
|
|
300
|
+
migration: { strategy: 'none', fromVersion: null, notes: 'rehydrated from active write intent' },
|
|
301
|
+
taskId: activeIntent.taskId,
|
|
302
|
+
actorId: activeIntent.actorId,
|
|
303
|
+
baseCommit: activeIntent.baseCommit,
|
|
304
|
+
targetFiles: activeIntent.resourceKeys.files,
|
|
305
|
+
atomRefs,
|
|
306
|
+
sharedSurfaces: {
|
|
307
|
+
generators: activeIntent.resourceKeys.generators,
|
|
308
|
+
projections: activeIntent.resourceKeys.projections,
|
|
309
|
+
registries: activeIntent.resourceKeys.registries,
|
|
310
|
+
validators: activeIntent.resourceKeys.validators,
|
|
311
|
+
artifacts: activeIntent.resourceKeys.artifacts
|
|
312
|
+
},
|
|
313
|
+
requestedLane: 'auto',
|
|
314
|
+
...(activeIntent.admission ? { proposalAdmission: toProposalAdmissionRequest(activeIntent.admission) } : {})
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
export function projectTeamBrokerRearbitrationSnapshot(input) {
|
|
318
|
+
const shadowRegistry = {
|
|
319
|
+
schemaId: 'atm.writeBrokerRegistry.v1',
|
|
320
|
+
specVersion: '0.1.0',
|
|
321
|
+
repoId: 'local-repo',
|
|
322
|
+
workspaceId: 'main',
|
|
323
|
+
currentEpoch: input.registry.currentEpoch ?? Date.now(),
|
|
324
|
+
activeIntents: input.registry.activeIntents.filter((entry) => entry.intentId !== input.activeIntent.intentId)
|
|
325
|
+
};
|
|
326
|
+
const effectiveDecision = calculateBrokerDecision(rehydrateWriteIntentFromActiveIntent(input.activeIntent), shadowRegistry);
|
|
327
|
+
const effectiveLane = resolveTeamBrokerLane(effectiveDecision);
|
|
328
|
+
return {
|
|
329
|
+
observedAt: new Date().toISOString(),
|
|
330
|
+
triggerTaskId: input.triggerTaskId,
|
|
331
|
+
triggerActorId: input.triggerActorId,
|
|
332
|
+
registeredLane: input.activeIntent.lane === 'neutral-steward' ? 'neutral-steward' : input.activeIntent.lane,
|
|
333
|
+
registeredDecision: {
|
|
334
|
+
schemaId: 'atm.brokerDecision.v1',
|
|
335
|
+
specVersion: '0.1.0',
|
|
336
|
+
migration: { strategy: 'none', fromVersion: null, notes: 'registered active intent snapshot' },
|
|
337
|
+
intentId: input.activeIntent.intentId,
|
|
338
|
+
taskId: input.activeIntent.taskId,
|
|
339
|
+
verdict: input.activeIntent.lane === 'blocked'
|
|
340
|
+
? 'blocked-active-lease'
|
|
341
|
+
: input.activeIntent.lane === 'deterministic-composer'
|
|
342
|
+
? 'needs-physical-split'
|
|
343
|
+
: input.activeIntent.lane === 'serial'
|
|
344
|
+
? 'serial'
|
|
345
|
+
: 'parallel-safe',
|
|
346
|
+
lane: input.activeIntent.lane,
|
|
347
|
+
conflicts: [],
|
|
348
|
+
applyMethod: input.activeIntent.lane === 'deterministic-composer' ? 'patch-apply' : 'none',
|
|
349
|
+
reason: 'Registered active intent snapshot.',
|
|
350
|
+
...(input.activeIntent.admission ? { admission: input.activeIntent.admission } : {})
|
|
351
|
+
},
|
|
352
|
+
effectiveDecision,
|
|
353
|
+
effectiveChosenLane: effectiveLane.chosenLane,
|
|
354
|
+
effectiveSafeToStart: effectiveLane.safeToStart,
|
|
355
|
+
effectiveBlockedReasons: effectiveLane.blockedReasons
|
|
356
|
+
};
|
|
357
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// TASK-MAO-0026: Team Agents Wave Mode broker admission. Given a proposed wave
|
|
2
|
+
// of cards (plus optional active write intents), decide which members may be
|
|
3
|
+
// admitted to run in parallel. Layers the broker logical conflict matrix
|
|
4
|
+
// (TASK-MAO-0005/0006) on top of the metadata-level wave planner rules
|
|
5
|
+
// (TASK-MAO-0024). Fails closed on every category it cannot prove safe.
|
|
6
|
+
import { pairBlockReasons } from './team-wave-planner.js';
|
|
7
|
+
import { evaluateConflictMatrix } from './conflict-matrix.js';
|
|
8
|
+
const BLOCK_REASON_TO_CATEGORY = {
|
|
9
|
+
'depends-on-open-wave-member': 'dependency',
|
|
10
|
+
'scope-overlap-unknown-range': 'scope-overlap',
|
|
11
|
+
'same-atom-write-write': 'cid-conflict',
|
|
12
|
+
'closure-authority-mismatch': 'closure-authority',
|
|
13
|
+
'target-repo-mismatch': 'target-repo',
|
|
14
|
+
'generated-artifact-contention': 'generated-artifact',
|
|
15
|
+
'missing-validator': 'missing-validator'
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Admit a proposed wave. A member is admitted only when:
|
|
19
|
+
* - all its dependencies are closed (outside the wave),
|
|
20
|
+
* - it declares at least one validator,
|
|
21
|
+
* - it has no metadata-level conflict with any already-admitted member,
|
|
22
|
+
* - its write intent does not produce a freeze/takeover verdict against the
|
|
23
|
+
* admitted members' intents (CID logical conflict),
|
|
24
|
+
* - a worker report exists when required.
|
|
25
|
+
* Evaluation is deterministic by task id; the first member of a conflicting pair
|
|
26
|
+
* is admitted and the later one is rejected (fail closed).
|
|
27
|
+
*/
|
|
28
|
+
export function admitWave(input) {
|
|
29
|
+
const appendSafe = new Set((input.appendSafePaths ?? []).map((p) => p.trim()));
|
|
30
|
+
const closed = new Set((input.closedTaskIds ?? []).map((t) => t.trim()));
|
|
31
|
+
const ordered = [...input.members].sort((a, b) => a.card.taskId.localeCompare(b.card.taskId));
|
|
32
|
+
const admittedCards = [];
|
|
33
|
+
const admittedIntents = [];
|
|
34
|
+
const admitted = [];
|
|
35
|
+
const rejected = [];
|
|
36
|
+
for (const member of ordered) {
|
|
37
|
+
const card = member.card;
|
|
38
|
+
const categories = new Set();
|
|
39
|
+
// Dependency rule (spec §5.1).
|
|
40
|
+
const depReady = card.dependencies.every((d) => closed.has(d.trim()));
|
|
41
|
+
if (!depReady)
|
|
42
|
+
categories.add('dependency');
|
|
43
|
+
// Validators (spec §5.4).
|
|
44
|
+
if ((card.validators ?? []).filter((v) => v.trim().length > 0).length === 0) {
|
|
45
|
+
categories.add('missing-validator');
|
|
46
|
+
}
|
|
47
|
+
// Worker report (spec §6).
|
|
48
|
+
if (input.requireWorkerReports && member.hasWorkerReport === false) {
|
|
49
|
+
categories.add('missing-worker-report');
|
|
50
|
+
}
|
|
51
|
+
// Metadata-level pairwise rules against already-admitted members.
|
|
52
|
+
for (const prior of admittedCards) {
|
|
53
|
+
for (const reason of pairBlockReasons(prior, card, appendSafe)) {
|
|
54
|
+
categories.add(BLOCK_REASON_TO_CATEGORY[reason]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// CID logical conflict via the broker matrix (spec §5.3).
|
|
58
|
+
if (member.writeIntent && admittedIntents.length > 0) {
|
|
59
|
+
const verdict = evaluateConflictMatrix(member.writeIntent, admittedIntents).arbitrationVerdict;
|
|
60
|
+
if (verdict === 'freeze' || verdict === 'takeover') {
|
|
61
|
+
categories.add('cid-conflict');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (categories.size > 0) {
|
|
65
|
+
rejected.push({
|
|
66
|
+
taskId: card.taskId,
|
|
67
|
+
categories: [...categories],
|
|
68
|
+
detail: `deferred to a later wave: ${[...categories].join(', ')}`
|
|
69
|
+
});
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
admittedCards.push(card);
|
|
73
|
+
admitted.push(card.taskId);
|
|
74
|
+
if (member.writeIntent) {
|
|
75
|
+
admittedIntents.push(toActiveIntent(member.writeIntent));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
schemaId: 'atm.teamWaveAdmission.v1',
|
|
80
|
+
admitted,
|
|
81
|
+
rejected,
|
|
82
|
+
ok: admitted.length > 0
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function toActiveIntent(intent) {
|
|
86
|
+
const now = new Date().toISOString();
|
|
87
|
+
return {
|
|
88
|
+
intentId: `wave-intent-${intent.taskId}`,
|
|
89
|
+
taskId: intent.taskId,
|
|
90
|
+
teamRunId: null,
|
|
91
|
+
actorId: intent.actorId,
|
|
92
|
+
baseCommit: intent.baseCommit,
|
|
93
|
+
resourceKeys: {
|
|
94
|
+
files: intent.targetFiles,
|
|
95
|
+
atomIds: intent.atomRefs.map((ref) => ref.atomId),
|
|
96
|
+
atomCids: intent.atomRefs.map((ref) => ref.atomCid),
|
|
97
|
+
readAtomIds: (intent.readAtoms ?? []).map((ref) => ref.atomId),
|
|
98
|
+
readAtomCids: (intent.readAtoms ?? []).map((ref) => ref.atomCid),
|
|
99
|
+
generators: intent.sharedSurfaces.generators,
|
|
100
|
+
projections: intent.sharedSurfaces.projections,
|
|
101
|
+
registries: intent.sharedSurfaces.registries,
|
|
102
|
+
validators: intent.sharedSurfaces.validators,
|
|
103
|
+
artifacts: intent.sharedSurfaces.artifacts
|
|
104
|
+
},
|
|
105
|
+
leaseEpoch: Date.now(),
|
|
106
|
+
leaseSeconds: 1800,
|
|
107
|
+
leaseMaxSeconds: 3600,
|
|
108
|
+
heartbeatAt: now,
|
|
109
|
+
lane: 'direct-brokered'
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { effectiveExecutionState } from './team-worker-report.js';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve each member's checkpoint state. The wave evidence gate is authoritative:
|
|
4
|
+
* if the slice is `needs-review`, NO member is close-ready regardless of its own
|
|
5
|
+
* report (spec §7 — ambiguous attribution blocks the whole wave). Otherwise a
|
|
6
|
+
* member is close-ready only when its reconciled worker state is `done`.
|
|
7
|
+
*/
|
|
8
|
+
export function checkpointWave(input) {
|
|
9
|
+
const evidenceClean = input.evidence.state === 'done';
|
|
10
|
+
const attributed = new Map(input.evidence.slices.map((s) => [s.taskId, s.attributedFiles]));
|
|
11
|
+
const members = input.members.map((member) => {
|
|
12
|
+
if (!member.report) {
|
|
13
|
+
return {
|
|
14
|
+
taskId: member.taskId,
|
|
15
|
+
state: 'not-started',
|
|
16
|
+
closeReady: false,
|
|
17
|
+
reason: 'no worker report'
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const reported = effectiveExecutionState(member.report);
|
|
21
|
+
if (!evidenceClean) {
|
|
22
|
+
return {
|
|
23
|
+
taskId: member.taskId,
|
|
24
|
+
state: 'needs-review',
|
|
25
|
+
closeReady: false,
|
|
26
|
+
reason: 'wave evidence did not slice cleanly; whole wave is needs-review'
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const hasFiles = (attributed.get(member.taskId) ?? []).length > 0;
|
|
30
|
+
if (reported === 'done' && !hasFiles) {
|
|
31
|
+
return {
|
|
32
|
+
taskId: member.taskId,
|
|
33
|
+
state: 'needs-review',
|
|
34
|
+
closeReady: false,
|
|
35
|
+
reason: 'reported done but no files attributed in the wave slice'
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const closeReady = reported === 'done';
|
|
39
|
+
return {
|
|
40
|
+
taskId: member.taskId,
|
|
41
|
+
state: reported,
|
|
42
|
+
closeReady,
|
|
43
|
+
reason: closeReady ? 'done with clean attributed evidence' : `member state is ${reported}`
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
schemaId: 'atm.teamWaveCheckpoint.v1',
|
|
48
|
+
members,
|
|
49
|
+
closeReadyTaskIds: members.filter((m) => m.closeReady).map((m) => m.taskId),
|
|
50
|
+
evidenceClean
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// TASK-MAO-0025: Team Wave Envelope. Wraps a planned wave (TASK-MAO-0024) plus
|
|
2
|
+
// one per-worker patch envelope (TASK-MAO-0008) reference per member, into a
|
|
3
|
+
// single record the coordinator uses for admission, evidence slicing, and
|
|
4
|
+
// checkpoint. Conforms to schemas/team-wave-envelope.schema.json.
|
|
5
|
+
export function createTeamWaveEnvelope(input) {
|
|
6
|
+
return {
|
|
7
|
+
schemaId: 'atm.teamWaveEnvelope.v1',
|
|
8
|
+
specVersion: '0.1.0',
|
|
9
|
+
migration: { strategy: 'none', fromVersion: null, notes: 'Team wave envelope baseline record.' },
|
|
10
|
+
waveId: input.waveId ?? `team-wave-${input.waveIndex}-${Date.now()}`,
|
|
11
|
+
coordinatorActorId: input.coordinatorActorId,
|
|
12
|
+
targetRepo: input.targetRepo,
|
|
13
|
+
closureAuthority: input.closureAuthority,
|
|
14
|
+
members: input.members,
|
|
15
|
+
metadata: {
|
|
16
|
+
plannedAt: input.plannedAt ?? new Date().toISOString(),
|
|
17
|
+
waveIndex: input.waveIndex,
|
|
18
|
+
appendSafePaths: input.appendSafePaths ?? [],
|
|
19
|
+
notes: input.notes ?? null
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Structural validation beyond the JSON schema: enforces the cross-field
|
|
25
|
+
* invariants from the spec — single target repo, single closure authority, and
|
|
26
|
+
* disjoint declared deliverables across members (spec §5 rules 5, 6, 2/7).
|
|
27
|
+
*/
|
|
28
|
+
export function validateTeamWaveEnvelope(envelope) {
|
|
29
|
+
if (envelope.schemaId !== 'atm.teamWaveEnvelope.v1') {
|
|
30
|
+
return { ok: false, reason: 'schemaId must be atm.teamWaveEnvelope.v1' };
|
|
31
|
+
}
|
|
32
|
+
if (envelope.members.length === 0) {
|
|
33
|
+
return { ok: false, reason: 'wave envelope must have at least one member' };
|
|
34
|
+
}
|
|
35
|
+
if (!envelope.coordinatorActorId.trim()) {
|
|
36
|
+
return { ok: false, reason: 'coordinatorActorId is required' };
|
|
37
|
+
}
|
|
38
|
+
const seen = new Map();
|
|
39
|
+
for (const member of envelope.members) {
|
|
40
|
+
if (!member.taskId.trim()) {
|
|
41
|
+
return { ok: false, reason: 'every member requires a taskId' };
|
|
42
|
+
}
|
|
43
|
+
for (const deliverable of member.deliverables) {
|
|
44
|
+
const prior = seen.get(deliverable);
|
|
45
|
+
if (prior && prior !== member.taskId) {
|
|
46
|
+
return {
|
|
47
|
+
ok: false,
|
|
48
|
+
reason: `deliverable ${deliverable} is claimed by both ${prior} and ${member.taskId}`
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
seen.set(deliverable, member.taskId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return { ok: true, reason: 'team wave envelope is valid' };
|
|
55
|
+
}
|
|
56
|
+
/** Members whose execution state allows close-input preparation (spec §7). */
|
|
57
|
+
export function closeReadyMembers(envelope) {
|
|
58
|
+
return envelope.members.filter((m) => m.executionState === 'done');
|
|
59
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Directory-prefix aware membership: a scope ending in '/' matches by prefix. */
|
|
2
|
+
function fileMatchesScope(file, scopePaths) {
|
|
3
|
+
return scopePaths.some((scope) => {
|
|
4
|
+
if (scope === file)
|
|
5
|
+
return true;
|
|
6
|
+
if (scope.endsWith('/') && file.startsWith(scope))
|
|
7
|
+
return true;
|
|
8
|
+
return false;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Slice a wave diff into per-task evidence. The result is `done` only when every
|
|
13
|
+
* changed file is attributed to exactly one member (append-safe files excepted);
|
|
14
|
+
* otherwise the wave is `needs-review` and callers must not checkpoint any member
|
|
15
|
+
* as done from this evidence.
|
|
16
|
+
*/
|
|
17
|
+
export function sliceWaveEvidence(input) {
|
|
18
|
+
const appendSafe = new Set((input.appendSafePaths ?? []).map((p) => p.trim()));
|
|
19
|
+
const sliceMap = new Map();
|
|
20
|
+
for (const member of input.members)
|
|
21
|
+
sliceMap.set(member.taskId, []);
|
|
22
|
+
const unattributed = [];
|
|
23
|
+
const ambiguous = [];
|
|
24
|
+
for (const file of input.changedFiles) {
|
|
25
|
+
const owners = input.members
|
|
26
|
+
.filter((m) => fileMatchesScope(file, m.scopePaths))
|
|
27
|
+
.map((m) => m.taskId);
|
|
28
|
+
if (appendSafe.has(file)) {
|
|
29
|
+
// Append-safe files are attributed to every owner, never ambiguous.
|
|
30
|
+
for (const owner of owners)
|
|
31
|
+
sliceMap.get(owner).push(file);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (owners.length === 0) {
|
|
35
|
+
unattributed.push(file);
|
|
36
|
+
}
|
|
37
|
+
else if (owners.length === 1) {
|
|
38
|
+
sliceMap.get(owners[0]).push(file);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
ambiguous.push({ file, taskIds: owners });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const slices = [...sliceMap.entries()].map(([taskId, attributedFiles]) => ({
|
|
45
|
+
taskId,
|
|
46
|
+
attributedFiles
|
|
47
|
+
}));
|
|
48
|
+
const state = unattributed.length === 0 && ambiguous.length === 0 ? 'done' : 'needs-review';
|
|
49
|
+
return {
|
|
50
|
+
schemaId: 'atm.teamWaveEvidence.v1',
|
|
51
|
+
slices,
|
|
52
|
+
unattributed,
|
|
53
|
+
ambiguous,
|
|
54
|
+
state
|
|
55
|
+
};
|
|
56
|
+
}
|