pi-dev-flow 0.93.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/docs/gates.md +21 -10
- package/docs/playbook.md +1 -1
- package/extensions/dev-flow.ts +1 -1
- package/package.json +1 -1
- package/skills/dev-flow/SKILL.md +2 -2
- package/skills/dev-flow/references/implement.md +10 -1
- package/skills/dev-flow/references/pre-release.md +5 -6
- package/skills/dev-flow/references/reflect.md +5 -3
- package/skills/flow-review/SKILL.md +1 -1
- package/src/core.ts +42 -26
- package/src/runtime/base.ts +1 -1
- package/src/runtime/gates.ts +34 -15
- package/src/runtime/ship.ts +24 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.94.0] - 2026-11-19
|
|
8
|
+
|
|
9
|
+
**The review runs before Verified?, so you're asked Verified? once; an unanswered re-verify holds the release; your Release? word stands on the first call under `yolo = until-release`; and `flow roadmap done` closes the items you named.**
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **The review runs before Verified?, so you're asked Verified? once (gh#248).** The review step ran after your Verified?, so every finding changed the tree you had already approved and the agent asked again. One flow asked three times. The review now runs in implement once `flow check` is green, and the first `flow verify` refuses until one is on record (a review worker records itself; an inline one is recorded with `flow review done "<verdict>"`). Your one look covers the tree that ships. A flow already at pre-release without a review still owes it at release.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- **An unanswered re-verify holds the release (gh#249).** When `flow verify` at pre-release asked Verified? again, nothing recorded that it was waiting. The agent took your "verified", went straight to release prep and shipped without recording it, so the release went out under the older word with only a warning. `flow release` now refuses until the answer is recorded with `flow verify --confirmed`.
|
|
16
|
+
- **Your Release? word stands on the first call under `yolo = until-release` (gh#206).** On a yolo flow the knob made the gate ask Release? itself first, so an answer you had already given in chat was refused twice and you had to repeat it. A plain `--confirmed` now stands like on any flow. A replayed `--yolo --confirmed` (gh#219) and a release with commits after Verified? or a stale build are still asked first.
|
|
17
|
+
- **`flow roadmap done` closes the items you named (gh#245).** The list was numbered over open items only, so closing item 6 renumbered the rest: for "close 6 and 7", a second `done 7` hit the item that used to be 8. Numbers are now row numbers: a done item keeps its row, so the other numbers stay where the list printed them. `done 6,7` closes several in one call, and one bad number closes none. `drop` takes a batch too, and `drop` and `tidy` say the numbers changed.
|
|
18
|
+
|
|
7
19
|
## [0.93.0] - 2026-11-18
|
|
8
20
|
|
|
9
21
|
**`flow release` needs a review on record and opens the PR with the body your template asks for; checks stay passed across a commit of the same tree; feature worktrees take only their own feature's work; and `flow finish` names what is really wrong.**
|
package/docs/gates.md
CHANGED
|
@@ -88,6 +88,7 @@ Run without `--confirmed`, it deploys for your review:
|
|
|
88
88
|
4. Asks **Verified?**
|
|
89
89
|
|
|
90
90
|
It refuses if:
|
|
91
|
+
- no review is on record (see below);
|
|
91
92
|
- the branch has no commits (except a release-only flow on a versioned project with unreleased
|
|
92
93
|
commits on main);
|
|
93
94
|
- a check, the build or the post-deploy health probe fails;
|
|
@@ -102,8 +103,17 @@ With `--confirmed`, it never rewrites history. If main moved since the review de
|
|
|
102
103
|
your review, it only checks that the app still answers. If the tree changed, or the app stopped
|
|
103
104
|
answering, it deploys again.
|
|
104
105
|
|
|
105
|
-
**
|
|
106
|
-
|
|
106
|
+
**The review comes before Verified?** The playbook's review step (`release.review`, `/flow-review`
|
|
107
|
+
by default) runs in implement, once `flow check` is green, and the first `flow verify` refuses until
|
|
108
|
+
it is on record: a `flow_stage` review worker records itself, and an inline review is recorded with
|
|
109
|
+
`flow review done "<verdict>"`. Run after Verified?, every review finding changed the tree you had
|
|
110
|
+
already approved and you were asked again. Reviewed first, your one look covers the tree that ships.
|
|
111
|
+
Docs flows and release-only cuts owe none, `review = ""` under `## release` turns it off, and
|
|
112
|
+
skipping it is your call (`flow review --skip`, asked as **Skip review?**).
|
|
113
|
+
|
|
114
|
+
**At pre-release, `verify` is the re-verify:** after a late fix, it re-runs the build, deploy and
|
|
115
|
+
probes on the current tree and asks Verified? again. A standing yolo never answers this, and
|
|
116
|
+
`flow release` refuses until the answer is recorded with `flow verify --confirmed`.
|
|
107
117
|
|
|
108
118
|
## release: Release?
|
|
109
119
|
|
|
@@ -122,15 +132,16 @@ Proves the branch is ready to ship:
|
|
|
122
132
|
before a commit holding only release prep (version file, changelog) stay green without a re-run;
|
|
123
133
|
set `recheck = always` in `## release` to re-run them anyway. `release.preflight` passes if set.
|
|
124
134
|
- There are no leftover conflict markers (`<<<<<<<`) and no uncommitted files in the worktree.
|
|
125
|
-
- **A review is on record.**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
135
|
+
- **A review is on record.** It normally ran before Verified? (see [verify](#verify-verified)); a
|
|
136
|
+
flow that reached pre-release without one owes it here. The verdict stays advisory; only that a
|
|
137
|
+
review ran is checked.
|
|
138
|
+
- **No re-verify is waiting.** When `flow verify` at pre-release asked Verified? again, the answer
|
|
139
|
+
has to be recorded (`flow verify --confirmed`) before the release ships under it.
|
|
130
140
|
|
|
131
141
|
**Release? often answers itself** (`ask = on-change`, the default). That happens when your call is
|
|
132
|
-
on record and only release prep (bump, changelog) changed since Verified?. A `--confirmed` given before the gate asked doesn't count where a question
|
|
133
|
-
or a stale build): the gate asks first.
|
|
142
|
+
on record and only release prep (bump, changelog) changed since Verified?. A `--confirmed` given before the gate asked doesn't count where a question carries news you haven't
|
|
143
|
+
seen (commits after Verified? on a yolo flow, or a stale build): the gate asks first. A yolo held back
|
|
144
|
+
only by `yolo = until-release` is asked like any flow, so your chat answer stands on the first call.
|
|
134
145
|
|
|
135
146
|
It still asks when:
|
|
136
147
|
- code changed after Verified?;
|
|
@@ -213,7 +224,7 @@ To drop an unreleased feature, use `flow abort` instead.
|
|
|
213
224
|
## reflect, roadmap, doctor
|
|
214
225
|
|
|
215
226
|
- `flow reflect …` manages the notes queue. See [reflections](reflections.md).
|
|
216
|
-
- `flow roadmap [add "<feature>" [--slug=] [--brief=] | pick <n> <slug> | done <n> | drop <n> | tidy]`
|
|
227
|
+
- `flow roadmap [add "<feature>" [--slug=] [--brief=] | pick <n> <slug> | done <n>[,<n>…] | drop <n>[,<n>…] | tidy]` — `<n>` is the row number the list prints; `done` leaves the others in place, `drop` and `tidy` renumber
|
|
217
228
|
manages `.dev-flow/roadmap.md`. `pick` stamps an item for `flow start <slug>`, and `finish` checks
|
|
218
229
|
it off when the feature ships.
|
|
219
230
|
- `flow doctor ["<note>"]` is a read-only health report: playbook drift, dead commands, ghost
|
package/docs/playbook.md
CHANGED
|
@@ -178,7 +178,7 @@ These go under `## pre-release` or `## release`. Either section works.
|
|
|
178
178
|
| `recheck` | `prep-skip` | `prep-skip`: checks stay green across a commit that holds only the version bump and changelog. `always`: re-run them. |
|
|
179
179
|
| `yolo` | `all` | `until-release`: a yolo given earlier never answers Release?. The gate asks, and only your answer to that question releases. |
|
|
180
180
|
| `reflect` | `on-friction` | `always`: run the closing reflection on every finish |
|
|
181
|
-
| `review` | `/flow-review` | the review step
|
|
181
|
+
| `review` | `/flow-review` | the review step, run in implement before Verified?. `flow verify` requires one on record (see [gates](gates.md#verify-verified)), and so does `flow release`; set it empty to turn that off. |
|
|
182
182
|
| `preflight` | — | runs in the worktree at `flow release` before anything ships, for example `docker build .` |
|
|
183
183
|
| `artifact` | — | proves the release was published, for example `npm view <pkg>@{version} version` |
|
|
184
184
|
| `releases` | `true` | `false` skips creating a forge release |
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -526,7 +526,7 @@ export default function devFlow(pi: ExtensionAPI) {
|
|
|
526
526
|
name: "flow_stage",
|
|
527
527
|
label: "Stage worker",
|
|
528
528
|
description:
|
|
529
|
-
'Optional: hand a slice of work to a fresh pi session so this conversation stays lean. op "implement" (stage implement) — the worker edits and commits a slice on the feature branch; op "review" (implement or pre-release) — a fresh read-only reviewer that returns findings and a PASS/FAIL verdict (the verdict is advisory; that a review ran is recorded — flow
|
|
529
|
+
'Optional: hand a slice of work to a fresh pi session so this conversation stays lean. op "implement" (stage implement) — the worker edits and commits a slice on the feature branch; op "review" (implement or pre-release) — a fresh read-only reviewer that returns findings and a PASS/FAIL verdict (the verdict is advisory; that a review ran is recorded — run it in implement once flow check is green: flow verify requires a review on record before it asks Verified?); op "reflect" (any stage; flow finish runs it itself before cleanup) — a fresh read-only reviewer of this session\'s transcript and every worker transcript that returns classified reflection findings (docs / code / plugin) with a fold-or-drop recommendation each, for the operator to decide. The plan path, branch, commits so far and the project checks are added to the brief automatically — `note` is just the slice: what to do, operator answers and decisions the worker cannot see. The worker holds no flow tool; gates and checkpoints stay with you. Delegate an implement slice when it is in the plan, provable by flow check, needs no operator input mid-slice and is big enough (≈4+ files or heavy reading) to crowd this context; small work, small fixes, mid-debug work, operator-judged work and final integration stay inline (criteria: references/implement.md). In pi-web the worker appears in the session\'s Agents menu as a subagent (running while it works, then its final status); the opened transcript holds its report.',
|
|
530
530
|
promptSnippet: 'flow_stage(op: "implement"|"review"|"reflect", note, label?) — optional fresh-session worker for a big implement slice, an independent review, or a reflection (flow finish runs the closing one itself); gates stay with you; in pi-web workers show up as subagents in the Agents menu',
|
|
531
531
|
parameters: Type.Object({
|
|
532
532
|
op: Type.String({ description: '"implement" (a worker edits + commits a slice), "review" (read-only reviewer, findings + verdict) or "reflect" (read-only reviewer of the session transcripts, reflection findings + fold/drop recommendations)' }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.0",
|
|
4
4
|
"description": "Enforced feature workflow for Pi: plan → implement → pre-release → release, gated checkpoints, self-improvement reflections, one git worktree per feature, changelog + publish as part of the release",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
package/skills/dev-flow/SKILL.md
CHANGED
|
@@ -71,8 +71,8 @@ The stage injection names the file to read now; this is the map.
|
|
|
71
71
|
| --- | --- |
|
|
72
72
|
| `references/start.md` | `flow init`, starting a feature, modes (`--patch`, `--docs`, `--ui`), merge policy |
|
|
73
73
|
| `references/plan.md` | plan — research, clarify, plan file, mockups, Approve? |
|
|
74
|
-
| `references/implement.md` | implement — worktree, commits, checks, workers, Verified? |
|
|
75
|
-
| `references/pre-release.md` | pre-release —
|
|
74
|
+
| `references/implement.md` | implement — worktree, commits, checks, workers, review, Verified? |
|
|
75
|
+
| `references/pre-release.md` | pre-release — docs, changelog + bump, Release? |
|
|
76
76
|
| `references/release.md` | release — PR, CI, merge, tag; hands over to finish |
|
|
77
77
|
| `references/finish.md` | finish — closing reflection, fold/drop, cleanup |
|
|
78
78
|
| `references/reflect.md` | reflections and the roadmap backlog |
|
|
@@ -22,6 +22,14 @@ note). Other sessions' worktrees are theirs.
|
|
|
22
22
|
5. UI feature → a real browser visual pass, not just a typecheck.
|
|
23
23
|
6. Walk the **tier-2 checklist** (`- [ ]` items) with the operator honestly —
|
|
24
24
|
it cannot be scripted.
|
|
25
|
+
7. **Review before Verified?**: once `flow check` is green, run the playbook's
|
|
26
|
+
review step (`/flow-review`, or `flow_stage` op `"review"` for a fresh
|
|
27
|
+
reviewer); fix every **Must fix** and **Should fix**, `flow check` again,
|
|
28
|
+
then record it: `flow review done "<verdict in a line>"` (a worker records
|
|
29
|
+
itself). `flow verify` refuses until a review is on record, so the
|
|
30
|
+
operator's Verified? covers the reviewed tree and review fixes never re-ask
|
|
31
|
+
it. Run the review once; skipping it is the operator's word
|
|
32
|
+
(`flow review --skip`, asked as **Skip review?**).
|
|
25
33
|
|
|
26
34
|
### Verified? — two calls
|
|
27
35
|
|
|
@@ -51,7 +59,8 @@ note). Other sessions' worktrees are theirs.
|
|
|
51
59
|
deploy again when the tree is the one it deployed for review — it only
|
|
52
60
|
probes that the app still answers. If the
|
|
53
61
|
default branch moved since the review deploy it refuses: run `flow verify`
|
|
54
|
-
again first. Fixes → iterate and re-verify; that loop is free
|
|
62
|
+
again first. Fixes → iterate and re-verify; that loop is free (a fix that
|
|
63
|
+
changes behaviour needs no new review unless it is large).
|
|
55
64
|
|
|
56
65
|
Verify lands the feature in **pre-release**. A `--docs` feature runs no
|
|
57
66
|
project command and asks only the question.
|
|
@@ -9,15 +9,14 @@ release gate hands over.
|
|
|
9
9
|
tags are `versioning.pattern` rendered from it. No `versioning.file` → stop
|
|
10
10
|
and settle the scheme with the operator; never invent one.
|
|
11
11
|
|
|
12
|
-
1. **Review**:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
one is the operator's word (`flow review --skip`, asked as **Skip review?**).
|
|
12
|
+
1. **Review**: it ran in implement, before Verified? — don't run it again.
|
|
13
|
+
A flow that reached pre-release without one (started on an older dev-flow)
|
|
14
|
+
runs it now: `/flow-review`, fix, `flow check`, `flow review done
|
|
15
|
+
"<verdict>"`; `flow release` refuses until a review is on record.
|
|
17
16
|
- A fix that changes behaviour → `flow verify` again: it redeploys, then
|
|
18
17
|
ask **Verified?** over the fixed build and run `flow verify --confirmed`
|
|
19
18
|
on the answer (stays in pre-release; a standing yolo does not answer it).
|
|
20
|
-
|
|
19
|
+
`flow release` refuses while that re-verify is unanswered.
|
|
21
20
|
2. **Docs**: update them to match the change.
|
|
22
21
|
3. **Changelog + bump** — manifest, changelog heading and tag must agree;
|
|
23
22
|
commit the prep on the feature branch. The release call recorded with
|
|
@@ -54,6 +54,8 @@ never gating.
|
|
|
54
54
|
--slug=<slug> --brief=<notes>` — `flow start <slug>` later seeds the plan
|
|
55
55
|
from the brief. A hand-made `.dev-flow/<slug>/plan/` is a ghost; `flow start
|
|
56
56
|
<slug> --confirmed` adopts it.
|
|
57
|
-
- Shipped outside a flow: `flow roadmap done <n
|
|
58
|
-
checked lines. Not wanted any more (never
|
|
59
|
-
`done` would claim it shipped.
|
|
57
|
+
- Shipped outside a flow: `flow roadmap done <n>` (several: `done 6,7` in one
|
|
58
|
+
call); `flow roadmap tidy` drops checked lines. Not wanted any more (never
|
|
59
|
+
built): `flow roadmap drop <n>` — `done` would claim it shipped.
|
|
60
|
+
- `<n>` is the row number `flow roadmap` prints: `done` leaves every other
|
|
61
|
+
number in place; `drop` and `tidy` renumber, so list again after them.
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Read-only senior-engineer review of a change before it ships: correct, safe,
|
|
5
5
|
holds under load, tested, fast, lean — judged also against the flow's plan.
|
|
6
6
|
Report only, changes no code. Use for "review this", "code review", "is this
|
|
7
|
-
ready to ship?", and as the dev-flow
|
|
7
|
+
ready to ship?", and as the dev-flow review step (implement, before Verified?). Default target:
|
|
8
8
|
the bound flow's branch diff against the default branch.
|
|
9
9
|
argument-hint: "[ref | base..head | file...]"
|
|
10
10
|
---
|
package/src/core.ts
CHANGED
|
@@ -53,6 +53,8 @@ export interface FlowState {
|
|
|
53
53
|
forgeReleaseSkipped?: string; // a gh/glab release create that failed: release-done says so, finish names it so the missing forge release cannot slip past (#63)
|
|
54
54
|
staleBuild?: string; // release ran under an older dev-flow than the checkout by operator choice ("<loaded> (checkout <disk>)"); release-done repeats the acknowledgement
|
|
55
55
|
pendingAsk?: string; // the checkpoint word a gate asked for and has not been given ("Approve?", "Verified?", …) — presentation only (💬 in the footer), it never gates
|
|
56
|
+
/** when flow verify at pre-release asked Verified? over review fixes; cleared by the answer — flow release refuses while it is set */
|
|
57
|
+
reverifyAsked?: string;
|
|
56
58
|
releaseOnly?: boolean; // verify found nothing on the branch but unreleased work on main: this flow only cuts the version (#161)
|
|
57
59
|
versionChoice?: string; // the operator's release call, recorded with Verified? (gh#198): patch | minor | major (counted from the newest tag at release, so a parallel flow taking the number moves it), an exact version, "next" (playbook version = versioned: any bump past the last tag) or "unreleased"
|
|
58
60
|
versionFrom?: string; // the manifest version when the call was recorded — what a patch/minor/major call was counted from at Verified?
|
|
@@ -62,11 +64,11 @@ export interface FlowState {
|
|
|
62
64
|
friction?: number; // process refusals, a gate refusing twice in a row, guard blocks and post-Verified? code changes this feature hit (isFriction; a red check alone is not one) — finish skips the closing reflection at 0 (playbook reflect = on-friction)
|
|
63
65
|
reflectQuiet?: boolean; // finish skipped the closing reflection because the flow had no friction — with nothing else open, Finish? answers itself (release.finish = on-change)
|
|
64
66
|
reviewDeploy?: { wt: string; slot: string; at: string }; // the tree (checkFingerprint) and dev slot `flow verify` deployed for the operator's review — a --confirmed over the same tree does not build and deploy it a second time
|
|
65
|
-
review?: FlowReview; // the
|
|
67
|
+
review?: FlowReview; // the review step ran (worker or inline) or the operator skipped it — flow verify (before Verified?) and flow release refuse without one (gh#233)
|
|
66
68
|
aborted?: string; // flow abort on a feature whose worktree exists: the state is a deliberate abandoned-feature record (gh#138) — the doctor's git-consistency sweep must never flag its hand-removed worktree as drift
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
/** A recorded
|
|
71
|
+
/** A recorded review (run in implement, before Verified?): `worker` (a flow_stage review worker reported), `inline` (the agent ran the
|
|
70
72
|
* playbook's review step and recorded it with `flow review done`), or `skipped` (the operator's word). */
|
|
71
73
|
export interface FlowReview {
|
|
72
74
|
by: "worker" | "inline" | "skipped";
|
|
@@ -2251,45 +2253,57 @@ export function roadmapBriefFor(text: string, slug: string): { item: string; bri
|
|
|
2251
2253
|
/** Number of open roadmap items. */
|
|
2252
2254
|
export const roadmapOpenCount = (text: string) => openChecklistItems(text).length;
|
|
2253
2255
|
|
|
2254
|
-
/**
|
|
2255
|
-
*
|
|
2256
|
-
|
|
2257
|
-
|
|
2256
|
+
/** gh#245: roadmap numbers are row numbers over every item, open and done, the way reflections number
|
|
2257
|
+
* theirs (gh#197). Numbered over open items only, `done 6` shifted the old 7 into 6, so "close 6 and 7"
|
|
2258
|
+
* closed one item twice over and the wrong one went with it. A done item keeps its row, so closing one
|
|
2259
|
+
* leaves every other number where `list` printed it; drop and tidy remove rows and renumber. */
|
|
2260
|
+
const isRoadmapRow = (l: string) => isOpenItem(l) || isDoneItem(l);
|
|
2261
|
+
|
|
2262
|
+
/** The open items with their row numbers — what `flow roadmap` lists and pick/done/drop take. */
|
|
2263
|
+
export function roadmapOpenRows(text: string): { row: number; item: string }[] {
|
|
2264
|
+
let row = 0;
|
|
2265
|
+
const out: { row: number; item: string }[] = [];
|
|
2266
|
+
for (const l of text.split("\n")) {
|
|
2267
|
+
if (!isRoadmapRow(l)) continue;
|
|
2268
|
+
row++;
|
|
2269
|
+
if (isOpenItem(l)) out.push({ row, item: l.trim().slice(6) });
|
|
2270
|
+
}
|
|
2271
|
+
return out;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
/** Rewrite the open item at row n (rows count open and done items, 1-based); null when row n is no open item. */
|
|
2275
|
+
function editOpenRow(text: string, n: number, edit: (line: string) => string): string | null {
|
|
2276
|
+
let row = 0;
|
|
2258
2277
|
let hit = false;
|
|
2259
2278
|
const out = text.split("\n").map((l) => {
|
|
2260
|
-
if (!isOpenItem(l)) return l;
|
|
2261
|
-
++seen;
|
|
2262
|
-
if (seen !== n) return l;
|
|
2279
|
+
if (!isRoadmapRow(l) || ++row !== n || !isOpenItem(l)) return l;
|
|
2263
2280
|
hit = true;
|
|
2264
|
-
return
|
|
2281
|
+
return edit(l);
|
|
2265
2282
|
});
|
|
2266
2283
|
return hit ? out.join("\n") : null;
|
|
2267
2284
|
}
|
|
2268
2285
|
|
|
2269
|
-
/**
|
|
2286
|
+
/** Stamp the open item at row n with `(slug)` — the pick→finish handshake. Null when row n is no open item.
|
|
2287
|
+
* Re-picking the same slug is a no-op stamp. */
|
|
2288
|
+
export function roadmapPick(text: string, n: number, slug: string): string | null {
|
|
2289
|
+
return editOpenRow(text, n, (l) => (l.trim().includes(`(${slug})`) ? l.trim() : `${l.trim()} (${slug})`));
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
/** Check the open item at row n with a done stamp. Null when row n is no open item. */
|
|
2270
2293
|
export function roadmapDone(text: string, n: number, stamp: string): string | null {
|
|
2271
|
-
|
|
2272
|
-
let hit = false;
|
|
2273
|
-
const out = text.split("\n").map((l) => {
|
|
2274
|
-
if (!isOpenItem(l)) return l;
|
|
2275
|
-
++seen;
|
|
2276
|
-
if (seen !== n) return l;
|
|
2277
|
-
hit = true;
|
|
2278
|
-
return stampItem(l, stamp);
|
|
2279
|
-
});
|
|
2280
|
-
return hit ? out.join("\n") : null;
|
|
2294
|
+
return editOpenRow(text, n, (l) => stampItem(l, stamp));
|
|
2281
2295
|
}
|
|
2282
2296
|
|
|
2283
|
-
/** Remove the
|
|
2284
|
-
*
|
|
2297
|
+
/** Remove the open item at row n and its brief — an idea the operator no longer wants, which `done` would
|
|
2298
|
+
* record as shipped. Null when row n is no open item. */
|
|
2285
2299
|
export function roadmapDrop(text: string, n: number): { text: string; item: string } | null {
|
|
2286
|
-
let
|
|
2300
|
+
let row = 0;
|
|
2287
2301
|
let item: string | null = null;
|
|
2288
2302
|
let dropping = false;
|
|
2289
2303
|
const out = text.split("\n").filter((l) => {
|
|
2290
2304
|
if (isBriefLine(l)) return !dropping;
|
|
2291
2305
|
dropping = false;
|
|
2292
|
-
if (!
|
|
2306
|
+
if (!isRoadmapRow(l) || ++row !== n || !isOpenItem(l)) return true;
|
|
2293
2307
|
item = l.trim().slice(6);
|
|
2294
2308
|
dropping = true;
|
|
2295
2309
|
return false;
|
|
@@ -2387,7 +2401,9 @@ export function nextHint(state: FlowState, cfg: Config): string {
|
|
|
2387
2401
|
const open = openItemsNote(cfg, state, "implement");
|
|
2388
2402
|
return `edit in ${state.worktree} (docs mode: no project commands)${open ? `, go through the checklist with the operator (${open})` : ""}, ask Verified?, then flow verify --confirmed`;
|
|
2389
2403
|
}
|
|
2390
|
-
|
|
2404
|
+
// the review comes before Verified? (flow verify refuses until it is on record), so the operator's one look covers the reviewed tree
|
|
2405
|
+
const rv = reviewOwed(state, cfg) ? `; then the review — ${cfg.release.review}, fix what it finds and record it (flow review done "<verdict>"; a flow_stage review worker records itself)` : "";
|
|
2406
|
+
return `build and test in ${state.worktree}, commit as you go, flow check${rv}; then flow verify (deploys for review), look yourself, keep the app running, ask Verified? and run flow verify --confirmed on the answer`;
|
|
2391
2407
|
case "pre-release": {
|
|
2392
2408
|
// gh#198: the release call made with Verified? decides which prep this is
|
|
2393
2409
|
const vc = state.versionChoice;
|
package/src/runtime/base.ts
CHANGED
|
@@ -236,7 +236,7 @@ export async function releaseTags(root: string): Promise<string[] | null> {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
export const GATE_HELP =
|
|
239
|
-
"help [--json] | init [--force|--draft|--write <text>|--write-file <path>|--answers key=value…|--answers-file <path>] [--confirmed] [--track] | reflect [<note>|list|tidy|move <n> --playbook|--code|done <n>[,<n>…] [<what>]] | roadmap [add <text> [--slug=<slug>] [--brief=<notes>|--brief-file=<path>]|pick <n> <slug>|done <n
|
|
239
|
+
"help [--json] | init [--force|--draft|--write <text>|--write-file <path>|--answers key=value…|--answers-file <path>] [--confirmed] [--track] | reflect [<note>|list|tidy|move <n> --playbook|--code|done <n>[,<n>…] [<what>]] | roadmap [add <text> [--slug=<slug>] [--brief=<notes>|--brief-file=<path>]|pick <n> <slug>|done <n>[,<n>…]|drop <n>[,<n>…]|tidy] | doctor [<issue note>] | status [slug] [--json] | start <slug> [--ui|--patch|--docs] [--no-ui --confirmed] [--force] [--merge=squash|merge|rebase|any] [--check-upstream] | use <slug> | test | check | health | review [done <verdict>|--skip] | approve [--yolo] | verify [--yolo] [--port=<n>|--replace] [--version=<v>|--no-version] | release [--yolo|--version=<v>|--no-version|--no-fold-check|--no-marker-check] | finish [--yolo] [--no-reflect] [--note=<text>] [--no-artifact-check|--no-release-create] [slug] | abort [slug] [--purge] | version [--check-upstream] — state gates take [slug] and --confirmed (the operator already answered in chat); without it the agent's call returns NEEDS-OPERATOR with the question to ask in chat (it never opens a dialog), and the /flow slash command asks in a dialog — verify without --confirmed rebases a branch that is behind the default branch and deploys for review; --port=<n> / --replace answer its Dev port? question when another flow holds the stack — --ui on start is the agent's call whenever screens change (it only adds the mockup gate); --patch/--docs are proposed at start and granted by the Approve? answer; --no-ui (clearing ui on a plan-stage feature) and --merge=<style> are operator-granted (--confirmed); start refuses until the playbook has a merge policy and writes the answer into project.md — --yolo (with --confirmed) answers that checkpoint and pre-confirms every later one; checks and guardrails stay — verify --confirmed carries the operator's release call: --version=<v> (ship that version) or --no-version (merge unreleased), asked with Verified?; release takes the same flags when the call changed — on GitHub release then publishes itself (push, PR, CI wait, merge in the playbook style, annotated tag) and records the release; a 'publish stopped' or 'publish waiting' result is resumed by re-running flow release; publish = manual in the playbook (or another forge) leaves those steps to the agent, and finish records the release (--no-artifact-check / --no-release-create skip a proof on the operator's word) — release --no-version ships merge + changelog only (no bump, tag or forge release); --no-fold-check skips the changelog fold line proofs on the operator's word; --no-marker-check lets a branch add conflict-marker-shaped lines on purpose — finish runs the closing reflection worker first (before removing anything) and stops for the operator's fold/drop; the re-run with --confirmed cleans up; --no-reflect --confirmed skips it on the operator's explicit word (yolo never does), --note= hands the worker the operator's friction notes — release names a session running an older dev-flow build than the disk ships and asks update (/reload) or proceed — recorded, never a block — reflect <note> queues a project suggestion in reflections.md (--playbook = docs-flow fix, --code = patch-flow fix); --plugin never writes — dev-flow feedback goes upstream and it prints the GitHub issue recipe; bare reflect prints the session-reflection protocol (bound: run flow_stage op reflect); list numbers open items, move <n> re-files one, done <n> checks a fixed one off, tidy drops closed ones — roadmap manages .dev-flow/roadmap.md: pick <n> <slug> (or add --slug=) stamps an item for flow start, which seeds the new plan from its brief; finish checks it off; drop <n> removes an item nobody wants any more (done would record it as shipped); <n> is the row number list prints — done leaves the others in place, drop and tidy renumber — a new feature asked for mid-flow is parked there, never as a hand-made .dev-flow/<slug>/; start <slug> --confirmed adopts such a ghost dir — review records the review flow verify requires before it asks Verified? (and flow release before it ships): done <verdict> after the playbook's review step ran inline (a flow_stage review worker records itself); --skip (--confirmed, the operator's Skip review? answer) ships without one; bare review shows what is on record — doctor reviews structure, git consistency and open reflections (never writes); doctor <note> prints an investigation brief — abort unbinds and keeps the worktree; abort --purge (--confirmed, the operator's Purge? answer) removes the worktree, branch and feature folder of a dropped feature, never anything on origin — version prints the build the disk ships and any other dev-flow copies in this process (--check-upstream asks the registry)";
|
|
240
240
|
export const featDir = (root: string, slug: string) => path.join(dfDir(root), slug);
|
|
241
241
|
export const stateFile = (root: string, slug: string) => path.join(featDir(root, slug), "state.json");
|
|
242
242
|
export const claimFile = (root: string, slug: string) => path.join(featDir(root, slug), "claim.json");
|
package/src/runtime/gates.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** dev-flow runtime — The gate runner and the gates that do not ship anything. Moved out of extensions/dev-flow.ts as is (exports added). */
|
|
2
2
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { approveGate, applicableItems, appendRoadmapItem, checklistHash, claimBlocks, doneItemCount, detectForge, gateHelpJson, healthProbe, parseMergeStyle, investigationBrief, pluginVersion, reflectProtocol, reflectUnfiledCount, reflectionNudges, reflectionRoutes, listFiles, needsOperator, newState, nextHint, openChecklistItems, releaseGate, roadmapDone, roadmapDrop, roadmapOpenCount, roadmapBriefFor, roadmapPick, roadmapTidy, statusJson, subst, sq, featureTmpDir, foreignWorktreeLinks, validSlug, verifyGate, STAGE_EMOJI, type ReflectTarget, type Config, type FlowState } from "../core.ts";
|
|
4
|
+
import { approveGate, applicableItems, appendRoadmapItem, checklistHash, claimBlocks, doneItemCount, detectForge, gateHelpJson, healthProbe, parseMergeStyle, investigationBrief, pluginVersion, reflectProtocol, reflectUnfiledCount, reflectionNudges, reflectionRoutes, listFiles, needsOperator, newState, nextHint, openChecklistItems, releaseGate, roadmapDone, roadmapDrop, roadmapOpenCount, roadmapOpenRows, roadmapBriefFor, roadmapPick, roadmapTidy, statusJson, subst, sq, featureTmpDir, foreignWorktreeLinks, validSlug, verifyGate, STAGE_EMOJI, type ReflectTarget, type Config, type FlowState } from "../core.ts";
|
|
5
5
|
import { applyAnswers, buildDraft, doctorFindings, ghostFeatureDirs, ghostInfo, lineDiff, loadProject, mdDigest, parseAnswers, parseProjectMd } from "../projectmd.ts";
|
|
6
6
|
import { linkedTag } from "../fold.ts";
|
|
7
7
|
import { detectProject } from "../detect.ts";
|
|
@@ -558,12 +558,20 @@ export async function gateRoadmap(o: GateCtx): Promise<RunResult> {
|
|
|
558
558
|
const open = roadmapOpenCount(text);
|
|
559
559
|
const done = doneItemCount(text);
|
|
560
560
|
const save = (next: string) => writeFileSync(roadmapFile(root), next); // .dev-flow/ existence is runFlow's precondition
|
|
561
|
+
// gh#245: numbers are row numbers (open and done items) — a done keeps every other number where list printed it
|
|
562
|
+
const rows = roadmapOpenRows(text);
|
|
563
|
+
const openRows = new Set(rows.map((r) => r.row));
|
|
561
564
|
const idx = Number(args[0]);
|
|
562
|
-
const validIdx = Number.isInteger(idx) && idx
|
|
565
|
+
const validIdx = Number.isInteger(idx) && openRows.has(idx);
|
|
566
|
+
const rowRange = rows.length ? `an open row (${rows.map((r) => r.row).join(", ")})` : "an open item (none open)";
|
|
567
|
+
// done/drop take a batch (`done 6,7` or `done 6 7`), resolved against the list as it stands before any edit
|
|
568
|
+
const batch = [...new Set(args.flatMap((a) => a.split(",")).map((a) => a.trim()).filter(Boolean))];
|
|
569
|
+
const batchNums = batch.map(Number);
|
|
570
|
+
const badBatch = batch.filter((_, i) => !Number.isInteger(batchNums[i]) || !openRows.has(batchNums[i]));
|
|
563
571
|
switch (verb) {
|
|
564
572
|
case "list": {
|
|
565
573
|
if (!open) return { text: done ? `roadmap: nothing open (${done} done — flow roadmap tidy drops them)` : "roadmap: empty — flow roadmap add \"<future feature>\"" };
|
|
566
|
-
return { text: [`roadmap — ${open} open (${done} done):`, ...
|
|
574
|
+
return { text: [`roadmap — ${open} open (${done} done; numbers are row numbers: done leaves the others as they are, drop and tidy renumber):`, ...rows.map((r) => ` ${r.row}. ${r.item}`)].join("\n") };
|
|
567
575
|
}
|
|
568
576
|
case "add": {
|
|
569
577
|
if (!args.length) return { text: 'usage: flow roadmap add "<future feature>" [--slug=<slug>] [--brief=<notes>|--brief-file=<path>]', isError: true };
|
|
@@ -580,33 +588,44 @@ export async function gateRoadmap(o: GateCtx): Promise<RunResult> {
|
|
|
580
588
|
}
|
|
581
589
|
case "pick": {
|
|
582
590
|
const slug = args[1] ?? "";
|
|
583
|
-
if (!validIdx) return { text: `pick:
|
|
591
|
+
if (!validIdx) return { text: `pick: ${rowRange} required — flow roadmap lists them`, isError: true };
|
|
584
592
|
if (!slug || !validSlug(slug)) return { text: `usage: flow roadmap pick <n> <slug> — the slug flow start will use (lowercase, dashes)`, isError: true };
|
|
585
593
|
save(roadmapPick(text, idx, slug)!);
|
|
586
594
|
return { text: `roadmap: item ${idx} picked for ${slug} — now: flow start ${slug} (flow finish checks the item off when it ships)` };
|
|
587
595
|
}
|
|
588
596
|
case "done": {
|
|
589
|
-
if (!
|
|
597
|
+
if (!batch.length || badBatch.length) return { text: `done: ${badBatch.length ? `${badBatch.join(", ")} ${badBatch.length > 1 ? "are" : "is"} not ` : ""}${rowRange}${badBatch.length ? "" : " required"} — nothing was changed; flow roadmap lists them`, isError: true };
|
|
590
598
|
// stamped with date + bound slug, so history says what shipped it
|
|
591
|
-
|
|
592
|
-
|
|
599
|
+
const stamp = [new Date().toISOString().slice(0, 10), sess.slug].filter(Boolean).join(" ");
|
|
600
|
+
let next = text;
|
|
601
|
+
for (const n of batchNums) next = roadmapDone(next, n, stamp)!; // rows stay put under done
|
|
602
|
+
save(next);
|
|
603
|
+
const names = batchNums.map((n) => `${n}. ${rows.find((r) => r.row === n)!.item}`);
|
|
604
|
+
return { text: `roadmap: ${batchNums.length > 1 ? `${batchNums.length} items` : `item ${batchNums[0]}`} marked done (${open - batchNums.length} open) — ${names.join(" | ")}` };
|
|
593
605
|
}
|
|
594
606
|
case "drop":
|
|
595
607
|
case "remove":
|
|
596
608
|
case "delete": {
|
|
597
609
|
// not shipped, not wanted: gone from the backlog, so the done list never claims it was built
|
|
598
|
-
if (!
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
610
|
+
if (!batch.length || badBatch.length) return { text: `drop: ${badBatch.length ? `${badBatch.join(", ")} ${badBatch.length > 1 ? "are" : "is"} not ` : ""}${rowRange}${badBatch.length ? "" : " required"} — nothing was changed; flow roadmap lists them`, isError: true };
|
|
611
|
+
let next = text;
|
|
612
|
+
const gone: string[] = [];
|
|
613
|
+
// highest row first: removing a row shifts only the rows below it
|
|
614
|
+
for (const n of [...batchNums].sort((a, b) => b - a)) {
|
|
615
|
+
const r = roadmapDrop(next, n)!;
|
|
616
|
+
next = r.text;
|
|
617
|
+
gone.unshift(`"${r.item}"`);
|
|
618
|
+
}
|
|
619
|
+
save(next);
|
|
620
|
+
return { text: `roadmap: ${gone.length > 1 ? `${gone.length} items` : `item ${batchNums[0]}`} dropped — ${gone.join(", ")} (${open - gone.length} open); the row numbers below changed — run flow roadmap before the next pick, done or drop` };
|
|
602
621
|
}
|
|
603
622
|
case "tidy": {
|
|
604
623
|
if (!done) return { text: `roadmap: nothing to tidy (${open} open, 0 done)` };
|
|
605
624
|
save(roadmapTidy(text));
|
|
606
|
-
return { text: `roadmap: dropped ${done} done item(s) — ${open} open` };
|
|
625
|
+
return { text: `roadmap: dropped ${done} done item(s) — ${open} open; the row numbers changed — run flow roadmap before the next pick, done or drop` };
|
|
607
626
|
}
|
|
608
627
|
default:
|
|
609
|
-
return { text: "usage: flow roadmap [list|add <text> [--slug=<slug>] [--brief=<notes>|--brief-file=<path>]|pick <n> <slug>|done <n
|
|
628
|
+
return { text: "usage: flow roadmap [list|add <text> [--slug=<slug>] [--brief=<notes>|--brief-file=<path>]|pick <n> <slug>|done <n>[,<n>…]|drop <n>[,<n>…]|tidy] — <n> is the row number flow roadmap prints", isError: true };
|
|
610
629
|
}
|
|
611
630
|
}
|
|
612
631
|
|
|
@@ -710,7 +729,7 @@ export async function gateHealth(o: GateCtx): Promise<RunResult> {
|
|
|
710
729
|
return { text: `health: ${res.ok ? "PASS" : "FAIL"} (${probe}${triedNote(res.attempts)})\n${tail(res.out)}` };
|
|
711
730
|
}
|
|
712
731
|
|
|
713
|
-
/** gh#233: records the
|
|
732
|
+
/** gh#233: records the review flow verify (before Verified?) and flow release require. `done "<verdict>"` — the agent ran the playbook's
|
|
714
733
|
* review step inline; `--skip` — the operator's word to ship without one (asked first: Skip review?). A
|
|
715
734
|
* flow_stage review worker records itself. Bare: what is on record. Bound flow only — `done`'s verdict is free text. */
|
|
716
735
|
export async function gateReview(o: GateCtx): Promise<RunResult> {
|
|
@@ -722,7 +741,7 @@ export async function gateReview(o: GateCtx): Promise<RunResult> {
|
|
|
722
741
|
const onRecord = st.review
|
|
723
742
|
? `review on record: ${st.review.by === "skipped" ? "skipped on the operator's word" : `${st.review.by}${st.review.head ? ` over ${st.review.head.slice(0, 7)}` : ""}${st.review.verdict ? ` — ${st.review.verdict}` : ""}`} (${ago(st.review.at)})`
|
|
724
743
|
: "no review on record";
|
|
725
|
-
if (!words.length && !flag("skip")) return { text: `${onRecord}${cfg.release.review ? ` — flow
|
|
744
|
+
if (!words.length && !flag("skip")) return { text: `${onRecord}${cfg.release.review ? ` — flow verify requires one before Verified? (${cfg.release.review})` : " — the playbook sets no review step"}` };
|
|
726
745
|
if (st.stage !== "implement" && st.stage !== "pre-release") return { text: `review is recorded at implement or pre-release — ${st.slug} is at ${st.stage}`, isError: true };
|
|
727
746
|
const head = st.worktree ? (await sh("git rev-parse HEAD", gateCwd(root, st))).out.trim() : "";
|
|
728
747
|
if (flag("skip")) {
|
package/src/runtime/ship.ts
CHANGED
|
@@ -48,6 +48,14 @@ export async function gateVerify(o: GateCtx): Promise<RunResult> {
|
|
|
48
48
|
// tier-1 gate first (tier-2 confirmation is recorded by this very command, so it is excluded here)
|
|
49
49
|
const preGate = verifyGate({ ...state!, confirmations: { ...state!.confirmations, implement: { hash: checklistHash(items), at: now() } } }, cfg, branch);
|
|
50
50
|
if (preGate.length) return { text: `verify gate FAILED:\n- ${preGate.join("\n- ")}\n${branchLine}`, isError: true };
|
|
51
|
+
// The review runs before the operator is asked Verified?, not after it: reviewed in pre-release, every
|
|
52
|
+
// finding the review turned up changed the tree the operator had already said yes to, and Verified? was
|
|
53
|
+
// asked again — three times in one flow. Reviewed first, the operator's one look covers the tree that ships.
|
|
54
|
+
// A re-verify at pre-release and a release-only cut (nothing on the branch to read) owe none here.
|
|
55
|
+
if (state!.stage === "implement" && !isReleaseOnly(cfg, branch)) {
|
|
56
|
+
const owed = reviewOwed(state!, cfg);
|
|
57
|
+
if (owed) return { text: `verify gate FAILED:\n- the review comes before Verified?, so the operator's word covers the reviewed tree and review fixes never re-ask it — ${owed}\n${branchLine}`, isError: true };
|
|
58
|
+
}
|
|
51
59
|
// a stack another flow is reviewing or releasing on is not this gate's to take — ask before deploying
|
|
52
60
|
const slotted = cfg.commands.dev && !state!.docs ? await devSlotCheck(o, state!) : { note: "" };
|
|
53
61
|
if ("text" in slotted) return slotted;
|
|
@@ -151,6 +159,10 @@ export async function gateVerify(o: GateCtx): Promise<RunResult> {
|
|
|
151
159
|
const fpDeployed = state!.docs ? null : await worktreeFingerprint(gateCwd(root, state!));
|
|
152
160
|
if (fpDeployed) state!.reviewDeploy = { wt: fpDeployed, slot: slotKey(devPortOf(state!, cfg)), at: now() };
|
|
153
161
|
else delete state!.reviewDeploy;
|
|
162
|
+
// a re-verify the gate asked for holds the release until it is answered: the operator's "verified" in chat
|
|
163
|
+
// reached the agent once, which went on to release prep and never recorded it, and the release shipped
|
|
164
|
+
// under the older word with a warning nobody acted on
|
|
165
|
+
if (reverify) state!.reverifyAsked = now();
|
|
154
166
|
markPendingAsk(root, state!, "Verified?"); // pending however it is asked — a chat question or a dialog
|
|
155
167
|
// the agent's call never opens a dialog (#181): this is the review deploy — the app is up for the
|
|
156
168
|
// operator, and the answer comes back in chat as flow verify --confirmed
|
|
@@ -164,6 +176,7 @@ export async function gateVerify(o: GateCtx): Promise<RunResult> {
|
|
|
164
176
|
const ok = await ui.confirm("Operator verification", `Verified? All checks green${cfg.commands.dev && !state!.docs ? `; dev deploy is up for review (${cfg.commands.dev})` : ""} \u2014 does it work?`);
|
|
165
177
|
if (!ok) {
|
|
166
178
|
delete state!.pendingAsk;
|
|
179
|
+
delete state!.reverifyAsked;
|
|
167
180
|
writeState(root, state!);
|
|
168
181
|
return { text: `verification declined — stay in ${reverify ? "pre-release" : "implement"} and fix what failed` };
|
|
169
182
|
}
|
|
@@ -195,6 +208,7 @@ export async function gateVerify(o: GateCtx): Promise<RunResult> {
|
|
|
195
208
|
const before = state!.stage;
|
|
196
209
|
state!.stage = "pre-release";
|
|
197
210
|
delete state!.pendingAsk;
|
|
211
|
+
delete state!.reverifyAsked;
|
|
198
212
|
writeState(root, state!);
|
|
199
213
|
if (before === "pre-release")
|
|
200
214
|
return { text: `re-verified${audit} over ${state!.verifiedHead?.slice(0, 7) ?? "the current tree"} — the Verified? word now covers the review fixes; still in pre-release.${choiceNote}\n${ran}\n${AGENT_MARK}next: ${nextHint(state!, cfg)}` };
|
|
@@ -245,6 +259,9 @@ export async function gateRelease(o: GateCtx): Promise<RunResult> {
|
|
|
245
259
|
const n = dirtyWt.out.split("\n").filter((l) => l.trim()).length;
|
|
246
260
|
return { text: `release gate FAILED:\n- ${n} uncommitted path(s) in ${state!.worktree} — a merge ships the branch, not your working tree: commit or discard them, then re-run\n${tail(dirtyWt.out)}`, isError: true };
|
|
247
261
|
}
|
|
262
|
+
// a re-verify flow verify asked for and nobody recorded: the release would ship under the older Verified?
|
|
263
|
+
if (state!.reverifyAsked)
|
|
264
|
+
return { text: `release gate FAILED:\n- flow verify asked the operator Verified? over the review fixes (${ago(state!.reverifyAsked)}) and no answer is recorded — once they answer in chat, run flow verify --confirmed (an unchanged tree is not deployed again); if they said no, fix it and run flow verify again`, isError: true };
|
|
248
265
|
// gh#233: the review step ran (or the operator waived it) before anything slow or anything ships
|
|
249
266
|
const noReview = reviewOwed(state!, cfg);
|
|
250
267
|
if (noReview) return { text: `release gate FAILED:\n- ${noReview}`, isError: true };
|
|
@@ -423,7 +440,13 @@ export async function gateRelease(o: GateCtx): Promise<RunResult> {
|
|
|
423
440
|
: stale
|
|
424
441
|
? "a yolo given earlier does not choose to release under an older dev-flow build — ask Release? with the update-or-proceed question"
|
|
425
442
|
: "";
|
|
426
|
-
|
|
443
|
+
// gh#206: a yolo held back only by the playbook's until-release knob carries nothing new for the operator
|
|
444
|
+
// to weigh — it just means "Release? is asked like on any flow". Their chat answer (a plain --confirmed)
|
|
445
|
+
// stands on the first call, as it does on a flow without yolo; asking first made them repeat a word already
|
|
446
|
+
// given. gh#219's shape — `--yolo --confirmed` replayed from the plan-stage word — still gets the question.
|
|
447
|
+
// Commits after Verified? and a stale build carry news, so those holds always ask first.
|
|
448
|
+
const untilReleaseOnly = cfg.release.yolo === "until-release" && !postVerify && !stale;
|
|
449
|
+
const mustAskFirst = (!!holdWhy && !(untilReleaseOnly && !flag("yolo"))) || stale;
|
|
427
450
|
const confirmed = flag("confirmed") && !(mustAskFirst && !ui.hasUI && state!.pendingAsk !== "Release?");
|
|
428
451
|
const yoloHeld = confirmed ? "" : holdWhy;
|
|
429
452
|
// gh#198: release.ask = on-change — Release? answers itself when it would only re-confirm Verified?: the call
|