dorfl 0.1.0 → 0.1.2
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 +7 -7
- package/dist/advance-drivers.d.ts.map +1 -1
- package/dist/advance-drivers.js +5 -5
- 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.js +9 -9
- 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 +1 -1
- package/dist/advance.d.ts +11 -11
- package/dist/advance.d.ts.map +1 -1
- package/dist/advance.js +21 -21
- package/dist/advance.js.map +1 -1
- package/dist/advancing-lock.d.ts +1 -1
- package/dist/advancing-lock.js +5 -5
- package/dist/apply-decide.d.ts +2 -2
- package/dist/apply-decide.js +2 -2
- package/dist/apply-merge-action.d.ts +4 -4
- package/dist/apply-merge-action.js +2 -2
- package/dist/apply-persist.d.ts +5 -5
- package/dist/apply-persist.d.ts.map +1 -1
- package/dist/apply-persist.js +7 -7
- package/dist/apply-persist.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.d.ts.map +1 -1
- package/dist/cli.js +83 -77
- package/dist/cli.js.map +1 -1
- package/dist/close-job-template.d.ts +3 -3
- package/dist/close-job-template.js +8 -8
- 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 +3 -3
- package/dist/complete.js +8 -8
- 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 +32 -32
- package/dist/config.js +5 -5
- package/dist/config.js.map +1 -1
- package/dist/continue-branch.d.ts +1 -1
- package/dist/continue-branch.js +1 -1
- package/dist/cwd-section.js +1 -1
- package/dist/cwd-section.js.map +1 -1
- package/dist/decision-engine.d.ts +2 -2
- package/dist/do-autopick.d.ts +6 -6
- package/dist/do-autopick.d.ts.map +1 -1
- package/dist/do-autopick.js +5 -5
- package/dist/do-autopick.js.map +1 -1
- package/dist/do-config.d.ts +3 -3
- 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 +25 -25
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +22 -22
- package/dist/do.js.map +1 -1
- package/dist/drop-source.d.ts +2 -2
- package/dist/env-config.js +8 -8
- package/dist/env-config.js.map +1 -1
- package/dist/format.js +3 -3
- package/dist/format.js.map +1 -1
- package/dist/frontmatter.d.ts +33 -39
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +18 -31
- package/dist/frontmatter.js.map +1 -1
- package/dist/install-ci-branch-protection.d.ts +1 -1
- package/dist/install-ci-branch-protection.js +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 +3 -3
- package/dist/install-ci-core.js +2 -2
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +1 -1
- package/dist/install-ci-github.js +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/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 +16 -16
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts +50 -50
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +70 -70
- package/dist/intake.js.map +1 -1
- package/dist/integration-core.d.ts +17 -17
- package/dist/integration-core.js +17 -17
- package/dist/integration-core.js.map +1 -1
- package/dist/isolation.d.ts +3 -3
- package/dist/issue-provider.d.ts +4 -4
- package/dist/issue-provider.js +1 -1
- package/dist/item-lock.d.ts +21 -21
- package/dist/item-lock.d.ts.map +1 -1
- package/dist/item-lock.js +16 -16
- 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 +2 -2
- package/dist/ledger-write.js +1 -1
- package/dist/lifecycle-gather.d.ts +1 -1
- package/dist/lifecycle-gather.js +16 -16
- package/dist/lifecycle-gather.js.map +1 -1
- package/dist/lifecycle-pools.d.ts +4 -4
- package/dist/lifecycle-pools.js +1 -1
- package/dist/merge-question-surfacer.d.ts +3 -3
- package/dist/merge-question-surfacer.js +2 -2
- package/dist/merge-question-surfacer.js.map +1 -1
- 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 +13 -13
- package/dist/needs-attention.d.ts.map +1 -1
- package/dist/needs-attention.js +11 -11
- package/dist/needs-attention.js.map +1 -1
- package/dist/orphan-sidecar.d.ts +2 -2
- package/dist/placement.d.ts +6 -6
- package/dist/placement.js +2 -2
- package/dist/prd-to-spec.d.ts +15 -1
- package/dist/prd-to-spec.d.ts.map +1 -1
- package/dist/prd-to-spec.js +36 -14
- package/dist/prd-to-spec.js.map +1 -1
- package/dist/prompt.d.ts +24 -24
- package/dist/prompt.d.ts.map +1 -1
- package/dist/prompt.js +29 -31
- package/dist/prompt.js.map +1 -1
- package/dist/protocol/CLAIM-PROTOCOL.md +4 -4
- package/dist/protocol/REVIEW-PROTOCOL.md +1 -1
- package/dist/protocol/TASKING-PROTOCOL.md +12 -12
- package/dist/protocol/WORK-CONTRACT.md +39 -39
- package/dist/protocol/spec-template.md +1 -1
- package/dist/protocol/task-template.md +3 -3
- package/dist/readiness.d.ts +1 -1
- package/dist/recover-isolated.js +1 -1
- package/dist/repo-config.js +12 -12
- package/dist/repo-config.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 +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +5 -5
- package/dist/run.js.map +1 -1
- package/dist/scan.d.ts +10 -10
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +8 -8
- package/dist/scan.js.map +1 -1
- package/dist/select-order.d.ts +1 -1
- package/dist/select-priority.d.ts +12 -12
- 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.d.ts +2 -2
- package/dist/sidecar.js +2 -2
- package/dist/sidecar.js.map +1 -1
- package/dist/slug-namespace.d.ts +1 -1
- package/dist/slug-namespace.js +3 -3
- package/dist/slug-namespace.js.map +1 -1
- package/dist/spec-complete.js +2 -2
- package/dist/spec-complete.js.map +1 -1
- package/dist/start.d.ts +1 -1
- package/dist/start.js +3 -3
- 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-persist.d.ts +2 -2
- package/dist/surface-persist.d.ts.map +1 -1
- package/dist/tasker-review-loop.d.ts +8 -8
- 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 +8 -8
- package/dist/tasking-lock.d.ts.map +1 -1
- package/dist/tasking-lock.js +20 -21
- package/dist/tasking-lock.js.map +1 -1
- package/dist/tasking.d.ts +33 -33
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +89 -88
- package/dist/tasking.js.map +1 -1
- package/dist/triage-gate.d.ts +1 -1
- package/dist/triage-persist.d.ts +5 -5
- package/dist/triage-persist.js +15 -15
- package/dist/triage-persist.js.map +1 -1
- package/dist/verify-workflow-template.d.ts +1 -1
- package/dist/verify-workflow-template.js +2 -2
- package/dist/work-layout.d.ts +9 -7
- package/dist/work-layout.d.ts.map +1 -1
- package/dist/work-layout.js +9 -7
- package/dist/work-layout.js.map +1 -1
- package/dist/workspace.d.ts +1 -1
- package/package.json +1 -1
- package/src/advance-ci-template.ts +4 -4
- package/src/advance-classify.ts +5 -5
- package/src/advance-drivers.ts +10 -10
- package/src/advance-isolated.ts +3 -3
- package/src/advance-lifecycle-template.ts +9 -9
- package/src/advance-loop-driver.ts +3 -3
- package/src/advance-treeless-publish.ts +1 -1
- package/src/advance.ts +30 -30
- package/src/advancing-lock.ts +6 -6
- package/src/apply-decide.ts +2 -2
- package/src/apply-merge-action.ts +5 -5
- package/src/apply-persist.ts +8 -8
- package/src/buildable-body.ts +14 -14
- package/src/claim-cas.ts +4 -4
- package/src/cli.ts +94 -84
- package/src/close-job-template.ts +8 -8
- package/src/close-job.ts +26 -26
- package/src/complete.ts +11 -11
- package/src/concurrency.ts +1 -1
- package/src/config.ts +37 -37
- package/src/continue-branch.ts +1 -1
- package/src/cwd-section.ts +1 -1
- package/src/decision-engine.ts +3 -3
- package/src/do-autopick.ts +9 -9
- package/src/do-config.ts +6 -6
- package/src/do-remote-auto.ts +2 -2
- package/src/do.ts +49 -49
- package/src/drop-source.ts +2 -2
- package/src/env-config.ts +8 -8
- package/src/format.ts +3 -3
- package/src/frontmatter.ts +42 -60
- package/src/install-ci-branch-protection.ts +1 -1
- 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 +4 -4
- package/src/install-ci-github.ts +1 -1
- package/src/install-ci.ts +4 -4
- 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 +17 -17
- package/src/intake.ts +97 -97
- package/src/integration-core.ts +35 -35
- package/src/isolation.ts +3 -3
- package/src/issue-provider.ts +4 -4
- package/src/item-lock.ts +21 -21
- 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 +3 -3
- package/src/lifecycle-gather.ts +16 -16
- package/src/lifecycle-pools.ts +4 -4
- package/src/merge-question-surfacer.ts +4 -4
- package/src/mint-adr.ts +4 -4
- package/src/mirror-pool-scan.ts +5 -5
- package/src/needs-attention.ts +22 -22
- package/src/orphan-sidecar.ts +2 -2
- package/src/placement.ts +6 -6
- package/src/prd-to-spec.ts +51 -15
- package/src/prompt.ts +33 -35
- package/src/readiness.ts +1 -1
- package/src/recover-isolated.ts +1 -1
- package/src/repo-config.ts +12 -12
- package/src/review-gate.ts +12 -11
- package/src/review-verdict.ts +2 -2
- package/src/run.ts +6 -6
- package/src/scan.ts +15 -15
- package/src/select-order.ts +1 -1
- package/src/select-priority.ts +13 -13
- package/src/sidecar.ts +3 -3
- package/src/slug-namespace.ts +3 -3
- package/src/spec-complete.ts +2 -2
- package/src/start.ts +4 -4
- package/src/status.ts +7 -7
- package/src/surface-gate.ts +2 -2
- package/src/surface-persist.ts +2 -2
- package/src/tasker-review-loop.ts +15 -15
- package/src/tasking-eligibility.ts +21 -21
- package/src/tasking-lock.ts +27 -28
- package/src/tasking.ts +124 -123
- package/src/triage-gate.ts +1 -1
- package/src/triage-persist.ts +16 -16
- package/src/verify-workflow-template.ts +2 -2
- package/src/work-layout.ts +9 -7
- package/src/workspace.ts +1 -1
package/dist/tasking-lock.js
CHANGED
|
@@ -2,19 +2,19 @@ import { runAsync } from './git.js';
|
|
|
2
2
|
import { acquireItemLock, releaseItemLock, markStuckItemLock, } from './item-lock.js';
|
|
3
3
|
import { workItemRel } from './work-layout.js';
|
|
4
4
|
/**
|
|
5
|
-
* The **tasking concurrency lock** (
|
|
5
|
+
* The **tasking concurrency lock** (spec `auto-slice`, task `autoslice-lock`).
|
|
6
6
|
*
|
|
7
|
-
* Serialises *concurrent* taskers (two CI runs, or human + CI) so a
|
|
7
|
+
* Serialises *concurrent* taskers (two CI runs, or human + CI) so a spec is never
|
|
8
8
|
* double-tasked. As of the capstone cut-over (task
|
|
9
|
-
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`,
|
|
9
|
+
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, spec
|
|
10
10
|
* `ledger-status-per-item-lock-refs`; ADR `ledger-status-on-per-item-lock-refs`)
|
|
11
|
-
* the legacy `git mv work/
|
|
11
|
+
* the legacy `git mv work/specs/ready/<slug>.md → work/tasking/<slug>.md` MARKER on `main`
|
|
12
12
|
* is GONE: the body NEVER relocates until the durable promotion, exactly as claim
|
|
13
13
|
* no longer moves the task body (task
|
|
14
14
|
* `cutover-claim-body-stays-and-complete-sources-from-backlog`). The tasking lock
|
|
15
15
|
* is now ONLY the UNIFIED per-item lock (`refs/dorfl/lock/<entry>`,
|
|
16
|
-
* `action: task`, keyed `
|
|
17
|
-
* the same item, so tasking a
|
|
16
|
+
* `action: task`, keyed `spec:<slug>`) — the SAME ref claim and advance use for
|
|
17
|
+
* the same item, so tasking a spec is mutually exclusive with claiming/advancing
|
|
18
18
|
* the SAME item BY CONSTRUCTION (the second acquirer loses the SAME create-only
|
|
19
19
|
* ref CAS, with NO retry budget and NO false contention). There is no transient
|
|
20
20
|
* status in `main`'s tree anymore, so a work branch cut from `main` inherits no
|
|
@@ -24,9 +24,9 @@ import { workItemRel } from './work-layout.js';
|
|
|
24
24
|
* A `lost` (the item is already held for implement/task/advance) makes the
|
|
25
25
|
* tasking acquire lose DEFINITIVELY (exit 2, no retry). On a successful acquire
|
|
26
26
|
* it returns {@link AcquireTaskingLockResult.lockedBlob}: the git blob sha of the
|
|
27
|
-
*
|
|
27
|
+
* spec body the lock TOOK, read from `work/specs/ready/<slug>.md` on the arbiter — the
|
|
28
28
|
* snapshot the tasker reads + tasks from, handed back so the integrate
|
|
29
|
-
* transition can fail loud if the held
|
|
29
|
+
* transition can fail loud if the held spec was edited concurrently (the
|
|
30
30
|
* read-stability backstop). A dry-run takes no lock (it mutates nothing).
|
|
31
31
|
*
|
|
32
32
|
* - **Release** ({@link releaseTaskingLock}) DELETES the unified lock ref. It
|
|
@@ -46,11 +46,11 @@ import { workItemRel } from './work-layout.js';
|
|
|
46
46
|
* The READ-STABILITY backstop (the content-identity stale check that used to live
|
|
47
47
|
* in the release, comparing the held `work/tasking/<slug>.md` blob against the
|
|
48
48
|
* acquire-time snapshot) now lives at the integrate seam (`tasking.ts`
|
|
49
|
-
* `heldSpecIsStale`, comparing `work/
|
|
49
|
+
* `heldSpecIsStale`, comparing `work/specs/ready/<slug>.md`) — relocated because the
|
|
50
50
|
* completing transition, not the release, owns the commit. See
|
|
51
51
|
* `work/notes/observations/tasking-lock-does-not-stabilise-prd-content.md`.
|
|
52
52
|
*
|
|
53
|
-
* This module provides the lock PRIMITIVES only. The orchestrating `do
|
|
53
|
+
* This module provides the lock PRIMITIVES only. The orchestrating `do spec:<slug>`
|
|
54
54
|
* tasking command (`tasking.ts`) acquires, drives the agent's tasking, integrates
|
|
55
55
|
* the emitted tasks + the durable `prd → prd-tasked` move, and releases. The
|
|
56
56
|
* human path (no contention) may task on `main` directly without the lock.
|
|
@@ -94,12 +94,12 @@ async function runAcquire(options, note) {
|
|
|
94
94
|
throw new TaskingLockUsageError(`no git remote named '${arbiter}' (set one, or pass --arbiter)`);
|
|
95
95
|
}
|
|
96
96
|
const by = options.by || (await resolveBy(cwd, env));
|
|
97
|
-
// Is the
|
|
97
|
+
// Is the spec still lockable (present in work/specs/ready/ on the arbiter's main)?
|
|
98
98
|
await gitHard(['fetch', '--quiet', arbiter], cwd, env);
|
|
99
99
|
const spec = workItemRel('specs-ready', `${slug}.md`);
|
|
100
100
|
const specBlob = await gitSoft(['rev-parse', `${arbiter}/main:${spec}`], cwd, env);
|
|
101
101
|
if (specBlob.status !== 0) {
|
|
102
|
-
const message = `'${spec}' not found on ${arbiter}/main (no such
|
|
102
|
+
const message = `'${spec}' not found on ${arbiter}/main (no such spec, or it was already moved/tasked).`;
|
|
103
103
|
note(message);
|
|
104
104
|
return { exitCode: 2, outcome: 'lost', message };
|
|
105
105
|
}
|
|
@@ -111,18 +111,17 @@ async function runAcquire(options, note) {
|
|
|
111
111
|
note(message);
|
|
112
112
|
return { exitCode: 0, outcome: 'acquired', message, lockedBlob };
|
|
113
113
|
}
|
|
114
|
-
// Acquire the UNIFIED per-item lock (`action: task`, keyed `
|
|
114
|
+
// Acquire the UNIFIED per-item lock (`action: task`, keyed `spec:<slug>` so it
|
|
115
115
|
// shares the ONE ref with claim/advance of the SAME item). A create-only ref
|
|
116
116
|
// CAS: the winner holds it, the loser is DEFINITIVELY `lost` (exit 2, no retry
|
|
117
117
|
// budget). No auto-steal of an orphaned lock, consistent with claim/advance and
|
|
118
118
|
// the ADR's recovery model (no liveness heartbeat / auto-sweep; a human asserts
|
|
119
119
|
// a lock is dead via `release-lock` + `gc --ledger`).
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
// `prd:<slug
|
|
125
|
-
// contract task removes the legacy form.
|
|
120
|
+
// Spec `prd-to-spec-vocabulary-cutover-and-migration-command`: the parent-spec
|
|
121
|
+
// item identity is `spec:<slug>`, so the unified per-item lock ref is
|
|
122
|
+
// `refs/dorfl/lock/spec-<slug>`. HARD CUTOVER: the legacy `prd:<slug>` identity
|
|
123
|
+
// is GONE — the resolver no longer treats `prd:` as the spec namespace (a
|
|
124
|
+
// `prd:<slug>` arg is a bare literal task slug now).
|
|
126
125
|
const lock = await acquireItemLock({
|
|
127
126
|
item: `spec:${slug}`,
|
|
128
127
|
action: 'task',
|
|
@@ -146,7 +145,7 @@ async function runAcquire(options, note) {
|
|
|
146
145
|
* Release the tasking lock for `slug`: DELETE the unified `action: task` lock ref
|
|
147
146
|
* (idempotent — an already-absent ref is a clean `released`). It moves NO lifecycle
|
|
148
147
|
* file: the durable `prd → prd-tasked` success move is owned by the integrate band,
|
|
149
|
-
* and the
|
|
148
|
+
* and the spec body never left `work/specs/ready/` under the lock, so there is no
|
|
150
149
|
* `tasking/ → prd/` restore.
|
|
151
150
|
*
|
|
152
151
|
* When `routeToNeedsAttention` is set (the tasker decomposition-unclear verdict /
|
|
@@ -188,7 +187,7 @@ async function runRelease(options, note) {
|
|
|
188
187
|
}
|
|
189
188
|
// DECOMPOSITION-UNCLEAR / TASK-GATE BLOCK: amend the lock `active → stuck` with
|
|
190
189
|
// the reason on the entry (the tasking needs-attention surface), NOT delete it.
|
|
191
|
-
// The
|
|
190
|
+
// The spec body stays in `work/specs/ready/`; the stuck lock keeps it out of the
|
|
192
191
|
// taskable pool until a human resolves it (`release-lock`/`resume`).
|
|
193
192
|
if (options.routeToNeedsAttention !== undefined) {
|
|
194
193
|
// MIGRATE: EMIT `spec:<slug>` (keyed to the `spec-<slug>` lock entry).
|
package/dist/tasking-lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasking-lock.js","sourceRoot":"","sources":["../src/tasking-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAiB,MAAM,UAAU,CAAC;AAClD,OAAO,EACN,eAAe,EACf,eAAe,EACf,iBAAiB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,MAAM,eAAe,GAAG,QAAQ,CAAC;AA+CjC,oDAAoD;AACpD,MAAM,qBAAsB,SAAQ,KAAK;CAAG;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,OAAkC;IAElC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACxC,IAAI,CAAC;QACJ,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,IAAI,GAAG,YAAY,qBAA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AM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IACD,MAAM,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAC7B,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;AACnC,CAAC;AAED,sEAAsE;AACtE,SAAS,OAAO,CACf,IAAc,EACd,GAAW,EACX,GAAkC;IAElC,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,GAAG,EAAC,CAAC,CAAC;AAC1C,CAAC;AAED,2EAA2E;AAC3E,KAAK,UAAU,OAAO,CACrB,IAAc,EACd,GAAW,EACX,GAAkC;IAElC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,GAAG,EAAC,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACd,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,MAAM,CAAC,MAAM,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
package/dist/tasking.d.ts
CHANGED
|
@@ -5,44 +5,44 @@ import { type Harness } from './harness.js';
|
|
|
5
5
|
import { type TaskReviewGate } from './tasker-review-loop.js';
|
|
6
6
|
import type { ReviewGate } from './review-gate.js';
|
|
7
7
|
/**
|
|
8
|
-
* The **`do
|
|
8
|
+
* The **`do spec:<slug>` tasking path** (spec `auto-slice`, task
|
|
9
9
|
* `autoslice-command`) — the orchestration that ties the tasking GATE
|
|
10
10
|
* (`tasking-eligibility.ts`) and the tasking LOCK (`tasking-lock.ts`) together to
|
|
11
|
-
* task a
|
|
11
|
+
* task a spec into `work/tasks/backlog/` STAGED items (task
|
|
12
12
|
* `pre-backlog-staging-folder-and-promote-step-a` — the runner-owned promotion
|
|
13
13
|
* moves them `pre-backlog/ → backlog/` later), with the RUNNER owning every git-state
|
|
14
|
-
* transition. This is the
|
|
14
|
+
* transition. This is the spec branch of the `do` worker (ADR
|
|
15
15
|
* `command-surface-and-journeys.md` §3/§3a), NOT a standalone `task` command;
|
|
16
|
-
* `do.ts` dispatches `resolved.namespace === '
|
|
16
|
+
* `do.ts` dispatches `resolved.namespace === 'spec'` here.
|
|
17
17
|
*
|
|
18
18
|
* The end-to-end flow (mirroring the `do`/`run` runner-owns-git discipline — the
|
|
19
19
|
* agent only EDITS files, the runner does ALL git):
|
|
20
20
|
*
|
|
21
|
-
* 1. **Resolve the gate** (agent path): refuse to task a
|
|
22
|
-
* `humanOnly`/`needsAnswers`, or whose `taskedAfter`
|
|
21
|
+
* 1. **Resolve the gate** (agent path): refuse to task a spec that is
|
|
22
|
+
* `humanOnly`/`needsAnswers`, or whose `taskedAfter` specs are not yet tasked.
|
|
23
23
|
* The repo's `autoTask` POLICY also refuses on the AUTO-PICK pool path, but
|
|
24
|
-
* NOT when the
|
|
24
|
+
* NOT when the spec was named EXPLICITLY (`do spec:<slug>`, `explicit: true`):
|
|
25
25
|
* naming it IS the authorization, exactly as `do <task>` builds regardless of
|
|
26
26
|
* `autoBuild` (the pool, not the explicit claim, gates the policy). The HUMAN
|
|
27
27
|
* path is unbound by the gate entirely.
|
|
28
28
|
* 2. **Acquire the lock** (agent path) via the unified per-item lock CAS —
|
|
29
|
-
* serialising concurrent taskers on the `
|
|
30
|
-
* `work/
|
|
29
|
+
* serialising concurrent taskers on the `spec:<slug>` ref (the body STAYS in
|
|
30
|
+
* `work/specs/ready/`; the lock no longer moves it). The HUMAN path with no contention
|
|
31
31
|
* may task on `main` directly WITHOUT the lock.
|
|
32
|
-
* 3. **Invoke the agent harness** with the `to-task`
|
|
32
|
+
* 3. **Invoke the agent harness** with the `to-task` spec — the agent runs the
|
|
33
33
|
* tasker methodology and produces `work/tasks/backlog/<slug>.md` FILES ONLY; it does
|
|
34
34
|
* NOT commit/push/move (the same in-band boundary as the build agent).
|
|
35
35
|
* 4. **The runner integrates the COMPLETING transition through the SHARED core**
|
|
36
36
|
* (`performIntegration`, task `slice-output-through-integration`): the agent's
|
|
37
37
|
* tasking runs on a `work/<slug>` branch cut from `<arbiter>/main` (whose base
|
|
38
|
-
* holds the
|
|
39
|
-
*
|
|
38
|
+
* holds the spec in `work/specs/ready/`), and the produced backlog tasks + the durable
|
|
39
|
+
* spec lifecycle move (`work/specs/ready/ → work/specs/tasked/`)
|
|
40
40
|
* integrate via the band honoring `--propose` (push the branch + open a
|
|
41
41
|
* PR, NO `main` touch) / `--merge` (land on `main`). Because the integrate-time
|
|
42
42
|
* args resolve ONCE in the shared core, EVERY `do task:` integrate arg applies
|
|
43
|
-
* to `do
|
|
43
|
+
* to `do spec:` by construction. A content-identity STALE CHECK (the lock's
|
|
44
44
|
* read-stability backstop) fires FIRST against the acquire-time `lockedBlob`,
|
|
45
|
-
* so a concurrent edit of the held
|
|
45
|
+
* so a concurrent edit of the held spec still fails loud (`stale`).
|
|
46
46
|
*
|
|
47
47
|
* The tasking LOCK (`tasking-lock.ts`, `acquireTaskingLock`/`releaseTaskingLock`)
|
|
48
48
|
* is the UNIFIED per-item lock (`refs/dorfl/lock/<entry>`, `action: task`)
|
|
@@ -54,12 +54,12 @@ import type { ReviewGate } from './review-gate.js';
|
|
|
54
54
|
* does NOT build the no-human confidence routing — that is the review/edit loop
|
|
55
55
|
* owned by `slicer-review-edit-loop`; this path produces + integrates the tasks.
|
|
56
56
|
*/
|
|
57
|
-
/** The terminal status of one `do
|
|
57
|
+
/** The terminal status of one `do spec:<slug>` tasking run. */
|
|
58
58
|
export type TaskOutcome = 'tasked' | 'gate-refused' | 'lock-lost' | 'agent-failed' | 'stale' | 'needs-attention' | 'usage-error';
|
|
59
59
|
export interface TaskResult {
|
|
60
60
|
exitCode: 0 | 1 | 2 | 3 | 4;
|
|
61
61
|
outcome: TaskOutcome;
|
|
62
|
-
/** The
|
|
62
|
+
/** The spec slug acted on. */
|
|
63
63
|
slug: string;
|
|
64
64
|
/** Repo-relative paths of the backlog tasks the runner committed. */
|
|
65
65
|
emitted?: string[];
|
|
@@ -67,7 +67,7 @@ export interface TaskResult {
|
|
|
67
67
|
* The tasker review→edit LOOP's disposition (`slicer-review-edit-loop`), when
|
|
68
68
|
* the loop ran. `converged` = the improved tasks landed; `uncertain-tasks` =
|
|
69
69
|
* the cap was hit and specific tasks landed `needsAnswers: true`; absent when
|
|
70
|
-
* no loop ran or the
|
|
70
|
+
* no loop ran or the spec was routed to needs-attention (`outcome:
|
|
71
71
|
* 'needs-attention'`).
|
|
72
72
|
*/
|
|
73
73
|
loop?: 'converged' | 'uncertain-tasks';
|
|
@@ -75,8 +75,8 @@ export interface TaskResult {
|
|
|
75
75
|
message: string;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* The agent invocation: runs the `to-task`
|
|
79
|
-
* `work/tasks/backlog/<slug>.md` task files (and trimming the
|
|
78
|
+
* The agent invocation: runs the `to-task` spec in `cwd`, WRITING
|
|
79
|
+
* `work/tasks/backlog/<slug>.md` task files (and trimming the spec). It does NO git —
|
|
80
80
|
* the runner captures the produced files and commits them.
|
|
81
81
|
*/
|
|
82
82
|
export type TaskDorfl = (input: {
|
|
@@ -94,7 +94,7 @@ export interface TaskingLockSeam {
|
|
|
94
94
|
release(options: ReleaseTaskingLockOptions): Promise<ReleaseTaskingLockResult>;
|
|
95
95
|
}
|
|
96
96
|
export interface PerformTaskOptions {
|
|
97
|
-
/** The
|
|
97
|
+
/** The spec slug to task (`work/specs/ready/<slug>.md`). */
|
|
98
98
|
slug: string;
|
|
99
99
|
/** The working clone/checkout the tasking runs in. */
|
|
100
100
|
cwd: string;
|
|
@@ -109,16 +109,16 @@ export interface PerformTaskOptions {
|
|
|
109
109
|
/** Per-repo `autoTask` policy (resolved by `autoslice-gate`). Agent path only. */
|
|
110
110
|
autoTask?: boolean;
|
|
111
111
|
/**
|
|
112
|
-
* The
|
|
113
|
-
* `autoTask` POLICY is already satisfied — naming the
|
|
112
|
+
* The spec was named EXPLICITLY by the operator (`do spec:<slug>`), so the
|
|
113
|
+
* `autoTask` POLICY is already satisfied — naming the spec IS the authorization,
|
|
114
114
|
* EXACTLY as `do <task>` builds a named task regardless of `autoBuild` (the
|
|
115
115
|
* build path's precedent: `autoBuild` gates the scan/selection POOL only, never
|
|
116
116
|
* `performDo`'s explicit claim). When `true`, the agent tasking gate drops the
|
|
117
|
-
* `autoTask` policy term and binds ONLY the
|
|
117
|
+
* `autoTask` policy term and binds ONLY the spec's own readiness axes
|
|
118
118
|
* (`humanOnly`/`needsAnswers`) + `taskedAfter`. Defaults `false`. Both the
|
|
119
|
-
* explicit `do
|
|
119
|
+
* explicit `do spec:` dispatch AND the auto-pick path pass `true` here: the
|
|
120
120
|
* auto-pick POOL (`do-autopick.ts`) is the single `autoTask`-enforcement point
|
|
121
|
-
* (a pool-ineligible
|
|
121
|
+
* (a pool-ineligible spec is never selected), so once a spec is dispatched its
|
|
122
122
|
* policy is already settled. Agent path only.
|
|
123
123
|
*/
|
|
124
124
|
explicit?: boolean;
|
|
@@ -140,7 +140,7 @@ export interface PerformTaskOptions {
|
|
|
140
140
|
* with (task `slice-output-through-integration`): `propose` (default — push the
|
|
141
141
|
* `work/<slug>` branch + open a PR carrying the tasks, NO `main` touch) or
|
|
142
142
|
* `merge` (land them on `main`). Resolved ONCE in {@link performIntegration},
|
|
143
|
-
* so EVERY `do task:` integrate-time arg applies to `do
|
|
143
|
+
* so EVERY `do task:` integrate-time arg applies to `do spec:` by construction.
|
|
144
144
|
* The AGENT path only; the human path commits its own output. Defaults to the
|
|
145
145
|
* system default (`propose`).
|
|
146
146
|
*/
|
|
@@ -165,7 +165,7 @@ export interface PerformTaskOptions {
|
|
|
165
165
|
* task-path mirror of the build Gate-2, riding {@link performIntegration}'s
|
|
166
166
|
* review-before-integrate block. When `review` resolves on, a FRESH-CONTEXT
|
|
167
167
|
* agent reviews the WHOLE produced task SET (coherence / dependency graph /
|
|
168
|
-
* gaps + overlap /
|
|
168
|
+
* gaps + overlap / spec-goal correct-if-implemented) BEFORE the tasks integrate;
|
|
169
169
|
* `approve` lands them, `block` routes the set to needs-attention. It is
|
|
170
170
|
* controlled by the BUILD `--review`/`--no-review`/`--review-model` family (ONE
|
|
171
171
|
* gate-configuration story shared with the build path) and is ONE-SHOT —
|
|
@@ -186,7 +186,7 @@ export interface PerformTaskOptions {
|
|
|
186
186
|
/** Injectable lock seam (tests stub acquire/release). Defaults to the real CAS. */
|
|
187
187
|
lock?: TaskingLockSeam;
|
|
188
188
|
/**
|
|
189
|
-
* **The per-repo TASK-PLACEMENT default** (
|
|
189
|
+
* **The per-repo TASK-PLACEMENT default** (spec
|
|
190
190
|
* `staging-pool-position-gate-and-trust-model` US #5, task
|
|
191
191
|
* `runner-deterministic-slice-placement-policy-and-precedence`). The
|
|
192
192
|
* resolved per-repo default landing for the tasker's emitted tasks, fed as
|
|
@@ -209,13 +209,13 @@ export interface PerformTaskOptions {
|
|
|
209
209
|
*/
|
|
210
210
|
explicitTasksLandIn?: 'pre-backlog' | 'ready';
|
|
211
211
|
/**
|
|
212
|
-
* **The tasker review→edit→converge LOOP** (`slicer-review-edit-loop`, GATES
|
|
213
|
-
* `work/
|
|
212
|
+
* **The tasker review→edit→converge LOOP** (`slicer-review-edit-loop`, GATES spec
|
|
213
|
+
* `work/specs/ready/review.md` RESOLVED DESIGN — Shape 2 / insertion point A). When
|
|
214
214
|
* provided, AFTER the agent produces candidate tasks (step 3) and BEFORE the
|
|
215
215
|
* runner finalises them (step 4), run the `review` SKILL as a review→edit→
|
|
216
216
|
* re-review loop that IMPROVES the candidate tasks in place, then routes the
|
|
217
217
|
* verdict through the three outcomes (converge→land / uncertain-task→
|
|
218
|
-
* needsAnswers / decomposition-unclear→
|
|
218
|
+
* needsAnswers / decomposition-unclear→spec-to-needs-attention). The seam is the
|
|
219
219
|
* review+edit gate (tests inject a canned verdict+edits; production:
|
|
220
220
|
* {@link harnessTaskReviewGate}). Omitted ⇒ NO loop (the candidate tasks land
|
|
221
221
|
* as-is — the pre-loop behaviour). The HUMAN path is unaffected (the loop runs
|
|
@@ -254,7 +254,7 @@ export interface PerformTaskOptions {
|
|
|
254
254
|
note?: (message: string) => void;
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
|
-
* **The STAGED-TASKS dir** (
|
|
257
|
+
* **The STAGED-TASKS dir** (spec `staging-pool-position-gate-and-trust-model`,
|
|
258
258
|
* task `pre-backlog-staging-folder-and-promote-step-a`, governing ADR
|
|
259
259
|
* `placement-is-runner-deterministic-humanonly-is-agent-judgement`). The runner
|
|
260
260
|
* lands the tasker's emitted task files HERE, NOT in `work/tasks/ready/`: an item
|
|
@@ -266,7 +266,7 @@ export interface PerformTaskOptions {
|
|
|
266
266
|
*/
|
|
267
267
|
export declare const STAGED_TASKS_DIR: string;
|
|
268
268
|
/**
|
|
269
|
-
* Run the `do
|
|
269
|
+
* Run the `do spec:<slug>` tasking path end-to-end. Never throws for the expected
|
|
270
270
|
* gate-refused / lock-lost / agent-failed / stale cases — those are returned with
|
|
271
271
|
* the appropriate exit code and outcome. The runner owns all git; the agent only
|
|
272
272
|
* writes task files.
|
package/dist/tasking.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasking.d.ts","sourceRoot":"","sources":["../src/tasking.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAKpD,OAAO,EAGN,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,MA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