pi-dev-flow 0.85.1 → 0.86.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 +16 -0
- package/README.md +2 -1
- package/docs/development.md +10 -0
- package/docs/gates.md +1 -1
- package/docs/guardrails.md +1 -1
- package/docs/playbook.md +17 -2
- package/extensions/dev-flow.ts +82 -2652
- package/package.json +1 -1
- package/skills/dev-flow/SKILL.md +52 -75
- package/skills/dev-flow/references/finish.md +41 -58
- package/skills/dev-flow/references/implement.md +62 -152
- package/skills/dev-flow/references/plan.md +40 -68
- package/skills/dev-flow/references/pre-release.md +39 -50
- package/skills/dev-flow/references/reflect.md +51 -85
- package/skills/dev-flow/references/release.md +31 -64
- package/skills/dev-flow/references/start.md +50 -69
- package/src/core.ts +24 -20
- package/src/present.ts +224 -0
- package/src/projectmd.ts +6 -1
- package/src/runtime/base.ts +554 -0
- package/src/runtime/checks.ts +358 -0
- package/src/runtime/gates.ts +719 -0
- package/src/runtime/reflect.ts +160 -0
- package/src/runtime/setup.ts +85 -0
- package/src/runtime/ship.ts +629 -0
- package/src/runtime/workers.ts +170 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.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
|
@@ -10,88 +10,65 @@ description: >
|
|
|
10
10
|
|
|
11
11
|
<!-- dev-flow:core:start -->
|
|
12
12
|
|
|
13
|
-
# dev-flow:
|
|
13
|
+
# dev-flow: ground rules
|
|
14
14
|
|
|
15
|
-
Only the **flow tool** advances stages
|
|
16
|
-
criteria hold.
|
|
17
|
-
`["
|
|
15
|
+
Only the **flow tool** advances stages; each gate refuses until its exit
|
|
16
|
+
criteria hold. Call it with an args array — `["start", "dark-mode"]`,
|
|
17
|
+
`["check"]`, `["status"]`.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
only**: `flow start <slug>` binds its own feature; `flow use <slug>` takes
|
|
58
|
-
one over. Nothing auto-binds. Unbound: gates demand an explicit slug and main-checkout writes stay
|
|
59
|
-
blocked — there is no bypass, an unbound session cannot edit source.
|
|
60
|
-
- **Project `flow-guard` rules** (`deny`/`confirm`/`protect`/`forbid` in
|
|
61
|
-
project.md `## global`) apply at **every** stage and are judged ahead of
|
|
62
|
-
dev-flow's verdicts — operator safety rules, not flow discipline. When one
|
|
63
|
-
fires, its reason is the answer: stop, show it, let the operator decide;
|
|
64
|
-
never route around it.
|
|
65
|
-
- **`.dev-flow/<slug>/state.json` is flow-owned** — never read or write it;
|
|
66
|
-
`flow status` is your view. **project.md is the operator-owned playbook**:
|
|
67
|
-
read freely, **never edit** — it changes through `flow init --write` on the
|
|
68
|
-
operator's word.
|
|
69
|
-
- **A guard blocking you means you are skipping a stage or writing outside your
|
|
70
|
-
feature** — run the gate instead of working around it. The guard reads
|
|
71
|
-
**commands**: quoted text is an argument's prose (a PR body discussing a
|
|
72
|
-
commit is not a commit), and a wrapper that execs its argument
|
|
73
|
-
(`sh -c "git push origin main"`) is judged on its payload.
|
|
74
|
-
- **Every bash call has a timeout**: none stated → dev-flow arms its class
|
|
75
|
-
default (quick 30s … build 900s, a `timeout N` wrapper → N+15s). Pass
|
|
76
|
-
`timeout` (seconds) when a run needs longer.
|
|
77
|
-
- Abandon a feature with `flow abort <slug>` — never unbind by hand. A gate
|
|
78
|
-
refusal lists exactly what is missing: fix that, rerun the gate.
|
|
79
|
-
- Also obey the repo's own AGENTS.md and project skills: dev-flow sequences
|
|
80
|
-
stages, the project defines its conventions.
|
|
19
|
+
- **The flow tool is the only invocation.** There is no `flow` shell command —
|
|
20
|
+
never bash, `npx` or a path.
|
|
21
|
+
- **You run the gates; the operator says words.** Never ask the operator to
|
|
22
|
+
type a `flow` or `/flow` command. A checkpoint is one word asked in plain
|
|
23
|
+
chat — **Approve? / Verified? / Release? / Finish?** — mentioning that
|
|
24
|
+
*yolo* is an answer, then stop. Their word (or a clear equivalent) in chat →
|
|
25
|
+
run that gate with `--confirmed`. A structured question tool is not chat;
|
|
26
|
+
never infer the answer. A gate returning `NEEDS-OPERATOR <Question?>` means:
|
|
27
|
+
ask exactly that, in chat. `/flow` is the operator's own override; mention it
|
|
28
|
+
only when the session is demonstrably stuck or wrong (and `/reload` when
|
|
29
|
+
`flow version` says this session runs an older build).
|
|
30
|
+
- **Stage reports** — open every report with the **stage line the gate
|
|
31
|
+
returned** (`stage line for your report`), pasted as is — the gate builds it
|
|
32
|
+
from state. A checkpoint message then has an event title and, on their own
|
|
33
|
+
lines, **`Done:`** (paths, SHAs, counts) and **`Next steps:`** — the
|
|
34
|
+
operator's options as italic verbs, the recommended one ***bold italic***
|
|
35
|
+
first, *yolo* last with what it pre-confirms, then the line
|
|
36
|
+
"or say what to do differently". Plain markdown, never fenced, never a gate
|
|
37
|
+
command.
|
|
38
|
+
- **yolo** at a checkpoint → that gate with `--yolo --confirmed`; run the
|
|
39
|
+
remaining gates back to back without asking, honoring guidance attached to
|
|
40
|
+
the word ("yolo, patch bump", "yolo, no tag" → `--no-version`). Checks,
|
|
41
|
+
guard rules and any `NEEDS-OPERATOR` still apply.
|
|
42
|
+
- **One session = one feature** (flow + branch + worktree). `flow start <slug>`
|
|
43
|
+
binds a new one, `flow use <slug>` takes one over; nothing auto-binds, and an
|
|
44
|
+
unbound session cannot edit source.
|
|
45
|
+
- **Project `flow-guard` rules** apply at every stage, ahead of dev-flow's own.
|
|
46
|
+
When one fires, show its reason and let the operator decide.
|
|
47
|
+
- **Hands off**: never read or write `.dev-flow/<slug>/state.json` (`flow
|
|
48
|
+
status` is your view); never edit `project.md` (it changes through `flow
|
|
49
|
+
init` on the operator's word, or inside a docs/patch flow).
|
|
50
|
+
- **A guard blocking you means you skipped a stage or wrote outside your
|
|
51
|
+
feature** — run the gate instead of working around it. A refusal lists what
|
|
52
|
+
is missing: fix that, rerun.
|
|
53
|
+
- **Every bash call has a timeout** (class default when unstated); pass
|
|
54
|
+
`timeout` (seconds) for longer runs.
|
|
55
|
+
- Abandon a feature with `flow abort <slug>`. The repo's own AGENTS.md and
|
|
56
|
+
project skills still apply.
|
|
81
57
|
|
|
82
58
|
<!-- dev-flow:core:end -->
|
|
83
59
|
|
|
84
60
|
## Which stage you are in
|
|
85
61
|
|
|
86
|
-
|
|
87
|
-
session's stage injection names the file to read now, and this is the map.
|
|
62
|
+
The stage injection names the file to read now; this is the map.
|
|
88
63
|
|
|
89
64
|
| Read | For |
|
|
90
65
|
| --- | --- |
|
|
91
|
-
| `references/start.md` | `flow init
|
|
92
|
-
| `references/plan.md` | plan
|
|
93
|
-
| `references/implement.md` | implement
|
|
94
|
-
| `references/pre-release.md` | pre-release —
|
|
95
|
-
| `references/release.md` | release — PR
|
|
96
|
-
| `references/finish.md` |
|
|
97
|
-
| `references/reflect.md` | reflections
|
|
66
|
+
| `references/start.md` | `flow init`, starting a feature, modes (`--patch`, `--docs`, `--ui`), merge policy |
|
|
67
|
+
| `references/plan.md` | plan — research, clarify, plan file, mockups, Approve? |
|
|
68
|
+
| `references/implement.md` | implement — worktree, commits, checks, workers, Verified? |
|
|
69
|
+
| `references/pre-release.md` | pre-release — review, docs, changelog + bump, Release? |
|
|
70
|
+
| `references/release.md` | release — PR, CI, merge, tag; hands over to finish |
|
|
71
|
+
| `references/finish.md` | finish — closing reflection, fold/drop, cleanup |
|
|
72
|
+
| `references/reflect.md` | reflections and the roadmap backlog |
|
|
73
|
+
|
|
74
|
+
Why each gate checks what it checks: [docs/gates.md](../../docs/gates.md).
|
|
@@ -1,67 +1,50 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Stage: finish
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
2. Show the operator the list with your recommendation per item and ask
|
|
30
|
-
**fold or drop** for each (`fold 1,3 drop 2` is a fine answer) — then stop.
|
|
31
|
-
3. Apply the answer: fold docs → `flow reflect --playbook "<note>"`; fold code →
|
|
32
|
-
`flow reflect --code "<note>"`; fold plugin → `flow reflect --plugin "<note>"`
|
|
33
|
-
prints the upstream recipe — search first, then `gh issue create` (the fold
|
|
34
|
-
answer is the confirmation; report the URL). **Plugin findings never become
|
|
35
|
-
rows in the project's `reflections.md`.** Drop → nothing is recorded. Open
|
|
5
|
+
`flow finish` removes the worktree, branch and `.dev-flow/<slug>/` and
|
|
6
|
+
unbinds the session — so anything that needs them runs first.
|
|
7
|
+
|
|
8
|
+
1. **`flow finish [--note="<friction the operator mentioned>"]`**
|
|
9
|
+
- Release published but not recorded → it runs the release record first
|
|
10
|
+
(no question).
|
|
11
|
+
- **Closing reflection** — while none is recorded, a read-only worker
|
|
12
|
+
reviews this session's transcript and every worker transcript, dedupes
|
|
13
|
+
against `.dev-flow/reflections.md` and upstream issues, and returns
|
|
14
|
+
numbered findings, each **docs** / **code** / **plugin** with a **fold**
|
|
15
|
+
or **drop** recommendation. Finish then stops.
|
|
16
|
+
- A flow with **no friction** (no refusal, no guard block, no `--note`)
|
|
17
|
+
skips the worker, unless the playbook says `reflect = always`.
|
|
18
|
+
- Worker failed → nothing is removed: re-run, or review inline (bare `flow
|
|
19
|
+
reflect` prints the protocol). Only the operator's explicit word skips
|
|
20
|
+
it: `flow finish --no-reflect --confirmed` — yolo never does.
|
|
21
|
+
2. **Findings → ask fold or drop** per item, with your recommendation (`fold
|
|
22
|
+
1,3 drop 2` is a fine answer), and stop. That answer **is** Finish?.
|
|
23
|
+
3. **Apply it**: fold docs → `flow reflect --playbook "<note>"`; fold code →
|
|
24
|
+
`flow reflect --code "<note>"`; fold plugin → `flow reflect --plugin
|
|
25
|
+
"<note>"` prints the upstream recipe — search first, then `gh issue create`
|
|
26
|
+
and report the URL. Plugin findings never go into `reflections.md`. Open
|
|
36
27
|
items the reviewer found fixed → propose checking them off.
|
|
37
|
-
4.
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
4. **`flow finish --confirmed`** without asking again. Nothing found → ask
|
|
29
|
+
**Finish?** first.
|
|
30
|
+
5. Offer the printed suggestions (`⚑ fix the open reflections now?`, `↻ N
|
|
31
|
+
closed reflection(s)`) in one line each; never start a fix flow without
|
|
32
|
+
the operator's word.
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
you are showing.
|
|
46
|
-
Checkpoint report: stage line **🏁 finish · `<slug>`** — release recorded ·
|
|
47
|
-
main state · unmerged count · reflections open · release-checklist open,
|
|
48
|
-
then `Done:`/`Next steps:` per the Stage reports rule.
|
|
34
|
+
Report opening: **🏁 finish · `<slug>`** — release recorded · main state ·
|
|
35
|
+
unmerged count · reflections open · release-checklist open, then `Done:` /
|
|
36
|
+
`Next steps:`. Never say findings were "reviewed" unless you are showing the
|
|
37
|
+
worker's list.
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
unmerged. `flow finish [slug]`:
|
|
39
|
+
Finish refuses until:
|
|
52
40
|
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
a local-only release commit is exactly what it protects against;
|
|
57
|
-
- removes the worktree and branch, then deletes `.dev-flow/<slug>/` (its
|
|
58
|
-
`tmp/` scratch dir included) and unbinds the session. A feature branch still on `origin` is deleted **only on
|
|
59
|
-
proof it was merged** — ancestor of `origin/<default>`, or a merged PR via gh
|
|
60
|
-
or glab (what a squash leaves behind); otherwise kept with a note. Uncommitted worktree edits block
|
|
61
|
-
finish; commits that never reached the default branch are read against the playbook's `merge` policy —
|
|
62
|
-
expected under `squash`/`rebase`, a **violation** under `merge` (which `yolo` cannot answer for), and
|
|
63
|
-
called out at Finish? without an operator answer → stop and show them.
|
|
41
|
+
- the release is recorded (abandoned features use `flow abort`);
|
|
42
|
+
- the main checkout is **clean and pushed**;
|
|
43
|
+
- the worktree has no uncommitted edits.
|
|
64
44
|
|
|
65
|
-
|
|
66
|
-
|
|
45
|
+
Commits not on the default branch are expected under `squash`/`rebase`, a
|
|
46
|
+
**violation** under `merge` (yolo cannot answer it — ask). A remote feature
|
|
47
|
+
branch is deleted only on proof it merged.
|
|
67
48
|
|
|
49
|
+
Production deployment is out of scope: never ask whether a prod deploy
|
|
50
|
+
happened.
|
|
@@ -1,165 +1,75 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Stage: implement
|
|
6
4
|
|
|
7
|
-
Work
|
|
8
|
-
|
|
9
|
-
worktrees are theirs (attribution guards judge every path by its owning
|
|
10
|
-
feature).
|
|
5
|
+
Work only in the feature's worktree (path in `flow status` and the stage
|
|
6
|
+
note). Other sessions' worktrees are theirs.
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
guidance injected at stage start** (tier-3 prose — your playbook's
|
|
14
|
-
`prose.implement`, or dev-flow's built-in senior-discipline guidance when
|
|
15
|
-
the playbook sets none). Commit in the worktree
|
|
16
|
-
**as you go** — small reviewable commits; a twelve-file monolith saved for
|
|
17
|
-
the end faces review blind and is not crash-safe. The gate enforces the
|
|
18
|
-
habit: `flow verify` refuses while the branch holds **no commit** (checks
|
|
19
|
-
describe the working tree, so nothing committed means nothing reviewed was
|
|
20
|
-
ever recorded; a **release-only flow** — a versioned project whose code is
|
|
21
|
-
already on main, unreleased since the last tag — passes with an empty branch,
|
|
22
|
-
and its bump is the pre-release commit) and every verify line reports
|
|
23
|
-
`commits: N ahead of <default>, M uncommitted path(s)` — uncommitted paths
|
|
24
|
-
never block verify, they are what the operator sees they are approving.
|
|
25
|
-
2. Write tests as you go (project framework: the `test` key / `flow-check`
|
|
26
|
-
blocks).
|
|
27
|
-
Throwaway scripts and scratch output go in `$TMPDIR` (or `mktemp`), not a
|
|
28
|
-
hard-coded `/tmp/...`: in a bound session, and in every command a gate runs,
|
|
29
|
-
it is `.dev-flow/<slug>/tmp/`, and finish removes it with the feature. The
|
|
30
|
-
same commands get that dir as `GIT_CEILING_DIRECTORIES`, so a test fixture
|
|
31
|
-
made under it is not inside the checkout (git does not climb out of it).
|
|
32
|
-
3. `flow check` runs every tier-1 check (test, health, named `flow-check`
|
|
33
|
-
blocks) and records each against a fingerprint of the worktree; any later
|
|
34
|
-
worktree change makes them stale — verify reruns stale checks itself.
|
|
35
|
-
4. UI flag set? An actual browser visual pass (screenshot or the project's
|
|
36
|
-
automated pass) — not just a typecheck.
|
|
37
|
-
5. Done means **running and healthy with pre-existing data**, not "compiles":
|
|
38
|
-
`commands.seedData` (if set) puts real data in place, the app starts with
|
|
39
|
-
the `run` command, and the health check passes — `flow check` covers it
|
|
40
|
-
(seedData runs before health) and `flow verify` probes **the deployed app
|
|
41
|
-
again**, because the deploy is what has to be proven. Probes retry every 2s
|
|
42
|
-
up to `healthWait` (default 30s) — a service needing a moment after its
|
|
43
|
-
container starts is not a failed deploy; say so rather than declaring a
|
|
44
|
-
healthy deploy broken. Walk the **tier-2 checklist** (`- [ ]`) with the
|
|
45
|
-
operator honestly — it cannot be scripted. **Verify is two steps.**
|
|
46
|
-
`flow verify` prepares the review: it rebases onto the default branch when
|
|
47
|
-
the branch is behind (a conflict aborts and hands it to you), deploys, and
|
|
48
|
-
returns `deployed for review` — it never opens a dialog. If another flow
|
|
49
|
-
holds the dev port it returns `NEEDS-OPERATOR Dev port?` with the free RAM
|
|
50
|
-
and disk instead of deploying: put the options to the operator and re-run
|
|
51
|
-
with their answer (`--port=<n>` alongside, or `--replace`). Then look at the
|
|
52
|
-
change yourself, keep the app **running** while you ask **Verified?**, and
|
|
53
|
-
record the answer with `flow verify --confirmed` — the operator reviews
|
|
54
|
-
the live app, so never tear the test server down before the checkpoint is
|
|
55
|
-
answered (with no `dev` deploy configured, `flow verify` live-re-probes
|
|
56
|
-
`health` itself and refuses while nothing is answering). Checkpoint report: stage line **🔨 implement ·
|
|
57
|
-
`<slug>`** — commits `N ahead, M uncommitted` · tier-1 · tier-2 · deploy/
|
|
58
|
-
health · `branch@sha`, then `Done:`/`Next steps:` per the Stage reports rule. Fixes = iterate and re-verify; that loop is
|
|
59
|
-
free.
|
|
8
|
+
### Building it
|
|
60
9
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
10
|
+
1. Follow the approved plan, the project's conventions and the stage guidance
|
|
11
|
+
injected at stage start.
|
|
12
|
+
2. **Commit as you go** — small reviewable commits. `flow verify` refuses a
|
|
13
|
+
branch with no commit (except a release-only flow: a versioned project
|
|
14
|
+
whose code is already on main, unreleased since the last tag).
|
|
15
|
+
3. **Write tests as you go.** Scratch files go in `$TMPDIR` / `mktemp` (it is
|
|
16
|
+
`.dev-flow/<slug>/tmp/`, removed at finish) — never a hard-coded `/tmp/...`.
|
|
17
|
+
4. `flow check` runs every tier-1 check (test, health with seeded data, named
|
|
18
|
+
`flow-check` blocks) and records them against the worktree; any later edit
|
|
19
|
+
makes them stale, and verify reruns stale ones itself.
|
|
20
|
+
5. UI feature → a real browser visual pass, not just a typecheck.
|
|
21
|
+
6. Walk the **tier-2 checklist** (`- [ ]` items) with the operator honestly —
|
|
22
|
+
it cannot be scripted.
|
|
66
23
|
|
|
67
|
-
|
|
68
|
-
`flow check`, needs no operator input, and is large enough (≈4+ files or heavy
|
|
69
|
-
reading) that doing it here would crowd out the context you need for verify;
|
|
70
|
-
otherwise do it inline. The worker starts fresh and is briefed with the plan,
|
|
71
|
-
commits and checks, but it cannot see this chat, cannot ask the operator and
|
|
72
|
-
holds no gate.
|
|
24
|
+
### Verified? — two calls
|
|
73
25
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
26
|
+
1. `flow verify` prepares the review: rebases onto the default branch when
|
|
27
|
+
behind (a conflict aborts and hands it to you), runs build, the `dev`
|
|
28
|
+
deploy and the health probe against what it deployed, and returns
|
|
29
|
+
`NEEDS-OPERATOR Verified?`. It never opens a dialog.
|
|
30
|
+
- Another flow holds the dev port → `NEEDS-OPERATOR Dev port?` with free
|
|
31
|
+
RAM/disk: ask, then re-run with `--port=<n>` or `--replace`.
|
|
32
|
+
- The health probe retries every 2s up to `healthWait` (default 30s); a
|
|
33
|
+
service that needs a moment is not a broken deploy.
|
|
34
|
+
2. Look at the change yourself, **keep the app running**, ask **Verified?**.
|
|
35
|
+
Report opening: **🔨 implement · `<slug>`** (the gate's stage line).
|
|
36
|
+
3. Answer → `flow verify --confirmed` (yolo → `--yolo --confirmed`). If the
|
|
37
|
+
default branch moved since the review deploy it refuses: run `flow verify`
|
|
38
|
+
again first. Fixes → iterate and re-verify; that loop is free.
|
|
86
39
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
operator tweak: the note would cost more than the change.
|
|
90
|
-
- **Context already loaded** — mid-debug, you hold the failure; a handoff
|
|
91
|
-
throws that away.
|
|
92
|
-
- **Still being decided** — the approach is still moving in chat.
|
|
93
|
-
- **Operator-judged** — a UI pass, tier-2 items, anything that ends in a
|
|
94
|
-
question to the operator.
|
|
95
|
-
- **Integration** — the final wiring and polish before Verified? is yours: you
|
|
96
|
-
own verify.
|
|
97
|
-
- **Exploratory** — "find out why X": what you learn shapes the next step, and
|
|
98
|
-
a worker's summary is lossy.
|
|
40
|
+
Verify lands the feature in **pre-release**. A `--docs` feature runs no
|
|
41
|
+
project command and asks only the question.
|
|
99
42
|
|
|
100
|
-
|
|
101
|
-
briefing the next. Slice along the plan's steps, never into half-working
|
|
102
|
-
commits. When workers wrote most of the code, run a `review` before Verified?.
|
|
103
|
-
A worker that fails or stalls → take the slice over inline rather than
|
|
104
|
-
resending the same note.
|
|
43
|
+
### The feature grew, or a new problem appeared
|
|
105
44
|
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
the
|
|
114
|
-
delegation once the provider answers again. On return the tool reruns `flow check` and
|
|
115
|
-
lists the new commits and anything uncommitted.
|
|
116
|
-
- `flow_stage({ op: "review", note })` — a fresh **read-only** reviewer (at
|
|
117
|
-
implement or pre-release): findings plus `verdict: PASS|FAIL`. It is advisory:
|
|
118
|
-
no stamp, no gate waits on it. On a non-trivial feature, run one before
|
|
119
|
-
Verified?. Fix what is real (inline is fine), and re-review only if the fix
|
|
120
|
-
was large.
|
|
121
|
-
- `flow_stage({ op: "reflect", note })` — a fresh **read-only** reviewer of this
|
|
122
|
-
session's transcripts (driver + every worker), at any stage; its standard
|
|
123
|
-
moment is finish (see Stage: finish). It returns classified reflection
|
|
124
|
-
findings with fold/drop recommendations and writes nothing.
|
|
125
|
-
- One worker at a time per session. The worker holds no flow tool, so gates
|
|
126
|
-
and checkpoints stay with you. Its transcript nests under this session in
|
|
127
|
-
pi's picker.
|
|
128
|
-
- Budget (`budgetMin`; default 60 implement, 30 review, 20 reflect): at 75% the
|
|
129
|
-
worker is steered to wrap up and report. A worker cut at the budget is asked
|
|
130
|
-
once, with no tools, for its REPORT, so what it found comes back marked
|
|
131
|
-
partial instead of being lost.
|
|
45
|
+
- **Same feature, more scope** → stay here, append an `**Added mid-stage:**`
|
|
46
|
+
line to `plan.md`, implement, `flow check` again.
|
|
47
|
+
- **Different problem** → once the operator agrees to split it, park it:
|
|
48
|
+
`flow roadmap add "<title>" --slug=<new-slug> --brief=<notes>`; finish this
|
|
49
|
+
feature, then `flow start <new-slug>` seeds its plan from the brief. Never
|
|
50
|
+
create `.dev-flow/<new-slug>/` by hand.
|
|
51
|
+
- **Plan heavily amended** → show it and get Approve? again in chat; verify
|
|
52
|
+
stays the checkpoint.
|
|
132
53
|
|
|
133
|
-
|
|
134
|
-
operator reviews the running app; the gate **prints what it ran** —
|
|
135
|
-
`build ran (…)` / `dev ran (…)` / `dev: none configured`; the command must
|
|
136
|
-
**background and exit**, e.g. `docker compose up -d .` — verify waits and kills
|
|
137
|
-
runs past 15 min), re-runs the health probe **against what it just deployed**
|
|
138
|
-
(`seedData` first when configured; a failing probe retries every 2s up to
|
|
139
|
-
`healthWait`, then refuses the gate reporting its attempts — a pre-deploy PASS
|
|
140
|
-
describes a container that no longer exists; no probe prints
|
|
141
|
-
`health: none configured` and the doctor flags it), and demands all tier-1
|
|
142
|
-
checks green before the single question. With `servedBuild` set it also proves
|
|
143
|
-
the app serves the worktree's HEAD, not just that something answers. A
|
|
144
|
-
`--confirmed` run refuses when the default branch moved since the review
|
|
145
|
-
deploy: run `flow verify` again so the answer covers the tree that ships. The operator's confirm covers the
|
|
146
|
-
tier-2 list as a set (hashed; edits reset it). A `--docs` feature prints
|
|
147
|
-
`docs mode: project commands skipped` and asks only the verify question.
|
|
148
|
-
Verify lands the feature in **pre-release**.
|
|
54
|
+
### Optional: a fresh-session worker (`flow_stage`)
|
|
149
55
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
what you worked out — `flow roadmap add "<title>" --slug=<new-slug>
|
|
156
|
-
--brief=<notes>` (or `--brief-file=<path>`; the item records it was split from
|
|
157
|
-
this feature) — then finish this feature, and `flow start <new-slug>` (any
|
|
158
|
-
session, fresh is fine) seeds the new `plan/plan.md` from the brief. **Never
|
|
159
|
-
create `.dev-flow/<new-slug>/` by hand**: a plan dir with no `state.json` is a
|
|
160
|
-
ghost no gate picks up (the guard refuses it; `flow start <slug> --confirmed`
|
|
161
|
-
adopts one that already exists). Never fold two features into one plan, PR and
|
|
162
|
-
verify — the audit trail is the point. **Heavily amended plan** → show it and have the
|
|
163
|
-
operator re-approve in chat; verify remains the checkpoint — no reopen command
|
|
164
|
-
exists by design.
|
|
56
|
+
Delegate a slice when it is in the plan, provable by `flow check`, needs no
|
|
57
|
+
operator input, and is big (≈4+ files or heavy reading) — especially past
|
|
58
|
+
~40–50% of this session's context. Stay inline for small fixes, mid-debug
|
|
59
|
+
work, undecided approaches, anything the operator judges, and the final
|
|
60
|
+
wiring before Verified?.
|
|
165
61
|
|
|
62
|
+
- `flow_stage({ op: "implement", note, label })` — a fresh pi session in the
|
|
63
|
+
worktree edits and commits one slice. It gets the plan, commits and checks
|
|
64
|
+
itself; your `note` is the slice plus any operator answers. On return it
|
|
65
|
+
reruns `flow check` and lists new commits.
|
|
66
|
+
- `flow_stage({ op: "review", note })` — a read-only reviewer: findings plus
|
|
67
|
+
`verdict: PASS|FAIL`. Advisory. Run one before Verified? on a non-trivial
|
|
68
|
+
feature, and always when workers wrote most of the code.
|
|
69
|
+
- `flow_stage({ op: "reflect", note })` — a read-only review of this session's
|
|
70
|
+
transcripts; finish runs it for you.
|
|
71
|
+
- One worker at a time; read each diff before briefing the next; slice along
|
|
72
|
+
plan steps. A worker that fails or stalls → take the slice inline. A
|
|
73
|
+
`model failed: stopReason=error` means the provider is down, not slow.
|
|
74
|
+
- Budget (`budgetMin`; default 60 implement, 30 review, 20 reflect): steered
|
|
75
|
+
to wrap up at 75%, asked once for its report when cut.
|