pi-dev-flow 0.76.1 → 0.77.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 +15 -0
- package/README.md +24 -13
- package/docs/gates.md +1 -1
- package/docs/playbook.md +13 -10
- package/extensions/dev-flow.ts +178 -64
- package/package.json +1 -1
- package/skills/dev-flow/SKILL.md +2 -2
- package/skills/dev-flow/references/finish.md +30 -12
- package/skills/dev-flow/references/implement.md +4 -0
- package/skills/dev-flow/references/reflect.md +50 -50
- package/src/core.ts +309 -56
|
@@ -5,18 +5,36 @@
|
|
|
5
5
|
## Stage: finish
|
|
6
6
|
|
|
7
7
|
**Reflect before you finish** — `flow finish` deletes `.dev-flow/<slug>/` and
|
|
8
|
-
the session context goes with it. Run the end-of-session reflection
|
|
9
|
-
|
|
10
|
-
`
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
the session context goes with it. Run the end-of-session reflection now:
|
|
9
|
+
|
|
10
|
+
1. `flow_stage({ op: "reflect", note })` — a fresh **read-only** reviewer reads
|
|
11
|
+
this session's transcript **and every `flow_stage` worker transcript**,
|
|
12
|
+
re-checks the open items in `.dev-flow/reflections.md`, dedupes against them
|
|
13
|
+
and the upstream issues, and returns numbered findings, each classified
|
|
14
|
+
**docs** (fix only in `project.md` → docs flow), **code** (fix in this
|
|
15
|
+
project's code, maybe the playbook too → patch flow) or **plugin** (dev-flow
|
|
16
|
+
itself → GitHub issue upstream), with a **fold** or **drop** recommendation.
|
|
17
|
+
`note` = anything the operator said about friction this session. If the
|
|
18
|
+
worker fails, run the review inline (bare `flow reflect` prints the protocol).
|
|
19
|
+
2. Show the operator the list with your recommendation per item and ask
|
|
20
|
+
**fold or drop** for each (`fold 1,3 drop 2` is a fine answer) — then stop.
|
|
21
|
+
3. Apply the answer: fold docs → `flow reflect --playbook "<note>"`; fold code →
|
|
22
|
+
`flow reflect --code "<note>"`; fold plugin → `flow reflect --plugin "<note>"`
|
|
23
|
+
prints the upstream recipe — search first, then `gh issue create` (the fold
|
|
24
|
+
answer is the confirmation; report the URL). **Plugin findings never become
|
|
25
|
+
rows in the project's `reflections.md`.** Drop → nothing is recorded. Open
|
|
26
|
+
items the reviewer found fixed → propose checking them off.
|
|
27
|
+
4. Offer the fix / tidy suggestions the tool printed (`⚑ fix the open
|
|
28
|
+
reflections now?`, `↻ N closed reflection(s)`) — one line each, only when
|
|
29
|
+
printed; never start a fix flow without the operator's word.
|
|
30
|
+
|
|
31
|
+
The fold/drop answer replaces **Finish?** — act on it, then run
|
|
32
|
+
`flow finish --confirmed` without asking again. Nothing found → ask the
|
|
33
|
+
operator **Finish?** → `flow finish --confirmed`. A finish question with no
|
|
34
|
+
reflection recorded for the flow names it (advisory, never a block).
|
|
35
|
+
Checkpoint report: stage line **🏁 finish · `<slug>`** — release recorded ·
|
|
36
|
+
main state · unmerged count · reflections open · release-checklist open,
|
|
37
|
+
then `Done:`/`Next steps:` per the Stage reports rule.
|
|
20
38
|
|
|
21
39
|
The question covers the whole cleanup and mentions any commits that look
|
|
22
40
|
unmerged. `flow finish [slug]`:
|
|
@@ -62,6 +62,10 @@ asks who wrote a commit.
|
|
|
62
62
|
no stamp, no gate waits on it. On a non-trivial feature, run one before
|
|
63
63
|
Verified?. Fix what is real (inline is fine), and re-review only if the fix
|
|
64
64
|
was large.
|
|
65
|
+
- `flow_stage({ op: "reflect", note })` — a fresh **read-only** reviewer of this
|
|
66
|
+
session's transcripts (driver + every worker), at any stage; its standard
|
|
67
|
+
moment is finish (see Stage: finish). It returns classified reflection
|
|
68
|
+
findings with fold/drop recommendations and writes nothing.
|
|
65
69
|
- One worker at a time per session. The worker holds no flow tool, so gates
|
|
66
70
|
and checkpoints stay with you. Its transcript nests under this session in
|
|
67
71
|
pi's picker.
|
|
@@ -2,64 +2,64 @@
|
|
|
2
2
|
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
3
|
> when the session reaches that stage.
|
|
4
4
|
|
|
5
|
-
## Reflect (
|
|
5
|
+
## Reflect (this project's suggestion queue)
|
|
6
6
|
|
|
7
|
-
Anything
|
|
8
|
-
a
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
Anything this project's playbook or code should improve (drifted commands, a
|
|
8
|
+
checklist that no longer fits, a script that keeps biting) gets parked, not
|
|
9
|
+
complained about. `.dev-flow/reflections.md` is **this project's** queue only:
|
|
10
|
+
|
|
11
|
+
- `flow reflect --playbook "<note>"` — the fix lives only in `project.md` →
|
|
12
|
+
`## playbook`, fixed by a **docs flow** (`flow start fold-<topic> --docs --confirmed`).
|
|
13
|
+
- `flow reflect --code "<note>"` — the fix touches this project's code (maybe
|
|
14
|
+
the playbook too) → `## code`, fixed by a **patch flow**
|
|
15
|
+
(`flow start fix-<topic> --patch --confirmed`; a normal flow when bigger).
|
|
16
|
+
- `flow reflect --plugin "<note>"` — dev-flow itself. **Never written to
|
|
17
|
+
reflections.md**: it prints the upstream recipe — `gh issue list --repo
|
|
18
|
+
<dev-flow repo> --state all --search "<keywords>"` first (an issue the author
|
|
19
|
+
already answered is reported back, never re-filed), then `gh issue create`
|
|
20
|
+
with a detailed body ending `— reflection from <slug> <date>` so the fold
|
|
21
|
+
matches it. File it only on the operator's word. In the dev-flow repo itself
|
|
22
|
+
plugin is code, so `--plugin` files under `## code`.
|
|
23
|
+
|
|
24
|
+
Gate flags are ignored (`flow reflect "<note>" --confirmed` queues the note
|
|
25
|
+
alone). With no flag the wording guesses (plugin-shaped → the upstream recipe,
|
|
26
|
+
otherwise `## playbook`) and the printed line says why; `flow reflect list`
|
|
27
|
+
numbers the queue and `flow reflect move <n> --playbook|--code` re-files an
|
|
28
|
+
item — never hand-retype it. A legacy `## plugin` row from an older dev-flow is
|
|
29
|
+
flagged by `flow doctor` / `reflect list`: file it upstream and check it off
|
|
30
|
+
`— filed: gh#NNN`. For a note to chase **now**: `flow doctor "<observation>"`
|
|
31
|
+
prints an investigation brief without queueing.
|
|
21
32
|
|
|
22
33
|
- Reflect real friction only, one line each, never the same issue twice.
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`##
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
and apply it there — project.md is editable only in that worktree. Check
|
|
46
|
-
items off in `.dev-flow/reflections.md` (your queue, gitignored, yours to
|
|
47
|
-
edit; not `project.md`) with `- [x]` and a `— folded: <what>` or
|
|
48
|
-
`— fixed: <what>` note.
|
|
34
|
+
- **The end-of-session reflection runs at finish** (see Stage: finish): a
|
|
35
|
+
`flow_stage({ op: "reflect" })` worker reviews the whole session — driver and
|
|
36
|
+
every worker transcript — and the operator decides **fold or drop** per
|
|
37
|
+
finding. Bare `flow reflect` prints that protocol (bound: delegate to the
|
|
38
|
+
worker; unbound: review inline); the command writes nothing.
|
|
39
|
+
- **When to suggest fixing open items** — the tool prints `⚑ fix the open
|
|
40
|
+
reflections now?` only when a rule fires: an open item **recurred** this
|
|
41
|
+
session (strongest signal), an item is **≥ 14 days** old, **≥ 3 playbook
|
|
42
|
+
items** (one docs flow takes them all), or a **code** item while **between
|
|
43
|
+
flows**. It surfaces at finish, in an unbound session, and in `flow doctor` —
|
|
44
|
+
never mid-feature. Offer it in one line; the operator decides.
|
|
45
|
+
- **When to suggest the tidy** — `flow reflect tidy` drops the closed (`- [x]`)
|
|
46
|
+
items (the `— fixed:` note already recorded the outcome). The hint
|
|
47
|
+
`↻ N closed reflection(s)` prints when **≥ 5** are closed, when closed
|
|
48
|
+
**≥ open** with at least 3 closed, or when a closed item was filed **≥ 30
|
|
49
|
+
days** ago — at finish, after a `reflect` write, in bare `reflect` and doctor.
|
|
50
|
+
- Plain `flow doctor` reviews the open items and **routes** each — `## playbook`
|
|
51
|
+
→ docs flow, `## code` → patch flow. To fold items in on the operator's word:
|
|
52
|
+
investigate, propose the fix, get confirmation, open the routed flow and apply
|
|
53
|
+
it there — project.md is editable only in a docs/patch worktree. Check items
|
|
54
|
+
off in `.dev-flow/reflections.md` (gitignored, yours to edit; not
|
|
55
|
+
`project.md`) with `- [x]` and a `— folded: <what>` or `— fixed: <what>` note.
|
|
49
56
|
- **Open GitHub issues fold into the view** when the repo has a GitHub remote: `flow doctor` and
|
|
50
57
|
`flow reflect list` list them under the local queue (read-time fold — issues are never imported,
|
|
51
58
|
each item keeps one home). A local row an open issue already covers carries `⟷ gh#NNN` — fold it
|
|
52
59
|
by checking the row off `— filed: gh#NNN` and resolving on GitHub. Unmatched upstream rows get a
|
|
53
60
|
route, but their resolution is on GitHub (close there, never in reflections.md). A
|
|
54
|
-
`~ gh#NNN may duplicate` hint is your verdict to make, never an auto-merge.
|
|
55
|
-
|
|
56
|
-
match it. No GitHub remote = silent; missing/offline `gh` or `DEV_FLOW_NO_ISSUES=1` = one skip line.
|
|
57
|
-
- `## plugin` items, on the operator's go: search upstream first —
|
|
58
|
-
`gh issue list --repo <dev-flow repo> --state all --search "<keywords>"` —
|
|
59
|
-
an issue the author already answered (fixed or won't-fix) is reported back,
|
|
60
|
-
never re-filed; no match → offer to file one (`gh issue create`; `glab issue
|
|
61
|
-
create` on GitLab) with a detailed description, session evidence and a
|
|
62
|
-
suggested fix; the operator confirms.
|
|
61
|
+
`~ gh#NNN may duplicate` hint is your verdict to make, never an auto-merge. No GitHub remote =
|
|
62
|
+
silent; missing/offline `gh` or `DEV_FLOW_NO_ISSUES=1` = one skip line.
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
## Roadmap (your backlog)
|