pi-dev-flow 0.64.0 → 0.64.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 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.64.1] - 2026-10-24
8
+
9
+ ### Changed
10
+
11
+ - **Whole-repo `/flow-simplify` pass on dev-flow itself.** A full simplification sweep (dead-code hunt with grep + semantic confirmation, sliding-window duplication scan across `src/` and `extensions/`) found a lean codebase and three honest cuts: the `STAGES` constant in core was a zero-reference export (stage order lives in the state transitions and `MD_STAGES`), and `changelogEntry`/`MergeStyle` were imported by files that never used them (tsc `--noUnusedLocals`-confirmed). The one real duplication — the recorded `seedData` step written twice, once in the verify deploy probe and once in `flow health` — now lives in a single `seedStep` helper; as a side effect `flow health` names the seed command in its failure message the way verify always did. Cross-file duplicate blocks of four or more lines: none found; the one remaining structural weight (`runFlow`'s size) is an architecture reshuffle left for its own flow.
12
+
7
13
  ## [0.64.0] - 2026-10-24
8
14
 
9
15
  ### Fixed
@@ -34,7 +34,6 @@ import {
34
34
  appendRoadmapItem,
35
35
  bashFlowGuard,
36
36
  checkFingerprint,
37
- changelogEntry,
38
37
  changelogVersionsBetween,
39
38
  normalizeReleaseBody,
40
39
  pendingEntryLines,
@@ -606,6 +605,16 @@ async function runChecks(root: string, state: FlowState, cfg: Config, checks: St
606
605
  * the pre-deploy record must survive the gate that schedules the deploy. */
607
606
  const healthRerunsAfterDeploy = (cfg: Config) => !!cfg.commands.dev && !!healthProbe(cfg);
608
607
 
608
+ /** Seed pre-existing data before a health probe, recording the step (`flow health` and the verify
609
+ * deploy probe both do this). Returns an error result on failure, null when seeded or not configured. */
610
+ async function seedStep(root: string, state: FlowState, cfg: Config): Promise<{ text: string; isError: true } | null> {
611
+ if (!cfg.commands.seedData) return null;
612
+ const seed = await sh(cfg.commands.seedData, gateCwd(root, state));
613
+ state.checks.seedData = { ok: seed.ok, at: now() };
614
+ writeState(root, state);
615
+ return seed.ok ? null : { text: `seedData FAILED (${cfg.commands.seedData}):\n${tail(seed.out)}`, isError: true };
616
+ }
617
+
609
618
  /** Fingerprint of the working-tree state the checks ran against: paths (`status --porcelain`),
610
619
  * tracked content (a hash of the uncommitted diff) and HEAD. Null when git cannot answer — a
611
620
  * measurement failure must never mark a green record stale (see freshenChecks). */
@@ -1202,12 +1211,8 @@ ${mdDigest(draftRefresh)}`))
1202
1211
  const probe = healthProbe(cfg);
1203
1212
  if (!probe) did.push("health: none configured");
1204
1213
  else {
1205
- if (cfg.commands.seedData) {
1206
- const seed = await sh(cfg.commands.seedData, gateCwd(root, state!));
1207
- state!.checks.seedData = { ok: seed.ok, at: now() };
1208
- writeState(root, state!);
1209
- if (!seed.ok) return { text: `seedData FAILED (${cfg.commands.seedData}):\n${tail(seed.out)}`, isError: true };
1210
- }
1214
+ const seedFail = await seedStep(root, state!, cfg);
1215
+ if (seedFail) return seedFail;
1211
1216
  const probed = await runHealthProbe(probe, gateCwd(root, state!), cfg.healthWait);
1212
1217
  state!.checks.health = { ok: probed.ok, at: now() };
1213
1218
  await stampChecks(root, state!, ["health"]);
@@ -1259,12 +1264,8 @@ ${mdDigest(draftRefresh)}`))
1259
1264
  const { state, err } = needState(root, sess, slugArg);
1260
1265
  if (err) return err;
1261
1266
  if (!cfg.commands.health) return { text: "no commands.health configured — add `health = <command>` (or a flow-check health block) under ## implement in .dev-flow/project.md", isError: true };
1262
- if (cfg.commands.seedData) {
1263
- const seed = await sh(cfg.commands.seedData, gateCwd(root, state!));
1264
- state!.checks.seedData = { ok: seed.ok, at: now() };
1265
- writeState(root, state!);
1266
- if (!seed.ok) return { text: `seedData FAILED:\n${tail(seed.out)}`, isError: true };
1267
- }
1267
+ const seedFail = await seedStep(root, state!, cfg);
1268
+ if (seedFail) return seedFail;
1268
1269
  const res = await runHealthProbe(cfg.commands.health, gateCwd(root, state!), cfg.healthWait);
1269
1270
  state!.checks.health = { ok: res.ok, at: now() };
1270
1271
  await stampChecks(root, state!, ["health"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-dev-flow",
3
- "version": "0.64.0",
3
+ "version": "0.64.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/src/core.ts CHANGED
@@ -10,7 +10,6 @@ import os from "node:os";
10
10
  import path from "node:path";
11
11
 
12
12
  export type Stage = "plan" | "implement" | "pre-release" | "release" | "done";
13
- export const STAGES: Stage[] = ["plan", "implement", "pre-release", "release", "done"];
14
13
 
15
14
  export interface Check {
16
15
  ok: boolean;
package/src/projectmd.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { existsSync, readdirSync, readFileSync } from "node:fs";
9
9
  import path from "node:path";
10
- import { applyAnswer, type ChecklistItem, type Config, DEFAULTS, healthProbe, parseMergeStyle, parseVersion, toSeconds, type GuardRules, type MergeStyle, type StageCheck } from "./core.ts";
10
+ import { applyAnswer, type ChecklistItem, type Config, DEFAULTS, healthProbe, parseMergeStyle, parseVersion, toSeconds, type GuardRules, type StageCheck } from "./core.ts";
11
11
 
12
12
  export const MD_STAGES = ["global", "plan", "implement", "pre-release", "release"] as const;
13
13
  export type MdStage = (typeof MD_STAGES)[number];