pi-dev-flow 0.85.1 → 0.86.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 +16 -0
- package/README.md +2 -1
- package/docs/development.md +10 -0
- package/docs/gates.md +1 -1
- package/docs/guardrails.md +1 -1
- package/docs/playbook.md +17 -2
- package/extensions/dev-flow.ts +82 -2652
- package/package.json +1 -1
- package/skills/dev-flow/SKILL.md +52 -75
- package/skills/dev-flow/references/finish.md +41 -58
- package/skills/dev-flow/references/implement.md +62 -152
- package/skills/dev-flow/references/plan.md +40 -68
- package/skills/dev-flow/references/pre-release.md +39 -50
- package/skills/dev-flow/references/reflect.md +51 -85
- package/skills/dev-flow/references/release.md +31 -64
- package/skills/dev-flow/references/start.md +50 -69
- package/src/core.ts +24 -20
- package/src/present.ts +224 -0
- package/src/projectmd.ts +6 -1
- package/src/runtime/base.ts +554 -0
- package/src/runtime/checks.ts +358 -0
- package/src/runtime/gates.ts +719 -0
- package/src/runtime/reflect.ts +160 -0
- package/src/runtime/setup.ts +85 -0
- package/src/runtime/ship.ts +629 -0
- package/src/runtime/workers.ts +170 -0
|
@@ -1,73 +1,45 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Stage: plan
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
2. **Clarify before drafting**: preliminary direction in chat (findings, shape
|
|
9
|
-
of the fix, open unknowns), mode proposal with its reason, your questions
|
|
10
|
-
and the operator's; draft only after the direction is confirmed.
|
|
11
|
-
3. Write `.dev-flow/<slug>/plan/plan.md` — problem, approach, files to touch,
|
|
12
|
-
test strategy, risks; reviewable, not exhaustive. **Land it on disk early and
|
|
13
|
-
keep it current**: create the file the moment the direction is confirmed —
|
|
14
|
-
don't wait for the finished plan — and amend it in the file as the discussion
|
|
15
|
-
continues. Plan talk held only in the conversation is gone when pi
|
|
16
|
-
auto-compacts mid-stage; the gate reviews the file, not the memory. The file
|
|
17
|
-
name is itself the gate's proof: **plan.md** — a preliminary direction
|
|
18
|
-
belongs *inside* plan.md (marked draft), never a separate
|
|
19
|
-
`pre-plan`/`direction.md` file: the approve gate requires plan.md by name.
|
|
20
|
-
Scope splits off at plan (the operator wants part of it later)? Park that
|
|
21
|
-
part with `flow roadmap add "<title>" --slug=<slug> --brief=<notes>` — never
|
|
22
|
-
a second `.dev-flow/<slug>/` written by hand.
|
|
23
|
-
First check
|
|
24
|
-
`git log origin/<default>..<default> --oneline`: local-only default-branch
|
|
25
|
-
commits fall out of the worktree's base (push them or re-plan).
|
|
26
|
-
4. **UI flag set?** Mockups live in `plan/mockups/`, one HTML per screen/state
|
|
27
|
-
(`<screen>.html`), linking the project's real stylesheet and class names
|
|
28
|
-
where they exist (relative links work from `.dev-flow/`). At plan the
|
|
29
|
-
feature has **no worktree yet** — link the main checkout's stylesheet
|
|
30
|
-
(`../../../../<path>` from `plan/mockups/`), never another feature's
|
|
31
|
-
worktree (the approve gate refuses it: that branch drifts and is removed at
|
|
32
|
-
its finish); after approve, re-render against this feature's worktree any
|
|
33
|
-
mockup you keep using. Every mockup
|
|
34
|
-
must be **rendered** — an unrendered mockup is not a mockup:
|
|
35
|
-
- Headless chromium: PATH `chromium`/`chromium-browser`/`google-chrome`,
|
|
36
|
-
else playwright's
|
|
37
|
-
`~/.cache/ms-playwright/*/chrome-headless-shell-linux64/chrome-headless-shell`.
|
|
38
|
-
Render at the project's widths (default phone 390, desktop 1280):
|
|
39
|
-
`<binary> --no-sandbox --disable-gpu --hide-scrollbars --virtual-time-budget=5000 --window-size=<width>,<height> --screenshot=plan/mockups/<screen>-<width>.png file://<absolute path to html>`
|
|
40
|
-
— height per screen, re-render if clipped.
|
|
41
|
-
- Embed every render in plan.md under its section —
|
|
42
|
-
``. Image syntax only (a
|
|
43
|
-
filename in prose is a broken link); before Approve? re-check that every
|
|
44
|
-
tag points at an existing file. The approve gate proves this: it opens
|
|
45
|
-
plan.md and refuses every render file that is not embedded, and every
|
|
46
|
-
`mockups/<screen>.html` with no embedded `<screen>-<width>.` shot.
|
|
47
|
-
- No chromium anywhere → tell the operator and ask; `*.html`-only plans
|
|
48
|
-
only with their OK (knob: `mockupGlobs`); never fake or skip silently.
|
|
49
|
-
- Gotchas: for a component question prefer a **static strip** — standalone
|
|
50
|
-
HTML with the real stylesheet carrying only the markup in question, one
|
|
51
|
-
first-try render; a full-page render is for layout context only. Shots
|
|
52
|
-
start top-left and never scroll — hide what is above a below-the-fold
|
|
53
|
-
region (inline `<style>`) or use a strip. `--user-data-dir` profiles keep
|
|
54
|
-
localStorage between shots — fresh profile dir per intended UI state.
|
|
55
|
-
Planned behavior must be visibly patched into the shot and captioned as
|
|
56
|
-
such — never caption the current app's render with the behavior you plan
|
|
57
|
-
to add. The app's repaint can destroy a transient state (an inline
|
|
58
|
-
editor) — freeze it for the shot (e.g. stub the render entry point after
|
|
59
|
-
opening). If the harness fights the same shot twice, verify that state
|
|
60
|
-
via DOM/code and move on — screenshots are a spot-check, not a test loop.
|
|
61
|
-
5. Tell the user the plan is ready and **stop** — one word: **Approve?**
|
|
62
|
-
Answered → `flow approve --confirmed` (yolo → `flow approve --yolo
|
|
63
|
-
--confirmed`). Checkpoint report: stage line **📝 plan · `<slug>`** — mode ·
|
|
64
|
-
ui · plan status · mockups `rendered/total` · open questions, then
|
|
65
|
-
`Done:`/`Next steps:` per the Stage reports rule.
|
|
5
|
+
No code edits before approval. Reads are always allowed.
|
|
66
6
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
7
|
+
1. **Research** the code the plan needs.
|
|
8
|
+
2. **Clarify before drafting**: give your direction in chat — findings, shape
|
|
9
|
+
of the fix, open unknowns, the mode you propose and why — and ask your
|
|
10
|
+
questions. Draft only after the direction is confirmed.
|
|
11
|
+
3. **Write `.dev-flow/<slug>/plan/plan.md`** — problem, approach, files to
|
|
12
|
+
touch, test strategy, risks. Reviewable, not exhaustive.
|
|
13
|
+
- Create it as soon as the direction is confirmed and keep it current: chat
|
|
14
|
+
is lost at compaction, the gate reads the file.
|
|
15
|
+
- The name is the proof: `plan.md`. A preliminary direction goes inside it
|
|
16
|
+
(marked draft) — never a separate file.
|
|
17
|
+
- Part of the scope deferred? `flow roadmap add "<title>" --slug=<slug>
|
|
18
|
+
--brief=<notes>` — never a second `.dev-flow/<slug>/` by hand.
|
|
19
|
+
- Run `git log origin/<default>..<default> --oneline` first: local-only
|
|
20
|
+
default-branch commits fall out of the worktree's base (push or re-plan).
|
|
21
|
+
4. **UI feature?** Mockups in `plan/mockups/`, one `<screen>.html` per
|
|
22
|
+
screen/state, using the project's real stylesheet and class names.
|
|
23
|
+
- No worktree exists yet: link the **main checkout's** stylesheet
|
|
24
|
+
(`../../../../<path>`), never another feature's worktree (refused).
|
|
25
|
+
- Render every mockup with headless chromium (`chromium`,
|
|
26
|
+
`chromium-browser`, `google-chrome`, else playwright's
|
|
27
|
+
`~/.cache/ms-playwright/*/chrome-headless-shell-linux64/chrome-headless-shell`)
|
|
28
|
+
at the project's widths (default 390 and 1280):
|
|
29
|
+
`<binary> --no-sandbox --disable-gpu --hide-scrollbars --virtual-time-budget=5000 --window-size=<w>,<h> --screenshot=plan/mockups/<screen>-<w>.png file://<abs path>`
|
|
30
|
+
- Embed every render in plan.md as an image:
|
|
31
|
+
``. The gate refuses any
|
|
32
|
+
render not embedded and any `.html` without a shot.
|
|
33
|
+
- No chromium anywhere → tell the operator and ask; HTML-only only with
|
|
34
|
+
their OK. Never fake or skip silently.
|
|
35
|
+
- Tips: prefer a static strip (just the component, real stylesheet) over a
|
|
36
|
+
full page; shots never scroll; use a fresh `--user-data-dir` per UI
|
|
37
|
+
state; caption planned behavior as planned; if a shot fights you twice,
|
|
38
|
+
verify the state in the DOM and move on.
|
|
39
|
+
5. **Ask Approve? and stop.** Report opening: **📝 plan · `<slug>`** (the
|
|
40
|
+
gate's stage line). Answer → `flow approve --confirmed` (yolo → `flow
|
|
41
|
+
approve --yolo --confirmed`).
|
|
73
42
|
|
|
43
|
+
Approval creates the worktree and branch and runs `commands.setup` there; a
|
|
44
|
+
failing setup fails the gate and the next approve retries it. `(ui)` playbook
|
|
45
|
+
items apply only to UI features.
|
|
@@ -1,55 +1,44 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Stage: pre-release
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
**Versioning:** the `versioning.file` manifest is the single source of truth
|
|
10
|
-
and tags are `versioning.pattern` rendered from it — one number everywhere. If
|
|
11
|
-
`versioning.file` is unset, stop and clarify the scheme with the user; never
|
|
12
|
-
invent one mid-release. Sequence:
|
|
5
|
+
Prepare the release entirely in the worktree; main stays off-limits until the
|
|
6
|
+
release gate hands over.
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
3. Update the changelog and bump the manifest to the exact version you will
|
|
18
|
-
tag — manifest, changelog and tag must agree; commit the prep on the feature
|
|
19
|
-
branch. **The changelog writer reviews the branch, not its commit list**:
|
|
20
|
-
read `git log <default>..HEAD` *and* `git diff <default>…HEAD` first and
|
|
21
|
-
write the entry from the net change the branch delivers, in the reader's
|
|
22
|
-
terms (what was broken, what works now) — this entry is also the forge
|
|
23
|
-
release body, so it publishes verbatim. **One entry per net change, never
|
|
24
|
-
one per commit:** a feature that needed iteration commits (the fix, its
|
|
25
|
-
follow-up, the test that chases it) is **one** line telling the final state;
|
|
26
|
-
two lines sharing a subject are the tell to merge them. Work that never
|
|
27
|
-
reached the reader — reverted mid-branch, dropped on the way, pure moves —
|
|
28
|
-
gets no line. Consolidating your own entry is fold-safe: the fold proofs
|
|
29
|
-
below guard lines that were already pending under `Unreleased` (another
|
|
30
|
-
flow's), which you move verbatim; your own prose is yours until the heading
|
|
31
|
-
ships. A versioned release **folds the `Unreleased` section** (entries
|
|
32
|
-
`--no-version` flows left there) under the new version heading: the gate
|
|
33
|
-
refuses while entries remain, refuses a fold that **drops or rewrites** one
|
|
34
|
-
(move the lines as they are and reword afterwards in a follow-up), and
|
|
35
|
-
refuses a changelog this branch never touched. `--no-fold-check` skips only
|
|
36
|
-
the line proofs, on the operator's word.
|
|
37
|
-
4. `flow check` — the prep edits made the implement checks stale; the release
|
|
38
|
-
gate demands them green again.
|
|
39
|
-
5. State what the PR will contain, present version and changelog entry,
|
|
40
|
-
**stop** — **Release?** → `flow release --confirmed`. Under a standing
|
|
41
|
-
yolo you run `flow release` without asking. If it returns **NEEDS-OPERATOR
|
|
42
|
-
Release?**, ask anyway: either commits landed after Verified? (the yolo
|
|
43
|
-
predates them, and the gate names them), or the playbook sets
|
|
44
|
-
`yolo = until-release`. Checkpoint report:
|
|
45
|
-
stage line **🔍 pre-release · `<slug>`** — version decision (`pending` /
|
|
46
|
-
`bump <level> → vX.Y.Z ~` / `no-version ✓`) · tag · changelog · fold ·
|
|
47
|
-
review tally · merge style, then `Done:`/`Next steps:` per the Stage
|
|
48
|
-
reports rule. The gate re-checks
|
|
49
|
-
tier-1, requires the manifest **ahead of the last tag**, a changelog
|
|
50
|
-
**heading** naming that version (a mention in prose is not an entry) and that
|
|
51
|
-
this branch prepared the entry. Operator ships this flow **without
|
|
52
|
-
version/tag** → `flow release --no-version --confirmed` — no bump, but the
|
|
53
|
-
changelog entry under `Unreleased` is still required: the gate proves the
|
|
54
|
-
branch **added a line there**, not that it edited some older section.
|
|
8
|
+
**Versioning:** the `versioning.file` manifest is the single source of truth;
|
|
9
|
+
tags are `versioning.pattern` rendered from it. No `versioning.file` → stop
|
|
10
|
+
and settle the scheme with the operator; never invent one.
|
|
55
11
|
|
|
12
|
+
1. **Review**: `/flow-review` the change; fix every **Must fix** and **Should
|
|
13
|
+
fix**; `flow check` again if code changed.
|
|
14
|
+
2. **Docs**: update them to match the change.
|
|
15
|
+
3. **Changelog + bump** — manifest, changelog heading and tag must agree;
|
|
16
|
+
commit the prep on the feature branch.
|
|
17
|
+
- **The changelog writer reviews the branch, not its commit list**: read
|
|
18
|
+
`git log <default>..HEAD` *and* `git diff <default>...HEAD`, then write
|
|
19
|
+
what the branch delivers in the reader's terms (what was broken, what
|
|
20
|
+
works now). The entry is also the forge release body.
|
|
21
|
+
- **One entry per net change, never one per commit.** Iteration commits
|
|
22
|
+
are one line about the final state; reverted or invisible work gets none.
|
|
23
|
+
Rewriting your own entry is fold-safe — the proofs guard only lines that
|
|
24
|
+
were already pending.
|
|
25
|
+
- A versioned release **folds `Unreleased`** under the new heading: move
|
|
26
|
+
pending lines verbatim (reword in a later flow). The gate refuses a
|
|
27
|
+
dropped or rewritten pending line, leftovers under `Unreleased`, and a
|
|
28
|
+
changelog this branch never touched. `--no-fold-check` only on the
|
|
29
|
+
operator's word.
|
|
30
|
+
4. `flow check` — the prep made the earlier checks stale.
|
|
31
|
+
5. **Ask Release? and stop.** Show what the PR contains, the version and the
|
|
32
|
+
changelog entry. Report opening: **🔍 pre-release · `<slug>`** (the gate's
|
|
33
|
+
stage line; the version field reads `pending` until decided — never
|
|
34
|
+
invent a bump or a no-version decision). Answer → `flow release
|
|
35
|
+
--confirmed`.
|
|
36
|
+
- Standing yolo → run `flow release` without asking. It still returns
|
|
37
|
+
`NEEDS-OPERATOR Release?` when commits landed after Verified? or the
|
|
38
|
+
playbook says `yolo = until-release` — then ask.
|
|
39
|
+
- Operator ships **without a version** → `flow release --no-version
|
|
40
|
+
--confirmed`: no bump or tag, but the branch must add its line under
|
|
41
|
+
`Unreleased`.
|
|
42
|
+
|
|
43
|
+
The gate re-checks tier-1, requires the manifest ahead of the last tag and a
|
|
44
|
+
changelog **heading** for that version written on this branch.
|
|
@@ -1,88 +1,54 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Reflect (this project's suggestion queue)
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
an item
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
merged, check the item off with `flow reflect done <n> "<what>"` (or by hand in
|
|
58
|
-
the gitignored `.dev-flow/reflections.md`: `- [x]` and a `— folded: <what>` or
|
|
59
|
-
`— fixed: <what>` note).
|
|
60
|
-
- **Open GitHub issues fold into the view** when the repo has a GitHub remote: `flow doctor` and
|
|
61
|
-
`flow reflect list` list them under the local queue (read-time fold — issues are never imported,
|
|
62
|
-
each item keeps one home). A local row an open issue already covers carries `⟷ gh#NNN` — fold it
|
|
63
|
-
by checking the row off `— filed: gh#NNN` and resolving on GitHub. Unmatched upstream rows get a
|
|
64
|
-
route, but their resolution is on GitHub (close there, never in reflections.md). A
|
|
65
|
-
`~ gh#NNN may duplicate` hint is your verdict to make, never an auto-merge. No GitHub remote =
|
|
66
|
-
silent; missing/offline `gh` or `DEV_FLOW_NO_ISSUES=1` = one skip line.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Roadmap (your backlog)
|
|
70
|
-
|
|
71
|
-
`.dev-flow/roadmap.md` — a gitignored `- [ ]` checklist; the operator owns the
|
|
72
|
-
content, you maintain and honor it. Advisory like reflections, never gating:
|
|
73
|
-
|
|
74
|
-
- `flow roadmap` lists the open items (the count is surfaced in status and
|
|
75
|
-
stage context). Update on the operator's request —
|
|
76
|
-
`flow roadmap add "<feature>"` or direct file edits are equally fine.
|
|
77
|
-
- Handed a feature: `flow roadmap pick <n> <slug>` stamps the item with the
|
|
78
|
-
slug (pick is one verb — it starts nothing), then `flow start <slug>` builds
|
|
79
|
-
it as a normal flow; its `flow finish` checks the item off automatically.
|
|
80
|
-
- **Spin-off** (a new feature surfaced mid-flow, split off on the operator's
|
|
81
|
-
word): `flow roadmap add "<title>" --slug=<slug> --brief=<notes>` (or
|
|
82
|
-
`--brief-file=<path>`) adds and stamps in one call; the brief sits under the
|
|
83
|
-
item as ` > ` lines and a bound session's slug is recorded as `— split from
|
|
84
|
-
<slug>`. `flow start <slug>` seeds `plan/plan.md` with the item and brief (a
|
|
85
|
-
draft — plan and approve as usual). A hand-made `.dev-flow/<slug>/plan/` with
|
|
86
|
-
no `state.json` is a ghost: `flow start <slug> --confirmed` adopts it.
|
|
87
|
-
- Shipped outside a flow: `flow roadmap done <n>` (date-stamped by hand);
|
|
88
|
-
`flow roadmap tidy` drops checked lines when history clutters the list.
|
|
5
|
+
Friction worth fixing gets parked, not complained about. One line each, real
|
|
6
|
+
friction only, never the same issue twice. `.dev-flow/reflections.md` holds
|
|
7
|
+
**this project's** items only.
|
|
8
|
+
|
|
9
|
+
| Command | Files under | Fixed by |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `flow reflect --playbook "<note>"` | `## playbook` (fix lives in `project.md`) | a docs flow: `flow start fold-<topic> --docs --confirmed` |
|
|
12
|
+
| `flow reflect --code "<note>"` | `## code` (this project's code, maybe the playbook) | a patch flow: `flow start fix-<topic> --patch --confirmed` (normal when bigger) |
|
|
13
|
+
| `flow reflect --plugin "<note>"` | nothing — prints the upstream recipe | a GitHub issue, filed only on the operator's word |
|
|
14
|
+
|
|
15
|
+
- `--plugin`: search first (`gh issue list --repo <dev-flow repo> --state all
|
|
16
|
+
--search "<keywords>"`); an issue already answered is reported back, never
|
|
17
|
+
re-filed. Body ends `— reflection from <slug> <date>`. In the dev-flow repo
|
|
18
|
+
itself, plugin feedback is code.
|
|
19
|
+
- No flag → the wording decides and the printed line says why.
|
|
20
|
+
- `flow reflect list` numbers the queue; `flow reflect move <n>
|
|
21
|
+
--playbook|--code` re-files; `flow reflect done <n> ["<what fixed it>"]`
|
|
22
|
+
checks one off; `flow reflect tidy` drops closed items.
|
|
23
|
+
- `flow doctor "<observation>"` prints an investigation brief without queueing.
|
|
24
|
+
- The end-of-session reflection runs at finish (see [finish.md](finish.md)).
|
|
25
|
+
|
|
26
|
+
**When to suggest a fix** — only when the tool prints `⚑ fix the open
|
|
27
|
+
reflections now?` (an item recurred, is ≥ 14 days old, ≥ 3 playbook items, or
|
|
28
|
+
a code item between flows). It surfaces at finish, unbound, and in `flow
|
|
29
|
+
doctor` — never mid-feature. One line; the operator decides.
|
|
30
|
+
|
|
31
|
+
**Folding items in** on the operator's word: investigate, propose, confirm,
|
|
32
|
+
open the routed flow and apply it there (`project.md` is editable only in a
|
|
33
|
+
docs/patch worktree), then `flow reflect done <n> "<what>"` once merged.
|
|
34
|
+
|
|
35
|
+
**GitHub issues** fold into `flow doctor` / `reflect list` when the repo has a
|
|
36
|
+
GitHub remote: a local row an open issue covers shows `⟷ gh#NNN` (check it off
|
|
37
|
+
`— filed: gh#NNN`); `~ gh#NNN may duplicate` is your call, never an auto-merge.
|
|
38
|
+
`DEV_FLOW_NO_ISSUES=1` turns it off.
|
|
39
|
+
|
|
40
|
+
## Roadmap (the operator's backlog)
|
|
41
|
+
|
|
42
|
+
`.dev-flow/roadmap.md` — a gitignored `- [ ]` list the operator owns. Advisory,
|
|
43
|
+
never gating.
|
|
44
|
+
|
|
45
|
+
- `flow roadmap` lists open items; `flow roadmap add "<feature>"` (or editing
|
|
46
|
+
the file) adds one, on the operator's request.
|
|
47
|
+
- Handed a feature: `flow roadmap pick <n> <slug>` stamps it, then `flow start
|
|
48
|
+
<slug>`; its finish checks the item off.
|
|
49
|
+
- Spin-off mid-flow (on the operator's word): `flow roadmap add "<title>"
|
|
50
|
+
--slug=<slug> --brief=<notes>` — `flow start <slug>` later seeds the plan
|
|
51
|
+
from the brief. A hand-made `.dev-flow/<slug>/plan/` is a ghost; `flow start
|
|
52
|
+
<slug> --confirmed` adopts it.
|
|
53
|
+
- Shipped outside a flow: `flow roadmap done <n>`; `flow roadmap tidy` drops
|
|
54
|
+
checked lines.
|
|
@@ -1,68 +1,35 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Stage: release
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
the
|
|
5
|
+
Main-repo git (merge, tag, push on the default branch) is allowed only here.
|
|
6
|
+
Nothing in this stage asks the operator anything — Release? covered it. Report
|
|
7
|
+
each step with the gate's stage line, **🚀 release · `<slug>`**; no `Done:` /
|
|
8
|
+
`Next steps:` block.
|
|
10
9
|
|
|
11
|
-
1. Commit everything, push the feature branch, open the PR
|
|
12
|
-
CI is green**: `gh pr checks <n> --watch` (or your
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
the
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
publication). Reporting at this stage is stage lines only, one per step —
|
|
38
|
-
**🚀 release · `<slug>`** — PR + state · merge style used · tag state ·
|
|
39
|
-
artifact · forge release (all values `✓` — the Release? verb locked them);
|
|
40
|
-
no `Done:`/`Next steps:` block, nothing is asked. It re-verifies (tag on the default branch, on origin, artifact
|
|
41
|
-
when configured) against **the version the release gate stamped** — never a
|
|
42
|
-
re-read from a checkout that may be behind — and refuses anything older than
|
|
43
|
-
the newest matching tag on origin (lists come from `git ls-remote`, so an
|
|
44
|
-
unfetched clone never decides what is tagged). It creates the forge release
|
|
45
|
-
— `gh` for GitHub, `glab` for GitLab, nothing for `forge = self`, advisory
|
|
46
|
-
note if a CLI or remote is missing; body = the `release.changelog` entry for
|
|
47
|
-
that version — the changelog is what the release page must read like — else
|
|
48
|
-
the tag's annotation, else nothing with the reason printed (annotate with
|
|
49
|
-
`git tag -a`), and it reads the stored body back and refuses a mismatch
|
|
50
|
-
(#97) — and records the release;
|
|
51
|
-
`flow finish` closes the feature out. Skipping the forge release
|
|
52
|
-
(`--no-release-create`, once, or `release.releases = false`, always) and
|
|
53
|
-
the artifact check (`--no-artifact-check`, once) are operator calls only —
|
|
54
|
-
act when told, never on your own. If this session runs an older build than
|
|
55
|
-
the checkout, **the release gate asks instead of blocking**: it prints both
|
|
56
|
-
builds, lists what shipped between them (those proofs will not run), and
|
|
57
|
-
puts the choice to the operator — **update (`/reload` and re-run) or
|
|
58
|
-
proceed with the old release?** Publishing under an older gate is a
|
|
59
|
-
legitimate choice (hotfix, offline reload); the answer is recorded in the
|
|
60
|
-
release output and `release-done` repeats the acknowledgement as the
|
|
61
|
-
backstop for headless runs.
|
|
62
|
-
Release-stage checklist items have no gate of their own: `release-done`
|
|
63
|
-
lists the open ones and the Finish? answer closes them.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Once `flow release-done` has recorded the release, the playbook continues in
|
|
67
|
-
[finish.md](finish.md) — `flow finish` runs the closing reflection first and stops for
|
|
68
|
-
fold/drop (that answer is **Finish?**); its re-run with `--confirmed` cleans up.
|
|
10
|
+
1. **PR and merge.** Commit everything, push the feature branch, open the PR.
|
|
11
|
+
- **Merge only once CI is green**: `gh pr checks <n> --watch` (or your
|
|
12
|
+
forge's equivalent) first — CI runs jobs the host may not.
|
|
13
|
+
- Merge in the **playbook's style**, PR number before the flag:
|
|
14
|
+
`gh pr merge <n> --squash` under `merge = squash`, `--merge` under
|
|
15
|
+
`merge = merge`. (`gh pr merge --merge main` reads `main` as the PR.)
|
|
16
|
+
- No `--delete-branch` — finish deletes the branch on merge proof.
|
|
17
|
+
2. **Tag** (versioned flows). `git fetch`, confirm the merge landed, create an
|
|
18
|
+
**annotated** tag (`git tag -a v<ver> -m …`) and push it explicitly:
|
|
19
|
+
`git push origin v<ver>`. Never `--follow-tags`.
|
|
20
|
+
- CI builds from the tag? `release.preflight` proves that build at
|
|
21
|
+
`flow release`; `release.artifact` makes the record step verify the
|
|
22
|
+
published artifact.
|
|
23
|
+
- `--no-version` flow: no bump, no tag — publish the merge only.
|
|
24
|
+
3. **Hand over to finish.** Once merged and tagged, the playbook continues in
|
|
25
|
+
[finish.md](finish.md): `flow finish` records the release itself first
|
|
26
|
+
(the same proofs `flow release-done` runs — tag on the default branch and
|
|
27
|
+
on origin, artifact, forge release created from the changelog entry and
|
|
28
|
+
read back) and then closes the feature out.
|
|
29
|
+
- Skipping the forge release (`--no-release-create`, or `release.releases
|
|
30
|
+
= false`) or the artifact check (`--no-artifact-check`) is the
|
|
31
|
+
operator's call only.
|
|
32
|
+
- Session on an older build than the checkout: the release gate prints
|
|
33
|
+
both builds and what shipped between them and asks **update (`/reload`
|
|
34
|
+
and re-run) or proceed?** — a recorded choice, not a block.
|
|
35
|
+
- Release-stage checklist items close with the Finish? answer.
|
|
@@ -1,72 +1,53 @@
|
|
|
1
|
-
> Part of the **dev-flow** playbook.
|
|
2
|
-
> [../SKILL.md](../SKILL.md); this file is the detail for one stage — read it
|
|
3
|
-
> when the session reaches that stage.
|
|
1
|
+
> Part of the **dev-flow** playbook. Ground rules: [../SKILL.md](../SKILL.md).
|
|
4
2
|
|
|
5
3
|
## Start
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`flow start <slug
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
###
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
before Approve?). `--patch`: a small change you intend to release
|
|
57
|
-
(one-file fix, version chore) — no plan file, one chat line is the plan,
|
|
58
|
-
everything else identical. `--docs`: docs-only — no plan file **and no
|
|
59
|
-
tier-1 checks** (build/lint/test); worktree discipline and the full release
|
|
60
|
-
stay. A change that grows past one line or touches behavior is a normal
|
|
61
|
-
feature, not patch/docs.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Playbook ownership, in full:
|
|
65
|
-
|
|
66
|
-
- `.dev-flow/<slug>/state.json` is flow-owned — never read or write it;
|
|
67
|
-
`flow status` is your view. **project.md is the operator-owned playbook**
|
|
68
|
-
(test/build/run commands, default branch, forge, worktree path, safety
|
|
69
|
-
rules): read freely, **never edit** — changes go through `flow init --write`
|
|
70
|
-
on the operator's word. In-life playbook updates run as a docs flow:
|
|
71
|
-
project.md is editable only inside a docs/patch flow's worktree and is
|
|
72
|
-
committed to git like any file.
|
|
5
|
+
### No playbook yet: `flow init`
|
|
6
|
+
|
|
7
|
+
1. `flow init` prints a setup brief: what was detected, then numbered
|
|
8
|
+
questions, each with `detected:`, `accept:` and `why:`.
|
|
9
|
+
2. Relay it: group the questions that have an `accept` line as one "keep
|
|
10
|
+
these?", explain the rest in a line each.
|
|
11
|
+
3. Apply every answer in one call: `flow init --answers key=value …`. It
|
|
12
|
+
previews the summary and diff and writes nothing — show that.
|
|
13
|
+
4. After the operator confirms, re-run the same call with `--confirmed
|
|
14
|
+
--track`.
|
|
15
|
+
|
|
16
|
+
- Free text (checklist items, prose, `flow-guard` rules): `flow init
|
|
17
|
+
--write-file <path>` with the full file (`flow init --draft` prints it).
|
|
18
|
+
- Never hand-edit `project.md`, and never write it before the confirmation.
|
|
19
|
+
- CLAUDE.md / AGENTS.md / CONTRIBUTING.md found → propose their stage rules
|
|
20
|
+
as prose; never copy them unasked.
|
|
21
|
+
- With a playbook already there, `flow init` is a **doctor**: discuss its
|
|
22
|
+
findings and fix through the same write path. Ghost feature dirs come with
|
|
23
|
+
a delete offer — only on the operator's word. `flow doctor` is the
|
|
24
|
+
read-only version.
|
|
25
|
+
|
|
26
|
+
### Starting a feature: `flow start <slug>`
|
|
27
|
+
|
|
28
|
+
Report opening: **💬 pre-flow · new work** — mode proposal + why · detected
|
|
29
|
+
knobs · merge-policy state.
|
|
30
|
+
|
|
31
|
+
- Check `flow status` for an active feature first. Slug: lowercase words,
|
|
32
|
+
dashes.
|
|
33
|
+
- **Ask every grant in one message**, then make one call with all of them:
|
|
34
|
+
the mode (`normal` default, or `--patch` / `--docs`), `--ui` when screens
|
|
35
|
+
change, and the merge policy if the playbook has none —
|
|
36
|
+
`flow start <slug> [--ui] [--patch|--docs] [--merge=<style>] --confirmed`.
|
|
37
|
+
Never grant any of them yourself.
|
|
38
|
+
- No merge policy → the gate refuses with `NEEDS-OPERATOR Merge policy?` and a
|
|
39
|
+
suggestion read off the repo's history. Ask: squash, merge, rebase or any.
|
|
40
|
+
The answer is written into `## release` once.
|
|
41
|
+
- `--ui` after a plain start, still at plan: `flow start <slug> --ui
|
|
42
|
+
--confirmed` from the feature's own session.
|
|
43
|
+
- Start warns when this session runs an older dev-flow build than the
|
|
44
|
+
checkout (`/reload` before trusting gate output) and lists playbook gaps.
|
|
45
|
+
|
|
46
|
+
### Modes
|
|
47
|
+
|
|
48
|
+
- `normal` — a written plan (`plan/plan.md`) is required before Approve?.
|
|
49
|
+
- `--patch` — a small change to release now (one-file fix, version chore):
|
|
50
|
+
no plan file, one chat line is the plan, every other gate identical.
|
|
51
|
+
- `--docs` — docs only: no plan file and no tier-1 checks; worktree and the
|
|
52
|
+
full release stay.
|
|
53
|
+
- A change that grows past one line or touches behavior is a normal feature.
|