pi-dev-flow 0.76.0 → 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.
@@ -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 (your suggestion queue)
5
+ ## Reflect (this project's suggestion queue)
6
6
 
7
- Anything the playbook or plugin should improve (drifted commands, gate friction,
8
- a plugin bug) gets parked, not complained about:
9
- `flow reflect --playbook|--plugin "<one-line note>"`; gate flags are ignored —
10
- `flow reflect "<note>" --confirmed` queues the note alone. For a note to chase
11
- **now**: `flow doctor "<observation>"` prints an investigation brief without
12
- queueing. **You file the note, the tool does not guess**: `--playbook` puts it
13
- under `## playbook`, `--plugin` under `## plugin` (you already know which one it
14
- is — the session log does). With no flag the wording guesses ONE section and the
15
- printed line says why (`"gate" names dev-flow itself`, `playbook or project
16
- wording`, or `nothing plugin-shaped in the note …`); if the guess is wrong,
17
- `flow reflect list` numbers the queue and `flow reflect move <n> --plugin` (or
18
- `--playbook`) re-files the item — never hand-retype it. Nothing is ever written
19
- to both sections: one note, one home, one route. The open count shows in status
20
- and stage context; the operator decides:
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
- - **`flow reflect tidy` drops the closed (`- [x]`) items** — the `— fixed:` note has
24
- already recorded the outcome, so the check-off is history and the file stays
25
- scannable. Queueing a note, bare `reflect` and `doctor` all print the closed
26
- count with this verb when the pile grows; offer the tidy to the operator then.
27
- - **Bare `flow reflect` is the end-of-session reflection** — it runs as part
28
- of every finish (before the slug folder is deleted — see Stage: finish) and
29
- whenever the operator asks. It prints the
30
- protocol: review the full session log (messages, tool calls, results);
31
- re-check each open item against the current playbook and newer dev-flow
32
- versions (`npm view pi-dev-flow version` vs the running version, or
33
- `git ls-remote` for a git-installed copy — a newer one that fixes an
34
- item → recommend updating the plugin, check it off); queue deduplicated new
35
- findings; report playbook vs plugin items structurally; ask whether to fix
36
- now. The command writes nothing; you execute the protocol.
37
- - Plain `flow doctor` reviews the open items and **routes** each to the flow
38
- that implements it — playbook item → docs flow; plugin item → upstream issue
39
- (or a patch/normal flow in the dev-flow repo). It labels each item with the
40
- `## heading` it is filed under (the file is the record; the wording of the
41
- note decided nothing since the note was queued) and flags items sitting
42
- outside both sections. To fold items in on the
43
- operator's word: investigate, propose the fix, get confirmation, open the
44
- routed flow (playbook items: `flow start fold-<topic> --docs --confirmed`)
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. When you file an
55
- issue for a local item, end its body with `— reflection from <slug> <date>` so future folds
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)