pi-dev-flow 0.77.1 โ 0.77.3
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 +10 -0
- package/docs/guardrails.md +1 -1
- package/extensions/dev-flow.ts +23 -7
- package/package.json +1 -1
- package/src/core.ts +31 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.77.3] - 2026-11-03
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- pi-web's footer chip is packed to fit its fixed width (longer labels were clipped with `โฆ`): unbound reads `๐ฌ N open` instead of `๐ฌ N flows open`; bound puts every glyph first with no spaces, then the slug โ `๐จโกโ ๏ธmy-feature` instead of `๐จ my-feature โก` โ so a clip only ever cuts the slug's tail, never the stage or markers (hover shows it whole). The terminal footer is unchanged.
|
|
11
|
+
|
|
12
|
+
## [0.77.2] - 2026-11-03
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- In pi-web the flow list now lives in the footer itself: the `๐ฌ N flows open` (or bound `<glyph> <slug>`) footer is the clickable chip that expands to the per-flow list, instead of a separate `dev-flow` chip beside it. The panel lists only the flows other than the bound one (that one is the chip's label); alone, it reads `no other flows open`. With nothing open it reads `๐ฌ no flows` and has nothing to expand. The terminal footer is unchanged.
|
|
16
|
+
|
|
7
17
|
## [0.77.1] - 2026-11-03
|
|
8
18
|
|
|
9
19
|
### Changed
|
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. In **pi-web**
|
|
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)
|
|
23
23
|
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -119,6 +119,7 @@ import {
|
|
|
119
119
|
verifyGate,
|
|
120
120
|
versionTagGate,
|
|
121
121
|
widgetLines,
|
|
122
|
+
chipLabel,
|
|
122
123
|
writeGuard,
|
|
123
124
|
mainCheckoutRoot,
|
|
124
125
|
buildWorkerBrief,
|
|
@@ -2121,24 +2122,39 @@ function tail(out: string, n = 15): string {
|
|
|
2121
2122
|
|
|
2122
2123
|
// ------------------------------------------------------------------ extension
|
|
2123
2124
|
|
|
2125
|
+
/** The pi-web chip's current key: the chip's label IS the widget key, so it changes with the footer text
|
|
2126
|
+
* and the previous one must be cleared on every repaint. */
|
|
2127
|
+
let webChipKey: string | undefined;
|
|
2128
|
+
|
|
2124
2129
|
/** Compact footer: bound flow = stage glyph, slug, mode markers, โ ๏ธ on its failing checks; unbound = the
|
|
2125
2130
|
* unfinished-flow count, or `๐ฌ no flows` โ an initiated repo always carries the footer. An uninitiated
|
|
2126
|
-
* folder gets nothing: the status is cleared. In pi-web the footer text is not clickable, so the
|
|
2127
|
-
*
|
|
2128
|
-
* line each). Pure read โ rendering never binds or claims anything. */
|
|
2131
|
+
* folder gets nothing: the status is cleared. In pi-web the footer text is not clickable, so there the
|
|
2132
|
+
* footer IS a widget: one chip labelled with the footer text whose panel lists every open flow, one lean
|
|
2133
|
+
* line each (no lines โ a plain, non-expandable chip). Pure read โ rendering never binds or claims anything. */
|
|
2129
2134
|
function refreshStatus(ctx: ExtensionContext, root: string): void {
|
|
2130
2135
|
if (!ctx.hasUI) return;
|
|
2136
|
+
const web = ctx.mode !== "tui";
|
|
2137
|
+
const setChip = (key: string | undefined, lines?: string[]) => {
|
|
2138
|
+
if (webChipKey !== undefined && webChipKey !== key) ctx.ui.setWidget(webChipKey, undefined);
|
|
2139
|
+
webChipKey = key;
|
|
2140
|
+
if (key !== undefined) ctx.ui.setWidget(key, lines);
|
|
2141
|
+
};
|
|
2131
2142
|
if (!initiated(root)) {
|
|
2132
2143
|
ctx.ui.setStatus("dev-flow", undefined);
|
|
2133
|
-
if (
|
|
2144
|
+
if (web) setChip(undefined);
|
|
2134
2145
|
return;
|
|
2135
2146
|
}
|
|
2136
2147
|
const un = unfinishedStates(root);
|
|
2137
2148
|
const bound = boundFeature(root, sessionKey(ctx));
|
|
2138
|
-
ctx.ui.setStatus("dev-flow", statusFor(bound, un.length).text);
|
|
2139
2149
|
// TUI keeps the footer as its only surface: a lines-widget there is an always-present block above the
|
|
2140
|
-
// editor (no click to collapse), which competes with "the footer is the legend". pi-web
|
|
2141
|
-
|
|
2150
|
+
// editor (no click to collapse), which competes with "the footer is the legend". pi-web shows the footer
|
|
2151
|
+
// text once, as the chip itself โ a status line beside it would only repeat it.
|
|
2152
|
+
if (!web) {
|
|
2153
|
+
ctx.ui.setStatus("dev-flow", statusFor(bound, un.length).text);
|
|
2154
|
+
return;
|
|
2155
|
+
}
|
|
2156
|
+
ctx.ui.setStatus("dev-flow", undefined);
|
|
2157
|
+
setChip(chipLabel(bound, un.length), widgetLines(bound, un));
|
|
2142
2158
|
}
|
|
2143
2159
|
|
|
2144
2160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.77.
|
|
3
|
+
"version": "0.77.3",
|
|
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
|
@@ -1419,11 +1419,16 @@ export function claimBlocks(claim: SessionClaim | null, myKey: string, alive: (p
|
|
|
1419
1419
|
/** Footer glyph per stage: the footer has no room for stage words and no legend of its own (README:Status bar is the legend). */
|
|
1420
1420
|
export const STAGE_EMOJI: Record<Stage, string> = { plan: "๐", implement: "๐จ", "pre-release": "๐", release: "๐" };
|
|
1421
1421
|
|
|
1422
|
-
|
|
1423
|
-
|
|
1422
|
+
/** Mode markers in footer order: โก patch / ๐ docs, ๐ฑ yolo, ๐ฌ unanswered checkpoint. */
|
|
1423
|
+
function modeMarkers(state: FlowState): string[] {
|
|
1424
1424
|
// ๐ฌ is the legend's "operator, your turn" (docs/playbook.md stage lines): a bound flow whose checkpoint
|
|
1425
1425
|
// is unanswered is parked on the operator, and the footer is the only thing they see.
|
|
1426
|
-
return
|
|
1426
|
+
return [state.patch ? "โก" : state.docs ? "๐" : "", state.yolo ? "๐ฑ" : "", state.pendingAsk ? "๐ฌ" : ""].filter(Boolean);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export function statusCompact(state: FlowState): { text: string; failed: boolean } {
|
|
1430
|
+
const failed = Object.values(state.checks).some((c) => !c.ok);
|
|
1431
|
+
return { text: [STAGE_EMOJI[state.stage], state.slug, ...modeMarkers(state)].join(" "), failed };
|
|
1427
1432
|
}
|
|
1428
1433
|
|
|
1429
1434
|
/** Footer decision for any session in an initiated repo: a bound feature renders as statusCompact, its โ ๏ธ
|
|
@@ -1441,15 +1446,31 @@ export function statusFor(bound: FlowState | null, openCount: number): { text: s
|
|
|
1441
1446
|
return { text: `๐ฌ ${openCount} flow${openCount === 1 ? "" : "s"} open` };
|
|
1442
1447
|
}
|
|
1443
1448
|
|
|
1444
|
-
/** The pi-web
|
|
1445
|
-
*
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1448
|
-
|
|
1449
|
+
/** The pi-web footer chip's label: pi-web chips are a fixed ~108px and ellipsize anything longer, so the
|
|
1450
|
+
* unbound count drops the word "flows" (`๐ฌ 2 open`; the panel spells the flows out), and a bound flow
|
|
1451
|
+
* packs every glyph up front with no spaces โ stage, markers, โ ๏ธ โ then the slug (`๐จโกโ ๏ธmy-feature`):
|
|
1452
|
+
* the state survives the ellipsis, only the slug's tail clips (the hover tooltip shows it whole). */
|
|
1453
|
+
export function chipLabel(bound: FlowState | null, openCount: number): string {
|
|
1454
|
+
if (bound) {
|
|
1455
|
+
const failed = Object.values(bound.checks).some((c) => !c.ok);
|
|
1456
|
+
return `${STAGE_EMOJI[bound.stage]}${modeMarkers(bound).join("")}${failed ? "โ ๏ธ" : ""}${bound.slug}`;
|
|
1457
|
+
}
|
|
1458
|
+
if (openCount < 1) return statusFor(bound, openCount).text;
|
|
1459
|
+
return `๐ฌ ${openCount} open`;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/** The pi-web footer chip's panel lines: the chip's label already is this session's footer (the bound
|
|
1463
|
+
* flow, or the open count), so the panel lists only the OTHER unfinished flows, one lean line each โ
|
|
1464
|
+
* glyph + markers ride on statusCompact so panel and footer never drift in vocabulary โ plus the
|
|
1465
|
+
* spelled-out stage word and the `โ ๏ธ` on failing checks. A bound session alone in the repo gets one
|
|
1466
|
+
* "no other flows open" line (the chip still expands, never looks dead); unbound with nothing open
|
|
1467
|
+
* gets no lines (a plain `๐ฌ no flows` chip). `flow status` stays the detailed surface. */
|
|
1449
1468
|
export function widgetLines(bound: FlowState | null, states: FlowState[]): string[] {
|
|
1450
|
-
|
|
1469
|
+
const others = states.filter((st) => st.slug !== bound?.slug);
|
|
1470
|
+
if (bound && !others.length) return ["no other flows open"];
|
|
1471
|
+
return others.map((st) => {
|
|
1451
1472
|
const { text, failed } = statusCompact(st);
|
|
1452
|
-
return `${
|
|
1473
|
+
return `${text} ยท ${st.stage}${failed ? " โ ๏ธ" : ""}`;
|
|
1453
1474
|
});
|
|
1454
1475
|
}
|
|
1455
1476
|
|