@manhquy/flow-skill 0.7.1-next.0 → 0.7.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +5 -5
  3. package/README_VN.md +5 -5
  4. package/package.json +1 -1
  5. package/skills/flow/SKILL.md +109 -221
  6. package/skills/flow/_templates/01-research.md +3 -2
  7. package/skills/flow/_templates/02-scope.md +2 -0
  8. package/skills/flow/_templates/03-prd.md +2 -1
  9. package/skills/flow/_templates/05-contract.md +1 -0
  10. package/skills/flow/_templates/card.md +5 -1
  11. package/skills/flow/law/CLAUDE.md +6 -5
  12. package/skills/flow/law/CODING.md +37 -0
  13. package/skills/flow/references/agent-detection.md +11 -9
  14. package/skills/flow/references/agent-stage-mapping.md +47 -12
  15. package/skills/flow/references/auto-run.md +37 -7
  16. package/skills/flow/references/clarify.md +7 -7
  17. package/skills/flow/references/command-dispatch.md +51 -51
  18. package/skills/flow/references/concierge.md +7 -5
  19. package/skills/flow/references/debt-and-halts.md +20 -5
  20. package/skills/flow/references/gate-00.md +10 -0
  21. package/skills/flow/references/gate-01.md +18 -0
  22. package/skills/flow/references/gate-02.md +16 -0
  23. package/skills/flow/references/gate-03.md +10 -0
  24. package/skills/flow/references/gate-04.md +12 -0
  25. package/skills/flow/references/gate-05.md +33 -0
  26. package/skills/flow/references/gate-assess.md +13 -0
  27. package/skills/flow/references/gate-card.md +25 -0
  28. package/skills/flow/references/gate-consistency.md +24 -0
  29. package/skills/flow/references/gate-constitution.md +19 -0
  30. package/skills/flow/references/gate-debt.md +5 -0
  31. package/skills/flow/references/gate-eval.md +16 -13
  32. package/skills/flow/references/gate-examples.md +78 -0
  33. package/skills/flow/references/gate-rules.md +40 -241
  34. package/skills/flow/references/gate-shared.md +37 -0
  35. package/skills/flow/references/ground-truth-gates.md +1 -1
  36. package/skills/flow/references/mode-work.md +13 -10
  37. package/skills/flow/runner/flow.sh +300 -31
  38. package/skills-manifest.json +16 -2
@@ -1,9 +1,11 @@
1
1
  # C-NNN — [FILL: one-line scope, ONE thing]
2
2
 
3
3
  status: todo
4
+ <!-- status: todo|done (in-flight is cards/.inflight, not a status value) -->
4
5
  deps: [FILL: card ids this depends on, e.g. "C-001, C-002" — or "none"]
5
6
  implements: [FILL: PRD feature ids this card delivers, e.g. "FR1, FR2" — or "infra"/"none" for non-feature cards]
6
7
  risk: unknown
8
+ <!-- risk: unknown|standard|security-class -->
7
9
  risk-reason:
8
10
  risk-ack: none
9
11
 
@@ -13,6 +15,7 @@ risk-ack: none
13
15
 
14
16
  ## Independent test
15
17
 
18
+ <!-- PASS: a user opens /g/demo-4person/balance and sees "Alice owes Bob $12.50". FLAG: unit tests pass -->
16
19
  [FILL: one sentence — if only this card shipped, what can a user do? Or `infra` / `none` for scaffold/CI/contract-test/e2e plumbing. "Unit tests pass" is not an independent test.]
17
20
 
18
21
  ## Allowed files
@@ -21,7 +24,7 @@ risk-ack: none
21
24
 
22
25
  ## Verify (run these before calling the card done)
23
26
 
24
- - [ ] [FILL: a concrete check — a curl, a click, a command + expected output]
27
+ - [ ] [FILL: command + expected output OR URL/path + observable user fact. Not "tests pass"]
25
28
 
26
29
  ## Done-evidence (world-state proof, named BEFORE building)
27
30
 
@@ -30,4 +33,5 @@ a curl output, a deployed page. "Tests pass" / "code merged" are NOT done-eviden
30
33
 
31
34
  ## Evidence (paste the actual proof here when done)
32
35
 
36
+ <!-- Paste the re-run command output or re-read the path/URL. Do not quote the agent claiming tests passed. -->
33
37
  (empty until done)
@@ -8,9 +8,8 @@ no advance. Read `README.md` once for the method; THESE rules govern every sessi
8
8
 
9
9
  `/flow` (status) · `/flow next` (gate-check + unlock stage) · `/flow card` (new card) ·
10
10
  `/flow check C-NNN` (validate card) · `/flow mode teach|work` (who writes the plan) ·
11
- `/flow retro` (3 questions → RETRO.md / playbooks/ / FLOW-FEEDBACK.md) ·
12
11
  `/flow ready` (what's buildable now, parallel-safe groups) · `/flow auto` (autonomous
13
- build run — preflight via runner, then drive per SKILL.md AUTO PRINCIPLES: subagent per
12
+ build run — preflight via runner, then drive per `references/auto-run.md`: subagent per
14
13
  card, planner reviews + verifies, worktree isolation for parallel groups, operator-gated
15
14
  cards halt by design, state in card files + AUTO-LOG.md).
16
15
  Runner: `bash .claude/skills/flow/runner/flow.sh <cmd>`.
@@ -37,10 +36,12 @@ done-rules are identical in both modes.
37
36
  into `## Evidence`. Only then set `status: done`, then run `/flow check C-NNN`.
38
37
  4. Done-evidence = world-state (deployed URL, curl output, DB row). "Tests pass" /
39
38
  "code merged" are mid-pipeline, never done.
40
- 5. Never check a gate box or write a planning artifact on the user's behalf.
39
+ 5. Before coding a card, read `law/CODING.md`.
40
+ 6. Never check a gate box or write a planning artifact on the user's behalf (teach).
41
+ In work mode the host drafts after the interview; gates still bind.
41
42
  Never set a card `done` without pasted evidence.
42
- 6. Read any file flow.sh just created before first editing it.
43
- 7. **Playbooks** (`playbooks/`): paid-for stack knowledge. Before building a card that
43
+ 7. Read any file flow.sh just created before first editing it.
44
+ 8. **Playbooks** (`playbooks/`): paid-for stack knowledge. Before building a card that
44
45
  touches a stack with a playbook (check `playbooks/README.md` index), READ it and run
45
46
  its smoke tests before committing to a design on that stack. After a card pays for a
46
47
  non-obvious lesson, HARVEST it back into a playbook — the card review isn't done
@@ -0,0 +1,37 @@
1
+ # Coding law — buildflow projects
2
+
3
+ LAW for product code on every card. Read before implementing. If a change
4
+ conflicts, this rule wins — or amend this file with a dated note. Portable
5
+ only: no stack, no runtime.
6
+
7
+ 1. **Explicit resolve.** MUST run a named `resolve` (or equivalent) before
8
+ the handler. NEVER hide `??` / `||` defaults inside the handler.
9
+ - Good: `spec = resolve(req); handle(spec)`
10
+ - Bad: `handle({ port: req.port ?? 8080 })`
11
+
12
+ 2. **Fail loud.** MUST throw a named error at the first resolvable point.
13
+ NEVER silently default a missing required referent.
14
+ - Good: `raise MissingConfig("DATABASE_URL")`
15
+ - Bad: `url = env.DATABASE_URL or "postgres://localhost/app"`
16
+
17
+ 3. **Tests name behavior.** MUST title tests by the observable fact they pin.
18
+ NEVER "works correctly", "handles edge case", or "unit tests pass".
19
+ - Good: `GET /healthz returns 200 {ok:true} when the process is up`
20
+ - Bad: `health check works correctly`
21
+
22
+ 4. **No empty catch.** NEVER swallow with an empty `catch` / `except`. If
23
+ the body is empty, MUST name what it swallows and why nothing else can
24
+ reach it; keep the try to one statement.
25
+ - Good: `except AbortError: # timeout cancelled the fetch; nothing else lands here`
26
+ - Bad: `catch (_) {}`
27
+
28
+ 5. **Cite the seam.** MUST cite `flow/05-contract.md`, an ADR path, or card
29
+ id `C-NNN` for a product decision. NEVER "as discussed" / "as agreed".
30
+ - Good: `// C-012 / 05-contract GET /healthz — empty: none`
31
+ - Bad: `// as discussed, skip the empty list`
32
+
33
+ 6. **Library over hand-roll.** MUST prefer a maintained library named in an
34
+ ADR when the swap deletes owned parser code and its tests. NEVER keep a
35
+ hand-rolled parser beside that library.
36
+ - Good: ADR names `zod`; delete `parseJsonLoose` and its tests
37
+ - Bad: keep `parseJsonLoose()` "just in case" after adopting zod
@@ -4,11 +4,11 @@
4
4
  built-in behavior when none are present. It stays portable: rich where agents exist,
5
5
  unbroken where they don't.
6
6
 
7
- ## Detection (at runtime, by the skill = Claude)
7
+ ## Detection (built-in-first)
8
8
 
9
- You already know which agents and skills the host exposes (the Task tool's
10
- `subagent_type` registry + the available Skills list). Detect by checking that registry —
11
- do NOT assume. Also glob for project-local definitions when unsure:
9
+ The host's inline/generic path is always available. Overlay named specialists only when the
10
+ host registry actually lists them — do not assume a Task tool, ck: agents, or any one vendor.
11
+ Detect by checking that registry. Also glob for project-local definitions when unsure:
12
12
  - ck: agents: `.claude/agents/*.md` (project) and the host agent registry.
13
13
  - bmad skills: the Skills list (`bmad-*`) and `.claude/skills/bmad-*`.
14
14
 
@@ -17,7 +17,7 @@ do NOT assume. Also glob for project-local definitions when unsure:
17
17
  For each stage, pick the FIRST available:
18
18
  1. **ck: agent** (primary) — planner, researcher, architect, fullstack-developer, code-reviewer, typescript-reviewer, python-reviewer, tester, ui-ux-designer, docs-manager, git-manager, debugger, scout.
19
19
  2. **bmad-* skill** (alternative) — bmad-prd, bmad-create-architecture, bmad-spec, bmad-create-story, bmad-dev-story, bmad-code-review, bmad-check-implementation-readiness, bmad-market-research, bmad-technical-research, bmad-qa-generate-e2e-tests.
20
- 3. **built-in fallback** — you (Claude) do it inline, or spawn a generic `Explore`/`general-purpose` agent. Output shape must match the agent path so the gate is identical.
20
+ 3. **built-in fallback** — the host drafts inline, or spawns a generic `Explore`/`general-purpose` agent. Output shape must match the agent path so the gate is identical.
21
21
 
22
22
  ## Codex — the cross-vendor second engine (a tier that crosses the ladder, not just sits under it)
23
23
 
@@ -75,11 +75,13 @@ Manager / real `agy` terminal, paste the ReviewResult back); an empty Gemini res
75
75
  contract. An agent fills an artifact; the gate still judges it. A missing agent never
76
76
  lowers a gate — it only changes who drafts.
77
77
  - **No named mux required.** Absence of any multiplexer never fails a gate. Parallel occupancy is host-owned — `host-agnostic-parallel.md`.
78
- - **Context isolation (orchestration-protocol).** Give each subagent ONLY: the task, the
79
- specific files to read/modify, acceptance criteria, and relevant law/contract excerpts.
78
+ - **Context isolation (orchestration-protocol).** Spawn-not-fork: the brief is whole context.
79
+ Give each subagent ONLY: the task, the specific files to read/modify, acceptance criteria, and relevant law/contract excerpts.
80
80
  Never the full session history. One card = one scoped brief.
81
- - **Status protocol.** Every subagent returns DONE / DONE_WITH_CONCERNS / BLOCKED /
82
- NEEDS_CONTEXT. Handle BLOCKED/NEEDS_CONTEXT before retry (more context → simpler task →
81
+ - **Status protocol.** Every subagent returns the structured block in `agent-stage-mapping.md`
82
+ (summary / evidence / nextSteps / blocker, last line `STATUS: DONE|DONE_WITH_CONCERNS|BLOCKED|NEEDS_CONTEXT`).
83
+ Missing STATUS = BLOCKED in the brief contract; the parent treats the child as BLOCKED.
84
+ The runner does not parse STATUS. Handle BLOCKED/NEEDS_CONTEXT before retry (more context → simpler task →
83
85
  escalate). Two-strikes: a second red result → **Codex rescue if the tier is eligible**
84
86
  (`codex:codex-rescue`, a different engine), else fresh subagent, else escalate to operator.
85
87
  - **Durable record hook.** After a stage/card agent finishes, write the durable record via
@@ -11,12 +11,12 @@ ladder below: (1) **rescue** — if the chosen path is BLOCKED twice, hand the s
11
11
  the primary drafter for **research** and **build** stages (`codex:codex-rescue --write` /
12
12
  `codex-companion.mjs task --write`). **Default stays ck:**; Codex-as-primary is operator-selected,
13
13
  never automatic. The scope/PRD/ADR/Contract judgment stages stay Claude by default (Codex may
14
- still rescue them). The stage gate is identical on the Codex path — Codex drafts, the gate judges. In `teach` mode you do NOT author — you
15
- gatekeep; agents assist the operator. In `work`/`auto` mode you (or the agent) draft, then
14
+ still rescue them). The stage gate is identical on the Codex path — Codex drafts, the gate judges. In `teach` mode the host does NOT author — it
15
+ gatekeeps; agents assist the operator. In `work`/`auto` mode the host (or a specialist) drafts, then
16
16
  the gate still judges.
17
17
 
18
- Artifact language: **Vietnamese for user-facing copy** (per `law/DESIGN.md`: VN native,
19
- `₫` prices, VietQR), **English for code identifiers/endpoints**.
18
+ Artifact language: **English for code identifiers/endpoints**. User-facing copy is Vietnamese
19
+ **when the project is Vietnamese-facing** (`law/DESIGN.md` VN block: VN native, `₫` prices, VietQR); otherwise match the product language.
20
20
 
21
21
  ## Brownfield pre-stage (existing codebase)
22
22
 
@@ -60,7 +60,7 @@ gate): **`ck-predict` at ADR** (5-persona pre-decision debate) and **`ck-scenari
60
60
 
61
61
  **Portability degrade rungs for git-manager and docs-manager:**
62
62
  - `git-manager` absent → inline: operator runs `git commit` + `git push` + opens PR manually following the durable-hook pattern. Gate (PR merged, SHA logged in `AUTO-LOG.md`) is identical.
63
- - `docs-manager` absent → inline: Claude updates docs directly after card implementation; gate (impacted docs under `docs/` match the code change) is identical.
63
+ - `docs-manager` absent → inline: the host updates docs directly after card implementation; gate (impacted docs under `docs/` match the code change) is identical.
64
64
 
65
65
  **Portability degrade rungs for the language-specialist Review lens** (`adversarial-review.md` §Language-specialist lens selection):
66
66
  - `typescript-reviewer` or `python-reviewer` AGENT present → run it layered with `code-reviewer` for `.ts/.tsx/.js/.jsx` or `.py` cards respectively. Gate (triage table, adversarial verdict) is identical.
@@ -69,7 +69,7 @@ gate): **`ck-predict` at ADR** (5-persona pre-decision debate) and **`ck-scenari
69
69
 
70
70
  ## Scoped prompt template (use for EVERY delegation)
71
71
 
72
- Keep it small. No session history. Fill every slot from the live artifacts.
72
+ Keep it small. Spawn-not-fork: the brief is whole context. No session history. Fill every slot from the live artifacts.
73
73
 
74
74
  ```
75
75
  Task: <one stage/card goal>
@@ -78,8 +78,43 @@ Read for context: flow/05-contract.md (shapes), law/DESIGN.md (UI only),
78
78
  Files to modify: <card ## Allowed files ONLY>
79
79
  Acceptance criteria: <the stage gate from gate-rules.md, or the card ## Verify steps>
80
80
  Constraints: contract is the seam (never improvise a shape); done = world-state evidence;
81
- Vietnamese user-facing copy; touch only allowed files
82
- Return: the drafted artifact + status (DONE/DONE_WITH_CONCERNS/BLOCKED/NEEDS_CONTEXT)
81
+ Vietnamese user-facing copy when the project is Vietnamese-facing (law/DESIGN.md VN block); touch only allowed files
82
+ Child MUST NOT resolve Tier-C, write DEBT, skip a gate, merge, or run flow.sh check.
83
+ Child complete = this report. Parent still runs flow.sh check.
84
+ Return — last line MUST be STATUS. Missing STATUS = BLOCKED (brief contract; runner does not parse STATUS):
85
+ summary: <one sentence what changed>
86
+ evidence: <paths, commands, live proof>
87
+ nextSteps: <parent-only; never skip/debt/merge>
88
+ blocker: <empty unless BLOCKED or NEEDS_CONTEXT>
89
+ STATUS: DONE|DONE_WITH_CONCERNS|BLOCKED|NEEDS_CONTEXT
90
+ ```
91
+
92
+ Cross-field (docs-only; runner does not parse STATUS): DONE requires non-empty evidence + empty blocker. BLOCKED and NEEDS_CONTEXT require a non-empty blocker. nextSteps never skip, debt, or merge.
93
+
94
+ Filled DONE (evidence paths, empty blocker). Child complete = this report; parent still `flow.sh check`:
95
+ ```
96
+ summary: C-012 checkout POST matches contract and returns live 200
97
+ evidence: cards/C-012.md; src/api/checkout.ts; curl -sS https://app.example/api/checkout -> 200
98
+ nextSteps: parent runs flow.sh check C-012
99
+ blocker:
100
+ STATUS: DONE
101
+ ```
102
+
103
+ Missing last-line STATUS — parent treats BLOCKED:
104
+ ```
105
+ summary: wired checkout handler
106
+ evidence: src/api/checkout.ts
107
+ nextSteps: parent runs flow.sh check C-012
108
+ blocker:
109
+ ```
110
+
111
+ Invalid — `STATUS: DONE` with empty evidence (not a pass; parent still `flow.sh check`):
112
+ ```
113
+ summary: checkout done
114
+ evidence:
115
+ nextSteps: parent runs flow.sh check C-012
116
+ blocker:
117
+ STATUS: DONE
83
118
  ```
84
119
 
85
120
  ## Stage notes
@@ -95,17 +130,17 @@ Return: the drafted artifact + status (DONE/DONE_WITH_CONCERNS/BLOCKED/NEEDS_CON
95
130
  - **Build via fullstack-developer:** one card = one scoped session. Pass the card's Scope +
96
131
  Allowed files + the contract shapes it consumes. It must honor shapes exactly.
97
132
  - **Repair / diagnostic via debugger:** detect-first ladder entry — NOT a hard dependency.
98
- Dispatch `Task(subagent_type="debugger")` with a scoped brief: task description, the failing
133
+ Debugger if present else inline + fresh scoped brief: task description, the failing
99
134
  card file, test output, and `## Verify` acceptance criteria. NO session history (context
100
- isolation per orchestration-protocol). If `debugger` is ABSENT in the host, degrade to inline
101
- root-cause analysis + a fresh same-ladder (Claude) subagent for the redraw. A missing agent
135
+ isolation per orchestration-protocol). A missing agent
102
136
  changes WHO diagnoses, never whether `## Verify` + `flow.sh check` must pass for real.
103
- Escalation order: debugger (Claude diagnostic) -> Codex (if USABLE) -> Antigravity (if USABLE)
137
+ Escalation order: debugger (host diagnostic) -> Codex (if USABLE) -> Antigravity (if USABLE)
104
138
  -> operator.
105
139
  - **Verify-live:** the proof is the LIVE surface (deployed URL, real curl), not "tests pass".
106
140
  Record `story update --e2e 1` + a `trace` only after the live check.
107
141
 
108
142
  ## After any delegation
143
+ Child complete is a worker report, not a gate. Missing STATUS = BLOCKED. Then:
109
144
  1. Run the gate (`flow.sh next` for stages, `flow.sh check C-NNN` for cards).
110
145
  2. Apply the semantic challenge from `gate-rules.md`.
111
146
  3. Write the durable hook above. NOTE: the engine now AUTO-fires some — `flow next` past 01 seeds
@@ -4,17 +4,46 @@
4
4
  `flow.sh auto` requires planning complete, classified card **risk** (no `unknown`),
5
5
  valid security-class DEBT acknowledgement when needed, a reliable live supervisor, and a
6
6
  current Stage 05 `semantic_gate` receipt — then writes shared `.flow/auto-state`. Full
7
- contract: `references/attestations.md`. Then YOU (Claude) orchestrate per the principles
7
+ contract: `references/attestations.md`. Then the hosting agent orchestrates per the principles
8
8
  below. Operator chose: **Tier-A auto-merge green cards; halt at security-class.**
9
9
  While auto is active, mechanical transitions require current card semantic/live receipts;
10
10
  there is no hidden bypass — use `flow auto stop` for deliberate manual continuation.
11
11
 
12
+ ## AutoDecision (docs vocabulary only)
13
+
14
+ Closed enum — this file is the only home. `cmd_auto` is unchanged and does not parse it.
15
+ Do not add `FLOW_AUTO_OK`.
16
+
17
+ `auto-merge | repair | halt | blocked | needs-operator`
18
+
19
+ | Decision | When |
20
+ |---|---|
21
+ | **auto-merge** | Tier-A: card built, review green, verify-live passed, no security-class concern |
22
+ | **repair** | Tier-B: review/verify fixable; first repair = debugger if present else inline + fresh scoped brief; deadlock then USABLE Codex then Antigravity |
23
+ | **halt** | Tier-C, hard-stop cap, parallel merge conflict, or security DEBT needed |
24
+ | **blocked** | Child report missing `STATUS` (treat as BLOCKED), or `STATUS: BLOCKED`/`NEEDS_CONTEXT` that more context cannot resolve |
25
+ | **needs-operator** | Two-strikes with no USABLE cross-vendor engine, or work the parent must not auto-act |
26
+
27
+ Child complete = worker report. Parent still runs `flow.sh check`. Child `STATUS: DONE` is not a card pass. Runner does not parse `STATUS`. Missing last-line STATUS → parent BLOCKED.
28
+
29
+ ```
30
+ summary: C-012 checkout live 200
31
+ evidence: cards/C-012.md; curl -sS https://app.example/api/checkout -> 200
32
+ nextSteps: parent runs flow.sh check C-012
33
+ blocker:
34
+ STATUS: DONE
35
+ ```
36
+
37
+ ## Default-deny (no scoped subagents)
38
+
39
+ Hosts that cannot spawn a scoped subagent with an isolated brief (Flash and similar) must not run `/flow auto`. Use `/flow next` + `/flow check`. Default-deny. Absence of scoped subagents never lowers a gate.
40
+
12
41
  ## Tiers (decide per card before acting)
13
42
 
14
43
  | Tier | What | Action |
15
44
  |---|---|---|
16
45
  | **A** | Card built, review green, verify-live passed, no security-class concern | **Auto-merge without asking.** Log PR URL + merged SHA in `AUTO-LOG.md`. |
17
- | **B** | Built but review found fixable issues, or verify ambiguous | First repair = **`Task(subagent_type="debugger")`** with scoped brief (task + card + test output + acceptance; no session history). If `debugger` is absent, degrade to inline root-cause + fresh same-ladder (Claude) subagent. If THAT repair is still red — the **two-strikes deadlock** — THEN try the next USABLE cross-vendor engine: **Codex** (`codex:codex-rescue`) first, then **Antigravity/Gemini-3** (`antigravity-integration.md`) if Codex is unusable or also red; else escalate to operator. (A cross-vendor engine may come in earlier ONLY on a security-class card or explicit operator opt-in — the cost gate. Do NOT call a billable engine on the first red of an ordinary card.) |
46
+ | **B** | Built but review found fixable issues, or verify ambiguous | First repair = **debugger if present else inline + fresh scoped brief** (task + card + test output + acceptance; no session history). If THAT repair is still red — the **two-strikes deadlock** — THEN try the next USABLE cross-vendor engine: **Codex** (`codex:codex-rescue`) first, then **Antigravity/Gemini-3** (`antigravity-integration.md`) if Codex is unusable or also red; else escalate to operator. (A cross-vendor engine may come in earlier ONLY on a security-class card or explicit operator opt-in — the cost gate. Do NOT call a billable engine on the first red of an ordinary card.) |
18
47
  | **C** | Security-class touch (auth, authorization, admin exposure, tenancy, payments, data migration, removing validation) OR a debt skip | **HALT.** Operator must accept the exposure in writing in `DEBT.md`. Never planner-decided. |
19
48
 
20
49
  ## Loop per card (serial by default; parallel only when `/flow ready` says safe)
@@ -25,6 +54,9 @@ for each todo card in card-number order:
25
54
  [records: flow harness graph record --execution "$(flow.sh harness graph session)" \
26
55
  --ns card:C-NNN --node card-review --interrupt --security-class]
27
56
  1. spawn ONE scoped subagent (agent-stage-mapping.md) in its own worktree
57
+ spawn-not-fork: the brief is whole context (no session history).
58
+ Child MUST NOT resolve Tier-C, write DEBT, skip a gate, or merge. Parent still `flow.sh check`.
59
+ Docs-only; runner does not refuse child `debt`/`skip`.
28
60
  /flow workspace add card/C-NNN --card C-NNN [records: card-dispatch]
29
61
  (a raw `git worktree add` records NOTHING — use the verb, or the journal has a hole)
30
62
  2. agent builds to contract, touches only allowed files, runs ## Verify for real
@@ -32,12 +64,10 @@ for each todo card in card-number order:
32
64
  gate/step boundaries — the next `check` is what proves it]
33
65
  3. review the diff (code-reviewer or bmad-code-review 3-layer; see adversarial-review.md).
34
66
  On a security-class card, add a USABLE cross-vendor lens (Codex, and/or Antigravity/Gemini-3).
35
- red (strike 1) -> repair: spawn Task(subagent_type="debugger") with a SCOPED BRIEF
67
+ red (strike 1) -> repair: debugger if present else inline + fresh scoped brief
36
68
  (task + failing card file + test output + ## Verify acceptance; NO session history).
37
- Debugger diagnoses root cause and returns a fix recommendation or revised implementation.
38
- Degrade rung: if `debugger` is ABSENT in the host, run inline root-cause analysis then
39
- spawn a FRESH same-ladder (Claude) subagent for the redraw. A missing `debugger` changes
40
- WHO diagnoses, never whether ## Verify + flow.sh check must pass for real.
69
+ Diagnose root cause and return a fix recommendation or revised implementation.
70
+ A missing `debugger` changes WHO diagnoses, never whether ## Verify + flow.sh check must pass for real.
41
71
  still red (strike 2 / deadlock) -> Codex fresh-engine repair if USABLE, then Antigravity if
42
72
  USABLE, else escalate
43
73
  green -> continue
@@ -17,7 +17,7 @@ Does **not** replace:
17
17
  - `mode-work.md` — one batch interview up front; leftover open decisions are the
18
18
  *only* reason to ask more after that batch
19
19
  - `native-rituals.md` §2 — edge-case *generation* for the contract
20
- - `gate-rules.md` material-authority stop — detect invented policy; this ritual
20
+ - `gate-shared.md` material-authority stop — detect invented policy; this ritual
21
21
  *asks* then writes the answer
22
22
 
23
23
  Informs, never judges: a finished clarify session does not pass the gate.
@@ -33,10 +33,10 @@ run the stage's semantic challenge.
33
33
  - Skip at 00 / 01 / 04 — those stages have forge-idea / research / ADR rituals.
34
34
 
35
35
  Cap: **at most 5 questions asked** in one session (retries on the same question
36
- do not count). There is no mechanical cap on how many open-decision bullets a
37
- file may carry (every leftover `- [ ]` already fails the gate). If the section
38
- is a pile, that is a **semantic** "too many — assume or cut" judgment (see
39
- `gate-rules.md`), not a runner count.
36
+ do not count). **More than 5 markdown bullets under `## Open decisions` fails
37
+ `scan_gate`.** Leftover `- [ ]` still fails boxes. If the section is a pile after
38
+ that floor, assume or cut rather than interview everything. Offer this ritual
39
+ (opt-in, never a `next` prereq) when any open decision remains. See `gate-shared.md`.
40
40
 
41
41
  ## Token rules (authoring, before this ritual)
42
42
 
@@ -46,7 +46,7 @@ When drafting 02 / 03 / 05 (especially in `mode work`):
46
46
  2. **Assume + record** if a reasonable industry default exists and the choice
47
47
  does not change scope, security/privacy, or UX. On 02/03 record it under
48
48
  `## Assumptions`. On **05 (contract) there is no `## Assumptions` section** —
49
- do not invent one (`gate-rules.md` forbids it); assume by writing the
49
+ do not invent one (`gate-shared.md` forbids it); assume by writing the
50
50
  access/effects cell or shared shape, or cut.
51
51
  Reasonable defaults (do **not** open-decide these): data retention for the
52
52
  domain, ordinary error-message tone, session/OAuth2 for a standard web app
@@ -166,7 +166,7 @@ Read `## Assumptions` on the artifact you just touched. For each bullet:
166
166
  billing, enforcement owner) wearing an assumption hat?
167
167
  - If it is product law with no operator/ADR authority → treat it as
168
168
  Decision-required: either add an open-decision bullet (and ask it) or
169
- **stop** and list it the same way `gate-rules.md` material-authority stop
169
+ **stop** and list it the same way `gate-shared.md` material-authority stop
170
170
  does. Do not silently keep it.
171
171
 
172
172
  A clean mechanical gate with a sneaky assumption is the exact hollow-pass this
@@ -1,60 +1,60 @@
1
1
  # Command dispatch
2
2
 
3
- Exact mapping: user input -> runner call -> your (Claude) duties. Always run the runner
3
+ Exact mapping: user input -> runner call -> host duties. Always run the runner
4
4
  first, relay its output faithfully, then do the semantic part. `<skill>` = this skill's
5
5
  install dir; run from the project root so `flow/` and `cards/` resolve.
6
6
 
7
- | User input | Runner call | Your duties after |
7
+ Seekable: `#verb-next`, `#verb-card` (humans). This file is still loaded whole — there
8
+ is no fragment loader (ADR-0001).
9
+
10
+ | User input | Runner call | Host duties after |
8
11
  |---|---|---|
9
- | `/flow` | `bash <skill>/runner/flow.sh status` | Runner now prints its own `NEXT ->` line (same helper as `resume`) plus stage dwell and, past 10 cards, a compact done/in-flight/todo summary. Relay it; nothing to author. |
10
- | `/flow resume` | `bash <skill>/runner/flow.sh resume` | Read-only, no lock. Relay all four sections verbatim (last session, in-flight + dwell, gate state, NEXT ->). Run this FIRST when entering a project mid-cycle with no prior context this session. Never expand on or guess at raw args it didn't print — it deliberately shows command names only. |
11
- | `/flow next` | `bash <skill>/runner/flow.sh next` | If FAIL: relay the exact violations + line numbers; offer help, don't author/tick in teach mode. If PASS: run the stage's challenge in `gate-rules.md`; flag hollow content, let operator decide. |
12
- | `/flow assess` | `bash <skill>/runner/flow.sh assess` | Brownfield only: fill `flow/00-inspect.md` from EVIDENCE (read the code) — functionality/UI/UX vs product, risks, test baseline, **Evidence ledger** claim tags. After mechanical PASS, apply gate-rules **Brownfield assess** challenge (no Observed→product-law promotion). Reuse `scout`/`researcher`. Gate is operator-reviewed; then proceed to `/flow next`. |
13
- | `/flow card` | `bash <skill>/runner/flow.sh card` | Confirm the new card id; remind: fill Scope (one thing) / Independent test / Allowed files / Verify / Done-evidence per `law/CLAUDE.md`. |
14
- | `/flow card start C-NNN` | `bash <skill>/runner/flow.sh card start C-NNN` | Optional: mark the card in flight (operator-visible in-progress, shown in `/flow status`). Portable `cards/.inflight` registry; does NOT touch the gated `status:` field. Coexists with hand-edit. |
15
- | `/flow card done C-NNN` | `bash <skill>/runner/flow.sh card done C-NNN` | Optional convenience: CLI-owned flip to `done`, gated by the SAME done-rules as `check` (reverts on fail — never a hollow done). Then still apply the semantic card review (diff-vs-scope, contract shapes, real evidence) as with `check`. |
16
- | `/flow check C-NNN` | `bash <skill>/runner/flow.sh check C-NNN` | If PASS mechanically: review diff-vs-scope, allowed-files drift, contract-shape match, DESIGN.md for UI, evidence = real world-state. |
17
- | `/flow gate <stage>` (or `--card C-NNN`) | `bash <skill>/runner/flow.sh gate <stage\|--card C-NNN>` | Read-only mechanical scan (unchecked boxes + `[FILL]`) with NO unlock, NO template copy, NO durable writes — the only flow.sh verb the graph executor runs from topology `cmd` position. Relay findings; `next`/`check` still own real progression + durable hooks. |
18
- | `/flow contract` | `bash <skill>/runner/flow.sh contract` | After the contract gate / before UI cards (web): flags client base-URL vs served-path prefix drift (double-`/api`, mixed-prefix) — the class spec-diff tools miss. Advisory; confirm on the running app. |
19
- | `/flow tokens` | `bash <skill>/runner/flow.sh tokens` | On/after UI cards: flags DESIGN.md tokens the CSS never uses + VALUE mismatches (same name, drifted value) + orphan CSS vars (info). Advisory; if the swap is intentional, record a dated DESIGN.md amendment. |
20
- | `/flow coherence` | `bash <skill>/runner/flow.sh coherence` | Flags version drift across declared version fields (package.json / pyproject / src app_version). The cheap doc-vs-code slice; semantic contradictions stay a human gate-challenge. |
21
- | `/flow consistency` | `bash <skill>/runner/flow.sh consistency` | After the contract gate, before cards: every PRD `FRn` is claimed by a card (`implements:`) and served by a contract interface; numeric success metric; no leftover placeholders. Then apply the semantic cross-artifact passes in `gate-rules.md` (hollow coverage, conflicting requirements, terminology drift). Advisory. |
22
- | `/flow constitution` | `bash <skill>/runner/flow.sh constitution` | At the scope/PRD/contract seam: checks `flow/constitution.md` is well-formed (no placeholder, every invariant has an ID) + scans declared grep-markers. **Advisory, NOT a `next` gate** — then apply the semantic challenge in `gate-rules.md`. |
23
- | `/flow clarify` | `bash <skill>/runner/flow.sh clarify` | List leftover `- [ ]` bullets under `## Open decisions` on 02/03/05 (section-scoped). **Advisory, NOT a `next` gate** — write-back is `references/clarify.md` (opt-in). Never invent auth/tenancy/retention/billing to clear FILL. |
24
- | `/flow converge` | `bash <skill>/runner/flow.sh converge [--file <payload>]` | Flow-back closer: assess present code vs plan per `references/converge.md`, write a `flow-converge/v1` payload to `.flow/converge-pending.md`, then run to **append** remainder cards. Transactional (all or none), append-only (never edits an existing card), prints `CONVERGED` + writes nothing when there is no gap. Present the findings table to the operator first. |
25
- | `/flow eval [--stage 01\|02\|card] [--fixture <id>] [--n 3] [--timeout <s>]` | `bash <skill>/runner/flow.sh eval [...]` | **Billable** (live mode skips cleanly, zero calls, if `claude` CLI absent). `--replay` does **not** inherit that SKIP — missing fixtures exit 1. Relay the scorecard verbatim. See `references/gate-eval.md` before running: what it measures (a fresh-judge lower bound, not the work-mode self-challenge), cost, and thresholds. Never wired into `next`/`check` gating — informative only. |
26
- | `/flow eval --report` | `bash <skill>/runner/flow.sh eval --report` | Offline, zero calls. Relay the last complete batch's scorecard + drift vs the prior complete batch. |
27
- | `/flow eval --replay` | `bash <skill>/runner/flow.sh eval --replay` | Keyless. Replay recorded stripped transcripts through parse → vote → per-fixture match lines (no scorecard; replay writes no results rows). Not a fresh-judge; verdicts never count toward the eval floor. Stale `gate_rules_sha` → exit 1 (re-record live). |
28
- | `/flow project-type <web\|cli\|library\|skill>` | `bash <skill>/runner/flow.sh project-type [t]` | Set/read the project type that selects the per-type gate lens + done-evidence definition (`references/project-types.md`). Confirm the type matches reality before planning. |
29
- | `/flow usage [--global\|--prune]` | `bash <skill>/runner/flow.sh usage [...]` | Roll up the JSONL usage log and relay the analytics (cycle-time, gate fail-rate, per-stage + per-card dwell, command breakdown). Local-only; `--prune [--keep N]` caps the log. Read-only — nothing to author. |
30
- | `/flow skip <stage> --reason ...` | `bash <skill>/runner/flow.sh skip <stage> --reason ...` | Advance past a gate that has a matching open `DEBT.md` line. **Security-class skips are operator-only and HALT** — never auto-skip; the operator accepts the exposure in writing first. |
31
- | `/flow debt add\|list` | `bash <skill>/runner/flow.sh debt add\|list` | Record/list deliberate gate-skips in `DEBT.md`. Security-class debt is operator-authored only; surface it at retro and before any real user touches the surface. |
32
- | `/flow design <file>` | `bash <skill>/runner/flow.sh design <file>` | Mechanical DESIGN.md check on a UI file (emoji / `{{}}` / engine-words / gradient). Advisory; pair with the semantic `design-review-checklist.md` for mock/frontend cards. |
33
- | `/flow harness <args>` | `bash <skill>/runner/flow.sh harness <args>` | Passthrough to the durable-layer CLI (intake/story/trace/decision/backlog/query). Visible output + real exit code. Use to write the durable hook after a stage/card; read it back with `recall`. |
34
- | `/flow doctor` | `bash <skill>/runner/flow.sh doctor` | Environment/install self-check (bash/python/grep/git across macOS/Linux/Windows, runner path, Git Bash). Relay any FAIL as the fix list. Read-only. |
35
- | `/flow promote <file>` | `bash <skill>/runner/flow.sh promote <file>` | Copy a hard-won playbook into the cross-project KB (`~/.claude/flow/playbooks`) so its lesson is surfaced by `recall` in every project, not just this one. |
36
- | `/flow mode teach` | `bash <skill>/runner/flow.sh mode teach` | Confirm; you only gatekeep, operator authors. |
37
- | `/flow mode work` | `bash <skill>/runner/flow.sh mode work` | Interview once, draft 00-05, pause for scope sign-off, deliver card set; still pass every gate. |
38
- | `/flow ready` | `bash <skill>/runner/flow.sh ready` | Relay buildable cards; confirm allowed-files truly don't overlap before suggesting parallel. Operator dispatches. |
39
- | `/flow workspace <verb>` | `bash <skill>/runner/flow.sh workspace add\|list\|enter\|remove\|check\|doctor [...]` | Multi-agent worktree isolation (human-driven, cross-vendor). Relay the runner output faithfully: on `add`, hand the operator the printed cd/env block (one worktree per agent — Claude `--worktree`/`-w`, Codex CLI manual + `CODEX_HOME`, Antigravity = open the dir as a workspace); on `check`/`doctor` exit 1, surface the collision/drift, don't auto-`--force` a `remove`. git is the source of truth; the `.flow/workspaces.jsonl` side-file only adds vendor/card/port/task. Advisory — not a `next` gate. |
40
- | `/flow auto` | `bash <skill>/runner/flow.sh auto` | On preflight PASS (risk + Stage 05 receipt), shared auto-state is active — drive the autonomous run per SKILL.md AUTO principles + `attestations.md`. |
12
+ | `/flow` | `bash <skill>/runner/flow.sh status` | Relay prose `NEXT ->`, dwell, and (past 10 cards) the compact summary; nothing to author. Optional `status --json` prints one `flow_context/v1` object (`v,stage,gate,next_verb,card,dwell,load`) — **display-only**. Hosts MUST NOT dispatch `next_verb` (`next`/`card`/`card-start`/`check`/`fix-gate`/`auto`/`skip`). Default `/flow` stays prose status. |
13
+ | `/flow resume` | `bash <skill>/runner/flow.sh resume` | Read-only session-story; no lock. Optional `resume --json` same closed schema as status; display-only, never exec `next_verb`. FAIL/PASS/Never: SKILL.md STOP + Dispatch. |
14
+ | `/flow next` | `bash <skill>/runner/flow.sh next` | After PASS, compare to `gate-examples.md` (not a second always-on load). FAIL/Never: SKILL.md STOP + Dispatch. |
15
+ | `/flow assess` | `bash <skill>/runner/flow.sh assess` | Fill `flow/00-inspect.md` from EVIDENCE; Brownfield challenge in `gate-rules.md`. |
16
+ | `/flow card` | `bash <skill>/runner/flow.sh card` | Fill per `law/CLAUDE.md`; before coding, `law/CODING.md`. |
17
+ | `/flow card start C-NNN` | `bash <skill>/runner/flow.sh card start C-NNN` | Optional in-flight mark (`cards/.inflight`); does not touch gated `status:`. |
18
+ | `/flow card done C-NNN` | `bash <skill>/runner/flow.sh card done C-NNN` | CLI `done` under the same rules as `check`; then semantic review. |
19
+ | `/flow check C-NNN` | `bash <skill>/runner/flow.sh check C-NNN` | After PASS, semantic card review (`law/CLAUDE.md`). FAIL/Never: SKILL.md STOP + Dispatch. |
20
+ | `/flow gate <stage>` (or `--card C-NNN`) | `bash <skill>/runner/flow.sh gate <stage\|--card C-NNN>` | Read-only mechanical scan; relay findings. `next`/`check` own progression. |
21
+ | `/flow contract` | `bash <skill>/runner/flow.sh contract` | Advisory client base-URL vs served-path drift; confirm on the running app. |
22
+ | `/flow tokens` | `bash <skill>/runner/flow.sh tokens` | Advisory DESIGN.md token unused/mismatch; dated amendment if intentional. |
23
+ | `/flow coherence` | `bash <skill>/runner/flow.sh coherence` | Advisory version-field drift; semantic contradictions stay a human challenge. |
24
+ | `/flow consistency` | `bash <skill>/runner/flow.sh consistency` | Advisory PRD FRn coverage; then `gate-rules.md` cross-artifact passes. |
25
+ | `/flow constitution` | `bash <skill>/runner/flow.sh constitution` | Advisory constitution form + markers; then `gate-rules.md`. Not a `next` gate. |
26
+ | `/flow clarify` | `bash <skill>/runner/flow.sh clarify` | List leftover Open-decision boxes; write-back `references/clarify.md`. Not a `next` gate. |
27
+ | `/flow converge` | `bash <skill>/runner/flow.sh converge [--file <payload>]` | Assess vs plan per `references/converge.md`; present the findings table first. |
28
+ | `/flow eval [--stage 01\|02\|05\|card] [--fixture <id>] [--n 3] [--timeout <s>]` | `bash <skill>/runner/flow.sh eval [...]` | Billable; live mode skips if `claude` absent. `--replay` does not inherit that SKIP. See `references/gate-eval.md`. |
29
+ | `/flow eval --report` | `bash <skill>/runner/flow.sh eval --report` | Offline; relay last complete batch + drift. See `references/gate-eval.md`. |
30
+ | `/flow eval --replay` | `bash <skill>/runner/flow.sh eval --replay` | Keyless replay; missing/stale fixtures exit 1. Verdicts never count toward the eval floor. |
31
+ | `/flow project-type <web\|cli\|library\|skill>` | `bash <skill>/runner/flow.sh project-type [t]` | Set/read type per `references/project-types.md`. Confirm before planning. |
32
+ | `/flow usage [--global\|--prune]` | `bash <skill>/runner/flow.sh usage [...]` | Relay local JSONL analytics; `--prune` caps the log. Nothing to author. |
33
+ | `/flow skip <stage> --reason ...` | `bash <skill>/runner/flow.sh skip <stage> --reason ...` | Advance only with matching `DEBT.md`. Security-class: operator-only HALT. |
34
+ | `/flow debt add\|list` | `bash <skill>/runner/flow.sh debt add\|list` | Record/list skips in `DEBT.md`. Security-class is operator-authored only. |
35
+ | `/flow design <file>` | `bash <skill>/runner/flow.sh design <file>` | Advisory DESIGN.md mechanical check; pair `design-review-checklist.md` for UI cards. |
36
+ | `/flow harness <args>` | `bash <skill>/runner/flow.sh harness <args>` | Passthrough to the durable-layer CLI; visible output + real exit. Use `recall` to read back. |
37
+ | `/flow doctor` | `bash <skill>/runner/flow.sh doctor` | Relay FAIL as the fix list. Read-only. |
38
+ | `/flow promote <file>` | `bash <skill>/runner/flow.sh promote <file>` | Copy playbook into `~/.claude/flow/playbooks` for cross-project `recall`. |
39
+ | `/flow mode teach` | `bash <skill>/runner/flow.sh mode teach` | Confirm; host gatekeeps, operator authors. |
40
+ | `/flow mode work` | `bash <skill>/runner/flow.sh mode work` | Interview once, draft 00-05, pause for scope sign-off; same gates. See `references/mode-work.md`. |
41
+ | `/flow ready` | `bash <skill>/runner/flow.sh ready` | Relay buildable cards; operator dispatches. Confirm allowed-files don't overlap. |
42
+ | `/flow workspace <verb>` | `bash <skill>/runner/flow.sh workspace add\|list\|enter\|remove\|check\|doctor [...]` | Relay worktree isolation output; don't auto-`--force` a `remove`. Advisory. |
43
+ | `/flow auto` | `bash <skill>/runner/flow.sh auto` | Load `references/auto-run.md`. |
41
44
  | `/flow auto stop` | `bash <skill>/runner/flow.sh auto stop` | Clear auto policy; return to warning-only manual path. |
42
- | `/flow attest …` | `bash <skill>/runner/flow.sh attest semantic\|live-verify\|status\|recover …` | Mint/inspect receipts. Must-ask before mint/recover; `attest status` is read-only. |
43
- | `/flow recall` | `bash <skill>/runner/flow.sh recall` | Read back prior knowledge (open debt, recent retro, previous-card scope, harness friction/backlog, playbooks). Run at the START of a stage/card; apply it, don't re-learn known pain. |
44
- | `/flow unlock` | `bash <skill>/runner/flow.sh unlock` | Clear this project's concurrency lock after a crashed/abandoned session. Confirm the other session is really gone first. |
45
- | `/flow retro` | `bash <skill>/runner/flow.sh retro` | Ask the 3 questions; the operator writes the RETRO.md line — never you. |
46
-
47
- ## Behavioral invariants (all commands)
48
- 1. The runner's exit code is ground truth. Don't override it with optimism.
49
- 2. In `teach` mode never tick a box or write an artifact for the operator.
50
- 3. Never set a card `done` without pasted world-state evidence.
51
- 4. Read any file the runner just created before editing it.
52
- 5. Never edit `_templates/` or `runner/flow.sh` during a project run.
53
- 6. Relay failures verbatim (line numbers included) — they are the operator's to-do list.
54
- 7. If the runner reports BLOCKED by another session's lock, STOP and coordinate — never `FLOW_FORCE` past a live session; concurrent runs corrupt the plan. Set `FLOW_SESSION_ID` per session for hard protection.
55
- 8. At the start of a stage or build card, run `/flow recall` first — its output (prior debt / retro / friction / previous-card scope) is context to apply, not noise. `status` shows a one-line memory summary; `card` injects the previous card's scope automatically.
45
+ | `/flow attest …` | `bash <skill>/runner/flow.sh attest semantic\|live-verify\|status\|recover …` | Mint/inspect receipts (`references/attestations.md`). Must-ask before mint/recover. |
46
+ | `/flow recall` | `bash <skill>/runner/flow.sh recall` | Read back prior knowledge; apply at start of a stage/card. |
47
+ | `/flow unlock` | `bash <skill>/runner/flow.sh unlock` | Clear lock after crashed session. Confirm the other session is gone first. |
48
+ | `/flow retro` | `bash <skill>/runner/flow.sh retro` | Ask the 3 questions; operator writes RETRO.md (`law/RETRO.md`). |
49
+
50
+ ## verb-next
51
+
52
+ Table row `/flow next`. After mechanical PASS, `gate-examples.md` (examples; not a second always-on file).
53
+
54
+ ## verb-card
55
+
56
+ Table row `/flow card`. Fill per `law/CLAUDE.md`; before coding, `law/CODING.md`.
56
57
 
57
58
  ## Install-path note
58
- - Project install: `bash .claude/skills/flow/runner/flow.sh <cmd>`
59
- - Global install: `bash ~/.claude/skills/flow/runner/flow.sh <cmd>`
60
- - Override project root: `FLOW_PROJECT_ROOT=/path bash <skill>/runner/flow.sh <cmd>`
59
+
60
+ SKILL.md "Run `flow.sh` first". Windows: `<skill>\runner\flow.cmd <cmd>` (not bare `bash`).
@@ -10,16 +10,18 @@ ask routes through this loop before you consider typing a verb for the operator.
10
10
 
11
11
  1. On any natural-language ask, run `flow.sh status` first (or `resume` when entering a
12
12
  project cold mid-cycle — see SKILL.md dispatch rule 1). **Never guess state.**
13
- `status`/`resume` output is human-readable prose, not a machine token contract — you
14
- (the model) parse it. Reliable on Claude; treat routing on other engines (Codex,
15
- Antigravity/Gemini) as best-effort, not guaranteed.
13
+ Default `status`/`resume` is human-readable prose. Optional `--json` is **display-only**:
14
+ `next_verb` is not executable. Hosts MUST NOT dispatch `next`, `card`, `card-start`,
15
+ `check`, `fix-gate`, `auto`, or `skip` from it. Concierge stays on prose (May-run);
16
+ do not switch the chat entry to `status --json`. Reliable on Claude; treat routing on
17
+ other engines (Codex, Antigravity/Gemini) as best-effort, not guaranteed.
16
18
  2. Look up the closest `intent-class` row in `flow-catalog.tsv` for the parsed state.
17
19
  3. Propose exactly **ONE** next action in plain language. Explain any gate concept in
18
20
  one short sentence the first time it comes up (zero-jargon default — assume the user
19
21
  has never read a flow doc).
20
22
  4. Offer to run it now, using the May-run / Must-ask classification below. A typed verb
21
23
  from the operator always wins — never intercept or reinterpret an explicit
22
- `/flow <verb>` command; dispatch it exactly as SKILL.md's Commands table says.
24
+ `/flow <verb>` command; dispatch it exactly as the `command-dispatch.md` verb row says.
23
25
 
24
26
  ## New-user consent (teach-mode boundary)
25
27
 
@@ -90,7 +92,7 @@ gate discipline exists to prevent.
90
92
  - One proposal at a time — never dump the full verb list on someone who just wants to
91
93
  chat.
92
94
  - Power-user verbs pass through untouched: a typed `/flow next` dispatches exactly as
93
- SKILL.md's Commands table describes, with zero concierge interpretation.
95
+ the `command-dispatch.md` verb row describes, with zero concierge interpretation.
94
96
 
95
97
  ## First-run script (new-user acceptance path)
96
98
 
@@ -17,8 +17,9 @@ Line shape:
17
17
  ## Security-class skips (never silent, never planner-decided)
18
18
  auth · authorization · admin-surface exposure · tenancy · payments · data loss/migration ·
19
19
  removing/weakening validation.
20
- - The OPERATOR explicitly accepts the exposure, in writing, in the DEBT line. You do not
21
- decide it for them.
20
+ - The OPERATOR explicitly accepts the exposure, in writing, in the DEBT line. The host does not
21
+ decide it for them. Children MUST NOT resolve Tier-C, open/close DEBT, or skip — parent/operator
22
+ only. Docs-only; the runner does not refuse child `debt`/`skip` this wave.
22
23
  - In `/flow auto` this is a **Tier-C HALT** — stop and ask.
23
24
  - Closing a run with open security debt requires explicit operator acknowledgment.
24
25
  "Temporary" is one forgotten step from production.
@@ -35,9 +36,23 @@ A run HALTS and reports — never silently continues — on any of:
35
36
  - A Tier-C security-class touch. (above)
36
37
  - A merge conflict during parallel builds (the allowed-files overlap check was gamed —
37
38
  stop and re-plan). (`auto-run.md`)
38
- - `BLOCKED` / `NEEDS_CONTEXT` from a subagent that more context can't resolve.
39
+ - `BLOCKED` / `NEEDS_CONTEXT` from a subagent that more context can't resolve, or a child report missing `STATUS` (treat as BLOCKED).
39
40
 
40
- On halt: state what stopped it, what's done so far, the open debt/blocker, and the 2-4
41
- concrete options for the operator. Let them decide — don't patch around a regression.
41
+ ## Halt report template
42
+
43
+ On halt, emit this block (docs contract; runner does not parse it):
44
+ ```
45
+ whatStopped: <cap | red-after-two-strikes | Tier-C | merge-conflict | child-BLOCKED>
46
+ doneSoFar: <cards/stages complete>
47
+ openDebtOrBlocker: <DEBT line or child blocker>
48
+ options:
49
+ 1. <operator accepts exposure in DEBT.md>
50
+ 2. <re-plan / shrink the card>
51
+ 3. <repair with a fresh scoped brief>
52
+ 4. <stop the run (`flow auto stop`)>
53
+ see auto-run.md AutoDecision
54
+ STATUS: BLOCKED
55
+ ```
56
+ Let the operator pick — don't patch around a regression.
42
57
 
43
58
  See also: `references/attestations.md` for security-class **risk-ack** auto contract (v0.28).
@@ -0,0 +1,10 @@
1
+ ## Stage 00 — Idea
2
+ Mechanical: pitch present, one real person named, no FILL.
3
+ **Challenge:** Is the pitch really 3 sentences (who / pain / what)? Is the named person a
4
+ *real, specific* person or group ("my uncle's 20-unit building"), not "people who..." or
5
+ "users"? Is the pain concrete, not a category?
6
+ - **Offer the forge-idea ritual (opt-in-with-prompt — `native-rituals.md`'s sibling
7
+ `references/forge-idea.md`).** Before drafting the pitch, or when the operator sounds
8
+ unsure, offer to pressure-test the idea through persona interrogation until it
9
+ hardens, proves out, or dies cheaply. Never auto-fired; never a condition this gate
10
+ checks for — a killed idea and a hardened idea both still go through the normal gate.