pi-dev-flow 0.61.1 → 0.62.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 CHANGED
@@ -4,6 +4,12 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.62.0] - 2026-10-24
8
+
9
+ ### Added
10
+
11
+ - **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.
12
+
7
13
  ## [0.61.1] - 2026-10-23
8
14
 
9
15
  ### 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
@@ -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. A session binds **explicitly, never automatically**:
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
@@ -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
- return { text: `feature ${slugArg} started at stage plan (ui=${state.ui}${state.patch ? ", patch" : state.docs ? ", docs" : ""}${state.flowVersion ? `, dev-flow ${state.flowVersion}` : ""}).${notes.length ? `\n${notes.join("\n")}` : ""}\n${nextHint(state, cfg)}` };
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": {
@@ -1608,7 +1611,8 @@ ${mdDigest(draftRefresh)}`))
1608
1611
  const prior = readClaim(root, slugArg);
1609
1612
  const takeover = claimBlocks(prior, sess.key) ? ` — taken over from live session (pid ${prior!.pid})` : "";
1610
1613
  sess.bind(slugArg);
1611
- return { text: `this session is now bound to ${slugArg} (stage ${st.stage})${st.worktree ? ` — work in its worktree: ${st.worktree} (branch ${st.branch})` : ""}${takeover}` };
1614
+ sess.rename(slugArg);
1615
+ 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
1616
  }
1613
1617
 
1614
1618
  case "abort": {
@@ -1719,6 +1723,15 @@ export default function devFlow(pi: ExtensionAPI) {
1719
1723
  if (prev && prev !== slug && readClaim(ctx.cwd, prev)?.key === key) rmSync(claimFile(ctx.cwd, prev), { force: true });
1720
1724
  if (slug) writeClaim(ctx.cwd, slug, key);
1721
1725
  },
1726
+ rename: (slug) => {
1727
+ // pi's public session-name API, kept defensive: an older host without it must not fail a gate.
1728
+ // Skip the no-op re-bind of the current name — session_info entries would pile up per bind.
1729
+ try {
1730
+ if (pi.getSessionName?.() !== slug) pi.setSessionName?.(slug);
1731
+ } catch {
1732
+ /* naming is a courtesy, never a gate precondition */
1733
+ }
1734
+ },
1722
1735
  };
1723
1736
  };
1724
1737
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-dev-flow",
3
- "version": "0.61.1",
3
+ "version": "0.62.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": [
@@ -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
- Unbound: gates demand an explicit slug and main-checkout writes stay
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