pi-dev-flow 0.61.1 → 0.62.1
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 +12 -0
- package/README.md +3 -0
- package/docs/concurrency.md +3 -1
- package/docs/gates.md +1 -1
- package/extensions/dev-flow.ts +20 -4
- package/package.json +1 -1
- package/skills/dev-flow/SKILL.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.62.1] - 2026-10-24
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **The release-done version-skew warning is now self-contained.** When the release gate passed unstamped but `flow release-done` found the session behind the checkout, the warning said only "this session runs dev-flow X, not the build the disk ships" — naming no second version and no second source, so it was not actionable where it printed (`flow status` said the pair; the release output did not). It now prints both versions — `this session runs dev-flow X, <this checkout|the dev-flow install> ships Y` — and appends the two-copies warning when another dev-flow copy is registered in the process, since that duplicate was the real source of the reported confusion (#117).
|
|
12
|
+
|
|
13
|
+
## [0.62.0] - 2026-10-24
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **A bound session wears its feature's name.** `flow start` and `flow use` now rename the pi session to the flow slug (pi's public `setSessionName` API), so the session picker always says which feature each session holds — the missing surface of one-session-one-feature: the footer, the branch and the worktree already named the feature, the picker named nothing. A previous name (pi's auto-title or a hand-set `/rename`) is overwritten — under the flow's model the slug *is* the session's identity; unbind (`abort`/`finish`) keeps the name as the trace of what the session held. The rename rides the binding seam and stays a courtesy: a host without the naming API degrades to a silent no-op and cannot fail a gate, and re-binding the slug a session already carries writes nothing.
|
|
18
|
+
|
|
7
19
|
## [0.61.1] - 2026-10-23
|
|
8
20
|
|
|
9
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -15,6 +15,9 @@ touch, test strategy, risks — plus rendered screenshots for anything user-visi
|
|
|
15
15
|
it, the agent cannot edit code anywhere else in the repo. That is the whole "does it actually plan?"
|
|
16
16
|
question, answered by the harness instead of by trust.
|
|
17
17
|
|
|
18
|
+
**A bound session is self-identifying.** `flow start` (and `flow use`) renames the Pi session after
|
|
19
|
+
the flow slug, so the session picker always tells you which feature each session holds.
|
|
20
|
+
|
|
18
21
|
**Stages end in gates, not vibes.** Each stage has one exit gate that refuses until its criteria
|
|
19
22
|
hold: your plan file exists; every command your playbook names as a check passes; the app really
|
|
20
23
|
starts, with real data, and answers a health probe **after** a real deploy; changelog and version
|
package/docs/concurrency.md
CHANGED
|
@@ -5,7 +5,9 @@ How several agents work one repo at the same time without stepping on each other
|
|
|
5
5
|
**One pi session = one feature** (flow + branch + worktree). A repo can host any number of
|
|
6
6
|
features, worked by separate sessions in parallel — that is the supported shape, not an edge
|
|
7
7
|
case. The binding lives with the session (persisted via session entries, restored on
|
|
8
|
-
resume/fork), so nothing is repo-global
|
|
8
|
+
resume/fork), so nothing is repo-global — and the session carries its feature's name: `flow start`
|
|
9
|
+
and `flow use` rename the pi session to the slug (overwriting any previous name), so the session
|
|
10
|
+
picker always says which feature a session holds. A session binds **explicitly, never automatically**:
|
|
9
11
|
`flow start` binds its own feature, `flow use <slug>` takes one over — even the lone unfinished
|
|
10
12
|
feature waits to be claimed. Every bind leaves a claim (`claim.json`, session + pid),
|
|
11
13
|
and the gates honor the claim too — `flow abort` included, so the verb that erases a feature cannot
|
package/docs/gates.md
CHANGED
|
@@ -17,7 +17,7 @@ so it needs no `--confirmed`.
|
|
|
17
17
|
| `health` | records a check | — (runs `seedData` + the health command, retrying up to `healthWait` seconds; app must be up locally with real data) |
|
|
18
18
|
| `verify [--yolo]` | implement → pre-release | 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 — 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`), 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 |
|
|
19
19
|
| `release [--yolo|--no-version|--no-fold-check]` | pre-release → release | checks re-greened after the prep edits; 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 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`** (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) |
|
|
20
|
-
| `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 |
|
|
20
|
+
| `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) |
|
|
21
21
|
| `finish [--yolo] [slug]` | release → done (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; 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` |
|
|
22
22
|
| `reflect ["<note>"|tidy]` | — | `reflect "<note>"` queues a suggestion in `reflections.md` (never gates; gate flags such as `--confirmed` are ignored, they never become part of the note). `reflect tidy` drops the closed (`- [x]`) items — the preamble and open items stay verbatim and a `## section` heading left empty goes with its items; every surface that queues or reviews reflections (`reflect "<note>"`, bare `reflect`, `doctor`) nudges with the closed count when the checked-off pile grows. Bare `reflect` prints the full **session-reflection protocol** for the agent (from the `/flow reflect` bar it additionally wakes the model, so the protocol executes immediately): review the whole session log, re-check every open item against the current playbook and **newer dev-flow versions** (`npm view pi-dev-flow version` vs the running version — dev-flow ships from npm; recommend `pi install npm:pi-dev-flow` + `/reload`, the operator performs updates), dedupe new findings against the open ones, then report playbook vs plugin items to the operator and ask whether to fix now — plugin items: search upstream issues first (`gh issue list --repo <upstream> --state all --search …`; an author-addressed match is reported back, no match → `gh issue create` with a detailed description and a suggested fix), playbook items: `flow doctor` routes each to the docs flow that implements it |
|
|
23
23
|
| `roadmap [add "<feature>" \| 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, `pick <n> <slug>` stamps open item n with `(slug)` so `flow start <slug>` can take it — **`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 |
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -655,6 +655,8 @@ interface Session {
|
|
|
655
655
|
slug: string | null;
|
|
656
656
|
key: string;
|
|
657
657
|
bind: (slug: string | null) => void;
|
|
658
|
+
/** Name the pi session after a slug (one session = one feature: the picker shows the feature). */
|
|
659
|
+
rename: (slug: string) => void;
|
|
658
660
|
}
|
|
659
661
|
|
|
660
662
|
/** Is this checkout the dev-flow repo itself? Plugin reflections are fixable in-repo only here. */
|
|
@@ -913,7 +915,8 @@ ${mdDigest(draftRefresh)}`))
|
|
|
913
915
|
mkdirSync(path.join(featDir(root, slugArg), "plan"), { recursive: true });
|
|
914
916
|
writeState(root, state);
|
|
915
917
|
sess.bind(slugArg);
|
|
916
|
-
|
|
918
|
+
sess.rename(slugArg);
|
|
919
|
+
return { text: `feature ${slugArg} started at stage plan (ui=${state.ui}${state.patch ? ", patch" : state.docs ? ", docs" : ""}${state.flowVersion ? `, dev-flow ${state.flowVersion}` : ""}); session renamed to ${slugArg}.${notes.length ? `\n${notes.join("\n")}` : ""}\n${nextHint(state, cfg)}` };
|
|
917
920
|
}
|
|
918
921
|
|
|
919
922
|
case "status": {
|
|
@@ -1431,7 +1434,8 @@ ${mdDigest(draftRefresh)}`))
|
|
|
1431
1434
|
ghNote = gr.ok ? `${forge} release ${tag} created. ${notesNote}`.trim() : `${forge} release skipped: ${tail(gr.out)}`;
|
|
1432
1435
|
}
|
|
1433
1436
|
}
|
|
1434
|
-
const
|
|
1437
|
+
const diskBuild = checkoutBuild(root);
|
|
1438
|
+
const behind = sessionRunsOlderBuild(loadedVersion(), diskBuild.version);
|
|
1435
1439
|
const openRelease = checklistPending(cfg, state!, "release");
|
|
1436
1440
|
// release-stage items have no gate of their own: the operator's Finish? answer is what closes them, so
|
|
1437
1441
|
// name them at the last objective gate — on the way out too, or the refusal hides half the story
|
|
@@ -1468,7 +1472,9 @@ ${mdDigest(draftRefresh)}`))
|
|
|
1468
1472
|
state!.staleBuild
|
|
1469
1473
|
? `stale build acknowledged at release gate: this session ran dev-flow ${state!.staleBuild} — proofs newer than it did not run.`
|
|
1470
1474
|
: behind
|
|
1471
|
-
|
|
1475
|
+
// #117: the pair (session vs what the disk ships) makes the warning actionable where it prints;
|
|
1476
|
+
// a second registered copy is what made the skew confusing on the report — name it too
|
|
1477
|
+
? `warning: this session runs dev-flow ${behind}, ${diskBuild.label} ships ${diskBuild.version ?? "?"} — /reload before trusting what it printed.${copyWarning() ? ` ${copyWarning()}` : ""}`
|
|
1472
1478
|
: "",
|
|
1473
1479
|
mergeNote,
|
|
1474
1480
|
openNote,
|
|
@@ -1608,7 +1614,8 @@ ${mdDigest(draftRefresh)}`))
|
|
|
1608
1614
|
const prior = readClaim(root, slugArg);
|
|
1609
1615
|
const takeover = claimBlocks(prior, sess.key) ? ` — taken over from live session (pid ${prior!.pid})` : "";
|
|
1610
1616
|
sess.bind(slugArg);
|
|
1611
|
-
|
|
1617
|
+
sess.rename(slugArg);
|
|
1618
|
+
return { text: `this session is now bound to ${slugArg} (stage ${st.stage})${st.worktree ? ` — work in its worktree: ${st.worktree} (branch ${st.branch})` : ""}; session renamed to ${slugArg}${takeover}` };
|
|
1612
1619
|
}
|
|
1613
1620
|
|
|
1614
1621
|
case "abort": {
|
|
@@ -1719,6 +1726,15 @@ export default function devFlow(pi: ExtensionAPI) {
|
|
|
1719
1726
|
if (prev && prev !== slug && readClaim(ctx.cwd, prev)?.key === key) rmSync(claimFile(ctx.cwd, prev), { force: true });
|
|
1720
1727
|
if (slug) writeClaim(ctx.cwd, slug, key);
|
|
1721
1728
|
},
|
|
1729
|
+
rename: (slug) => {
|
|
1730
|
+
// pi's public session-name API, kept defensive: an older host without it must not fail a gate.
|
|
1731
|
+
// Skip the no-op re-bind of the current name — session_info entries would pile up per bind.
|
|
1732
|
+
try {
|
|
1733
|
+
if (pi.getSessionName?.() !== slug) pi.setSessionName?.(slug);
|
|
1734
|
+
} catch {
|
|
1735
|
+
/* naming is a courtesy, never a gate precondition */
|
|
1736
|
+
}
|
|
1737
|
+
},
|
|
1722
1738
|
};
|
|
1723
1739
|
};
|
|
1724
1740
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.1",
|
|
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
|
@@ -47,7 +47,8 @@ Ground rules:
|
|
|
47
47
|
sessions, one feature each, are the model. A session binds **explicitly and
|
|
48
48
|
only**: `flow start <slug>` binds its own feature (main checkout must be on
|
|
49
49
|
the default branch); `flow use <slug>` takes one over. Nothing auto-binds.
|
|
50
|
-
|
|
50
|
+
Both bind commands rename the Pi session to the slug, so the picker names each
|
|
51
|
+
session after its feature. Unbound: gates demand an explicit slug and main-checkout writes stay
|
|
51
52
|
blocked — there is no bypass, an unbound session cannot edit source.
|
|
52
53
|
- **Project `flow-guard` rules** (`deny`/`confirm`/`protect`/`forbid` in
|
|
53
54
|
project.md `## global`) apply at **every** stage and are judged ahead of
|