pi-dev-flow 0.89.0 → 0.90.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 +22 -0
- package/README.md +89 -225
- package/docs/concurrency.md +54 -48
- package/docs/development.md +48 -54
- package/docs/gates.md +187 -25
- package/docs/guardrails.md +112 -30
- package/docs/headless.md +32 -44
- package/docs/playbook.md +215 -275
- package/docs/reflections.md +73 -0
- package/extensions/dev-flow.ts +3 -2
- package/package.json +1 -1
- package/skills/dev-flow/references/implement.md +3 -1
- package/skills/dev-flow/references/reflect.md +4 -1
- package/skills/dev-flow/references/start.md +4 -1
- package/src/core.ts +85 -36
- package/src/projectmd.ts +18 -5
- package/src/runtime/gates.ts +10 -4
- package/src/runtime/grants.ts +13 -3
- package/src/runtime/reflect.ts +29 -17
- package/src/runtime/ship.ts +23 -6
package/docs/headless.md
CHANGED
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
# Driving dev-flow
|
|
1
|
+
# Driving dev-flow headless
|
|
2
2
|
|
|
3
|
-
For
|
|
3
|
+
For anyone putting a Pi session behind a bot, a web UI or a queue. The interactive story is in the
|
|
4
|
+
[README](../README.md#how-it-works).
|
|
4
5
|
|
|
5
|
-
There
|
|
6
|
-
command
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
There's **no `flow` CLI**. Gates exist only inside a Pi session, as the `flow` tool and the `/flow`
|
|
7
|
+
command. So an orchestrator drives a **Pi session** (for example through the Pi SDK). That's
|
|
8
|
+
deliberate: the guards live in the harness, so anything that went around Pi would skip all of them
|
|
9
|
+
except the `pre-commit` hook.
|
|
9
10
|
|
|
10
|
-
The contract
|
|
11
|
+
## The contract
|
|
11
12
|
|
|
12
|
-
- **Refuse → relay → `--confirmed`.**
|
|
13
|
-
`finish`) never
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
the
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- **
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
A remote timeout must be minutes, not seconds — the gate prints progress lines while it
|
|
37
|
-
runs.
|
|
38
|
-
- **Edits make checks stale.** Every check carries a fingerprint of the worktree it ran against
|
|
39
|
-
(edit-tool writes, `sed -i`, a formatter, codegen alike), and verify/release rerun records the
|
|
40
|
-
tree has outgrown (`stale record(s) rerun after a worktree change: …`).
|
|
41
|
-
Re-running `flow check` before `verify` after the last edit is still the tidy order; the gate no
|
|
42
|
-
longer trusts a stale PASS if you skip it.
|
|
43
|
-
- **Version skew.** Gates execute the dev-flow build the session loaded at start; `flow version`
|
|
44
|
-
reports when the checkout has moved ahead of it. `flow release` turns the skew into a question —
|
|
45
|
-
update (`/reload`, then re-run) or proceed with the old release — never a block: publishing under
|
|
46
|
-
an older gate is a legitimate choice. The operator's proceed is stamped into the release and
|
|
47
|
-
`release-done` repeats the acknowledgement (its after-the-fact warning stays for a release that
|
|
48
|
-
went out without the question being answered).
|
|
13
|
+
- **Refuse → relay → `--confirmed`.** Without a UI, a checkpoint gate (`approve`, `verify`,
|
|
14
|
+
`release`, `finish`) never opens a dialog. It refuses with a line that starts with
|
|
15
|
+
`NEEDS-OPERATOR <Question?>`, where the question is Approve?, Verified?, Release? or Finish?. Route
|
|
16
|
+
on that marker, show the question to a human word for word, and when they answer, re-run the same
|
|
17
|
+
gate with `--confirmed`. A `flow-guard` `confirm` rule with no UI refuses with the same marker.
|
|
18
|
+
- **`--confirmed` runs on trust.** dev-flow can't verify that a human answered. If your
|
|
19
|
+
orchestrator adds `--confirmed` on its own guess, dev-flow can't catch it. `--patch` and `--docs`
|
|
20
|
+
grants work the same way.
|
|
21
|
+
- **Machine-readable output.** `flow status --json` gives the bound slug and, per feature: stage,
|
|
22
|
+
modes, branch, worktree, checks and next hint. `flow help --json` gives the gate contract:
|
|
23
|
+
questions and flag names. `status`, `help`, `version`, `doctor` and `roadmap` (list) are safe at any
|
|
24
|
+
time, even without `.dev-flow/`.
|
|
25
|
+
- **One session = one feature.** Bindings are per session and survive resume and fork. A driver that
|
|
26
|
+
reconnects either rejoins its session or rebinds with `flow use <slug>`. Nothing binds
|
|
27
|
+
automatically. Parallel features need parallel sessions.
|
|
28
|
+
- **Long gates need long timeouts.** `approve` runs `setup`. `verify` runs the build and the `dev`
|
|
29
|
+
deploy (killed after 15 minutes), then retries the health probe. Give the driver minutes, not
|
|
30
|
+
seconds. Gates print progress while they run.
|
|
31
|
+
- **Edits make checks stale.** Each check result is tied to a worktree fingerprint, and
|
|
32
|
+
`verify` / `release` re-run stale ones. Running `flow check` after the last edit is still the tidy
|
|
33
|
+
order.
|
|
34
|
+
- **Version skew.** Gates run the dev-flow build the session loaded at start. `flow version` says
|
|
35
|
+
when the checkout is newer. `flow release` asks whether to `/reload` or proceed with the old build,
|
|
36
|
+
and never blocks on it.
|