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/src/install-ci-core.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The provider-agnostic CORE of the `install-ci` scaffolder (
|
|
2
|
+
* The provider-agnostic CORE of the `install-ci` scaffolder (spec `runner-in-ci`,
|
|
3
3
|
* task `install-ci-core-and-github-adapter`; US #7/#10). `install-ci` is a
|
|
4
4
|
* human-run, one-time SCAFFOLDER (mirrors whitesmith's `src/providers/github-ci.ts`):
|
|
5
5
|
* it writes `.github/**` + a composite setup action + secrets so autonomous work
|
|
@@ -106,7 +106,7 @@ export interface CIConfigFile {
|
|
|
106
106
|
/** API key values keyed by env var name. Only present with `--include-secrets`. */
|
|
107
107
|
secrets?: Record<string, string>;
|
|
108
108
|
/**
|
|
109
|
-
* The project-setup escape hatch (
|
|
109
|
+
* The project-setup escape hatch (spec `install-ci-project-provisioning`,
|
|
110
110
|
* task `install-ci-project-setup-hook`): a PROVIDER-NAMESPACED, OPAQUE,
|
|
111
111
|
* NATIVE-SYNTAX pass-through map. The key is a provider id (today only
|
|
112
112
|
* `github`); the value is the user's own project-toolchain snippet in that
|
|
@@ -152,7 +152,7 @@ export const DEFAULT_HARNESS: HarnessAdapter = 'pi';
|
|
|
152
152
|
* draining steadily rather than stampeding the model-provider rate limit + the
|
|
153
153
|
* arbiter CAS. Tunable via `install-ci --max-parallel <n>` / the config file.
|
|
154
154
|
*/
|
|
155
|
-
export const DEFAULT_MAX_PARALLEL =
|
|
155
|
+
export const DEFAULT_MAX_PARALLEL = 2;
|
|
156
156
|
|
|
157
157
|
/** The default install source: the published CLI via `npm install -g`. */
|
|
158
158
|
export const DEFAULT_INSTALL_SOURCE: InstallSource = 'registry';
|
|
@@ -197,7 +197,7 @@ export interface CIProviderContext {
|
|
|
197
197
|
/**
|
|
198
198
|
* OPTIONALLY report whether the configured credential has REPO-ADMIN scope
|
|
199
199
|
* on the provider (→ can set branch protection / rulesets). Used by the
|
|
200
|
-
* Tier-1 branch-protection step (
|
|
200
|
+
* Tier-1 branch-protection step (spec `land-time-reverify-and-parallel-
|
|
201
201
|
* merge-ceiling`, Story 11) to pick `auto-configure` vs `print fallback`.
|
|
202
202
|
* `true` ⇒ admin, `false` ⇒ explicitly NOT admin, `undefined` ⇒ unknown
|
|
203
203
|
* (treated as non-admin: never silently attempt a call that would 403).
|
|
@@ -212,6 +212,26 @@ export interface CIProviderContext {
|
|
|
212
212
|
* Throws on failure (caller catches + logs).
|
|
213
213
|
*/
|
|
214
214
|
setBranchProtection?(branch: string, spec: unknown): Promise<void>;
|
|
215
|
+
/**
|
|
216
|
+
* OPTIONALLY report the repo's DEFAULT BRANCH name (GitHub:
|
|
217
|
+
* `gh repo view --json defaultBranchRef`). Used by the Tier-1 branch-
|
|
218
|
+
* protection step so the PUT and the printed `gh api` fallback both target
|
|
219
|
+
* the repo's real default branch (a `master`-defaulted repo would 404 a
|
|
220
|
+
* hardcoded `main`). Returns `undefined` when the lookup fails / is empty
|
|
221
|
+
* (caller falls back to `main` and logs it). Absent on a provider that has
|
|
222
|
+
* no default-branch concept.
|
|
223
|
+
*/
|
|
224
|
+
getDefaultBranch?(): Promise<string | undefined>;
|
|
225
|
+
/**
|
|
226
|
+
* OPTIONALLY create/replace a branch RULESET (GitHub:
|
|
227
|
+
* `POST /repos/{owner}/{repo}/rulesets`) carrying the deadlock-guard
|
|
228
|
+
* `required_status_checks` rule with `do_not_enforce_on_create: true`. The
|
|
229
|
+
* `ruleset` body (`BranchProtectionRuleset` in
|
|
230
|
+
* `install-ci-branch-protection.ts`) is typed as `unknown` here to keep this
|
|
231
|
+
* core seam free of the branch-protection module's import. Absent on a non-
|
|
232
|
+
* GitHub provider. Throws on failure (caller catches + logs).
|
|
233
|
+
*/
|
|
234
|
+
setBranchRuleset?(ruleset: unknown): Promise<void>;
|
|
215
235
|
/**
|
|
216
236
|
* OPTIONALLY render the user's project-setup payload (the value of
|
|
217
237
|
* {@link CIConfigFile.projectSetup}[providerId]) to the NATIVE-SYNTAX
|
|
@@ -787,7 +807,7 @@ ${indent(modelsJsonStr, 8)}
|
|
|
787
807
|
if (config.installSource === 'workspace') {
|
|
788
808
|
installSteps = `\
|
|
789
809
|
- name: Setup pnpm
|
|
790
|
-
uses: pnpm/action-setup@
|
|
810
|
+
uses: pnpm/action-setup@v5
|
|
791
811
|
|
|
792
812
|
- name: Add pnpm global bin to PATH
|
|
793
813
|
shell: bash
|
|
@@ -809,7 +829,7 @@ ${indent(modelsJsonStr, 8)}
|
|
|
809
829
|
}
|
|
810
830
|
|
|
811
831
|
// PREFER-LOCAL RESOLVER (task install-ci-prefer-project-local-dorfl,
|
|
812
|
-
//
|
|
832
|
+
// SPEC install-ci-project-provisioning axis C1+C3): emit a `dorfl` SHIM
|
|
813
833
|
// that resolves a project-local `node_modules/.bin/dorfl` FIRST (the repo's
|
|
814
834
|
// devDep pin, populated by the project-setup hook's `pnpm install` — C3),
|
|
815
835
|
// and falls back to the global bootstrap dorfl this composite action just
|
|
@@ -903,9 +923,16 @@ runs:
|
|
|
903
923
|
using: composite
|
|
904
924
|
steps:
|
|
905
925
|
${projectSetupBlock} - name: Setup Node.js
|
|
906
|
-
uses: actions/setup-node@
|
|
926
|
+
uses: actions/setup-node@v5
|
|
907
927
|
with:
|
|
908
928
|
node-version: '22'
|
|
929
|
+
# setup-node@v5 auto-enables package-manager caching, which probes the
|
|
930
|
+
# project package manager DURING its own run when a lockfile is present,
|
|
931
|
+
# before that manager is on PATH, so the probe crashes ("Unable to
|
|
932
|
+
# locate executable file"). dorfl provisions ONLY its own runtime and
|
|
933
|
+
# leaves the project package-manager cache to the project (toolchain
|
|
934
|
+
# boundary), so disable it explicitly.
|
|
935
|
+
package-manager-cache: false
|
|
909
936
|
|
|
910
937
|
- name: Configure git identity
|
|
911
938
|
shell: bash
|
package/src/install-ci-github.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The thin GitHub adapter for `install-ci` (
|
|
2
|
+
* The thin GitHub adapter for `install-ci` (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-core-and-github-adapter`). It plugs into the provider-agnostic
|
|
4
4
|
* {@link CIProviderContext} seam from `install-ci-core.ts`: the core owns the
|
|
5
5
|
* wizard / config / `models.json` / `--export-config` / `--fake` / secret
|
|
@@ -239,6 +239,66 @@ export class GitHubCIContext implements CIProviderContext {
|
|
|
239
239
|
return undefined;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Detect the repo's DEFAULT BRANCH via
|
|
244
|
+
* `gh repo view --json defaultBranchRef --jq .defaultBranchRef.name`. Returns
|
|
245
|
+
* `undefined` when `gh` is unavailable / the repo is unknown / the call fails
|
|
246
|
+
* / the name is empty — the caller falls back to `main` (and logs it) so a
|
|
247
|
+
* `master`-defaulted repo is never silently protected on a hardcoded `main`.
|
|
248
|
+
*/
|
|
249
|
+
async getDefaultBranch(): Promise<string | undefined> {
|
|
250
|
+
if (!this.repo) {
|
|
251
|
+
return undefined;
|
|
252
|
+
}
|
|
253
|
+
const result = this.runGh([
|
|
254
|
+
'repo',
|
|
255
|
+
'view',
|
|
256
|
+
'--json',
|
|
257
|
+
'defaultBranchRef',
|
|
258
|
+
'--jq',
|
|
259
|
+
'.defaultBranchRef.name',
|
|
260
|
+
]);
|
|
261
|
+
if (result === undefined || result.status !== 0) {
|
|
262
|
+
return undefined;
|
|
263
|
+
}
|
|
264
|
+
const name = result.stdout.trim();
|
|
265
|
+
return name === '' ? undefined : name;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Create the deadlock-guard RULESET via
|
|
270
|
+
* `POST /repos/{owner}/{repo}/rulesets`. The `ruleset` body is JSON-piped on
|
|
271
|
+
* stdin (`gh api --input -`) so the nested rule shape carries cleanly. Throws
|
|
272
|
+
* on a non-zero exit; caller logs + falls back. See the module header of
|
|
273
|
+
* `install-ci-branch-protection.ts` for why the required-check guard uses a
|
|
274
|
+
* ruleset while base protection stays a classic PUT.
|
|
275
|
+
*/
|
|
276
|
+
async setBranchRuleset(ruleset: unknown): Promise<void> {
|
|
277
|
+
if (!this.repo) {
|
|
278
|
+
throw new Error('cannot create branch ruleset: repo unknown');
|
|
279
|
+
}
|
|
280
|
+
const args = [
|
|
281
|
+
'api',
|
|
282
|
+
'-X',
|
|
283
|
+
'POST',
|
|
284
|
+
'-H',
|
|
285
|
+
'Accept: application/vnd.github+json',
|
|
286
|
+
`repos/${this.repo}/rulesets`,
|
|
287
|
+
'--input',
|
|
288
|
+
'-',
|
|
289
|
+
];
|
|
290
|
+
const result = this.runGhWithInput(args, JSON.stringify(ruleset));
|
|
291
|
+
if (result === undefined) {
|
|
292
|
+
throw new Error('gh not available; cannot create branch ruleset');
|
|
293
|
+
}
|
|
294
|
+
if (result.status !== 0) {
|
|
295
|
+
throw new Error(
|
|
296
|
+
`gh api POST repos/${this.repo}/rulesets failed: ` +
|
|
297
|
+
(result.stderr.trim() || 'unknown error'),
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
242
302
|
/**
|
|
243
303
|
* Configure Tier-1 branch protection via
|
|
244
304
|
* `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. The `spec` body
|
|
@@ -322,10 +382,16 @@ export class MemoryCIProviderContext implements CIProviderContext {
|
|
|
322
382
|
readonly repoSettings = new Map<string, boolean>();
|
|
323
383
|
/** Branch-protection spec recorded in memory (branch → spec). */
|
|
324
384
|
readonly branchProtections = new Map<string, unknown>();
|
|
385
|
+
/** Deadlock-guard rulesets recorded in memory (append-only). */
|
|
386
|
+
readonly rulesets: unknown[] = [];
|
|
325
387
|
/** What `getRepoAdminScope()` should return (tests configure). */
|
|
326
388
|
private readonly adminScope: boolean | undefined;
|
|
389
|
+
/** What `getDefaultBranch()` should return (tests configure). */
|
|
390
|
+
private readonly defaultBranch: string | undefined;
|
|
327
391
|
/** Whether `setBranchProtection` should throw (tests configure). */
|
|
328
392
|
private readonly branchProtectionError: string | undefined;
|
|
393
|
+
/** Whether `setBranchRuleset` should throw (tests configure). */
|
|
394
|
+
private readonly branchRulesetError: string | undefined;
|
|
329
395
|
|
|
330
396
|
constructor(options: {
|
|
331
397
|
workDir: string;
|
|
@@ -333,8 +399,15 @@ export class MemoryCIProviderContext implements CIProviderContext {
|
|
|
333
399
|
ghAvailable?: boolean;
|
|
334
400
|
/** Fixture admin-scope verdict; `undefined` ⇒ unknown. */
|
|
335
401
|
adminScope?: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* Fixture default-branch name; `undefined` ⇒ lookup "fails" so the caller
|
|
404
|
+
* exercises its `main` fallback (models a `gh` that could not resolve it).
|
|
405
|
+
*/
|
|
406
|
+
defaultBranch?: string;
|
|
336
407
|
/** When set, `setBranchProtection` throws with this message (failure path). */
|
|
337
408
|
branchProtectionError?: string;
|
|
409
|
+
/** When set, `setBranchRuleset` throws with this message (failure path). */
|
|
410
|
+
branchRulesetError?: string;
|
|
338
411
|
/**
|
|
339
412
|
* The provider id this stub claims (default `github`). Tests of the
|
|
340
413
|
* project-setup seam may override to assert the orchestrator's
|
|
@@ -347,7 +420,9 @@ export class MemoryCIProviderContext implements CIProviderContext {
|
|
|
347
420
|
this.repo = options.repo;
|
|
348
421
|
this.ghAvailable = options.ghAvailable ?? false;
|
|
349
422
|
this.adminScope = options.adminScope;
|
|
423
|
+
this.defaultBranch = options.defaultBranch;
|
|
350
424
|
this.branchProtectionError = options.branchProtectionError;
|
|
425
|
+
this.branchRulesetError = options.branchRulesetError;
|
|
351
426
|
this.providerId = options.providerId ?? GITHUB_PROVIDER_ID;
|
|
352
427
|
}
|
|
353
428
|
|
|
@@ -367,10 +442,21 @@ export class MemoryCIProviderContext implements CIProviderContext {
|
|
|
367
442
|
return this.adminScope;
|
|
368
443
|
}
|
|
369
444
|
|
|
445
|
+
async getDefaultBranch(): Promise<string | undefined> {
|
|
446
|
+
return this.defaultBranch;
|
|
447
|
+
}
|
|
448
|
+
|
|
370
449
|
async setBranchProtection(branch: string, spec: unknown): Promise<void> {
|
|
371
450
|
if (this.branchProtectionError !== undefined) {
|
|
372
451
|
throw new Error(this.branchProtectionError);
|
|
373
452
|
}
|
|
374
453
|
this.branchProtections.set(branch, spec);
|
|
375
454
|
}
|
|
455
|
+
|
|
456
|
+
async setBranchRuleset(ruleset: unknown): Promise<void> {
|
|
457
|
+
if (this.branchRulesetError !== undefined) {
|
|
458
|
+
throw new Error(this.branchRulesetError);
|
|
459
|
+
}
|
|
460
|
+
this.rulesets.push(ruleset);
|
|
461
|
+
}
|
|
376
462
|
}
|
package/src/install-ci.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `install-ci` orchestrator (
|
|
2
|
+
* The `install-ci` orchestrator (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-core-and-github-adapter`): ties the provider-agnostic core
|
|
4
4
|
* (`install-ci-core.ts`) to a CI-provider adapter (the first being GitHub,
|
|
5
5
|
* `install-ci-github.ts`) through the {@link CIProviderContext} seam. It drives
|
|
@@ -252,7 +252,7 @@ export async function installCI(
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
// 5. Assemble + write the artifacts (composite setup action + auth). The
|
|
255
|
-
// project-setup escape hatch (
|
|
255
|
+
// project-setup escape hatch (spec `install-ci-project-provisioning`) lives
|
|
256
256
|
// on `config.projectSetup` as a PROVIDER-NAMESPACED, OPAQUE map; we look up
|
|
257
257
|
// THIS provider's payload via the seam (`ctx.providerId`) and ask the
|
|
258
258
|
// adapter to render it to the FIRST-steps fragment (`ctx.renderProjectSetup`).
|
|
@@ -275,7 +275,7 @@ export async function installCI(
|
|
|
275
275
|
log(` wrote ${path}`);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
// 5b. Tier-1 GitHub branch protection (
|
|
278
|
+
// 5b. Tier-1 GitHub branch protection (spec land-time-reverify-and-parallel-
|
|
279
279
|
// merge-ceiling, Story 11). Auto-configures when the credential is admin-
|
|
280
280
|
// scoped (one `gh api` PUT on the protection endpoint, required check
|
|
281
281
|
// `verify` + strict: true); prints the exact ready-to-run `gh api` command
|
|
@@ -313,7 +313,7 @@ export async function installCI(
|
|
|
313
313
|
" DORFL_AUTO_TASK: 'true'",
|
|
314
314
|
);
|
|
315
315
|
// Project-toolchain boundary (task install-ci-document-toolchain-boundary,
|
|
316
|
-
//
|
|
316
|
+
// SPEC install-ci-project-provisioning axis (A)). dorfl declares
|
|
317
317
|
// engines.node '>=18' and the generated composite action pins Node 22 only
|
|
318
318
|
// for dorfl's own runtime — it does NOT provision the project's toolchain.
|
|
319
319
|
// State that boundary explicitly so a maintainer whose project pins a
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dorfl-side wrapper around the VENDORED `incur/agents.ts` (MIT — see
|
|
3
|
+
* `./vendor/incur/`, and the ADR `docs/adr/skill-install-vendors-incur-agents-map.md`).
|
|
4
|
+
* The vendored file provides the ~22-harness destination map, `detect()`, and
|
|
5
|
+
* `install(sourceDir, options)` that copies each skill into the canonical
|
|
6
|
+
* `~/.agents/skills/` and symlinks non-universal harnesses. This module is the
|
|
7
|
+
* dorfl-authored code AROUND it: it resolves the packaged-skills SOURCE dir
|
|
8
|
+
* and drives the vendored `install()` — nothing more. Keep the vendored file
|
|
9
|
+
* untouched (byte-close to upstream) so future incur updates stay a mechanical
|
|
10
|
+
* re-copy.
|
|
11
|
+
*
|
|
12
|
+
* ## Decisions (in-scope, non-obvious)
|
|
13
|
+
*
|
|
14
|
+
* - **Sibling script over merged.** The build-time packaging lives in
|
|
15
|
+
* `scripts/vendor-skills.mjs`, a SIBLING of the existing `vendor-protocol.mjs`
|
|
16
|
+
* rather than an appended block on it. The two scripts copy DIFFERENT concept
|
|
17
|
+
* sets (contract docs vs. hand-authored skills) into different dest subtrees;
|
|
18
|
+
* each has its own set that evolves independently. See the header of
|
|
19
|
+
* `vendor-skills.mjs` for the rationale (mirrors the wording here).
|
|
20
|
+
* - **Vendored file location.** `src/vendor/incur/agents.ts` (co-located with
|
|
21
|
+
* its MIT `LICENSE` + a `README.md` provenance note). Under `src/` so `tsc`
|
|
22
|
+
* compiles it into `dist/vendor/incur/agents.js`; under `vendor/incur/` so
|
|
23
|
+
* the upstream origin is CLEAR from the path, and a future re-copy is a
|
|
24
|
+
* drop-in overwrite. All dorfl wrapper code lives OUTSIDE that directory.
|
|
25
|
+
* - **Resolver home.** {@link resolveSkillsSourceDir} lives IN this module
|
|
26
|
+
* (not in `prompt.ts` next to `resolveProtocolDoc`) because "the packaged
|
|
27
|
+
* skills source" is a concept OWNED by skill-install; `resolveProtocolDoc`
|
|
28
|
+
* is owned by the runner's prompt-assembly. Same SHAPE, different concept —
|
|
29
|
+
* duplicating the small resolver body keeps the ownership boundary clean.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import {existsSync} from 'node:fs';
|
|
33
|
+
import {dirname, resolve} from 'node:path';
|
|
34
|
+
import {fileURLToPath} from 'node:url';
|
|
35
|
+
import {install, type Agent} from './vendor/incur/agents.js';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Locate the SOURCE directory of the vendored skills the installer copies
|
|
39
|
+
* from. Resolution order, highest authority first:
|
|
40
|
+
*
|
|
41
|
+
* 1. `override` — explicit, for tests / unusual layouts (short-circuits).
|
|
42
|
+
* 2. `dist/skills/` — a copy VENDORED inside this package (by the
|
|
43
|
+
* `vendor-skills` build step). The published-CLI primary: an installed
|
|
44
|
+
* CLI has no sibling monorepo-root `skills/` tree.
|
|
45
|
+
* 3. the legacy monorepo-relative `skills/` walk — DEV-only, kept LAST (it
|
|
46
|
+
* only resolves inside this dev monorepo; an installed CLI's walks escape
|
|
47
|
+
* into the consumer's filesystem \u2192 nothing there, which is why it cannot
|
|
48
|
+
* be the primary source).
|
|
49
|
+
*
|
|
50
|
+
* Mirrors the shape of {@link import('./prompt.js').resolveProtocolDoc} — the
|
|
51
|
+
* prefer-`dist/`-then-dev-walk order. Returns the first existing candidate;
|
|
52
|
+
* when nothing exists, returns the first candidate (the caller then hits a
|
|
53
|
+
* clean ENOENT rather than a silent no-op).
|
|
54
|
+
*/
|
|
55
|
+
export function resolveSkillsSourceDir(override?: string): string {
|
|
56
|
+
if (override) {
|
|
57
|
+
return override;
|
|
58
|
+
}
|
|
59
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
60
|
+
// here = .../packages/dorfl/{src,dist}.
|
|
61
|
+
const candidates: string[] = [
|
|
62
|
+
// 2. Package-vendored copy (published-CLI primary). From `src/` (tsx)
|
|
63
|
+
// `dist/` is a sibling; from `dist/` it is the dir itself.
|
|
64
|
+
resolve(here, '..', 'dist', 'skills'),
|
|
65
|
+
resolve(here, 'skills'),
|
|
66
|
+
// 3. Legacy monorepo-root walk \u2014 DEV-only, LAST.
|
|
67
|
+
resolve(here, '..', '..', '..', 'skills'),
|
|
68
|
+
resolve(here, '..', '..', '..', '..', 'skills'),
|
|
69
|
+
];
|
|
70
|
+
for (const candidate of candidates) {
|
|
71
|
+
if (existsSync(candidate)) {
|
|
72
|
+
return candidate;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return candidates[0];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Options threaded through {@link installSkills} to the vendored `install()`.
|
|
80
|
+
* The shape mirrors incur's `install.Options` verbatim, plus a `sourceDir`
|
|
81
|
+
* override for the resolver seam. Everything is optional; a bare call
|
|
82
|
+
* `installSkills()` performs the "install every packaged skill, globally,
|
|
83
|
+
* into every detected harness" default.
|
|
84
|
+
*/
|
|
85
|
+
export interface InstallSkillsOptions {
|
|
86
|
+
/**
|
|
87
|
+
* Override the resolved packaged-skills source dir. Tests pin this to a
|
|
88
|
+
* scratch dir with fake skill folders; production callers omit it and take
|
|
89
|
+
* whatever {@link resolveSkillsSourceDir} returns.
|
|
90
|
+
*/
|
|
91
|
+
sourceDir?: string;
|
|
92
|
+
/**
|
|
93
|
+
* `false` \u21d2 project-local placement (canonical base is `<cwd>/.agents/skills/`,
|
|
94
|
+
* and non-universal harnesses use their PROJECT-relative dirs). Default
|
|
95
|
+
* `true` (or omitted) \u21d2 global placement under `~/.agents/skills/`.
|
|
96
|
+
*/
|
|
97
|
+
global?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Working directory for project-local installs. Ignored when `global` is not
|
|
100
|
+
* `false`. Defaults (in the vendored file) to `process.cwd()`.
|
|
101
|
+
*/
|
|
102
|
+
cwd?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Override the detected harnesses. Tests use this to force a deterministic
|
|
105
|
+
* set; production callers omit it and let the vendored `detect()` pick.
|
|
106
|
+
*/
|
|
107
|
+
agents?: Agent[];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The per-harness install detail returned by the vendored `install()` (for
|
|
112
|
+
* NON-UNIVERSAL harnesses only \u2014 universal harnesses read from the canonical
|
|
113
|
+
* `.agents/skills/` directly and need no per-harness entry).
|
|
114
|
+
*/
|
|
115
|
+
export interface InstalledAgent {
|
|
116
|
+
/** Harness display name (e.g. `'Claude Code'`, `'Windsurf'`). */
|
|
117
|
+
agent: string;
|
|
118
|
+
/** Absolute path the skill was placed at for this harness. */
|
|
119
|
+
path: string;
|
|
120
|
+
/** How the placement was materialised. Symlink is the norm; copy is the
|
|
121
|
+
* Windows/no-permission fallback. */
|
|
122
|
+
mode: 'symlink' | 'copy';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** The report {@link installSkills} returns to its CLI caller. */
|
|
126
|
+
export interface InstallSkillsResult {
|
|
127
|
+
/**
|
|
128
|
+
* The SOURCE directory the vendored `install()` was driven from (the value
|
|
129
|
+
* {@link resolveSkillsSourceDir} chose). Included so `dorfl skills add`
|
|
130
|
+
* can print WHERE the skills were read from, and tests can assert the
|
|
131
|
+
* resolver picked what they expected.
|
|
132
|
+
*/
|
|
133
|
+
sourceDir: string;
|
|
134
|
+
/** Canonical install paths (one per skill directory copied). */
|
|
135
|
+
paths: string[];
|
|
136
|
+
/** Per-harness placements for non-universal harnesses. */
|
|
137
|
+
agents: InstalledAgent[];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Resolve the packaged-skills source, drive the vendored `install()`, return
|
|
142
|
+
* the source + canonical paths + per-harness report. Global by default; pass
|
|
143
|
+
* `global: false` for project-local placement. Tests pin `sourceDir`/`agents`
|
|
144
|
+
* to keep the run hermetic; production callers pass nothing.
|
|
145
|
+
*
|
|
146
|
+
* The vendored `install()` reads `os.homedir()` (etc.) at MODULE LOAD, so
|
|
147
|
+
* shared-write isolation for `global: true` (the default) has to happen BEFORE
|
|
148
|
+
* this module is loaded (e.g. by pointing `HOME` at a scratch dir). Tests use
|
|
149
|
+
* `global: false` + a scratch `cwd` for the common path (no env dance needed);
|
|
150
|
+
* see `test/install-skills.test.ts`.
|
|
151
|
+
*/
|
|
152
|
+
export function installSkills(
|
|
153
|
+
options: InstallSkillsOptions = {},
|
|
154
|
+
): InstallSkillsResult {
|
|
155
|
+
const sourceDir = resolveSkillsSourceDir(options.sourceDir);
|
|
156
|
+
const result = install(sourceDir, {
|
|
157
|
+
global: options.global,
|
|
158
|
+
cwd: options.cwd,
|
|
159
|
+
agents: options.agents,
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
sourceDir,
|
|
163
|
+
paths: result.paths,
|
|
164
|
+
agents: result.agents,
|
|
165
|
+
};
|
|
166
|
+
}
|
package/src/intake-event.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* **`intake`'s PURE event-classification** (task `intake-event-classification`,
|
|
2
|
+
* **`intake`'s PURE event-classification** (task `intake-event-classification`, spec
|
|
3
3
|
* `issue-intake` US #2 — the resume-on-thread-change behaviour).
|
|
4
4
|
*
|
|
5
5
|
* `intake` is a CONVERSATION on an issue thread: a run may ASK a clarifying question
|
|
6
|
-
* and STOP, expecting a LATER run to resume from the updated thread (
|
|
6
|
+
* and STOP, expecting a LATER run to resume from the updated thread (spec "Loop
|
|
7
7
|
* closure" / the decision table's ASK row). This module is the PURE CONTROL-PATH
|
|
8
8
|
* classifier the re-run depends on: given an issue EVENT, it decides whether `intake`
|
|
9
9
|
* should RE-EVALUATE the whole thread or IGNORE the event.
|
|
10
10
|
*
|
|
11
|
-
* THE CANONICAL RULE (from
|
|
11
|
+
* THE CANONICAL RULE (from spec `issue-intake`, "The engine shape"): *"The loop
|
|
12
12
|
* re-runs on a new comment OR an issue-body edit (re-evaluate the whole thread); a
|
|
13
13
|
* buried prior-comment edit is IGNORED."*
|
|
14
14
|
*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* distinction the rule turns on is "a NEW turn vs an edit of a BURIED prior turn",
|
|
24
24
|
* NOT "edit vs reply".
|
|
25
25
|
*
|
|
26
|
-
* SCOPE FENCE (
|
|
26
|
+
* SCOPE FENCE (spec "Scope: the engine only"): this is ONLY the pure classifier. It is
|
|
27
27
|
* NOT CI's TRIGGER POLICY (command/every-issue, maintainer/anyone) — that is
|
|
28
28
|
* `runner-in-ci`'s. CI's trigger LATER CONSULTS this classifier, but the policy of
|
|
29
29
|
* WHO/WHAT may trigger lives in CI, not here. This module touches no seam, no git, no
|
|
@@ -69,10 +69,10 @@ export interface IntakeEvent {
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Classify an issue EVENT into the CONTROL-PATH decision: RE-EVALUATE the whole
|
|
72
|
-
* thread, or IGNORE the event. The PURE realisation of the
|
|
72
|
+
* thread, or IGNORE the event. The PURE realisation of the spec's canonical rule
|
|
73
73
|
* (no seam, no git, no `gh`).
|
|
74
74
|
*
|
|
75
|
-
* The table (
|
|
75
|
+
* The table (spec `issue-intake` US #2):
|
|
76
76
|
*
|
|
77
77
|
* | event kind | decision | why |
|
|
78
78
|
* | ----------------------- | ------------- | -------------------------------------------- |
|
package/src/intake-marker.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {brand} from './brand.js';
|
|
|
2
2
|
import type {IssueComment} from './issue-provider.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* **The intake MARKER** (task `intake-self-awareness-resumption-tracking`,
|
|
5
|
+
* **The intake MARKER** (task `intake-self-awareness-resumption-tracking`, spec
|
|
6
6
|
* `issue-intake` US #2/#10): the ONE primitive the deterministic pre-decision
|
|
7
7
|
* TRIAGE GATE is built on. A machine-readable HIDDEN HTML comment intake stamps on
|
|
8
8
|
* EVERY comment it posts, recording a neutral FACT about what intake did:
|
|
@@ -26,7 +26,7 @@ import type {IssueComment} from './issue-provider.js';
|
|
|
26
26
|
* TERMINAL is the TRIAGE's interpretation, NEVER data in the marker (no `terminal`
|
|
27
27
|
* field): if a kind's terminal-ness ever changes that is a triage change and old
|
|
28
28
|
* markers stay valid.
|
|
29
|
-
* - **`slug`** \u2014 present only on `kind=created` (which task/
|
|
29
|
+
* - **`slug`** \u2014 present only on `kind=created` (which task/spec intake produced).
|
|
30
30
|
* - **`seen=<id>,\u2026`** \u2014 the per-run DELTA of HUMAN comment ids intake READ this run
|
|
31
31
|
* (EXCLUDING intake's own marker-comments AND any human id already in a prior
|
|
32
32
|
* marker's `seen=`). Ids, not a count, because a count cannot distinguish "a new
|
|
@@ -47,7 +47,7 @@ export interface IntakeMarker {
|
|
|
47
47
|
kind: IntakeMarkerKind;
|
|
48
48
|
/** The HUMAN comment ids intake READ this run (the per-run delta; may be empty). */
|
|
49
49
|
seen: string[];
|
|
50
|
-
/** The created task/
|
|
50
|
+
/** The created task/spec slug \u2014 present only on `kind=created`. */
|
|
51
51
|
slug?: string;
|
|
52
52
|
}
|
|
53
53
|
|
package/src/intake-triage.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from './intake-marker.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* **The intake TRIAGE GATE** (task `intake-self-awareness-resumption-tracking`,
|
|
9
|
+
* **The intake TRIAGE GATE** (task `intake-self-awareness-resumption-tracking`, spec
|
|
10
10
|
* `issue-intake` US #2/#10): a DETERMINISTIC pre-decision gate that runs UNDER the
|
|
11
11
|
* processing lock, BEFORE the decision prompt, deciding whether intake should run
|
|
12
12
|
* the prompt at all. Built ENTIRELY on the thread MARKER (no sidecar, no cursor, no
|
|
@@ -55,7 +55,7 @@ export type IntakeTriageDecision =
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Run the TRIAGE over the issue's full comment thread (oldest-first, as
|
|
58
|
-
* `listComments` returns it). The canonical branches (
|
|
58
|
+
* `listComments` returns it). The canonical branches (spec `issue-intake`):
|
|
59
59
|
*
|
|
60
60
|
* 1. **Last comment is INTAKE's** (carries a marker). Build `seenSet` = the UNION of
|
|
61
61
|
* every intake marker's `seen=` id-list, then:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `install-ci` ISSUE-INTAKE capability (
|
|
2
|
+
* The `install-ci` ISSUE-INTAKE capability (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-intake-trigger-and-review-surface`; capability D: consider incoming
|
|
4
|
-
* issues → task/
|
|
4
|
+
* issues → task/spec, AND insertion point E: surface the review verdict back into
|
|
5
5
|
* the issue thread). This module GENERATES the one fixed intake workflow file and
|
|
6
6
|
* STRUCTURALLY VALIDATES it, mirroring the snapshot-assertion style of
|
|
7
7
|
* `advance-lifecycle-template.ts` / `advance-ci-template.ts` (the package depends on
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* ({@link deriveIntakeFlags}) — CI's merge-vs-propose POLICY, the load-bearing
|
|
11
11
|
* testable logic the workflow encodes at runtime.
|
|
12
12
|
*
|
|
13
|
-
* SCOPE FENCE (
|
|
13
|
+
* SCOPE FENCE (spec Out-of-Scope): the issue→artifact TRANSFORM engine is
|
|
14
14
|
* `issue-intake`'s (`intake <N>` + its four-outcome dispatch + the per-outcome
|
|
15
15
|
* KNOBS + the lone-task review that posts to the issue thread). CI only
|
|
16
16
|
* WIRES/SCHEDULES/INVOKES it and owns the merge-vs-propose POLICY + the delivery
|
|
17
17
|
* surface. This module emits NO transform; it emits the WORKFLOW that calls it.
|
|
18
18
|
*
|
|
19
|
-
* The discipline (
|
|
19
|
+
* The discipline (spec capability-D row + the merge-vs-propose POLICY + the two
|
|
20
20
|
* RESOLVED design decisions in the task):
|
|
21
21
|
*
|
|
22
22
|
* - TRIGGERS: `issues` opened, `issue_comment` created, and a label
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* everywhere" path is a LOUD, NON-DEFAULT opt-in — the default is conservative
|
|
37
37
|
* (propose / human-in-the-loop).
|
|
38
38
|
* - INSERTION POINT E (the issue-thread review surface): the review verdict over
|
|
39
|
-
* intake's generated
|
|
39
|
+
* intake's generated specs/tasks is surfaced into the ISSUE THREAD via the
|
|
40
40
|
* `IssueProvider.postIssueComment` seam (issue thread, by NUMBER — NOT the PR
|
|
41
41
|
* seam `postPRComment`, which is keyed by url). This is REUSED, not new:
|
|
42
42
|
* `intake <N>` already runs the lone-task review/edit loop and posts its
|
|
@@ -65,7 +65,7 @@ export const INTAKE_TRIGGER_CAPABILITY_ID = 'intake';
|
|
|
65
65
|
|
|
66
66
|
/** The wizard-facing label for the issue-intake capability. */
|
|
67
67
|
export const INTAKE_TRIGGER_CAPABILITY_LABEL =
|
|
68
|
-
'Consider incoming issues → task/
|
|
68
|
+
'Consider incoming issues → task/spec + surface the review verdict into the issue thread (the intake trigger: issues / issue_comment / label)';
|
|
69
69
|
|
|
70
70
|
/** The repo-relative path (under the output base) of the emitted workflow. */
|
|
71
71
|
export const INTAKE_TRIGGER_WORKFLOW_PATH = 'workflows/intake.yml';
|
|
@@ -106,7 +106,7 @@ export interface IntakeIntegrationFlags {
|
|
|
106
106
|
task: 'merge' | 'propose';
|
|
107
107
|
/**
|
|
108
108
|
* The ORIGIN-TRUST verdict CI passes to `intake <N>` via `--origin-trust`
|
|
109
|
-
* (task `untrusted-origin-forces-build-propose`) so the emitted
|
|
109
|
+
* (task `untrusted-origin-forces-build-propose`) so the emitted spec/task is
|
|
110
110
|
* STAMPED with how it was born. Derived from the SAME `author_association` case
|
|
111
111
|
* as the integration flags (it IS `authorTrusted` collapsed to the wire value),
|
|
112
112
|
* so the stamp and the integration mode CANNOT desync. `intake.ts` writes it
|
|
@@ -134,7 +134,7 @@ export interface IntakeGateState {
|
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* DERIVE the per-outcome merge-vs-propose flags from the gate state COMPOSED with
|
|
137
|
-
* author-trust — CI's merge-vs-propose POLICY (
|
|
137
|
+
* author-trust — CI's merge-vs-propose POLICY (spec "merge-vs-propose POLICY" +
|
|
138
138
|
* "Composed with AUTHOR-TRUST"; task Decision 1). This is the load-bearing pure
|
|
139
139
|
* logic the workflow encodes at runtime (it reads `author_association` off the
|
|
140
140
|
* event payload and sets the flags accordingly):
|
|
@@ -167,9 +167,9 @@ export function deriveIntakeFlags(options: {
|
|
|
167
167
|
// ORIGIN-TRUST stamp (task `untrusted-origin-forces-build-propose`): the SAME
|
|
168
168
|
// author-trust verdict, collapsed to the wire value `intake` stamps onto the
|
|
169
169
|
// emitted artifact. Derived HERE — next to the integration flags, off the SAME
|
|
170
|
-
// `authorTrusted` input — so the stamp and the task/
|
|
170
|
+
// `authorTrusted` input — so the stamp and the task/spec modes cannot desync.
|
|
171
171
|
// It is NOT a re-resolution of trust (CI already resolved it); it is the verdict
|
|
172
|
-
// being CARRIED so it survives the
|
|
172
|
+
// being CARRIED so it survives the spec/task merge boundary (the becomes-code
|
|
173
173
|
// checkpoint is not laundered when the file lands on main).
|
|
174
174
|
const originTrust: 'trusted' | 'untrusted' = authorTrusted
|
|
175
175
|
? 'trusted'
|
|
@@ -216,12 +216,12 @@ export function generateIntakeWorkflow(config: ResolvedCIConfig): string {
|
|
|
216
216
|
const setupWith = providerSecretsWithBlock(config);
|
|
217
217
|
return `\
|
|
218
218
|
# dorfl — the ISSUE INTAKE trigger in CI (capability D: consider incoming
|
|
219
|
-
# issues → task/
|
|
220
|
-
# issue thread,
|
|
219
|
+
# issues → task/spec, PLUS insertion point E: surface the review verdict into the
|
|
220
|
+
# issue thread, spec runner-in-ci). EMITTED by \`dorfl install-ci\`; the human
|
|
221
221
|
# commits it. DO NOT hand-edit a copy — re-run install-ci to upgrade the shell.
|
|
222
222
|
#
|
|
223
223
|
# WHAT IT DOES — \`dorfl intake <N>\` reads issue #N + its comment thread,
|
|
224
|
-
# runs a prompt→verdict decision (ask / task /
|
|
224
|
+
# runs a prompt→verdict decision (ask / task / SPEC / bounce), and dispatches it.
|
|
225
225
|
# CI owns ONLY the trigger + the merge-vs-propose POLICY + the delivery surface;
|
|
226
226
|
# the TRANSFORM is the engine's (the Out-of-Scope fence — CI re-implements none of
|
|
227
227
|
# it). The lone-task review/edit loop \`intake\` already runs ALSO surfaces its
|
|
@@ -307,7 +307,7 @@ env:
|
|
|
307
307
|
# permissive merge side; author-trust then forces propose for a task from an
|
|
308
308
|
# untrusted author.
|
|
309
309
|
DORFL_AUTO_BUILD: 'false' # gate: will an agent auto-build the emitted task next?
|
|
310
|
-
DORFL_AUTO_TASK: 'false' # gate: will an agent auto-task the emitted
|
|
310
|
+
DORFL_AUTO_TASK: 'false' # gate: will an agent auto-task the emitted spec next?
|
|
311
311
|
|
|
312
312
|
jobs:
|
|
313
313
|
intake:
|
|
@@ -317,7 +317,7 @@ jobs:
|
|
|
317
317
|
if: \${{ github.event.issue.number && !github.event.issue.pull_request }}
|
|
318
318
|
runs-on: ubuntu-latest
|
|
319
319
|
steps:
|
|
320
|
-
- uses: actions/checkout@
|
|
320
|
+
- uses: actions/checkout@v5
|
|
321
321
|
with:
|
|
322
322
|
fetch-depth: 0
|
|
323
323
|
- uses: ./.github/actions/dorfl-setup${setupWith}
|
|
@@ -365,8 +365,8 @@ jobs:
|
|
|
365
365
|
|
|
366
366
|
# ORIGIN-TRUST stamp (task untrusted-origin-forces-build-propose):
|
|
367
367
|
# derived from the SAME \${trusted} case above (one author-trust read,
|
|
368
|
-
# two consumers — the task/
|
|
369
|
-
# desync). \`intake\` STAMPS this onto the emitted
|
|
368
|
+
# two consumers — the task/spec modes AND the stamp — so they cannot
|
|
369
|
+
# desync). \`intake\` STAMPS this onto the emitted spec/task frontmatter
|
|
370
370
|
# (origin: issue + originTrust: <value>); it does NOT re-resolve trust
|
|
371
371
|
# (that is CI's policy, passed IN). The stamp SURVIVES the merge boundary
|
|
372
372
|
# so a later auto-task/auto-build of an untrusted-origin artifact still
|
|
@@ -519,7 +519,7 @@ export function validateIntakeWorkflow(text: string): IntakeTriggerValidation {
|
|
|
519
519
|
), 'the policy derivation must be able to emit `--propose-spec` (autoTask on).');
|
|
520
520
|
// ORIGIN-TRUST stamp (task untrusted-origin-forces-build-propose): the shell
|
|
521
521
|
// must derive `--origin-trust <trusted|untrusted>` from the SAME author-trust
|
|
522
|
-
// case it uses for the task/
|
|
522
|
+
// case it uses for the task/SPEC modes, and pass it to `intake` so the emitted
|
|
523
523
|
// artifact is stamped (the stamp + the modes cannot desync).
|
|
524
524
|
require('derives-origin-trust-untrusted', /--origin-trust=untrusted\b/.test(
|
|
525
525
|
operative,
|