pi-dev-flow 0.85.0 → 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 +27 -0
- package/README.md +2 -1
- package/docs/development.md +10 -0
- package/docs/gates.md +1 -1
- package/docs/guardrails.md +2 -2
- package/docs/playbook.md +17 -2
- package/extensions/dev-flow.ts +120 -2655
- package/package.json +4 -2
- package/skills/dev-flow/SKILL.md +52 -74
- 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/src/timeouts.ts +52 -17
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.86.0] - 2026-11-08
|
|
8
|
+
|
|
9
|
+
**Gate results show you facts and the one question waiting on you, never a command to type, and the stage line is written by the gate.**
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **Gate results are split between you and the agent.** Every `flow` tool row now shows a header (`✅ Verification · dark-mode`, `❌ … refused`, `💬` when it waits on you), the stage line, the facts, and the question to answer in chat. The agent's instructions ("ask Verified? and run flow verify --confirmed") stay in the model's copy and appear dimmed only when you expand the row. The test suite checks every gate it drives: no operator view names a flow command.
|
|
13
|
+
- **The gate writes the stage line.** It is built from state (mode, ui, plan and mockups, commits ahead and uncommitted, checks, tier-2, version, merge style, `branch@sha`, what is waiting on you), so reports open with the same line every time instead of one the model rebuilt from memory.
|
|
14
|
+
- **An answer that asks you to type a flow command gets corrected.** The next run carries a hidden note telling the agent to ask the checkpoint word and run the gate itself.
|
|
15
|
+
- **`flow status` is one readable row per feature**, and its hints read as things to say ("say “check the playbook”") instead of commands.
|
|
16
|
+
- **`flow start` asks every grant in one question**: mode, `--ui` and the merge policy, with one re-run.
|
|
17
|
+
- **`flow finish` records the release itself** when it was published but `release-done` never ran — that gate asks nothing, so it was a round trip with no decision in it.
|
|
18
|
+
- **A flow with no friction skips the closing reflection worker.** Friction is a gate refusal or a guard block on the feature; `--note` still runs it. `reflect = always` under `## release` keeps the old behavior.
|
|
19
|
+
- **The stage context is sent in full only when it changed** (or after a compaction); an unchanged run gets one line instead of the ~200-word note.
|
|
20
|
+
- **The skill is shorter.** The always-on core drops from ~4,500 to ~2,700 characters and the stage files are short rule lists; the reasons live in `docs/gates.md`.
|
|
21
|
+
- `extensions/dev-flow.ts` is the pi wiring only (~840 lines); the runtime moved to `src/runtime/`.
|
|
22
|
+
|
|
23
|
+
## [0.85.1] - 2026-11-08
|
|
24
|
+
|
|
25
|
+
**dev-flow's bash timeout says so when it kills a command, and a command's own `timeout N` sets the cap.**
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- **A command's own `timeout N` sets its cap.** `timeout 600 bun test` used to get the 120s default class, because `timeout` was read as the command, so dev-flow would kill a long test run at two minutes even though the agent had asked for ten. A `timeout`/`gtimeout` wrapper now gives N + 15s, so the shell's own timer fires first. Option forms such as `-k 5` and `-s KILL` and `s`/`m`/`h` suffixes are understood, and an unreadable N falls back to the wrapped command's class.
|
|
29
|
+
- **dev-flow loads outside pi on pi 1.5.0.** The extension imported TypeBox's `Type` from `@earendil-works/pi-ai`, which the published 1.5.0 package no longer exports; only pi's own loader still provided it. It now imports from `typebox`, which is declared as a peer dependency, and the tests run against pi 1.5.0, the version pi-web runs.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
- **dev-flow's silent bash timeout says so when it kills a command.** The timeout dev-flow arms on a call that states none never appears in the transcript or pi-web's tool card, so since 0.73.0 it looked as if no timeout was being set. It was: an end-to-end run under pi 1.5.0 killed a 60s command at 30s. Now a kill by that default appends `[dev-flow] stopped at <N>s: dev-flow's default for <class> commands…` to the result, and the always-on ground rules tell the agent the default exists and how to ask for longer. A new end-to-end test drives a real pi session to prove the kill happens.
|
|
33
|
+
|
|
7
34
|
## [0.85.0] - 2026-11-08
|
|
8
35
|
|
|
9
36
|
**`flow verify` deploys for review without a dialog, catches up with main first, and asks before taking another flow's dev port.**
|
package/README.md
CHANGED
|
@@ -143,7 +143,8 @@ are the only things dev-flow cannot do for you.
|
|
|
143
143
|
|
|
144
144
|
Nothing here trusts the agent in either direction: a checkpoint gate refuses if you never answered
|
|
145
145
|
(its refusal begins `NEEDS-OPERATOR Approve?`), and the agent is told never to ask *you* to type a
|
|
146
|
-
`flow` command
|
|
146
|
+
`flow` command — gate results show you facts and the one question waiting on you, never the command
|
|
147
|
+
behind it, and an answer that slips one in gets corrected on the next run. `/flow …` is your manual override — for when the session is stuck, wrong, or
|
|
147
148
|
claiming a gate result it never produced. → [Gate reference](docs/gates.md)
|
|
148
149
|
|
|
149
150
|
### Reflections: the agent's notes to you
|
package/docs/development.md
CHANGED
|
@@ -21,6 +21,16 @@ A release cannot update a session that is already running — pi keeps the code
|
|
|
21
21
|
After merging and tagging, `/reload` in every session that must carry the new behavior; shared-process
|
|
22
22
|
hosts (pi-web) keep stale code until restarted, so reload there re-binds state but does not swap code.
|
|
23
23
|
|
|
24
|
+
## Layout
|
|
25
|
+
|
|
26
|
+
- `extensions/dev-flow.ts` — the pi wiring only: the `/flow` command, the `flow` and `flow_stage` tools,
|
|
27
|
+
the event hooks (guards, injections, footer, compaction).
|
|
28
|
+
- `src/runtime/` — what the wiring runs: `base` (shell, paths, state, sessions, claims), `checks` (dev
|
|
29
|
+
deploy, health, tier-1 checks, the stage-line facts), `gates` (the runner and the non-shipping gates),
|
|
30
|
+
`ship` (verify, release, release-done, finish), `setup` (init questions), `reflect`, `workers`.
|
|
31
|
+
- `src/core.ts`, `src/projectmd.ts`, `src/present.ts`, … — pure logic, unit-tested without pi.
|
|
32
|
+
`present.ts` splits every gate result into the operator's view and the agent's text.
|
|
33
|
+
|
|
24
34
|
## The skill: an injected core, plus references a stage reads
|
|
25
35
|
|
|
26
36
|
Pi advertises a skill (name, description, path) and loads `SKILL.md` only when the model decides to
|
package/docs/gates.md
CHANGED
|
@@ -20,7 +20,7 @@ so it needs no `--confirmed`. The agent's own `flow` call never opens a dialog (
|
|
|
20
20
|
| `verify [--yolo] [--port=<n>\|--replace]` | implement → pre-release | **without `--confirmed` it is the review deploy**: it fetches and, when the branch is behind `origin/<default>` (or local `<default>` with no remote), **rebases** it — untracked files never block, uncommitted tracked edits and conflicts refuse (the rebase is aborted, the branch untouched); when the dev port (playbook `port`, or the whole stack when none is set) was last deployed by **another live flow** it refuses with `NEEDS-OPERATOR Dev port?`, the measured RAM/disk against `instanceMem`/`instanceDisk`, and the options: run alongside on the next free port (offered only when `parallelDev` is not `no`, `dev`/`health` read `$DEV_FLOW_PORT`, and the resources fit), `--replace`, or wait — nothing is built first; then it deploys and returns `deployed for review` with the chat question. **With `--confirmed`** it never rewrites history: a default branch that moved since refuses (re-run `flow verify`). With `servedBuild` set the served commit must be the worktree's HEAD. Otherwise: all tier-1 checks green — a check with no passing record is **run by the gate itself** (`checks ran at the gate (test)`) rather than refused and pointed at `flow check`, since entering the stage or editing the worktree is what cleared it — and so is a record whose worktree fingerprint differs from the tree now (`stale record(s) rerun after a worktree change: …`): a change made through bash fires no edit-tool hook, the fingerprint is what notices the tree moved — and a failure there prints the run output, **the feature branch holds at least one commit** (verify refuses a branch with nothing committed — the checks describe the working tree, so an uncommitted state has never been recorded — except a **release-only flow** (#161): on a versioned project an empty branch over unreleased commits on the default branch (since the newest local version tag, or all of them before the first release) passes, the line says `release-only flow: N unreleased commit(s)`, and the version bump is the pre-release commit; with nothing unreleased the refusal says there is nothing to release; and prints `commits: N ahead of <default>, M uncommitted path(s)` with what it ran; uncommitted paths are reported, never gated), build (if configured) green, `dev` deploy (if configured) runs first so you can review the running app **and the health probe (if configured) re-runs against what it just deployed, retrying every 2s up to `healthWait` seconds** (a failing probe refuses the gate and reports how many attempts it took: the `flow check` PASS predates the deploy, and a service that needs seconds after its container starts is not a broken deploy; with no probe the output says `health: none configured`); with **no `dev` command but a `health` probe configured the gate live-re-probes the app before asking** (`health: live re-probe PASS` — a killed server refuses with `live probe FAILED`, because process death dirties no worktree fingerprint and a green record alone cannot prove liveness: start the app and rerun), tier-2 checklist (ui-only items excluded for non-UI features) confirmed as a set; a `--docs` feature runs none of it (`docs mode: project commands skipped`) and only asks you; **one question** — or `--confirmed`; `--yolo --confirmed` = you answered 'yolo' at Verified? — answers it and pre-confirms the rest |
|
|
21
21
|
| `release [--yolo|--no-version|--no-fold-check|--no-marker-check]` | pre-release → release | checks re-greened after the prep edits; `release.preflight` (when set) passes in the worktree — the build the tag will trigger, proven before anything ships; **the branch adds no merge-conflict marker lines** vs its merge base (#164: a hand-resolved merge that kept a `<<<<<<<`/`>>>>>>>` line is refused with `file:line`; `--no-marker-check` on the operator's word when the lines are meant); **commits after Verified?** are named in the Release? question and the approved line (#162: the operator's word covers the HEAD verify stamped — a warning, never a refusal); a **standing yolo** (given at an earlier checkpoint) does not answer Release? when such commits exist, nor ever under `yolo = until-release` in `## release` — the gate returns NEEDS-OPERATOR Release? (gh#176), while `--confirmed` (the operator's answer, a yolo said at Release? included) still passes; **the worktree holds no uncommitted paths** (gh#131: a merge ships the branch, not the working tree — an uncommitted fix at this gate is a fix that never ships; the refusal lists the paths, and the approved line prints `commits: N ahead of <default>, M uncommitted path(s)` like verify's); with `versioning.file`: the manifest version parses and is **not tagged yet** (the bump must be ahead of the last release); with `release.changelog` the gate **proves the entry mechanically** (#97): a **heading names the version** (prose that mentions it, or a `1.2.0-beta` section when releasing `1.2.0`, is not an entry), **this branch touched the file** (an inherited changelog is not release prep), **every entry that was pending before the release survives inside the new section** — compared on normalized lines, so re-indenting a fold is free while rewording or deleting one is refused by naming the line — and **nothing is left under `Unreleased`**. The proofs guard the **baseline's** pending lines — they do not freeze the wording of the entry this flow writes, so a branch that landed as several iteration commits is free to state its result as one entry (see the changelog-writer rule in the pre-release reference). The pending baseline is the newest tag's changelog (what actually shipped), else the branch's merge base; when neither resolves, the two git-dependent proofs are skipped **with a printed advisory** rather than refusing a legal release for a topology reason, and the content proofs (the heading, its body) always run; tier-2 `## pre-release` checklist confirmed; the manifest version it validates is **stamped as the release's version of record** (`release-done` publishes that, whatever the checkouts say later); **one question** (Release?) — or `--confirmed`; `--no-version` (your call at Release?) ships this flow as **merge + changelog** — the bump/tag requirements and the tag checks at `release-done` are skipped for it, but the branch must still add its **own line under `Unreleased`** (a `--docs` flow is exempt — #163: a playbook/docs change owes no user-facing entry; one it writes is welcome, not proven) (editing an older section releases nothing) and it rides there until the next versioned release folds it (default: versioned); `--no-fold-check` is the operator-granted escape from the line-level fold proofs — one flow, stamped in the gate output, the heading and touched proofs stay; **stale session build** (loaded build behind the checkout): the gate prints both builds, lists what shipped between them (those proofs will not run this release) and folds *update (/reload, then re-run) or proceed with the old release?* into the Release? question — the operator's word, recorded in the release output, **never a block**: publishing under an older gate is a legitimate choice (hotfix, offline reload) |
|
|
22
22
|
| `release-done` | records the release (the stage stays `release`) | **no question — the Release? answer covered the publication**; verify approval; the version published is the one `release` **stamped** from the manifest it validated (a main checkout still behind cannot republish the previous version), and it must not be older than the newest matching tag **on origin** (tag lists come from `git ls-remote`, so an unfetched clone does not decide what exists; when an origin exists but cannot be asked (offline, no ssh agent) **both release gates refuse** rather than answering with local tags); with `versioning.file`: that tag exists, is reachable from the default branch **and is on origin** (a local-only tag is not a release); with `release.artifact`: the published-artifact check runs (`{version}`/`{tag}` placeholders — the line it prints names the version it verified; skip once with `--no-artifact-check`, operator-instructed only) · creates the forge release from the tag, its body **the `release.changelog` entry for that version** — the changelog is the source of truth, and the tag's annotation stands in only when the changelog has no entry for the version, else nothing (and it says why — a body that is really a shell error is dropped, never shipped) — `gh` for GitHub, `glab` for GitLab) and then **proves the release exists**: it asks the forge (`gh release view <tag>` / `glab release view <tag>`) and refuses when nothing is there, because #51, #60 and #63 were three ways of ending `release recorded as complete` with nothing published — and when the changelog was the body it **reads the stored body back** and refuses a mismatch, so the release page and the changelog cannot drift (#97; normalized before comparing, skipped with a printed note on another forge). Skipping is deliberate and loud — `--no-release-create`, `release.releases = false` or `forge = self` each print that no forge release was created, and the view check is skipped for them; **with a `merge` policy** it also proves the merge that shipped matches it — branch ancestry plus what the forge says (`gh pr view` / `glab api`), so a squash under `merge = merge` (or a merge commit under `merge = squash`) refuses the release record, while a shape it cannot see prints an advisory instead (#97's split: an invisible topology never blocks a legal release); when the release went out on a stale build the operator acknowledged at the release gate, it prints that acknowledgement in place of the after-the-fact version-skew warning, and that warning prints the session vs disk version pair plus the duplicate-copy note when a second copy is registered (#117) |
|
|
23
|
-
| `finish [--yolo] [--no-reflect] [--note=<text>] [slug]` | release → done — **first
|
|
23
|
+
| `finish [--yolo] [--no-reflect] [--note=<text>] [slug]` | release → done — **records an unrecorded release first** (published but `release-done` never ran: finish runs its proofs itself — that gate asks nothing, so it is not a separate step; its refusal is finish's) — **then the closing reflection**: while no reflection is recorded for the flow, finish starts the reflect worker before it touches anything and stops for the operator's fold/drop (or Finish? when nothing was found); a flow with **no friction** (no gate refusal, no guard block, no `--note`) skips the worker unless the playbook sets `reflect = always`; the re-run with `--confirmed` does the cleanup. `--no-reflect --confirmed` skips it on the operator's explicit word (yolo never does); `--note=` hands the worker the operator's friction notes. Cleanup (removes worktree + branch, deletes `.dev-flow/<slug>/`, and deletes `origin/<branch>` **only** when its merged state is verified — ancestor of the default branch or a merged PR/MR via `gh`/`glab`; unverifiable branches stay with a note) | a release is recorded (`release-done` ran), the main checkout is clean **and** pushed to `origin/<default>`, and the worktree has no uncommitted changes (the refusal lists the paths, not just the count — gh#131); when the clean checkout trails `origin/<default>` the gate **fast-forwards local main** as it closes out (never a merge — anything that cannot fast-forward prints the operator's exact `git pull --ff-only` command); **one question** (Finish? — mentions unmerged-looking commits with the playbook's `merge` policy in mind, and warns when the forge release create failed at `release-done` and no retry succeeded) — or `--confirmed`; under `merge = merge`, commits that never reached the default branch are a **policy violation**: `yolo` does not answer it, only your explicit answer does; to abandon an unreleased feature use `abort` |
|
|
24
24
|
| `reflect ["<note>"|list|tidy|move <n> --playbook|--code|done <n> ["<what>"]]` | — | `reflect "<note>"` queues a suggestion in **this project's** `reflections.md` (never gates; gate flags such as `--confirmed` are ignored, they never become part of the note). `--playbook` (alias `--docs`) files it under `## playbook` — the fix lives only in `project.md`, a docs flow implements it; `--code` files it under `## code` — the fix touches project code, a patch flow implements it. `--plugin` **never writes**: dev-flow feedback is filed upstream, so it prints the recipe — `gh issue list --repo <dev-flow repo> --state all --search …` first, then `gh issue create` with a body ending `— reflection from <slug> <date>` (in the dev-flow repo itself plugin is code → `## code`). With no flag the wording guesses (plugin-shaped → the recipe; otherwise `## playbook`) and the echo prints why. `reflect list` numbers the open items with their section; `reflect move <n> --playbook|--code` re-files one; `reflect done <n> ["<what>"]` checks a fixed one off (`— fixed: <date> <slug> — <what>`) so doctor stops re-reporting it; a legacy `## plugin` row is flagged by list and doctor (file it upstream, check it off `— filed: gh#NNN`). `reflect tidy` drops the closed (`- [x]`) items — the preamble and open items stay verbatim and a `## section` heading left empty goes with its items. **Nudges are timed, not constant**: `⚑ fix the open reflections now?` prints when an item recurred this session, is ≥ 14 days old, ≥ 3 playbook items wait, or a code item waits while between flows — at finish, in an unbound session and in doctor, never mid-feature; `↻ N closed reflection(s)` prints at ≥ 5 closed, closed ≥ open (≥ 3), or a closed item ≥ 30 days old. Bare `reflect` prints the **session-reflection protocol** (from the `/flow reflect` bar it additionally wakes the model): bound to a flow, delegate the review to `flow_stage` op `reflect`; unbound, review inline; re-check every open item against the playbook and **newer dev-flow versions** (`npm view pi-dev-flow version`; the operator performs updates); show the operator a numbered list with a fold/drop recommendation per finding and stop; fold docs/code → `reflect --playbook|--code`, fold plugin → the upstream issue, drop → nothing recorded |
|
|
25
25
|
| `roadmap [add "<feature>" [--slug=<slug>] [--brief=<notes>\|--brief-file=<path>] \| pick <n> <slug> \| done <n> \| tidy]` | — | manages `.dev-flow/roadmap.md`, the gitignored backlog of future features (`- [ ]` checklist): bare prints the numbered open items, `add` appends one (`--slug=` stamps it like pick, `--brief=`/`--brief-file=` keeps notes under it as ` > ` lines, and a bound session records `— split from <slug>` — the spin-off route for a new feature surfaced mid-flow), `pick <n> <slug>` stamps open item n with `(slug)` so `flow start <slug>` can take it (start seeds `plan/plan.md` with the item and its brief) — **`finish` checks the stamped item off when that feature ships**; `done <n>` checks off by hand (items shipped outside a flow), `tidy` drops the checked lines. Never gates; the open count is surfaced in `status` and session context |
|
|
26
26
|
| `doctor ["<issue note>"]` | — | read-only findings: playbook drift, dead commands/scripts, untracked playbook, ghost feature dirs, orphan worktrees/branches — the state of an **aborted** feature is never a finding (its worktree cleanup is by design — gh#138) — **plus a review of every open reflection, each routed to the flow that should fix it** (playbook item → docs flow; plugin item → upstream issue, or a patch/normal flow inside the dev-flow repo) — every item is labelled from the `## section` it is filed under (the file is the record, so the table cannot disagree with it) and items sitting outside both sections are named rather than silently bucketed. It writes nothing and asks nothing, safe for agents and CI at any stage; the agent investigates, you confirm, the routed flow implements. `doctor "<note>"` prints an investigation brief and a fix route for a fresh observation, including the section it would be filed under and why |
|
package/docs/guardrails.md
CHANGED
|
@@ -14,9 +14,9 @@ While a feature is active, the extension intercepts every tool call:
|
|
|
14
14
|
- **Your project's own rules**: every `deny`/`confirm`/`protect`/`forbid` rule from the `flow-guard` block in project.md `## global` runs on every bash command and every edit/write path — in every stage and binding, ahead of dev-flow's own verdicts. A block always carries the reason you wrote.
|
|
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
|
-
- **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.
|
|
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 command that carries its own `timeout N` (coreutils, any option form, `s`/`m`/`h` suffixes) gets N + 15s, so its own timer fires first; an unreadable N falls back to the wrapped command's class. The armed value is **invisible in the call's arguments**: the transcript and pi-web's tool card show what the model wrote, and dev-flow sets the timeout after that. So when it is dev-flow's default that kills a command, the result gets a line saying so (`[dev-flow] stopped at 30s: dev-flow's default for quick commands, armed because the call stated no timeout…`), and the session's injected ground rules tell the agent the default exists. `test/e2e-timeout.test.ts` proves the kill end to end through a real pi session, so a host release that stopped honouring the hook would fail the suite. 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
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
|
-
- The active stage is injected into the model's context
|
|
19
|
+
- The active stage is injected into the model's context — in full when it changed (or after a compaction), as one line when it did not; 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 → `finish` (which records the release first when `release-done` was not run). 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. In **pi-web** status text is not clickable, so there the footer is a widget chip instead: the chip carries the footer's content packed to fit pi-web's fixed-width chip — bound: every glyph up front with no spaces, then the slug (`🔨⚡⚠️my-feature`, so only the slug's tail can clip); unbound: `💬 2 open` (hover shows a clipped label whole) and expands (click again to collapse) to one lean line per *other* unfinished flow — the bound flow is already the chip's label, so it is not repeated (alone in the repo, the panel says `no other flows open`); the stage word is spelled out, markers and `⚠️` follow the footer vocabulary; with nothing open (`💬 no flows`) it is a plain chip with nothing to expand. The TUI never shows it: a widget there is an always-present block, and in a terminal the footer stays the legend. 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
|
|
|
22
22
|
## Limitations (deliberate, v1)
|
package/docs/playbook.md
CHANGED
|
@@ -170,7 +170,10 @@ gate prints `health: none configured` and `flow doctor` flags the combination. T
|
|
|
170
170
|
`versionFile`/`versionTag` (defaults `v{version}`; accepted under either section) and
|
|
171
171
|
`merge = squash | merge | rebase | any` — how a merged PR lands on the default branch (see below) — and
|
|
172
172
|
`yolo = all | until-release`: with `until-release` a yolo given at an earlier checkpoint never answers Release?
|
|
173
|
-
(for repos whose rules want the release word given after the commits exist; default `all`)
|
|
173
|
+
(for repos whose rules want the release word given after the commits exist; default `all`) — and
|
|
174
|
+
`reflect = on-friction | always`: when `flow finish` runs the closing reflection worker. `on-friction` (default)
|
|
175
|
+
skips it for a flow that hit no gate refusal and no guard block and carries no `--note`; `always` runs it every
|
|
176
|
+
time. `## global` also takes
|
|
174
177
|
`forge = github | gitlab | self` — the release machinery's target; when unset it is detected from the
|
|
175
178
|
`origin` URL at the moment of use (GitHub gets `gh`, GitLab gets `glab`, self-hosted stays forge-neutral:
|
|
176
179
|
no automatic release creation, merge proof by ancestry only), and `release.releases = false` skips
|
|
@@ -255,6 +258,18 @@ the skill itself — the **Stage reports** clause in `SKILL.md` ground rules, ec
|
|
|
255
258
|
`Stage reports:` line in every stage-context injection — so every repo using dev-flow gets the same
|
|
256
259
|
output protocol without writing a word of playbook prose. This is the human explanation of it.
|
|
257
260
|
|
|
261
|
+
**Two readers, one result.** Every `flow` tool result is split. The agent's copy keeps every
|
|
262
|
+
instruction (what to run next, what to ask). Your copy — the tool row in the TUI — shows a header
|
|
263
|
+
(`✅ Verification · dark-mode`, `❌ … refused`, `💬` when it waits on you), the stage line, the facts,
|
|
264
|
+
and the one question waiting on you, phrased as a word to answer in chat. Lines the gate marks
|
|
265
|
+
agent-only, and any clause that names a `flow` command, are left out of your copy (expand the row to see
|
|
266
|
+
them dimmed). The test suite checks every gate it drives: no operator view names a command. If an answer
|
|
267
|
+
still hands you a command to type, the next run gets a hidden correction.
|
|
268
|
+
|
|
269
|
+
**The gate writes the stage line.** It is built from state on every gate that has a feature in scope,
|
|
270
|
+
so it is the same every time; the agent pastes it as is (`stage line for your report`) instead of
|
|
271
|
+
rebuilding glyphs and marks from memory.
|
|
272
|
+
|
|
258
273
|
One gate message = **stage line** + event title + **`Done:`** / **`Next steps:`** blocks, all plain
|
|
259
274
|
markdown, **never fenced** (a fenced block renders monospace with a horizontal scrollbar in web UIs;
|
|
260
275
|
fences stay for diffs and command output).
|
|
@@ -287,7 +302,7 @@ counts, not vibes. `Next steps:` lists the operator's verbs in italics (the reco
|
|
|
287
302
|
gate commands** (the agent runs those): recommended first, then alternatives, then *yolo* last with
|
|
288
303
|
what it pre-confirms, then the plain closing line "or say what to do differently". Example:
|
|
289
304
|
|
|
290
|
-
> **🔍 pre-release · `dark-mode`** — `normal` ✓ · ui `on
|
|
305
|
+
> **🔍 pre-release · `dark-mode`** — `normal` ✓playbook · ui `on` ✓ · commits `4 ahead, 0 uncommitted` · checks test ✓ build ✓ · version `0.56.0` ~ · merge `merge` ✓playbook · `feat/dark-mode@3f2c1a9`
|
|
291
306
|
>
|
|
292
307
|
> **Release prep done**
|
|
293
308
|
>
|