dorfl 0.1.1 → 0.2.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 +3 -3
- package/dist/advance-ci-template.js +1 -1
- package/dist/advance-ci-template.js.map +1 -1
- package/dist/advance-classify.d.ts +5 -5
- package/dist/advance-classify.d.ts.map +1 -1
- package/dist/advance-classify.js +4 -4
- package/dist/advance-drivers.d.ts +8 -8
- package/dist/advance-drivers.d.ts.map +1 -1
- package/dist/advance-drivers.js +20 -8
- package/dist/advance-drivers.js.map +1 -1
- package/dist/advance-isolated.d.ts +3 -3
- package/dist/advance-isolated.d.ts.map +1 -1
- package/dist/advance-isolated.js +1 -1
- package/dist/advance-lifecycle-template.d.ts +2 -2
- package/dist/advance-lifecycle-template.d.ts.map +1 -1
- package/dist/advance-lifecycle-template.js +85 -13
- package/dist/advance-lifecycle-template.js.map +1 -1
- package/dist/advance-loop-driver.d.ts +3 -3
- package/dist/advance-loop-driver.d.ts.map +1 -1
- package/dist/advance-loop-driver.js +1 -1
- package/dist/advance-treeless-publish.d.ts +24 -1
- package/dist/advance-treeless-publish.d.ts.map +1 -1
- package/dist/advance-treeless-publish.js +41 -0
- package/dist/advance-treeless-publish.js.map +1 -1
- package/dist/advance.d.ts +69 -17
- package/dist/advance.d.ts.map +1 -1
- package/dist/advance.js +409 -102
- package/dist/advance.js.map +1 -1
- package/dist/advancing-lock.d.ts +31 -3
- package/dist/advancing-lock.d.ts.map +1 -1
- package/dist/advancing-lock.js +55 -5
- package/dist/advancing-lock.js.map +1 -1
- package/dist/agent-launch.d.ts +12 -0
- package/dist/agent-launch.d.ts.map +1 -1
- package/dist/agent-launch.js +22 -12
- package/dist/agent-launch.js.map +1 -1
- package/dist/agent-stop.d.ts +40 -2
- package/dist/agent-stop.d.ts.map +1 -1
- package/dist/agent-stop.js +30 -2
- package/dist/agent-stop.js.map +1 -1
- package/dist/apply-decide.d.ts +19 -5
- package/dist/apply-decide.d.ts.map +1 -1
- package/dist/apply-decide.js +38 -9
- package/dist/apply-decide.js.map +1 -1
- package/dist/apply-merge-action.d.ts +20 -8
- package/dist/apply-merge-action.d.ts.map +1 -1
- package/dist/apply-merge-action.js +44 -9
- package/dist/apply-merge-action.js.map +1 -1
- package/dist/apply-persist.d.ts +62 -31
- package/dist/apply-persist.d.ts.map +1 -1
- package/dist/apply-persist.js +173 -44
- package/dist/apply-persist.js.map +1 -1
- package/dist/apply-stuck-action.d.ts +151 -0
- package/dist/apply-stuck-action.d.ts.map +1 -0
- package/dist/apply-stuck-action.js +125 -0
- package/dist/apply-stuck-action.js.map +1 -0
- package/dist/brand.d.ts +12 -1
- package/dist/brand.d.ts.map +1 -1
- package/dist/brand.js +2 -1
- package/dist/brand.js.map +1 -1
- package/dist/buildable-body.d.ts +14 -14
- package/dist/buildable-body.js +9 -9
- package/dist/claim-cas.d.ts +3 -3
- package/dist/claim-cas.js +1 -1
- package/dist/claim-cas.js.map +1 -1
- package/dist/cli-spinner.d.ts +1 -1
- package/dist/cli-spinner.js +1 -1
- package/dist/cli.d.ts +10 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +385 -128
- package/dist/cli.js.map +1 -1
- package/dist/close-job-template.d.ts +3 -3
- package/dist/close-job-template.js +9 -9
- package/dist/close-job.d.ts +8 -8
- package/dist/close-job.js +25 -25
- package/dist/close-job.js.map +1 -1
- package/dist/complete.d.ts +9 -6
- package/dist/complete.d.ts.map +1 -1
- package/dist/complete.js +99 -45
- package/dist/complete.js.map +1 -1
- package/dist/concurrency.d.ts +1 -1
- package/dist/concurrency.js +1 -1
- package/dist/config.d.ts +86 -40
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +61 -9
- package/dist/config.js.map +1 -1
- package/dist/continue-branch.d.ts +1 -1
- package/dist/continue-branch.d.ts.map +1 -1
- package/dist/continue-branch.js +23 -1
- package/dist/continue-branch.js.map +1 -1
- package/dist/cwd-section.js +1 -1
- package/dist/cwd-section.js.map +1 -1
- package/dist/decision-engine.d.ts +39 -11
- package/dist/decision-engine.d.ts.map +1 -1
- package/dist/decision-engine.js +10 -6
- package/dist/decision-engine.js.map +1 -1
- package/dist/do-autopick.d.ts +6 -6
- package/dist/do-autopick.d.ts.map +1 -1
- package/dist/do-autopick.js +16 -6
- package/dist/do-autopick.js.map +1 -1
- package/dist/do-config.d.ts +4 -4
- package/dist/do-config.js +3 -3
- package/dist/do-config.js.map +1 -1
- package/dist/do-remote-auto.d.ts +2 -2
- package/dist/do-remote-auto.js +1 -1
- package/dist/do.d.ts +74 -81
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +439 -50
- package/dist/do.js.map +1 -1
- package/dist/drop-source.d.ts +2 -2
- package/dist/env-config.d.ts.map +1 -1
- package/dist/env-config.js +19 -11
- package/dist/env-config.js.map +1 -1
- package/dist/failure-cause.d.ts +3 -2
- package/dist/failure-cause.d.ts.map +1 -1
- package/dist/failure-cause.js +28 -1
- package/dist/failure-cause.js.map +1 -1
- package/dist/format.d.ts +6 -6
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +13 -30
- package/dist/format.js.map +1 -1
- package/dist/frontmatter.d.ts +28 -15
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +38 -24
- package/dist/frontmatter.js.map +1 -1
- package/dist/gc.d.ts +65 -6
- package/dist/gc.d.ts.map +1 -1
- package/dist/gc.js +126 -9
- package/dist/gc.js.map +1 -1
- package/dist/github.d.ts +14 -0
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +73 -0
- package/dist/github.js.map +1 -1
- package/dist/harness.d.ts +25 -0
- package/dist/harness.d.ts.map +1 -1
- package/dist/harness.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/install-ci-branch-protection.d.ts +133 -39
- package/dist/install-ci-branch-protection.d.ts.map +1 -1
- package/dist/install-ci-branch-protection.js +191 -49
- package/dist/install-ci-branch-protection.js.map +1 -1
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts +1 -1
- package/dist/install-ci-capabilities/advance-lifecycle.js +1 -1
- package/dist/install-ci-capabilities/close-job.d.ts +1 -1
- package/dist/install-ci-capabilities/close-job.js +1 -1
- package/dist/install-ci-capabilities/example-noop.d.ts +1 -1
- package/dist/install-ci-capabilities/example-noop.js +1 -1
- package/dist/install-ci-capabilities/intake.d.ts +2 -2
- package/dist/install-ci-capabilities/intake.js +2 -2
- package/dist/install-ci-capabilities/verify.d.ts +1 -1
- package/dist/install-ci-capabilities/verify.js +1 -1
- package/dist/install-ci-core.d.ts +24 -4
- package/dist/install-ci-core.d.ts.map +1 -1
- package/dist/install-ci-core.js +12 -5
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +33 -1
- package/dist/install-ci-github.d.ts.map +1 -1
- package/dist/install-ci-github.js +74 -1
- package/dist/install-ci-github.js.map +1 -1
- package/dist/install-ci.d.ts +1 -1
- package/dist/install-ci.js +4 -4
- package/dist/install-ci.js.map +1 -1
- package/dist/install-skills.d.ts +123 -0
- package/dist/install-skills.d.ts.map +1 -0
- package/dist/install-skills.js +100 -0
- package/dist/install-skills.js.map +1 -0
- package/dist/intake-event.d.ts +6 -6
- package/dist/intake-event.js +6 -6
- package/dist/intake-marker.d.ts +3 -3
- package/dist/intake-marker.d.ts.map +1 -1
- package/dist/intake-triage.d.ts +1 -1
- package/dist/intake-triage.js +2 -2
- package/dist/intake-trigger-template.d.ts +8 -8
- package/dist/intake-trigger-template.d.ts.map +1 -1
- package/dist/intake-trigger-template.js +17 -17
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts +65 -52
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +92 -76
- package/dist/intake.js.map +1 -1
- package/dist/integration-core.d.ts +27 -24
- package/dist/integration-core.d.ts.map +1 -1
- package/dist/integration-core.js +191 -77
- package/dist/integration-core.js.map +1 -1
- package/dist/integrator.d.ts +1 -1
- package/dist/integrator.d.ts.map +1 -1
- package/dist/integrator.js +19 -3
- package/dist/integrator.js.map +1 -1
- package/dist/isolation.d.ts +4 -4
- package/dist/isolation.d.ts.map +1 -1
- package/dist/isolation.js +9 -0
- package/dist/isolation.js.map +1 -1
- package/dist/issue-provider.d.ts +4 -4
- package/dist/issue-provider.js +1 -1
- package/dist/item-lock.d.ts +216 -149
- package/dist/item-lock.d.ts.map +1 -1
- package/dist/item-lock.js +345 -270
- package/dist/item-lock.js.map +1 -1
- package/dist/item-path.d.ts +2 -2
- package/dist/item-path.js +2 -2
- package/dist/ledger-lint.d.ts +9 -9
- package/dist/ledger-lint.js +9 -9
- package/dist/ledger-read.d.ts +57 -57
- package/dist/ledger-read.d.ts.map +1 -1
- package/dist/ledger-read.js +24 -24
- package/dist/ledger-read.js.map +1 -1
- package/dist/ledger-write.d.ts +33 -28
- package/dist/ledger-write.d.ts.map +1 -1
- package/dist/ledger-write.js +100 -122
- package/dist/ledger-write.js.map +1 -1
- package/dist/lifecycle-gather.d.ts +18 -1
- package/dist/lifecycle-gather.d.ts.map +1 -1
- package/dist/lifecycle-gather.js +23 -17
- package/dist/lifecycle-gather.js.map +1 -1
- package/dist/lifecycle-pools.d.ts +44 -7
- package/dist/lifecycle-pools.d.ts.map +1 -1
- package/dist/lifecycle-pools.js +27 -7
- package/dist/lifecycle-pools.js.map +1 -1
- package/dist/merge-question-surfacer.d.ts +18 -4
- package/dist/merge-question-surfacer.d.ts.map +1 -1
- package/dist/merge-question-surfacer.js +20 -5
- package/dist/merge-question-surfacer.js.map +1 -1
- package/dist/migrate-stuck-locks.d.ts +129 -0
- package/dist/migrate-stuck-locks.d.ts.map +1 -0
- package/dist/migrate-stuck-locks.js +355 -0
- package/dist/migrate-stuck-locks.js.map +1 -0
- package/dist/mint-adr.js +4 -4
- package/dist/mirror-pool-scan.d.ts +2 -2
- package/dist/mirror-pool-scan.js +3 -3
- package/dist/mirror-pool-scan.js.map +1 -1
- package/dist/needs-attention.d.ts +304 -27
- package/dist/needs-attention.d.ts.map +1 -1
- package/dist/needs-attention.js +542 -67
- package/dist/needs-attention.js.map +1 -1
- package/dist/orphan-sidecar.d.ts +10 -6
- package/dist/orphan-sidecar.d.ts.map +1 -1
- package/dist/orphan-sidecar.js +35 -2
- package/dist/orphan-sidecar.js.map +1 -1
- package/dist/pi-harness.d.ts +16 -0
- package/dist/pi-harness.d.ts.map +1 -1
- package/dist/pi-harness.js +82 -2
- package/dist/pi-harness.js.map +1 -1
- package/dist/placement.d.ts +8 -8
- package/dist/placement.js +3 -3
- package/dist/prd-to-spec.d.ts.map +1 -1
- package/dist/prd-to-spec.js +9 -5
- package/dist/prd-to-spec.js.map +1 -1
- package/dist/prompt.d.ts +16 -19
- package/dist/prompt.d.ts.map +1 -1
- package/dist/prompt.js +17 -19
- package/dist/prompt.js.map +1 -1
- package/dist/protocol/CLAIM-PROTOCOL.md +17 -10
- package/dist/protocol/REVIEW-PROTOCOL.md +4 -1
- package/dist/protocol/SURFACE-PROTOCOL.md +16 -2
- package/dist/protocol/TASKING-PROTOCOL.md +3 -1
- package/dist/protocol/WORK-CONTRACT.md +22 -18
- package/dist/protocol/task-template.md +1 -1
- package/dist/readiness.d.ts +1 -1
- package/dist/reap-branches.d.ts +12 -9
- package/dist/reap-branches.d.ts.map +1 -1
- package/dist/reap-branches.js +25 -7
- package/dist/reap-branches.js.map +1 -1
- package/dist/recover-isolated.d.ts +12 -0
- package/dist/recover-isolated.d.ts.map +1 -1
- package/dist/recover-isolated.js +6 -1
- package/dist/recover-isolated.js.map +1 -1
- package/dist/repo-config.d.ts +23 -2
- package/dist/repo-config.d.ts.map +1 -1
- package/dist/repo-config.js +64 -18
- package/dist/repo-config.js.map +1 -1
- package/dist/repo-mirror.d.ts.map +1 -1
- package/dist/repo-mirror.js +18 -2
- package/dist/repo-mirror.js.map +1 -1
- package/dist/review-gate.d.ts +3 -3
- package/dist/review-gate.d.ts.map +1 -1
- package/dist/review-gate.js +11 -10
- package/dist/review-gate.js.map +1 -1
- package/dist/review-verdict.d.ts +2 -2
- package/dist/review-verdict.d.ts.map +1 -1
- package/dist/review-verdict.js +2 -2
- package/dist/review-verdict.js.map +1 -1
- package/dist/run.d.ts +2 -2
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +58 -23
- package/dist/run.js.map +1 -1
- package/dist/scan.d.ts +26 -17
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +29 -15
- package/dist/scan.js.map +1 -1
- package/dist/select-order.d.ts +1 -1
- package/dist/select-priority.d.ts +14 -14
- package/dist/select-priority.d.ts.map +1 -1
- package/dist/select-priority.js +5 -5
- package/dist/select-priority.js.map +1 -1
- package/dist/sidecar-apply.js +1 -1
- package/dist/sidecar-apply.js.map +1 -1
- package/dist/sidecar.d.ts +47 -12
- package/dist/sidecar.d.ts.map +1 -1
- package/dist/sidecar.js +84 -4
- package/dist/sidecar.js.map +1 -1
- package/dist/skills/answer-questions/SKILL.md +89 -0
- package/dist/skills/capture-signal/SKILL.md +52 -0
- package/dist/skills/convert-from-prd-to-spec/SKILL.md +90 -0
- package/dist/skills/drive-tasks/SKILL.md +218 -0
- package/dist/skills/from-idea/SKILL.md +83 -0
- package/dist/skills/merge-prs/SKILL.md +70 -0
- package/dist/skills/orchestrate/SKILL.md +101 -0
- package/dist/skills/promote/SKILL.md +35 -0
- package/dist/skills/review/SKILL.md +16 -0
- package/dist/skills/setup/SKILL.md +258 -0
- package/dist/skills/setup/protocol/ADR-FORMAT.md +47 -0
- package/dist/skills/setup/protocol/CLAIM-PROTOCOL.md +224 -0
- package/dist/skills/setup/protocol/REVIEW-PROTOCOL.md +122 -0
- package/dist/skills/setup/protocol/SURFACE-PROTOCOL.md +135 -0
- package/dist/skills/setup/protocol/TASKING-PROTOCOL.md +124 -0
- package/dist/skills/setup/protocol/WORK-CONTRACT.md +280 -0
- package/dist/skills/setup/protocol/spec-template.md +71 -0
- package/dist/skills/setup/protocol/task-template.md +65 -0
- package/dist/skills/surface-questions/SKILL.md +16 -0
- package/dist/skills/to-spec/SKILL.md +34 -0
- package/dist/skills/to-task/SKILL.md +19 -0
- package/dist/skills/triage-observations/SKILL.md +78 -0
- package/dist/skills/work/SKILL.md +51 -0
- package/dist/slug-namespace.d.ts +6 -6
- package/dist/slug-namespace.js +8 -8
- package/dist/slug-namespace.js.map +1 -1
- package/dist/spec-complete.d.ts.map +1 -1
- package/dist/spec-complete.js +4 -5
- package/dist/spec-complete.js.map +1 -1
- package/dist/start.d.ts +1 -1
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +54 -60
- package/dist/start.js.map +1 -1
- package/dist/status.d.ts +3 -3
- package/dist/status.js +4 -4
- package/dist/status.js.map +1 -1
- package/dist/surface-gate.d.ts +2 -2
- package/dist/surface-gate.d.ts.map +1 -1
- package/dist/surface-gate.js +10 -3
- package/dist/surface-gate.js.map +1 -1
- package/dist/surface-persist.d.ts +2 -2
- package/dist/surface-persist.d.ts.map +1 -1
- package/dist/surface-persist.js +1 -1
- package/dist/surface-persist.js.map +1 -1
- package/dist/tasker-review-loop.d.ts +11 -10
- package/dist/tasker-review-loop.d.ts.map +1 -1
- package/dist/tasker-review-loop.js +8 -8
- package/dist/tasker-review-loop.js.map +1 -1
- package/dist/tasking-eligibility.d.ts +21 -21
- package/dist/tasking-eligibility.d.ts.map +1 -1
- package/dist/tasking-eligibility.js +10 -10
- package/dist/tasking-lock.d.ts +10 -10
- package/dist/tasking-lock.d.ts.map +1 -1
- package/dist/tasking-lock.js +69 -49
- package/dist/tasking-lock.js.map +1 -1
- package/dist/tasking.d.ts +73 -39
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +309 -95
- package/dist/tasking.js.map +1 -1
- package/dist/triage-gate.d.ts +1 -1
- package/dist/triage-persist.d.ts +15 -11
- package/dist/triage-persist.d.ts.map +1 -1
- package/dist/triage-persist.js +48 -18
- package/dist/triage-persist.js.map +1 -1
- package/dist/vendor/incur/agents.d.ts +58 -0
- package/dist/vendor/incur/agents.d.ts.map +1 -0
- package/dist/vendor/incur/agents.js +343 -0
- package/dist/vendor/incur/agents.js.map +1 -0
- package/dist/verify-workflow-template.d.ts +1 -1
- package/dist/verify-workflow-template.js +3 -3
- package/dist/watch-session.d.ts +11 -3
- package/dist/watch-session.d.ts.map +1 -1
- package/dist/watch-session.js +94 -7
- package/dist/watch-session.js.map +1 -1
- package/dist/work-layout.d.ts +15 -9
- package/dist/work-layout.d.ts.map +1 -1
- package/dist/work-layout.js +14 -9
- package/dist/work-layout.js.map +1 -1
- package/dist/workspace.d.ts +2 -2
- package/package.json +2 -2
- package/src/advance-ci-template.ts +4 -4
- package/src/advance-classify.ts +5 -5
- package/src/advance-drivers.ts +26 -13
- package/src/advance-isolated.ts +3 -3
- package/src/advance-lifecycle-template.ts +98 -13
- package/src/advance-loop-driver.ts +3 -3
- package/src/advance-treeless-publish.ts +46 -1
- package/src/advance.ts +495 -115
- package/src/advancing-lock.ts +102 -7
- package/src/agent-launch.ts +37 -12
- package/src/agent-stop.ts +60 -2
- package/src/apply-decide.ts +38 -9
- package/src/apply-merge-action.ts +49 -11
- package/src/apply-persist.ts +236 -62
- package/src/apply-stuck-action.ts +260 -0
- package/src/brand.ts +14 -2
- package/src/buildable-body.ts +14 -14
- package/src/claim-cas.ts +4 -4
- package/src/cli-spinner.ts +1 -1
- package/src/cli.ts +472 -141
- package/src/close-job-template.ts +9 -9
- package/src/close-job.ts +26 -26
- package/src/complete.ts +121 -63
- package/src/concurrency.ts +1 -1
- package/src/config.ts +143 -49
- package/src/continue-branch.ts +23 -1
- package/src/cwd-section.ts +1 -1
- package/src/decision-engine.ts +57 -19
- package/src/do-autopick.ts +21 -10
- package/src/do-config.ts +7 -7
- package/src/do-remote-auto.ts +2 -2
- package/src/do.ts +558 -85
- package/src/drop-source.ts +2 -2
- package/src/env-config.ts +19 -11
- package/src/failure-cause.ts +30 -1
- package/src/format.ts +13 -33
- package/src/frontmatter.ts +55 -35
- package/src/gc.ts +172 -9
- package/src/github.ts +78 -0
- package/src/harness.ts +25 -0
- package/src/index.ts +10 -0
- package/src/install-ci-branch-protection.ts +283 -58
- package/src/install-ci-capabilities/advance-lifecycle.ts +1 -1
- package/src/install-ci-capabilities/close-job.ts +1 -1
- package/src/install-ci-capabilities/example-noop.ts +1 -1
- package/src/install-ci-capabilities/intake.ts +2 -2
- package/src/install-ci-capabilities/verify.ts +1 -1
- package/src/install-ci-core.ts +34 -7
- package/src/install-ci-github.ts +87 -1
- package/src/install-ci.ts +4 -4
- package/src/install-skills.ts +166 -0
- package/src/intake-event.ts +6 -6
- package/src/intake-marker.ts +3 -3
- package/src/intake-triage.ts +2 -2
- package/src/intake-trigger-template.ts +18 -18
- package/src/intake.ts +138 -103
- package/src/integration-core.ts +234 -100
- package/src/integrator.ts +22 -9
- package/src/isolation.ts +13 -4
- package/src/issue-provider.ts +4 -4
- package/src/item-lock.ts +505 -361
- package/src/item-path.ts +2 -2
- package/src/ledger-lint.ts +9 -9
- package/src/ledger-read.ts +81 -81
- package/src/ledger-write.ts +137 -152
- package/src/lifecycle-gather.ts +45 -22
- package/src/lifecycle-pools.ts +71 -13
- package/src/merge-question-surfacer.ts +32 -8
- package/src/migrate-stuck-locks.ts +451 -0
- package/src/mint-adr.ts +4 -4
- package/src/mirror-pool-scan.ts +5 -5
- package/src/needs-attention.ts +877 -104
- package/src/orphan-sidecar.ts +49 -8
- package/src/pi-harness.ts +82 -2
- package/src/placement.ts +8 -8
- package/src/prd-to-spec.ts +13 -5
- package/src/prompt.ts +20 -25
- package/src/readiness.ts +1 -1
- package/src/reap-branches.ts +38 -14
- package/src/recover-isolated.ts +18 -1
- package/src/repo-config.ts +66 -17
- package/src/repo-mirror.ts +23 -1
- package/src/review-gate.ts +12 -11
- package/src/review-verdict.ts +3 -3
- package/src/run.ts +69 -23
- package/src/scan.ts +36 -22
- package/src/select-order.ts +1 -1
- package/src/select-priority.ts +15 -15
- package/src/sidecar-apply.ts +1 -1
- package/src/sidecar.ts +141 -14
- package/src/slug-namespace.ts +10 -10
- package/src/spec-complete.ts +4 -5
- package/src/start.ts +57 -63
- package/src/status.ts +7 -7
- package/src/surface-gate.ts +12 -5
- package/src/surface-persist.ts +3 -3
- package/src/tasker-review-loop.ts +18 -17
- package/src/tasking-eligibility.ts +21 -21
- package/src/tasking-lock.ts +75 -60
- package/src/tasking.ts +381 -135
- package/src/triage-gate.ts +1 -1
- package/src/triage-persist.ts +71 -27
- package/src/vendor/incur/LICENSE +21 -0
- package/src/vendor/incur/README.md +19 -0
- package/src/vendor/incur/agents.ts +392 -0
- package/src/verify-workflow-template.ts +3 -3
- package/src/watch-session.ts +102 -7
- package/src/work-layout.ts +14 -9
- package/src/workspace.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasking-eligibility.d.ts","sourceRoot":"","sources":["../src/tasking-eligibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAC,aAAa,EAAC,CAAC;AAE5B,
|
|
1
|
+
{"version":3,"file":"tasking-eligibility.d.ts","sourceRoot":"","sources":["../src/tasking-eligibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAC,aAAa,EAAC,CAAC;AAE5B,mFAAmF;AACnF,MAAM,WAAW,iBAAiB;IACjC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACvC,yEAAyE;IACzE,SAAS,EAAE,aAAa,CAAC;IACzB,uEAAuE;IACvE,YAAY,EAAE,aAAa,CAAC;IAC5B,gFAAgF;IAChF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,iFAAiF;IACjF,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,8EAA8E;IAC9E,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACxC,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,iBAAiB,CAAC;CAC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC9B,SAAS,EAAE,aAAa,EACxB,YAAY,EAAE,aAAa,EAC3B,QAAQ,EAAE,OAAO,EACjB,QAAQ,UAAQ,GACd,OAAO,CAOT;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,WAAW,EAAE,MAAM,EAAE,EACrB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,GACtB,iBAAiB,CAGnB;AAED,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,uBAAuB,GAC5B,wBAAwB,CAa1B"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure tasking-eligibility resolution — the auto-task decision layer, one level
|
|
3
|
-
* UP from the build gate (`eligibility.ts`). No I/O: callers pass in the
|
|
3
|
+
* UP from the build gate (`eligibility.ts`). No I/O: callers pass in the spec's
|
|
4
4
|
* two autonomy axes (`humanOnly`, `needsAnswers`), the repo's `autoTask` policy,
|
|
5
|
-
* the
|
|
6
|
-
* TASKED (resolved against `work/
|
|
5
|
+
* the spec's `taskedAfter` slugs, and the set of slugs whose prds are already
|
|
6
|
+
* TASKED (resolved against `work/specs/tasked/` residence, NOT `work/done/`).
|
|
7
7
|
*
|
|
8
8
|
* This mirrors the build-gate shape deliberately (CONTEXT.md / the `auto-slice`
|
|
9
|
-
*
|
|
10
|
-
* predicate, applied to a
|
|
11
|
-
* cross-
|
|
9
|
+
* spec): the same `needsAnswers !== true && humanOnly !== true && <repo policy>`
|
|
10
|
+
* predicate, applied to a spec's two axes + the repo's `autoTask` toggle — and a
|
|
11
|
+
* cross-spec ordering check that resolves against tasked-ness rather than done-ness.
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Resolve the tasking autonomy gate: agent-taskable iff `needsAnswers` is not
|
|
15
15
|
* `true` AND `humanOnly` is not `true` AND the repo's `autoTask` POLICY is
|
|
16
16
|
* satisfied — where the policy is satisfied either by the repo's `autoTask`
|
|
17
17
|
* toggle being on (the AUTO-PICK pool path) OR by the target being named
|
|
18
|
-
* EXPLICITLY (`explicit: true` — `do
|
|
18
|
+
* EXPLICITLY (`explicit: true` — `do spec:<slug>`, where naming IS the
|
|
19
19
|
* authorization, mirroring `do <task>` vs `autoBuild`). Both readiness axes
|
|
20
20
|
* block orthogonally and are never agent-taskable regardless of policy; a human
|
|
21
21
|
* is never bound by either. The exact mirror of `resolveGate` (the build gate),
|
|
@@ -30,9 +30,9 @@ export function resolveTaskGate(humanOnly, needsAnswers, autoTask, explicit = fa
|
|
|
30
30
|
return explicit || autoTask;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Resolve a
|
|
34
|
-
* `done/`): satisfied iff every listed
|
|
35
|
-
* untasked blocker ⇒ not yet taskable (so this
|
|
33
|
+
* Resolve a spec's `taskedAfter` against the slugs of prds already TASKED (NOT
|
|
34
|
+
* `done/`): satisfied iff every listed spec is present in `taskedSlugs`. An
|
|
35
|
+
* untasked blocker ⇒ not yet taskable (so this spec's emitted tasks can
|
|
36
36
|
* reference the real slugs of those prds' tasks).
|
|
37
37
|
*/
|
|
38
38
|
export function resolveTaskedAfter(taskedAfter, taskedSlugs) {
|
package/dist/tasking-lock.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type AcquireTaskingLockOutcome = 'acquired' | 'usage-error' | 'lost' | 'c
|
|
|
3
3
|
/** Maps onto the claim-CAS exit codes (identical semantics). */
|
|
4
4
|
export type AcquireTaskingLockExitCode = 0 | 1 | 2 | 3;
|
|
5
5
|
export interface AcquireTaskingLockOptions {
|
|
6
|
-
/** The
|
|
6
|
+
/** The spec slug to lock (`work/specs/ready/<slug>.md`). */
|
|
7
7
|
slug: string;
|
|
8
8
|
/** Working clone/worktree the lock acquire runs in. */
|
|
9
9
|
cwd: string;
|
|
@@ -26,10 +26,10 @@ export interface AcquireTaskingLockResult {
|
|
|
26
26
|
/** Human-readable summary of the terminal condition. */
|
|
27
27
|
message: string;
|
|
28
28
|
/**
|
|
29
|
-
* On a successful acquire (`acquired`), the git BLOB sha of the
|
|
30
|
-
* the lock TOOK (`work/
|
|
29
|
+
* On a successful acquire (`acquired`), the git BLOB sha of the spec body that
|
|
30
|
+
* the lock TOOK (`work/specs/ready/<slug>.md` on the arbiter). This IS the snapshot the
|
|
31
31
|
* tasker reads + tasks from; the integrate transition compares the current
|
|
32
|
-
* `work/
|
|
32
|
+
* `work/specs/ready/<slug>.md` blob against it to fail loud on a concurrent edit (the
|
|
33
33
|
* read-stability backstop). `undefined` unless `outcome === 'acquired'` (and on
|
|
34
34
|
* dry-run, where nothing was published).
|
|
35
35
|
*/
|
|
@@ -47,7 +47,7 @@ export type ReleaseTaskingLockOutcome = 'released' | 'usage-error' | 'lost' | 'c
|
|
|
47
47
|
/** Maps onto the claim-CAS exit codes, plus `4` for a STALE (conflicting) lock. */
|
|
48
48
|
export type ReleaseTaskingLockExitCode = 0 | 1 | 2 | 3 | 4;
|
|
49
49
|
export interface ReleaseTaskingLockOptions {
|
|
50
|
-
/** The
|
|
50
|
+
/** The spec slug whose lock to release. */
|
|
51
51
|
slug: string;
|
|
52
52
|
/** Working clone/worktree the release runs in. */
|
|
53
53
|
cwd: string;
|
|
@@ -68,9 +68,9 @@ export interface ReleaseTaskingLockOptions {
|
|
|
68
68
|
/**
|
|
69
69
|
* The tasker review→edit LOOP's **decomposition-unclear** verdict
|
|
70
70
|
* (`slicer-review-edit-loop`), or the task-SET acceptance gate's `block`:
|
|
71
|
-
* instead of DELETING the lock (returning the
|
|
71
|
+
* instead of DELETING the lock (returning the spec to the claimable/taskable
|
|
72
72
|
* pool), amend it `active → stuck` with this reason recorded on the entry,
|
|
73
|
-
* emitting NO guessed tasks. The
|
|
73
|
+
* emitting NO guessed tasks. The spec body stays in `work/specs/ready/` (it never moved
|
|
74
74
|
* under the lock); the stuck lock IS the tasking needs-attention surface (no
|
|
75
75
|
* `work/needs-attention/` folder write), so it is NOT re-taskable until a human
|
|
76
76
|
* resolves it via `release-lock`/`resume`. Omitted ⇒ the normal release DELETES
|
|
@@ -93,9 +93,9 @@ export interface ReleaseTaskingLockResult {
|
|
|
93
93
|
/**
|
|
94
94
|
* Release the tasking lock for `slug`: DELETE the unified `action: task` lock ref
|
|
95
95
|
* (idempotent — an already-absent ref is a clean `released`). It moves NO lifecycle
|
|
96
|
-
* file: the durable `
|
|
97
|
-
* and the
|
|
98
|
-
* `tasking/ →
|
|
96
|
+
* file: the durable `specs/ready → specs/tasked` success move is owned by the integrate band,
|
|
97
|
+
* and the spec body never left `work/specs/ready/` under the lock, so there is no
|
|
98
|
+
* `tasking/ → specs/ready/` restore.
|
|
99
99
|
*
|
|
100
100
|
* When `routeToNeedsAttention` is set (the tasker decomposition-unclear verdict /
|
|
101
101
|
* the task-SET acceptance gate `block`), the lock is AMENDED `active → stuck`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasking-lock.d.ts","sourceRoot":"","sources":["../src/tasking-lock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tasking-lock.d.ts","sourceRoot":"","sources":["../src/tasking-lock.ts"],"names":[],"mappings":"AA+DA,gFAAgF;AAChF,MAAM,MAAM,yBAAyB,GAClC,UAAU,GACV,aAAa,GACb,MAAM,GACN,WAAW,CAAC;AAEf,gEAAgE;AAChE,MAAM,MAAM,0BAA0B,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvD,MAAM,WAAW,yB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IACZ,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;OAUG;IACH,qBAAqB,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;IACzC,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACxC,QAAQ,EAAE,0BAA0B,CAAC;IACrC,OAAO,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,yBAAyB,GAChC,OAAO,CAAC,wBAAwB,CAAC,CAWnC"}
|
package/dist/tasking-lock.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { runAsync } from './git.js';
|
|
2
|
-
import { acquireItemLock, releaseItemLock,
|
|
2
|
+
import { acquireItemLock, releaseItemLock, readItemLock } from './item-lock.js';
|
|
3
|
+
import { surfaceStuckToNeedsAttention } from './needs-attention.js';
|
|
3
4
|
import { workItemRel } from './work-layout.js';
|
|
4
5
|
/**
|
|
5
|
-
* The **tasking concurrency lock** (
|
|
6
|
+
* The **tasking concurrency lock** (spec `auto-slice`, task `autoslice-lock`).
|
|
6
7
|
*
|
|
7
|
-
* Serialises *concurrent* taskers (two CI runs, or human + CI) so a
|
|
8
|
+
* Serialises *concurrent* taskers (two CI runs, or human + CI) so a spec is never
|
|
8
9
|
* double-tasked. As of the capstone cut-over (task
|
|
9
|
-
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`,
|
|
10
|
+
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, spec
|
|
10
11
|
* `ledger-status-per-item-lock-refs`; ADR `ledger-status-on-per-item-lock-refs`)
|
|
11
|
-
* the legacy `git mv work/
|
|
12
|
+
* the legacy `git mv work/specs/ready/<slug>.md → work/tasking/<slug>.md` MARKER on `main`
|
|
12
13
|
* is GONE: the body NEVER relocates until the durable promotion, exactly as claim
|
|
13
14
|
* no longer moves the task body (task
|
|
14
15
|
* `cutover-claim-body-stays-and-complete-sources-from-backlog`). The tasking lock
|
|
15
16
|
* is now ONLY the UNIFIED per-item lock (`refs/dorfl/lock/<entry>`,
|
|
16
|
-
* `action: task`, keyed `
|
|
17
|
-
* the same item, so tasking a
|
|
17
|
+
* `action: task`, keyed `spec:<slug>`) — the SAME ref claim and advance use for
|
|
18
|
+
* the same item, so tasking a spec is mutually exclusive with claiming/advancing
|
|
18
19
|
* the SAME item BY CONSTRUCTION (the second acquirer loses the SAME create-only
|
|
19
20
|
* ref CAS, with NO retry budget and NO false contention). There is no transient
|
|
20
21
|
* status in `main`'s tree anymore, so a work branch cut from `main` inherits no
|
|
@@ -24,15 +25,16 @@ import { workItemRel } from './work-layout.js';
|
|
|
24
25
|
* A `lost` (the item is already held for implement/task/advance) makes the
|
|
25
26
|
* tasking acquire lose DEFINITIVELY (exit 2, no retry). On a successful acquire
|
|
26
27
|
* it returns {@link AcquireTaskingLockResult.lockedBlob}: the git blob sha of the
|
|
27
|
-
*
|
|
28
|
+
* spec body the lock TOOK, read from `work/specs/ready/<slug>.md` on the arbiter — the
|
|
28
29
|
* snapshot the tasker reads + tasks from, handed back so the integrate
|
|
29
|
-
* transition can fail loud if the held
|
|
30
|
+
* transition can fail loud if the held spec was edited concurrently (the
|
|
30
31
|
* read-stability backstop). A dry-run takes no lock (it mutates nothing).
|
|
31
32
|
*
|
|
32
33
|
* - **Release** ({@link releaseTaskingLock}) DELETES the unified lock ref. It
|
|
33
|
-
* moves NO lifecycle file: the durable `
|
|
34
|
-
* by the integrate band (`tasking.ts`/`integration-core.ts`), and there
|
|
35
|
-
* `tasking/ →
|
|
34
|
+
* moves NO lifecycle file: the durable `specs/ready → specs/tasked` success move
|
|
35
|
+
* is owned by the integrate band (`tasking.ts`/`integration-core.ts`), and there
|
|
36
|
+
* is no `tasking/ → specs/ready/` abort bounce anymore (the body never left
|
|
37
|
+
* `specs/ready/`). When
|
|
36
38
|
* `routeToNeedsAttention` is set (the tasker review/edit loop's
|
|
37
39
|
* decomposition-unclear verdict, or the task-SET acceptance gate's `block`),
|
|
38
40
|
* release amends the lock `active → stuck` with the reason on the entry INSTEAD
|
|
@@ -46,13 +48,13 @@ import { workItemRel } from './work-layout.js';
|
|
|
46
48
|
* The READ-STABILITY backstop (the content-identity stale check that used to live
|
|
47
49
|
* in the release, comparing the held `work/tasking/<slug>.md` blob against the
|
|
48
50
|
* acquire-time snapshot) now lives at the integrate seam (`tasking.ts`
|
|
49
|
-
* `heldSpecIsStale`, comparing `work/
|
|
51
|
+
* `heldSpecIsStale`, comparing `work/specs/ready/<slug>.md`) — relocated because the
|
|
50
52
|
* completing transition, not the release, owns the commit. See
|
|
51
53
|
* `work/notes/observations/tasking-lock-does-not-stabilise-prd-content.md`.
|
|
52
54
|
*
|
|
53
|
-
* This module provides the lock PRIMITIVES only. The orchestrating `do
|
|
55
|
+
* This module provides the lock PRIMITIVES only. The orchestrating `do spec:<slug>`
|
|
54
56
|
* tasking command (`tasking.ts`) acquires, drives the agent's tasking, integrates
|
|
55
|
-
* the emitted tasks + the durable `
|
|
57
|
+
* the emitted tasks + the durable `specs/ready → specs/tasked` move, and releases. The
|
|
56
58
|
* human path (no contention) may task on `main` directly without the lock.
|
|
57
59
|
*/
|
|
58
60
|
const DEFAULT_ARBITER = 'origin';
|
|
@@ -94,12 +96,12 @@ async function runAcquire(options, note) {
|
|
|
94
96
|
throw new TaskingLockUsageError(`no git remote named '${arbiter}' (set one, or pass --arbiter)`);
|
|
95
97
|
}
|
|
96
98
|
const by = options.by || (await resolveBy(cwd, env));
|
|
97
|
-
// Is the
|
|
99
|
+
// Is the spec still lockable (present in work/specs/ready/ on the arbiter's main)?
|
|
98
100
|
await gitHard(['fetch', '--quiet', arbiter], cwd, env);
|
|
99
101
|
const spec = workItemRel('specs-ready', `${slug}.md`);
|
|
100
102
|
const specBlob = await gitSoft(['rev-parse', `${arbiter}/main:${spec}`], cwd, env);
|
|
101
103
|
if (specBlob.status !== 0) {
|
|
102
|
-
const message = `'${spec}' not found on ${arbiter}/main (no such
|
|
104
|
+
const message = `'${spec}' not found on ${arbiter}/main (no such spec, or it was already moved/tasked).`;
|
|
103
105
|
note(message);
|
|
104
106
|
return { exitCode: 2, outcome: 'lost', message };
|
|
105
107
|
}
|
|
@@ -111,18 +113,17 @@ async function runAcquire(options, note) {
|
|
|
111
113
|
note(message);
|
|
112
114
|
return { exitCode: 0, outcome: 'acquired', message, lockedBlob };
|
|
113
115
|
}
|
|
114
|
-
// Acquire the UNIFIED per-item lock (`action: task`, keyed `
|
|
116
|
+
// Acquire the UNIFIED per-item lock (`action: task`, keyed `spec:<slug>` so it
|
|
115
117
|
// shares the ONE ref with claim/advance of the SAME item). A create-only ref
|
|
116
118
|
// CAS: the winner holds it, the loser is DEFINITIVELY `lost` (exit 2, no retry
|
|
117
119
|
// budget). No auto-steal of an orphaned lock, consistent with claim/advance and
|
|
118
120
|
// the ADR's recovery model (no liveness heartbeat / auto-sweep; a human asserts
|
|
119
121
|
// a lock is dead via `release-lock` + `gc --ledger`).
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
// contract task removes the legacy form.
|
|
122
|
+
// Spec `prd-to-spec-vocabulary-cutover-and-migration-command`: the parent-spec
|
|
123
|
+
// item identity is `spec:<slug>`, so the unified per-item lock ref is
|
|
124
|
+
// `refs/dorfl/lock/spec-<slug>`. HARD CUTOVER: the legacy ''prd:<slug>'' identity
|
|
125
|
+
// is GONE — the resolver no longer treats ''prd:'' as the spec namespace (a
|
|
126
|
+
// ''prd:<slug>'' arg is a bare literal task slug now).
|
|
126
127
|
const lock = await acquireItemLock({
|
|
127
128
|
item: `spec:${slug}`,
|
|
128
129
|
action: 'task',
|
|
@@ -145,9 +146,9 @@ async function runAcquire(options, note) {
|
|
|
145
146
|
/**
|
|
146
147
|
* Release the tasking lock for `slug`: DELETE the unified `action: task` lock ref
|
|
147
148
|
* (idempotent — an already-absent ref is a clean `released`). It moves NO lifecycle
|
|
148
|
-
* file: the durable `
|
|
149
|
-
* and the
|
|
150
|
-
* `tasking/ →
|
|
149
|
+
* file: the durable `specs/ready → specs/tasked` success move is owned by the integrate band,
|
|
150
|
+
* and the spec body never left `work/specs/ready/` under the lock, so there is no
|
|
151
|
+
* `tasking/ → specs/ready/` restore.
|
|
151
152
|
*
|
|
152
153
|
* When `routeToNeedsAttention` is set (the tasker decomposition-unclear verdict /
|
|
153
154
|
* the task-SET acceptance gate `block`), the lock is AMENDED `active → stuck`
|
|
@@ -186,33 +187,52 @@ async function runRelease(options, note) {
|
|
|
186
187
|
if ((await gitSoft(['remote', 'get-url', arbiter], cwd, env)).status !== 0) {
|
|
187
188
|
throw new TaskingLockUsageError(`no git remote named '${arbiter}' (set one, or pass --arbiter)`);
|
|
188
189
|
}
|
|
189
|
-
// DECOMPOSITION-UNCLEAR / TASK-GATE BLOCK:
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
//
|
|
190
|
+
// DECOMPOSITION-UNCLEAR / TASK-GATE BLOCK: surface the spec as a `stuck`-kind
|
|
191
|
+
// sidecar + `needsAnswers:true` on the spec body in ONE commit on
|
|
192
|
+
// `<arbiter>/main`, THEN release the tasking lock (PR-2b, spec
|
|
193
|
+
// `surface-stuck-as-questions-and-retire-stuck-lock-state`, decision #1). The
|
|
194
|
+
// spec body stays in `work/specs/ready/` (or `work/specs/proposed/` — the D1
|
|
195
|
+
// probe finds it); the surfaced question keeps the spec out of the taskable
|
|
196
|
+
// pool via `needsAnswers:true` (eligibility `false`) until a human answers.
|
|
193
197
|
if (options.routeToNeedsAttention !== undefined) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
// `wrong-state` (already stuck) is a tolerated idempotent re-surface.
|
|
204
|
-
const message = `Routed the tasking of '${slug}' to needs-attention (per-item lock marked stuck).`;
|
|
198
|
+
const item = `spec:${slug}`;
|
|
199
|
+
// Detect a genuinely NOT-HELD lock BEFORE the surface (so a bounce of an
|
|
200
|
+
// unlocked spec still returns the exit-2 `lost` contract). The surface itself
|
|
201
|
+
// is idempotent, but without this pre-check a not-held spec would surface
|
|
202
|
+
// silently on main with no lock to release — losing the caller-visible
|
|
203
|
+
// "nothing to route" signal.
|
|
204
|
+
const held = await readItemLock({ item, cwd, arbiter, env });
|
|
205
|
+
if (held === undefined) {
|
|
206
|
+
const message = `'${slug}' is not locked for tasking — nothing to route to needs-attention.`;
|
|
205
207
|
note(message);
|
|
206
|
-
return { exitCode:
|
|
208
|
+
return { exitCode: 2, outcome: 'lost', message };
|
|
207
209
|
}
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
+
try {
|
|
211
|
+
const surfaced = await surfaceStuckToNeedsAttention({
|
|
212
|
+
cwd,
|
|
213
|
+
slug,
|
|
214
|
+
item,
|
|
215
|
+
reason: options.routeToNeedsAttention.reason,
|
|
216
|
+
arbiter,
|
|
217
|
+
env,
|
|
218
|
+
note,
|
|
219
|
+
});
|
|
220
|
+
if (surfaced.surfaced || surfaced.bodyAbsent) {
|
|
221
|
+
const message = surfaced.surfaced
|
|
222
|
+
? `Routed the tasking of '${slug}' to needs-attention (surfaced on ${arbiter}/main; tasking lock released).`
|
|
223
|
+
: `Routed the tasking of '${slug}' to needs-attention (no spec body on ${arbiter}/main — clean no-op surface; tasking lock released).`;
|
|
224
|
+
note(message);
|
|
225
|
+
return { exitCode: 0, outcome: 'released', message };
|
|
226
|
+
}
|
|
227
|
+
const message = `could not surface '${item}' on ${arbiter}/main (${surfaced.reasonNotSurfaced ?? 'unknown'}).`;
|
|
210
228
|
note(message);
|
|
211
|
-
return { exitCode:
|
|
229
|
+
return { exitCode: 1, outcome: 'usage-error', message };
|
|
230
|
+
}
|
|
231
|
+
catch (err) {
|
|
232
|
+
const message = `could not surface '${item}' on ${arbiter}/main (${err instanceof Error ? err.message : String(err)}).`;
|
|
233
|
+
note(message);
|
|
234
|
+
return { exitCode: 1, outcome: 'usage-error', message };
|
|
212
235
|
}
|
|
213
|
-
const message = `could not mark the per-item lock for '${slug}' stuck (${stuck.outcome}: ${stuck.message}).`;
|
|
214
|
-
note(message);
|
|
215
|
-
return { exitCode: 1, outcome: 'usage-error', message };
|
|
216
236
|
}
|
|
217
237
|
// NORMAL release: delete the lock ref (idempotent).
|
|
218
238
|
// MIGRATE: EMIT `spec:<slug>` (keyed to the `spec-<slug>` lock entry).
|
package/dist/tasking-lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasking-lock.js","sourceRoot":"","sources":["../src/tasking-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAiB,MAAM,UAAU,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"tasking-lock.js","sourceRoot":"","sources":["../src/tasking-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAiB,MAAM,UAAU,CAAC;AAClD,OAAO,EAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,MAAM,eAAe,GAAG,QAAQ,CAAC;AA+CjC,oDAAoD;AACpD,MAAM,qBAAsB,SAAQ,KAAK;CAAG;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,OAAkC;IA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M,OAAO,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC9D,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IACD,MAAM,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAC7B,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;AACnC,CAAC;AAED,sEAAsE;AACtE,SAAS,OAAO,CACf,IAAc,EACd,GAAW,EACX,GAAkC;IAElC,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,GAAG,EAAC,CAAC,CAAC;AAC1C,CAAC;AAED,2EAA2E;AAC3E,KAAK,UAAU,OAAO,CACrB,IAAc,EACd,GAAW,EACX,GAAkC;IAElC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,GAAG,EAAC,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACd,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,MAAM,CAAC,MAAM,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
package/dist/tasking.d.ts
CHANGED
|
@@ -5,44 +5,44 @@ import { type Harness } from './harness.js';
|
|
|
5
5
|
import { type TaskReviewGate } from './tasker-review-loop.js';
|
|
6
6
|
import type { ReviewGate } from './review-gate.js';
|
|
7
7
|
/**
|
|
8
|
-
* The **`do
|
|
8
|
+
* The **`do spec:<slug>` tasking path** (spec `auto-slice`, task
|
|
9
9
|
* `autoslice-command`) — the orchestration that ties the tasking GATE
|
|
10
10
|
* (`tasking-eligibility.ts`) and the tasking LOCK (`tasking-lock.ts`) together to
|
|
11
|
-
* task a
|
|
11
|
+
* task a spec into `work/tasks/backlog/` STAGED items (task
|
|
12
12
|
* `pre-backlog-staging-folder-and-promote-step-a` — the runner-owned promotion
|
|
13
|
-
* moves them `
|
|
14
|
-
* transition. This is the
|
|
13
|
+
* moves them `tasks/backlog/ → tasks/ready/` later), with the RUNNER owning every git-state
|
|
14
|
+
* transition. This is the spec branch of the `do` worker (ADR
|
|
15
15
|
* `command-surface-and-journeys.md` §3/§3a), NOT a standalone `task` command;
|
|
16
|
-
* `do.ts` dispatches `resolved.namespace === '
|
|
16
|
+
* `do.ts` dispatches `resolved.namespace === 'spec'` here.
|
|
17
17
|
*
|
|
18
18
|
* The end-to-end flow (mirroring the `do`/`run` runner-owns-git discipline — the
|
|
19
19
|
* agent only EDITS files, the runner does ALL git):
|
|
20
20
|
*
|
|
21
|
-
* 1. **Resolve the gate** (agent path): refuse to task a
|
|
22
|
-
* `humanOnly`/`needsAnswers`, or whose `taskedAfter`
|
|
21
|
+
* 1. **Resolve the gate** (agent path): refuse to task a spec that is
|
|
22
|
+
* `humanOnly`/`needsAnswers`, or whose `taskedAfter` specs are not yet tasked.
|
|
23
23
|
* The repo's `autoTask` POLICY also refuses on the AUTO-PICK pool path, but
|
|
24
|
-
* NOT when the
|
|
24
|
+
* NOT when the spec was named EXPLICITLY (`do spec:<slug>`, `explicit: true`):
|
|
25
25
|
* naming it IS the authorization, exactly as `do <task>` builds regardless of
|
|
26
26
|
* `autoBuild` (the pool, not the explicit claim, gates the policy). The HUMAN
|
|
27
27
|
* path is unbound by the gate entirely.
|
|
28
28
|
* 2. **Acquire the lock** (agent path) via the unified per-item lock CAS —
|
|
29
|
-
* serialising concurrent taskers on the `
|
|
30
|
-
* `work/
|
|
29
|
+
* serialising concurrent taskers on the `spec:<slug>` ref (the body STAYS in
|
|
30
|
+
* `work/specs/ready/`; the lock no longer moves it). The HUMAN path with no contention
|
|
31
31
|
* may task on `main` directly WITHOUT the lock.
|
|
32
|
-
* 3. **Invoke the agent harness** with the `to-task`
|
|
32
|
+
* 3. **Invoke the agent harness** with the `to-task` spec — the agent runs the
|
|
33
33
|
* tasker methodology and produces `work/tasks/backlog/<slug>.md` FILES ONLY; it does
|
|
34
34
|
* NOT commit/push/move (the same in-band boundary as the build agent).
|
|
35
35
|
* 4. **The runner integrates the COMPLETING transition through the SHARED core**
|
|
36
36
|
* (`performIntegration`, task `slice-output-through-integration`): the agent's
|
|
37
37
|
* tasking runs on a `work/<slug>` branch cut from `<arbiter>/main` (whose base
|
|
38
|
-
* holds the
|
|
39
|
-
*
|
|
38
|
+
* holds the spec in `work/specs/ready/`), and the produced backlog tasks + the durable
|
|
39
|
+
* spec lifecycle move (`work/specs/ready/ → work/specs/tasked/`)
|
|
40
40
|
* integrate via the band honoring `--propose` (push the branch + open a
|
|
41
41
|
* PR, NO `main` touch) / `--merge` (land on `main`). Because the integrate-time
|
|
42
42
|
* args resolve ONCE in the shared core, EVERY `do task:` integrate arg applies
|
|
43
|
-
* to `do
|
|
43
|
+
* to `do spec:` by construction. A content-identity STALE CHECK (the lock's
|
|
44
44
|
* read-stability backstop) fires FIRST against the acquire-time `lockedBlob`,
|
|
45
|
-
* so a concurrent edit of the held
|
|
45
|
+
* so a concurrent edit of the held spec still fails loud (`stale`).
|
|
46
46
|
*
|
|
47
47
|
* The tasking LOCK (`tasking-lock.ts`, `acquireTaskingLock`/`releaseTaskingLock`)
|
|
48
48
|
* is the UNIFIED per-item lock (`refs/dorfl/lock/<entry>`, `action: task`)
|
|
@@ -54,12 +54,12 @@ import type { ReviewGate } from './review-gate.js';
|
|
|
54
54
|
* does NOT build the no-human confidence routing — that is the review/edit loop
|
|
55
55
|
* owned by `slicer-review-edit-loop`; this path produces + integrates the tasks.
|
|
56
56
|
*/
|
|
57
|
-
/** The terminal status of one `do
|
|
57
|
+
/** The terminal status of one `do spec:<slug>` tasking run. */
|
|
58
58
|
export type TaskOutcome = 'tasked' | 'gate-refused' | 'lock-lost' | 'agent-failed' | 'stale' | 'needs-attention' | 'usage-error';
|
|
59
59
|
export interface TaskResult {
|
|
60
60
|
exitCode: 0 | 1 | 2 | 3 | 4;
|
|
61
61
|
outcome: TaskOutcome;
|
|
62
|
-
/** The
|
|
62
|
+
/** The spec slug acted on. */
|
|
63
63
|
slug: string;
|
|
64
64
|
/** Repo-relative paths of the backlog tasks the runner committed. */
|
|
65
65
|
emitted?: string[];
|
|
@@ -67,7 +67,7 @@ export interface TaskResult {
|
|
|
67
67
|
* The tasker review→edit LOOP's disposition (`slicer-review-edit-loop`), when
|
|
68
68
|
* the loop ran. `converged` = the improved tasks landed; `uncertain-tasks` =
|
|
69
69
|
* the cap was hit and specific tasks landed `needsAnswers: true`; absent when
|
|
70
|
-
* no loop ran or the
|
|
70
|
+
* no loop ran or the spec was routed to needs-attention (`outcome:
|
|
71
71
|
* 'needs-attention'`).
|
|
72
72
|
*/
|
|
73
73
|
loop?: 'converged' | 'uncertain-tasks';
|
|
@@ -75,8 +75,8 @@ export interface TaskResult {
|
|
|
75
75
|
message: string;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* The agent invocation: runs the `to-task`
|
|
79
|
-
* `work/tasks/backlog/<slug>.md` task files (and trimming the
|
|
78
|
+
* The agent invocation: runs the `to-task` spec in `cwd`, WRITING
|
|
79
|
+
* `work/tasks/backlog/<slug>.md` task files (and trimming the spec). It does NO git —
|
|
80
80
|
* the runner captures the produced files and commits them.
|
|
81
81
|
*/
|
|
82
82
|
export type TaskDorfl = (input: {
|
|
@@ -94,7 +94,7 @@ export interface TaskingLockSeam {
|
|
|
94
94
|
release(options: ReleaseTaskingLockOptions): Promise<ReleaseTaskingLockResult>;
|
|
95
95
|
}
|
|
96
96
|
export interface PerformTaskOptions {
|
|
97
|
-
/** The
|
|
97
|
+
/** The spec slug to task (`work/specs/ready/<slug>.md`). */
|
|
98
98
|
slug: string;
|
|
99
99
|
/** The working clone/checkout the tasking runs in. */
|
|
100
100
|
cwd: string;
|
|
@@ -109,16 +109,16 @@ export interface PerformTaskOptions {
|
|
|
109
109
|
/** Per-repo `autoTask` policy (resolved by `autoslice-gate`). Agent path only. */
|
|
110
110
|
autoTask?: boolean;
|
|
111
111
|
/**
|
|
112
|
-
* The
|
|
113
|
-
* `autoTask` POLICY is already satisfied — naming the
|
|
112
|
+
* The spec was named EXPLICITLY by the operator (`do spec:<slug>`), so the
|
|
113
|
+
* `autoTask` POLICY is already satisfied — naming the spec IS the authorization,
|
|
114
114
|
* EXACTLY as `do <task>` builds a named task regardless of `autoBuild` (the
|
|
115
115
|
* build path's precedent: `autoBuild` gates the scan/selection POOL only, never
|
|
116
116
|
* `performDo`'s explicit claim). When `true`, the agent tasking gate drops the
|
|
117
|
-
* `autoTask` policy term and binds ONLY the
|
|
117
|
+
* `autoTask` policy term and binds ONLY the spec's own readiness axes
|
|
118
118
|
* (`humanOnly`/`needsAnswers`) + `taskedAfter`. Defaults `false`. Both the
|
|
119
|
-
* explicit `do
|
|
119
|
+
* explicit `do spec:` dispatch AND the auto-pick path pass `true` here: the
|
|
120
120
|
* auto-pick POOL (`do-autopick.ts`) is the single `autoTask`-enforcement point
|
|
121
|
-
* (a pool-ineligible
|
|
121
|
+
* (a pool-ineligible spec is never selected), so once a spec is dispatched its
|
|
122
122
|
* policy is already settled. Agent path only.
|
|
123
123
|
*/
|
|
124
124
|
explicit?: boolean;
|
|
@@ -140,7 +140,7 @@ export interface PerformTaskOptions {
|
|
|
140
140
|
* with (task `slice-output-through-integration`): `propose` (default — push the
|
|
141
141
|
* `work/<slug>` branch + open a PR carrying the tasks, NO `main` touch) or
|
|
142
142
|
* `merge` (land them on `main`). Resolved ONCE in {@link performIntegration},
|
|
143
|
-
* so EVERY `do task:` integrate-time arg applies to `do
|
|
143
|
+
* so EVERY `do task:` integrate-time arg applies to `do spec:` by construction.
|
|
144
144
|
* The AGENT path only; the human path commits its own output. Defaults to the
|
|
145
145
|
* system default (`propose`).
|
|
146
146
|
*/
|
|
@@ -165,7 +165,7 @@ export interface PerformTaskOptions {
|
|
|
165
165
|
* task-path mirror of the build Gate-2, riding {@link performIntegration}'s
|
|
166
166
|
* review-before-integrate block. When `review` resolves on, a FRESH-CONTEXT
|
|
167
167
|
* agent reviews the WHOLE produced task SET (coherence / dependency graph /
|
|
168
|
-
* gaps + overlap /
|
|
168
|
+
* gaps + overlap / spec-goal correct-if-implemented) BEFORE the tasks integrate;
|
|
169
169
|
* `approve` lands them, `block` routes the set to needs-attention. It is
|
|
170
170
|
* controlled by the BUILD `--review`/`--no-review`/`--review-model` family (ONE
|
|
171
171
|
* gate-configuration story shared with the build path) and is ONE-SHOT —
|
|
@@ -183,10 +183,22 @@ export interface PerformTaskOptions {
|
|
|
183
183
|
* loop's {@link taskerLoopModel} — see the note there.
|
|
184
184
|
*/
|
|
185
185
|
acceptanceReviewModel?: string;
|
|
186
|
+
/**
|
|
187
|
+
* **The cross-job merge-serialiser CAS-retry cap** (config `mergeRetries`, spec
|
|
188
|
+
* `land-time-reverify-and-parallel-merge-ceiling` Story 5 / Applied Answer q1
|
|
189
|
+
* (a)). Threaded VERBATIM into {@link performIntegration} so a wide-matrix CI's
|
|
190
|
+
* raised cap actually reaches the cross-job land queue (the CAS loop IS the
|
|
191
|
+
* queue across separate jobs) on the `do spec:<slug>` tasking-transition path
|
|
192
|
+
* too. Resolved ONCE at the entry point through the gate-family precedence chain
|
|
193
|
+
* (flag > env > per-repo > global > default), same as `complete`/`do`/`run`.
|
|
194
|
+
* Unset ⇒ falls through to the engine's `DEFAULT_MERGE_RETRIES = 1000`
|
|
195
|
+
* (byte-for-byte unchanged).
|
|
196
|
+
*/
|
|
197
|
+
mergeRetries?: number;
|
|
186
198
|
/** Injectable lock seam (tests stub acquire/release). Defaults to the real CAS. */
|
|
187
199
|
lock?: TaskingLockSeam;
|
|
188
200
|
/**
|
|
189
|
-
* **The per-repo TASK-PLACEMENT default** (
|
|
201
|
+
* **The per-repo TASK-PLACEMENT default** (spec
|
|
190
202
|
* `staging-pool-position-gate-and-trust-model` US #5, task
|
|
191
203
|
* `runner-deterministic-slice-placement-policy-and-precedence`). The
|
|
192
204
|
* resolved per-repo default landing for the tasker's emitted tasks, fed as
|
|
@@ -194,10 +206,10 @@ export interface PerformTaskOptions {
|
|
|
194
206
|
* resolver (`src/placement.ts`). The resolver overlays an EXPLICIT operator
|
|
195
207
|
* flag ({@link explicitTasksLandIn}, top) and the UNTRUSTED-ORIGIN force
|
|
196
208
|
* (`originTrust: untrusted` ⇒ staging) on top. Unset ⇒ the resolver's
|
|
197
|
-
* built-in floor applies (`staging` = `
|
|
209
|
+
* built-in floor applies (`staging` = `tasks/backlog/`, the conservative
|
|
198
210
|
* landing that preserves zero behaviour change for the normal path).
|
|
199
211
|
*/
|
|
200
|
-
tasksLandIn?: '
|
|
212
|
+
tasksLandIn?: 'backlog' | 'ready';
|
|
201
213
|
/**
|
|
202
214
|
* **The OPERATOR's EXPLICIT task-placement override** (the TOP precedence
|
|
203
215
|
* rung). When set, the runner-deterministic resolver lands the tasks HERE
|
|
@@ -207,15 +219,15 @@ export interface PerformTaskOptions {
|
|
|
207
219
|
* force-key"). Set ONLY when the operator typed `--tasks-land-in <where>`;
|
|
208
220
|
* never when the value came from config.
|
|
209
221
|
*/
|
|
210
|
-
explicitTasksLandIn?: '
|
|
222
|
+
explicitTasksLandIn?: 'backlog' | 'ready';
|
|
211
223
|
/**
|
|
212
|
-
* **The tasker review→edit→converge LOOP** (`slicer-review-edit-loop`, GATES
|
|
213
|
-
* `work/
|
|
224
|
+
* **The tasker review→edit→converge LOOP** (`slicer-review-edit-loop`, GATES spec
|
|
225
|
+
* `work/specs/ready/review.md` RESOLVED DESIGN — Shape 2 / insertion point A). When
|
|
214
226
|
* provided, AFTER the agent produces candidate tasks (step 3) and BEFORE the
|
|
215
227
|
* runner finalises them (step 4), run the `review` SKILL as a review→edit→
|
|
216
228
|
* re-review loop that IMPROVES the candidate tasks in place, then routes the
|
|
217
229
|
* verdict through the three outcomes (converge→land / uncertain-task→
|
|
218
|
-
* needsAnswers / decomposition-unclear→
|
|
230
|
+
* needsAnswers / decomposition-unclear→spec-to-needs-attention). The seam is the
|
|
219
231
|
* review+edit gate (tests inject a canned verdict+edits; production:
|
|
220
232
|
* {@link harnessTaskReviewGate}). Omitted ⇒ NO loop (the candidate tasks land
|
|
221
233
|
* as-is — the pre-loop behaviour). The HUMAN path is unaffected (the loop runs
|
|
@@ -254,22 +266,44 @@ export interface PerformTaskOptions {
|
|
|
254
266
|
note?: (message: string) => void;
|
|
255
267
|
}
|
|
256
268
|
/**
|
|
257
|
-
* **The STAGED-TASKS dir** (
|
|
269
|
+
* **The STAGED-TASKS dir** (spec `staging-pool-position-gate-and-trust-model`,
|
|
258
270
|
* task `pre-backlog-staging-folder-and-promote-step-a`, governing ADR
|
|
259
271
|
* `placement-is-runner-deterministic-humanonly-is-agent-judgement`). The runner
|
|
260
272
|
* lands the tasker's emitted task files HERE, NOT in `work/tasks/ready/`: an item
|
|
261
|
-
* born in `
|
|
273
|
+
* born in `tasks/backlog/` is durable + readable but NOT in the agent-eligible
|
|
262
274
|
* pool (`work/tasks/ready/` STILL means the pool — every reader is byte-for-byte
|
|
263
275
|
* unchanged). A runner/human-owned promotion (`promoteFromPreBacklog` in
|
|
264
|
-
* `needs-attention.ts`) moves an approved item `
|
|
276
|
+
* `needs-attention.ts`) moves an approved item `tasks/backlog/ → tasks/ready/` to make
|
|
265
277
|
* it claimable. STEP A: ADDITIVE — no `work/tasks/ready/` reader changes here.
|
|
266
278
|
*/
|
|
267
279
|
export declare const STAGED_TASKS_DIR: string;
|
|
268
280
|
/**
|
|
269
|
-
* Run the `do
|
|
281
|
+
* Run the `do spec:<slug>` tasking path end-to-end. Never throws for the expected
|
|
270
282
|
* gate-refused / lock-lost / agent-failed / stale cases — those are returned with
|
|
271
283
|
* the appropriate exit code and outcome. The runner owns all git; the agent only
|
|
272
284
|
* writes task files.
|
|
273
285
|
*/
|
|
274
286
|
export declare function performTask(options: PerformTaskOptions): Promise<TaskResult>;
|
|
287
|
+
/**
|
|
288
|
+
* Compose the propose-mode PR BODY for a slice-set (task
|
|
289
|
+
* `slicing-pr-body-summary-threading`): mirror the BUILD path's body threading
|
|
290
|
+
* (`do.ts` — `body: agent.output`) with a summary drawn from what the tasker
|
|
291
|
+
* ALREADY has in hand — the emitted task files. The shared
|
|
292
|
+
* {@link composeProposeBody} then wraps this prose with its runner-owned header.
|
|
293
|
+
*
|
|
294
|
+
* Sections (all suppressed when empty, so the body stays honest):
|
|
295
|
+
* 1. A lead line naming the source spec + emitted task count.
|
|
296
|
+
* 2. **Tasks** — one bullet per task: `slug — title`, plus `covers:` (which
|
|
297
|
+
* spec user stories it maps to), `blockedBy:`, and `needsAnswers` if set.
|
|
298
|
+
* 3. **Dependency graph** — the KEYSTONE(S) (tasks whose `blockedBy` names no
|
|
299
|
+
* other task in this set, so they land first) and the `blockedBy` edges.
|
|
300
|
+
* 4. **Needs answers** — any open questions the tasker review→edit loop
|
|
301
|
+
* appended under `## Open questions` on `needsAnswers: true` tasks, so the
|
|
302
|
+
* deferred seams are visible on the PR (not buried in task bodies).
|
|
303
|
+
*
|
|
304
|
+
* Returns `undefined` for the empty set (no emitted tasks) so the provider's
|
|
305
|
+
* `gh pr create --fill` fallback still applies on that edge (matches the build
|
|
306
|
+
* path's absent-body behaviour).
|
|
307
|
+
*/
|
|
308
|
+
export declare function composeTaskingProposeBody(specSlug: string, emitTasks: Record<string, string>): string | undefined;
|
|
275
309
|
//# sourceMappingURL=tasking.d.ts.map
|