flow-workflows 0.62.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.
Files changed (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +320 -0
  3. package/adapters/README.md +128 -0
  4. package/adapters/codex/AGENTS.md +82 -0
  5. package/adapters/codex/CORE.md +522 -0
  6. package/adapters/codex/PRIMITIVES.md +64 -0
  7. package/adapters/codex/README.md +126 -0
  8. package/adapters/codex/config.snippet.toml +88 -0
  9. package/adapters/codex/skills/flow-bug-fix/SKILL.md +171 -0
  10. package/adapters/codex/skills/flow-bug-investigate/SKILL.md +216 -0
  11. package/adapters/codex/skills/flow-bug-postmortem/SKILL.md +98 -0
  12. package/adapters/codex/skills/flow-bug-review/SKILL.md +190 -0
  13. package/adapters/codex/skills/flow-bug-ship/SKILL.md +187 -0
  14. package/adapters/codex/skills/flow-bug-start/SKILL.md +212 -0
  15. package/adapters/codex/skills/flow-bug-validate/SKILL.md +99 -0
  16. package/adapters/codex/skills/flow-doctor/SKILL.md +254 -0
  17. package/adapters/codex/skills/flow-feat-build/SKILL.md +350 -0
  18. package/adapters/codex/skills/flow-feat-design/SKILL.md +399 -0
  19. package/adapters/codex/skills/flow-feat-plan/SKILL.md +165 -0
  20. package/adapters/codex/skills/flow-feat-review/SKILL.md +350 -0
  21. package/adapters/codex/skills/flow-feat-ship/SKILL.md +417 -0
  22. package/adapters/codex/skills/flow-feat-start/SKILL.md +289 -0
  23. package/adapters/codex/skills/flow-feat-validate/SKILL.md +216 -0
  24. package/adapters/codex/skills/flow-init/SKILL.md +153 -0
  25. package/adapters/codex/skills/flow-news/SKILL.md +57 -0
  26. package/adapters/codex/skills/flow-next/SKILL.md +55 -0
  27. package/adapters/codex/skills/flow-work-README/SKILL.md +247 -0
  28. package/adapters/codex/skills/flow-work-abandon/SKILL.md +103 -0
  29. package/adapters/codex/skills/flow-work-clean/SKILL.md +228 -0
  30. package/adapters/codex/skills/flow-work-daily/SKILL.md +114 -0
  31. package/adapters/codex/skills/flow-work-green/SKILL.md +162 -0
  32. package/adapters/codex/skills/flow-work-query/SKILL.md +169 -0
  33. package/adapters/codex/skills/flow-work-respond/SKILL.md +176 -0
  34. package/adapters/codex/skills/flow-work-resume/SKILL.md +123 -0
  35. package/adapters/codex/skills/flow-work-status/SKILL.md +127 -0
  36. package/adapters/codex/skills/flow-work-try/SKILL.md +94 -0
  37. package/adapters/codex/skills/flow-work-watch/SKILL.md +223 -0
  38. package/adapters/gemini/CORE.md +521 -0
  39. package/adapters/gemini/PRIMITIVES.md +117 -0
  40. package/adapters/gemini/README.md +149 -0
  41. package/adapters/gemini/commands/flow/bug/fix.toml +168 -0
  42. package/adapters/gemini/commands/flow/bug/investigate.toml +213 -0
  43. package/adapters/gemini/commands/flow/bug/postmortem.toml +95 -0
  44. package/adapters/gemini/commands/flow/bug/review.toml +187 -0
  45. package/adapters/gemini/commands/flow/bug/ship.toml +184 -0
  46. package/adapters/gemini/commands/flow/bug/start.toml +209 -0
  47. package/adapters/gemini/commands/flow/bug/validate.toml +96 -0
  48. package/adapters/gemini/commands/flow/doctor.toml +251 -0
  49. package/adapters/gemini/commands/flow/feat/build.toml +347 -0
  50. package/adapters/gemini/commands/flow/feat/design.toml +396 -0
  51. package/adapters/gemini/commands/flow/feat/plan.toml +162 -0
  52. package/adapters/gemini/commands/flow/feat/review.toml +347 -0
  53. package/adapters/gemini/commands/flow/feat/ship.toml +414 -0
  54. package/adapters/gemini/commands/flow/feat/start.toml +286 -0
  55. package/adapters/gemini/commands/flow/feat/validate.toml +213 -0
  56. package/adapters/gemini/commands/flow/init.toml +150 -0
  57. package/adapters/gemini/commands/flow/news.toml +54 -0
  58. package/adapters/gemini/commands/flow/next.toml +52 -0
  59. package/adapters/gemini/commands/flow/work/README.toml +244 -0
  60. package/adapters/gemini/commands/flow/work/abandon.toml +100 -0
  61. package/adapters/gemini/commands/flow/work/clean.toml +225 -0
  62. package/adapters/gemini/commands/flow/work/daily.toml +111 -0
  63. package/adapters/gemini/commands/flow/work/green.toml +159 -0
  64. package/adapters/gemini/commands/flow/work/query.toml +166 -0
  65. package/adapters/gemini/commands/flow/work/respond.toml +173 -0
  66. package/adapters/gemini/commands/flow/work/resume.toml +120 -0
  67. package/adapters/gemini/commands/flow/work/status.toml +124 -0
  68. package/adapters/gemini/commands/flow/work/try.toml +91 -0
  69. package/adapters/gemini/commands/flow/work/watch.toml +220 -0
  70. package/adapters/gemini/settings.snippet.json +11 -0
  71. package/adapters/hermes/CORE.md +522 -0
  72. package/adapters/hermes/PRIMITIVES.md +86 -0
  73. package/adapters/hermes/README.md +145 -0
  74. package/adapters/hermes/config.snippet.yaml +63 -0
  75. package/adapters/hermes/skills/flow-bug-fix/SKILL.md +171 -0
  76. package/adapters/hermes/skills/flow-bug-investigate/SKILL.md +216 -0
  77. package/adapters/hermes/skills/flow-bug-postmortem/SKILL.md +98 -0
  78. package/adapters/hermes/skills/flow-bug-review/SKILL.md +190 -0
  79. package/adapters/hermes/skills/flow-bug-ship/SKILL.md +187 -0
  80. package/adapters/hermes/skills/flow-bug-start/SKILL.md +212 -0
  81. package/adapters/hermes/skills/flow-bug-validate/SKILL.md +99 -0
  82. package/adapters/hermes/skills/flow-doctor/SKILL.md +254 -0
  83. package/adapters/hermes/skills/flow-feat-build/SKILL.md +350 -0
  84. package/adapters/hermes/skills/flow-feat-design/SKILL.md +399 -0
  85. package/adapters/hermes/skills/flow-feat-plan/SKILL.md +165 -0
  86. package/adapters/hermes/skills/flow-feat-review/SKILL.md +350 -0
  87. package/adapters/hermes/skills/flow-feat-ship/SKILL.md +417 -0
  88. package/adapters/hermes/skills/flow-feat-start/SKILL.md +289 -0
  89. package/adapters/hermes/skills/flow-feat-validate/SKILL.md +216 -0
  90. package/adapters/hermes/skills/flow-init/SKILL.md +153 -0
  91. package/adapters/hermes/skills/flow-news/SKILL.md +57 -0
  92. package/adapters/hermes/skills/flow-next/SKILL.md +55 -0
  93. package/adapters/hermes/skills/flow-work-README/SKILL.md +247 -0
  94. package/adapters/hermes/skills/flow-work-abandon/SKILL.md +103 -0
  95. package/adapters/hermes/skills/flow-work-clean/SKILL.md +228 -0
  96. package/adapters/hermes/skills/flow-work-daily/SKILL.md +114 -0
  97. package/adapters/hermes/skills/flow-work-green/SKILL.md +162 -0
  98. package/adapters/hermes/skills/flow-work-query/SKILL.md +169 -0
  99. package/adapters/hermes/skills/flow-work-respond/SKILL.md +176 -0
  100. package/adapters/hermes/skills/flow-work-resume/SKILL.md +123 -0
  101. package/adapters/hermes/skills/flow-work-status/SKILL.md +127 -0
  102. package/adapters/hermes/skills/flow-work-try/SKILL.md +94 -0
  103. package/adapters/hermes/skills/flow-work-watch/SKILL.md +223 -0
  104. package/adapters/install.sh +99 -0
  105. package/adapters/opencode/CORE.md +521 -0
  106. package/adapters/opencode/PRIMITIVES.md +118 -0
  107. package/adapters/opencode/README.md +113 -0
  108. package/adapters/opencode/commands/flow-bug-fix.md +169 -0
  109. package/adapters/opencode/commands/flow-bug-investigate.md +214 -0
  110. package/adapters/opencode/commands/flow-bug-postmortem.md +96 -0
  111. package/adapters/opencode/commands/flow-bug-review.md +188 -0
  112. package/adapters/opencode/commands/flow-bug-ship.md +185 -0
  113. package/adapters/opencode/commands/flow-bug-start.md +210 -0
  114. package/adapters/opencode/commands/flow-bug-validate.md +97 -0
  115. package/adapters/opencode/commands/flow-doctor.md +252 -0
  116. package/adapters/opencode/commands/flow-feat-build.md +348 -0
  117. package/adapters/opencode/commands/flow-feat-design.md +397 -0
  118. package/adapters/opencode/commands/flow-feat-plan.md +163 -0
  119. package/adapters/opencode/commands/flow-feat-review.md +348 -0
  120. package/adapters/opencode/commands/flow-feat-ship.md +415 -0
  121. package/adapters/opencode/commands/flow-feat-start.md +287 -0
  122. package/adapters/opencode/commands/flow-feat-validate.md +214 -0
  123. package/adapters/opencode/commands/flow-init.md +151 -0
  124. package/adapters/opencode/commands/flow-news.md +55 -0
  125. package/adapters/opencode/commands/flow-next.md +53 -0
  126. package/adapters/opencode/commands/flow-work-README.md +245 -0
  127. package/adapters/opencode/commands/flow-work-abandon.md +101 -0
  128. package/adapters/opencode/commands/flow-work-clean.md +226 -0
  129. package/adapters/opencode/commands/flow-work-daily.md +112 -0
  130. package/adapters/opencode/commands/flow-work-green.md +160 -0
  131. package/adapters/opencode/commands/flow-work-query.md +167 -0
  132. package/adapters/opencode/commands/flow-work-respond.md +174 -0
  133. package/adapters/opencode/commands/flow-work-resume.md +121 -0
  134. package/adapters/opencode/commands/flow-work-status.md +125 -0
  135. package/adapters/opencode/commands/flow-work-try.md +92 -0
  136. package/adapters/opencode/commands/flow-work-watch.md +221 -0
  137. package/adapters/opencode/opencode.json +8 -0
  138. package/bin/cli.mjs +222 -0
  139. package/package.json +43 -0
  140. package/plugins/flow/.claude-plugin/plugin.json +21 -0
  141. package/plugins/flow/CHANGELOG.md +1744 -0
  142. package/plugins/flow/examples/FLOW.template.md +324 -0
@@ -0,0 +1,324 @@
1
+ # FLOW configuration
2
+
3
+ Configuration for the `flow` plugin for this repository. The `/flow:*` commands read this
4
+ file in their step 0. Delete what does not apply; **empty or absent = auto-discover or
5
+ default behavior** (each command states what it does when a value is missing).
6
+
7
+ Use this shape for the shared base `FLOW.md` and for an optional sparse harness overlay:
8
+ `FLOW.claude.md`, `FLOW.codex.md`, `FLOW.opencode.md`, `FLOW.gemini.md`, or `FLOW.hermes.md`. The
9
+ active overlay is
10
+ read after the base. A key present in it replaces the base value; a present-but-empty key masks the
11
+ base and selects the normal empty fallback; an absent key inherits the base. Lists replace whole
12
+ lists. `conventions` is additive: overlay lines follow the base lines and both apply. Existing repos
13
+ with only `FLOW.md` behave exactly as before. Unknown `FLOW.*.md` names are ignored.
14
+
15
+ Place it at the repo root. This is **personal config, not team config** — it mixes repo facts
16
+ (tracker, quality commands, conventions) with your own flow preferences (autonomy mode, the
17
+ tools/agents you have installed, review depth, assignee), so what one developer wants differs from
18
+ the next and the same file on another machine may point at agents or an MCP that isn't there. It
19
+ holds **no secrets** (those stay in your credential store), but **add `/FLOW.md` and
20
+ `/FLOW.*.md` to your `.gitignore`** — `/flow:init` offers to do this for you. A team that wants to
21
+ share the repo-fact subset can still commit it deliberately.
22
+
23
+ ## tracker
24
+ How tickets are identified and read.
25
+
26
+ - `prefix:` # e.g. `PROJ-`. Empty = no prefix / free-form ticket.
27
+ - `tool:` # `acli` (Jira) | `gh` (GitHub issues) | `glab` (GitLab issues) | `linear` | `none` (manual). Empty = none.
28
+ - `view_cmd:` # optional, command to view a ticket. `{TICKET}` is substituted. e.g.:
29
+ # Jira: `acli jira workitem view {TICKET}`
30
+ # GitHub: `gh issue view {TICKET}`
31
+ # GitLab: `glab issue view {TICKET}`
32
+ - `comments_cmd:` # optional, command to read the ticket's COMMENT THREAD. `{TICKET}` substituted. The `view_cmd`s above
33
+ # print only the description, and the thread is where scope changes and the contracts published by a
34
+ # sibling repo live (`/flow:feat:ship` §6.3 posts them as a comment) — so `start` reads it too. e.g.:
35
+ # GitHub: `gh issue view {TICKET} --comments`
36
+ # GitLab: `glab issue view {TICKET} --comments`
37
+ # Empty = derived from `tool` for `gh`/`glab`; for Jira/`linear` the commands try the native way once
38
+ # and, if there is none, warn in one line that the thread was not read (never silently assume it was empty).
39
+ - `assignee:` # tracker username/account for the `{ASSIGNEE}` token in the commands below. Empty = fall back to `git.assignee`.
40
+ - `start_cmd:` # optional, run when a work STARTS (`/flow:feat:start`, `/flow:bug:start`) to move the ticket to "in progress" and/or assign it. `{TICKET}` and `{ASSIGNEE}` substituted; chain two calls with `&&`. Empty = do not transition on start. e.g.:
41
+ # Jira: `acli jira workitem transition {TICKET} "In Progress" && acli jira workitem assign {TICKET} {ASSIGNEE}`
42
+ - `done_cmd:` # optional, run when a work SHIPS and is merged (`phase` reaches `done`) to move the ticket to "done". `{TICKET}` substituted. Empty = do not transition. **Leave empty on GitHub/GitLab** — the `Closes #N` in the MR/PR body already auto-closes the issue on merge. e.g.:
43
+ # Jira: `acli jira workitem transition {TICKET} "Done"`
44
+ - `abandon_cmd:` # optional, run when a work is ABANDONED (`/flow:work:abandon`) to move the ticket to a cancelled / won't-do state. `{TICKET}` substituted. Empty = do not transition. e.g.:
45
+ # Jira: `acli jira workitem transition {TICKET} "Won't Do"`
46
+ #
47
+ # The three `*_cmd` transitions are **best-effort, idempotent, and gated**: outward-facing, so
48
+ # they are asked before running in `autonomy.mode: manual` and run automatically in `guided`/`auto`;
49
+ # a failure or an already-in-state ticket warns and continues, never blocks. They run only in
50
+ # ticket mode with a real tracker id (skipped for ticket-less / local-only works).
51
+ - `debt_log:` # optional. Versioned Markdown file where `ship` appends the follow-ups that are recorded but never asked about (flow-core §7): `tooling` gaps in the repo's own
52
+ # machinery — a test that does not bind, a guard with slack, stale prose — plus whatever the skeptic ruled real-but-nobody's-next-task and whatever sat above
53
+ # `followup_ask_max`. Empty = `docs/DEBT.md`, created on first use. One file per repo.
54
+ - `followup_ask_max:` # how many parked findings one finished work may turn into questions at `ship`'s Close (flow-core §7). Empty = 2. `0` = never ask, log everything. A ticket where
55
+ # seven phases each notice something is not seven problems: with 3+ candidates a skeptic tries to refute each one (burden of proof on the finding), the ones
56
+ # without a named subject are dropped, and only the strongest survivors up to this number are put to you. Raise it if you would rather triage than be handed a log.
57
+
58
+ ## git
59
+ Branch and Pull/Merge Request conventions.
60
+
61
+ - `host:` # `gitlab` | `github` | `bitbucket` | `azure` | `gitea`. Sets both the terminology and the default CLI:
62
+ # | host | term | default CLI |
63
+ # |-------------|------|-------------|
64
+ # | `gitlab` | MR | `glab` |
65
+ # | `github` | PR | `gh` |
66
+ # | `bitbucket` | PR | (none) |
67
+ # | `azure` | PR | `az` |
68
+ # | `gitea` | PR | `tea` |
69
+ # Empty = inferred from the remote. A self-hosted forge takes the name of what it is (a Forgejo
70
+ # instance is `gitea`), not of its domain.
71
+ - `cli:` # Empty = the default for `host` in the table above. Set it for a self-hosted forge, a wrapper, or
72
+ # a host with no CLI of its own (`bitbucket`), where the commands degrade to plain git and say so.
73
+ - `default_base:` # base for new branches, e.g. `origin/master` or `origin/main`.
74
+ - `branch_pattern:` # e.g. `{PREFIX}{TICKET}-{slug}`. `{slug}` in English, kebab-case. Empty = `{PREFIX}{TICKET}-{slug}`.
75
+ - `assignee:` # user to assign the MR/PR to. Empty = do not assign.
76
+ - `squash:` # `true` | `false` (squash-before-merge).
77
+ - `request_sections:` # MR/PR description sections, one per line with `- `. Empty = free-form.
78
+ - `predeploy_gate:` # `true` if this repo runs schema SQL manually on the server BEFORE deploying and wants to block the MR/PR until done. Empty/false = no Pre-deploy section or blocking thread.
79
+ - `worktree:` # `off` (default) | `ask` | `always`. Whether `/flow:feat:start` & `/flow:bug:start` create the new branch as a git worktree instead of switching in place. `ask` = prompt each time; `always` = always; `off`/empty = never (in-place, current behavior).
80
+ - `worktree_path:` # path template for the worktree dir. `{branch}` and `{repo}` are substituted. Empty with `worktree`≠`off` = `.worktrees/{branch}` at the repo root (git-ignore it). e.g. `.worktrees/{branch}` or `../{repo}.worktrees/{branch}`.
81
+ - `worktree_resync:` # commands `/flow:work:try` runs after switching the main checkout to a branch (and again on `--back`), to re-sync the environment (e.g. DB schema, assets). One command per line with `- `, run in order. Empty = `/flow:work:try` only does the git switch, no env re-sync. e.g.:
82
+ # - make database-update
83
+ # - make frontend
84
+
85
+ ## autonomy
86
+ How much the flow advances on its own vs. stopping to ask you.
87
+
88
+ - `mode:` # `manual` (default) | `guided` | `auto`. Empty = `manual`.
89
+ # manual — every phase stops at each decision point and, at the end, proposes the
90
+ # next command as a one-click confirmation (you accept to advance, it is
91
+ # never typed for you and never runs without your confirmation).
92
+ # guided — the command resolves low-risk, unambiguous decisions itself with the
93
+ # recommended default (recorded in the phase artifact) instead of asking,
94
+ # still asks at genuine decision points, and chains into the next command
95
+ # automatically (no advance confirmation).
96
+ # auto — as guided, plus auto-resolves the remaining decision points with sensible
97
+ # (recorded) defaults, chaining phases without pausing.
98
+ # HARD GATES stop and ask in EVERY mode, no exceptions: any push or MR/PR (ship),
99
+ # branch creation with an ambiguous base, DB schema changes/migrations, a review
100
+ # with high-severity findings, and the business brief confirmed just before the
101
+ # first edit in `build`/`fix`.
102
+ # NEVER ASKED in guided/auto (decided, recorded, left behind): flow mechanics
103
+ # (panels, challengers, how many reviewers), WIP commits, continuing a train when
104
+ # the train's next MR/PR in `guided`/`auto`, size confirmation, and anything already decided
105
+ # and recorded — only new contradicting evidence reopens a settled decision.
106
+
107
+ ## quality
108
+ Repo commands for quality gates, whatever the stack — `make test`, `./gradlew test`, `dotnet test`,
109
+ `xcodebuild test`, `flutter test`, `cargo test`… **Empty = the command auto-discovers** (Makefile, npm/composer
110
+ scripts, Gradle, dotnet, Xcode, Flutter, pyproject, Cargo, go.mod) and reports what it uses.
111
+
112
+ - `test:` # e.g. `make test`. Several suites in one repo (a backend and a frontend, an app and a service) chain into this one key:
113
+ # `make test && make test-frontend`. `/flow:init` writes it that way when it detects more than one.
114
+ - `test_one:` # e.g. `make test-filter filter={FILTER}` · `./gradlew test --tests {FILTER}` · `dotnet test --filter {FILTER}` (`{FILTER}` is substituted)
115
+ - `static_analysis:` # e.g. `make phpstan-ci` · `./gradlew lint` · `dotnet build -warnaserror` · `flutter analyze`
116
+ - `style_fix:` # e.g. `make cs-fixer-changed` · `./gradlew ktlintFormat` · `dotnet format` · `swift-format -i -r Sources`
117
+ - `db_update:` # e.g. `make database-update` (empty if not applicable)
118
+ - `db_diff:` # command that shows pending schema SQL, e.g. `make database-compare` (for pre-deploy SQL)
119
+ - `functional_check:` # how to drive the running app so `/flow:*:validate` can prove an acceptance criterion itself
120
+ # instead of dictating it to you: a base URL, a simulator destination, a login or seed command,
121
+ # whatever this repo needs. Free text, read by the agent alongside what `/flow:doctor` detects
122
+ # (a browser automation tool, a simulator, a CLI that drives the app). Empty = the agent uses
123
+ # what it can detect; with nothing available every UI/end-to-end criterion stays `needs-manual`
124
+ # and you verify it, exactly as before. A criterion is NEVER marked proven on reasoning alone.
125
+ - `bench_cmd:` # how this repo exercises ONE entry point and reports time and memory, so `/flow:*:validate`
126
+ # can run it on the merge base and on HEAD and compare. `{TARGET}` is substituted with the
127
+ # route, command, job or consumer under test. e.g. `make bench TARGET={TARGET}` ·
128
+ # `hyperfine --runs 3 './app {TARGET}'` · `/usr/bin/time -v ./bin/console {TARGET}`.
129
+ # Empty = no benchmarking; the phase says so once and skips. Never invented: with no command
130
+ # here and none discoverable, a timing claim is not made at all.
131
+ - `evidence:` # `on` (default) | `off`. Whether `/flow:*:validate` captures evidence (screenshots, response
132
+ # bodies, log excerpts) into `.claude/work/<work>/evidence/` and `/flow:*:ship` attaches it to
133
+ # the MR/PR description. `off` skips both; the criteria table is unaffected.
134
+ - `review_depth:` # how much of the review panel runs AND at what effort, scaled by work size + risk, in `/flow:*:review`. `proportional` (default) | `full` | `light`.
135
+ # proportional → XS: only the built-in `code-review` (medium effort), no panel. S: built-in `code-review` (high) plus
136
+ # the panel ONLY if the diff touches a sensitive surface (see `sensitive_paths` below); otherwise built-in only.
137
+ # M: built-in (high) + full panel. L: built-in (xhigh) + full panel. A sensitive surface raises the built-in
138
+ # one effort tier (medium→high→xhigh→max) and forces the panel — risk, not just size, buys depth.
139
+ # light → only the built-in `code-review` (or `review_skill`) at medium effort on every size: no panel, no
140
+ # reinforcements, no skeptic fan-out. A sensitive surface still gets the proportional tier. The
141
+ # cheapest honest review — the artifact records the tier and the cost line.
142
+ # full → always run the built-in `code-review` (xhigh) + the full panel regardless of size (pre-0.7 behavior).
143
+ # Empty = `proportional`. Effort ladder low<medium<high<xhigh<max applies where the tool exposes it (Claude Code); adapters
144
+ # for other tools read "higher effort" as maximum thoroughness for L-sized or sensitive-surface work.
145
+ - `sensitive_paths:` # paths THIS repo knows are sensitive and the generic list would not guess, one glob per line with `- `.
146
+ # Read by `/flow:*:review §2.0`: a diff touching one raises the built-in review a tier and forces the
147
+ # panel, whatever its size. **Additive** — the generic categories always apply (authentication/
148
+ # authorization, secrets/credentials, payments/billing, personal or otherwise sensitive data, a public
149
+ # API/contract shape, a DB migration/schema change); this key widens them, never narrows them, so a repo
150
+ # that names its own surfaces does not thereby lose the ones it never thought about.
151
+ # Use it for what is sensitive HERE and nowhere in that list: an internal event or message contract
152
+ # consumers depend on, a pricing or entitlement table, a consent flow, a feature-flag resolver.
153
+ # e.g. `- src/**/Domain/Event/**` · `- src/**/*Message.php` · `- config/flags/**` · `- app/pricing/**`
154
+ # Precision comes from the diff, not from a shorter list: a path only makes a change ELIGIBLE, and a
155
+ # change that moves observability alone — log level, channel, message text, a metric, a comment — does
156
+ # not buy the bump; it gets the review its size earned.
157
+ # NOT the place for query changes: `/flow:*:review §3.6` already duels every added or modified query at
158
+ # every size, `sensitive_paths` empty or not.
159
+ - `respond_max_rounds:` # how many rounds of `/flow:work:respond` one MR/PR gets before the command stops and hands the
160
+ # negotiation back to you instead of going round again. Empty = `3`. `0` = no ceiling (not
161
+ # recommended: what the ceiling prevents is a loop re-arguing a settled thread while nobody reads).
162
+ - `review_skill:` # orchestrating skill for the code-review panel in /flow:*:review. Empty = no skill; see `reviewers` below.
163
+ - `reviewers:` # if `review_skill` is empty: list of agents that run in parallel as a review panel (one per line with `- `). Empty with no skill = only the built-in `code-review`.
164
+
165
+ ## agents
166
+ Role→agent map for steps that delegate to a specialist (`design`, `investigate`,
167
+ `validate`, `plan`, `build`, `fix`, `watch`, and the area reinforcements in `review`). Agents
168
+ must exist and be discoverable on the machine (`~/.claude/agents`, `.agents/agents` in the repo, or
169
+ another plugin) — this only states **which** one to invoke, it does not create it. **Empty role = the command uses
170
+ `Agent general-purpose` with the role in the prompt, or skips the step if it was optional.**
171
+
172
+ - `architecture:` # design/layers/architecture
173
+ - `persistence:` # DB/ORM/mappings/migrations/queries
174
+ - `api:` # endpoints/DTOs/routes/HTTP contracts
175
+ - `performance:` # N+1, indexes, hot paths, out-of-process calls, load
176
+ - `queues:` # queues, dead-letter, workers
177
+ - `security:` # threats, authentication, sensitive data
178
+ - `frontend:` # components/UI
179
+ - `testing:` # tests and coverage, whichever suite the diff touches
180
+
181
+ Two keys below configure the **parallel fan-out** (approach panel in `design` §1.5.3, hypothesis
182
+ sweep in `investigate` §3.A, finding verification in `review`) instead of naming an agent. The
183
+ fan-out runs as plain parallel subagents — the primitive every harness has.
184
+
185
+ - `fanout_max:` # max subagents per parallel round. Empty = 4. Lower it to keep the flow cheap; what a cap drops is always reported
186
+ - `budget_max:` # max subagents ONE command run may launch in total, summed over every round (flow-core §6). Empty = 12. `0` = no ceiling
187
+ # (not recommended). `fanout_max` bounds a round; this bounds the command — `/flow:*:review` composes a panel, area
188
+ # reinforcements, a coverage sweep that relaunches reviewers, a query duel, two blinded audits and one skeptic per
189
+ # ambiguous finding, each inside its own cap and the command an order of magnitude past what anyone asked for.
190
+ # Each command declares which phase it gives up first, so a truncation is deterministic; the artifact's `Cost:` line
191
+ # reports `spent/budget` and names every phase the ceiling skipped. Both ceilings count AGENTS, not findings or files:
192
+ # grouping three findings into one brief is intended, launching one agent per finding past the cap is a breach
193
+ - `fanout_tool:` # orchestration tool to run the fan-out through (e.g. `Workflow` on Claude Code). Empty = plain parallel subagents, portable across harnesses. Harness-specific: ignored if unavailable
194
+
195
+ Two more govern **what a delegated agent owes you back** (flow-core §6). They apply to every brief a
196
+ command composes itself — the panel in `review`, the delegated pieces in `build`, the agents in
197
+ `validate` — not to the prompts this plugin already writes out with their own cap.
198
+
199
+ - `report_max_words:` # word cap every brief you write for a subagent carries. Empty = 250. Not a style rule: a report too long for the harness to carry is truncated in transit and reaches you as silence
200
+ - `stall_after_minutes:` # a fan-out agent past this with nothing written to its named path is stopped, its brief split in two, and relaunched. Empty = 25 —
201
+ # a guess from one session, not a measurement. Lower it if your rounds are short and you would rather relaunch early; raise it
202
+ # for agents that legitimately read for half an hour before writing
203
+
204
+ ## models
205
+ Which model the subagents run with. **Every key is optional and empty by default = the subagent
206
+ inherits the model you launched the command with** (today's behavior — the flow changes nothing).
207
+
208
+ Model names are normally harness-owned: put them in the active `FLOW.<harness>.md` so a Claude
209
+ model is never handed to Codex, or vice versa. Keeping them in `FLOW.md` remains supported and
210
+ makes them the default for every harness; an empty overlay key masks that default when needed.
211
+
212
+ Values are **free text, passed straight to your harness**. flow never validates a model name, never
213
+ ranks them, and never picks one for you — it only **says** what a wide fan-out is about to inherit
214
+ when these keys are empty, so an unpriced default is at least a visible one: whatever your harness accepts (`opus`, `sonnet`, `fable`,
215
+ `gemini-2.5-pro`, a provider id) is what belongs here. A harness that cannot switch model per
216
+ subagent ignores the value and the step says so once, in one line.
217
+
218
+ - `agents:` # every subagent a command improvises: the review panel members with no named agent, the
219
+ # blinded auditors, the delegated pieces of a `build`, the `general-purpose` challenger.
220
+ # Empty = they inherit the model the command runs on.
221
+ - `workers:` # the parallel fan-out rounds ONLY: approach panel (design §1.5.3), hypothesis sweep
222
+ # (investigate §3.A), finding skeptics (review §6 / §5), the deferred-work skeptic
223
+ # (ship). Empty = falls back to `agents`, then to what the command runs on.
224
+
225
+ **Two keys, not one per kind of step.** There used to be five — `study`, `code`, `test`, `review` —
226
+ named after phases. They promised a granularity no harness delivers: the main agent cannot switch
227
+ its own model, so the phases those keys named ran on whatever you launched, and the value only ever
228
+ reached the subagents. These two name what can actually be set.
229
+
230
+ Two limits, stated here because they bound what these keys can promise:
231
+
232
+ **An agent cannot switch its own model.** Reading the ticket, writing the design, and writing the
233
+ code in `build`/`fix` (single-thread on XS/S/M) happen on the thread you launched, whatever is
234
+ written here — which is exactly why there is no key for them. A phase that wants another model says
235
+ so in one line at the handoff (`/model <value>`) and **continues**: flow mechanics, so never a
236
+ question in `guided`/`auto` and never a gate.
237
+
238
+ **A named agent keeps its own model.** If `agents.<role>` names a real agent, that agent's own
239
+ definition wins — you configured it, and it is not overridden from two places. `/flow:doctor` prints
240
+ both keys resolved, with who decided each.
241
+
242
+ ## data
243
+ How this repo lets you look at a query's **plan** instead of arguing about it. Read by
244
+ `/flow:work:query` (the query duel), `/flow:feat:review §3.6`, `/flow:bug:review §3.5`,
245
+ `/flow:work:respond §4.G`, and the measurement in `/flow:feat:validate`. **Every key is optional
246
+ and empty by default**: with the section empty the duel still runs, on the schema alone, and says
247
+ in its verdict what it could not prove — it never reports an unmeasured plan as if it were measured.
248
+
249
+ These commands run against a **development or throwaway database, never production**. Creating,
250
+ seeding or dropping any database is a hard gate in every autonomy mode.
251
+
252
+ - `explain_cmd:` # get a query's execution plan. `{QUERY}` is substituted. e.g.:
253
+ # MySQL over compose: `docker compose exec -T mysql mysql mydb -e "EXPLAIN ANALYZE {QUERY}"`
254
+ # PostgreSQL: `psql -d mydb -c "EXPLAIN (ANALYZE, BUFFERS) {QUERY}"`
255
+ # Empty = plans cannot be obtained; the duel is schema-only and declares it.
256
+ - `schema_cmd:` # show a table's REAL definition — column types, lengths, charset/collation, indexes and their
257
+ # column order. `{TABLE}` is substituted. This is what settles "is there an index that serves this
258
+ # order, in this direction?" and "can this join use an index at all?" — two questions the ORM
259
+ # mapping cannot answer, because the mapping is what the code believes, not what the database has. e.g.:
260
+ # MySQL: `docker compose exec -T mysql mysql mydb -e "SHOW CREATE TABLE {TABLE}"`
261
+ # PostgreSQL: `psql -d mydb -c "\d+ {TABLE}"`
262
+ - `sandbox_cmd:` # create a THROWAWAY database to measure in, isolated from anything the project uses. Empty = no
263
+ # sandbox: measure on the development database (noting its row counts may pick another plan) or stay
264
+ # schema-only. e.g. `docker compose exec -T mysql mysql -e "CREATE DATABASE {NAME}"`
265
+ - `seed_cmd:` # populate the sandbox with a data set shaped like production — the DISTRIBUTION is the point, not the
266
+ # total (one key with thousands of rows next to twenty thousand with one; the real batch size; heavy
267
+ # columns actually filled). `{NAME}` substituted. Empty = no seeding.
268
+ - `volumes:` # free text: the real sizes of the hot tables — rows, growth, worst key. The cheapest key in this
269
+ # section and worth filling even when the others are empty: it is what stops a reviewer agent from
270
+ # arguing against a volume it invented. e.g.:
271
+ # - downloads: ~40M rows, +1.5M/month, worst mail_hash ~3k rows
272
+ # - file_views: ~40M rows, `data` column averages 1KB, p99 21KB
273
+
274
+ ## conventions
275
+ Free text: conventions the commands must respect when writing/reviewing code
276
+ (layers, patterns, prohibitions). Empty = no specific conventions.
277
+
278
+ Lines mostly arrive here by being said: a correction you make mid-work that would apply to any
279
+ ticket in this repo is offered to this section once, at `ship`'s Close (flow-core §8). Nothing is
280
+ written without that question.
281
+
282
+ <!-- e.g.: DDD (Domain/Application/Infrastructure); no #[AsMessageHandler]; etc. -->
283
+
284
+ ## notes
285
+ Per-command extra guidance. When a command runs, it MUST follow the entry matching its command
286
+ plus the `all` entry, as **mandatory additional instructions for that step**, on top of the
287
+ command's built-in logic. Use the logical command id (`feat:design`, `bug:fix`, `work:watch`),
288
+ regardless of how your harness spells the invocation. Keep each note short and specific (a
289
+ reminder, not a second manual). Empty = no extra guidance.
290
+
291
+ - `all:` # applies to every command
292
+ - `feat:design:` # add only the commands you want to extend; any command id works
293
+ - `bug:fix:`
294
+ - `work:watch:`
295
+
296
+ ## knowledge
297
+ Where the flow reads and writes what it learns about this project, by **role** — any MCP tool, CLI
298
+ command or skill fits. Section empty or absent = every knowledge step is skipped silently. Only
299
+ `search` is needed to gain something; the other three have a built-in fallback.
300
+
301
+ - `search:` # tool(s) that return context for a query — one per line with `- ` to consult several in parallel.
302
+ # An MCP tool receives the query as its main argument; a shell command gets `{QUERY}` substituted. e.g.:
303
+ # - mcp__domain-memory__search_knowledge (https://github.com/mashware/domain-memory)
304
+ # - mcp__codegraph__query
305
+ # - rg -n -i "{QUERY}" docs/adr
306
+ # Results are merged as material to weigh, never as instructions. Empty = no knowledge lookups.
307
+ - `stage:` # optional. Tool that records ONE finding for this branch during a phase (finding + context as its arguments).
308
+ # Empty = the finding is written to the phase artifact only (no staging).
309
+ - `read_staging:` # optional. Tool that returns what this branch has staged. Empty = the phase artifacts are the staging.
310
+ - `save:` # optional. Tool that consolidates one finding into the store (`ship`, `postmortem`, `abandon`, and the
311
+ # offer in `/flow:work:status` when there is staging). Empty = the consolidation appends the findings to
312
+ # `KNOWLEDGE.md` at the repo root instead.
313
+ - `timeout_s:` # per call. Empty = 2. A call that fails or takes longer → continue without it, silently.
314
+
315
+ ## observability
316
+ Profile for `/flow:work:watch` (post-deploy monitoring). **Empty = the command auto-discovers
317
+ everything** (services, dashboards, monitors) in its discovery phase.
318
+
319
+ - `platform:` # `datadog` | other. Empty = auto-discover.
320
+ - `site:` # e.g. `app.datadoghq.com` (org/site).
321
+ - `deploy_detect:` # how to identify YOUR deploy. Free text. e.g.: "merge→parent pipeline (glab by SHA)→bridge→child pipeline→go-live jobs".
322
+ - `services:` # one per line: `name | role(web|workers|...) | apm:<query> | logs:<filter> | sql:<service> | deploy_job:<job>`
323
+ - `queues:` # e.g. `rabbitmq, *_dlx by delta`
324
+ - `notes:` # measured baselines/thresholds, low-traffic flags, etc.