pi-dev-flow 0.86.1 โ 0.86.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 +14 -0
- package/docs/playbook.md +3 -2
- package/extensions/dev-flow.ts +13 -7
- package/package.json +1 -1
- package/skills/dev-flow/SKILL.md +7 -2
- package/skills/dev-flow/references/finish.md +2 -1
- package/skills/dev-flow/references/implement.md +3 -1
- package/skills/dev-flow/references/plan.md +4 -3
- package/skills/dev-flow/references/pre-release.md +2 -2
- package/src/runtime/base.ts +21 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.86.3] - 2026-11-09
|
|
8
|
+
|
|
9
|
+
**dev-flow talks to you in outcomes, not internals.**
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **Chat reports are shorter and plainer.** Messages to you often walked through module names, function names and code paths you didn't need. The always-on rules now tell the agent to lead with what changed or is wrong and why it matters, in a few plain lines, and to name a file or function only when you have to act on it. The plan direction, Verified?, Release? and finish findings each got the same nudge. The full technical detail is still in plan.md, the commits and the diff, and the agent gives it in full when you ask.
|
|
13
|
+
|
|
14
|
+
## [0.86.2] - 2026-11-09
|
|
15
|
+
|
|
16
|
+
**Stale stage chips in pi-web clear themselves after a dropped connection.**
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **pi-web no longer piles up old stage chips beside the current one.** dev-flow's chip in pi-web is labelled with the stage, so each stage change removes the old chip and adds a new one. If the browser's connection was down at that moment (a phone in the background, say), it missed the removal, and pi-web does not re-sync chips on reconnect, so one stale chip was left per missed stage change. Every repaint now re-sends the removal for the last few chips the session showed, so a missed one disappears at the next turn.
|
|
20
|
+
|
|
7
21
|
## [0.86.1] - 2026-11-08
|
|
8
22
|
|
|
9
23
|
**A reply that stops mid-thought resumes on its own instead of stalling the flow.**
|
package/docs/playbook.md
CHANGED
|
@@ -296,8 +296,9 @@ recorded / main-state / unmerged / reflections at ๐.
|
|
|
296
296
|
|
|
297
297
|
**The checkpoint** closes exactly one message per stage (the operator's verb stays a plain-chat word
|
|
298
298
|
โ a structured-question tool is not chat). Event title, then the labels **`Done:`** and
|
|
299
|
-
**`Next steps:`** standing alone on their own lines. `Done:`
|
|
300
|
-
counts, not vibes
|
|
299
|
+
**`Next steps:`** standing alone on their own lines. `Done:` says what now works, in plain words and
|
|
300
|
+
counts, not vibes; a path or SHA only when the operator needs it. Internals (modules, code paths)
|
|
301
|
+
stay out of chat unless asked. `Next steps:` lists the operator's verbs in italics (the recommended one
|
|
301
302
|
***bold italic***, and no line needs a "(recommended)" tag when the styling carries it) and **never
|
|
302
303
|
gate commands** (the agent runs those): recommended first, then alternatives, then *yolo* last with
|
|
303
304
|
what it pre-confirms, then the plain closing line "or say what to do differently". Example:
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -29,7 +29,7 @@ import { loadProject } from "../src/projectmd.ts";
|
|
|
29
29
|
import { bashTimeout, requireTimeout, timeoutClass } from "../src/timeouts.ts";
|
|
30
30
|
import { AGENT_MARK, operatorCommandAsks, operatorCommandCorrection, viewHeader, askLine, type GateView } from "../src/present.ts";
|
|
31
31
|
import { Text } from "@earendil-works/pi-tui";
|
|
32
|
-
import { CONTEXT_EMITTED, COPIES, GATE_HELP, SELF_BUILD, SKILL_DIR, type Ui, WEB_CHIP_KEYS, baseSeams, bindings, boundFeature, claimBlocker, claimFile, compacting, compactionTakeover, coreInjected, coreStale, currentBranch, dfDir, featDir, featureRefs, flowCompactInstructions, flowRoot, guardsAreMine, initiated, lastContext, loadedVersion, maybeCompactNow, noteFriction, now, readClaim, readReflections, readReflectionsText, readRoadmap, readState, registerCopy, releaseSession, sessionKey, sh, skillCore, unfinishedStates, worktreeAbs, writeClaim, writeState } from "../src/runtime/base.ts";
|
|
32
|
+
import { CONTEXT_EMITTED, COPIES, GATE_HELP, SELF_BUILD, SKILL_DIR, type Ui, WEB_CHIP_KEYS, LEGACY_CHIP_KEYS, nextChipKeys, baseSeams, bindings, boundFeature, claimBlocker, claimFile, compacting, compactionTakeover, coreInjected, coreStale, currentBranch, dfDir, featDir, featureRefs, flowCompactInstructions, flowRoot, guardsAreMine, initiated, lastContext, loadedVersion, maybeCompactNow, noteFriction, now, readClaim, readReflections, readReflectionsText, readRoadmap, readState, registerCopy, releaseSession, sessionKey, sh, skillCore, unfinishedStates, worktreeAbs, writeClaim, writeState } from "../src/runtime/base.ts";
|
|
33
33
|
import { type Session, presentRun } from "../src/runtime/checks.ts";
|
|
34
34
|
import { isSelfRepo } from "../src/runtime/setup.ts";
|
|
35
35
|
import { foldView, pluginUpstream } from "../src/runtime/reflect.ts";
|
|
@@ -51,14 +51,20 @@ function refreshStatus(ctx: ExtensionContext, root: string): void {
|
|
|
51
51
|
if (!ctx.hasUI) return;
|
|
52
52
|
const web = ctx.mode !== "tui";
|
|
53
53
|
const sk = sessionKey(ctx);
|
|
54
|
+
// Old keys are cleared on EVERY repaint, not once โ a clear the browser missed while its event stream
|
|
55
|
+
// was down (pi-web never re-syncs widgets on reconnect) is re-sent until the history ages it out.
|
|
54
56
|
const setChip = (key: string | undefined, lines?: string[]) => {
|
|
55
|
-
|
|
56
|
-
if (prev
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
ctx.ui.setWidget(key, lines);
|
|
57
|
+
let prev = WEB_CHIP_KEYS.get(sk);
|
|
58
|
+
if (prev === undefined) {
|
|
59
|
+
const legacy = LEGACY_CHIP_KEYS?.get(sk);
|
|
60
|
+
LEGACY_CHIP_KEYS?.delete(sk);
|
|
61
|
+
prev = legacy === undefined ? [] : [legacy];
|
|
61
62
|
}
|
|
63
|
+
const next = nextChipKeys(prev, key);
|
|
64
|
+
for (const k of next.clear) ctx.ui.setWidget(k, undefined);
|
|
65
|
+
if (next.keys.length) WEB_CHIP_KEYS.set(sk, next.keys);
|
|
66
|
+
else WEB_CHIP_KEYS.delete(sk);
|
|
67
|
+
if (key !== undefined) ctx.ui.setWidget(key, lines);
|
|
62
68
|
};
|
|
63
69
|
if (!initiated(root)) {
|
|
64
70
|
ctx.ui.setStatus("dev-flow", undefined);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.86.
|
|
3
|
+
"version": "0.86.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/skills/dev-flow/SKILL.md
CHANGED
|
@@ -30,11 +30,16 @@ criteria hold. Call it with an args array โ `["start", "dark-mode"]`,
|
|
|
30
30
|
- **Stage reports** โ open every report with the **stage line the gate
|
|
31
31
|
returned** (`stage line for your report`), pasted as is โ the gate builds it
|
|
32
32
|
from state. A checkpoint message then has an event title and, on their own
|
|
33
|
-
lines, **`Done:`** (
|
|
34
|
-
operator's options as italic verbs, the recommended one ***bold italic***
|
|
33
|
+
lines, **`Done:`** (outcomes; a path or SHA only when useful) and
|
|
34
|
+
**`Next steps:`** โ the operator's options as italic verbs, the recommended one ***bold italic***
|
|
35
35
|
first, *yolo* last with what it pre-confirms, then the line
|
|
36
36
|
"or say what to do differently". Plain markdown, never fenced, never a gate
|
|
37
37
|
command.
|
|
38
|
+
- **Talk outcomes, not internals.** Chat is for the operator: what changed or
|
|
39
|
+
is wrong, why it matters, in plain words and a few lines. Name a file or
|
|
40
|
+
function only when they must act on it โ no code-path walkthroughs or
|
|
41
|
+
internal identifiers. Depth lives in plan.md, commits and the diff; give it
|
|
42
|
+
in full when asked.
|
|
38
43
|
- **yolo** at a checkpoint โ that gate with `--yolo --confirmed`; run the
|
|
39
44
|
remaining gates back to back without asking, honoring guidance attached to
|
|
40
45
|
the word ("yolo, patch bump", "yolo, no tag" โ `--no-version`). Checks,
|
|
@@ -18,7 +18,8 @@ unbinds the session โ so anything that needs them runs first.
|
|
|
18
18
|
- Worker failed โ nothing is removed: re-run, or review inline (bare `flow
|
|
19
19
|
reflect` prints the protocol). Only the operator's explicit word skips
|
|
20
20
|
it: `flow finish --no-reflect --confirmed` โ yolo never does.
|
|
21
|
-
2. **Findings โ ask fold or drop** per item
|
|
21
|
+
2. **Findings โ ask fold or drop** per item โ one plain line each โ with
|
|
22
|
+
your recommendation (`fold
|
|
22
23
|
1,3 drop 2` is a fine answer), and stop. That answer **is** Finish?.
|
|
23
24
|
3. **Apply it**: fold docs โ `flow reflect --playbook "<note>"`; fold code โ
|
|
24
25
|
`flow reflect --code "<note>"`; fold plugin โ `flow reflect --plugin
|
|
@@ -31,7 +31,9 @@ note). Other sessions' worktrees are theirs.
|
|
|
31
31
|
RAM/disk: ask, then re-run with `--port=<n>` or `--replace`.
|
|
32
32
|
- The health probe retries every 2s up to `healthWait` (default 30s); a
|
|
33
33
|
service that needs a moment is not a broken deploy.
|
|
34
|
-
2. Look at the change yourself, **keep the app running**, ask **Verified
|
|
34
|
+
2. Look at the change yourself, **keep the app running**, ask **Verified?**
|
|
35
|
+
โ say what changed for the user and how to see it, not which modules
|
|
36
|
+
changed.
|
|
35
37
|
Report opening: **๐จ implement ยท `<slug>`** (the gate's stage line).
|
|
36
38
|
3. Answer โ `flow verify --confirmed` (yolo โ `--yolo --confirmed`). If the
|
|
37
39
|
default branch moved since the review deploy it refuses: run `flow verify`
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
No code edits before approval. Reads are always allowed.
|
|
6
6
|
|
|
7
7
|
1. **Research** the code the plan needs.
|
|
8
|
-
2. **Clarify before drafting**: give your direction in chat โ
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
2. **Clarify before drafting**: give your direction in chat โ the problem in
|
|
9
|
+
one sentence, the fix in a few plain lines, open unknowns, the mode you
|
|
10
|
+
propose and why โ and ask your questions. File-by-file detail belongs in
|
|
11
|
+
plan.md, not chat. Draft only after the direction is confirmed.
|
|
11
12
|
3. **Write `.dev-flow/<slug>/plan/plan.md`** โ problem, approach, files to
|
|
12
13
|
touch, test strategy, risks. Reviewable, not exhaustive.
|
|
13
14
|
- Create it as soon as the direction is confirmed and keep it current: chat
|
|
@@ -28,8 +28,8 @@ and settle the scheme with the operator; never invent one.
|
|
|
28
28
|
changelog this branch never touched. `--no-fold-check` only on the
|
|
29
29
|
operator's word.
|
|
30
30
|
4. `flow check` โ the prep made the earlier checks stale.
|
|
31
|
-
5. **Ask Release? and stop.**
|
|
32
|
-
changelog entry. Report opening: **๐ pre-release ยท `<slug>`** (the gate's
|
|
31
|
+
5. **Ask Release? and stop.** Say in a few lines what the PR delivers (the
|
|
32
|
+
changelog entry usually is that), plus the version. Report opening: **๐ pre-release ยท `<slug>`** (the gate's
|
|
33
33
|
stage line; the version field reads `pending` until decided โ never
|
|
34
34
|
invent a bump or a no-version decision). Answer โ `flow release
|
|
35
35
|
--confirmed`.
|
package/src/runtime/base.ts
CHANGED
|
@@ -546,9 +546,24 @@ export function tail(out: string, n = 15): string {
|
|
|
546
546
|
|
|
547
547
|
// ------------------------------------------------------------------ extension
|
|
548
548
|
|
|
549
|
-
/** The pi-web chip
|
|
550
|
-
* footer text and the
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
* the
|
|
554
|
-
|
|
549
|
+
/** The pi-web chip keys a session has painted, oldest first, the current one last: the chip's label IS the
|
|
550
|
+
* widget key, so it changes with the footer text and the old ones must be cleared. Every repaint re-sends
|
|
551
|
+
* the clear for each old key, not just once: pi-web delivers a clear to the browser only over a live
|
|
552
|
+
* event stream and does not re-sync widgets on reconnect, so a phone that was backgrounded across a stage
|
|
553
|
+
* change kept the old chip beside the new one (one per missed stage). Clearing a key the browser no
|
|
554
|
+
* longer has is a no-op, and the next repaint after reconnect retracts what was missed. Bounded to
|
|
555
|
+
* CHIP_KEY_HISTORY keys. Per session, not per process โ one pi-web server repaints many sessions, and a
|
|
556
|
+
* shared slot let session B's repaint overwrite A's key. On globalThis so a /reload or a duplicate copy
|
|
557
|
+
* still knows what was painted (a new name: older copies kept a single string per session there). */
|
|
558
|
+
export const WEB_CHIP_KEYS: Map<string, string[]> = ((globalThis as { __piDevFlowChipKeyHistory?: Map<string, string[]> }).__piDevFlowChipKeyHistory ??= new Map());
|
|
559
|
+
export const CHIP_KEY_HISTORY = 8;
|
|
560
|
+
/** The previous copy's single-key slot, read once per session so the first repaint after an upgrade still
|
|
561
|
+
* retracts the chip that copy painted. */
|
|
562
|
+
export const LEGACY_CHIP_KEYS: Map<string, string> | undefined = (globalThis as { __piDevFlowChipKeys?: Map<string, string> }).__piDevFlowChipKeys;
|
|
563
|
+
|
|
564
|
+
/** Next chip-key history for a repaint: every key except the current one is to be cleared (again), and
|
|
565
|
+
* the current key moves to the end. `key` undefined (uninitiated folder) clears them all. Pure. */
|
|
566
|
+
export function nextChipKeys(prev: readonly string[], key: string | undefined): { clear: string[]; keys: string[] } {
|
|
567
|
+
const clear = prev.filter((k) => k !== key);
|
|
568
|
+
return { clear, keys: key === undefined ? clear.slice(-CHIP_KEY_HISTORY) : [...clear, key].slice(-CHIP_KEY_HISTORY) };
|
|
569
|
+
}
|