dorfl 0.1.2 → 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-drivers.d.ts +1 -1
- package/dist/advance-drivers.d.ts.map +1 -1
- package/dist/advance-drivers.js +15 -3
- package/dist/advance-drivers.js.map +1 -1
- package/dist/advance-lifecycle-template.d.ts.map +1 -1
- package/dist/advance-lifecycle-template.js +76 -4
- package/dist/advance-lifecycle-template.js.map +1 -1
- package/dist/advance-treeless-publish.d.ts +23 -0
- 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 +59 -7
- package/dist/advance.d.ts.map +1 -1
- package/dist/advance.js +389 -82
- package/dist/advance.js.map +1 -1
- package/dist/advancing-lock.d.ts +30 -2
- package/dist/advancing-lock.d.ts.map +1 -1
- package/dist/advancing-lock.js +50 -0
- 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 +17 -3
- package/dist/apply-decide.d.ts.map +1 -1
- package/dist/apply-decide.js +36 -7
- package/dist/apply-decide.js.map +1 -1
- package/dist/apply-merge-action.d.ts +17 -5
- package/dist/apply-merge-action.d.ts.map +1 -1
- package/dist/apply-merge-action.js +43 -8
- package/dist/apply-merge-action.js.map +1 -1
- package/dist/apply-persist.d.ts +57 -26
- package/dist/apply-persist.d.ts.map +1 -1
- package/dist/apply-persist.js +166 -37
- 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/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 +320 -63
- package/dist/cli.js.map +1 -1
- package/dist/close-job-template.js +1 -1
- package/dist/complete.d.ts +6 -3
- package/dist/complete.d.ts.map +1 -1
- package/dist/complete.js +91 -37
- package/dist/complete.js.map +1 -1
- package/dist/config.d.ts +55 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +56 -4
- package/dist/config.js.map +1 -1
- package/dist/continue-branch.d.ts.map +1 -1
- package/dist/continue-branch.js +22 -0
- package/dist/continue-branch.js.map +1 -1
- package/dist/decision-engine.d.ts +38 -10
- 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.map +1 -1
- package/dist/do-autopick.js +11 -1
- package/dist/do-autopick.js.map +1 -1
- package/dist/do-config.d.ts +1 -1
- package/dist/do.d.ts +49 -56
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +419 -30
- package/dist/do.js.map +1 -1
- package/dist/env-config.d.ts.map +1 -1
- package/dist/env-config.js +12 -4
- 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 +10 -27
- package/dist/format.js.map +1 -1
- package/dist/frontmatter.d.ts +16 -4
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +27 -1
- 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 +132 -38
- package/dist/install-ci-branch-protection.d.ts.map +1 -1
- package/dist/install-ci-branch-protection.js +190 -48
- package/dist/install-ci-branch-protection.js.map +1 -1
- package/dist/install-ci-core.d.ts +21 -1
- package/dist/install-ci-core.d.ts.map +1 -1
- package/dist/install-ci-core.js +10 -3
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +32 -0
- package/dist/install-ci-github.d.ts.map +1 -1
- package/dist/install-ci-github.js +73 -0
- package/dist/install-ci-github.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-trigger-template.js +1 -1
- package/dist/intake.d.ts +17 -4
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +23 -7
- package/dist/intake.js.map +1 -1
- package/dist/integration-core.d.ts +10 -7
- package/dist/integration-core.d.ts.map +1 -1
- package/dist/integration-core.js +174 -60
- 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 +2 -2
- package/dist/isolation.d.ts.map +1 -1
- package/dist/isolation.js +9 -0
- package/dist/isolation.js.map +1 -1
- package/dist/item-lock.d.ts +196 -129
- package/dist/item-lock.d.ts.map +1 -1
- package/dist/item-lock.js +329 -254
- package/dist/item-lock.js.map +1 -1
- package/dist/ledger-write.d.ts +31 -26
- 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 +17 -0
- package/dist/lifecycle-gather.d.ts.map +1 -1
- package/dist/lifecycle-gather.js +7 -1
- package/dist/lifecycle-gather.js.map +1 -1
- package/dist/lifecycle-pools.d.ts +40 -3
- package/dist/lifecycle-pools.d.ts.map +1 -1
- package/dist/lifecycle-pools.js +26 -6
- package/dist/lifecycle-pools.js.map +1 -1
- package/dist/merge-question-surfacer.d.ts +15 -1
- package/dist/merge-question-surfacer.d.ts.map +1 -1
- package/dist/merge-question-surfacer.js +18 -3
- 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/needs-attention.d.ts +293 -16
- package/dist/needs-attention.d.ts.map +1 -1
- package/dist/needs-attention.js +532 -57
- package/dist/needs-attention.js.map +1 -1
- package/dist/orphan-sidecar.d.ts +8 -4
- 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 +3 -3
- package/dist/placement.js +1 -1
- 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/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/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 +5 -0
- 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 +53 -7
- 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-verdict.js +1 -1
- package/dist/review-verdict.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +54 -19
- package/dist/run.js.map +1 -1
- package/dist/scan.d.ts +17 -8
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +22 -8
- package/dist/scan.js.map +1 -1
- package/dist/select-priority.d.ts +2 -2
- package/dist/select-priority.js +1 -1
- 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 +45 -10
- package/dist/sidecar.d.ts.map +1 -1
- package/dist/sidecar.js +82 -2
- 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 +5 -5
- package/dist/slug-namespace.js +5 -5
- package/dist/slug-namespace.js.map +1 -1
- package/dist/spec-complete.d.ts.map +1 -1
- package/dist/spec-complete.js +2 -3
- package/dist/spec-complete.js.map +1 -1
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +51 -57
- package/dist/start.js.map +1 -1
- 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.js +1 -1
- package/dist/surface-persist.js.map +1 -1
- package/dist/tasker-review-loop.d.ts +4 -3
- package/dist/tasker-review-loop.d.ts.map +1 -1
- package/dist/tasker-review-loop.js.map +1 -1
- package/dist/tasking-lock.d.ts +2 -2
- package/dist/tasking-lock.d.ts.map +1 -1
- package/dist/tasking-lock.js +53 -32
- package/dist/tasking-lock.js.map +1 -1
- package/dist/tasking.d.ts +40 -6
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +224 -12
- package/dist/tasking.js.map +1 -1
- package/dist/triage-persist.d.ts +10 -6
- package/dist/triage-persist.d.ts.map +1 -1
- package/dist/triage-persist.js +34 -4
- 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.js +1 -1
- 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 +7 -3
- package/dist/work-layout.d.ts.map +1 -1
- package/dist/work-layout.js +6 -3
- package/dist/work-layout.js.map +1 -1
- package/dist/workspace.d.ts +1 -1
- package/package.json +2 -2
- package/src/advance-drivers.ts +16 -3
- package/src/advance-lifecycle-template.ts +89 -4
- package/src/advance-treeless-publish.ts +45 -0
- package/src/advance.ts +467 -87
- package/src/advancing-lock.ts +96 -1
- package/src/agent-launch.ts +37 -12
- package/src/agent-stop.ts +60 -2
- package/src/apply-decide.ts +36 -7
- package/src/apply-merge-action.ts +45 -7
- package/src/apply-persist.ts +228 -54
- package/src/apply-stuck-action.ts +260 -0
- package/src/brand.ts +14 -2
- package/src/cli-spinner.ts +1 -1
- package/src/cli.ts +401 -70
- package/src/close-job-template.ts +1 -1
- package/src/complete.ts +110 -52
- package/src/config.ts +107 -13
- package/src/continue-branch.ts +22 -0
- package/src/decision-engine.ts +55 -17
- package/src/do-autopick.ts +12 -1
- package/src/do-config.ts +1 -1
- package/src/do.ts +511 -38
- package/src/env-config.ts +12 -4
- package/src/failure-cause.ts +30 -1
- package/src/format.ts +10 -30
- package/src/frontmatter.ts +35 -5
- 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 +282 -57
- package/src/install-ci-core.ts +30 -3
- package/src/install-ci-github.ts +86 -0
- package/src/install-skills.ts +166 -0
- package/src/intake-trigger-template.ts +1 -1
- package/src/intake.ts +46 -11
- package/src/integration-core.ts +199 -65
- package/src/integrator.ts +22 -9
- package/src/isolation.ts +11 -2
- package/src/item-lock.ts +485 -341
- package/src/ledger-write.ts +135 -150
- package/src/lifecycle-gather.ts +29 -6
- package/src/lifecycle-pools.ts +67 -9
- package/src/merge-question-surfacer.ts +28 -4
- package/src/migrate-stuck-locks.ts +451 -0
- package/src/needs-attention.ts +857 -84
- package/src/orphan-sidecar.ts +47 -6
- package/src/pi-harness.ts +82 -2
- package/src/placement.ts +3 -3
- package/src/prd-to-spec.ts +13 -5
- package/src/reap-branches.ts +38 -14
- package/src/recover-isolated.ts +17 -0
- package/src/repo-config.ts +55 -6
- package/src/repo-mirror.ts +23 -1
- package/src/review-verdict.ts +1 -1
- package/src/run.ts +64 -18
- package/src/scan.ts +22 -8
- package/src/select-priority.ts +3 -3
- package/src/sidecar-apply.ts +1 -1
- package/src/sidecar.ts +138 -11
- package/src/slug-namespace.ts +7 -7
- package/src/spec-complete.ts +2 -3
- package/src/start.ts +53 -59
- package/src/surface-gate.ts +10 -3
- package/src/surface-persist.ts +1 -1
- package/src/tasker-review-loop.ts +4 -3
- package/src/tasking-lock.ts +52 -36
- package/src/tasking.ts +261 -17
- package/src/triage-persist.ts +56 -12
- 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 +1 -1
- package/src/watch-session.ts +102 -7
- package/src/work-layout.ts +6 -3
- package/src/workspace.ts +1 -1
package/src/decision-engine.ts
CHANGED
|
@@ -20,7 +20,7 @@ import {extractJsonObjectSpan} from './verdict-json.js';
|
|
|
20
20
|
* "the INPUT adapter differs per front door and is NOT forced to be shared").
|
|
21
21
|
* - **the ALLOWED-OUTCOME SET** ({@link decide}'s `allowedOutcomes`): each caller
|
|
22
22
|
* passes the SUBSET of {@link DecisionOutcome} it permits — advance-apply allows
|
|
23
|
-
* `{task |
|
|
23
|
+
* `{task | spec | adr | dispose | ask}`, intake keeps its own `{task | spec | ask |
|
|
24
24
|
* bounce}` (intake is NOT refactored onto this engine here — decision 13). The
|
|
25
25
|
* engine never hard-codes which outcomes a caller permits; it only VALIDATES the
|
|
26
26
|
* returned verdict against the set and rejects (loudly) one outside it
|
|
@@ -43,8 +43,23 @@ import {extractJsonObjectSpan} from './verdict-json.js';
|
|
|
43
43
|
* - **adr** — mint an adr from the input (NO caller wires this yet; the keystone's
|
|
44
44
|
* allowed set will, and `agentic-apply-mint-adr-route` adds the route — decision
|
|
45
45
|
* 14 keeps the engine agnostic so this is added without re-architecting).
|
|
46
|
-
* - **
|
|
47
|
-
*
|
|
46
|
+
* - **dispose** — DISPOSE the SOURCE the input is about, POLYMORPHIC on the
|
|
47
|
+
* source's regime (spec `surface-stuck-as-questions-and-retire-stuck-lock-state`
|
|
48
|
+
* resolved decision #5; task
|
|
49
|
+
* `apply-disposition-delete-to-dispose-regime-polymorphic`): an OBSERVATION is
|
|
50
|
+
* `git rm`-ed (notes leave by deletion, decision 12); a TASK is `git mv`-ed to
|
|
51
|
+
* its regime's won't-proceed terminal `tasks/cancelled/` (RETAINED — a task
|
|
52
|
+
* cannot be hard-deleted by the apply rung, only disposed to its terminal); a
|
|
53
|
+
* SPEC is `git mv`-ed to `specs/dropped/` (RETAINED). Making the token
|
|
54
|
+
* polymorphic (rather than adding a second `cancel` beside a literal `delete`)
|
|
55
|
+
* makes "a task cannot be deleted, only disposed to its terminal" true BY
|
|
56
|
+
* CONSTRUCTION.
|
|
57
|
+
* - **resolve** — the answer SETTLES the item with NO artifact to mint and the
|
|
58
|
+
* note RETAINED: route to the apply persist's resolve-fully path (harvest the
|
|
59
|
+
* answers into the body, clear `needsAnswers`, delete the sidecar) so the
|
|
60
|
+
* already-answered question stops re-surfacing. The SIBLING of `dispose` (both
|
|
61
|
+
* end the question-loop minting nothing), but `resolve` KEEPS the note whereas
|
|
62
|
+
* `dispose` drops-or-terminals it (task `apply-decide-resolve-verdict-mint-nothing`).
|
|
48
63
|
* - **ask** — ask the operator a follow-up (re-pause; the conversation
|
|
49
64
|
* accumulates — decision 5).
|
|
50
65
|
*
|
|
@@ -52,17 +67,23 @@ import {extractJsonObjectSpan} from './verdict-json.js';
|
|
|
52
67
|
* {@link decide}. The engine is agnostic to which subset a caller permits.
|
|
53
68
|
*/
|
|
54
69
|
// MIGRATE step (spec `prd-to-spec-vocabulary-cutover-and-migration-command`): the
|
|
55
|
-
// parent-spec verdict outcome is `'spec'` (renamed from
|
|
70
|
+
// parent-spec verdict outcome is `'spec'` (renamed from ''prd''); the decider
|
|
56
71
|
// prompt emits it and the parser accepts it. This is a fresh per-call LLM verdict
|
|
57
|
-
// (nothing
|
|
58
|
-
export type DecisionOutcome =
|
|
72
|
+
// (nothing ''prd''-valued is persisted), so the rename needs no on-disk alias.
|
|
73
|
+
export type DecisionOutcome =
|
|
74
|
+
| 'task'
|
|
75
|
+
| 'spec'
|
|
76
|
+
| 'adr'
|
|
77
|
+
| 'dispose'
|
|
78
|
+
| 'resolve'
|
|
79
|
+
| 'ask';
|
|
59
80
|
|
|
60
81
|
/**
|
|
61
82
|
* The VERDICT the decider returns — the chosen {@link DecisionOutcome} plus the
|
|
62
83
|
* DRAFTED content for that outcome (the analogue of {@link IntakeVerdict}). Every
|
|
63
84
|
* content field is OPTIONAL on the shape: a given verdict only fills the channels
|
|
64
85
|
* its outcome consumes (a `task` fills the task channels, an `ask` fills
|
|
65
|
-
* `question`, a `
|
|
86
|
+
* `question`, a `dispose` may carry only a `reason`). The dispatching CALLER
|
|
66
87
|
* decides which channels it requires for each outcome it allows — the engine only
|
|
67
88
|
* guards the `outcome` discriminator against the allowed set, never the content
|
|
68
89
|
* (it stays outcome-agnostic).
|
|
@@ -93,11 +114,24 @@ export interface DecisionVerdict {
|
|
|
93
114
|
/** The drafted adr BODY (`adr` outcome) — the markdown AFTER the frontmatter. */
|
|
94
115
|
adrBody?: string;
|
|
95
116
|
/**
|
|
96
|
-
* The reason the source should be
|
|
97
|
-
*
|
|
98
|
-
*
|
|
117
|
+
* The reason the source should be DISPOSED (`dispose` outcome) — carried by
|
|
118
|
+
* the caller into the regime-polymorphic disposal: an OBSERVATION's reason
|
|
119
|
+
* rides the revertible git-rm commit message (decision 12: notes leave by
|
|
120
|
+
* deletion, git history = archive); a TASK/SPEC's reason is written into the
|
|
121
|
+
* moved item's `reason:` frontmatter so the durable body records why the
|
|
122
|
+
* item won't proceed (the file is RETAINED at the regime's terminal —
|
|
123
|
+
* `tasks/cancelled/` or `specs/dropped/`).
|
|
99
124
|
*/
|
|
100
|
-
|
|
125
|
+
disposeReason?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Why the item is settled with NOTHING to mint (`resolve` outcome) — the
|
|
128
|
+
* SIBLING of {@link disposeReason}, but the note is RETAINED (the apply rung
|
|
129
|
+
* routes this to the resolve-fully path, which harvests the answers into the
|
|
130
|
+
* body rather than deleting the note). The reason is advisory context for the
|
|
131
|
+
* human/reviewer; the durable disposition record is the `## Applied answers`
|
|
132
|
+
* block the resolve-fully path writes.
|
|
133
|
+
*/
|
|
134
|
+
resolveReason?: string;
|
|
101
135
|
/**
|
|
102
136
|
* The drafted follow-up question(s) (`ask` outcome) — the caller appends them
|
|
103
137
|
* to the conversation and re-pauses (decision 5: reuse the existing
|
|
@@ -200,7 +234,7 @@ export async function decide<TInput>(
|
|
|
200
234
|
* object carrying an `"outcome"` field via the SHARED {@link extractJsonObjectSpan}
|
|
201
235
|
* (the same extractor every prompt→verdict→dispatch seam in this package uses —
|
|
202
236
|
* NOT a forked copy), `JSON.parse`s it, and validates the shape:
|
|
203
|
-
* `outcome ∈ {task,spec,adr,
|
|
237
|
+
* `outcome ∈ {task,spec,adr,dispose,resolve,ask}`.
|
|
204
238
|
*
|
|
205
239
|
* This validates the verdict is a WELL-FORMED member of the SUPERSET; the
|
|
206
240
|
* caller-specific allowed-outcome guard ({@link decide}) then rejects one outside
|
|
@@ -235,12 +269,13 @@ export function parseDecisionVerdict(output: string): DecisionVerdict {
|
|
|
235
269
|
outcome !== 'task' &&
|
|
236
270
|
outcome !== 'spec' &&
|
|
237
271
|
outcome !== 'adr' &&
|
|
238
|
-
outcome !== '
|
|
272
|
+
outcome !== 'dispose' &&
|
|
273
|
+
outcome !== 'resolve' &&
|
|
239
274
|
outcome !== 'ask'
|
|
240
275
|
) {
|
|
241
276
|
throw new Error(
|
|
242
|
-
`decision verdict 'outcome' was not one of task|spec|adr|
|
|
243
|
-
|
|
277
|
+
`decision verdict 'outcome' was not one of task|spec|adr|dispose|resolve|ask ` +
|
|
278
|
+
`(got ${JSON.stringify(outcome)}).`,
|
|
244
279
|
);
|
|
245
280
|
}
|
|
246
281
|
// Map the per-outcome fields onto the verdict shape, keeping ONLY the strings
|
|
@@ -264,8 +299,11 @@ export function parseDecisionVerdict(output: string): DecisionVerdict {
|
|
|
264
299
|
...(str(obj.adrSlug) !== undefined ? {adrSlug: str(obj.adrSlug)} : {}),
|
|
265
300
|
...(str(obj.adrTitle) !== undefined ? {adrTitle: str(obj.adrTitle)} : {}),
|
|
266
301
|
...(str(obj.adrBody) !== undefined ? {adrBody: str(obj.adrBody)} : {}),
|
|
267
|
-
...(str(obj.
|
|
268
|
-
? {
|
|
302
|
+
...(str(obj.disposeReason) !== undefined
|
|
303
|
+
? {disposeReason: str(obj.disposeReason)}
|
|
304
|
+
: {}),
|
|
305
|
+
...(str(obj.resolveReason) !== undefined
|
|
306
|
+
? {resolveReason: str(obj.resolveReason)}
|
|
269
307
|
: {}),
|
|
270
308
|
...(str(obj.question) !== undefined ? {question: str(obj.question)} : {}),
|
|
271
309
|
};
|
package/src/do-autopick.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {performDo, type DoOptions, type DoResult} from './do.js';
|
|
2
2
|
import {scanRepoPaths} from './scan.js';
|
|
3
|
+
import {heldTaskSlugs} from './item-lock.js';
|
|
3
4
|
import {ledgerRead, type LedgerReadStrategy} from './ledger-read.js';
|
|
4
5
|
import {
|
|
5
6
|
selectPrioritised,
|
|
@@ -105,6 +106,16 @@ export async function performDoAuto(
|
|
|
105
106
|
const cwd = options.cwd;
|
|
106
107
|
const count = options.count ?? 1;
|
|
107
108
|
|
|
109
|
+
// Held-slug subtraction (task
|
|
110
|
+
// `in-place-scan-subtracts-held-locked-slugs-from-propose-matrix`): read the
|
|
111
|
+
// coordination arbiter's held task-lock refs and pass them into `scanRepoPaths`
|
|
112
|
+
// so a held item (state `active`/`stuck`) does not enter the item pool NOR the
|
|
113
|
+
// lifecycle surface/apply pools. `heldTaskSlugs` is the GRACEFUL variant (empty
|
|
114
|
+
// set on any read fault): the follow-on claim CAS is still the load-bearing
|
|
115
|
+
// safety net locally — this subtraction is a courtesy that avoids selecting an
|
|
116
|
+
// item that would immediately lose its claim race.
|
|
117
|
+
const heldSlugs = await heldTaskSlugs(cwd, options.arbiter, options.env);
|
|
118
|
+
|
|
108
119
|
// Pool 1 — eligible TASKS via the EXISTING scan/select path (task-only).
|
|
109
120
|
// Thread `override` so the per-machine override is applied per repo (the
|
|
110
121
|
// inner `resolveRepoConfig` re-applies it AFTER the committed file, restoring
|
|
@@ -112,7 +123,7 @@ export async function performDoAuto(
|
|
|
112
123
|
const report = scanRepoPaths(
|
|
113
124
|
[cwd],
|
|
114
125
|
options.config,
|
|
115
|
-
|
|
126
|
+
heldSlugs,
|
|
116
127
|
options.override,
|
|
117
128
|
);
|
|
118
129
|
|
package/src/do-config.ts
CHANGED
|
@@ -375,7 +375,7 @@ export function surfaceBlockersFlagOverrides(
|
|
|
375
375
|
|
|
376
376
|
/**
|
|
377
377
|
* **The cross-job merge-serialiser CAS-retry cap CLI flag** (`--merge-retries
|
|
378
|
-
* <n>`) —
|
|
378
|
+
* <n>`) — spec `land-time-reverify-and-parallel-merge-ceiling` Story 5 / Applied
|
|
379
379
|
* Answer q1 (a). The git-alone FLOOR of the cross-job land-queue; a wide-matrix
|
|
380
380
|
* CI raises the cap so more contenders converge before any spurious bounce to
|
|
381
381
|
* needs-attention. Offered by `do`/`run`/`complete`. Resolved through the SAME
|