pi-dev-flow 0.75.0 → 0.76.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 +7 -0
- package/docs/guardrails.md +1 -1
- package/extensions/dev-flow.ts +11 -3
- package/package.json +1 -1
- package/src/core.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.76.0] - 2026-11-03
|
|
8
|
+
|
|
9
|
+
**The status bar now lists the flows.** In pi-web the footer was text — nothing to click, and no way to see what was in flight without asking the agent.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- In pi-web, dev-flow carries a collapsible flow-list widget beside the footer: a `dev-flow` chip in the status shelf whose panel shows one line per unfinished flow — `→` marks the session's bound flow, the stage word is spelled out, footer markers (`⚡ 📚 🎱 💬`) and `⚠️` on failing checks read exactly as in the footer. It repaints at session start, at every run start and after every gate, and hides while nothing is open. The terminal keeps the footer as its only surface.
|
|
13
|
+
|
|
7
14
|
## [0.75.0] - 2026-11-03
|
|
8
15
|
|
|
9
16
|
**`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.
|
package/docs/guardrails.md
CHANGED
|
@@ -17,7 +17,7 @@ While a feature is active, the extension intercepts every tool call:
|
|
|
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
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
|
-
- **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.
|
|
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** the footer text is not clickable, so an initiated repo also carries a `dev-flow` widget there: a chip in the status shelf whose panel expands (click again to collapse) to one lean line per unfinished flow — `→` marks the session's bound flow, the stage word is spelled out, markers and `⚠️` follow the footer vocabulary — and no chip appears while nothing is open. 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)
|
|
23
23
|
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -109,6 +109,7 @@ import {
|
|
|
109
109
|
validSlug,
|
|
110
110
|
verifyGate,
|
|
111
111
|
versionTagGate,
|
|
112
|
+
widgetLines,
|
|
112
113
|
writeGuard,
|
|
113
114
|
mainCheckoutRoot,
|
|
114
115
|
buildWorkerBrief,
|
|
@@ -2025,15 +2026,22 @@ function tail(out: string, n = 15): string {
|
|
|
2025
2026
|
|
|
2026
2027
|
/** Compact footer: bound flow = stage glyph, slug, mode markers, ⚠️ on its failing checks; unbound = the
|
|
2027
2028
|
* unfinished-flow count, or `💬 no flows` — an initiated repo always carries the footer. An uninitiated
|
|
2028
|
-
* folder gets nothing: the status is cleared.
|
|
2029
|
+
* folder gets nothing: the status is cleared. In pi-web the footer text is not clickable, so the same
|
|
2030
|
+
* snapshot also feeds a flow-list widget (a `dev-flow` chip whose panel lists every open flow, one lean
|
|
2031
|
+
* line each). Pure read — rendering never binds or claims anything. */
|
|
2029
2032
|
function refreshStatus(ctx: ExtensionContext, root: string): void {
|
|
2030
2033
|
if (!ctx.hasUI) return;
|
|
2031
2034
|
if (!initiated(root)) {
|
|
2032
2035
|
ctx.ui.setStatus("dev-flow", undefined);
|
|
2036
|
+
if (ctx.mode !== "tui") ctx.ui.setWidget("dev-flow", undefined);
|
|
2033
2037
|
return;
|
|
2034
2038
|
}
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2039
|
+
const un = unfinishedStates(root);
|
|
2040
|
+
const bound = boundFeature(root, sessionKey(ctx));
|
|
2041
|
+
ctx.ui.setStatus("dev-flow", statusFor(bound, un.length).text);
|
|
2042
|
+
// TUI keeps the footer as its only surface: a lines-widget there is an always-present block above the
|
|
2043
|
+
// editor (no click to collapse), which competes with "the footer is the legend". pi-web gets the chip.
|
|
2044
|
+
if (ctx.mode !== "tui") ctx.ui.setWidget("dev-flow", un.length ? widgetLines(bound, un) : undefined);
|
|
2037
2045
|
}
|
|
2038
2046
|
|
|
2039
2047
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.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/src/core.ts
CHANGED
|
@@ -1440,6 +1440,18 @@ export function statusFor(bound: FlowState | null, openCount: number): { text: s
|
|
|
1440
1440
|
return { text: `💬 ${openCount} flow${openCount === 1 ? "" : "s"} open` };
|
|
1441
1441
|
}
|
|
1442
1442
|
|
|
1443
|
+
/** The pi-web widget panel's lines: one lean line per unfinished flow — `→` marks this session's bound
|
|
1444
|
+
* flow, glyph + markers ride on statusCompact so the panel and the footer never drift in vocabulary —
|
|
1445
|
+
* plus the spelled-out stage word and the `⚠️` on failing checks the compact footer cannot show. The
|
|
1446
|
+
* panel is the glance surface; `flow status` stays the detailed one. Empty in, empty out (the caller
|
|
1447
|
+
* clears the widget — no chip with nothing to expand). */
|
|
1448
|
+
export function widgetLines(bound: FlowState | null, states: FlowState[]): string[] {
|
|
1449
|
+
return states.map((st) => {
|
|
1450
|
+
const { text, failed } = statusCompact(st);
|
|
1451
|
+
return `${st.slug === bound?.slug ? "→" : " "} ${text} · ${st.stage}${failed ? " ⚠️" : ""}`;
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1443
1455
|
/** `- [ ]` checklist items of a markdown document (reflections.md and roadmap.md share the format). */
|
|
1444
1456
|
export function openChecklistItems(text: string): string[] {
|
|
1445
1457
|
return text.split("\n").map((l) => l.trim()).filter((l) => l.startsWith("- [ ] "));
|