dorfl 0.0.0 → 0.1.0
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/advance-ci-template.d.ts +73 -0
- package/dist/advance-ci-template.d.ts.map +1 -0
- package/dist/advance-ci-template.js +104 -0
- package/dist/advance-ci-template.js.map +1 -0
- package/dist/advance-classify.d.ts +132 -0
- package/dist/advance-classify.d.ts.map +1 -0
- package/dist/advance-classify.js +120 -0
- package/dist/advance-classify.js.map +1 -0
- package/dist/advance-drivers.d.ts +182 -0
- package/dist/advance-drivers.d.ts.map +1 -0
- package/dist/advance-drivers.js +231 -0
- package/dist/advance-drivers.js.map +1 -0
- package/dist/advance-isolated.d.ts +156 -0
- package/dist/advance-isolated.d.ts.map +1 -0
- package/dist/advance-isolated.js +256 -0
- package/dist/advance-isolated.js.map +1 -0
- package/dist/advance-lifecycle-template.d.ts +107 -0
- package/dist/advance-lifecycle-template.d.ts.map +1 -0
- package/dist/advance-lifecycle-template.js +668 -0
- package/dist/advance-lifecycle-template.js.map +1 -0
- package/dist/advance-loop-driver.d.ts +325 -0
- package/dist/advance-loop-driver.d.ts.map +1 -0
- package/dist/advance-loop-driver.js +437 -0
- package/dist/advance-loop-driver.js.map +1 -0
- package/dist/advance-treeless-publish.d.ts +108 -0
- package/dist/advance-treeless-publish.d.ts.map +1 -0
- package/dist/advance-treeless-publish.js +71 -0
- package/dist/advance-treeless-publish.js.map +1 -0
- package/dist/advance.d.ts +340 -0
- package/dist/advance.d.ts.map +1 -0
- package/dist/advance.js +1122 -0
- package/dist/advance.js.map +1 -0
- package/dist/advancing-lock.d.ts +294 -0
- package/dist/advancing-lock.d.ts.map +1 -0
- package/dist/advancing-lock.js +594 -0
- package/dist/advancing-lock.js.map +1 -0
- package/dist/agent-launch.d.ts +79 -0
- package/dist/agent-launch.d.ts.map +1 -0
- package/dist/agent-launch.js +61 -0
- package/dist/agent-launch.js.map +1 -0
- package/dist/agent-stop.d.ts +149 -0
- package/dist/agent-stop.d.ts.map +1 -0
- package/dist/agent-stop.js +307 -0
- package/dist/agent-stop.js.map +1 -0
- package/dist/apply-decide.d.ts +127 -0
- package/dist/apply-decide.d.ts.map +1 -0
- package/dist/apply-decide.js +176 -0
- package/dist/apply-decide.js.map +1 -0
- package/dist/apply-merge-action.d.ts +206 -0
- package/dist/apply-merge-action.d.ts.map +1 -0
- package/dist/apply-merge-action.js +307 -0
- package/dist/apply-merge-action.js.map +1 -0
- package/dist/apply-persist.d.ts +174 -0
- package/dist/apply-persist.d.ts.map +1 -0
- package/dist/apply-persist.js +359 -0
- package/dist/apply-persist.js.map +1 -0
- package/dist/arbiter.d.ts +120 -0
- package/dist/arbiter.d.ts.map +1 -0
- package/dist/arbiter.js +255 -0
- package/dist/arbiter.js.map +1 -0
- package/dist/brand.d.ts +70 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +84 -0
- package/dist/brand.js.map +1 -0
- package/dist/buildable-body.d.ts +132 -0
- package/dist/buildable-body.d.ts.map +1 -0
- package/dist/buildable-body.js +131 -0
- package/dist/buildable-body.js.map +1 -0
- package/dist/categorise.d.ts +66 -0
- package/dist/categorise.d.ts.map +1 -0
- package/dist/categorise.js +106 -0
- package/dist/categorise.js.map +1 -0
- package/dist/claim-cas.d.ts +117 -0
- package/dist/claim-cas.d.ts.map +1 -0
- package/dist/claim-cas.js +312 -0
- package/dist/claim-cas.js.map +1 -0
- package/dist/cli-spinner.d.ts +112 -0
- package/dist/cli-spinner.d.ts.map +1 -0
- package/dist/cli-spinner.js +157 -0
- package/dist/cli-spinner.js.map +1 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +3094 -0
- package/dist/cli.js.map +1 -0
- package/dist/close-job-template.d.ts +70 -0
- package/dist/close-job-template.d.ts.map +1 -0
- package/dist/close-job-template.js +180 -0
- package/dist/close-job-template.js.map +1 -0
- package/dist/close-job.d.ts +95 -0
- package/dist/close-job.d.ts.map +1 -0
- package/dist/close-job.js +226 -0
- package/dist/close-job.js.map +1 -0
- package/dist/complete.d.ts +361 -0
- package/dist/complete.d.ts.map +1 -0
- package/dist/complete.js +885 -0
- package/dist/complete.js.map +1 -0
- package/dist/concurrency.d.ts +68 -0
- package/dist/concurrency.d.ts.map +1 -0
- package/dist/concurrency.js +112 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/config-override.d.ts +76 -0
- package/dist/config-override.d.ts.map +1 -0
- package/dist/config-override.js +50 -0
- package/dist/config-override.js.map +1 -0
- package/dist/config.d.ts +668 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +241 -0
- package/dist/config.js.map +1 -0
- package/dist/continue-branch.d.ts +249 -0
- package/dist/continue-branch.d.ts.map +1 -0
- package/dist/continue-branch.js +389 -0
- package/dist/continue-branch.js.map +1 -0
- package/dist/cwd-section.d.ts +186 -0
- package/dist/cwd-section.d.ts.map +1 -0
- package/dist/cwd-section.js +209 -0
- package/dist/cwd-section.js.map +1 -0
- package/dist/decision-engine.d.ts +170 -0
- package/dist/decision-engine.d.ts.map +1 -0
- package/dist/decision-engine.js +136 -0
- package/dist/decision-engine.js.map +1 -0
- package/dist/detect.d.ts +17 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +118 -0
- package/dist/detect.js.map +1 -0
- package/dist/do-autopick.d.ts +85 -0
- package/dist/do-autopick.d.ts.map +1 -0
- package/dist/do-autopick.js +112 -0
- package/dist/do-autopick.js.map +1 -0
- package/dist/do-config.d.ts +312 -0
- package/dist/do-config.d.ts.map +1 -0
- package/dist/do-config.js +358 -0
- package/dist/do-config.js.map +1 -0
- package/dist/do-remote-auto.d.ts +75 -0
- package/dist/do-remote-auto.d.ts.map +1 -0
- package/dist/do-remote-auto.js +111 -0
- package/dist/do-remote-auto.js.map +1 -0
- package/dist/do.d.ts +621 -0
- package/dist/do.d.ts.map +1 -0
- package/dist/do.js +1882 -0
- package/dist/do.js.map +1 -0
- package/dist/drop-source.d.ts +96 -0
- package/dist/drop-source.d.ts.map +1 -0
- package/dist/drop-source.js +91 -0
- package/dist/drop-source.js.map +1 -0
- package/dist/eligibility.d.ts +46 -0
- package/dist/eligibility.d.ts.map +1 -0
- package/dist/eligibility.js +34 -0
- package/dist/eligibility.js.map +1 -0
- package/dist/env-config.d.ts +51 -0
- package/dist/env-config.d.ts.map +1 -0
- package/dist/env-config.js +272 -0
- package/dist/env-config.js.map +1 -0
- package/dist/failure-cause.d.ts +70 -0
- package/dist/failure-cause.d.ts.map +1 -0
- package/dist/failure-cause.js +126 -0
- package/dist/failure-cause.js.map +1 -0
- package/dist/format.d.ts +43 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +256 -0
- package/dist/format.js.map +1 -0
- package/dist/frontmatter.d.ts +215 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +345 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/gate-readiness.d.ts +84 -0
- package/dist/gate-readiness.d.ts.map +1 -0
- package/dist/gate-readiness.js +103 -0
- package/dist/gate-readiness.js.map +1 -0
- package/dist/gc.d.ts +165 -0
- package/dist/gc.d.ts.map +1 -0
- package/dist/gc.js +313 -0
- package/dist/gc.js.map +1 -0
- package/dist/gh-failure.d.ts +42 -0
- package/dist/gh-failure.d.ts.map +1 -0
- package/dist/gh-failure.js +49 -0
- package/dist/gh-failure.js.map +1 -0
- package/dist/git.d.ts +75 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +130 -0
- package/dist/git.js.map +1 -0
- package/dist/github.d.ts +187 -0
- package/dist/github.d.ts.map +1 -0
- package/dist/github.js +343 -0
- package/dist/github.js.map +1 -0
- package/dist/harness.d.ts +242 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +157 -0
- package/dist/harness.js.map +1 -0
- package/dist/identity.d.ts +167 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +231 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +147 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/install-ci-branch-protection.d.ts +147 -0
- package/dist/install-ci-branch-protection.d.ts.map +1 -0
- package/dist/install-ci-branch-protection.js +166 -0
- package/dist/install-ci-branch-protection.js.map +1 -0
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts +15 -0
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts.map +1 -0
- package/dist/install-ci-capabilities/advance-lifecycle.js +28 -0
- package/dist/install-ci-capabilities/advance-lifecycle.js.map +1 -0
- package/dist/install-ci-capabilities/close-job.d.ts +13 -0
- package/dist/install-ci-capabilities/close-job.d.ts.map +1 -0
- package/dist/install-ci-capabilities/close-job.js +26 -0
- package/dist/install-ci-capabilities/close-job.js.map +1 -0
- package/dist/install-ci-capabilities/example-noop.d.ts +16 -0
- package/dist/install-ci-capabilities/example-noop.d.ts.map +1 -0
- package/dist/install-ci-capabilities/example-noop.js +23 -0
- package/dist/install-ci-capabilities/example-noop.js.map +1 -0
- package/dist/install-ci-capabilities/intake.d.ts +15 -0
- package/dist/install-ci-capabilities/intake.d.ts.map +1 -0
- package/dist/install-ci-capabilities/intake.js +28 -0
- package/dist/install-ci-capabilities/intake.js.map +1 -0
- package/dist/install-ci-capabilities/verify.d.ts +14 -0
- package/dist/install-ci-capabilities/verify.d.ts.map +1 -0
- package/dist/install-ci-capabilities/verify.js +27 -0
- package/dist/install-ci-capabilities/verify.js.map +1 -0
- package/dist/install-ci-core.d.ts +446 -0
- package/dist/install-ci-core.d.ts.map +1 -0
- package/dist/install-ci-core.js +760 -0
- package/dist/install-ci-core.js.map +1 -0
- package/dist/install-ci-github.d.ts +167 -0
- package/dist/install-ci-github.d.ts.map +1 -0
- package/dist/install-ci-github.js +315 -0
- package/dist/install-ci-github.js.map +1 -0
- package/dist/install-ci.d.ts +105 -0
- package/dist/install-ci.d.ts.map +1 -0
- package/dist/install-ci.js +363 -0
- package/dist/install-ci.js.map +1 -0
- package/dist/intake-event.d.ts +88 -0
- package/dist/intake-event.d.ts.map +1 -0
- package/dist/intake-event.js +66 -0
- package/dist/intake-event.js.map +1 -0
- package/dist/intake-marker.d.ts +95 -0
- package/dist/intake-marker.d.ts.map +1 -0
- package/dist/intake-marker.js +127 -0
- package/dist/intake-marker.js.map +1 -0
- package/dist/intake-triage.d.ts +48 -0
- package/dist/intake-triage.d.ts.map +1 -0
- package/dist/intake-triage.js +95 -0
- package/dist/intake-triage.js.map +1 -0
- package/dist/intake-trigger-template.d.ts +185 -0
- package/dist/intake-trigger-template.d.ts.map +1 -0
- package/dist/intake-trigger-template.js +449 -0
- package/dist/intake-trigger-template.js.map +1 -0
- package/dist/intake.d.ts +569 -0
- package/dist/intake.d.ts.map +1 -0
- package/dist/intake.js +1628 -0
- package/dist/intake.js.map +1 -0
- package/dist/integration-core.d.ts +539 -0
- package/dist/integration-core.d.ts.map +1 -0
- package/dist/integration-core.js +2195 -0
- package/dist/integration-core.js.map +1 -0
- package/dist/integrator.d.ts +343 -0
- package/dist/integrator.d.ts.map +1 -0
- package/dist/integrator.js +400 -0
- package/dist/integrator.js.map +1 -0
- package/dist/isolation.d.ts +219 -0
- package/dist/isolation.d.ts.map +1 -0
- package/dist/isolation.js +261 -0
- package/dist/isolation.js.map +1 -0
- package/dist/issue-provider.d.ts +349 -0
- package/dist/issue-provider.d.ts.map +1 -0
- package/dist/issue-provider.js +360 -0
- package/dist/issue-provider.js.map +1 -0
- package/dist/item-lock.d.ts +626 -0
- package/dist/item-lock.d.ts.map +1 -0
- package/dist/item-lock.js +1381 -0
- package/dist/item-lock.js.map +1 -0
- package/dist/item-path.d.ts +49 -0
- package/dist/item-path.d.ts.map +1 -0
- package/dist/item-path.js +66 -0
- package/dist/item-path.js.map +1 -0
- package/dist/ledger-lint.d.ts +129 -0
- package/dist/ledger-lint.d.ts.map +1 -0
- package/dist/ledger-lint.js +249 -0
- package/dist/ledger-lint.js.map +1 -0
- package/dist/ledger-read.d.ts +357 -0
- package/dist/ledger-read.d.ts.map +1 -0
- package/dist/ledger-read.js +442 -0
- package/dist/ledger-read.js.map +1 -0
- package/dist/ledger-write.d.ts +330 -0
- package/dist/ledger-write.d.ts.map +1 -0
- package/dist/ledger-write.js +411 -0
- package/dist/ledger-write.js.map +1 -0
- package/dist/lifecycle-gather.d.ts +30 -0
- package/dist/lifecycle-gather.d.ts.map +1 -0
- package/dist/lifecycle-gather.js +205 -0
- package/dist/lifecycle-gather.js.map +1 -0
- package/dist/lifecycle-pools.d.ts +180 -0
- package/dist/lifecycle-pools.d.ts.map +1 -0
- package/dist/lifecycle-pools.js +78 -0
- package/dist/lifecycle-pools.js.map +1 -0
- package/dist/merge-question-surfacer.d.ts +166 -0
- package/dist/merge-question-surfacer.d.ts.map +1 -0
- package/dist/merge-question-surfacer.js +297 -0
- package/dist/merge-question-surfacer.js.map +1 -0
- package/dist/mint-adr.d.ts +126 -0
- package/dist/mint-adr.d.ts.map +1 -0
- package/dist/mint-adr.js +257 -0
- package/dist/mint-adr.js.map +1 -0
- package/dist/mirror-pool-scan.d.ts +125 -0
- package/dist/mirror-pool-scan.d.ts.map +1 -0
- package/dist/mirror-pool-scan.js +104 -0
- package/dist/mirror-pool-scan.js.map +1 -0
- package/dist/needs-attention.d.ts +341 -0
- package/dist/needs-attention.d.ts.map +1 -0
- package/dist/needs-attention.js +900 -0
- package/dist/needs-attention.js.map +1 -0
- package/dist/orphan-sidecar.d.ts +79 -0
- package/dist/orphan-sidecar.d.ts.map +1 -0
- package/dist/orphan-sidecar.js +71 -0
- package/dist/orphan-sidecar.js.map +1 -0
- package/dist/output.d.ts +48 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +66 -0
- package/dist/output.js.map +1 -0
- package/dist/pi-harness.d.ts +179 -0
- package/dist/pi-harness.d.ts.map +1 -0
- package/dist/pi-harness.js +342 -0
- package/dist/pi-harness.js.map +1 -0
- package/dist/placement.d.ts +99 -0
- package/dist/placement.d.ts.map +1 -0
- package/dist/placement.js +67 -0
- package/dist/placement.js.map +1 -0
- package/dist/prd-to-spec.d.ts +315 -0
- package/dist/prd-to-spec.d.ts.map +1 -0
- package/dist/prd-to-spec.js +684 -0
- package/dist/prd-to-spec.js.map +1 -0
- package/dist/prepare.d.ts +121 -0
- package/dist/prepare.d.ts.map +1 -0
- package/dist/prepare.js +140 -0
- package/dist/prepare.js.map +1 -0
- package/dist/prompt.d.ts +360 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +499 -0
- package/dist/prompt.js.map +1 -0
- package/dist/protocol/ADR-FORMAT.md +47 -0
- package/dist/protocol/CLAIM-PROTOCOL.md +217 -0
- package/dist/protocol/REVIEW-PROTOCOL.md +119 -0
- package/dist/protocol/SURFACE-PROTOCOL.md +121 -0
- package/dist/protocol/TASKING-PROTOCOL.md +122 -0
- package/dist/protocol/WORK-CONTRACT.md +276 -0
- package/dist/protocol/spec-template.md +71 -0
- package/dist/protocol/task-template.md +65 -0
- package/dist/readiness.d.ts +66 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +36 -0
- package/dist/readiness.js.map +1 -0
- package/dist/reap-branches.d.ts +102 -0
- package/dist/reap-branches.d.ts.map +1 -0
- package/dist/reap-branches.js +149 -0
- package/dist/reap-branches.js.map +1 -0
- package/dist/recover-isolated.d.ts +72 -0
- package/dist/recover-isolated.d.ts.map +1 -0
- package/dist/recover-isolated.js +188 -0
- package/dist/recover-isolated.js.map +1 -0
- package/dist/registry.d.ts +172 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +296 -0
- package/dist/registry.js.map +1 -0
- package/dist/repo-config.d.ts +201 -0
- package/dist/repo-config.d.ts.map +1 -0
- package/dist/repo-config.js +414 -0
- package/dist/repo-config.js.map +1 -0
- package/dist/repo-key.d.ts +20 -0
- package/dist/repo-key.d.ts.map +1 -0
- package/dist/repo-key.js +68 -0
- package/dist/repo-key.js.map +1 -0
- package/dist/repo-mirror.d.ts +177 -0
- package/dist/repo-mirror.d.ts.map +1 -0
- package/dist/repo-mirror.js +271 -0
- package/dist/repo-mirror.js.map +1 -0
- package/dist/retry-backoff.d.ts +90 -0
- package/dist/retry-backoff.d.ts.map +1 -0
- package/dist/retry-backoff.js +98 -0
- package/dist/retry-backoff.js.map +1 -0
- package/dist/review-gate.d.ts +173 -0
- package/dist/review-gate.d.ts.map +1 -0
- package/dist/review-gate.js +261 -0
- package/dist/review-gate.js.map +1 -0
- package/dist/review-verdict.d.ts +149 -0
- package/dist/review-verdict.d.ts.map +1 -0
- package/dist/review-verdict.js +332 -0
- package/dist/review-verdict.js.map +1 -0
- package/dist/run.d.ts +221 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +963 -0
- package/dist/run.js.map +1 -0
- package/dist/scan.d.ts +308 -0
- package/dist/scan.d.ts.map +1 -0
- package/dist/scan.js +374 -0
- package/dist/scan.js.map +1 -0
- package/dist/select-order.d.ts +75 -0
- package/dist/select-order.d.ts.map +1 -0
- package/dist/select-order.js +108 -0
- package/dist/select-order.js.map +1 -0
- package/dist/select-priority.d.ts +188 -0
- package/dist/select-priority.d.ts.map +1 -0
- package/dist/select-priority.js +80 -0
- package/dist/select-priority.js.map +1 -0
- package/dist/select.d.ts +25 -0
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +43 -0
- package/dist/select.js.map +1 -0
- package/dist/session-path.d.ts +36 -0
- package/dist/session-path.d.ts.map +1 -0
- package/dist/session-path.js +129 -0
- package/dist/session-path.js.map +1 -0
- package/dist/sidecar-apply.d.ts +83 -0
- package/dist/sidecar-apply.d.ts.map +1 -0
- package/dist/sidecar-apply.js +111 -0
- package/dist/sidecar-apply.js.map +1 -0
- package/dist/sidecar.d.ts +245 -0
- package/dist/sidecar.d.ts.map +1 -0
- package/dist/sidecar.js +481 -0
- package/dist/sidecar.js.map +1 -0
- package/dist/slug-namespace.d.ts +204 -0
- package/dist/slug-namespace.d.ts.map +1 -0
- package/dist/slug-namespace.js +229 -0
- package/dist/slug-namespace.js.map +1 -0
- package/dist/spec-complete.d.ts +44 -0
- package/dist/spec-complete.d.ts.map +1 -0
- package/dist/spec-complete.js +69 -0
- package/dist/spec-complete.js.map +1 -0
- package/dist/start.d.ts +97 -0
- package/dist/start.d.ts.map +1 -0
- package/dist/start.js +633 -0
- package/dist/start.js.map +1 -0
- package/dist/status.d.ts +199 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +228 -0
- package/dist/status.js.map +1 -0
- package/dist/surface-gate.d.ts +162 -0
- package/dist/surface-gate.d.ts.map +1 -0
- package/dist/surface-gate.js +206 -0
- package/dist/surface-gate.js.map +1 -0
- package/dist/surface-persist.d.ts +86 -0
- package/dist/surface-persist.d.ts.map +1 -0
- package/dist/surface-persist.js +129 -0
- package/dist/surface-persist.js.map +1 -0
- package/dist/tasker-review-loop.d.ts +249 -0
- package/dist/tasker-review-loop.d.ts.map +1 -0
- package/dist/tasker-review-loop.js +369 -0
- package/dist/tasker-review-loop.js.map +1 -0
- package/dist/tasking-eligibility.d.ts +74 -0
- package/dist/tasking-eligibility.d.ts.map +1 -0
- package/dist/tasking-eligibility.js +52 -0
- package/dist/tasking-eligibility.js.map +1 -0
- package/dist/tasking-lock.d.ts +111 -0
- package/dist/tasking-lock.d.ts.map +1 -0
- package/dist/tasking-lock.js +256 -0
- package/dist/tasking-lock.js.map +1 -0
- package/dist/tasking.d.ts +275 -0
- package/dist/tasking.d.ts.map +1 -0
- package/dist/tasking.js +952 -0
- package/dist/tasking.js.map +1 -0
- package/dist/triage-gate.d.ts +127 -0
- package/dist/triage-gate.d.ts.map +1 -0
- package/dist/triage-gate.js +139 -0
- package/dist/triage-gate.js.map +1 -0
- package/dist/triage-persist.d.ts +163 -0
- package/dist/triage-persist.d.ts.map +1 -0
- package/dist/triage-persist.js +387 -0
- package/dist/triage-persist.js.map +1 -0
- package/dist/verdict-json.d.ts +32 -0
- package/dist/verdict-json.d.ts.map +1 -0
- package/dist/verdict-json.js +74 -0
- package/dist/verdict-json.js.map +1 -0
- package/dist/verify-workflow-template.d.ts +60 -0
- package/dist/verify-workflow-template.d.ts.map +1 -0
- package/dist/verify-workflow-template.js +126 -0
- package/dist/verify-workflow-template.js.map +1 -0
- package/dist/verify.d.ts +60 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +62 -0
- package/dist/verify.js.map +1 -0
- package/dist/watch-session.d.ts +112 -0
- package/dist/watch-session.d.ts.map +1 -0
- package/dist/watch-session.js +347 -0
- package/dist/watch-session.js.map +1 -0
- package/dist/work-layout.d.ts +198 -0
- package/dist/work-layout.d.ts.map +1 -0
- package/dist/work-layout.js +217 -0
- package/dist/work-layout.js.map +1 -0
- package/dist/work-on.d.ts +154 -0
- package/dist/work-on.d.ts.map +1 -0
- package/dist/work-on.js +387 -0
- package/dist/work-on.js.map +1 -0
- package/dist/workspace.d.ts +224 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +325 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +46 -2
- package/src/advance-ci-template.ts +203 -0
- package/src/advance-classify.ts +197 -0
- package/src/advance-drivers.ts +414 -0
- package/src/advance-isolated.ts +432 -0
- package/src/advance-lifecycle-template.ts +791 -0
- package/src/advance-loop-driver.ts +745 -0
- package/src/advance-treeless-publish.ts +177 -0
- package/src/advance.ts +1564 -0
- package/src/advancing-lock.ts +988 -0
- package/src/agent-launch.ts +137 -0
- package/src/agent-stop.ts +361 -0
- package/src/apply-decide.ts +242 -0
- package/src/apply-merge-action.ts +502 -0
- package/src/apply-persist.ts +518 -0
- package/src/arbiter.ts +372 -0
- package/src/brand.ts +111 -0
- package/src/buildable-body.ts +196 -0
- package/src/categorise.ts +158 -0
- package/src/claim-cas.ts +513 -0
- package/src/cli-spinner.ts +225 -0
- package/src/cli.ts +4369 -0
- package/src/close-job-template.ts +236 -0
- package/src/close-job.ts +319 -0
- package/src/complete.ts +1379 -0
- package/src/concurrency.ts +151 -0
- package/src/config-override.ts +116 -0
- package/src/config.ts +883 -0
- package/src/continue-branch.ts +542 -0
- package/src/cwd-section.ts +392 -0
- package/src/decision-engine.ts +272 -0
- package/src/detect.ts +124 -0
- package/src/do-autopick.ts +223 -0
- package/src/do-config.ts +589 -0
- package/src/do-remote-auto.ts +197 -0
- package/src/do.ts +2623 -0
- package/src/drop-source.ts +194 -0
- package/src/eligibility.ts +79 -0
- package/src/env-config.ts +305 -0
- package/src/failure-cause.ts +142 -0
- package/src/format.ts +313 -0
- package/src/frontmatter.ts +485 -0
- package/src/gate-readiness.ts +147 -0
- package/src/gc.ts +510 -0
- package/src/gh-failure.ts +53 -0
- package/src/git.ts +186 -0
- package/src/github.ts +468 -0
- package/src/harness.ts +355 -0
- package/src/identity.ts +322 -0
- package/src/index.ts +785 -0
- package/src/install-ci-branch-protection.ts +255 -0
- package/src/install-ci-capabilities/advance-lifecycle.ts +34 -0
- package/src/install-ci-capabilities/close-job.ts +32 -0
- package/src/install-ci-capabilities/example-noop.ts +24 -0
- package/src/install-ci-capabilities/intake.ts +34 -0
- package/src/install-ci-capabilities/verify.ts +33 -0
- package/src/install-ci-core.ts +1088 -0
- package/src/install-ci-github.ts +376 -0
- package/src/install-ci.ts +552 -0
- package/src/intake-event.ts +102 -0
- package/src/intake-marker.ts +195 -0
- package/src/intake-triage.ts +138 -0
- package/src/intake-trigger-template.ts +591 -0
- package/src/intake.ts +2445 -0
- package/src/integration-core.ts +3065 -0
- package/src/integrator.ts +771 -0
- package/src/isolation.ts +484 -0
- package/src/issue-provider.ts +733 -0
- package/src/item-lock.ts +1858 -0
- package/src/item-path.ts +75 -0
- package/src/ledger-lint.ts +332 -0
- package/src/ledger-read.ts +924 -0
- package/src/ledger-write.ts +865 -0
- package/src/lifecycle-gather.ts +298 -0
- package/src/lifecycle-pools.ts +250 -0
- package/src/merge-question-surfacer.ts +496 -0
- package/src/mint-adr.ts +362 -0
- package/src/mirror-pool-scan.ts +240 -0
- package/src/needs-attention.ts +1506 -0
- package/src/orphan-sidecar.ts +150 -0
- package/src/output.ts +89 -0
- package/src/pi-harness.ts +403 -0
- package/src/placement.ts +131 -0
- package/src/prd-to-spec.ts +1023 -0
- package/src/prepare.ts +230 -0
- package/src/prompt.ts +760 -0
- package/src/readiness.ts +98 -0
- package/src/reap-branches.ts +278 -0
- package/src/recover-isolated.ts +276 -0
- package/src/registry.ts +475 -0
- package/src/repo-config.ts +550 -0
- package/src/repo-key.ts +74 -0
- package/src/repo-mirror.ts +367 -0
- package/src/retry-backoff.ts +130 -0
- package/src/review-gate.ts +389 -0
- package/src/review-verdict.ts +422 -0
- package/src/run.ts +1430 -0
- package/src/scan.ts +611 -0
- package/src/select-order.ts +143 -0
- package/src/select-priority.ts +266 -0
- package/src/select.ts +62 -0
- package/src/session-path.ts +153 -0
- package/src/sidecar-apply.ts +216 -0
- package/src/sidecar.ts +700 -0
- package/src/slug-namespace.ts +367 -0
- package/src/spec-complete.ts +118 -0
- package/src/start.ts +974 -0
- package/src/status.ts +441 -0
- package/src/surface-gate.ts +337 -0
- package/src/surface-persist.ts +241 -0
- package/src/tasker-review-loop.ts +671 -0
- package/src/tasking-eligibility.ts +114 -0
- package/src/tasking-lock.ts +416 -0
- package/src/tasking.ts +1438 -0
- package/src/triage-gate.ts +248 -0
- package/src/triage-persist.ts +570 -0
- package/src/verdict-json.ts +73 -0
- package/src/verify-workflow-template.ts +159 -0
- package/src/verify.ts +123 -0
- package/src/watch-session.ts +397 -0
- package/src/work-layout.ts +262 -0
- package/src/work-on.ts +660 -0
- package/src/workspace.ts +502 -0
package/dist/mint-adr.js
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { run } from './git.js';
|
|
4
|
+
import { createItemThroughCas, } from './advancing-lock.js';
|
|
5
|
+
import { resolveSidecarIdentity, sidecarPathFor } from './sidecar.js';
|
|
6
|
+
/**
|
|
7
|
+
* The **ADR-MINT route** (prd
|
|
8
|
+
* `agentic-question-resolution-retire-disposition-vocabulary` US #2, task
|
|
9
|
+
* `agentic-apply-mint-adr-route`) — the SIBLING of {@link
|
|
10
|
+
* import('./triage-persist.js').promoteObservation}, for the agentic apply
|
|
11
|
+
* `mint-adr` verdict.
|
|
12
|
+
*
|
|
13
|
+
* Why a SIBLING and not an `adr` artifact type on `promoteObservation`
|
|
14
|
+
* (recorded `## Decisions`): `promoteObservation` is `work/`-folder-SHAPED — it
|
|
15
|
+
* targets `work/tasks/ready` / `work/prds/proposed` via `workItemRel`, and builds
|
|
16
|
+
* a task/prd body (a `## What to build` / `## Problem Statement` lead + an
|
|
17
|
+
* `## Open questions` block, with `needsAnswers` carried). An ADR is DIFFERENT in
|
|
18
|
+
* EVERY one of those: it lives in `docs/adr/` (OUTSIDE the work board, so the
|
|
19
|
+
* `work/`-layout path builder does not fit), it carries NO `needsAnswers`/open-
|
|
20
|
+
* questions block (an ADR records a SETTLED decision, the antithesis of an open
|
|
21
|
+
* question), and its body is the ADR-FORMAT shape (a context/decision/why record).
|
|
22
|
+
* Forking the body+target branch inside `promoteObservation` would make that
|
|
23
|
+
* function mean two unrelated things; a sibling that REUSES the shared CAS-create
|
|
24
|
+
* primitive (and nothing else) is the cleaner seam.
|
|
25
|
+
*
|
|
26
|
+
* It REUSES the keystone's guarantees verbatim, because both go through the SAME
|
|
27
|
+
* {@link createItemThroughCas} primitive (the new-item-creation CAS from
|
|
28
|
+
* `advancing-lock-borrow`): the source observation + its answered sidecar are
|
|
29
|
+
* `git rm`-ed IN THE SAME atomic commit as the ADR create (delete-on-promote),
|
|
30
|
+
* and a CAS LOSER — which never reaches the commit — backs off WITHOUT deleting
|
|
31
|
+
* the source (left intact for a retry). The ONLY differences from
|
|
32
|
+
* `promoteObservation` are the TARGET path (`docs/adr/<slug>.md`) and the BODY
|
|
33
|
+
* shape (the ADR record).
|
|
34
|
+
*/
|
|
35
|
+
function gitSoft(args, cwd, env) {
|
|
36
|
+
return run('git', args, cwd, { env });
|
|
37
|
+
}
|
|
38
|
+
function resolveBy(cwd, env) {
|
|
39
|
+
const name = gitSoft(['config', 'user.name'], cwd, env);
|
|
40
|
+
if (name.status === 0 && name.stdout.trim() !== '') {
|
|
41
|
+
return name.stdout.trim();
|
|
42
|
+
}
|
|
43
|
+
const e = env ?? process.env;
|
|
44
|
+
return e.USER ?? e.USERNAME ?? '';
|
|
45
|
+
}
|
|
46
|
+
/** Read the observation body from the tree (committed) then the working file. */
|
|
47
|
+
function readItem(cwd, itemPath, env) {
|
|
48
|
+
const show = gitSoft(['show', `:${itemPath}`], cwd, env);
|
|
49
|
+
if (show.status === 0) {
|
|
50
|
+
return show.stdout;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
return readFileSync(join(cwd, itemPath), 'utf8');
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
throw new MintAdrError(`cannot read observation body for '${itemPath}' (the ADR-mint route needs the item file)`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** Raised for usage errors (an empty slug, an unreadable observation). */
|
|
60
|
+
export class MintAdrError extends Error {
|
|
61
|
+
constructor(message) {
|
|
62
|
+
super(message);
|
|
63
|
+
this.name = 'MintAdrError';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The repo-relative `docs/adr/` home for minted ADRs. ADRs live OUTSIDE the
|
|
68
|
+
* `work/` governance tree (so they are NOT in `work-layout.ts`'s registry); this
|
|
69
|
+
* is the single literal the route roots its target on. `docs/adr/` is created
|
|
70
|
+
* lazily by {@link createItemThroughCas} (it `mkdir -p`s the target's dirname).
|
|
71
|
+
*/
|
|
72
|
+
export const ADR_DIR_REL = 'docs/adr';
|
|
73
|
+
/** The repo-relative path of a minted ADR file: `docs/adr/<slug>.md`. */
|
|
74
|
+
export function adrItemRel(slug) {
|
|
75
|
+
return `${ADR_DIR_REL}/${slug}.md`;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Mint a NEW, SELF-CONTAINED ADR FROM an answered observation (the agentic apply
|
|
79
|
+
* `mint-adr` verdict, US #2): CAS-create `docs/adr/<slug>.md` keyed on the new
|
|
80
|
+
* ADR's identity (its path), with the source observation + its answered sidecar
|
|
81
|
+
* `git rm`-ed IN THE SAME atomic commit. The mint is ONE commit (create + delete).
|
|
82
|
+
*
|
|
83
|
+
* The minted body is built FROM the source + the answered question(s) (see
|
|
84
|
+
* {@link buildAdrBody}) so an engineer can read the decision's WHY from the ADR
|
|
85
|
+
* ALONE — that self-containment is the PRECONDITION for the same-commit deletion
|
|
86
|
+
* of the source. An agent-drafted `adrBody` (when present) is used verbatim.
|
|
87
|
+
*
|
|
88
|
+
* The CAS-create is the new-item-creation helper ({@link createItemThroughCas}):
|
|
89
|
+
* a same-slug ADR race needs NO special case — exactly one creator lands the
|
|
90
|
+
* file, the LOSER fails the CAS (exit 2) and backs off WITHOUT deleting the
|
|
91
|
+
* source (so a retry can re-mint). The source (+ its sidecar) is deleted ONLY on a
|
|
92
|
+
* WIN, riding the winning creator's commit.
|
|
93
|
+
*/
|
|
94
|
+
export async function mintAdr(options) {
|
|
95
|
+
const { cwd, item, itemPath, env } = options;
|
|
96
|
+
const note = options.note ?? (() => { });
|
|
97
|
+
const { slug: obsSlug } = resolveSidecarIdentity(item);
|
|
98
|
+
const adrSlug = (options.adrSlug ?? obsSlug).trim();
|
|
99
|
+
if (adrSlug === '') {
|
|
100
|
+
return {
|
|
101
|
+
outcome: 'usage-error',
|
|
102
|
+
exitCode: 1,
|
|
103
|
+
message: `mint-adr ${item}: empty ADR slug — cannot draft an ADR`,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const adrPath = adrItemRel(adrSlug);
|
|
107
|
+
const by = options.by || resolveBy(cwd, env);
|
|
108
|
+
const title = (options.adrTitle ?? adrSlug).trim() || adrSlug;
|
|
109
|
+
const content = options.adrBody !== undefined && options.adrBody.trim() !== ''
|
|
110
|
+
? renderAdrFile(adrSlug, title, options.adrBody.trim())
|
|
111
|
+
: buildAdrBody({
|
|
112
|
+
slug: adrSlug,
|
|
113
|
+
title,
|
|
114
|
+
observation: readItem(cwd, itemPath, env),
|
|
115
|
+
answers: options.answers ?? [],
|
|
116
|
+
});
|
|
117
|
+
// The source note + its answered sidecar `git rm` IN THE SAME create commit
|
|
118
|
+
// (mint = ONE atomic commit). A CAS LOSER never reaches the commit, so it
|
|
119
|
+
// leaves both INTACT for a retry (the loser-backs-off guarantee, over deletion).
|
|
120
|
+
const sidecarPath = sidecarPathFor(item);
|
|
121
|
+
const created = await createItemThroughCas({
|
|
122
|
+
path: adrPath,
|
|
123
|
+
content,
|
|
124
|
+
deletePaths: [itemPath, sidecarPath],
|
|
125
|
+
cwd,
|
|
126
|
+
arbiter: options.arbiter,
|
|
127
|
+
by,
|
|
128
|
+
dryRun: options.dryRun,
|
|
129
|
+
env,
|
|
130
|
+
note,
|
|
131
|
+
...(options.contention !== undefined
|
|
132
|
+
? { contention: options.contention }
|
|
133
|
+
: {}),
|
|
134
|
+
});
|
|
135
|
+
if (created.exitCode !== 0) {
|
|
136
|
+
const message = `mint-adr ${item}: the new ADR ${adrPath} ${created.outcome} the ` +
|
|
137
|
+
`create CAS (${created.message}) — backing off, the observation is left ` +
|
|
138
|
+
'intact for a retry.';
|
|
139
|
+
note(message);
|
|
140
|
+
return {
|
|
141
|
+
outcome: created.outcome === 'lost' ? 'lost' : 'contended',
|
|
142
|
+
exitCode: created.exitCode,
|
|
143
|
+
message,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const message = `minted ${item} → CREATED ${adrPath} (via the CAS) + DELETED the ` +
|
|
147
|
+
'observation + its sidecar in the same commit.';
|
|
148
|
+
note(message);
|
|
149
|
+
return { outcome: 'minted', exitCode: 0, adrPath, message };
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Build a SELF-CONTAINED ADR file FROM an answered observation + its answer(s),
|
|
153
|
+
* in the repo's existing `docs/adr/` shape (recorded `## Decisions`): a `---`
|
|
154
|
+
* frontmatter fence (`title` / `status: accepted` / `created`) then a
|
|
155
|
+
* `# ADR: {title}` heading and the three ADR-FORMAT sections — **Context**
|
|
156
|
+
* (the source signal that prompted the decision), **Decision** (what was decided,
|
|
157
|
+
* from the human's answer), and **Why** (the rationale the answer carries). The
|
|
158
|
+
* decision's WHY is carried IN (the answer prose), so the ADR reads alone — the
|
|
159
|
+
* precondition for deleting the source in the same commit.
|
|
160
|
+
*
|
|
161
|
+
* The mechanism prose of the observation (everything before its first
|
|
162
|
+
* `## Open questions` heading, frontmatter dropped) seeds Context; the
|
|
163
|
+
* question(s)+answer(s) seed Decision + Why. When no answers are threaded the
|
|
164
|
+
* Decision/Why fall back to the observation's prose so the file is never empty.
|
|
165
|
+
*/
|
|
166
|
+
export function buildAdrBody(input) {
|
|
167
|
+
const context = mechanismOf(input.observation).trim();
|
|
168
|
+
const decisionLines = [];
|
|
169
|
+
const whyLines = [];
|
|
170
|
+
for (const { question, answer } of input.answers) {
|
|
171
|
+
const q = question.trim();
|
|
172
|
+
const a = answer.trim();
|
|
173
|
+
if (q !== '' || a !== '') {
|
|
174
|
+
decisionLines.push(`- **${q || '(question)'}** — ${a || '(no answer)'}`);
|
|
175
|
+
if (a !== '') {
|
|
176
|
+
whyLines.push(a);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const body = [
|
|
181
|
+
'## Context',
|
|
182
|
+
'',
|
|
183
|
+
context === ''
|
|
184
|
+
? '(no source context was carried from the observation.)'
|
|
185
|
+
: context,
|
|
186
|
+
'',
|
|
187
|
+
'## Decision',
|
|
188
|
+
'',
|
|
189
|
+
decisionLines.length > 0
|
|
190
|
+
? decisionLines.join('\n')
|
|
191
|
+
: '(the decision is recorded in the source context above.)',
|
|
192
|
+
'',
|
|
193
|
+
'## Why',
|
|
194
|
+
'',
|
|
195
|
+
whyLines.length > 0
|
|
196
|
+
? whyLines.join('\n\n')
|
|
197
|
+
: 'The decision follows directly from the answered question(s) above; the source signal is preserved in this ADR (the note itself leaves by deletion, git history is the archive).',
|
|
198
|
+
'',
|
|
199
|
+
];
|
|
200
|
+
return renderAdrFile(input.slug, input.title, body.join('\n'));
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Wrap an ADR `body` (the markdown AFTER the frontmatter) in the repo's existing
|
|
204
|
+
* ADR file shape: a `---` frontmatter fence (`title` / `status: accepted` /
|
|
205
|
+
* `created`) then a `# ADR: {title}` heading, then the body. Mirrors the existing
|
|
206
|
+
* `docs/adr/*.md` convention (slug-named files with a frontmatter block), NOT the
|
|
207
|
+
* `NNNN-` numeric prefix the ADR-FORMAT template shows — the repo's LIVE
|
|
208
|
+
* convention wins (recorded `## Decisions`).
|
|
209
|
+
*/
|
|
210
|
+
function renderAdrFile(slug, title, body) {
|
|
211
|
+
const date = new Date().toISOString().slice(0, 10);
|
|
212
|
+
return [
|
|
213
|
+
'---',
|
|
214
|
+
`title: ${title}`,
|
|
215
|
+
'status: accepted',
|
|
216
|
+
`created: ${date}`,
|
|
217
|
+
'---',
|
|
218
|
+
'',
|
|
219
|
+
`# ADR: ${title}`,
|
|
220
|
+
'',
|
|
221
|
+
body.replace(/\s*$/, ''),
|
|
222
|
+
'',
|
|
223
|
+
].join('\n');
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The observation's mechanism PROSE: everything before its first
|
|
227
|
+
* `## Open questions` heading, with the frontmatter fence dropped. An ADR records
|
|
228
|
+
* a SETTLED decision, so an observation's open-questions scoping is deliberately
|
|
229
|
+
* NOT carried into the ADR body (unlike a promoted task/prd, which keeps the
|
|
230
|
+
* open questions live) — the answered question(s) ARE the decision.
|
|
231
|
+
*/
|
|
232
|
+
function mechanismOf(observation) {
|
|
233
|
+
const body = stripFrontmatter(observation);
|
|
234
|
+
const lines = body.split('\n');
|
|
235
|
+
const startIdx = lines.findIndex((l) => /^##\s+Open questions\b/i.test(l));
|
|
236
|
+
if (startIdx === -1) {
|
|
237
|
+
return body;
|
|
238
|
+
}
|
|
239
|
+
return lines.slice(0, startIdx).join('\n');
|
|
240
|
+
}
|
|
241
|
+
/** Strip a leading `---\n…\n---` frontmatter fence, returning the body. */
|
|
242
|
+
function stripFrontmatter(content) {
|
|
243
|
+
const normalized = content.replace(/\r\n/g, '\n').replace(/^\uFEFF/, '');
|
|
244
|
+
if (!normalized.startsWith('---\n')) {
|
|
245
|
+
return normalized;
|
|
246
|
+
}
|
|
247
|
+
const lines = normalized.split('\n');
|
|
248
|
+
const closing = lines.indexOf('---', 1);
|
|
249
|
+
if (closing === -1) {
|
|
250
|
+
return normalized;
|
|
251
|
+
}
|
|
252
|
+
return lines
|
|
253
|
+
.slice(closing + 1)
|
|
254
|
+
.join('\n')
|
|
255
|
+
.replace(/^\n+/, '');
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=mint-adr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mint-adr.js","sourceRoot":"","sources":["../src/mint-adr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,GAAG,EAAiB,MAAM,UAAU,CAAC;AAC7C,OAAO,EACN,oBAAoB,GAGpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAC,sBAAsB,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,SAAS,OAAO,CACf,IAAc,EACd,GAAW,EACX,GAAkC;IAElC,OAAO,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,GAAG,EAAC,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,SAAS,CAAC,GAAW,EAAE,GAAkC;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CA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AE,CAAC,CAAC,CAAC;IACxC,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,OAAO,KAAK;SACV,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;SAClB,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { Config } from './config.js';
|
|
2
|
+
import { type LedgerReadStrategy } from './ledger-read.js';
|
|
3
|
+
import { type ScannedItem, type ScanReport } from './scan.js';
|
|
4
|
+
import { type SpecCandidate, type SelectedLifecyclePools } from './select-priority.js';
|
|
5
|
+
import type { LifecyclePoolGates } from './lifecycle-pools.js';
|
|
6
|
+
/**
|
|
7
|
+
* The MIRROR-SIDE eligible-pool scan — the isolated counterpart to
|
|
8
|
+
* `do-autopick`'s in-place pool scan ({@link performDoAuto}). It enumerates the
|
|
9
|
+
* SAME two pools (eligible TASKS + taskable PRDS) but reads a BARE hub mirror's
|
|
10
|
+
* committed `main` ref (`git ls-tree`/`git show`), NOT a working checkout.
|
|
11
|
+
*
|
|
12
|
+
* This is the ONE reusable enumeration unit the prd's FOLD-IN note demands: BOTH
|
|
13
|
+
* the `run` loop driver's isolated+parallel auto-pick AND the one-shot/CI
|
|
14
|
+
* `advance --remote -n` / the CI matrix consume it, so the `-n`/auto-pick rungs
|
|
15
|
+
* (both `do` and `advance`, both `run`-loop and one-shot) all call the SAME scan.
|
|
16
|
+
* A standalone `do --remote -n` then falls out as a thin caller — the scan is NOT
|
|
17
|
+
* invented twice (the existing inline `-n`×`--remote` REFUSAL in `cli.ts` is the
|
|
18
|
+
* placeholder this scan replaces; removing the refusal is the driver/caller's job).
|
|
19
|
+
*
|
|
20
|
+
* It only ENUMERATES the pool — it never claims, builds, or runs anything. `-n`
|
|
21
|
+
* stays ALWAYS SEQUENTIAL (US #25): the selection layer ({@link selectPrioritised})
|
|
22
|
+
* orders + counts; parallelism comes only from `run`'s concurrent loop or the CI
|
|
23
|
+
* matrix, never from this scan or from `-n`.
|
|
24
|
+
*
|
|
25
|
+
* It is the MIRROR-ref counterpart of `do-autopick`'s in-place scan, reusing the
|
|
26
|
+
* exact predicates rather than re-deriving them:
|
|
27
|
+
*
|
|
28
|
+
* - **tasks** — {@link scoreItems} (the SAME eligibility scoring the in-place
|
|
29
|
+
* `scanRepoPaths`/registry `scan` use) over the mirror's `work/backlog` +
|
|
30
|
+
* `work/done` read via {@link LedgerReadStrategy.resolveMirrorState}.
|
|
31
|
+
* - **taskable prds** — {@link taskableSpecs} (`autoslice-gate`'s predicate)
|
|
32
|
+
* over the mirror's `work/prds/ready` + `work/prds/tasked` read via the mirror-ref
|
|
33
|
+
* {@link LedgerReadStrategy.resolveMirrorSpecPool}.
|
|
34
|
+
*
|
|
35
|
+
* Per-repo policy parity: a bare mirror has no checked-out `.dorfl.json`,
|
|
36
|
+
* but the COMMITTED one is reachable on `main` (the `do --remote` per-repo seam).
|
|
37
|
+
* We layer it via {@link resolveRepoConfigFromMirror} so the same logical `work/`
|
|
38
|
+
* state yields the SAME `autoBuild`/`autoTask` decision an in-place checkout
|
|
39
|
+
* would — that is what makes the mirror scan PARITY-equal to the in-place one.
|
|
40
|
+
*/
|
|
41
|
+
/** What {@link scanMirrorPool} needs: which bare mirror + the global config. */
|
|
42
|
+
export interface ScanMirrorPoolOptions {
|
|
43
|
+
/** The bare hub mirror directory (`<workspacesDir>/repos/<key>.git`). */
|
|
44
|
+
mirrorPath: string;
|
|
45
|
+
/**
|
|
46
|
+
* The global + default config layer. The repo's COMMITTED `.dorfl.json`
|
|
47
|
+
* (read from the mirror's `main`) is layered on top, so `autoBuild`/`autoTask`
|
|
48
|
+
* resolve per-repo exactly as the in-place scan resolves them from the checkout.
|
|
49
|
+
*/
|
|
50
|
+
config: Config;
|
|
51
|
+
/**
|
|
52
|
+
* The mirror-LOCAL ref whose `work/` tree to read (default `main`). A bare hub
|
|
53
|
+
* mirror's `main` is a LOCAL branch — never `origin/main`.
|
|
54
|
+
*/
|
|
55
|
+
ref?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Override the read seam (tests inject a stub). Defaults to the active
|
|
58
|
+
* {@link ledgerRead} — the SAME seam the in-place scan reads through.
|
|
59
|
+
*/
|
|
60
|
+
read?: LedgerReadStrategy;
|
|
61
|
+
/**
|
|
62
|
+
* Sink for a non-fatal per-repo-config read warning. The scan must never error
|
|
63
|
+
* out on a config-read fault — it falls back to global + default (the
|
|
64
|
+
* no-per-repo behaviour) and warns. (Fetch-first freshness is the CALLER's job,
|
|
65
|
+
* exactly as it is for the registry `scan`; this reads the already-fetched ref.)
|
|
66
|
+
*/
|
|
67
|
+
warn?: (message: string) => void;
|
|
68
|
+
env?: NodeJS.ProcessEnv;
|
|
69
|
+
/**
|
|
70
|
+
* The LIFECYCLE-POOL create-gates (task `advance-autopick-lifecycle-pools`),
|
|
71
|
+
* the internal hook the gate tasks will wire to `observationTriage` /
|
|
72
|
+
* `surfaceBlockers`. INTERIM, born OFF: omitted ⇒ BOTH create-gates OFF, so the
|
|
73
|
+
* mirror-side triage + surface sub-pools contribute NOTHING (the apply sub-pool
|
|
74
|
+
* is always-on). The mirror enumeration mirrors the in-place one exactly.
|
|
75
|
+
*/
|
|
76
|
+
lifecycleGates?: LifecyclePoolGates;
|
|
77
|
+
/**
|
|
78
|
+
* The per-machine config-override map (ADR
|
|
79
|
+
* `per-machine-config-override-layer`), threaded into the mirror-side per-repo
|
|
80
|
+
* resolution so the override applies to the autopick pool scan. Default: empty.
|
|
81
|
+
*/
|
|
82
|
+
override?: import('./config-override.js').ConfigOverrideMap;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The enumerated mirror-side pool — the isolated counterpart of `do-autopick`'s
|
|
86
|
+
* two pools. Both drivers feed `report` + `prds` into the SAME
|
|
87
|
+
* {@link selectPrioritised} (the loop driver takes all; the one-shot/CI driver
|
|
88
|
+
* bounds by a SEQUENTIAL `count`).
|
|
89
|
+
*/
|
|
90
|
+
export interface MirrorPoolScanResult {
|
|
91
|
+
/**
|
|
92
|
+
* The task pool as a one-repo {@link ScanReport} (the mirror is the single
|
|
93
|
+
* repo), scored through {@link scoreItems} — the SAME shape
|
|
94
|
+
* {@link selectPrioritised} consumes for the in-place scan, so the task
|
|
95
|
+
* selection is byte-identical to `run`'s.
|
|
96
|
+
*/
|
|
97
|
+
report: ScanReport;
|
|
98
|
+
/** Every scanned task (eligible or not), in scan order. */
|
|
99
|
+
tasks: ScannedItem[];
|
|
100
|
+
/** Just the eligible subset of {@link tasks} (convenience for assertions/callers). */
|
|
101
|
+
eligibleTasks: ScannedItem[];
|
|
102
|
+
/**
|
|
103
|
+
* The TASKABLE SPEC pool — already filtered through `taskableSpecs`
|
|
104
|
+
* (`autoslice-gate`'s predicate). In declaration order; the selection layer
|
|
105
|
+
* does not re-gate it.
|
|
106
|
+
*/
|
|
107
|
+
specs: SpecCandidate[];
|
|
108
|
+
/**
|
|
109
|
+
* The LIFECYCLE pools (task `advance-autopick-lifecycle-pools`): untriaged
|
|
110
|
+
* observations (triage), `needsAnswers`-blocked items with no all-answered
|
|
111
|
+
* sidecar (surface), and answered-sidecar items (apply). Built through the SAME
|
|
112
|
+
* shared {@link buildLifecyclePools} unit the in-place caller uses (NOT a second
|
|
113
|
+
* enumeration), so the in-place + mirror-side selections AGREE. The create-gates
|
|
114
|
+
* default OFF (interim); apply is always present. The drivers feed this straight
|
|
115
|
+
* into {@link selectPrioritised}'s `lifecycle` slot.
|
|
116
|
+
*/
|
|
117
|
+
lifecycle: SelectedLifecyclePools;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Run the mirror-side eligible-pool scan over a single bare hub mirror. Reads
|
|
121
|
+
* both pools from its committed `main`, scores/filters them through the EXACT
|
|
122
|
+
* in-place predicates, and returns the shape both drivers consume.
|
|
123
|
+
*/
|
|
124
|
+
export declare function scanMirrorPool(options: ScanMirrorPoolOptions): Promise<MirrorPoolScanResult>;
|
|
125
|
+
//# sourceMappingURL=mirror-pool-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mirror-pool-scan.d.ts","sourceRoot":"","sources":["../src/mirror-pool-scan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAa,KAAK,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAIN,KAAK,WAAW,EAChB,KAAK,UAAU,EAEf,MAAM,WAAW,CAAC;AACnB,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,gFAAgF;AAChF,MAAM,WAAW,qBAAqB;IACrC,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,sBAAsB,EAAE,iBAAiB,CAAC;CAC5D;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;;OAKG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB,2DAA2D;IAC3D,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,sFAAsF;IACtF,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B;;;;OAIG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;;;;;;OAQG;IACH,SAAS,EAAE,sBAAsB,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,qBAAqB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAgG/B"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ledgerRead } from './ledger-read.js';
|
|
2
|
+
import { resolveRepoConfigFromMirror } from './repo-mirror.js';
|
|
3
|
+
import { scoreItems, scoreSpecs, toScannedLifecycle, } from './scan.js';
|
|
4
|
+
import { taskableSpecs, } from './select-priority.js';
|
|
5
|
+
import { gatherLifecycleMirror } from './lifecycle-gather.js';
|
|
6
|
+
import { heldTaskSlugs } from './item-lock.js';
|
|
7
|
+
/**
|
|
8
|
+
* Run the mirror-side eligible-pool scan over a single bare hub mirror. Reads
|
|
9
|
+
* both pools from its committed `main`, scores/filters them through the EXACT
|
|
10
|
+
* in-place predicates, and returns the shape both drivers consume.
|
|
11
|
+
*/
|
|
12
|
+
export async function scanMirrorPool(options) {
|
|
13
|
+
const { mirrorPath, config, ref = 'main', env } = options;
|
|
14
|
+
const read = options.read ?? ledgerRead;
|
|
15
|
+
const warn = options.warn;
|
|
16
|
+
// Per-repo policy parity: layer the COMMITTED `.dorfl.json` from the
|
|
17
|
+
// mirror's `main` (the `do --remote` per-repo seam) onto global. Never fatal —
|
|
18
|
+
// a config-less repo or a read fault falls back to global + default.
|
|
19
|
+
let repoConfig;
|
|
20
|
+
try {
|
|
21
|
+
repoConfig = resolveRepoConfigFromMirror({
|
|
22
|
+
mirrorPath,
|
|
23
|
+
global: config,
|
|
24
|
+
env,
|
|
25
|
+
override: options.override,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
30
|
+
warn?.(`could not read the target repo's config from ${mirrorPath}/main; ` +
|
|
31
|
+
`resolving from global + default. ${reason}`);
|
|
32
|
+
repoConfig = config;
|
|
33
|
+
}
|
|
34
|
+
// Pool 1 — eligible TASKS from the bare mirror's `work/backlog`+`work/done`,
|
|
35
|
+
// scored through the EXACT same `scoreItems` the in-place/registry scans use.
|
|
36
|
+
const state = await read.resolveMirrorState({ mirrorPath, ref, env });
|
|
37
|
+
const counts = { totalItems: 0, totalEligible: 0 };
|
|
38
|
+
// HELD-SLUG SUBTRACTION (prd `ledger-status-per-item-lock-refs` US #15): a bare
|
|
39
|
+
// hub mirror's arbiter is its `origin`; read the held lock refs from there and
|
|
40
|
+
// exclude those slugs from the enumerated `backlog/` pool. Non-fatal (empty set
|
|
41
|
+
// on any fault) and redundant-but-harmless while the body still moves — wired now
|
|
42
|
+
// so task #9 needs no reader change. Freshness (fetch-first) is the CALLER's job
|
|
43
|
+
// for the pool ref, exactly as it is for the config read; `heldTaskSlugs` does
|
|
44
|
+
// its own lock-ref fetch.
|
|
45
|
+
const heldSlugs = await heldTaskSlugs(mirrorPath, 'origin', env);
|
|
46
|
+
const items = scoreItems(state, repoConfig.autoBuild, counts, heldSlugs);
|
|
47
|
+
// Pool 2 — TASKABLE PRDS from the bare mirror's `work/prds/ready`+`work/prds/tasked`,
|
|
48
|
+
// filtered through `autoslice-gate`'s predicate (NOT reinvented). Read FIRST so
|
|
49
|
+
// we can populate the `specs[]` companion of `items[]` on the RepoReport below.
|
|
50
|
+
const pool = await read.resolveMirrorSpecPool({ mirrorPath, ref, env });
|
|
51
|
+
const specs = taskableSpecs({
|
|
52
|
+
candidates: pool.specs.map((p) => ({
|
|
53
|
+
repoPath: mirrorPath,
|
|
54
|
+
slug: p.slug,
|
|
55
|
+
humanOnly: p.humanOnly,
|
|
56
|
+
needsAnswers: p.needsAnswers,
|
|
57
|
+
taskedAfter: p.taskedAfter,
|
|
58
|
+
})),
|
|
59
|
+
taskedSlugs: pool.taskedSlugs,
|
|
60
|
+
autoTask: repoConfig.autoTask,
|
|
61
|
+
});
|
|
62
|
+
// The one-slug-one-folder LINT is a HUMAN-FACING surface (`scan`/`status`); this
|
|
63
|
+
// mirror-side pool scan exists only to SCORE the task/prd candidate pools for
|
|
64
|
+
// autonomous selection, never to render a dashboard, so it carries an empty lint
|
|
65
|
+
// (the duplicate surface is the user-facing `scan`/`status`, per the task). The
|
|
66
|
+
// `specs[]` companion of `items[]` is filled via the SAME `scoreSpecs` helper
|
|
67
|
+
// `scan`/`scanRepoPaths` call — so the propose-matrix `jq` (`repos[].specs[] |
|
|
68
|
+
// select(.eligibility.eligible)`) sees the same shape on every surface.
|
|
69
|
+
// Pools 3 + 4 — the LIFECYCLE pools, gathered from the SAME mirror `main` (the
|
|
70
|
+
// `needsAnswers` backlog/prds + their sidecars + `work/notes/observations/`) and built
|
|
71
|
+
// through the SHARED enumeration unit the in-place caller uses — so the in-place
|
|
72
|
+
// + mirror-side selections AGREE. Create-gates default OFF (interim); apply
|
|
73
|
+
// (consume) is always present.
|
|
74
|
+
const lifecycle = await gatherLifecycleMirror({
|
|
75
|
+
mirrorPath,
|
|
76
|
+
ref,
|
|
77
|
+
read,
|
|
78
|
+
gates: options.lifecycleGates,
|
|
79
|
+
env,
|
|
80
|
+
});
|
|
81
|
+
const repo = {
|
|
82
|
+
path: mirrorPath,
|
|
83
|
+
items,
|
|
84
|
+
specs: scoreSpecs(mirrorPath, pool, repoConfig.autoTask),
|
|
85
|
+
// The propose-matrix lifecycle pool on this mirror's `RepoReport` — the SAME
|
|
86
|
+
// `gatherLifecycleMirror` result projected onto the `scan --json` shape, so
|
|
87
|
+
// the dashboard/matrix surface agrees with the selection scoring below.
|
|
88
|
+
lifecycle: toScannedLifecycle(lifecycle),
|
|
89
|
+
ledgerDuplicates: [],
|
|
90
|
+
};
|
|
91
|
+
const report = {
|
|
92
|
+
repos: [repo],
|
|
93
|
+
totalItems: counts.totalItems,
|
|
94
|
+
totalEligible: counts.totalEligible,
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
report,
|
|
98
|
+
tasks: items,
|
|
99
|
+
eligibleTasks: items.filter((i) => i.eligibility.eligible),
|
|
100
|
+
specs,
|
|
101
|
+
lifecycle,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=mirror-pool-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mirror-pool-scan.js","sourceRoot":"","sources":["../src/mirror-pool-scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAA0B,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAC,2BAA2B,EAAC,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACN,UAAU,EACV,UAAU,EACV,kBAAkB,GAIlB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,aAAa,GAGb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAsH7C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CACnC,OAA8B;IAE9B,MAAM,EAAC,UAAU,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,EAAE,GAAG,EAAC,GAAG,OAAO,CAAC;IACxD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1B,qEAAqE;IACrE,+EAA+E;IAC/E,qEAAqE;IACrE,IAAI,UAAkB,CAAC;IACvB,IAAI,CAAC;QACJ,UAAU,GAAG,2BAA2B,CAAC;YACxC,UAAU;YACV,MAAM,EAAE,MAAM;YACd,GAAG;YACH,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC1B,CAAC,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,MAAM,MAAM,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC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