dorfl 0.1.1 → 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 +76 -76
- 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 +20 -20
- 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 +14 -13
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +12 -24
- 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/prompt.d.ts +16 -19
- package/dist/prompt.d.ts.map +1 -1
- package/dist/prompt.js +17 -19
- package/dist/prompt.js.map +1 -1
- package/dist/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 +4 -4
- 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 +88 -86
- 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 +83 -83
- 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 +47 -47
- package/src/drop-source.ts +2 -2
- package/src/env-config.ts +8 -8
- package/src/format.ts +3 -3
- package/src/frontmatter.ts +23 -33
- 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/prompt.ts +20 -25
- 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 +5 -5
- 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 +123 -121
- 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/src/ledger-read.ts
CHANGED
|
@@ -72,47 +72,47 @@ export interface LedgerReadyItem {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* The result of a
|
|
76
|
-
* and where. A
|
|
77
|
-
* `work/
|
|
75
|
+
* The result of a spec-existence read (ADR §3a): does a spec named `<slug>` exist,
|
|
76
|
+
* and where. A spec lives at `work/specs/ready/<slug>.md`; once TASKED it rests at
|
|
77
|
+
* `work/specs/tasked/<slug>.md` (the tasked resting state, the source of truth for
|
|
78
78
|
* tasked-ness — task `prd-sliced-folder-step-a`). BOTH folders are consulted (any
|
|
79
|
-
* is enough): a
|
|
80
|
-
* slug, so collision detection must see it. While a
|
|
81
|
-
* STAYS in `work/
|
|
79
|
+
* is enough): a spec that is up-for-tasking OR already tasked still occupies its
|
|
80
|
+
* slug, so collision detection must see it. While a spec IS being tasked its body
|
|
81
|
+
* STAYS in `work/specs/ready/` (the tasking lock no longer moves it — task
|
|
82
82
|
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`; the transient
|
|
83
83
|
* `tasking/` folder is retired, the in-flight state is the per-item lock ref), so a
|
|
84
|
-
* mid-tasking
|
|
84
|
+
* mid-tasking spec is detected via its `work/specs/ready/` residence. The slug is resolved
|
|
85
85
|
* from frontmatter `slug:`, falling back to the filename — the SAME shape the task
|
|
86
86
|
* readers use.
|
|
87
87
|
*/
|
|
88
88
|
export interface SpecExistence {
|
|
89
89
|
/**
|
|
90
|
-
* Whether a
|
|
90
|
+
* Whether a spec named `<slug>` exists in `work/specs/ready/` and/or `work/specs/tasked/`
|
|
91
91
|
* (up-for-tasking OR already tasked — either still claims the slug).
|
|
92
92
|
*/
|
|
93
93
|
exists: boolean;
|
|
94
|
-
/** The spec source file, when present (`work/
|
|
94
|
+
/** The spec source file, when present (`work/specs/ready/<slug>.md`). */
|
|
95
95
|
specFile: string | undefined;
|
|
96
96
|
/**
|
|
97
|
-
* The tasked resting file, when present (`work/
|
|
97
|
+
* The tasked resting file, when present (`work/specs/tasked/<slug>.md`) — i.e. the
|
|
98
98
|
* spec HAS BEEN tasked (the source of truth for tasked-ness, task
|
|
99
|
-
* `prd-sliced-folder-step-a`). A re-task moves it back `
|
|
99
|
+
* `prd-sliced-folder-step-a`). A re-task moves it back `specs/tasked/ -> specs/ready/`.
|
|
100
100
|
*/
|
|
101
101
|
specTaskedFile: string | undefined;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
* One
|
|
106
|
-
* "tasks-first then specs to task" priority). A
|
|
107
|
-
* scan/candidate model, so the auto-pick pool is built HERE from `work/
|
|
108
|
-
* through this single shared
|
|
105
|
+
* One spec enumerated for the AUTO-TASK selection pool (ADR §3 — the
|
|
106
|
+
* "tasks-first then specs to task" priority). A spec is NOT in the task
|
|
107
|
+
* scan/candidate model, so the auto-pick pool is built HERE from `work/specs/ready/`
|
|
108
|
+
* through this single shared spec read path (the same path
|
|
109
109
|
* {@link SpecExistence} uses, widened from existence to the gate axes the tasking
|
|
110
110
|
* predicate needs). The tasking-eligibility predicate (`autoslice-gate`'s
|
|
111
111
|
* `resolveTaskingEligibility`) is applied to these by the selection layer; this
|
|
112
112
|
* reader does NOT itself decide eligibility (it just surfaces the inputs).
|
|
113
113
|
*/
|
|
114
114
|
export interface LedgerSpecItem {
|
|
115
|
-
/** Filename within `work/
|
|
115
|
+
/** Filename within `work/specs/ready/` (e.g. `auto-slice.md`). */
|
|
116
116
|
file: string;
|
|
117
117
|
/** Resolved slug (frontmatter `slug:`, falling back to the filename). */
|
|
118
118
|
slug: string;
|
|
@@ -120,25 +120,25 @@ export interface LedgerSpecItem {
|
|
|
120
120
|
humanOnly: boolean | undefined;
|
|
121
121
|
/** Autonomy axis 2 (DISCOVERED): `true` (open questions) | `undefined`. */
|
|
122
122
|
needsAnswers: boolean | undefined;
|
|
123
|
-
/** Spec-only cross-
|
|
123
|
+
/** Spec-only cross-spec order: spec slugs that must already be TASKED first. */
|
|
124
124
|
taskedAfter: string[];
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* The
|
|
129
|
-
* source). Carries every
|
|
130
|
-
* the selection layer can resolve each
|
|
131
|
-
* RESIDENCE (task `prd-sliced-folder-step-a` /
|
|
128
|
+
* The spec pool of ONE repo, resolved from `work/specs/ready/` (the auto-task candidate
|
|
129
|
+
* source). Carries every spec's gate axes PLUS the set of already-TASKED slugs so
|
|
130
|
+
* the selection layer can resolve each spec's `taskedAfter` against `work/specs/tasked/`
|
|
131
|
+
* RESIDENCE (task `prd-sliced-folder-step-a` / spec `slicing-coherence` US #9): the
|
|
132
132
|
* FOLDER is the source of truth, like `done/` for tasks (the auto-tasker reads
|
|
133
133
|
* folder-residence; the `tasked:` marker was removed in
|
|
134
134
|
* `remove-sliced-marker-step-b`). Built
|
|
135
|
-
* through the SAME
|
|
135
|
+
* through the SAME spec read path as {@link SpecExistence}; there is no second spec
|
|
136
136
|
* reader.
|
|
137
137
|
*/
|
|
138
138
|
export interface LedgerSpecPool {
|
|
139
|
-
/** Every
|
|
139
|
+
/** Every spec in `work/specs/ready/`, sorted by slug. */
|
|
140
140
|
specs: LedgerSpecItem[];
|
|
141
|
-
/** Slugs whose spec resides in `work/
|
|
141
|
+
/** Slugs whose spec resides in `work/specs/tasked/` (resolves `taskedAfter`). */
|
|
142
142
|
taskedSlugs: Set<string>;
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -201,17 +201,17 @@ export interface ResolveLocalStateInput {
|
|
|
201
201
|
repoPath: string;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
/** What the
|
|
204
|
+
/** What the spec-existence resolve method needs: which repo + which slug. */
|
|
205
205
|
export interface ResolveSpecExistenceInput {
|
|
206
|
-
/** The repo root whose `work/
|
|
206
|
+
/** The repo root whose `work/specs/ready/`+`work/specs/tasked/` to read. */
|
|
207
207
|
repoPath: string;
|
|
208
208
|
/** The slug to look up (matched against frontmatter `slug:`, then filename). */
|
|
209
209
|
slug: string;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
/** What the
|
|
212
|
+
/** What the spec-pool resolve method needs: which repo's `work/specs/ready/` to enumerate. */
|
|
213
213
|
export interface ResolveSpecPoolInput {
|
|
214
|
-
/** The repo working-tree root whose `work/
|
|
214
|
+
/** The repo working-tree root whose `work/specs/ready/` to read. */
|
|
215
215
|
repoPath: string;
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -233,13 +233,13 @@ export interface ResolveMirrorStateInput {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
* What the MIRROR-ref
|
|
237
|
-
* `work/
|
|
236
|
+
* What the MIRROR-ref spec-pool method needs: which bare hub mirror's committed
|
|
237
|
+
* `work/specs/ready/`+`work/specs/tasked/` tree to enumerate.
|
|
238
238
|
*/
|
|
239
239
|
export interface ResolveMirrorSpecPoolInput {
|
|
240
240
|
/** The bare hub mirror directory (`<workspacesDir>/repos/<key>.git`). */
|
|
241
241
|
mirrorPath: string;
|
|
242
|
-
/** The mirror-LOCAL ref whose `work/
|
|
242
|
+
/** The mirror-LOCAL ref whose `work/specs*` tree to read (default `main`). */
|
|
243
243
|
ref?: string;
|
|
244
244
|
/** Environment for child git processes. */
|
|
245
245
|
env?: NodeJS.ProcessEnv;
|
|
@@ -279,8 +279,8 @@ export interface LedgerReadStrategy {
|
|
|
279
279
|
*/
|
|
280
280
|
resolveMirrorState(input: ResolveMirrorStateInput): Promise<LocalLedgerState>;
|
|
281
281
|
/**
|
|
282
|
-
* Enumerate the repo's
|
|
283
|
-
* tree (+ already-TASKED slugs from `work/
|
|
282
|
+
* Enumerate the repo's spec pool from a BARE hub mirror's committed `work/specs/ready/`
|
|
283
|
+
* tree (+ already-TASKED slugs from `work/specs/tasked/` residence) — the
|
|
284
284
|
* mirror-ref counterpart of {@link LedgerReadStrategy.resolveSpecPool}, for the
|
|
285
285
|
* NO-CHECKOUT mirror-side auto-pick (`run`'s isolated loop + the one-shot/CI
|
|
286
286
|
* `advance --remote -n`). A mirror is bare, so this reads the committed tree via
|
|
@@ -293,36 +293,36 @@ export interface LedgerReadStrategy {
|
|
|
293
293
|
input: ResolveMirrorSpecPoolInput,
|
|
294
294
|
): Promise<LedgerSpecPool>;
|
|
295
295
|
/**
|
|
296
|
-
* Resolve whether a
|
|
297
|
-
* `work/
|
|
298
|
-
* `tasking/` folder is retired) and/or `work/
|
|
296
|
+
* Resolve whether a spec named `<slug>` exists in the LOCAL working tree's
|
|
297
|
+
* `work/specs/ready/` (the spec source — where a mid-tasking spec ALSO rests now that the
|
|
298
|
+
* `tasking/` folder is retired) and/or `work/specs/tasked/` (the tasked resting
|
|
299
299
|
* state). The slug is resolved from each candidate file's frontmatter `slug:`,
|
|
300
300
|
* falling back to the filename — the SAME shape the task readers use.
|
|
301
301
|
*
|
|
302
|
-
* This is the FIRST
|
|
303
|
-
* only `backlog`/`done`, NEVER `work/
|
|
304
|
-
* so the §3a slug-namespace resolver, and later the auto-tasking / `do
|
|
305
|
-
* share ONE
|
|
302
|
+
* This is the FIRST spec read path in the seam: `ledger-read.ts`/`scan.ts` read
|
|
303
|
+
* only `backlog`/`done`, NEVER `work/specs/ready/`. It is added here
|
|
304
|
+
* so the §3a slug-namespace resolver, and later the auto-tasking / `do spec:` work,
|
|
305
|
+
* share ONE spec read path rather than each growing a bespoke scan. Synchronous
|
|
306
306
|
* and OFFLINE (a working-tree read), like {@link resolveLocalState}.
|
|
307
307
|
*/
|
|
308
308
|
resolveSpecExistence(input: ResolveSpecExistenceInput): SpecExistence;
|
|
309
309
|
/**
|
|
310
|
-
* Enumerate the repo's
|
|
310
|
+
* Enumerate the repo's spec pool from `work/specs/ready/` (the auto-task candidate
|
|
311
311
|
* source for the `do`/`run` "tasks-first then specs to task" priority, ADR
|
|
312
|
-
* §3). Returns every
|
|
312
|
+
* §3). Returns every spec's gate axes (`humanOnly`/`needsAnswers`/`taskedAfter`)
|
|
313
313
|
* PLUS the set of already-TASKED slugs so the selection layer can resolve
|
|
314
|
-
* `taskedAfter` against `work/
|
|
314
|
+
* `taskedAfter` against `work/specs/tasked/` residence (the FOLDER is the source of
|
|
315
315
|
* truth) and apply `autoslice-gate`'s
|
|
316
|
-
* predicate. This is the SAME
|
|
316
|
+
* predicate. This is the SAME spec read path {@link resolveSpecExistence} uses,
|
|
317
317
|
* widened from a single-slug existence check to a full enumeration — NOT a
|
|
318
|
-
* second
|
|
318
|
+
* second spec reader. Synchronous and OFFLINE (a working-tree read), like
|
|
319
319
|
* {@link resolveLocalState}.
|
|
320
320
|
*/
|
|
321
321
|
resolveSpecPool(input: ResolveSpecPoolInput): LedgerSpecPool;
|
|
322
322
|
/**
|
|
323
323
|
* Enumerate `work/tasks/backlog/*.md` (the TASK STAGING folder) into the SAME
|
|
324
324
|
* {@link LedgerReadyItem} shape `resolveLocalState().ready` returns for the pool
|
|
325
|
-
* — the SURFACE-on-staging widening (
|
|
325
|
+
* — the SURFACE-on-staging widening (spec
|
|
326
326
|
* `staging-surface-and-apply-promote-safety` F2). Synchronous + OFFLINE
|
|
327
327
|
* (working-tree read), like {@link resolveLocalState}. The pool / staging
|
|
328
328
|
* folders are distinct durable status folders (one-slug-one-folder — a slug
|
|
@@ -333,19 +333,19 @@ export interface LedgerReadStrategy {
|
|
|
333
333
|
*/
|
|
334
334
|
resolveLocalTaskStaging(input: ResolveLocalStateInput): LedgerReadyItem[];
|
|
335
335
|
/**
|
|
336
|
-
* Enumerate `work/
|
|
336
|
+
* Enumerate `work/specs/proposed/*.md` (the SPEC STAGING folder) into the
|
|
337
337
|
* SAME {@link LedgerSpecItem} shape `resolveSpecPool().specs` returns for the
|
|
338
|
-
* pool — the
|
|
339
|
-
* `staging-surface-and-apply-promote-safety` F2,
|
|
338
|
+
* pool — the SPEC-symmetric `surfaceStaging` widening (spec
|
|
339
|
+
* `staging-surface-and-apply-promote-safety` F2, spec q4 answer). Sync + OFFLINE.
|
|
340
340
|
*/
|
|
341
341
|
resolveLocalSpecStaging(input: ResolveSpecPoolInput): LedgerSpecItem[];
|
|
342
342
|
/**
|
|
343
|
-
* Enumerate `work/
|
|
343
|
+
* Enumerate `work/specs/tasked/*.md` (the TASKED resting folder) into the SAME
|
|
344
344
|
* {@link LedgerSpecItem} shape `resolveSpecPool().specs` returns. UNLIKE the pool
|
|
345
|
-
* (`
|
|
346
|
-
* lifecycle GATHER can surface/apply a `needsAnswers:true`
|
|
347
|
-
* AFTER it was tasked and rests IN PLACE in `
|
|
348
|
-
* "A
|
|
345
|
+
* (`specs/ready/`) and staging (`specs/proposed/`) readers, this exists so the
|
|
346
|
+
* lifecycle GATHER can surface/apply a `needsAnswers:true` spec that drifted
|
|
347
|
+
* AFTER it was tasked and rests IN PLACE in `specs/tasked/` (WORK-CONTRACT
|
|
348
|
+
* "A SPEC that has drifted AFTER it was TASKED"). Without it, such a spec's
|
|
349
349
|
* ANSWERED sidecar is enumerated by no pool and the human's answer is STRANDED
|
|
350
350
|
* (observation `tasked-prd-needsanswers-sidecar-stranded-no-apply-pool`).
|
|
351
351
|
* `resolveSpecPool` deliberately returns tasked specs only as `taskedSlugs`
|
|
@@ -363,15 +363,15 @@ export interface LedgerReadStrategy {
|
|
|
363
363
|
): Promise<LedgerReadyItem[]>;
|
|
364
364
|
/**
|
|
365
365
|
* Mirror-ref counterpart of {@link resolveLocalSpecStaging}: read
|
|
366
|
-
* `<ref>:work/
|
|
366
|
+
* `<ref>:work/specs/proposed/*.md` from a bare mirror.
|
|
367
367
|
*/
|
|
368
368
|
resolveMirrorSpecStaging(
|
|
369
369
|
input: ResolveMirrorSpecPoolInput,
|
|
370
370
|
): Promise<LedgerSpecItem[]>;
|
|
371
371
|
/**
|
|
372
372
|
* Mirror-ref counterpart of {@link resolveLocalSpecTasked}: read
|
|
373
|
-
* `<ref>:work/
|
|
374
|
-
*
|
|
373
|
+
* `<ref>:work/specs/tasked/*.md` from a bare mirror, so a `needsAnswers` tasked
|
|
374
|
+
* spec's answered sidecar is never stranded on the mirror-side advance path
|
|
375
375
|
* either.
|
|
376
376
|
*/
|
|
377
377
|
resolveMirrorSpecTasked(
|
|
@@ -430,7 +430,7 @@ function readLocalReady(repoPath: string): LedgerReadyItem[] {
|
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
/**
|
|
433
|
-
* Read `work/tasks/backlog/*.md` (the TASK STAGING folder,
|
|
433
|
+
* Read `work/tasks/backlog/*.md` (the TASK STAGING folder, spec
|
|
434
434
|
* `staging-surface-and-apply-promote-safety` F2) from the local tree. Same
|
|
435
435
|
* {@link LedgerReadyItem} shape as the pool reader — the SURFACE-on-staging
|
|
436
436
|
* widening only enumerates items; it does NOT promote them.
|
|
@@ -440,8 +440,8 @@ function readLocalTaskStaging(repoPath: string): LedgerReadyItem[] {
|
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
/**
|
|
443
|
-
* Read `work/
|
|
444
|
-
* of {@link readLocalTaskStaging},
|
|
443
|
+
* Read `work/specs/proposed/*.md` (the SPEC STAGING folder, the spec twin
|
|
444
|
+
* of {@link readLocalTaskStaging}, spec q4 answer) from the local tree. Returns
|
|
445
445
|
* the SAME {@link LedgerSpecItem} shape `resolveSpecPool().specs` returns.
|
|
446
446
|
*/
|
|
447
447
|
function readLocalSpecStaging(repoPath: string): LedgerSpecItem[] {
|
|
@@ -449,16 +449,16 @@ function readLocalSpecStaging(repoPath: string): LedgerSpecItem[] {
|
|
|
449
449
|
}
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
|
-
* Read `work/
|
|
452
|
+
* Read `work/specs/tasked/*.md` (the TASKED resting folder) into the SAME
|
|
453
453
|
* {@link LedgerSpecItem} shape. Used by the lifecycle gather to surface/apply a
|
|
454
|
-
* `needsAnswers`
|
|
455
|
-
* `
|
|
454
|
+
* `needsAnswers` spec that drifted after tasking and rests in place in
|
|
455
|
+
* `specs/tasked/` — so its answered sidecar is never stranded.
|
|
456
456
|
*/
|
|
457
457
|
function readLocalSpecTasked(repoPath: string): LedgerSpecItem[] {
|
|
458
458
|
return readLocalSpecFolder(repoPath, 'specs-tasked');
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
-
/** Shared body for the local
|
|
461
|
+
/** Shared body for the local spec-FOLDER readers (proposed/tasked) — same item shape. */
|
|
462
462
|
function readLocalSpecFolder(
|
|
463
463
|
repoPath: string,
|
|
464
464
|
folder: 'specs-proposed' | 'specs-tasked',
|
|
@@ -518,9 +518,9 @@ function readLocalObservations(repoPath: string): LedgerObservationItem[] {
|
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
/**
|
|
521
|
-
* Does a
|
|
522
|
-
* is `work/
|
|
523
|
-
* retired); a tasked
|
|
521
|
+
* Does a spec named `slug` exist in `<repoPath>/work/<folder>/`? A spec source file
|
|
522
|
+
* is `work/specs/ready/*.md` (where a mid-tasking spec also rests — the `tasking/` folder is
|
|
523
|
+
* retired); a tasked spec rests at `work/specs/tasked/*.md` (the source of truth for
|
|
524
524
|
* tasked-ness). We match the slug against each file's
|
|
525
525
|
* frontmatter `slug:` (falling back to the filename) — the SAME shape the task
|
|
526
526
|
* readers use — so a renamed file whose frontmatter slug matches still resolves.
|
|
@@ -541,15 +541,15 @@ function findSpecFileBySlug(
|
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
/**
|
|
544
|
-
* Enumerate `work/
|
|
545
|
-
* priority's
|
|
546
|
-
* widened from a single-slug existence check to a full enumeration. Each
|
|
544
|
+
* Enumerate `work/specs/ready/*.md` into the auto-task spec pool (the tasks-first/spec
|
|
545
|
+
* priority's spec source) — the SAME spec read path {@link findSpecFileBySlug} uses,
|
|
546
|
+
* widened from a single-slug existence check to a full enumeration. Each spec's
|
|
547
547
|
* slug is resolved from frontmatter `slug:` (falling back to the filename) and
|
|
548
548
|
* its gate axes (`humanOnly`/`needsAnswers`/`taskedAfter`) parsed. The
|
|
549
|
-
* already-TASKED set is RESIDENCE in `work/
|
|
550
|
-
* `prd-sliced-folder-step-a` /
|
|
549
|
+
* already-TASKED set is RESIDENCE in `work/specs/tasked/` (task
|
|
550
|
+
* `prd-sliced-folder-step-a` / spec `slicing-coherence` US #9): the FOLDER is the
|
|
551
551
|
* source of truth (the build-machine `done/` analogue), so `taskedAfter` resolves
|
|
552
|
-
* against `
|
|
552
|
+
* against `specs/tasked/` residence (mirroring `blockedBy` -> `done/`). The `tasked:`
|
|
553
553
|
* frontmatter marker was removed entirely in `remove-sliced-marker-step-b`. This
|
|
554
554
|
* matches `tasking.ts`'s `readTaskedSlugs`. Missing folders read as empty.
|
|
555
555
|
*/
|
|
@@ -569,7 +569,7 @@ function readLocalSpecPool(repoPath: string): LocalSpecPool {
|
|
|
569
569
|
}
|
|
570
570
|
specs.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
571
571
|
|
|
572
|
-
// Tasked-ness is RESIDENCE in `work/
|
|
572
|
+
// Tasked-ness is RESIDENCE in `work/specs/tasked/` — the FOLDER is the source of
|
|
573
573
|
// truth, like `done/` for tasks (the `tasked:` marker was removed in
|
|
574
574
|
// `remove-sliced-marker-step-b`), mirroring tasking.ts's readTaskedSlugs. Missing
|
|
575
575
|
// folder reads as empty.
|
|
@@ -731,7 +731,7 @@ async function readTaskStagingFromTree(
|
|
|
731
731
|
return readTaskFolderFromTree('tasks-backlog', ref, cwd, env);
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
/** Parse `<ref>:work/
|
|
734
|
+
/** Parse `<ref>:work/specs/proposed/*.md` (SPEC STAGING) into spec items, sorted by slug. */
|
|
735
735
|
async function readSpecStagingFromTree(
|
|
736
736
|
ref: string,
|
|
737
737
|
cwd: string,
|
|
@@ -740,7 +740,7 @@ async function readSpecStagingFromTree(
|
|
|
740
740
|
return readSpecFolderFromTree('specs-proposed', ref, cwd, env);
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
/** Parse `<ref>:work/
|
|
743
|
+
/** Parse `<ref>:work/specs/tasked/*.md` (TASKED resting) into spec items, sorted by slug. */
|
|
744
744
|
async function readSpecTaskedFromTree(
|
|
745
745
|
ref: string,
|
|
746
746
|
cwd: string,
|
|
@@ -749,7 +749,7 @@ async function readSpecTaskedFromTree(
|
|
|
749
749
|
return readSpecFolderFromTree('specs-tasked', ref, cwd, env);
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
-
/** Shared body for the mirror-ref
|
|
752
|
+
/** Shared body for the mirror-ref spec-FOLDER readers (proposed/tasked) — same item shape. */
|
|
753
753
|
async function readSpecFolderFromTree(
|
|
754
754
|
folder: 'specs-proposed' | 'specs-tasked',
|
|
755
755
|
ref: string,
|
|
@@ -776,8 +776,8 @@ async function readSpecFolderFromTree(
|
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
/**
|
|
779
|
-
* Parse `<ref>:work/
|
|
780
|
-
* the already-TASKED slugs from `<ref>:work/
|
|
779
|
+
* Parse `<ref>:work/specs/ready/*.md` into the auto-task spec pool, sorted by slug, plus
|
|
780
|
+
* the already-TASKED slugs from `<ref>:work/specs/tasked/` RESIDENCE (the folder is
|
|
781
781
|
* the source of truth, mirroring the working-tree {@link readLocalSpecPool}). Reads
|
|
782
782
|
* a committed tree (bare-mirror or any ref) via `ls-tree`/`show`. Missing folders
|
|
783
783
|
* read as empty.
|
|
@@ -805,7 +805,7 @@ async function readSpecPoolFromTree(
|
|
|
805
805
|
}
|
|
806
806
|
specs.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
807
807
|
|
|
808
|
-
// Tasked-ness is RESIDENCE in `work/
|
|
808
|
+
// Tasked-ness is RESIDENCE in `work/specs/tasked/` — the FOLDER is the source of
|
|
809
809
|
// truth (the `tasked:` marker was removed in `remove-sliced-marker-step-b`),
|
|
810
810
|
// exactly as the working-tree reader resolves it.
|
|
811
811
|
const taskedBase = `${ref}:${workFolderRel('specs-tasked')}`;
|
|
@@ -910,7 +910,7 @@ export const currentLedgerRead: LedgerReadStrategy = {
|
|
|
910
910
|
return {ready, doneSlugs, observations};
|
|
911
911
|
},
|
|
912
912
|
async resolveMirrorSpecPool({mirrorPath, ref = 'main', env}) {
|
|
913
|
-
// The
|
|
913
|
+
// The spec pool from the bare mirror's committed `<ref>:work/specs*` tree — the
|
|
914
914
|
// mirror-ref counterpart of `resolveSpecPool` (a working-tree read). Same shape,
|
|
915
915
|
// so `taskableSpecs` applies identically to either source.
|
|
916
916
|
return readSpecPoolFromTree(ref, mirrorPath, env);
|
package/src/ledger-write.ts
CHANGED
|
@@ -89,7 +89,7 @@ export type LedgerTransitionKind =
|
|
|
89
89
|
| 'tasking'
|
|
90
90
|
| 'advancing'
|
|
91
91
|
/**
|
|
92
|
-
* The **promote** transition (
|
|
92
|
+
* The **promote** transition (spec `staging-pool-position-gate-and-trust-model`,
|
|
93
93
|
* task `pre-backlog-staging-folder-and-promote-step-a`): move a STAGED task
|
|
94
94
|
* `work/pre-backlog/<slug>.md → work/backlog/<slug>.md` to enter the
|
|
95
95
|
* agent-eligible pool. A durable `main` move, the same category as `requeue`
|
|
@@ -174,7 +174,7 @@ export type ApplyNeedsAttentionTransitionInput = RouteToNeedsAttentionOptions;
|
|
|
174
174
|
* move result the folder-native mechanism produces. The RECOVERABLE branch push
|
|
175
175
|
* outcome rides on `branchPush` (the caller reads it rather than assuming
|
|
176
176
|
* "pushed" off the local move). The OBSERVABLE half is now the per-item lock
|
|
177
|
-
* `state: stuck` amend (
|
|
177
|
+
* `state: stuck` amend (spec `ledger-status-per-item-lock-refs`); there is no
|
|
178
178
|
* separate on-`main` surface outcome to report.
|
|
179
179
|
*/
|
|
180
180
|
export type ApplyNeedsAttentionTransitionResult = RouteToNeedsAttentionResult;
|
|
@@ -773,7 +773,7 @@ export const currentLedgerWrite: LedgerWriteStrategy = {
|
|
|
773
773
|
* The SOLE stuck-state RECORD: amend the item's HELD per-item lock
|
|
774
774
|
* `active → stuck` + the FULL reason prose + any agent-surfaced questions, via the
|
|
775
775
|
* state machine's mark-stuck CAS amend ({@link markStuckItemLock}) — task
|
|
776
|
-
* `cutover-needs-attention-becomes-lock-stuck-recovery-surface` (decision i+;
|
|
776
|
+
* `cutover-needs-attention-becomes-lock-stuck-recovery-surface` (decision i+; spec
|
|
777
777
|
* `ledger-status-per-item-lock-refs` US #5/#8; ADR
|
|
778
778
|
* `ledger-status-on-per-item-lock-refs`). This REPLACES the `git mv →
|
|
779
779
|
* needs-attention/` folder bounce + its on-`main` surface + branch push: the
|
package/src/lifecycle-gather.ts
CHANGED
|
@@ -65,8 +65,8 @@ function readSidecarInPlace(
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* Collect every `needsAnswers:true` task (from `work/backlog`) +
|
|
69
|
-
* `work/
|
|
68
|
+
* Collect every `needsAnswers:true` task (from `work/backlog`) + spec (from
|
|
69
|
+
* `work/specs`) for the in-place repo, through the read seam (the SAME readers the
|
|
70
70
|
* build-pool scan uses). These are the SURFACE/APPLY candidates this task draws
|
|
71
71
|
* into the selection (today they are build/task-INELIGIBLE, so nothing else
|
|
72
72
|
* surfaces them).
|
|
@@ -89,25 +89,25 @@ function blockedItemsInPlace(
|
|
|
89
89
|
out.push({namespace: 'spec', slug: spec.slug});
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
// TASKED resting prds (`
|
|
93
|
-
// `surfaceStaging`), because a
|
|
94
|
-
// while resting in `
|
|
95
|
-
// it was TASKED"). This is NOT a staging widening: a tasked
|
|
92
|
+
// TASKED resting prds (`specs/tasked/`) — enumerated UNCONDITIONALLY (NOT behind
|
|
93
|
+
// `surfaceStaging`), because a spec may legitimately carry `needsAnswers:true`
|
|
94
|
+
// while resting in `specs/tasked/` (WORK-CONTRACT "A SPEC that has drifted AFTER
|
|
95
|
+
// it was TASKED"). This is NOT a staging widening: a tasked spec is a durable
|
|
96
96
|
// resting state, like the pool, so it is enumerated like the pool. Routing
|
|
97
97
|
// still respects the gates in `buildLifecyclePools` (an ANSWERED sidecar -> the
|
|
98
98
|
// always-on APPLY pool so the human's answer is never STRANDED; a NO-sidecar
|
|
99
|
-
// tasked
|
|
100
|
-
// tasked
|
|
99
|
+
// tasked spec -> SURFACE, still gated by `surfaceBlockers`). Without this, a
|
|
100
|
+
// tasked spec's answered sidecar is enumerated by no pool and apply never runs
|
|
101
101
|
// on it (observation `tasked-prd-needsanswers-sidecar-stranded-no-apply-pool`).
|
|
102
102
|
for (const spec of read.resolveLocalSpecTasked({repoPath})) {
|
|
103
103
|
if (spec.needsAnswers === true) {
|
|
104
104
|
out.push({namespace: 'spec', slug: spec.slug});
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
// SURFACE-on-STAGING widening (
|
|
107
|
+
// SURFACE-on-STAGING widening (spec
|
|
108
108
|
// `staging-surface-and-apply-promote-safety` F2): when `surfaceStaging` is
|
|
109
109
|
// ON, the candidate set ADDITIONALLY enumerates `needsAnswers` items resting
|
|
110
|
-
// in STAGING (`tasks/backlog/` + `
|
|
110
|
+
// in STAGING (`tasks/backlog/` + `specs/proposed/`), so a tasked item
|
|
111
111
|
// surfaces its questions BEFORE the human promotes it. BUILD/claim still
|
|
112
112
|
// reads POOL-only (`scoreItems` over `state.ready`); only the surface polarity
|
|
113
113
|
// widens here.
|
|
@@ -195,7 +195,7 @@ async function readSidecarMirror(
|
|
|
195
195
|
* Gather + build the lifecycle pools for a MIRROR-SIDE bare hub mirror (async).
|
|
196
196
|
* Reads the SAME logical inputs as {@link gatherLifecycleInPlace} \u2014 observations +
|
|
197
197
|
* the `needsAnswers` pool from the mirror's committed `main` (via
|
|
198
|
-
* `resolveMirrorState`), the
|
|
198
|
+
* `resolveMirrorState`), the spec pool via `resolveMirrorSpecPool`, and each item's
|
|
199
199
|
* sidecar via `git show` \u2014 then hands them to the SAME shared
|
|
200
200
|
* {@link buildLifecyclePools}, so the in-place + mirror enumerations AGREE.
|
|
201
201
|
*/
|
|
@@ -232,9 +232,9 @@ export async function gatherLifecycleMirror(input: {
|
|
|
232
232
|
blocked.push({namespace: 'spec', slug: spec.slug});
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
// TASKED resting prds (`<ref>:work/
|
|
236
|
-
// the mirror-side counterpart of the in-place tasked-
|
|
237
|
-
// (so a `needsAnswers` tasked
|
|
235
|
+
// TASKED resting prds (`<ref>:work/specs/tasked/`) — enumerated UNCONDITIONALLY,
|
|
236
|
+
// the mirror-side counterpart of the in-place tasked-spec enumeration above
|
|
237
|
+
// (so a `needsAnswers` tasked spec's answered sidecar is never stranded on the
|
|
238
238
|
// mirror/CI advance path either). Routing still respects the gates.
|
|
239
239
|
const specTasked = await read.resolveMirrorSpecTasked({mirrorPath, ref, env});
|
|
240
240
|
for (const spec of specTasked) {
|
|
@@ -242,10 +242,10 @@ export async function gatherLifecycleMirror(input: {
|
|
|
242
242
|
blocked.push({namespace: 'spec', slug: spec.slug});
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
// SURFACE-on-STAGING widening (
|
|
245
|
+
// SURFACE-on-STAGING widening (spec
|
|
246
246
|
// `staging-surface-and-apply-promote-safety` F2): mirror-side counterpart of
|
|
247
247
|
// the in-place widening above — enumerate `needsAnswers` items in
|
|
248
|
-
// STAGING (`tasks/backlog/` + `
|
|
248
|
+
// STAGING (`tasks/backlog/` + `specs/proposed/`) from the bare mirror's
|
|
249
249
|
// committed `<ref>` tree, so the in-place + mirror surfaces AGREE. The
|
|
250
250
|
// staging reads are skipped entirely when the gate is OFF (no extra git
|
|
251
251
|
// ls-tree work in the legacy mode).
|
package/src/lifecycle-pools.ts
CHANGED
|
@@ -70,7 +70,7 @@ export interface LifecyclePoolGates {
|
|
|
70
70
|
surface?: boolean;
|
|
71
71
|
/**
|
|
72
72
|
* Does the SURFACE candidate set widen to include STAGING (`tasks/backlog/` +
|
|
73
|
-
* `
|
|
73
|
+
* `specs/proposed/`), or stay POOL-ONLY? This field is CONSUMED BY THE
|
|
74
74
|
* GATHER (`lifecycle-gather.ts`), NOT by {@link buildLifecyclePools} — the
|
|
75
75
|
* builder is pure and only routes already-resolved candidates between surface
|
|
76
76
|
* / apply by sidecar-answered-state. The gather decides WHICH items become
|
|
@@ -112,7 +112,7 @@ export interface NeedsAnswersCandidate {
|
|
|
112
112
|
* to the always-on APPLY pool (a CONSUME act — the human's answer is never
|
|
113
113
|
* stranded), while a NO/PENDING sidecar UNTRIAGED observation stays a TRIAGE
|
|
114
114
|
* candidate (gated) as today. PURE: the caller resolves the active sidecar (via
|
|
115
|
-
* {@link sidecarPathFor} — the SAME resolver the task/
|
|
115
|
+
* {@link sidecarPathFor} — the SAME resolver the task/spec `needsAnswers`
|
|
116
116
|
* candidates use); this unit only routes.
|
|
117
117
|
*/
|
|
118
118
|
export interface ObservationCandidate {
|
|
@@ -142,7 +142,7 @@ export interface LifecyclePoolsInput {
|
|
|
142
142
|
*/
|
|
143
143
|
observations: ObservationCandidate[];
|
|
144
144
|
/**
|
|
145
|
-
* Every `needsAnswers:true` task/
|
|
145
|
+
* Every `needsAnswers:true` task/spec (the create-side blocked items), each
|
|
146
146
|
* with its resolved active sidecar. This unit routes each to SURFACE or APPLY.
|
|
147
147
|
*/
|
|
148
148
|
needsAnswers: NeedsAnswersCandidate[];
|
|
@@ -172,7 +172,7 @@ export interface LifecyclePools {
|
|
|
172
172
|
* Build the three lifecycle sub-pools from the raw candidates + the gates, PURE.
|
|
173
173
|
* Each selected item carries the lifecycle `namespace` discriminator so the
|
|
174
174
|
* driver's per-item dispatch can map it to the right TICK arg (observation \u2192
|
|
175
|
-
* `obs:<slug>`; a blocked task/
|
|
175
|
+
* `obs:<slug>`; a blocked task/spec \u2192 `task:`/`spec:<slug>`, which the tick then
|
|
176
176
|
* classifies into surface/apply/no-op). This unit decides WHICH sub-pool each item
|
|
177
177
|
* belongs to (and whether its gate lets it through); the TICK re-classifies and
|
|
178
178
|
* runs the actual rung (the classifier + rung bodies are unchanged).
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {workItemRel, type WorkFolderKey} from './work-layout.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* The **MERGE-QUESTION SURFACER** (
|
|
19
|
+
* The **MERGE-QUESTION SURFACER** (spec `land-time-reverify-and-parallel-merge-ceiling`,
|
|
20
20
|
* task `merge-question-surfacer`, US #14) — the SECOND, STATE-sourced surfacer
|
|
21
21
|
* in the advance loop. It is a clean SIBLING to the existing
|
|
22
22
|
* `surface-questions` JUDGEMENT surfacer (`surface-gate.ts` +
|
|
@@ -41,7 +41,7 @@ import {workItemRel, type WorkFolderKey} from './work-layout.js';
|
|
|
41
41
|
* layered on top when a GitHub host is configured; the surfacer functions
|
|
42
42
|
* identically without it.
|
|
43
43
|
*
|
|
44
|
-
* OUT OF SCOPE for this task (covered by sibling tasks of the same
|
|
44
|
+
* OUT OF SCOPE for this task (covered by sibling tasks of the same spec):
|
|
45
45
|
*
|
|
46
46
|
* - The APPLY rung dispatch that lands an answered `kind: merge` through the
|
|
47
47
|
* land primitive (rebase → re-verify → advance). Task
|
|
@@ -185,7 +185,7 @@ const TASK_FOLDERS: readonly WorkFolderKey[] = [
|
|
|
185
185
|
* Idempotency: a branch whose sidecar ALREADY carries a PENDING `kind: merge`
|
|
186
186
|
* entry is SKIPPED (with `already-pending-merge-question`). A branch with no
|
|
187
187
|
* item body on `main` is SKIPPED (with `no-item-body`) — the cross-cutting
|
|
188
|
-
* branch-keyed sidecar identity (
|
|
188
|
+
* branch-keyed sidecar identity (SPEC sidecar Q5-i) is OOS for this task; an
|
|
189
189
|
* unmerged-branch-with-no-body lands on the same skip path until that
|
|
190
190
|
* generalisation arrives.
|
|
191
191
|
*/
|
|
@@ -248,7 +248,7 @@ export function surfaceMergeQuestions(
|
|
|
248
248
|
|
|
249
249
|
const itemPath = findTaskItemPath(cwd, branch.slug);
|
|
250
250
|
if (itemPath === undefined) {
|
|
251
|
-
// The `branch:`/`ref:`-keyed sidecar identity (
|
|
251
|
+
// The `branch:`/`ref:`-keyed sidecar identity (SPEC sidecar Q5-i, the
|
|
252
252
|
// cross-cutting open question SHARED with the stuck-lock surfacer) is
|
|
253
253
|
// OUT OF SCOPE for this task — without a body to flip `needsAnswers`
|
|
254
254
|
// on, persist would tear the invariant. Skip with the reason so the
|
package/src/mint-adr.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {resolveSidecarIdentity, sidecarPathFor} from './sidecar.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* The **ADR-MINT route** (
|
|
12
|
+
* The **ADR-MINT route** (spec
|
|
13
13
|
* `agentic-question-resolution-retire-disposition-vocabulary` US #2, task
|
|
14
14
|
* `agentic-apply-mint-adr-route`) — the SIBLING of {@link
|
|
15
15
|
* import('./triage-persist.js').promoteObservation}, for the agentic apply
|
|
@@ -17,8 +17,8 @@ import {resolveSidecarIdentity, sidecarPathFor} from './sidecar.js';
|
|
|
17
17
|
*
|
|
18
18
|
* Why a SIBLING and not an `adr` artifact type on `promoteObservation`
|
|
19
19
|
* (recorded `## Decisions`): `promoteObservation` is `work/`-folder-SHAPED — it
|
|
20
|
-
* targets `work/tasks/ready` / `work/
|
|
21
|
-
* a task/
|
|
20
|
+
* targets `work/tasks/ready` / `work/specs/proposed` via `workItemRel`, and builds
|
|
21
|
+
* a task/spec body (a `## What to build` / `## Problem Statement` lead + an
|
|
22
22
|
* `## Open questions` block, with `needsAnswers` carried). An ADR is DIFFERENT in
|
|
23
23
|
* EVERY one of those: it lives in `docs/adr/` (OUTSIDE the work board, so the
|
|
24
24
|
* `work/`-layout path builder does not fit), it carries NO `needsAnswers`/open-
|
|
@@ -331,7 +331,7 @@ function renderAdrFile(slug: string, title: string, body: string): string {
|
|
|
331
331
|
* The observation's mechanism PROSE: everything before its first
|
|
332
332
|
* `## Open questions` heading, with the frontmatter fence dropped. An ADR records
|
|
333
333
|
* a SETTLED decision, so an observation's open-questions scoping is deliberately
|
|
334
|
-
* NOT carried into the ADR body (unlike a promoted task/
|
|
334
|
+
* NOT carried into the ADR body (unlike a promoted task/spec, which keeps the
|
|
335
335
|
* open questions live) — the answered question(s) ARE the decision.
|
|
336
336
|
*/
|
|
337
337
|
function mechanismOf(observation: string): string {
|
package/src/mirror-pool-scan.ts
CHANGED
|
@@ -24,7 +24,7 @@ import {heldTaskSlugs} from './item-lock.js';
|
|
|
24
24
|
* SAME two pools (eligible TASKS + taskable PRDS) but reads a BARE hub mirror's
|
|
25
25
|
* committed `main` ref (`git ls-tree`/`git show`), NOT a working checkout.
|
|
26
26
|
*
|
|
27
|
-
* This is the ONE reusable enumeration unit the
|
|
27
|
+
* This is the ONE reusable enumeration unit the spec's FOLD-IN note demands: BOTH
|
|
28
28
|
* the `run` loop driver's isolated+parallel auto-pick AND the one-shot/CI
|
|
29
29
|
* `advance --remote -n` / the CI matrix consume it, so the `-n`/auto-pick rungs
|
|
30
30
|
* (both `do` and `advance`, both `run`-loop and one-shot) all call the SAME scan.
|
|
@@ -44,7 +44,7 @@ import {heldTaskSlugs} from './item-lock.js';
|
|
|
44
44
|
* `scanRepoPaths`/registry `scan` use) over the mirror's `work/backlog` +
|
|
45
45
|
* `work/done` read via {@link LedgerReadStrategy.resolveMirrorState}.
|
|
46
46
|
* - **taskable prds** — {@link taskableSpecs} (`autoslice-gate`'s predicate)
|
|
47
|
-
* over the mirror's `work/
|
|
47
|
+
* over the mirror's `work/specs/ready` + `work/specs/tasked` read via the mirror-ref
|
|
48
48
|
* {@link LedgerReadStrategy.resolveMirrorSpecPool}.
|
|
49
49
|
*
|
|
50
50
|
* Per-repo policy parity: a bare mirror has no checked-out `.dorfl.json`,
|
|
@@ -170,7 +170,7 @@ export async function scanMirrorPool(
|
|
|
170
170
|
// scored through the EXACT same `scoreItems` the in-place/registry scans use.
|
|
171
171
|
const state = await read.resolveMirrorState({mirrorPath, ref, env});
|
|
172
172
|
const counts = {totalItems: 0, totalEligible: 0};
|
|
173
|
-
// HELD-SLUG SUBTRACTION (
|
|
173
|
+
// HELD-SLUG SUBTRACTION (spec `ledger-status-per-item-lock-refs` US #15): a bare
|
|
174
174
|
// hub mirror's arbiter is its `origin`; read the held lock refs from there and
|
|
175
175
|
// exclude those slugs from the enumerated `backlog/` pool. Non-fatal (empty set
|
|
176
176
|
// on any fault) and redundant-but-harmless while the body still moves — wired now
|
|
@@ -179,7 +179,7 @@ export async function scanMirrorPool(
|
|
|
179
179
|
// its own lock-ref fetch.
|
|
180
180
|
const heldSlugs = await heldTaskSlugs(mirrorPath, 'origin', env);
|
|
181
181
|
const items = scoreItems(state, repoConfig.autoBuild, counts, heldSlugs);
|
|
182
|
-
// Pool 2 — TASKABLE PRDS from the bare mirror's `work/
|
|
182
|
+
// Pool 2 — TASKABLE PRDS from the bare mirror's `work/specs/ready`+`work/specs/tasked`,
|
|
183
183
|
// filtered through `autoslice-gate`'s predicate (NOT reinvented). Read FIRST so
|
|
184
184
|
// we can populate the `specs[]` companion of `items[]` on the RepoReport below.
|
|
185
185
|
const pool = await read.resolveMirrorSpecPool({mirrorPath, ref, env});
|
|
@@ -195,7 +195,7 @@ export async function scanMirrorPool(
|
|
|
195
195
|
autoTask: repoConfig.autoTask,
|
|
196
196
|
});
|
|
197
197
|
// The one-slug-one-folder LINT is a HUMAN-FACING surface (`scan`/`status`); this
|
|
198
|
-
// mirror-side pool scan exists only to SCORE the task/
|
|
198
|
+
// mirror-side pool scan exists only to SCORE the task/spec candidate pools for
|
|
199
199
|
// autonomous selection, never to render a dashboard, so it carries an empty lint
|
|
200
200
|
// (the duplicate surface is the user-facing `scan`/`status`, per the task). The
|
|
201
201
|
// `specs[]` companion of `items[]` is filled via the SAME `scoreSpecs` helper
|