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
|
@@ -26,7 +26,7 @@ import type {
|
|
|
26
26
|
} from './run.js';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* The **`advance` LOOP DRIVER** (
|
|
29
|
+
* The **`advance` LOOP DRIVER** (spec `advance-loop`, task
|
|
30
30
|
* `advance-drivers-and-gates`, US #7/22/26/31) — the second of the two drivers
|
|
31
31
|
* over the substrate-agnostic advance TICK. Where the one-shot driver
|
|
32
32
|
* (`advance-drivers.ts`) runs the tick over named item(s) SEQUENTIALLY, this
|
|
@@ -113,7 +113,7 @@ export interface AdvanceOnceOptions {
|
|
|
113
113
|
|
|
114
114
|
/** One advanced item's result + the identity it was for (input order preserved). */
|
|
115
115
|
export interface AdvanceBatchItem {
|
|
116
|
-
/** The namespaced arg the tick was run on (`
|
|
116
|
+
/** The namespaced arg the tick was run on (`spec:<slug>` / bare slug). */
|
|
117
117
|
arg: string;
|
|
118
118
|
/** The tick's result, or a captured throw mapped to a usage-error result. */
|
|
119
119
|
result: AdvanceResult;
|
|
@@ -549,7 +549,7 @@ export interface AdvanceRunTickDeps extends Omit<
|
|
|
549
549
|
* Adapt the {@link advanceOnce} LOOP DRIVER to the {@link RunTick} swap SEAM so
|
|
550
550
|
* `run` (≡ CI, US #7) drives the ADVANCE tick over the mirror-side eligible pool
|
|
551
551
|
* instead of the build tick. `run.ts` deliberately writes {@link runLoop} against
|
|
552
|
-
* {@link RunTick} (NOT against `runOnce`) precisely so the advance-loop
|
|
552
|
+
* {@link RunTick} (NOT against `runOnce`) precisely so the advance-loop spec can
|
|
553
553
|
* swap the tick WITHOUT re-architecting the loop — this is that swap.
|
|
554
554
|
*
|
|
555
555
|
* The seam is `(RunOnceOptions) => Promise<RunOnceResult>`; one advance batch is
|
|
@@ -34,7 +34,7 @@ import {runAsync} from './git.js';
|
|
|
34
34
|
*
|
|
35
35
|
* **C2 rebase-until-real-conflict (task `c2-rebase-until-real-on-durable-main-
|
|
36
36
|
* promotions`).** This same `HEAD:main` push carries the won't-proceed terminal
|
|
37
|
-
* `tasks/ready → tasks/cancelled` / `
|
|
37
|
+
* `tasks/ready → tasks/cancelled` / `specs/ready → specs/dropped` (slug-RELOCATION
|
|
38
38
|
* family) when `apply-persist.ts` resolves a `dropped` disposition; under sustained
|
|
39
39
|
* parallel load on the shared `main` ref two DIFFERENT items' concurrent promotions
|
|
40
40
|
* can falsely-contend even though nothing tree-conflicts, exhausting a small fixed
|
package/src/advance.ts
CHANGED
|
@@ -70,9 +70,9 @@ import type {VerifyConfig} from './verify.js';
|
|
|
70
70
|
import type {NewQuestion} from './sidecar.js';
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* The **`advance` verb SKELETON** (
|
|
73
|
+
* The **`advance` verb SKELETON** (spec `advance-loop`, task
|
|
74
74
|
* `advance-verb-resolver`, US #1/5/6/18). `advance` is the SIBLING top-level verb
|
|
75
|
-
* (NOT a `do` subcommand — `do` subcommands are REJECTED in the
|
|
75
|
+
* (NOT a `do` subcommand — `do` subcommands are REJECTED in the spec) that drives
|
|
76
76
|
* a `work/` item ONE lifecycle rung toward "ready/built", reusing the SAME shared
|
|
77
77
|
* `prefix:arg` resolver `do` uses (extended with the `obs:` namespace, see
|
|
78
78
|
* {@link resolveAdvanceArg}).
|
|
@@ -96,7 +96,7 @@ import type {NewQuestion} from './sidecar.js';
|
|
|
96
96
|
* (`advance-rung-surface`), `apply` (`advance-rung-apply`), and
|
|
97
97
|
* `triage-observation` (`advance-rung-triage`) dispatch through the clearly-named
|
|
98
98
|
* executor SEAM ({@link RungExecutor}); the build/task rungs ORCHESTRATE
|
|
99
|
-
* `do`/`do
|
|
99
|
+
* `do`/`do spec:`. What this verb does NOT do (LATER tasks):
|
|
100
100
|
* - The two **DRIVERS** (one-shot sequential / loop) + `-n` + the gate-FAMILY
|
|
101
101
|
* WIRING that resolves `autoBuild`/`autoTask`/`observationTriage` and threads
|
|
102
102
|
* them into the build/task gate composition — task `advance-drivers-and-gates`.
|
|
@@ -144,7 +144,7 @@ export type AdvanceExitCode = 0 | 1 | 2 | 3;
|
|
|
144
144
|
* The injectable rung-executor SEAM — WHAT happens once the tick has classified a
|
|
145
145
|
* rung AND won the `advancing` lock. It is the boundary between the skeleton (this
|
|
146
146
|
* task) and the rung bodies (later tasks): the surface/apply/triage rungs are
|
|
147
|
-
* filled by their own tasks; the build/task rungs ORCHESTRATE `do`/`do
|
|
147
|
+
* filled by their own tasks; the build/task rungs ORCHESTRATE `do`/`do spec:`.
|
|
148
148
|
*
|
|
149
149
|
* Production wires {@link defaultRungExecutor}; tests inject a spy to assert the
|
|
150
150
|
* classify→lock→dispatch ORDER (and that a CAS loser never reaches the executor).
|
|
@@ -164,7 +164,7 @@ export interface RungExecutor {
|
|
|
164
164
|
|
|
165
165
|
/** What a rung executor is handed: the resolved identity + the run context. */
|
|
166
166
|
export interface RungExecInput {
|
|
167
|
-
/** The canonical namespaced identity (`task:<slug>` / `
|
|
167
|
+
/** The canonical namespaced identity (`task:<slug>` / `spec:<slug>` / `observation:<slug>`). */
|
|
168
168
|
item: string;
|
|
169
169
|
/** The resolved namespace (`task` / `prd` / `observation`). */
|
|
170
170
|
namespace: SlugNamespace;
|
|
@@ -172,7 +172,7 @@ export interface RungExecInput {
|
|
|
172
172
|
slug: string;
|
|
173
173
|
/** The classification that selected this rung (the two signals are visible). */
|
|
174
174
|
classification: TickClassification;
|
|
175
|
-
/** The tick's run context (cwd, arbiter, …) — threaded to `do`/`do
|
|
175
|
+
/** The tick's run context (cwd, arbiter, …) — threaded to `do`/`do spec:`. */
|
|
176
176
|
context: AdvanceContext;
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -250,14 +250,14 @@ export interface AdvanceContext {
|
|
|
250
250
|
* The AGENTIC apply DECISION seam (task
|
|
251
251
|
* `agentic-apply-retire-disposition-vocabulary`): the fresh-context decision
|
|
252
252
|
* agent the apply rung runs on a fully-answered OBSERVATION to choose what to DO
|
|
253
|
-
* with the signal (`mint-task | mint-
|
|
253
|
+
* with the signal (`mint-task | mint-spec | mint-adr | delete-source |
|
|
254
254
|
* ask-follow-up`),
|
|
255
255
|
* grounded in the source's full context. It is the injected
|
|
256
256
|
* {@link ApplyDecider} the shared `decide(input, allowedOutcomes)` engine runs;
|
|
257
257
|
* tests inject a CANNED verdict (no model). `undefined` ⇒ the apply rung defaults
|
|
258
258
|
* to {@link harnessApplyDecider} (a NullHarness, no real model) so the seam is
|
|
259
259
|
* never a crash — but the CLI threads the real harness-backed decider. The
|
|
260
|
-
* verdict's type SELECTION (task vs
|
|
260
|
+
* verdict's type SELECTION (task vs spec vs adr) replaces the retired `promote-*`
|
|
261
261
|
* disposition token; `adr` is now WIRED (task `agentic-apply-mint-adr-route`).
|
|
262
262
|
*/
|
|
263
263
|
applyDecide?: ApplyDecider;
|
|
@@ -325,7 +325,7 @@ export interface AdvanceContext {
|
|
|
325
325
|
* to the dispatcher, so an answered `kind: merge` entry is REFUSED (clean
|
|
326
326
|
* surfacing); the answer stays for a follow-up. The registry-set advance
|
|
327
327
|
* driver threads the resolved `workspacesDir` here.
|
|
328
|
-
* (
|
|
328
|
+
* (spec `land-time-reverify-and-parallel-merge-ceiling`, task
|
|
329
329
|
* `apply-rung-merge-disposition`)
|
|
330
330
|
*/
|
|
331
331
|
workspacesDir?: string;
|
|
@@ -353,7 +353,7 @@ export interface AdvanceContext {
|
|
|
353
353
|
/**
|
|
354
354
|
* Resolved `strictMergeApproval` boolean (sibling task
|
|
355
355
|
* `strict-merge-approval-gate`). Default OFF ⇒ honour the prior approval +
|
|
356
|
-
* land on a green re-verify (cheap, the
|
|
356
|
+
* land on a green re-verify (cheap, the SPEC-applied OQ6 default). ON ⇒
|
|
357
357
|
* re-surface the merge-question when the merge-base moved between the
|
|
358
358
|
* surfacer's question and this apply (the host-agnostic analogue of
|
|
359
359
|
* GitHub's "dismiss stale approvals when the base changes").
|
|
@@ -377,7 +377,7 @@ export interface AdvanceContext {
|
|
|
377
377
|
/** The options one `advance` tick consumes. */
|
|
378
378
|
export interface AdvanceOptions extends AdvanceContext {
|
|
379
379
|
/**
|
|
380
|
-
* The raw CLI slug argument: bare (= task), `task:<slug>`, `
|
|
380
|
+
* The raw CLI slug argument: bare (= task), `task:<slug>`, `spec:<slug>`, or
|
|
381
381
|
* `obs:<slug>` / `observation:<slug>`. Omit/empty ⇒ the bare eligible-SET form,
|
|
382
382
|
* which needs the driver task (a clear error here — see `## Decisions`).
|
|
383
383
|
*/
|
|
@@ -420,7 +420,7 @@ export interface ItemSignals {
|
|
|
420
420
|
export interface ReadSignalsInput {
|
|
421
421
|
/** The repo working-tree root. */
|
|
422
422
|
repoPath: string;
|
|
423
|
-
/** The item type (task /
|
|
423
|
+
/** The item type (task / spec / observation). */
|
|
424
424
|
type: SidecarType;
|
|
425
425
|
/** The bare slug. */
|
|
426
426
|
slug: string;
|
|
@@ -469,14 +469,14 @@ export function readItemSignals(input: ReadSignalsInput): ItemSignals {
|
|
|
469
469
|
* The lifecycle folders each item type may rest in (frontmatter source). After
|
|
470
470
|
* the capstone cut-over (task
|
|
471
471
|
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`) the transient
|
|
472
|
-
* `tasking/` folder is GONE — a
|
|
473
|
-
* `
|
|
474
|
-
* `
|
|
472
|
+
* `tasking/` folder is GONE — a spec rests in `specs/ready` (source) or
|
|
473
|
+
* `specs/tasked` (tasked); while it is being tasked the body STAYS in
|
|
474
|
+
* `specs/ready` (the lock no longer moves it), so `tasking/` is never a
|
|
475
475
|
* frontmatter source.
|
|
476
476
|
*
|
|
477
477
|
* STAGING IS INCLUDED (`tasks-backlog` / `prds-proposed`): with `surfaceStaging`
|
|
478
478
|
* on (the user-visible default) the lifecycle surface pool enumerates
|
|
479
|
-
* `needsAnswers` items resting in STAGING as `task:`/`
|
|
479
|
+
* `needsAnswers` items resting in STAGING as `task:`/`spec:` legs
|
|
480
480
|
* (`lifecycle-gather.ts`). The rung CLASSIFIER's signal read MUST see those
|
|
481
481
|
* staged bodies, or `needsAnswers` reads back `undefined`, the classifier
|
|
482
482
|
* mis-routes the item to the BUILD rung, and claim dies with "not found on
|
|
@@ -512,11 +512,11 @@ function readNeedsAnswers(
|
|
|
512
512
|
|
|
513
513
|
/**
|
|
514
514
|
* The PRODUCTION rung executor: build/task rungs ORCHESTRATE the existing
|
|
515
|
-
* `do`/`do
|
|
515
|
+
* `do`/`do spec:` machinery ({@link performDo}); the `surface`/`apply`/
|
|
516
516
|
* `triage-observation` rung bodies are filled by their own tasks
|
|
517
517
|
* ({@link surfaceRung} / {@link applyRung} / {@link triageRung}). It NEVER
|
|
518
518
|
* re-implements the build/task path — it hands the resolved arg to `performDo`,
|
|
519
|
-
* which spans both namespaces (the task path is the `do
|
|
519
|
+
* which spans both namespaces (the task path is the `do spec:` rung the spec's
|
|
520
520
|
* 2026-06-09 UPDATE confirms routes through `performIntegration`).
|
|
521
521
|
*/
|
|
522
522
|
export const defaultRungExecutor: RungExecutor = {
|
|
@@ -807,7 +807,7 @@ async function triageRung(input: RungExecInput): Promise<RungExecResult> {
|
|
|
807
807
|
* apply rung is now AGENT-DRIVEN: it runs the shared `decide(input, allowedOutcomes)`
|
|
808
808
|
* engine ({@link decide}) over `(the answered question(s) + the SOURCE item + its
|
|
809
809
|
* type/context)` via the injected {@link ApplyDecider}, allowing the set
|
|
810
|
-
* `{task | prd | adr | delete | ask}` (= `{mint-task | mint-
|
|
810
|
+
* `{task | prd | adr | delete | ask}` (= `{mint-task | mint-spec | mint-adr |
|
|
811
811
|
* delete-source | ask-follow-up}`; `adr` is now WIRED by task
|
|
812
812
|
* `agentic-apply-mint-adr-route`, which added the {@link mintAdr} route). The
|
|
813
813
|
* verdict ROUTES:
|
|
@@ -823,9 +823,9 @@ async function triageRung(input: RungExecInput): Promise<RungExecResult> {
|
|
|
823
823
|
* - `delete` → {@link applyAnsweredQuestions} discharge-by-deletion (`git rm`
|
|
824
824
|
* source + sidecar in one revertible commit, the reason in the commit message).
|
|
825
825
|
*
|
|
826
|
-
* For a TASK/
|
|
826
|
+
* For a TASK/SPEC (answering its OWN open questions) or a caller-supplied follow-up
|
|
827
827
|
* batch, it delegates straight to {@link applyAnsweredQuestions} (resolve fully /
|
|
828
|
-
* re-pause) — the lifecycle path is untouched (a task/
|
|
828
|
+
* re-pause) — the lifecycle path is untouched (a task/spec is dropped by its own
|
|
829
829
|
* lifecycle, not by a question answer).
|
|
830
830
|
*
|
|
831
831
|
* Under the `advancing` CAS lock (held by {@link performAdvance} BEFORE this runs
|
|
@@ -844,7 +844,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
|
|
|
844
844
|
return vanishedSkip({rung: 'apply', item});
|
|
845
845
|
}
|
|
846
846
|
|
|
847
|
-
// RUNNER-ACTION KIND-CHECK (task `apply-rung-merge-disposition`,
|
|
847
|
+
// RUNNER-ACTION KIND-CHECK (task `apply-rung-merge-disposition`, spec
|
|
848
848
|
// `land-time-reverify-and-parallel-merge-ceiling`): an answered `kind: merge`
|
|
849
849
|
// sidecar entry is a DETERMINISTIC land action, NOT a content decision. It
|
|
850
850
|
// dispatches HERE (a sibling of the agentic `decide()`), keyed off the
|
|
@@ -862,7 +862,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
|
|
|
862
862
|
// AGENTIC APPLY for an answered OBSERVATION (the subsumed triage rung): run the
|
|
863
863
|
// shared decision engine over the answer(s) + source, route the verdict. A
|
|
864
864
|
// caller-supplied follow-up batch (`applyFollowups`) bypasses the decision and
|
|
865
|
-
// re-pauses directly (a test/driver hook). TASK/
|
|
865
|
+
// re-pauses directly (a test/driver hook). TASK/SPEC items resolve in place
|
|
866
866
|
// (their own lifecycle), so they skip the decision and fall through to the
|
|
867
867
|
// persist below.
|
|
868
868
|
const runAgenticDecision =
|
|
@@ -910,7 +910,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
|
|
|
910
910
|
* the merge-question surfacer) through the EXISTING land primitive
|
|
911
911
|
* (`performIntegration` with `committedRecovery: true` + `freshWorktreeGate:
|
|
912
912
|
* true`) via the EXISTING per-job worktree seam (`workspace.ts` `createJob`).
|
|
913
|
-
* The deterministic SIBLING of the agentic `decide()` content-decision (
|
|
913
|
+
* The deterministic SIBLING of the agentic `decide()` content-decision (SPEC
|
|
914
914
|
* `land-time-reverify-and-parallel-merge-ceiling`, task
|
|
915
915
|
* `apply-rung-merge-disposition`; Stories #15, #16): a merge-acceptance has no
|
|
916
916
|
* judgement content (the human's plain `merge | hold | drop` answer IS the
|
|
@@ -919,7 +919,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
|
|
|
919
919
|
*
|
|
920
920
|
* Returns `undefined` when there is no answered `kind: merge` entry to dispatch
|
|
921
921
|
* (the apply rung then proceeds to the existing path — agentic for
|
|
922
|
-
* observations, normal `applyAnsweredQuestions` for task/
|
|
922
|
+
* observations, normal `applyAnsweredQuestions` for task/spec content questions).
|
|
923
923
|
* Returns a {@link RungExecResult} when the dispatcher handled the rung:
|
|
924
924
|
*
|
|
925
925
|
* - `landed` / `already-integrated` ⇒ the kept commit landed on `main` (or
|
|
@@ -1113,7 +1113,7 @@ function findItemPath(
|
|
|
1113
1113
|
* The AGENTIC apply DECISION for a fully-answered OBSERVATION (task
|
|
1114
1114
|
* `agentic-apply-retire-disposition-vocabulary`): run the shared
|
|
1115
1115
|
* `decide(input, allowedOutcomes)` engine over the answer(s) + source, then ROUTE
|
|
1116
|
-
* the verdict. The artifact-type selection (task vs
|
|
1116
|
+
* the verdict. The artifact-type selection (task vs spec) comes from the agent's
|
|
1117
1117
|
* VERDICT, NOT a human `promote-*` field (which is retired). Replaces the old
|
|
1118
1118
|
* `answeredPromoteArtifact` + disposition picker.
|
|
1119
1119
|
*
|
|
@@ -1353,13 +1353,13 @@ export async function performAdvance(
|
|
|
1353
1353
|
const message =
|
|
1354
1354
|
'`advance` with no item is the eligible-SET form (the one-shot driver). ' +
|
|
1355
1355
|
'The single-item tick needs a named item: ' +
|
|
1356
|
-
'`advance <slug>` / `advance
|
|
1356
|
+
'`advance <slug>` / `advance spec:<slug>` / `advance obs:<slug>`.';
|
|
1357
1357
|
note(message);
|
|
1358
1358
|
return {exitCode: 1, outcome: 'usage-error', message};
|
|
1359
1359
|
}
|
|
1360
1360
|
|
|
1361
1361
|
// 1. RESOLVE the arg via the SHARED resolver (extended with `obs:`). `advance`
|
|
1362
|
-
// spans task /
|
|
1362
|
+
// spans task / spec / observation; a collision / bad arg is a loud usage error.
|
|
1363
1363
|
let resolved;
|
|
1364
1364
|
try {
|
|
1365
1365
|
resolved = resolveAdvanceArg({
|
|
@@ -1419,7 +1419,7 @@ export async function performAdvance(
|
|
|
1419
1419
|
// 3. LOCK — take the `advancing` CAS borrow for the classified rung, keyed on
|
|
1420
1420
|
// the item's `<type>-<slug>` identity. The expensive phase is POST-lock.
|
|
1421
1421
|
//
|
|
1422
|
-
// UNIFIED PER-ITEM LOCK, TREE-LESS RUNGS ONLY (
|
|
1422
|
+
// UNIFIED PER-ITEM LOCK, TREE-LESS RUNGS ONLY (spec
|
|
1423
1423
|
// `ledger-status-per-item-lock-refs` US #1/#3/#18; ADR
|
|
1424
1424
|
// `ledger-status-on-per-item-lock-refs`). The rung kind is KNOWN here
|
|
1425
1425
|
// (`classification.kind`, classified pre-lock), so the tree-less-only policy
|
|
@@ -1428,7 +1428,7 @@ export async function performAdvance(
|
|
|
1428
1428
|
// TREE-LESS rung (`surface`/`apply`/`triage-observation`) the advancing acquire
|
|
1429
1429
|
// ALSO takes the item's unified lock (`action: advance`) — these rungs have NO
|
|
1430
1430
|
// inner `do`, so the unified hold is what realises advance∥claim / advance∥task
|
|
1431
|
-
// exclusion. For a BUILD-TASK / TASK-
|
|
1431
|
+
// exclusion. For a BUILD-TASK / TASK-SPEC rung we do NOT take the unified lock
|
|
1432
1432
|
// at the advance layer: `performAdvance` ORCHESTRATES an inner `performDo` that
|
|
1433
1433
|
// ITSELF acquires the SAME `task-<slug>`/`prd-<slug>` ref (the create-only CAS
|
|
1434
1434
|
// with NO re-entrancy/auto-steal, per the ADR), so taking it here too would
|
package/src/advancing-lock.ts
CHANGED
|
@@ -7,11 +7,11 @@ import {acquireItemLock, releaseItemLock} from './item-lock.js';
|
|
|
7
7
|
import {realSleep, type Sleep} from './retry-backoff.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* The **advancing-lock BORROW** (
|
|
10
|
+
* The **advancing-lock BORROW** (spec `advance-loop`, task
|
|
11
11
|
* `advancing-lock-borrow`, US #19–24).
|
|
12
12
|
*
|
|
13
13
|
* The surface/apply/triage phase's SHORT borrow. As of the capstone cut-over
|
|
14
|
-
* (task `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`,
|
|
14
|
+
* (task `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, spec
|
|
15
15
|
* `ledger-status-per-item-lock-refs`; ADR `ledger-status-on-per-item-lock-refs`)
|
|
16
16
|
* the legacy `work/advancing/<entry>.md` presence-MARKER on `main` is GONE. The
|
|
17
17
|
* advancing borrow now rides ONLY the UNIFIED per-item lock
|
|
@@ -21,7 +21,7 @@ import {realSleep, type Sleep} from './retry-backoff.js';
|
|
|
21
21
|
*
|
|
22
22
|
* The borrow is keyed by item IDENTITY (`<type>-<slug>`, via
|
|
23
23
|
* {@link resolveSidecarIdentity} — the single source of truth the unified lock,
|
|
24
|
-
* the sidecar, and the work branch all share), so a task, a
|
|
24
|
+
* the sidecar, and the work branch all share), so a task, a spec, and an
|
|
25
25
|
* observation that share a slug NEVER collide, and the SAME `<entry>` ref means an
|
|
26
26
|
* `advance` hold is MUTUALLY EXCLUSIVE with a claim/task hold of the SAME item BY
|
|
27
27
|
* CONSTRUCTION (the second acquirer loses the SAME create-only ref CAS).
|
|
@@ -29,7 +29,7 @@ import {realSleep, type Sleep} from './retry-backoff.js';
|
|
|
29
29
|
* It is file-ORTHOGONAL to the item it locks: the item's own lifecycle file NEVER
|
|
30
30
|
* moves (the borrow is a LOCK, not a lifecycle transition), which is exactly why
|
|
31
31
|
* it can lock items resting in DIFFERENT source folders (a backlog task, a `prds/`
|
|
32
|
-
*
|
|
32
|
+
* spec, an `observations/` note) with one uniform mechanism.
|
|
33
33
|
*
|
|
34
34
|
* **TREE-LESS vs BUILD/TASK RUNGS (`acquireUnified`).** The advance tick sets
|
|
35
35
|
* `acquireUnified` PER RUNG (the policy lives in `advance.ts`, where the rung is
|
|
@@ -40,7 +40,7 @@ import {realSleep, type Sleep} from './retry-backoff.js';
|
|
|
40
40
|
* IS the advance∥claim / advance∥task exclusion. Acquire/release delegate to
|
|
41
41
|
* {@link acquireItemLock} / {@link releaseItemLock} (a parentless ref CAS, no
|
|
42
42
|
* working-tree write, no retry budget).
|
|
43
|
-
* - **BUILD-TASK / TASK-
|
|
43
|
+
* - **BUILD-TASK / TASK-SPEC rungs** never take the unified lock at the advance
|
|
44
44
|
* layer (`acquireUnified` false): `performAdvance` orchestrates an inner
|
|
45
45
|
* `performDo` that ITSELF acquires the SAME `task-<slug>`/`prd-<slug>` ref
|
|
46
46
|
* (the create-only CAS with NO re-entrancy/auto-steal), so taking it again here
|
|
@@ -81,7 +81,7 @@ export type AcquireAdvancingLockExitCode = 0 | 1 | 2 | 3;
|
|
|
81
81
|
|
|
82
82
|
export interface AcquireAdvancingLockOptions {
|
|
83
83
|
/**
|
|
84
|
-
* The NAMESPACED item identity to lock (`task:<slug>` / `
|
|
84
|
+
* The NAMESPACED item identity to lock (`task:<slug>` / `spec:<slug>` /
|
|
85
85
|
* `obs:<slug>` / `observation:<slug>`, or a bare `<slug>` = task). The
|
|
86
86
|
* resolver derives the type-encoded entry `<type>-<slug>` from it.
|
|
87
87
|
*/
|
package/src/apply-decide.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from './decision-engine.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* The **AGENTIC apply DECIDER** (
|
|
14
|
+
* The **AGENTIC apply DECIDER** (spec
|
|
15
15
|
* `agentic-question-resolution-retire-disposition-vocabulary` US #1/#2/#3, task
|
|
16
16
|
* `agentic-apply-retire-disposition-vocabulary`) — the input-ADAPTER + prompt +
|
|
17
17
|
* production decider for the apply rung's call into the SHARED
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
* `agentic-apply-mint-adr-route`, which added the {@link
|
|
36
36
|
* import('./mint-adr.js').mintAdr} route and widened this set. Intake's set is
|
|
37
37
|
* UNCHANGED (`{task | spec | ask | bounce}`) \u2014 the engine stays outcome-AGNOSTIC
|
|
38
|
-
* (
|
|
38
|
+
* (SPEC decision 14), so widening this caller's subset does NOT touch intake or the
|
|
39
39
|
* engine's superset union.
|
|
40
40
|
*
|
|
41
41
|
* The INPUT adapter ({@link buildApplyDecisionInput}) sits HERE in the caller, not
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import type {VerifyConfig} from './verify.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The **answered MERGE-QUESTION ACTION DISPATCH** (
|
|
20
|
+
* The **answered MERGE-QUESTION ACTION DISPATCH** (spec
|
|
21
21
|
* `land-time-reverify-and-parallel-merge-ceiling`, task
|
|
22
22
|
* `apply-rung-merge-disposition`; Stories #15, #16) — the deterministic,
|
|
23
23
|
* answer-driven RUNNER-ACTION layer that turns an answered
|
|
@@ -29,7 +29,7 @@ import type {VerifyConfig} from './verify.js';
|
|
|
29
29
|
* `apply-decide.ts`, NOT a route through it: a merge-acceptance has no
|
|
30
30
|
* judgement content (the human's plain `merge | hold | drop` answer IS the
|
|
31
31
|
* decision; the apply-time fresh-worktree re-verify on the rebased tip is the
|
|
32
|
-
* real correctness gate). Per the
|
|
32
|
+
* real correctness gate). Per the SPEC's resolved mechanism, routing this
|
|
33
33
|
* through an LLM only adds cost and non-determinism, so the apply rung
|
|
34
34
|
* KIND-CHECKS the sidecar BEFORE calling the agentic decider: a sidecar entry
|
|
35
35
|
* carrying `kind: merge` (the typed dispatch field from `sidecar-kind-field`,
|
|
@@ -54,7 +54,7 @@ import type {VerifyConfig} from './verify.js';
|
|
|
54
54
|
* branch itself is out of this task's scope — the question is recorded as
|
|
55
55
|
* "drop" and the human / a later surfacer handles the artifact.)
|
|
56
56
|
*
|
|
57
|
-
* The STALE-APPROVAL POLICY (
|
|
57
|
+
* The STALE-APPROVAL POLICY (SPEC OQ6, applied answer q1): default is the cheap
|
|
58
58
|
* "HONOUR the prior approval + land on a green re-verify" path; opt-in
|
|
59
59
|
* `strictMergeApproval` (resolved per-repo via the gate-family precedence chain
|
|
60
60
|
* by the sibling task `strict-merge-approval-gate`, default OFF) RE-SURFACES
|
|
@@ -120,7 +120,7 @@ export function parseMergeAnswer(text: string): MergeActionVerb | undefined {
|
|
|
120
120
|
* a fully-answered sidecar (the apply rung's pre-decider kind-check). Returns
|
|
121
121
|
* `undefined` when the sidecar carries no answered `kind: merge` entry (the
|
|
122
122
|
* apply rung then proceeds to the existing path — agentic for observations,
|
|
123
|
-
* normal apply for task/
|
|
123
|
+
* normal apply for task/spec content questions).
|
|
124
124
|
*
|
|
125
125
|
* The sidecar is read OFF DISK keyed off the namespaced item identity; the
|
|
126
126
|
* model is parsed via the SAME `parseSidecar` the rest of the engine uses.
|
|
@@ -266,7 +266,7 @@ function resolveArbiterUrl(input: MergeActionInput): string | undefined {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
-
* The `strictMergeApproval` re-stale check (
|
|
269
|
+
* The `strictMergeApproval` re-stale check (SPEC OQ6 opt-in): did `<arbiter>/
|
|
270
270
|
* main` move past the merge-base of the work branch since the surfacer
|
|
271
271
|
* authored the question? The git-alone analogue of GitHub's "dismiss stale
|
|
272
272
|
* approvals when the base changes" — host-agnostic by reachability.
|
package/src/apply-persist.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from './item-path.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The engine-owned APPLY PERSIST (
|
|
20
|
+
* The engine-owned APPLY PERSIST (spec `advance-loop`, task `advance-rung-apply`;
|
|
21
21
|
* AGENTIC apply, task `agentic-apply-retire-disposition-vocabulary`) — the half of
|
|
22
22
|
* the APPLY rung the ENGINE owns. On `classify=apply` (ALL sidecar entries
|
|
23
23
|
* answered), it applies the HUMAN's answers to the item ATOMICALLY (item body +
|
|
@@ -45,9 +45,9 @@ import {
|
|
|
45
45
|
* `promoteObservation` for a mint). A signal is still-open, acted-on, or deleted
|
|
46
46
|
* — there is no \"retain as resolved\" state.
|
|
47
47
|
*
|
|
48
|
-
* The work-item (task/
|
|
48
|
+
* The work-item (task/spec) terminal MOVES (`tasks/cancelled`, `specs/dropped`) and
|
|
49
49
|
* the `needs-attention/` LIFECYCLE state are a SEPARATE lifecycle concern (a
|
|
50
|
-
* task/
|
|
50
|
+
* task/spec is dropped by its own lifecycle, not by a question answer) — they are
|
|
51
51
|
* NOT routed from here any more (they were the removed disposition vocabulary).
|
|
52
52
|
*
|
|
53
53
|
* It is the SIBLING of {@link import('./surface-persist.js').persistSurfacedQuestions}:
|
|
@@ -87,7 +87,7 @@ const APPLIED_HEADING = '## Applied answers';
|
|
|
87
87
|
* resolved (no leftover "these are still open" prose above `## Applied answers`).
|
|
88
88
|
*
|
|
89
89
|
* The strip is STRUCTURAL (marker-pair based), NOT a heading-text regex — the
|
|
90
|
-
*
|
|
90
|
+
* spec's D1 decision: a `## Open questions` heading match would be fragile to
|
|
91
91
|
* author wording (`## Open questions (clear needsAnswers when resolved)` vs.
|
|
92
92
|
* `## Open questions`). Items authored WITHOUT the markers are left untouched
|
|
93
93
|
* (backward compat — no marker ⇒ nothing to strip ⇒ identical bytes).
|
|
@@ -102,7 +102,7 @@ export const OPEN_QUESTIONS_MARKER_CLOSE = '<!-- /open-questions -->';
|
|
|
102
102
|
export interface ApplyAnsweredQuestionsOptions {
|
|
103
103
|
/** Working clone/worktree the apply commits in. */
|
|
104
104
|
cwd: string;
|
|
105
|
-
/** The namespaced item identity (`task:foo` / `
|
|
105
|
+
/** The namespaced item identity (`task:foo` / `spec:bar` / `observation:baz`). */
|
|
106
106
|
item: string;
|
|
107
107
|
/**
|
|
108
108
|
* The item file path RELATIVE to `cwd` (e.g. `work/backlog/foo.md`). The
|
|
@@ -274,7 +274,7 @@ function withAppliedAnswers(body: string, entries: SidecarEntry[]): string {
|
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
276
|
* Strip ALL marker-fenced open-questions blocks from an item body — the FULL
|
|
277
|
-
* RESOLUTION reconcile step (
|
|
277
|
+
* RESOLUTION reconcile step (spec `apply-reconciles-stale-open-questions`,
|
|
278
278
|
* decisions D1 / D3). Removes each `<!-- open-questions -->` … `<!--
|
|
279
279
|
* /open-questions -->` pair (markers included) plus the blank lines that
|
|
280
280
|
* flanked it, so the answers in `## Applied answers` no longer sit beneath a
|
|
@@ -342,11 +342,11 @@ export function applyAnsweredQuestions(
|
|
|
342
342
|
|
|
343
343
|
const {model, path: sidecarPath} = readSidecar(cwd, item);
|
|
344
344
|
|
|
345
|
-
// FOLDER-AGNOSTIC at WRITE-TIME (F3a,
|
|
345
|
+
// FOLDER-AGNOSTIC at WRITE-TIME (F3a, spec
|
|
346
346
|
// `staging-surface-and-apply-promote-safety`): re-resolve the item's CURRENT
|
|
347
347
|
// path by IDENTITY, mirroring the sidecar's already-folder-agnostic
|
|
348
348
|
// resolution. The captured `itemPath` is ADVISORY — a concurrent `promote`
|
|
349
|
-
// (`tasks/backlog → tasks/ready`, `
|
|
349
|
+
// (`tasks/backlog → tasks/ready`, `specs/proposed → specs/ready`) may have
|
|
350
350
|
// moved the item between capture and now, and we MUST write the post-move
|
|
351
351
|
// path, never the stale one. If the item has vanished entirely, exit CLEAN
|
|
352
352
|
// (no commit, no ghost file) — the matching benign skip the surface/triage
|
package/src/buildable-body.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The SINGLE owner of the buildable-task (and
|
|
3
|
-
* (
|
|
4
|
-
* #1/#4/#7). dorfl has TWO independent producers of a buildable task/
|
|
2
|
+
* The SINGLE owner of the buildable-task (and SPEC-body) markdown SECTION SCHEMA
|
|
3
|
+
* (spec `centralize-buildable-task-renderer-shared-by-intake-and-promotion`, US
|
|
4
|
+
* #1/#4/#7). dorfl has TWO independent producers of a buildable task/SPEC body —
|
|
5
5
|
* `intake.ts` (`renderBacklogTask`/`renderSpec`, a wrapper+fallback) and
|
|
6
6
|
* `triage-persist.ts` (`buildPromotedBody`, a structured renderer) — and until
|
|
7
7
|
* this module they each HAND-ROLLED the `## What to build` / `## Acceptance
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
* mechanism prose, and NO `## Acceptance criteria`. Reproduced by omitting
|
|
29
29
|
* `acceptanceCriteria` and passing the open-questions block + the seed prose.
|
|
30
30
|
*
|
|
31
|
-
* Symmetrically, {@link renderSpecBody} owns the FULL
|
|
32
|
-
* producers need: intake's default
|
|
31
|
+
* Symmetrically, {@link renderSpecBody} owns the FULL SPEC section schema both SPEC
|
|
32
|
+
* producers need: intake's default SPEC scaffold is `## Problem Statement` +
|
|
33
33
|
* `## Solution` + `## User Stories` (reproduced by passing all three), while
|
|
34
|
-
* promotion's structured
|
|
34
|
+
* promotion's structured SPEC body is `## Problem Statement` + optional
|
|
35
35
|
* `## Open questions` (reproduced by omitting `solution`/`userStories`). Each
|
|
36
36
|
* optional section is emitted only when its input is non-empty.
|
|
37
37
|
*
|
|
38
|
-
* `## Prompt` is TASK-ONLY: a
|
|
38
|
+
* `## Prompt` is TASK-ONLY: a SPEC is not dispatched by `do`/`run`, so a SPEC body
|
|
39
39
|
* carries none (the symmetric reason the task body MUST carry one — the consumer
|
|
40
40
|
* `extractPromptSection`/`resolveTask` in `prompt.ts` throws "has no '## Prompt'
|
|
41
41
|
* section" at dispatch time without it). {@link renderTaskBody} always emits a
|
|
@@ -136,28 +136,28 @@ export interface RenderSpecBodyInput {
|
|
|
136
136
|
problemStatement: string;
|
|
137
137
|
/**
|
|
138
138
|
* The `## Solution` prose (markdown). OMIT it (or pass empty) to drop the
|
|
139
|
-
* section — promotion's structured
|
|
140
|
-
* default
|
|
139
|
+
* section — promotion's structured SPEC body carries no Solution section, intake's
|
|
140
|
+
* default SPEC scaffold does.
|
|
141
141
|
*/
|
|
142
142
|
solution?: string;
|
|
143
143
|
/**
|
|
144
144
|
* The `## User Stories` block (markdown, e.g. a numbered list). OMIT it (or pass
|
|
145
|
-
* empty) to drop the section — promotion's structured
|
|
146
|
-
* Stories section, intake's default
|
|
145
|
+
* empty) to drop the section — promotion's structured SPEC body carries no User
|
|
146
|
+
* Stories section, intake's default SPEC scaffold does.
|
|
147
147
|
*/
|
|
148
148
|
userStories?: string;
|
|
149
149
|
/**
|
|
150
150
|
* The `## Open questions` block (markdown). OMIT it (or pass empty) to drop the
|
|
151
|
-
* section. A
|
|
151
|
+
* section. A SPEC carries NO `## Prompt` (it is not dispatched).
|
|
152
152
|
*/
|
|
153
153
|
openQuestions?: string;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* Render a
|
|
157
|
+
* Render a SPEC body (the markdown AFTER the frontmatter fence). Emits, in the
|
|
158
158
|
* canonical order, `## Problem Statement`, then `## Solution`, `## User Stories`,
|
|
159
159
|
* and `## Open questions` (each only when its input is given), and NEVER a
|
|
160
|
-
* `## Prompt` — a
|
|
160
|
+
* `## Prompt` — a SPEC is a north-star doc, not a dispatchable task. The symmetric twin of
|
|
161
161
|
* {@link renderTaskBody}, owning the FULL SPEC section schema both producers need
|
|
162
162
|
* (intake's default scaffold supplies Problem Statement + Solution + User Stories;
|
|
163
163
|
* promotion's structured body supplies Problem Statement + optional Open
|
package/src/claim-cas.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {workItemRel} from './work-layout.js';
|
|
|
10
10
|
* `scripts/CLAIM-PROTOCOL.md`. This is the first-class `dorfl claim`
|
|
11
11
|
* command (ADR §9: dorfl is the PRIMARY implementation of the claim
|
|
12
12
|
* protocol; `scripts/claim.sh` is retained as the portable, zero-dependency
|
|
13
|
-
* bootstrap / reference). The lock-substrate cut-over (
|
|
13
|
+
* bootstrap / reference). The lock-substrate cut-over (spec
|
|
14
14
|
* `ledger-status-per-item-lock-refs`) has since diverged it from `claim.sh`'s
|
|
15
15
|
* body-move semantics — see the lock note below — but the exit codes are the same.
|
|
16
16
|
*
|
|
@@ -26,7 +26,7 @@ import {workItemRel} from './work-layout.js';
|
|
|
26
26
|
* 3 (legacy) push contention — no longer reachable: the per-item lock never
|
|
27
27
|
* falsely contends, so there is no retry budget to exhaust
|
|
28
28
|
*
|
|
29
|
-
* UNIFIED PER-ITEM LOCK (
|
|
29
|
+
* UNIFIED PER-ITEM LOCK (spec `ledger-status-per-item-lock-refs` US #1/#15/#16,
|
|
30
30
|
* ADR `ledger-status-on-per-item-lock-refs`): a claim ACQUIRES the item's
|
|
31
31
|
* per-item lock (`action: implement`) via the lock module and writes NOTHING to
|
|
32
32
|
* `main` — the body STAYS at `work/backlog/<slug>.md`. The claimable predicate is
|
|
@@ -86,7 +86,7 @@ export interface ClaimCasOptions {
|
|
|
86
86
|
*/
|
|
87
87
|
override?: boolean;
|
|
88
88
|
/**
|
|
89
|
-
* `--allow-backlog` (
|
|
89
|
+
* `--allow-backlog` (spec
|
|
90
90
|
* `do-allow-backlog-drive-staged-tasks-without-promotion`): WIDEN the claimable
|
|
91
91
|
* predicate to ALSO accept a `tasks/backlog/`-resident body (staging), so a
|
|
92
92
|
* human can drive a staged task in place WITHOUT promoting it to the pool. The
|
|
@@ -336,7 +336,7 @@ async function runClaim(
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
// UNIFIED PER-ITEM LOCK — the WHOLE of the claim now (
|
|
339
|
+
// UNIFIED PER-ITEM LOCK — the WHOLE of the claim now (spec
|
|
340
340
|
// `ledger-status-per-item-lock-refs` US #1/#15/#16; ADR
|
|
341
341
|
// `ledger-status-on-per-item-lock-refs`). The interim dual-write is GONE: claim
|
|
342
342
|
// acquires the item's per-item lock (`action: implement`) and writes NOTHING to
|