pi-dev-flow 0.94.2 → 0.94.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 +7 -0
- package/extensions/dev-flow.ts +1 -1
- package/package.json +1 -1
- package/src/core.ts +41 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.94.3] - 2026-11-19
|
|
8
|
+
|
|
9
|
+
**Fold or drop? shows the findings you're answering about: a short list, folds grouped by plugin, playbook and code, then the drops.**
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **Fold or drop? lists the findings you're answering about (gh#260).** The closing reflection suggested "fold 2", but your view didn't show what 2 was. A finding that quoted a flow command (such as "`flow finish` removed nothing") lost its headline line, because the view hides command text. Finish now starts with a short list: one line per finding, with folds grouped by plugin, playbook and code, and drops after them. The header shows the suggested `fold … · drop …` answer. Only the agent sees each finding's full route, duplicate and reason.
|
|
13
|
+
|
|
7
14
|
## [0.94.2] - 2026-11-19
|
|
8
15
|
|
|
9
16
|
**Publishes 0.94.1's fix: you're asked Release? once. 0.94.1 never reached npm because a flaky test failed its publish run.**
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -481,7 +481,7 @@ export default function devFlow(pi: ExtensionAPI) {
|
|
|
481
481
|
const recurred = reflected?.open.filter((x) => x.status === "recurred").length ?? 0;
|
|
482
482
|
const nudges = reflectionNudges(readReflectionsText(root), now().slice(0, 10), { recurred });
|
|
483
483
|
parts.push(
|
|
484
|
-
"Next: show the operator
|
|
484
|
+
"Next: show the operator the fold/drop list above as it stands — suggested folds grouped by plugin, playbook and code, then the drops, one short line each — and ask for one answer (the suggested 'fold … drop …' line is fine) — then STOP until they answer. " +
|
|
485
485
|
`Fold docs → flow reflect --playbook "<note>"; fold code → flow reflect --code "<note>"; fold plugin → ${selfRepo ? 'flow reflect --code "<note>" (this is the dev-flow repo)' : 'flow reflect --plugin "<note>" prints the upstream recipe (dedupe search, then gh issue create — the fold answer is the confirmation; never a reflections.md row)'}; drop → record nothing. Open items re-checked as fixed → propose checking them off.`,
|
|
486
486
|
);
|
|
487
487
|
if (nudges.fix) parts.push(`${nudges.fix} — offer it after the fold/drop answer.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.94.
|
|
3
|
+
"version": "0.94.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
|
@@ -2965,18 +2965,52 @@ export function parseReflectReport(body: string): { findings: ReflectFinding[];
|
|
|
2965
2965
|
return { findings, open };
|
|
2966
2966
|
}
|
|
2967
2967
|
|
|
2968
|
-
/**
|
|
2969
|
-
*
|
|
2970
|
-
* (
|
|
2968
|
+
/** A finding as one short operator-facing line: clipped at a word boundary, with any dev-flow command text
|
|
2969
|
+
* spelled as plain words. The view drops a line that names a flow command, so a finding that merely quoted
|
|
2970
|
+
* one (`flow finish` removed nothing) vanished from the list the operator was answering about. */
|
|
2971
|
+
export function shortFindingNote(note: string, max = 110): string {
|
|
2972
|
+
const plain = note
|
|
2973
|
+
.replace(/`([^`]*)`/g, "$1")
|
|
2974
|
+
.replace(/(^|[\s'"(*_])\/?flow (?=[a-z])/g, "$1")
|
|
2975
|
+
.replace(/(^|\s)--(?=[a-z])/g, "$1")
|
|
2976
|
+
.replace(/\bflow_stage\b/g, "worker")
|
|
2977
|
+
.replace(/\s+/g, " ")
|
|
2978
|
+
.trim();
|
|
2979
|
+
if (plain.length <= max) return plain;
|
|
2980
|
+
const cut = plain.slice(0, max);
|
|
2981
|
+
const at = cut.lastIndexOf(" ");
|
|
2982
|
+
return `${(at > max * 0.6 ? cut.slice(0, at) : cut).replace(/[\s,;:—-]+$/, "")}…`;
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
/** The fold/drop list the operator answers (gh#260): a short line per finding, the suggested folds first —
|
|
2986
|
+
* grouped by where the fix lives (plugin, playbook, code) — then the suggested drops, so "fold 2" names
|
|
2987
|
+
* something they can read. The full rows (route, dup, why) follow for the agent only. Routes follow where
|
|
2988
|
+
* the fix lives — plugin is always an upstream issue (code in the dev-flow repo itself), never a local row. */
|
|
2971
2989
|
export function renderReflectFindings(r: { findings: ReflectFinding[]; open: ReflectOpenCheck[] }, selfRepo: boolean): string[] {
|
|
2990
|
+
const kindOf = (f: ReflectFinding): ReflectKind => (f.kind === "plugin" && selfRepo ? "code" : f.kind);
|
|
2972
2991
|
const route = (k: ReflectKind) =>
|
|
2973
|
-
k === "docs" ? "docs flow · record: flow reflect --playbook" : k === "code"
|
|
2992
|
+
k === "docs" ? "docs flow · record: flow reflect --playbook" : k === "code" ? "patch flow · record: flow reflect --code" : "upstream GitHub issue · flow reflect --plugin prints the recipe (never a local row)";
|
|
2993
|
+
const KIND_LABEL: Record<ReflectKind, string> = { plugin: "plugin (an upstream dev-flow issue)", docs: "playbook (a docs flow)", code: "code (a patch flow)" };
|
|
2974
2994
|
const out: string[] = [];
|
|
2975
2995
|
if (r.findings.length) {
|
|
2976
|
-
|
|
2996
|
+
const folds = r.findings.filter((f) => f.rec === "fold");
|
|
2997
|
+
const drops = r.findings.filter((f) => f.rec === "drop");
|
|
2998
|
+
const nums = (fs: ReflectFinding[]) => fs.map((f) => f.n).join(",");
|
|
2999
|
+
out.push(`findings (${r.findings.length}) — suggested: ${[folds.length ? `fold ${nums(folds)}` : "", drops.length ? `drop ${nums(drops)}` : ""].filter(Boolean).join(" · ")}`);
|
|
3000
|
+
for (const k of ["plugin", "docs", "code"] as const) {
|
|
3001
|
+
const group = folds.filter((f) => kindOf(f) === k);
|
|
3002
|
+
if (!group.length) continue;
|
|
3003
|
+
out.push(`fold — ${KIND_LABEL[k]}:`);
|
|
3004
|
+
for (const f of group) out.push(` ${f.n}. ${shortFindingNote(f.note)}`);
|
|
3005
|
+
}
|
|
3006
|
+
if (drops.length) {
|
|
3007
|
+
out.push("drop:");
|
|
3008
|
+
for (const f of drops) out.push(` ${f.n}. ${shortFindingNote(f.note)} (${kindOf(f) === "docs" ? "playbook" : kindOf(f)})`);
|
|
3009
|
+
}
|
|
3010
|
+
out.push(`${AGENT_MARK}finding detail — recommendation · kind → route:`);
|
|
2977
3011
|
for (const f of r.findings) {
|
|
2978
|
-
out.push(
|
|
2979
|
-
out.push(
|
|
3012
|
+
out.push(`${AGENT_MARK}${f.n}. [${f.rec}] ${f.kind}: ${f.note}`);
|
|
3013
|
+
out.push(`${AGENT_MARK} → ${route(kindOf(f))}${f.dup && f.dup !== "none" ? ` · dup: ${f.dup}` : ""}${f.why ? ` · ${f.why}` : ""}`);
|
|
2980
3014
|
}
|
|
2981
3015
|
} else out.push("findings: none");
|
|
2982
3016
|
if (r.open.length) {
|