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
package/dist/intake.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../src/intake.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAErE,OAAO,KAAK,EAAC,eAAe,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAMlD,OAAO,EAGN,KAAK,QAAQ,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,KAAK,OAAO,EAAC,MAAM,cAAc,CAAC;AAGvD,OAAO,EAGN,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,kBAAkB,EAGlB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAe,KAAK,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,KA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,uBAAuB,CACtC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EAAE,EACxB,MAAM,CAAC,EAAE,oBAAoB,GAC3B,MAAM,CA4HR"}
|
package/dist/intake.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
import { runAsync } from './git.js';
|
|
4
|
-
import { workFolderRel, workItemRel } from './work-layout.js';
|
|
4
|
+
import { workFolderRel, workFolderPrefix, workItemRel } from './work-layout.js';
|
|
5
5
|
import { paramCase } from './brand.js';
|
|
6
6
|
import { performIntegration, } from './integration-core.js';
|
|
7
7
|
import { integrationFromFlags } from './complete.js';
|
|
@@ -18,15 +18,15 @@ import { triageIntake } from './intake-triage.js';
|
|
|
18
18
|
import { renderTaskBody, renderSpecBody } from './buildable-body.js';
|
|
19
19
|
const DEFAULT_ARBITER = 'origin';
|
|
20
20
|
/**
|
|
21
|
-
* **The STAGED-prds dir** (
|
|
21
|
+
* **The STAGED-prds dir** (spec `staging-pool-position-gate-and-trust-model`,
|
|
22
22
|
* task `pre-prd-staging-pool-split-and-untrusted-prd-placement`, governing
|
|
23
23
|
* ADR `placement-is-runner-deterministic-humanonly-is-agent-judgement`). When
|
|
24
24
|
* the runner-deterministic placement resolver picks the staging side for an
|
|
25
|
-
* `intake`-authored
|
|
26
|
-
* `work/
|
|
27
|
-
* the tasking candidate POOL (`work/
|
|
28
|
-
* ({@link promoteFromPreSpec} in `needs-attention.ts`) moves an approved
|
|
29
|
-
* `
|
|
25
|
+
* `intake`-authored spec, the runner writes the spec file HERE instead of in
|
|
26
|
+
* `work/specs/ready/`. An item born in `specs/proposed/` is durable + readable but NOT in
|
|
27
|
+
* the tasking candidate POOL (`work/specs/ready/` is the pool). A runner/human-owned promotion
|
|
28
|
+
* ({@link promoteFromPreSpec} in `needs-attention.ts`) moves an approved spec
|
|
29
|
+
* `specs/proposed/ → specs/ready/` to make it taskable.
|
|
30
30
|
*/
|
|
31
31
|
export const STAGED_SPECS_DIR = workFolderRel('specs-proposed');
|
|
32
32
|
/**
|
|
@@ -75,10 +75,10 @@ function granularFromFlags(type, merge, propose) {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* The PURE per-outcome integration mode resolution (
|
|
78
|
+
* The PURE per-outcome integration mode resolution (spec `issue-intake` US #9 —
|
|
79
79
|
* the canonical table). Given ONLY the flag set, resolve BOTH per-type modes in
|
|
80
80
|
* one eager pass (so a usage error is caught before the runtime verdict is even
|
|
81
|
-
* known). The rules, all decided in the
|
|
81
|
+
* known). The rules, all decided in the spec:
|
|
82
82
|
*
|
|
83
83
|
* - **unset ⇒ propose for BOTH** (conservative default; matches `do`).
|
|
84
84
|
* - **aggregates:** `--merge` ⇒ merge both; `--propose` ⇒ propose both (this axis
|
|
@@ -182,7 +182,7 @@ export async function performIntake(options) {
|
|
|
182
182
|
note(message);
|
|
183
183
|
return { exitCode: 1, outcome: 'usage-error', issueNumber, message };
|
|
184
184
|
}
|
|
185
|
-
// 2. ACQUIRE the `processing` LOCK (
|
|
185
|
+
// 2. ACQUIRE the `processing` LOCK (spec `issue-intake` US #10): a TRANSIENT concurrency mutex
|
|
186
186
|
// that serialises two concurrent runs on the SAME issue. Read the labels; if
|
|
187
187
|
// the lock is ALREADY present, BACK OFF (do nothing — another run owns it). The
|
|
188
188
|
// winner ADDS the label and proceeds; the label is REMOVED on finish (success
|
|
@@ -389,12 +389,12 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
|
|
|
389
389
|
note(message);
|
|
390
390
|
return { exitCode: 1, outcome: 'agent-failed', issueNumber, message };
|
|
391
391
|
}
|
|
392
|
-
// DISPATCH on the verdict — the FULL four-outcome decision table (
|
|
392
|
+
// DISPATCH on the verdict — the FULL four-outcome decision table (spec
|
|
393
393
|
// `issue-intake`). The agent only DRAFTED the verdict; the runner owns every
|
|
394
394
|
// git/seam side-effect below (the in-band boundary): the write + integrate
|
|
395
|
-
// (task/
|
|
395
|
+
// (task/spec) and the `postIssueComment` (ask/bounce).
|
|
396
396
|
//
|
|
397
|
-
// PER-OUTCOME integration (
|
|
397
|
+
// PER-OUTCOME integration (spec `issue-intake` US #9): the resolved mode is keyed on the runtime
|
|
398
398
|
// artifact TYPE — a `task` verdict integrates with the task mode, a `spec`
|
|
399
399
|
// verdict with the spec mode. Unset ⇒ propose for both. ask/bounce never
|
|
400
400
|
// integrate, so the modes are no-ops for them.
|
|
@@ -411,6 +411,9 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
|
|
|
411
411
|
cwd,
|
|
412
412
|
arbiter,
|
|
413
413
|
integration: modes.task,
|
|
414
|
+
// The resolved cross-job CAS-retry cap (config `mergeRetries`) — threaded so
|
|
415
|
+
// intake's lone-task emit lands under the same per-repo cap the build path uses.
|
|
416
|
+
mergeRetries: options.mergeRetries,
|
|
414
417
|
// The origin-trust STAMP, passed IN (not resolved here): the emitted task
|
|
415
418
|
// carries `origin: issue` + this verdict so the becomes-code checkpoint is
|
|
416
419
|
// not laundered. Unset ⇒ unstamped (a local intake ⇒ human/trusted).
|
|
@@ -429,7 +432,7 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
|
|
|
429
432
|
note,
|
|
430
433
|
});
|
|
431
434
|
// The `spec` outcome is the parent-spec verdict; it dispatches through
|
|
432
|
-
// `modes.spec`. HARD CUTOVER: the legacy
|
|
435
|
+
// `modes.spec`. HARD CUTOVER: the legacy ''prd'' outcome case is GONE.
|
|
433
436
|
case 'spec':
|
|
434
437
|
return dispatchSpec({
|
|
435
438
|
verdict,
|
|
@@ -437,7 +440,10 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
|
|
|
437
440
|
cwd,
|
|
438
441
|
arbiter,
|
|
439
442
|
integration: modes.spec,
|
|
440
|
-
//
|
|
443
|
+
// The resolved cross-job CAS-retry cap (config `mergeRetries`) — threaded so
|
|
444
|
+
// intake's spec emit lands under the same per-repo cap the build path uses.
|
|
445
|
+
mergeRetries: options.mergeRetries,
|
|
446
|
+
// Same origin-trust stamp on the spec outcome (propagated onto its tasks
|
|
441
447
|
// later by the tasker). Passed IN; not resolved here.
|
|
442
448
|
originTrust: options.originTrust,
|
|
443
449
|
noPR: options.noPR,
|
|
@@ -445,7 +451,7 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
|
|
|
445
451
|
// `pre-prd-staging-pool-split-and-untrusted-prd-placement`): the
|
|
446
452
|
// configured-default + explicit-flag rungs, fed into the SHARED placement
|
|
447
453
|
// resolver alongside the `originTrust` stamp above. The resolver decides
|
|
448
|
-
// `
|
|
454
|
+
// `specs/proposed/` (staging) vs `specs/ready/` (the tasking pool); `intake` never
|
|
449
455
|
// places itself.
|
|
450
456
|
specsLandIn: options.specsLandIn,
|
|
451
457
|
explicitSpecsLandIn: options.explicitSpecsLandIn,
|
|
@@ -502,7 +508,7 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
|
|
|
502
508
|
*
|
|
503
509
|
* - **ask** (non-terminal): `postIssueComment` the drafted question, emit NOTHING,
|
|
504
510
|
* and LEAVE THE ISSUE OPEN — it waits for the thread to be answered (a later run
|
|
505
|
-
* resumes from it). The task/
|
|
511
|
+
* resumes from it). The task/spec path also never closes (CI's close-job does,
|
|
506
512
|
* via the `issue:` field). Intake closes ONLY on BOUNCE.
|
|
507
513
|
* - **bounce** (TERMINAL): the asks are unrelated and must be re-filed, so an OPEN
|
|
508
514
|
* issue is a dishonest "still in play" signal. Intake CLOSES the issue
|
|
@@ -572,7 +578,7 @@ async function dispatchComment(params) {
|
|
|
572
578
|
}
|
|
573
579
|
/**
|
|
574
580
|
* DISPATCH the `task` outcome: derive a content-derived slug, write
|
|
575
|
-
* `work/backlog/<slug>.md` (`covers: []`, NO `
|
|
581
|
+
* `work/backlog/<slug>.md` (`covers: []`, NO `spec:`) carrying `issue: N` (the
|
|
576
582
|
* lone-task closure link, NOT `Fixes #N`), and integrate via {@link
|
|
577
583
|
* performIntegration}. The runner owns the git: it onboards a
|
|
578
584
|
* `work/<slug>` branch off fresh `<arbiter>/main`, then the lifecycle `stage`
|
|
@@ -580,8 +586,8 @@ async function dispatchComment(params) {
|
|
|
580
586
|
* agent did NO git/seam ops.
|
|
581
587
|
*/
|
|
582
588
|
async function dispatchTask(params) {
|
|
583
|
-
const { verdict, issueNumber, cwd, arbiter, integration, originTrust, noPR, providerInstance, issueProvider, reviewTask, seen, env, agentEnv, note, } = params;
|
|
584
|
-
// A content-derived slug — NEVER a counter (
|
|
589
|
+
const { verdict, issueNumber, cwd, arbiter, integration, mergeRetries, originTrust, noPR, providerInstance, issueProvider, reviewTask, seen, env, agentEnv, note, } = params;
|
|
590
|
+
// A content-derived slug — NEVER a counter (spec `issue-intake` US #8). Prefer the drafted
|
|
585
591
|
// `taskSlug`, else derive from the drafted title; sanitise either through
|
|
586
592
|
// `paramCase` so the filename + frontmatter slug are well-formed.
|
|
587
593
|
const slug = resolveSlug(verdict);
|
|
@@ -594,7 +600,7 @@ async function dispatchTask(params) {
|
|
|
594
600
|
const relPath = workItemRel('tasks-ready', `${slug}.md`);
|
|
595
601
|
// BOUNDED INTERNAL REVIEW (observation
|
|
596
602
|
// `intake-lone-task-skips-adversarial-review-the-prd-path-gets`, rulings A/B/C):
|
|
597
|
-
// the `do
|
|
603
|
+
// the `do spec:` path gets `runTaskReviewLoop`; the lone-TASK path got NOTHING.
|
|
598
604
|
// AFTER the `task` verdict and BEFORE the write/integrate, run a bounded (3-round,
|
|
599
605
|
// HARD-CAPPED) adversarial self-review on the SINGLE drafted task. It mutates the
|
|
600
606
|
// candidate body IN MEMORY (no `work/backlog/` write pre-convergence). A launch/
|
|
@@ -684,6 +690,12 @@ async function dispatchTask(params) {
|
|
|
684
690
|
// EXPLICITLY-chosen mode proceeds as-is: a future `--merge-task` lands on main
|
|
685
691
|
// (`merge` IS the auto-land mode, never downgraded).
|
|
686
692
|
mode: integration,
|
|
693
|
+
// The cross-job merge-serialiser CAS-retry cap (config `mergeRetries`) — the
|
|
694
|
+
// git-alone floor of the cross-job land queue, resolved through the gate-
|
|
695
|
+
// family precedence chain in the CLI and threaded here so intake's lone-task
|
|
696
|
+
// emit lands under the same per-repo cap the build path uses. Unset ⇒ the
|
|
697
|
+
// engine default (byte-for-byte unchanged).
|
|
698
|
+
mergeRetries,
|
|
687
699
|
noPR,
|
|
688
700
|
providerInstance,
|
|
689
701
|
type: 'feat',
|
|
@@ -713,8 +725,8 @@ async function dispatchTask(params) {
|
|
|
713
725
|
});
|
|
714
726
|
}
|
|
715
727
|
/**
|
|
716
|
-
* DISPATCH the `spec` outcome (
|
|
717
|
-
*
|
|
728
|
+
* DISPATCH the `spec` outcome (the SOLE parent-spec outcome after the HARD CUTOVER;
|
|
729
|
+
* the legacy ''prd'' outcome token is GONE): derive a content-derived slug, write the spec file
|
|
718
730
|
* (`work/specs/ready/<slug>.md`) carrying `issue: N` (the loop-closure linkage the
|
|
719
731
|
* close JOB reaches via `task.spec: → spec issue:`; on a fanned spec the number
|
|
720
732
|
* lives ONLY on the spec — a fanned task uses `spec:`, NOT its own `issue:`, which
|
|
@@ -725,8 +737,8 @@ async function dispatchTask(params) {
|
|
|
725
737
|
* runner owns the git exactly as the task branch does; the agent did NO git/seam ops.
|
|
726
738
|
*/
|
|
727
739
|
async function dispatchSpec(params) {
|
|
728
|
-
const { verdict, issueNumber, cwd, arbiter, integration, originTrust, noPR, specsLandIn, explicitSpecsLandIn, providerInstance, issueProvider, seen, env, note, } = params;
|
|
729
|
-
// A content-derived slug — NEVER a counter (
|
|
740
|
+
const { verdict, issueNumber, cwd, arbiter, integration, mergeRetries, originTrust, noPR, specsLandIn, explicitSpecsLandIn, providerInstance, issueProvider, seen, env, note, } = params;
|
|
741
|
+
// A content-derived slug — NEVER a counter (spec `issue-intake` US #8). Prefer the drafted
|
|
730
742
|
// `specSlug`, else derive from the drafted title.
|
|
731
743
|
const slug = resolveSpecSlug(verdict);
|
|
732
744
|
if (slug === '') {
|
|
@@ -738,7 +750,7 @@ async function dispatchSpec(params) {
|
|
|
738
750
|
// RUNNER-DETERMINISTIC PLACEMENT (task
|
|
739
751
|
// `pre-prd-staging-pool-split-and-untrusted-prd-placement`, governing ADR
|
|
740
752
|
// `placement-is-runner-deterministic-humanonly-is-agent-judgement`). Resolve
|
|
741
|
-
// which folder the runner writes the intake-authored
|
|
753
|
+
// which folder the runner writes the intake-authored spec into BEFORE handing
|
|
742
754
|
// it to the shared integrate band: the SAME precedence chain the tasker uses
|
|
743
755
|
// (`explicit > untrusted-origin ⇒ staging > specsLandIn > built-in (staging)`),
|
|
744
756
|
// the SAME shared resolver — only the lifecycle SLOTS differ. The agent
|
|
@@ -770,16 +782,20 @@ async function dispatchSpec(params) {
|
|
|
770
782
|
slug,
|
|
771
783
|
source: 'in-progress',
|
|
772
784
|
recovering: false,
|
|
773
|
-
// An intake-emitted
|
|
785
|
+
// An intake-emitted spec has no `verify` floor of its own (it is a new spec,
|
|
774
786
|
// not a build), exactly as the task branch + the tasking transition skip it.
|
|
775
787
|
skipVerify: true,
|
|
776
788
|
mode: integration,
|
|
789
|
+
// The cross-job merge-serialiser CAS-retry cap (config `mergeRetries`) — same
|
|
790
|
+
// rationale as the lone-task emit above; threaded so intake's spec emit lands
|
|
791
|
+
// under the same per-repo cap. Unset ⇒ the engine default (byte-for-byte).
|
|
792
|
+
mergeRetries,
|
|
777
793
|
noPR,
|
|
778
794
|
providerInstance,
|
|
779
795
|
type: 'feat',
|
|
780
796
|
lifecycle: {
|
|
781
|
-
// The emitted
|
|
782
|
-
// race as the task path: `stage()` writes the
|
|
797
|
+
// The emitted spec IS the title source. Pass the DRAFTED title EXPLICITLY (same
|
|
798
|
+
// race as the task path: `stage()` writes the spec file AFTER the title
|
|
783
799
|
// read). `titlePath` stays set but is IGNORED while `title` is present.
|
|
784
800
|
titlePath: join(cwd, relPath),
|
|
785
801
|
title: verdict.specTitle ?? slug,
|
|
@@ -817,9 +833,9 @@ async function integrationToIntakeResult(core, ctx) {
|
|
|
817
833
|
const landed = core.integration?.mode === 'merge'
|
|
818
834
|
? 'landed it on the arbiter main'
|
|
819
835
|
: 'opened a PR carrying it (main untouched)';
|
|
820
|
-
// Both a lone task and a
|
|
821
|
-
// closes its own issue; a
|
|
822
|
-
// task/
|
|
836
|
+
// Both a lone task and a spec carry `issue: N` as their closure link (the task
|
|
837
|
+
// closes its own issue; a spec is reached via `task.spec: → spec issue:`). On the
|
|
838
|
+
// task/spec path `intake` never closes the issue (CI's close-job does, via the
|
|
823
839
|
// `issue:` field; intake closes ONLY on BOUNCE) and emits no `Fixes #N` (a
|
|
824
840
|
// deferred GitHub-only optimisation).
|
|
825
841
|
const link = `issue: ${issueNumber}`;
|
|
@@ -885,7 +901,7 @@ async function integrationToIntakeResult(core, ctx) {
|
|
|
885
901
|
* `commit` (the additive {@link IntegrateResult.commit}) in merge. A degraded
|
|
886
902
|
* propose (no `url`) or a failed merge-tip read (no `commit`) simply OMITS the
|
|
887
903
|
* link — the comment still confirms what was created (the artifact is safe on the
|
|
888
|
-
* branch/main regardless). No
|
|
904
|
+
* branch/main regardless). No spec link beyond the slug.
|
|
889
905
|
* - carries the FULL intake MARKER via the SHARED {@link stampIntakeMarker} helper
|
|
890
906
|
* (`kind=created slug=<slug> seen=<id>,…`) so the triage's `already-terminal`
|
|
891
907
|
* branch consumes it — the comment cannot re-trigger intake.
|
|
@@ -918,7 +934,7 @@ export function composeIntakeCompletionComment(params) {
|
|
|
918
934
|
* does, via the `issue:` field); this comment changes NO issue state.
|
|
919
935
|
* - LINKS the artifact by INTEGRATION MODE: the PR `url` in propose, the landed
|
|
920
936
|
* `commit` (the additive {@link IntegrateResult.commit} this task surfaces) in
|
|
921
|
-
* merge. No
|
|
937
|
+
* merge. No spec link beyond the slug.
|
|
922
938
|
* - carries the FULL intake MARKER via the SHARED {@link stampIntakeMarker} helper
|
|
923
939
|
* (`kind=created slug=<slug> seen=<id>,…`). `kind=created` is TERMINAL, so the
|
|
924
940
|
* triage's `already-terminal` branch then treats the issue as already-transformed
|
|
@@ -953,7 +969,7 @@ async function postCompletionComment(params) {
|
|
|
953
969
|
return posted.posted;
|
|
954
970
|
}
|
|
955
971
|
/**
|
|
956
|
-
* Resolve a content-derived slug from the verdict — NEVER a counter (
|
|
972
|
+
* Resolve a content-derived slug from the verdict — NEVER a counter (spec `issue-intake` US #8).
|
|
957
973
|
* Prefer the drafted `taskSlug`, else derive from the drafted title; both go
|
|
958
974
|
* through `paramCase` (the brand case-transform) so the result is a clean
|
|
959
975
|
* lowercase-`-`-joined slug. An empty result (no slug AND no title) signals the
|
|
@@ -966,7 +982,7 @@ function resolveSlug(verdict) {
|
|
|
966
982
|
return paramCase(candidate);
|
|
967
983
|
}
|
|
968
984
|
/**
|
|
969
|
-
* Resolve a content-derived slug for the spec outcome — NEVER a counter (
|
|
985
|
+
* Resolve a content-derived slug for the spec outcome — NEVER a counter (spec `issue-intake` US #8).
|
|
970
986
|
* Prefer the drafted `specSlug`, else derive from the drafted spec title; both go
|
|
971
987
|
* through `paramCase`. An empty result signals the caller to refuse.
|
|
972
988
|
*/
|
|
@@ -978,13 +994,13 @@ function resolveSpecSlug(verdict) {
|
|
|
978
994
|
}
|
|
979
995
|
/**
|
|
980
996
|
* Render the backlog task file: the frontmatter (`title`/`slug`/`covers: []`, NO
|
|
981
|
-
* `
|
|
997
|
+
* `spec:` — its own source of truth, spec `issue-intake` decision table) carrying the lone-task
|
|
982
998
|
* `issue: N` closure link + the drafted body. The task closes its source issue
|
|
983
999
|
* via its `issue:` field (the provider-agnostic link a FUTURE CI close-job reads
|
|
984
1000
|
* from folder + field state); it carries NO `Fixes #N` (a deferred GitHub-only
|
|
985
1001
|
* optimisation, structurally unplaceable on the `--merge` path). The number is
|
|
986
|
-
* the task's own closure path — `issue:` XOR `
|
|
987
|
-
* `
|
|
1002
|
+
* the task's own closure path — `issue:` XOR `spec:`; a lone task never carries a
|
|
1003
|
+
* `spec:` (spec `issue-intake` decision table). When the agent drafted no body, a thin default
|
|
988
1004
|
* scaffold keeps the file a valid task.
|
|
989
1005
|
*/
|
|
990
1006
|
export function renderBacklogTask(params) {
|
|
@@ -1002,7 +1018,7 @@ export function renderBacklogTask(params) {
|
|
|
1002
1018
|
const frontmatter = lines.join('\n');
|
|
1003
1019
|
// The drafted body (agent-authored, headings and all) is wrapped VERBATIM.
|
|
1004
1020
|
// Only the empty-body DEFAULT SCAFFOLD is sourced from the shared section
|
|
1005
|
-
// skeleton owner (`renderTaskBody`,
|
|
1021
|
+
// skeleton owner (`renderTaskBody`, spec
|
|
1006
1022
|
// `centralize-buildable-task-renderer-shared-by-intake-and-promotion` US #2),
|
|
1007
1023
|
// so intake's fallback and promotion's body cannot drift on section
|
|
1008
1024
|
// names/order. The shared renderer ends its body with a trailing newline (its
|
|
@@ -1019,16 +1035,16 @@ export function renderBacklogTask(params) {
|
|
|
1019
1035
|
return `${frontmatter}\n\n${drafted}\n`;
|
|
1020
1036
|
}
|
|
1021
1037
|
/**
|
|
1022
|
-
* Render the emitted
|
|
1023
|
-
* `issue: N` + the gate axes the prompt JUDGED) followed by the drafted
|
|
1024
|
-
* For a FANNED
|
|
1025
|
-
* the N fanned tasks, which reach it via `task.
|
|
1026
|
-
* task carries `
|
|
1027
|
-
* one that puts `issue:` on a task). The close JOB reaches the
|
|
1028
|
-
* `task.
|
|
1038
|
+
* Render the emitted spec file: the frontmatter (`title`/`slug` + the loop-closure
|
|
1039
|
+
* `issue: N` + the gate axes the prompt JUDGED) followed by the drafted spec body.
|
|
1040
|
+
* For a FANNED spec the `issue: N` lives ONLY on the spec — never duplicated across
|
|
1041
|
+
* the N fanned tasks, which reach it via `task.spec: → spec issue:` (a fanned
|
|
1042
|
+
* task carries `spec:`, NOT its own `issue:`; the lone-task outcome is the only
|
|
1043
|
+
* one that puts `issue:` on a task). The close JOB reaches the spec's number via
|
|
1044
|
+
* `task.spec: → spec issue:`. The gate axes (`humanOnly`/`needsAnswers`) are emitted ONLY when the
|
|
1029
1045
|
* verdict declared them `true` — an omitted axis is `undefined` (undeclared), the
|
|
1030
1046
|
* same convention `frontmatter.ts` parses. When the agent drafted no body, a thin
|
|
1031
|
-
* default scaffold keeps the file a valid
|
|
1047
|
+
* default scaffold keeps the file a valid spec that `do spec:` can later task.
|
|
1032
1048
|
*/
|
|
1033
1049
|
export function renderSpec(params) {
|
|
1034
1050
|
const { slug, title, body, issueNumber, humanOnly, needsAnswers, originTrust } = params;
|
|
@@ -1044,7 +1060,7 @@ export function renderSpec(params) {
|
|
|
1044
1060
|
if (originTrust !== undefined) {
|
|
1045
1061
|
lines.push('origin: issue', `originTrust: ${originTrust}`);
|
|
1046
1062
|
}
|
|
1047
|
-
// Surface the gate axes AS THE PROMPT JUDGED THEM (
|
|
1063
|
+
// Surface the gate axes AS THE PROMPT JUDGED THEM (spec `issue-intake` US #8). Only emit a `true`
|
|
1048
1064
|
// axis — an undeclared axis stays absent (parsed as `undefined`).
|
|
1049
1065
|
if (humanOnly === true) {
|
|
1050
1066
|
lines.push('humanOnly: true');
|
|
@@ -1054,18 +1070,18 @@ export function renderSpec(params) {
|
|
|
1054
1070
|
}
|
|
1055
1071
|
lines.push('---');
|
|
1056
1072
|
const frontmatter = lines.join('\n');
|
|
1057
|
-
// As with `renderBacklogTask`: the drafted
|
|
1073
|
+
// As with `renderBacklogTask`: the drafted SPEC body is wrapped VERBATIM; only
|
|
1058
1074
|
// the empty-body DEFAULT SCAFFOLD is sourced from the shared section skeleton
|
|
1059
|
-
// owner (`renderSpecBody` with `solution` + `userStories`,
|
|
1075
|
+
// owner (`renderSpecBody` with `solution` + `userStories`, spec
|
|
1060
1076
|
// `centralize-buildable-task-renderer-shared-by-intake-and-promotion` US #2),
|
|
1061
|
-
// so intake's
|
|
1077
|
+
// so intake's SPEC fallback and promotion's SPEC body cannot drift. `trimEnd()`
|
|
1062
1078
|
// drops the renderer's trailing blank line so intake's single trailing `\n`
|
|
1063
1079
|
// (owned by the join below) keeps the bytes identical to the pre-rewire literal.
|
|
1064
1080
|
const drafted = body && body.trim() !== ''
|
|
1065
1081
|
? body.trim()
|
|
1066
1082
|
: renderSpecBody({
|
|
1067
1083
|
problemStatement: `Transformed from issue #${issueNumber}: ${title}`,
|
|
1068
|
-
solution: '(to be detailed; this
|
|
1084
|
+
solution: '(to be detailed; this spec needs tasking via `do spec:`).',
|
|
1069
1085
|
userStories: `1. As a user, I want issue #${issueNumber} addressed.`,
|
|
1070
1086
|
}).trimEnd();
|
|
1071
1087
|
return `${frontmatter}\n\n${drafted}\n`;
|
|
@@ -1091,7 +1107,7 @@ async function stageIntakeContent(params) {
|
|
|
1091
1107
|
* `intake-` PRODUCER prefix keeps this short-lived "create the item" branch
|
|
1092
1108
|
* DISTINCT from the later build branch (`work/task-<slug>`) for the same slug
|
|
1093
1109
|
* — the firing `intake` × `do task:` collision the observation traced. The
|
|
1094
|
-
* task-emit path passes `'task'`, the
|
|
1110
|
+
* task-emit path passes `'task'`, the spec-emit path `'spec'`. A pre-existing
|
|
1095
1111
|
* local branch (a re-run) is force-recreated off fresh main.
|
|
1096
1112
|
*/
|
|
1097
1113
|
async function switchToWorkBranch(cwd, arbiter, type, slug, env) {
|
|
@@ -1112,7 +1128,7 @@ async function runDecision(options, cwd, issue, comments, prompt) {
|
|
|
1112
1128
|
if (options.decide) {
|
|
1113
1129
|
return options.decide({ cwd, issue, comments, prompt, env: options.env });
|
|
1114
1130
|
}
|
|
1115
|
-
// PRODUCTION: launch the harness with the decision
|
|
1131
|
+
// PRODUCTION: launch the harness with the decision spec, then PARSE the verdict
|
|
1116
1132
|
// the agent emitted out of its ANSWER channel (`launched.output`) — the SAME wire
|
|
1117
1133
|
// the review gate runs (launch → `parseReviewVerdict(readOutput(launched.output))`;
|
|
1118
1134
|
// `harnessReviewGate`). The agent emits a single fenced ```json block (the OUTPUT
|
|
@@ -1184,7 +1200,7 @@ export function parseIntakeVerdict(output) {
|
|
|
1184
1200
|
outcome !== 'spec' &&
|
|
1185
1201
|
outcome !== 'bounce') {
|
|
1186
1202
|
// The prompt teaches the LLM to emit `spec`, so the accepted outcome set is
|
|
1187
|
-
// `ask|task|spec|bounce`. HARD CUTOVER: the legacy
|
|
1203
|
+
// `ask|task|spec|bounce`. HARD CUTOVER: the legacy ''prd'' outcome token is
|
|
1188
1204
|
// fully gone (rejected here + removed from the `IntakeOutcome` type + the
|
|
1189
1205
|
// dispatch `case`).
|
|
1190
1206
|
throw new Error(`intake verdict 'outcome' was not one of ask|task|spec|bounce (got ` +
|
|
@@ -1224,7 +1240,7 @@ export function parseIntakeVerdict(output) {
|
|
|
1224
1240
|
// The LONE-TASK bounded internal review (observation
|
|
1225
1241
|
// `intake-lone-task-skips-adversarial-review-the-prd-path-gets`, rulings A/B/C).
|
|
1226
1242
|
//
|
|
1227
|
-
// Give intake's lone-TASK outcome the adversarial refinement the `do
|
|
1243
|
+
// Give intake's lone-TASK outcome the adversarial refinement the `do spec:` path
|
|
1228
1244
|
// already gets — but as a small intake-NATIVE bounded review, NOT by integrating
|
|
1229
1245
|
// the tasker loop. This is a NEW prompt + a small loop + an injectable gate seam,
|
|
1230
1246
|
// MIRRORING the tasker loop's verdict/output CONVENTIONS (fenced JSON
|
|
@@ -1497,20 +1513,20 @@ export function buildLoneTaskReviewPrompt(input) {
|
|
|
1497
1513
|
*/
|
|
1498
1514
|
export const parseLoneTaskReviewVerdict = parseReviewVerdict;
|
|
1499
1515
|
/**
|
|
1500
|
-
* Build the intake decision
|
|
1516
|
+
* Build the intake decision SPEC (an inline prompt builder, like `buildTaskingPrd`
|
|
1501
1517
|
* in `tasking.ts` / the reviewer prompts in `review-gate.ts` — NOT a standalone
|
|
1502
1518
|
* asset/`.md` file; no such convention exists in this package). It encodes the FULL
|
|
1503
|
-
* four-outcome decision table (
|
|
1519
|
+
* four-outcome decision table (spec `issue-intake` — the source of truth) and the
|
|
1504
1520
|
* three DECISION AIDS stated once there:
|
|
1505
1521
|
*
|
|
1506
1522
|
* 1. the **"clear?" bar** = `to-task`/`needsAnswers`' "would I build the wrong
|
|
1507
1523
|
* thing if I guessed?" — if a material requirement/scope/acceptance question is
|
|
1508
1524
|
* unanswered, ASK (never guess a spec from a vague issue);
|
|
1509
1525
|
* 2. the **"one task?" bar** = `to-task`' tracer-bullet test (one thin end-to-end
|
|
1510
|
-
* path, demoable on its own) — fits → TASK, needs splitting →
|
|
1511
|
-
* 3. **
|
|
1526
|
+
* path, demoable on its own) — fits → TASK, needs splitting → SPEC;
|
|
1527
|
+
* 3. **SPEC vs BOUNCE** turns on a **SHARED VISION**: coupled (even if small) → SPEC;
|
|
1512
1528
|
* genuinely unrelated → BOUNCE. Size NEVER forces a bounce — only unrelatedness
|
|
1513
|
-
* (the over-bounce guard: a coupled-but-small pair gets a light
|
|
1529
|
+
* (the over-bounce guard: a coupled-but-small pair gets a light SPEC, never a
|
|
1514
1530
|
* bounce).
|
|
1515
1531
|
*
|
|
1516
1532
|
* The prompt anchors to `to-task`/`to-spec` for the task/spec SHAPES it drafts. Its
|
|
@@ -1524,7 +1540,7 @@ export function buildIntakeDecisionSpec(issue, comments, triage) {
|
|
|
1524
1540
|
: comments
|
|
1525
1541
|
.map((c, i) => `#${i + 1} ${c.author ? `@${c.author}` : '(unknown)'}: ${c.body}`)
|
|
1526
1542
|
.join('\n\n');
|
|
1527
|
-
// TRIAGE ENRICHMENT (
|
|
1543
|
+
// TRIAGE ENRICHMENT (spec `issue-intake`): on the raced PROCEED path the prompt is
|
|
1528
1544
|
// told which comment(s) PRE-DATE intake's last turn (context for a prior state,
|
|
1529
1545
|
// not necessarily a fresh answer) and — only then — how many previously-SEEN
|
|
1530
1546
|
// comments were DELETED (a flag + count; the bodies are gone, so do not name them).
|
|
@@ -1560,42 +1576,42 @@ export function buildIntakeDecisionSpec(issue, comments, triage) {
|
|
|
1560
1576
|
' (a single thin end-to-end path, demoable on its own — `to-task`’ criterion).',
|
|
1561
1577
|
' Draft that ONE task in the `to-task` shape (a `## What to build`,',
|
|
1562
1578
|
' `## Acceptance criteria`, and `## Prompt`). The runner writes',
|
|
1563
|
-
' `work/backlog/<slug>.md` (`covers: []`, NO `
|
|
1579
|
+
' `work/backlog/<slug>.md` (`covers: []`, NO `spec:`) carrying `issue: N` (the',
|
|
1564
1580
|
' lone-task closure link, NOT `Fixes #N`) and integrates it.',
|
|
1565
1581
|
'',
|
|
1566
|
-
'- **
|
|
1582
|
+
'- **SPEC** — the issue is CLEAR *and* coherent but needs MORE THAN ONE task (it',
|
|
1567
1583
|
' cannot be one tracer-bullet path — it splits for scope/architecture). >1 task',
|
|
1568
1584
|
' ⟺ a shared vision worth recording ⟺ a spec. Draft a spec in the `to-spec` shape',
|
|
1569
1585
|
' (`## Problem Statement`, `## Solution`, `## User Stories`, `## Out of Scope`).',
|
|
1570
|
-
|
|
1571
|
-
' TASKING the
|
|
1586
|
+
` The runner writes the spec file (\`${workFolderPrefix('specs-ready')}<slug>.md\`) with \`issue: N\` and integrates it;`,
|
|
1587
|
+
' TASKING the spec is a SEPARATE later step (`do spec:`) — do not task it here.',
|
|
1572
1588
|
' **INCLUDES a coupled-but-SMALL pair: if two asks share a vision they get a',
|
|
1573
|
-
' (light)
|
|
1589
|
+
' (light) spec — they are NEVER bounced.**',
|
|
1574
1590
|
'',
|
|
1575
1591
|
'- **BOUNCE** — the issue is really MULTIPLE UNRELATED concerns wearing one issue:',
|
|
1576
1592
|
' you cannot articulate a SINGLE shared vision tying them together. Draft a short',
|
|
1577
1593
|
' message asking the author to file separate issues. A bounce is TERMINAL, so the',
|
|
1578
1594
|
' runner CLOSES the issue ATOMICALLY — your message as the closing comment +',
|
|
1579
1595
|
' reason "not planned" (the honest signal that the asks must be re-filed). Intake',
|
|
1580
|
-
' closes on BOUNCE only; never on task/
|
|
1596
|
+
' closes on BOUNCE only; never on task/spec (CI’s close-job) / ask.',
|
|
1581
1597
|
'',
|
|
1582
1598
|
'## The three decision aids (apply them in order)',
|
|
1583
1599
|
'',
|
|
1584
1600
|
'1. **"clear?"** (ASK vs the rest): the `needsAnswers` bar — would acting now risk',
|
|
1585
1601
|
' building the wrong thing? If yes → ASK. Otherwise it is clear; continue.',
|
|
1586
|
-
'2. **"one task?"** (TASK vs
|
|
1587
|
-
' end-to-end path, demoable alone? Fits → TASK; needs splitting →
|
|
1588
|
-
'3. **"shared vision?"** (
|
|
1602
|
+
'2. **"one task?"** (TASK vs SPEC): the `to-task` tracer-bullet test — one thin',
|
|
1603
|
+
' end-to-end path, demoable alone? Fits → TASK; needs splitting → SPEC.',
|
|
1604
|
+
'3. **"shared vision?"** (SPEC vs BOUNCE): coupled (even if small) → SPEC; genuinely',
|
|
1589
1605
|
' unrelated → BOUNCE. SIZE NEVER forces a bounce — only UNRELATEDNESS does. Do',
|
|
1590
|
-
' not over-bounce a small coupled pair: it is a light
|
|
1606
|
+
' not over-bounce a small coupled pair: it is a light spec.',
|
|
1591
1607
|
'',
|
|
1592
1608
|
'## Boundary',
|
|
1593
1609
|
'',
|
|
1594
|
-
'You only DRAFT the verdict + its content (the task/
|
|
1610
|
+
'You only DRAFT the verdict + its content (the task/spec body, or the comment',
|
|
1595
1611
|
'text). You do NOT perform ANY git operation and you do NOT post any comment — the',
|
|
1596
|
-
'runner owns every git/seam side-effect (write, integrate, postComment). For a
|
|
1612
|
+
'runner owns every git/seam side-effect (write, integrate, postComment). For a spec',
|
|
1597
1613
|
'verdict, also judge its gate axes (humanOnly / needsAnswers) so the runner can',
|
|
1598
|
-
'surface them on the emitted
|
|
1614
|
+
'surface them on the emitted spec.',
|
|
1599
1615
|
'',
|
|
1600
1616
|
'## Output — hand the verdict back as ONE fenced JSON block',
|
|
1601
1617
|
'',
|