pi-dev-flow 0.73.0 → 0.75.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 +37 -0
- package/README.md +3 -1
- package/docs/guardrails.md +1 -1
- package/docs/headless.md +3 -4
- package/docs/playbook.md +5 -8
- package/extensions/dev-flow.ts +343 -351
- package/package.json +1 -1
- package/skills/dev-flow/references/implement.md +3 -4
- package/skills/dev-flow/references/pre-release.md +1 -1
- package/skills/dev-flow/references/start.md +1 -2
- package/src/core.ts +30 -73
- package/src/projectmd.ts +17 -39
- package/src/timeouts.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.75.0] - 2026-11-03
|
|
8
|
+
|
|
9
|
+
**`flow_stage` workers are now visible in pi-web.** A delegated worker used to be a session pi-web never mentioned — the operator watched the driving session go quiet.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `flow_stage` workers register themselves as pi-web subagents: the worker's session file carries the `pi-web:subagent` meta where pi-web's scanner looks for it (first data entry) and a terminal result when the run ends, so the worker appears in the session's Agents menu under profile `flow-implement` / `flow-review` — ✓ with its REPORT, ✗ failed, or interrupted. The row settles when the run ends; while it runs pi-web displays it as interrupted, because only pi-web's own sessions can prove liveness. Plain pi is unchanged, and a stamp that cannot write never breaks a worker.
|
|
13
|
+
|
|
14
|
+
## [0.74.0] - 2026-11-03
|
|
15
|
+
|
|
16
|
+
**Audit: gaps closed, dead code out.** A full read of the extension, core and playbook parser after 0.73.0's reset.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- `flow approve --yolo` and `flow release --no-version` now take effect only after the operator answers the checkpoint. Before, a refused or headless call still saved yolo/no-version, so it applied to the next gate.
|
|
20
|
+
- A session opened inside a feature worktree now drives the main checkout's flow. Before, `flow` gates, the footer, the context injection, compaction and claims read the worktree's own `.dev-flow/`; only the guards resolved the main checkout.
|
|
21
|
+
- `flow health` now runs a `flow-check health` block (it used to require `health =`). The health probe inside `flow check` now seeds first and retries within `healthWait`, the same probe verify runs.
|
|
22
|
+
- A `health =` key plus a `flow-check health` block no longer produce two `health` checks.
|
|
23
|
+
- The drafted mockup checklist item is now `(ui)`-only, so non-UI features no longer have to confirm it.
|
|
24
|
+
- Aborting a plan-stage feature that has a written plan now needs the operator's word (`--confirmed`, or a dialog).
|
|
25
|
+
|
|
26
|
+
### Removed
|
|
27
|
+
- The unreachable `done` stage. `flow finish` deletes the state, so nothing ever wrote it.
|
|
28
|
+
- Legacy compatibility:
|
|
29
|
+
- the `project.json` refusal and doctor finding;
|
|
30
|
+
- the `.current` cleanup;
|
|
31
|
+
- the `github` / `release.github` alias for `releases`;
|
|
32
|
+
- `release.*` keys under `## global` (use `## release` / `## pre-release`);
|
|
33
|
+
- inline `(plugin)` markers in flat `reflections.md` files;
|
|
34
|
+
- release-done re-reading the manifest for flows approved before the release gate recorded their version.
|
|
35
|
+
- Re-running `flow init` on an existing playbook no longer offers to regenerate it. It always refused for a hand-edited file anyway, and now it prints the doctor's findings.
|
|
36
|
+
- An edit-tool write in a worktree no longer wipes recorded checks on the spot. The worktree fingerprint at verify/release is the single staleness check, and it already catches bash edits.
|
|
37
|
+
- An auto-compaction no longer queues a `reflections.md` item.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- Repeated git, forge and registry probes now go through shared helpers.
|
|
41
|
+
- `flow help` is shorter.
|
|
42
|
+
- The checkout guard sees a branch behind leading flags (`git checkout -f feat/x`) and ignores paths after `--`.
|
|
43
|
+
|
|
7
44
|
## [0.73.0] - 2026-11-03
|
|
8
45
|
|
|
9
46
|
**Back to a simple worktree flow.** 0.67–0.72 grew a worker system (about 1.9k source lines) on top of a flow that was meant to be simple. A real session (`audit-hardening`: 6 h of implement across 9 workers and 4 verify rounds, then a release the flow could not close) showed that machinery costing more than it saved. This release starts again from 0.66.0, keeps the fixes from that range that are not about workers, and adds one small optional worker.
|
package/README.md
CHANGED
|
@@ -185,7 +185,9 @@ tests as contract, and a structural-vs-cheap self-audit so the diff shrank becau
|
|
|
185
185
|
got smaller, not because comments got deleted. For a big implement slice the session can hand
|
|
186
186
|
the work to **`flow_stage`**: a fresh pi session in the worktree that edits, commits and reports,
|
|
187
187
|
or a fresh read-only reviewer (`op: "review"`) whose PASS/FAIL is advice, not a gate. Both are
|
|
188
|
-
optional, and the plan path, commits and checks are briefed automatically.
|
|
188
|
+
optional, and the plan path, commits and checks are briefed automatically. In pi-web a worker also
|
|
189
|
+
shows up in the session's Agents menu as a subagent, its final status on the row and its report in
|
|
190
|
+
the opened transcript. And while a flow writes code, the
|
|
189
191
|
implement stage injects a compact senior-discipline guidance — smallest complete change, no
|
|
190
192
|
speculative abstraction, finish what your change breaks, a failing-first test for risky logic —
|
|
191
193
|
your playbook's `prose.implement` replaces it wholesale whenever you write your own. (The review
|
package/docs/guardrails.md
CHANGED
|
@@ -15,7 +15,7 @@ While a feature is active, the extension intercepts every tool call:
|
|
|
15
15
|
- **The rules reach the agent, they are not left in a file it may never read**: pi advertises a skill and loads it only if the model chooses to, so the ground rules of the dev-flow skill are injected into every session once (and again after a compaction that summarized them away), and each stage's turn names the one playbook file that stage needs. The guards enforce the same discipline either way — this is what makes the agent follow it without being stuck.
|
|
16
16
|
- **A forced push asks the operator**: `git push` carrying `--force`, `--force-with-lease…` or `-f` is confirmed before it runs — a rewritten branch is history CI and other sessions already have. The one spelling that answers for it is the prefix the refusal prints (`DEV_FLOW_ALLOW_REWRITE=1 git push -f …`), the same "the operator said so" contract as `DEV_FLOW_ALLOW_MAIN`. Local history rewrites (`git filter-branch --force`) are not pushes and stay free, so a project never needs a blunt flag-only deny of its own.
|
|
17
17
|
- **Shell calls can't hang forever**: pi kills a shell command only when the model passed a `timeout` — it omits one in ~75% of calls, so a `gh` waiting on a prompt or a dead `curl` froze sessions for hours. In an initiated repo (`.dev-flow/project.md` exists) every shell call without one therefore gets the class default armed silently (30s quick inspection · 120s local git and unknown · 180s network · 300s containers/services · 900s builds/tests/installs · 1,200s watchers like `gh run watch`), and absurd explicit values clamp to 1,800s. A project that wants the timeout visible on every call line sets `bashTimeout = require` in `## global` — then a call without one is refused, naming the value it would have armed (each refusal costs a turn, which is why it is no longer the default). Uninitiated folders hear nothing at all: without the playbook dev-flow enforces no rules.
|
|
18
|
-
- **Compact-aware**: dev-flow paces compaction the way pi counts it: the self-compaction trigger uses the *effective* `reserveTokens` (settings and per-model overrides, not the built-in default) and is checked at every turn end, not only when a run settles. When pi force-compacts on its threshold anyway — the chat-only states (open tier-2 dialog, plan discussion not yet in `plan/`) refuse to self-compact by design — dev-flow takes the compaction over and redoes it with flow-aware summary instructions (overflow recovery keeps pi's compact-and-retry and is left alone). Auto-compaction turned off in settings is honored
|
|
18
|
+
- **Compact-aware**: dev-flow paces compaction the way pi counts it: the self-compaction trigger uses the *effective* `reserveTokens` (settings and per-model overrides, not the built-in default) and is checked at every turn end, not only when a run settles. When pi force-compacts on its threshold anyway — the chat-only states (open tier-2 dialog, plan discussion not yet in `plan/`) refuse to self-compact by design — dev-flow takes the compaction over and redoes it with flow-aware summary instructions (overflow recovery keeps pi's compact-and-retry and is left alone). Auto-compaction turned off in settings is honored.
|
|
19
19
|
- The active stage is injected into the model's context every turn; the bundled `dev-flow` skill is the agent's playbook, including the recommended sequences: pre-release — review (`/flow-review`) → fixes → docs → changelog/version bump; release — PR → merge → tag → `release-done`. The package also bundles the review skills themselves — `/flow-review` (a change, read against its `plan/plan.md`), `/flow-audit` (the whole repo) and `/flow-simplify` (the operative cut: deletes dead and duplicated code, one verified commit at a time) — and injects a built-in senior-discipline guidance at implement stage unless the playbook sets its own `prose.implement`.
|
|
20
20
|
- **Status bar**: an initiated repo (`.dev-flow/project.md` exists) always carries the dev-flow footer; while the session **is bound** to a feature it shows `<stage glyph> <slug>` plus mode markers — stages 📝 plan, 🔨 implement, 🔍 pre-release, 🚀 release; markers ⚡ patch, 📚 docs, 🎱 yolo, `💬` while a checkpoint (Approve?/Verified?/Release?/Finish?) still waits on the operator's word — the legend's "operator, your turn" glyph, the same one stage lines open with — and `⚠️` while a check of the bound feature fails (emoji render in their own color, so the footer carries no theme coloring). An **unbound** session never sees a slug — it shows `💬 N flow(s) open` (unfinished-feature count only, no warning marker) or `💬 no flows` when nothing is in flight: the pre-flow glyph, because an unbound session is parked on the operator by definition; a session binds only via `flow start`/`flow use`, never by opening. The footer repaints at session start, at the start of every agent run (the earliest a late-attaching web client is listening) and after every gate; an uninitiated folder gets no footer at all. `flow status` is the spelled-out surface: `stage=implement`, the per-feature mode tags (`[ui]`, `[yolo]`, `[no-version]`), the `💬 <word>` marker of a checkpoint the operator has not answered, and the `flow=<ver>` stamp of the build that started the feature.
|
|
21
21
|
|
package/docs/headless.md
CHANGED
|
@@ -35,10 +35,9 @@ The contract a headless driver (a session with no UI) relies on:
|
|
|
35
35
|
`dev` deploy (runs are killed past 15 min) and re-probes health with `healthWait` retries.
|
|
36
36
|
A remote timeout must be minutes, not seconds — the gate prints progress lines while it
|
|
37
37
|
runs.
|
|
38
|
-
- **Edits
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
rerun records the tree has outgrown (`stale record(s) rerun after a worktree change: …`).
|
|
38
|
+
- **Edits make checks stale.** Every check carries a fingerprint of the worktree it ran against
|
|
39
|
+
(edit-tool writes, `sed -i`, a formatter, codegen alike), and verify/release rerun records the
|
|
40
|
+
tree has outgrown (`stale record(s) rerun after a worktree change: …`).
|
|
42
41
|
Re-running `flow check` before `verify` after the last edit is still the tidy order; the gate no
|
|
43
42
|
longer trusts a stale PASS if you skip it.
|
|
44
43
|
- **Version skew.** Gates execute the dev-flow build the session loaded at start; `flow version`
|
package/docs/playbook.md
CHANGED
|
@@ -17,9 +17,9 @@ executable checks and hard safety rules:
|
|
|
17
17
|
|
|
18
18
|
| Tier | Notation | Enforcement |
|
|
19
19
|
|---|---|---|
|
|
20
|
-
| 1 — executable | ` ```flow` (`key = value`) config blocks; ` ```flow-check <name>` command blocks | gates run every check, record pass/fail
|
|
20
|
+
| 1 — executable | ` ```flow` (`key = value`) config blocks; ` ```flow-check <name>` command blocks | gates run every check, record pass/fail against a worktree fingerprint, a changed tree makes them stale — hard |
|
|
21
21
|
| 1 — guard | ` ```flow-guard ` (`deny`/`confirm`/`protect`/`forbid`) rules in `## global` | enforced on every bash command and every edit/write path, at every stage — hard block or operator confirmation |
|
|
22
|
-
| 2 — checklist | `- [ ] item` lines (`- [ ] (ui) item` = only for `--ui` features) | gate confirms cover them as a set (hashed
|
|
22
|
+
| 2 — checklist | `- [ ] item` lines (`- [ ] (ui) item` = only for `--ui` features) | gate confirms cover them as a set (hashed: changing the items asks again); `(ui)` items never appear for non-UI features |
|
|
23
23
|
| 3 — prose | any other text | injected to the agent when its stage begins — advisory |
|
|
24
24
|
|
|
25
25
|
Example `## implement` section:
|
|
@@ -121,8 +121,7 @@ gate prints `health: none configured` and `flow doctor` flags the combination. T
|
|
|
121
121
|
`forge = github | gitlab | self` — the release machinery's target; when unset it is detected from the
|
|
122
122
|
`origin` URL at the moment of use (GitHub gets `gh`, GitLab gets `glab`, self-hosted stays forge-neutral:
|
|
123
123
|
no automatic release creation, merge proof by ancestry only), and `release.releases = false` skips
|
|
124
|
-
automatic release creation entirely
|
|
125
|
-
A leftover `project.json` is no longer read — the doctor tells you to fold it in and delete it.
|
|
124
|
+
automatic release creation entirely.
|
|
126
125
|
|
|
127
126
|
### The merge policy (`merge = squash | merge | rebase | any`)
|
|
128
127
|
|
|
@@ -162,10 +161,8 @@ the agent asks you each question, fills the draft and writes your answers back v
|
|
|
162
161
|
interactive init may also confirm the draft with you on the spot and write it then); **existing file** → doctor mode (drift, dead commands/scripts,
|
|
163
162
|
unparseable manifest, dual configs, **ghost feature dirs** (a `.dev-flow/<slug>/` whose `state.json`
|
|
164
163
|
is gone — it offers to delete those, on your confirm, and says so instead when no UI is present) —
|
|
165
|
-
it never runs your commands)
|
|
166
|
-
|
|
167
|
-
checklist items, hand-set keys): it prints the findings and the lines it would drop instead of
|
|
168
|
-
overwriting them. `--force` remains the deliberate overwrite — with your word (`--confirmed`, or one
|
|
164
|
+
it never runs your commands). It prints the findings and never regenerates your file — a draft
|
|
165
|
+
cannot reproduce your prose, checklist items and hand-set keys. `--force` is the deliberate overwrite — with your word (`--confirmed`, or one
|
|
169
166
|
confirm dialog) and a `project.md.bak` of what was there. At any time
|
|
170
167
|
you can just edit `.dev-flow/project.md` yourself — the next `flow init` (doctor) validates and
|
|
171
168
|
flags problems, and `flow doctor` runs the same probes on demand without offering to change
|