dorfl 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advance-ci-template.d.ts +3 -3
- package/dist/advance-ci-template.js +1 -1
- package/dist/advance-ci-template.js.map +1 -1
- package/dist/advance-classify.d.ts +5 -5
- package/dist/advance-classify.d.ts.map +1 -1
- package/dist/advance-classify.js +4 -4
- package/dist/advance-drivers.d.ts +7 -7
- package/dist/advance-drivers.d.ts.map +1 -1
- package/dist/advance-drivers.js +5 -5
- package/dist/advance-drivers.js.map +1 -1
- package/dist/advance-isolated.d.ts +3 -3
- package/dist/advance-isolated.d.ts.map +1 -1
- package/dist/advance-isolated.js +1 -1
- package/dist/advance-lifecycle-template.d.ts +2 -2
- package/dist/advance-lifecycle-template.js +9 -9
- package/dist/advance-lifecycle-template.js.map +1 -1
- package/dist/advance-loop-driver.d.ts +3 -3
- package/dist/advance-loop-driver.d.ts.map +1 -1
- package/dist/advance-loop-driver.js +1 -1
- package/dist/advance-treeless-publish.d.ts +1 -1
- package/dist/advance.d.ts +11 -11
- package/dist/advance.d.ts.map +1 -1
- package/dist/advance.js +21 -21
- package/dist/advance.js.map +1 -1
- package/dist/advancing-lock.d.ts +1 -1
- package/dist/advancing-lock.js +5 -5
- package/dist/apply-decide.d.ts +2 -2
- package/dist/apply-decide.js +2 -2
- package/dist/apply-merge-action.d.ts +4 -4
- package/dist/apply-merge-action.js +2 -2
- package/dist/apply-persist.d.ts +5 -5
- package/dist/apply-persist.d.ts.map +1 -1
- package/dist/apply-persist.js +7 -7
- package/dist/apply-persist.js.map +1 -1
- package/dist/buildable-body.d.ts +14 -14
- package/dist/buildable-body.js +9 -9
- package/dist/claim-cas.d.ts +3 -3
- package/dist/claim-cas.js +1 -1
- package/dist/claim-cas.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +83 -77
- package/dist/cli.js.map +1 -1
- package/dist/close-job-template.d.ts +3 -3
- package/dist/close-job-template.js +8 -8
- package/dist/close-job.d.ts +8 -8
- package/dist/close-job.js +25 -25
- package/dist/close-job.js.map +1 -1
- package/dist/complete.d.ts +3 -3
- package/dist/complete.js +8 -8
- package/dist/complete.js.map +1 -1
- package/dist/concurrency.d.ts +1 -1
- package/dist/concurrency.js +1 -1
- package/dist/config.d.ts +32 -32
- package/dist/config.js +5 -5
- package/dist/config.js.map +1 -1
- package/dist/continue-branch.d.ts +1 -1
- package/dist/continue-branch.js +1 -1
- package/dist/cwd-section.js +1 -1
- package/dist/cwd-section.js.map +1 -1
- package/dist/decision-engine.d.ts +2 -2
- package/dist/do-autopick.d.ts +6 -6
- package/dist/do-autopick.d.ts.map +1 -1
- package/dist/do-autopick.js +5 -5
- package/dist/do-autopick.js.map +1 -1
- package/dist/do-config.d.ts +3 -3
- package/dist/do-config.js +3 -3
- package/dist/do-config.js.map +1 -1
- package/dist/do-remote-auto.d.ts +2 -2
- package/dist/do-remote-auto.js +1 -1
- package/dist/do.d.ts +25 -25
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +22 -22
- package/dist/do.js.map +1 -1
- package/dist/drop-source.d.ts +2 -2
- package/dist/env-config.js +8 -8
- package/dist/env-config.js.map +1 -1
- package/dist/format.js +3 -3
- package/dist/format.js.map +1 -1
- package/dist/frontmatter.d.ts +33 -39
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +18 -31
- package/dist/frontmatter.js.map +1 -1
- package/dist/install-ci-branch-protection.d.ts +1 -1
- package/dist/install-ci-branch-protection.js +1 -1
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts +1 -1
- package/dist/install-ci-capabilities/advance-lifecycle.js +1 -1
- package/dist/install-ci-capabilities/close-job.d.ts +1 -1
- package/dist/install-ci-capabilities/close-job.js +1 -1
- package/dist/install-ci-capabilities/example-noop.d.ts +1 -1
- package/dist/install-ci-capabilities/example-noop.js +1 -1
- package/dist/install-ci-capabilities/intake.d.ts +2 -2
- package/dist/install-ci-capabilities/intake.js +2 -2
- package/dist/install-ci-capabilities/verify.d.ts +1 -1
- package/dist/install-ci-capabilities/verify.js +1 -1
- package/dist/install-ci-core.d.ts +3 -3
- package/dist/install-ci-core.js +2 -2
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +1 -1
- package/dist/install-ci-github.js +1 -1
- package/dist/install-ci.d.ts +1 -1
- package/dist/install-ci.js +4 -4
- package/dist/install-ci.js.map +1 -1
- package/dist/intake-event.d.ts +6 -6
- package/dist/intake-event.js +6 -6
- package/dist/intake-marker.d.ts +3 -3
- package/dist/intake-marker.d.ts.map +1 -1
- package/dist/intake-triage.d.ts +1 -1
- package/dist/intake-triage.js +2 -2
- package/dist/intake-trigger-template.d.ts +8 -8
- package/dist/intake-trigger-template.d.ts.map +1 -1
- package/dist/intake-trigger-template.js +16 -16
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts +50 -50
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +70 -70
- package/dist/intake.js.map +1 -1
- package/dist/integration-core.d.ts +17 -17
- package/dist/integration-core.js +17 -17
- package/dist/integration-core.js.map +1 -1
- package/dist/isolation.d.ts +3 -3
- package/dist/issue-provider.d.ts +4 -4
- package/dist/issue-provider.js +1 -1
- package/dist/item-lock.d.ts +21 -21
- package/dist/item-lock.d.ts.map +1 -1
- package/dist/item-lock.js +16 -16
- package/dist/item-path.d.ts +2 -2
- package/dist/item-path.js +2 -2
- package/dist/ledger-lint.d.ts +9 -9
- package/dist/ledger-lint.js +9 -9
- package/dist/ledger-read.d.ts +57 -57
- package/dist/ledger-read.d.ts.map +1 -1
- package/dist/ledger-read.js +24 -24
- package/dist/ledger-read.js.map +1 -1
- package/dist/ledger-write.d.ts +2 -2
- package/dist/ledger-write.js +1 -1
- package/dist/lifecycle-gather.d.ts +1 -1
- package/dist/lifecycle-gather.js +16 -16
- package/dist/lifecycle-gather.js.map +1 -1
- package/dist/lifecycle-pools.d.ts +4 -4
- package/dist/lifecycle-pools.js +1 -1
- package/dist/merge-question-surfacer.d.ts +3 -3
- package/dist/merge-question-surfacer.js +2 -2
- package/dist/merge-question-surfacer.js.map +1 -1
- package/dist/mint-adr.js +4 -4
- package/dist/mirror-pool-scan.d.ts +2 -2
- package/dist/mirror-pool-scan.js +3 -3
- package/dist/mirror-pool-scan.js.map +1 -1
- package/dist/needs-attention.d.ts +13 -13
- package/dist/needs-attention.d.ts.map +1 -1
- package/dist/needs-attention.js +11 -11
- package/dist/needs-attention.js.map +1 -1
- package/dist/orphan-sidecar.d.ts +2 -2
- package/dist/placement.d.ts +6 -6
- package/dist/placement.js +2 -2
- package/dist/prd-to-spec.d.ts +15 -1
- package/dist/prd-to-spec.d.ts.map +1 -1
- package/dist/prd-to-spec.js +36 -14
- package/dist/prd-to-spec.js.map +1 -1
- package/dist/prompt.d.ts +24 -24
- package/dist/prompt.d.ts.map +1 -1
- package/dist/prompt.js +29 -31
- package/dist/prompt.js.map +1 -1
- package/dist/protocol/CLAIM-PROTOCOL.md +4 -4
- package/dist/protocol/REVIEW-PROTOCOL.md +1 -1
- package/dist/protocol/TASKING-PROTOCOL.md +12 -12
- package/dist/protocol/WORK-CONTRACT.md +39 -39
- package/dist/protocol/spec-template.md +1 -1
- package/dist/protocol/task-template.md +3 -3
- package/dist/readiness.d.ts +1 -1
- package/dist/recover-isolated.js +1 -1
- package/dist/repo-config.js +12 -12
- package/dist/repo-config.js.map +1 -1
- package/dist/review-gate.d.ts +3 -3
- package/dist/review-gate.d.ts.map +1 -1
- package/dist/review-gate.js +11 -10
- package/dist/review-gate.js.map +1 -1
- package/dist/review-verdict.d.ts +2 -2
- package/dist/review-verdict.d.ts.map +1 -1
- package/dist/review-verdict.js +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +5 -5
- package/dist/run.js.map +1 -1
- package/dist/scan.d.ts +10 -10
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +8 -8
- package/dist/scan.js.map +1 -1
- package/dist/select-order.d.ts +1 -1
- package/dist/select-priority.d.ts +12 -12
- package/dist/select-priority.d.ts.map +1 -1
- package/dist/select-priority.js +5 -5
- package/dist/select-priority.js.map +1 -1
- package/dist/sidecar.d.ts +2 -2
- package/dist/sidecar.js +2 -2
- package/dist/sidecar.js.map +1 -1
- package/dist/slug-namespace.d.ts +1 -1
- package/dist/slug-namespace.js +3 -3
- package/dist/slug-namespace.js.map +1 -1
- package/dist/spec-complete.js +2 -2
- package/dist/spec-complete.js.map +1 -1
- package/dist/start.d.ts +1 -1
- package/dist/start.js +3 -3
- package/dist/start.js.map +1 -1
- package/dist/status.d.ts +3 -3
- package/dist/status.js +4 -4
- package/dist/status.js.map +1 -1
- package/dist/surface-gate.d.ts +2 -2
- package/dist/surface-gate.d.ts.map +1 -1
- package/dist/surface-persist.d.ts +2 -2
- package/dist/surface-persist.d.ts.map +1 -1
- package/dist/tasker-review-loop.d.ts +8 -8
- package/dist/tasker-review-loop.d.ts.map +1 -1
- package/dist/tasker-review-loop.js +8 -8
- package/dist/tasker-review-loop.js.map +1 -1
- package/dist/tasking-eligibility.d.ts +21 -21
- package/dist/tasking-eligibility.d.ts.map +1 -1
- package/dist/tasking-eligibility.js +10 -10
- package/dist/tasking-lock.d.ts +8 -8
- package/dist/tasking-lock.d.ts.map +1 -1
- package/dist/tasking-lock.js +20 -21
- package/dist/tasking-lock.js.map +1 -1
- package/dist/tasking.d.ts +33 -33
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +89 -88
- package/dist/tasking.js.map +1 -1
- package/dist/triage-gate.d.ts +1 -1
- package/dist/triage-persist.d.ts +5 -5
- package/dist/triage-persist.js +15 -15
- package/dist/triage-persist.js.map +1 -1
- package/dist/verify-workflow-template.d.ts +1 -1
- package/dist/verify-workflow-template.js +2 -2
- package/dist/work-layout.d.ts +9 -7
- package/dist/work-layout.d.ts.map +1 -1
- package/dist/work-layout.js +9 -7
- package/dist/work-layout.js.map +1 -1
- package/dist/workspace.d.ts +1 -1
- package/package.json +1 -1
- package/src/advance-ci-template.ts +4 -4
- package/src/advance-classify.ts +5 -5
- package/src/advance-drivers.ts +10 -10
- package/src/advance-isolated.ts +3 -3
- package/src/advance-lifecycle-template.ts +9 -9
- package/src/advance-loop-driver.ts +3 -3
- package/src/advance-treeless-publish.ts +1 -1
- package/src/advance.ts +30 -30
- package/src/advancing-lock.ts +6 -6
- package/src/apply-decide.ts +2 -2
- package/src/apply-merge-action.ts +5 -5
- package/src/apply-persist.ts +8 -8
- package/src/buildable-body.ts +14 -14
- package/src/claim-cas.ts +4 -4
- package/src/cli.ts +94 -84
- package/src/close-job-template.ts +8 -8
- package/src/close-job.ts +26 -26
- package/src/complete.ts +11 -11
- package/src/concurrency.ts +1 -1
- package/src/config.ts +37 -37
- package/src/continue-branch.ts +1 -1
- package/src/cwd-section.ts +1 -1
- package/src/decision-engine.ts +3 -3
- package/src/do-autopick.ts +9 -9
- package/src/do-config.ts +6 -6
- package/src/do-remote-auto.ts +2 -2
- package/src/do.ts +49 -49
- package/src/drop-source.ts +2 -2
- package/src/env-config.ts +8 -8
- package/src/format.ts +3 -3
- package/src/frontmatter.ts +42 -60
- package/src/install-ci-branch-protection.ts +1 -1
- package/src/install-ci-capabilities/advance-lifecycle.ts +1 -1
- package/src/install-ci-capabilities/close-job.ts +1 -1
- package/src/install-ci-capabilities/example-noop.ts +1 -1
- package/src/install-ci-capabilities/intake.ts +2 -2
- package/src/install-ci-capabilities/verify.ts +1 -1
- package/src/install-ci-core.ts +4 -4
- package/src/install-ci-github.ts +1 -1
- package/src/install-ci.ts +4 -4
- package/src/intake-event.ts +6 -6
- package/src/intake-marker.ts +3 -3
- package/src/intake-triage.ts +2 -2
- package/src/intake-trigger-template.ts +17 -17
- package/src/intake.ts +97 -97
- package/src/integration-core.ts +35 -35
- package/src/isolation.ts +3 -3
- package/src/issue-provider.ts +4 -4
- package/src/item-lock.ts +21 -21
- package/src/item-path.ts +2 -2
- package/src/ledger-lint.ts +9 -9
- package/src/ledger-read.ts +81 -81
- package/src/ledger-write.ts +3 -3
- package/src/lifecycle-gather.ts +16 -16
- package/src/lifecycle-pools.ts +4 -4
- package/src/merge-question-surfacer.ts +4 -4
- package/src/mint-adr.ts +4 -4
- package/src/mirror-pool-scan.ts +5 -5
- package/src/needs-attention.ts +22 -22
- package/src/orphan-sidecar.ts +2 -2
- package/src/placement.ts +6 -6
- package/src/prd-to-spec.ts +51 -15
- package/src/prompt.ts +33 -35
- package/src/readiness.ts +1 -1
- package/src/recover-isolated.ts +1 -1
- package/src/repo-config.ts +12 -12
- package/src/review-gate.ts +12 -11
- package/src/review-verdict.ts +2 -2
- package/src/run.ts +6 -6
- package/src/scan.ts +15 -15
- package/src/select-order.ts +1 -1
- package/src/select-priority.ts +13 -13
- package/src/sidecar.ts +3 -3
- package/src/slug-namespace.ts +3 -3
- package/src/spec-complete.ts +2 -2
- package/src/start.ts +4 -4
- package/src/status.ts +7 -7
- package/src/surface-gate.ts +2 -2
- package/src/surface-persist.ts +2 -2
- package/src/tasker-review-loop.ts +15 -15
- package/src/tasking-eligibility.ts +21 -21
- package/src/tasking-lock.ts +27 -28
- package/src/tasking.ts +124 -123
- package/src/triage-gate.ts +1 -1
- package/src/triage-persist.ts +16 -16
- package/src/verify-workflow-template.ts +2 -2
- package/src/work-layout.ts +9 -7
- package/src/workspace.ts +1 -1
package/src/frontmatter.ts
CHANGED
|
@@ -44,45 +44,39 @@ export interface Frontmatter {
|
|
|
44
44
|
/** Content-derived slug id (frontmatter `slug:`). */
|
|
45
45
|
slug: string | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* Source SPEC slug
|
|
48
|
-
* `work/specs/ready/<spec>.md`. The `spec` vocabulary name
|
|
49
|
-
*
|
|
50
|
-
* the
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
47
|
+
* Source SPEC slug: the parent-spec pointer this artifact derives from; the
|
|
48
|
+
* spec lives at `work/specs/ready/<spec>.md`. The `spec` vocabulary name (spec
|
|
49
|
+
* `prd-to-spec-vocabulary-cutover-and-migration-command`). `parseFrontmatter`
|
|
50
|
+
* populates it from the canonical `spec:` key ONLY — the HARD CUTOVER (the last
|
|
51
|
+
* `prd` back-compat surface removed): the legacy `prd:` KEY read is GONE, so an
|
|
52
|
+
* un-migrated `prd:` field no longer silently resolves. A downstream repo
|
|
53
|
+
* migrates its data with `dorfl prd-to-spec` (a purely TEXTUAL `prd: → spec:`
|
|
54
|
+
* rewrite that does NOT go through this parser), after which the field reads
|
|
55
|
+
* canonically. There is no `fm.prd` FIELD.
|
|
54
56
|
*/
|
|
55
57
|
spec: string | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Source spec slug (frontmatter `prd:`); the spec lives at
|
|
58
|
-
* `work/specs/ready/<prd>.md`. The LEGACY vocabulary name for the parent-spec
|
|
59
|
-
* pointer, kept BESIDE {@link spec} through the expand→migrate→contract cutover
|
|
60
|
-
* (prd `prd-to-spec-vocabulary-cutover-and-migration-command`) so every existing
|
|
61
|
-
* `fm.prd` reader keeps working; populated from EITHER the `spec:` or `prd:` key.
|
|
62
|
-
*/
|
|
63
|
-
prd: string | undefined;
|
|
64
58
|
/**
|
|
65
59
|
* The GitHub issue number an `intake`-emitted artifact was transformed from
|
|
66
60
|
* (frontmatter `issue:`). Parsed so the `issue: N` intake writes is
|
|
67
61
|
* MACHINE-READABLE — the close JOB (`runner-in-ci`'s) reaches it to resolve the
|
|
68
62
|
* issue from folder + field state. Carried on EITHER:
|
|
69
63
|
*
|
|
70
|
-
* - a **
|
|
71
|
-
* `task.
|
|
72
|
-
* ONLY on the
|
|
73
|
-
* - a **lone task** (`intake`'s TASK outcome, no `
|
|
64
|
+
* - a **spec** (`intake`'s spec outcome) — a fanned task reaches it via
|
|
65
|
+
* `task.spec: → work/specs/ready/<spec>.md → spec issue:` (the number lives
|
|
66
|
+
* ONLY on the spec, never duplicated across the N fanned tasks); OR
|
|
67
|
+
* - a **lone task** (`intake`'s TASK outcome, no `spec:`) — the provider-agnostic
|
|
74
68
|
* closure link for a task that closes its own issue directly (replaces the old
|
|
75
69
|
* GitHub-only `Fixes #N` body line, which is now a deferred optimisation).
|
|
76
70
|
*
|
|
77
|
-
* INVARIANT — one closure path per task: a task uses `issue:` XOR `
|
|
71
|
+
* INVARIANT — one closure path per task: a task uses `issue:` XOR `spec:`, never
|
|
78
72
|
* both. Either it closes its own issue directly (`issue:`) or it contributes to a
|
|
79
|
-
*
|
|
73
|
+
* spec that closes the issue (`spec:` → spec `issue:`). This is NOT enforced by a
|
|
80
74
|
* throwing validator (there is no frontmatter-validation layer): intake never
|
|
81
|
-
* emits both — its task /
|
|
82
|
-
* a human hand-edit could produce both, and the precedence rule (`
|
|
75
|
+
* emits both — its task / spec dispatch branches are mutually exclusive — so only
|
|
76
|
+
* a human hand-edit could produce both, and the precedence rule (`spec:` wins,
|
|
83
77
|
* `issue:` ignored) is the future close-job's concern (see {@link
|
|
84
|
-
* resolveClosingIssue}), degrading a typo to "use the
|
|
85
|
-
* crashing. `undefined` when omitted (every non-intake
|
|
78
|
+
* resolveClosingIssue}), degrading a typo to "use the spec's number" rather than
|
|
79
|
+
* crashing. `undefined` when omitted (every non-intake spec and most tasks).
|
|
86
80
|
*/
|
|
87
81
|
issue: number | undefined;
|
|
88
82
|
/**
|
|
@@ -112,19 +106,19 @@ export interface Frontmatter {
|
|
|
112
106
|
/** Slugs this item is blocked by; `[]` when omitted or empty. */
|
|
113
107
|
blockedBy: string[];
|
|
114
108
|
/**
|
|
115
|
-
*
|
|
116
|
-
* tasked (resolved against `work/
|
|
109
|
+
* Spec-only: slugs of prds that must already be TASKED before this spec may be
|
|
110
|
+
* tasked (resolved against `work/specs/tasked/` residence, NOT `done/`). `[]` when
|
|
117
111
|
* omitted or empty. Parsed here so the auto-tasker can read it; enforcement
|
|
118
112
|
* lives in the `auto-slice` capability, not in eligibility.
|
|
119
113
|
*/
|
|
120
114
|
taskedAfter: string[];
|
|
121
115
|
/**
|
|
122
116
|
* The per-item override layer for the `promptGuidance` NUDGE namespace
|
|
123
|
-
* (task `prompt-guidance-testfirst-item-override`,
|
|
124
|
-
*
|
|
117
|
+
* (task `prompt-guidance-testfirst-item-override`, spec US #5). A task or
|
|
118
|
+
* spec may carry one or more `promptGuidance.<member>: true | false`
|
|
125
119
|
* frontmatter lines to OVERRIDE the resolved repo policy for THAT ITEM only.
|
|
126
120
|
* Each member is `undefined` when omitted (⇒ inherit the next layer down in
|
|
127
|
-
* the precedence chain: per-task > per-
|
|
121
|
+
* the precedence chain: per-task > per-spec > repo-resolved). The override
|
|
128
122
|
* is honoured at the prompt-assembly seam (`prompt.ts`); it never affects
|
|
129
123
|
* the `verify` gate.
|
|
130
124
|
*
|
|
@@ -300,12 +294,12 @@ export function setFrontmatterMarker(
|
|
|
300
294
|
|
|
301
295
|
/**
|
|
302
296
|
* PROPAGATE the origin-trust PROVENANCE (`origin` + `originTrust`) from a SOURCE
|
|
303
|
-
* artifact (a
|
|
297
|
+
* artifact (a spec) onto a TARGET artifact's content (an emitted task), returning
|
|
304
298
|
* the new content (task `untrusted-origin-forces-build-propose`). The tasker
|
|
305
|
-
* calls this so a task born from an untrusted-origin
|
|
299
|
+
* calls this so a task born from an untrusted-origin spec carries the stamp the
|
|
306
300
|
* BUILD transition reads. IDEMPOTENT: each present source field is written via
|
|
307
301
|
* {@link setFrontmatterMarker} (replace-or-append). When the source has NO `origin`
|
|
308
|
-
* (a human/local-authored
|
|
302
|
+
* (a human/local-authored spec ⇒ trusted), the target is returned UNCHANGED — the
|
|
309
303
|
* normal path is never stamped (zero behaviour change). When a stamp IS applied to
|
|
310
304
|
* a fence-less target, {@link setFrontmatterMarker} now prepends a fence to carry
|
|
311
305
|
* it (tasks the tasker emits always have a fence, so this is the defensive path).
|
|
@@ -334,7 +328,6 @@ export function parseFrontmatter(content: string): Frontmatter {
|
|
|
334
328
|
originTrust: undefined,
|
|
335
329
|
slug: undefined,
|
|
336
330
|
spec: undefined,
|
|
337
|
-
prd: undefined,
|
|
338
331
|
issue: undefined,
|
|
339
332
|
humanOnly: undefined,
|
|
340
333
|
needsAnswers: undefined,
|
|
@@ -378,27 +371,16 @@ export function parseFrontmatter(content: string): Frontmatter {
|
|
|
378
371
|
result.originTrust = v === 'trusted' || v === 'untrusted' ? v : undefined;
|
|
379
372
|
} else if (key === 'slug') {
|
|
380
373
|
result.slug = rawValue === '' ? undefined : unquote(rawValue);
|
|
381
|
-
} else if (key === 'spec'
|
|
382
|
-
//
|
|
383
|
-
//
|
|
384
|
-
// legacy `prd:`
|
|
385
|
-
//
|
|
386
|
-
//
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
if (key === 'spec') {
|
|
390
|
-
// The canonical key wins: overwrite whatever `prd:` may have set.
|
|
391
|
-
if (value !== undefined) {
|
|
392
|
-
result.spec = value;
|
|
393
|
-
result.prd = value;
|
|
394
|
-
}
|
|
395
|
-
} else if (result.spec === undefined) {
|
|
396
|
-
// Legacy `prd:` only fills in when `spec:` has not already set the pair.
|
|
397
|
-
result.spec = value;
|
|
398
|
-
result.prd = value;
|
|
399
|
-
}
|
|
374
|
+
} else if (key === 'spec') {
|
|
375
|
+
// The parent-spec pointer, read from the canonical `spec:` key ONLY into the
|
|
376
|
+
// `fm.spec` field (spec `prd-to-spec-vocabulary-cutover-and-migration-command`,
|
|
377
|
+
// HARD CUTOVER). The legacy `prd:` KEY read is GONE — an un-migrated `prd:`
|
|
378
|
+
// field no longer resolves here; a repo converts its data via the TEXTUAL
|
|
379
|
+
// `dorfl prd-to-spec` rewrite (which does not use this parser). An empty value
|
|
380
|
+
// leaves the field undefined.
|
|
381
|
+
result.spec = rawValue === '' ? undefined : unquote(rawValue);
|
|
400
382
|
} else if (key === 'issue') {
|
|
401
|
-
// Integer issue link (`intake`'s
|
|
383
|
+
// Integer issue link (`intake`'s spec-emit OR a lone-task emit). A
|
|
402
384
|
// non-integer / empty value reads as undefined (the field is absent rather
|
|
403
385
|
// than malformed).
|
|
404
386
|
const n = Number(unquote(rawValue));
|
|
@@ -456,15 +438,15 @@ export function parseFrontmatter(content: string): Frontmatter {
|
|
|
456
438
|
|
|
457
439
|
/**
|
|
458
440
|
* Resolve, from a parsed artifact's frontmatter, HOW it closes its source issue:
|
|
459
|
-
* the `
|
|
441
|
+
* the `spec:` hop or the lone-task `issue:` field. A PURE helper for the FUTURE
|
|
460
442
|
* CI close-job (`runner-in-ci`'s) — it is NOT wired into intake or any reader
|
|
461
443
|
* today; it merely pins the one-closure-path PRECEDENCE in one place.
|
|
462
444
|
*
|
|
463
|
-
* Encodes the invariant: a task uses `issue:` XOR `
|
|
464
|
-
* hand-edit could) BOTH are present, `
|
|
465
|
-
* `issue:` and IGNORES the task's own `issue:` (the fanned-
|
|
466
|
-
* authoritative one; a lone `issue:` on a `
|
|
467
|
-
* that degrades to "use the
|
|
445
|
+
* Encodes the invariant: a task uses `issue:` XOR `spec:`. When (only a human
|
|
446
|
+
* hand-edit could) BOTH are present, `spec:` WINS — the close-job hops to the
|
|
447
|
+
* spec's `issue:` and IGNORES the task's own `issue:` (the fanned-spec path is
|
|
448
|
+
* the authoritative one; a lone `issue:` on a `spec:`-bearing task is a
|
|
449
|
+
* contradiction that degrades to "use the spec" rather than crashing).
|
|
468
450
|
*
|
|
469
451
|
* Returns:
|
|
470
452
|
* - `{via: 'spec', spec}` when a `spec:` is present (hop to the spec's `issue:`; the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tier-1 GitHub branch-protection STEP for `install-ci` (
|
|
2
|
+
* Tier-1 GitHub branch-protection STEP for `install-ci` (spec
|
|
3
3
|
* `land-time-reverify-and-parallel-merge-ceiling`, task
|
|
4
4
|
* `install-ci-tier1-branch-protection`; Story 11). Closes the propose-mode
|
|
5
5
|
* PR-merge-time drift window on a GitHub arbiter: a required `verify` check + a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The ADVANCE-LIFECYCLE capability emitter (
|
|
2
|
+
* The ADVANCE-LIFECYCLE capability emitter (SPEC `runner-in-ci`, task
|
|
3
3
|
* `install-ci-advance-lifecycle-workflow`; capability C: auto-triage observations
|
|
4
4
|
* + surface declared blockers + apply committed answers). A SELF-REGISTERING
|
|
5
5
|
* module: it calls {@link registerCapability} at import time, so
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The CLOSE-JOB capability emitter (
|
|
2
|
+
* The CLOSE-JOB capability emitter (SPEC `runner-in-ci`, task
|
|
3
3
|
* `install-ci-close-job-workflow`; capability E: close issues when their work
|
|
4
4
|
* lands). A SELF-REGISTERING module: it calls {@link registerCapability} at import
|
|
5
5
|
* time, so {@link loadCapabilityRegistry} picks it up WITHOUT any edit to a shared
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* REFERENCE capability registration (
|
|
2
|
+
* REFERENCE capability registration (SPEC `runner-in-ci`, task
|
|
3
3
|
* `install-ci-core-and-github-adapter`). This file proves the capability-emitter
|
|
4
4
|
* REGISTRY seam works as a DIRECTORY of self-registering modules: a new capability
|
|
5
5
|
* is a NEW file in `install-ci-capabilities/` that calls {@link registerCapability}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The ISSUE-INTAKE capability emitter (
|
|
2
|
+
* The ISSUE-INTAKE capability emitter (SPEC `runner-in-ci`, task
|
|
3
3
|
* `install-ci-intake-trigger-and-review-surface`; capability D: consider incoming
|
|
4
|
-
* issues → task/
|
|
4
|
+
* issues → task/SPEC, PLUS insertion point E: surface the review verdict into the
|
|
5
5
|
* issue thread). A SELF-REGISTERING module: it calls {@link registerCapability} at
|
|
6
6
|
* import time, so {@link loadCapabilityRegistry} picks it up WITHOUT any edit to a
|
|
7
7
|
* shared central list/switch (the file-orthogonality contract — this task and the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The VERIFY capability emitter (
|
|
2
|
+
* The VERIFY capability emitter (spec
|
|
3
3
|
* `land-time-reverify-and-parallel-merge-ceiling`, task
|
|
4
4
|
* `install-ci-tier1-branch-protection`; Story 11 — Tier-1 GitHub ceiling).
|
|
5
5
|
* A SELF-REGISTERING module: it calls {@link registerCapability} at import
|
package/src/install-ci-core.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The provider-agnostic CORE of the `install-ci` scaffolder (
|
|
2
|
+
* The provider-agnostic CORE of the `install-ci` scaffolder (spec `runner-in-ci`,
|
|
3
3
|
* task `install-ci-core-and-github-adapter`; US #7/#10). `install-ci` is a
|
|
4
4
|
* human-run, one-time SCAFFOLDER (mirrors whitesmith's `src/providers/github-ci.ts`):
|
|
5
5
|
* it writes `.github/**` + a composite setup action + secrets so autonomous work
|
|
@@ -106,7 +106,7 @@ export interface CIConfigFile {
|
|
|
106
106
|
/** API key values keyed by env var name. Only present with `--include-secrets`. */
|
|
107
107
|
secrets?: Record<string, string>;
|
|
108
108
|
/**
|
|
109
|
-
* The project-setup escape hatch (
|
|
109
|
+
* The project-setup escape hatch (spec `install-ci-project-provisioning`,
|
|
110
110
|
* task `install-ci-project-setup-hook`): a PROVIDER-NAMESPACED, OPAQUE,
|
|
111
111
|
* NATIVE-SYNTAX pass-through map. The key is a provider id (today only
|
|
112
112
|
* `github`); the value is the user's own project-toolchain snippet in that
|
|
@@ -197,7 +197,7 @@ export interface CIProviderContext {
|
|
|
197
197
|
/**
|
|
198
198
|
* OPTIONALLY report whether the configured credential has REPO-ADMIN scope
|
|
199
199
|
* on the provider (→ can set branch protection / rulesets). Used by the
|
|
200
|
-
* Tier-1 branch-protection step (
|
|
200
|
+
* Tier-1 branch-protection step (spec `land-time-reverify-and-parallel-
|
|
201
201
|
* merge-ceiling`, Story 11) to pick `auto-configure` vs `print fallback`.
|
|
202
202
|
* `true` ⇒ admin, `false` ⇒ explicitly NOT admin, `undefined` ⇒ unknown
|
|
203
203
|
* (treated as non-admin: never silently attempt a call that would 403).
|
|
@@ -809,7 +809,7 @@ ${indent(modelsJsonStr, 8)}
|
|
|
809
809
|
}
|
|
810
810
|
|
|
811
811
|
// PREFER-LOCAL RESOLVER (task install-ci-prefer-project-local-dorfl,
|
|
812
|
-
//
|
|
812
|
+
// SPEC install-ci-project-provisioning axis C1+C3): emit a `dorfl` SHIM
|
|
813
813
|
// that resolves a project-local `node_modules/.bin/dorfl` FIRST (the repo's
|
|
814
814
|
// devDep pin, populated by the project-setup hook's `pnpm install` — C3),
|
|
815
815
|
// and falls back to the global bootstrap dorfl this composite action just
|
package/src/install-ci-github.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The thin GitHub adapter for `install-ci` (
|
|
2
|
+
* The thin GitHub adapter for `install-ci` (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-core-and-github-adapter`). It plugs into the provider-agnostic
|
|
4
4
|
* {@link CIProviderContext} seam from `install-ci-core.ts`: the core owns the
|
|
5
5
|
* wizard / config / `models.json` / `--export-config` / `--fake` / secret
|
package/src/install-ci.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `install-ci` orchestrator (
|
|
2
|
+
* The `install-ci` orchestrator (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-core-and-github-adapter`): ties the provider-agnostic core
|
|
4
4
|
* (`install-ci-core.ts`) to a CI-provider adapter (the first being GitHub,
|
|
5
5
|
* `install-ci-github.ts`) through the {@link CIProviderContext} seam. It drives
|
|
@@ -252,7 +252,7 @@ export async function installCI(
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
// 5. Assemble + write the artifacts (composite setup action + auth). The
|
|
255
|
-
// project-setup escape hatch (
|
|
255
|
+
// project-setup escape hatch (spec `install-ci-project-provisioning`) lives
|
|
256
256
|
// on `config.projectSetup` as a PROVIDER-NAMESPACED, OPAQUE map; we look up
|
|
257
257
|
// THIS provider's payload via the seam (`ctx.providerId`) and ask the
|
|
258
258
|
// adapter to render it to the FIRST-steps fragment (`ctx.renderProjectSetup`).
|
|
@@ -275,7 +275,7 @@ export async function installCI(
|
|
|
275
275
|
log(` wrote ${path}`);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
// 5b. Tier-1 GitHub branch protection (
|
|
278
|
+
// 5b. Tier-1 GitHub branch protection (spec land-time-reverify-and-parallel-
|
|
279
279
|
// merge-ceiling, Story 11). Auto-configures when the credential is admin-
|
|
280
280
|
// scoped (one `gh api` PUT on the protection endpoint, required check
|
|
281
281
|
// `verify` + strict: true); prints the exact ready-to-run `gh api` command
|
|
@@ -313,7 +313,7 @@ export async function installCI(
|
|
|
313
313
|
" DORFL_AUTO_TASK: 'true'",
|
|
314
314
|
);
|
|
315
315
|
// Project-toolchain boundary (task install-ci-document-toolchain-boundary,
|
|
316
|
-
//
|
|
316
|
+
// SPEC install-ci-project-provisioning axis (A)). dorfl declares
|
|
317
317
|
// engines.node '>=18' and the generated composite action pins Node 22 only
|
|
318
318
|
// for dorfl's own runtime — it does NOT provision the project's toolchain.
|
|
319
319
|
// State that boundary explicitly so a maintainer whose project pins a
|
package/src/intake-event.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* **`intake`'s PURE event-classification** (task `intake-event-classification`,
|
|
2
|
+
* **`intake`'s PURE event-classification** (task `intake-event-classification`, spec
|
|
3
3
|
* `issue-intake` US #2 — the resume-on-thread-change behaviour).
|
|
4
4
|
*
|
|
5
5
|
* `intake` is a CONVERSATION on an issue thread: a run may ASK a clarifying question
|
|
6
|
-
* and STOP, expecting a LATER run to resume from the updated thread (
|
|
6
|
+
* and STOP, expecting a LATER run to resume from the updated thread (spec "Loop
|
|
7
7
|
* closure" / the decision table's ASK row). This module is the PURE CONTROL-PATH
|
|
8
8
|
* classifier the re-run depends on: given an issue EVENT, it decides whether `intake`
|
|
9
9
|
* should RE-EVALUATE the whole thread or IGNORE the event.
|
|
10
10
|
*
|
|
11
|
-
* THE CANONICAL RULE (from
|
|
11
|
+
* THE CANONICAL RULE (from spec `issue-intake`, "The engine shape"): *"The loop
|
|
12
12
|
* re-runs on a new comment OR an issue-body edit (re-evaluate the whole thread); a
|
|
13
13
|
* buried prior-comment edit is IGNORED."*
|
|
14
14
|
*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* distinction the rule turns on is "a NEW turn vs an edit of a BURIED prior turn",
|
|
24
24
|
* NOT "edit vs reply".
|
|
25
25
|
*
|
|
26
|
-
* SCOPE FENCE (
|
|
26
|
+
* SCOPE FENCE (spec "Scope: the engine only"): this is ONLY the pure classifier. It is
|
|
27
27
|
* NOT CI's TRIGGER POLICY (command/every-issue, maintainer/anyone) — that is
|
|
28
28
|
* `runner-in-ci`'s. CI's trigger LATER CONSULTS this classifier, but the policy of
|
|
29
29
|
* WHO/WHAT may trigger lives in CI, not here. This module touches no seam, no git, no
|
|
@@ -69,10 +69,10 @@ export interface IntakeEvent {
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Classify an issue EVENT into the CONTROL-PATH decision: RE-EVALUATE the whole
|
|
72
|
-
* thread, or IGNORE the event. The PURE realisation of the
|
|
72
|
+
* thread, or IGNORE the event. The PURE realisation of the spec's canonical rule
|
|
73
73
|
* (no seam, no git, no `gh`).
|
|
74
74
|
*
|
|
75
|
-
* The table (
|
|
75
|
+
* The table (spec `issue-intake` US #2):
|
|
76
76
|
*
|
|
77
77
|
* | event kind | decision | why |
|
|
78
78
|
* | ----------------------- | ------------- | -------------------------------------------- |
|
package/src/intake-marker.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {brand} from './brand.js';
|
|
|
2
2
|
import type {IssueComment} from './issue-provider.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* **The intake MARKER** (task `intake-self-awareness-resumption-tracking`,
|
|
5
|
+
* **The intake MARKER** (task `intake-self-awareness-resumption-tracking`, spec
|
|
6
6
|
* `issue-intake` US #2/#10): the ONE primitive the deterministic pre-decision
|
|
7
7
|
* TRIAGE GATE is built on. A machine-readable HIDDEN HTML comment intake stamps on
|
|
8
8
|
* EVERY comment it posts, recording a neutral FACT about what intake did:
|
|
@@ -26,7 +26,7 @@ import type {IssueComment} from './issue-provider.js';
|
|
|
26
26
|
* TERMINAL is the TRIAGE's interpretation, NEVER data in the marker (no `terminal`
|
|
27
27
|
* field): if a kind's terminal-ness ever changes that is a triage change and old
|
|
28
28
|
* markers stay valid.
|
|
29
|
-
* - **`slug`** \u2014 present only on `kind=created` (which task/
|
|
29
|
+
* - **`slug`** \u2014 present only on `kind=created` (which task/spec intake produced).
|
|
30
30
|
* - **`seen=<id>,\u2026`** \u2014 the per-run DELTA of HUMAN comment ids intake READ this run
|
|
31
31
|
* (EXCLUDING intake's own marker-comments AND any human id already in a prior
|
|
32
32
|
* marker's `seen=`). Ids, not a count, because a count cannot distinguish "a new
|
|
@@ -47,7 +47,7 @@ export interface IntakeMarker {
|
|
|
47
47
|
kind: IntakeMarkerKind;
|
|
48
48
|
/** The HUMAN comment ids intake READ this run (the per-run delta; may be empty). */
|
|
49
49
|
seen: string[];
|
|
50
|
-
/** The created task/
|
|
50
|
+
/** The created task/spec slug \u2014 present only on `kind=created`. */
|
|
51
51
|
slug?: string;
|
|
52
52
|
}
|
|
53
53
|
|
package/src/intake-triage.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from './intake-marker.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* **The intake TRIAGE GATE** (task `intake-self-awareness-resumption-tracking`,
|
|
9
|
+
* **The intake TRIAGE GATE** (task `intake-self-awareness-resumption-tracking`, spec
|
|
10
10
|
* `issue-intake` US #2/#10): a DETERMINISTIC pre-decision gate that runs UNDER the
|
|
11
11
|
* processing lock, BEFORE the decision prompt, deciding whether intake should run
|
|
12
12
|
* the prompt at all. Built ENTIRELY on the thread MARKER (no sidecar, no cursor, no
|
|
@@ -55,7 +55,7 @@ export type IntakeTriageDecision =
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Run the TRIAGE over the issue's full comment thread (oldest-first, as
|
|
58
|
-
* `listComments` returns it). The canonical branches (
|
|
58
|
+
* `listComments` returns it). The canonical branches (spec `issue-intake`):
|
|
59
59
|
*
|
|
60
60
|
* 1. **Last comment is INTAKE's** (carries a marker). Build `seenSet` = the UNION of
|
|
61
61
|
* every intake marker's `seen=` id-list, then:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `install-ci` ISSUE-INTAKE capability (
|
|
2
|
+
* The `install-ci` ISSUE-INTAKE capability (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-intake-trigger-and-review-surface`; capability D: consider incoming
|
|
4
|
-
* issues → task/
|
|
4
|
+
* issues → task/spec, AND insertion point E: surface the review verdict back into
|
|
5
5
|
* the issue thread). This module GENERATES the one fixed intake workflow file and
|
|
6
6
|
* STRUCTURALLY VALIDATES it, mirroring the snapshot-assertion style of
|
|
7
7
|
* `advance-lifecycle-template.ts` / `advance-ci-template.ts` (the package depends on
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* ({@link deriveIntakeFlags}) — CI's merge-vs-propose POLICY, the load-bearing
|
|
11
11
|
* testable logic the workflow encodes at runtime.
|
|
12
12
|
*
|
|
13
|
-
* SCOPE FENCE (
|
|
13
|
+
* SCOPE FENCE (spec Out-of-Scope): the issue→artifact TRANSFORM engine is
|
|
14
14
|
* `issue-intake`'s (`intake <N>` + its four-outcome dispatch + the per-outcome
|
|
15
15
|
* KNOBS + the lone-task review that posts to the issue thread). CI only
|
|
16
16
|
* WIRES/SCHEDULES/INVOKES it and owns the merge-vs-propose POLICY + the delivery
|
|
17
17
|
* surface. This module emits NO transform; it emits the WORKFLOW that calls it.
|
|
18
18
|
*
|
|
19
|
-
* The discipline (
|
|
19
|
+
* The discipline (spec capability-D row + the merge-vs-propose POLICY + the two
|
|
20
20
|
* RESOLVED design decisions in the task):
|
|
21
21
|
*
|
|
22
22
|
* - TRIGGERS: `issues` opened, `issue_comment` created, and a label
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* everywhere" path is a LOUD, NON-DEFAULT opt-in — the default is conservative
|
|
37
37
|
* (propose / human-in-the-loop).
|
|
38
38
|
* - INSERTION POINT E (the issue-thread review surface): the review verdict over
|
|
39
|
-
* intake's generated
|
|
39
|
+
* intake's generated specs/tasks is surfaced into the ISSUE THREAD via the
|
|
40
40
|
* `IssueProvider.postIssueComment` seam (issue thread, by NUMBER — NOT the PR
|
|
41
41
|
* seam `postPRComment`, which is keyed by url). This is REUSED, not new:
|
|
42
42
|
* `intake <N>` already runs the lone-task review/edit loop and posts its
|
|
@@ -65,7 +65,7 @@ export const INTAKE_TRIGGER_CAPABILITY_ID = 'intake';
|
|
|
65
65
|
|
|
66
66
|
/** The wizard-facing label for the issue-intake capability. */
|
|
67
67
|
export const INTAKE_TRIGGER_CAPABILITY_LABEL =
|
|
68
|
-
'Consider incoming issues → task/
|
|
68
|
+
'Consider incoming issues → task/spec + surface the review verdict into the issue thread (the intake trigger: issues / issue_comment / label)';
|
|
69
69
|
|
|
70
70
|
/** The repo-relative path (under the output base) of the emitted workflow. */
|
|
71
71
|
export const INTAKE_TRIGGER_WORKFLOW_PATH = 'workflows/intake.yml';
|
|
@@ -106,7 +106,7 @@ export interface IntakeIntegrationFlags {
|
|
|
106
106
|
task: 'merge' | 'propose';
|
|
107
107
|
/**
|
|
108
108
|
* The ORIGIN-TRUST verdict CI passes to `intake <N>` via `--origin-trust`
|
|
109
|
-
* (task `untrusted-origin-forces-build-propose`) so the emitted
|
|
109
|
+
* (task `untrusted-origin-forces-build-propose`) so the emitted spec/task is
|
|
110
110
|
* STAMPED with how it was born. Derived from the SAME `author_association` case
|
|
111
111
|
* as the integration flags (it IS `authorTrusted` collapsed to the wire value),
|
|
112
112
|
* so the stamp and the integration mode CANNOT desync. `intake.ts` writes it
|
|
@@ -134,7 +134,7 @@ export interface IntakeGateState {
|
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* DERIVE the per-outcome merge-vs-propose flags from the gate state COMPOSED with
|
|
137
|
-
* author-trust — CI's merge-vs-propose POLICY (
|
|
137
|
+
* author-trust — CI's merge-vs-propose POLICY (spec "merge-vs-propose POLICY" +
|
|
138
138
|
* "Composed with AUTHOR-TRUST"; task Decision 1). This is the load-bearing pure
|
|
139
139
|
* logic the workflow encodes at runtime (it reads `author_association` off the
|
|
140
140
|
* event payload and sets the flags accordingly):
|
|
@@ -167,9 +167,9 @@ export function deriveIntakeFlags(options: {
|
|
|
167
167
|
// ORIGIN-TRUST stamp (task `untrusted-origin-forces-build-propose`): the SAME
|
|
168
168
|
// author-trust verdict, collapsed to the wire value `intake` stamps onto the
|
|
169
169
|
// emitted artifact. Derived HERE — next to the integration flags, off the SAME
|
|
170
|
-
// `authorTrusted` input — so the stamp and the task/
|
|
170
|
+
// `authorTrusted` input — so the stamp and the task/spec modes cannot desync.
|
|
171
171
|
// It is NOT a re-resolution of trust (CI already resolved it); it is the verdict
|
|
172
|
-
// being CARRIED so it survives the
|
|
172
|
+
// being CARRIED so it survives the spec/task merge boundary (the becomes-code
|
|
173
173
|
// checkpoint is not laundered when the file lands on main).
|
|
174
174
|
const originTrust: 'trusted' | 'untrusted' = authorTrusted
|
|
175
175
|
? 'trusted'
|
|
@@ -216,12 +216,12 @@ export function generateIntakeWorkflow(config: ResolvedCIConfig): string {
|
|
|
216
216
|
const setupWith = providerSecretsWithBlock(config);
|
|
217
217
|
return `\
|
|
218
218
|
# dorfl — the ISSUE INTAKE trigger in CI (capability D: consider incoming
|
|
219
|
-
# issues → task/
|
|
220
|
-
# issue thread,
|
|
219
|
+
# issues → task/spec, PLUS insertion point E: surface the review verdict into the
|
|
220
|
+
# issue thread, spec runner-in-ci). EMITTED by \`dorfl install-ci\`; the human
|
|
221
221
|
# commits it. DO NOT hand-edit a copy — re-run install-ci to upgrade the shell.
|
|
222
222
|
#
|
|
223
223
|
# WHAT IT DOES — \`dorfl intake <N>\` reads issue #N + its comment thread,
|
|
224
|
-
# runs a prompt→verdict decision (ask / task /
|
|
224
|
+
# runs a prompt→verdict decision (ask / task / SPEC / bounce), and dispatches it.
|
|
225
225
|
# CI owns ONLY the trigger + the merge-vs-propose POLICY + the delivery surface;
|
|
226
226
|
# the TRANSFORM is the engine's (the Out-of-Scope fence — CI re-implements none of
|
|
227
227
|
# it). The lone-task review/edit loop \`intake\` already runs ALSO surfaces its
|
|
@@ -307,7 +307,7 @@ env:
|
|
|
307
307
|
# permissive merge side; author-trust then forces propose for a task from an
|
|
308
308
|
# untrusted author.
|
|
309
309
|
DORFL_AUTO_BUILD: 'false' # gate: will an agent auto-build the emitted task next?
|
|
310
|
-
DORFL_AUTO_TASK: 'false' # gate: will an agent auto-task the emitted
|
|
310
|
+
DORFL_AUTO_TASK: 'false' # gate: will an agent auto-task the emitted spec next?
|
|
311
311
|
|
|
312
312
|
jobs:
|
|
313
313
|
intake:
|
|
@@ -365,8 +365,8 @@ jobs:
|
|
|
365
365
|
|
|
366
366
|
# ORIGIN-TRUST stamp (task untrusted-origin-forces-build-propose):
|
|
367
367
|
# derived from the SAME \${trusted} case above (one author-trust read,
|
|
368
|
-
# two consumers — the task/
|
|
369
|
-
# desync). \`intake\` STAMPS this onto the emitted
|
|
368
|
+
# two consumers — the task/spec modes AND the stamp — so they cannot
|
|
369
|
+
# desync). \`intake\` STAMPS this onto the emitted spec/task frontmatter
|
|
370
370
|
# (origin: issue + originTrust: <value>); it does NOT re-resolve trust
|
|
371
371
|
# (that is CI's policy, passed IN). The stamp SURVIVES the merge boundary
|
|
372
372
|
# so a later auto-task/auto-build of an untrusted-origin artifact still
|
|
@@ -519,7 +519,7 @@ export function validateIntakeWorkflow(text: string): IntakeTriggerValidation {
|
|
|
519
519
|
), 'the policy derivation must be able to emit `--propose-spec` (autoTask on).');
|
|
520
520
|
// ORIGIN-TRUST stamp (task untrusted-origin-forces-build-propose): the shell
|
|
521
521
|
// must derive `--origin-trust <trusted|untrusted>` from the SAME author-trust
|
|
522
|
-
// case it uses for the task/
|
|
522
|
+
// case it uses for the task/SPEC modes, and pass it to `intake` so the emitted
|
|
523
523
|
// artifact is stamped (the stamp + the modes cannot desync).
|
|
524
524
|
require('derives-origin-trust-untrusted', /--origin-trust=untrusted\b/.test(
|
|
525
525
|
operative,
|