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,96 @@
1
+ # GENERATED by script/adapter-build.py from plugins/flow/commands/bug/validate.md — do not edit; change the plugin file and run the script.
2
+ description = "Regression test and verification that the bug does not return"
3
+
4
+ prompt = """
5
+ # `/flow:bug:validate`
6
+
7
+ > **gemini adapter — how the Claude Code primitives named below map here.**
8
+ > - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
9
+ > - `Agent <role>` / `Agent general-purpose` / subagents → `@<name>` from `.gemini/agents/`; the name comes from `agents.<role>` in `FLOW.md`, empty or absent → do it in this context.
10
+ > - Parallel fan-out → several `@name` in one turn (sequential in this context if none are configured), capped at `agents.fanout_max` (empty → 4); `agents.fanout_tool` is Claude Code-only, ignore it.
11
+ > - `ScheduleWakeup` / `Monitor` / `/loop` → not available in-session: run one cycle, persist state in `monitor.md`, let the user schedule `gemini -p "<command>"` with cron.
12
+ > - `TaskCreate` → a markdown checklist in the phase artifact.
13
+ > - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
14
+ > - `/model <value>` → the `--model` flag at launch.
15
+ > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcpServers` in `settings.json` (see `settings.snippet.json`).
16
+
17
+ Validate that the fix works and that the bug does not return.
18
+
19
+ ## 1. Pre-flight
20
+
21
+ Read `~/.claude/flow/CORE.gemini.md` first (shared rules: `FLOW.md` step 0, models, autonomy modes and hard gates, how a stop reads, `panel.json`, `00-summary.md`) — skip if you already read it in this session. **Models: the subagents it launches take `models.agents`.**
22
+
23
+ - Read `meta.json` and `00-summary.md`; open in full only `03-investigation.md` (§3 areas with similar risk, and the minimal reproduction) — the testing agent reads it and `04-fix.md` itself. (flow-core §5)
24
+ - Require `fix` in `phases_done`.
25
+ - `size` `XS` → suggest skipping to `/flow:bug:review` unless the user insists.
26
+ - Fix developed in a worktree (`meta.json.worktree` not null) → offer once, do not run it yourself: "run `/flow:work:try <meta.branch>` (switches the main checkout and re-syncs per `git.worktree_resync`); `/flow:work:try --back` to return."
27
+
28
+ ## 2. Work
29
+
30
+ **Mandatory regression test**: launch the `agents.testing` agent from FLOW.md (empty → `Agent general-purpose` with a test-writing role):
31
+
32
+ > Write a test that **fails** before the fix and **passes** after. Read `.claude/work/<TICKET>/03-investigation.md` (minimal reproduction), `04-fix.md` (what was changed). Follow the effective conventions from `FLOW.md` plus the active harness overlay. Report the path of the added test.
33
+
34
+ Then:
35
+ 1. Run only that test with `quality.test_one` from FLOW.md; it must pass.
36
+ 2. Run the full suite with `quality.test` to rule out collateral regressions (in the background if slow).
37
+ 3. DB touched → verify the schema has no unexpected differences (`quality.db_update` or the FLOW.md equivalent, if defined).
38
+ 4. Security or authentication touched → launch the `agents.security` agent from FLOW.md in parallel over the fix files (empty → `Agent general-purpose` with a security role).
39
+
40
+ ## 2.5 Reproduce the original symptom against the running app
41
+
42
+ The regression test proves the fix at the level the test suite can see. A bug reported as a broken
43
+ screen, a wrong redirect or a mangled export is *also* a claim about what a person observes, and a
44
+ green test is not that observation.
45
+
46
+ Read `quality.functional_check` from `FLOW.md` (empty → whatever is available: a browser automation
47
+ tool, a simulator, a CLI that drives the app, an HTTP call). Nothing available, or
48
+ `meta.json.worktree` not null (the runnable environment is in the main checkout) → say so in one
49
+ line and leave it to the user, offering `/flow:work:try <meta.branch>` as §1 already does.
50
+
51
+ Otherwise, run the **minimal reproduction from `03-investigation.md`** against the fixed code and record
52
+ what you observe. `quality.evidence` not `off` → capture it into `.claude/work/<TICKET>/evidence/`:
53
+ the **before** is whatever `03-investigation.md` already captured when the failure was reproduced (that
54
+ is the one moment it exists), the **after** is what you see now. `/flow:bug:ship` attaches both.
55
+
56
+ **Symptom still reproducible → the fix is not done**, whatever the suite says. Report it and stop;
57
+ this is the same gate as a red test.
58
+
59
+ ## 3. Adjacent areas
60
+
61
+ "Areas with similar risk" from `03-investigation.md`: do not fix them here, but verify that **at least they do not have the same active symptom** (quick search for the broken pattern).
62
+
63
+ ## 4. Output
64
+
65
+ `.claude/work/<TICKET>/05-validation.md`:
66
+
67
+ ```markdown
68
+ # Validation {TICKET}
69
+
70
+ ## Regression test
71
+ - Path: `tests/...`
72
+ - Fails before the fix: ✅
73
+ - Passes after the fix: ✅
74
+
75
+ ## Full suite
76
+ - `<quality.test>`: ✅ / ❌ (X failures)
77
+ - `<quality.static_analysis>`: ✅ / ❌
78
+
79
+ ## Symptom reproduction (§2.5)
80
+ - Reproduced against the running app: <yes → gone / yes → still present / not attempted, reason>
81
+ - Evidence: <`evidence/…` before + after, or "none captured, <reason>">
82
+
83
+ ## Adjacent areas
84
+ - Searches done:
85
+ - Other bugs detected: <list to open separate tickets, do NOT fix here. Each one carries an `F<n>` and a `meta.json.followups[]` entry (`kind: "other-bug"`, `source: "validate"`, flow-core §7): `bug:ship` triages them once at Close, so a bug found while validating another one stops depending on whoever remembers this file.>
86
+ ```
87
+
88
+ ## 5. Close
89
+
90
+ - Red test, regressions, **or the original symptom still reproducible in §2.5** → `phase` stays at `fix`; the user iterates. A red gate stops in every mode.
91
+ - Green → `phase = "validate"`, add to `phases_done`; in the same write record `validated_sha` = `git rev-parse HEAD` — the tree the regression test passed on, which `/flow:bug:ship §0` reads. Suggest `/flow:bug:review`.
92
+ - **Other bugs detected become `followups[]` entries** (flow-core §7) when they clear its bar — a reproducible symptom with someone who suffers it, not «this looks fragile» — per the output template.
93
+ - **Stage what the validation taught** (`knowledge.stage` set; silence by default): a mutation that stayed green, a disguise the scenario wore, a fixture that could not produce the case — findings about how this codebase is tested, not about this diff. Same rule and evidence line as the review's Close.
94
+ - Overwrite `00-summary.md` whole (≤15 lines, flow-core §5).
95
+ - **Autonomy handoff** (green only; `autonomy.mode`, flow-core §2): `manual` → propose `/flow:bug:review` with a single `AskUserQuestion`, invoke it only on confirmation; `guided`/`auto` → chain into it in this same turn.
96
+ """
@@ -0,0 +1,251 @@
1
+ # GENERATED by script/adapter-build.py from plugins/flow/commands/doctor.md — do not edit; change the plugin file and run the script.
2
+ description = "What this repo's effective FLOW config says, and whether the environment it assumes exists — CLIs, auth, agents, hooks, MCP, repo state"
3
+
4
+ prompt = """
5
+ # `/flow:doctor`
6
+
7
+ > **gemini adapter — how the Claude Code primitives named below map here.**
8
+ > - `AskUserQuestion` → ask in plain text with numbered options and wait for the reply.
9
+ > - `Agent <role>` / `Agent general-purpose` / subagents → `@<name>` from `.gemini/agents/`; the name comes from `agents.<role>` in `FLOW.md`, empty or absent → do it in this context.
10
+ > - Parallel fan-out → several `@name` in one turn (sequential in this context if none are configured), capped at `agents.fanout_max` (empty → 4); `agents.fanout_tool` is Claude Code-only, ignore it.
11
+ > - `ScheduleWakeup` / `Monitor` / `/loop` → not available in-session: run one cycle, persist state in `monitor.md`, let the user schedule `gemini -p "<command>"` with cron.
12
+ > - `TaskCreate` → a markdown checklist in the phase artifact.
13
+ > - `Skill commit-commands:commit-push-pr` → `git add` · `git commit` · `git push -u origin HEAD` · the `git.cli` CLI (`gh pr create` / `glab mr create`).
14
+ > - `/model <value>` → the `--model` flag at launch.
15
+ > - `knowledge.*` roles → whatever tools `FLOW.md` names there; an MCP tool keeps its name, its server is declared under `mcpServers` in `settings.json` (see `settings.snippet.json`).
16
+
17
+ Read-only. Answers one question: **will the flow actually work in this repo, right now?**
18
+ **Writes nothing, runs nothing with side effects, never fixes anything** — it reports, with the
19
+ one-line fix next to each problem.
20
+
21
+ It answers it in two halves: **what this repo's effective FLOW configuration actually says**
22
+ (§1.5), and **whether the world it assumes exists** — binaries, credentials, agents, hooks, branch
23
+ (§2) — so failures surface here rather than mid-phase. Run it in an unfamiliar repo, after
24
+ changing machines, after `/flow:init`, or when a command failed the way an environment fails.
25
+
26
+ ## 1. Load
27
+
28
+ - Identify the active harness and read the effective configuration exactly as flow-core §0: base
29
+ `FLOW.md`, then its `FLOW.<harness>.md` overlay. Never read another harness's overlay. Both absent
30
+ is **not** an error: say so in one line, check what needs no config (git, hooks, harness, base
31
+ branch, plugin files), and note that `/flow:init` would let this command check the rest.
32
+ - Parse both files by section: `tracker`, `git`, `autonomy`, `quality`, `agents`, `models`, `data`,
33
+ `conventions`, `notes`, `knowledge`, `observability`; merge keys and empty masks per flow-core §0.
34
+ Keep the source of every effective value. Both absent → §1.5 runs with **every** key empty (all
35
+ fallbacks), which is a legitimate and complete answer.
36
+
37
+ ## 1.5 What the configuration says
38
+
39
+ Print this **before** the environment checks: a key nobody set is the commonest reason a check
40
+ below looks broken. Read against `examples/FLOW.template.md` — do not invent keys, and do report
41
+ documented keys absent from the effective configuration (the "empty → fallback" rows).
42
+
43
+ **This was the `config` command until v0.53.0.** One question — *what will the flow do in this repo* —
44
+ had two commands answering different halves of it.
45
+
46
+ ### 1.5.1 Effective config, per section
47
+
48
+ For **every** documented key in `examples/FLOW.template.md`, one row:
49
+
50
+ - **set** → the value and source file (list keys like `git.worktree_resync` or
51
+ `quality.reviewers`: the items). A value overridden by the active overlay names only the active
52
+ value here; do not make the user mentally merge two tables.
53
+ - **empty / absent** → `(empty → <what happens>)`, taken from the key's comment in the template
54
+ (e.g. `quality.test` → "auto-discover from Makefile/npm/composer/Gradle/dotnet/Xcode/Flutter"; `tracker.tool` → "manual paste";
55
+ `agents.security` → "general-purpose with the role"; `git.worktree` → "off / in-place";
56
+ `git.worktree_resync` → "`/flow:work:try` only switches, no re-sync"; `quality.review_depth` →
57
+ "proportional" — the other depths are `light` and `full`). An empty overlay mask says
58
+ `(masked by FLOW.<harness>.md → <what happens>)`. Never leave a reader guessing what an empty key
59
+ does.
60
+
61
+ For `knowledge`, print the four roles resolved with who decided each: the `knowledge` key, or empty with its fallback (`search` → no lookups; `stage` → artifact only; `read_staging` → artifacts; `save` → `KNOWLEDGE.md`). A `domain_memory` section still in the file → one line: *"`domain_memory` is no longer read; name the tools you want under `knowledge`"* — it is retired configuration, not an error.
62
+
63
+ Group by section with a short header each, so it scans as a table; keep set-vs-empty visually
64
+ distinct (e.g. `✓` vs `·`).
65
+
66
+ If any harness-sensitive value (`models.*`, an `agents.<role>`, `agents.fanout_tool`,
67
+ `quality.review_skill`, `quality.reviewers`, or a tool-named `knowledge.*`) comes from the base,
68
+ print one informational line: those values currently apply to every harness without its own
69
+ override. This is valid configuration, not a warning and never a claim that a free-text model name
70
+ is invalid.
71
+
72
+ #### 1.5.2 Resolved models (only if either file has a `models` key)
73
+
74
+ Two keys, both about subagents. Print what each one actually reaches:
75
+
76
+ ```
77
+ agents fable → improvised subagents: review panel members with no named agent, blinded
78
+ auditors, delegated build pieces, the general-purpose challenger
79
+ workers (empty) → fan-out rounds — falls back to `agents`
80
+ ```
81
+
82
+ - State once, plainly: **the main agent's own steps are not covered by either key** — reading the
83
+ ticket, the design, and the single-thread `build`/`fix` run on the model the command was launched
84
+ with, because an agent cannot switch its own model. A phase that wants another one says so at the
85
+ handoff; nothing enforces it.
86
+ - One line: a role set in `agents.*` keeps its own agent definition's model, so a round can mix
87
+ configured and self-declared models.
88
+
89
+ #### 1.5.3 Defaults that keep being used
90
+
91
+ `FLOW.md` is written small on purpose and grows by use (flow-core §0): a phase that resolves an
92
+ empty key in `guided`/`auto` records it rather than asking. This block is where that record is read
93
+ back.
94
+
95
+ Aggregate `defaults_used[]` from every `.claude/work/*/meta.json`, **`_archive/` included**. One row
96
+ per key: the key, the default that was used, in how many works, and the last phase that used it.
97
+ Sort by count, most-used first, and cap the block at the ten busiest keys with a count of the rest.
98
+
99
+ ```
100
+ agents.security general-purpose 4 works last: review
101
+ quality.review_depth proportional 4 works last: review
102
+ data.volumes (none — duel ran schema-only) 2 works last: query
103
+ ```
104
+
105
+ - **Print the line to paste**, per row, so pinning one is a copy: `- security: <agent name>` under
106
+ `## agents`. This command writes nothing, here or anywhere.
107
+ - No `defaults_used[]` anywhere (a fresh repo, or every work ran in `manual`) → skip the block
108
+ entirely, no empty table.
109
+ - One line under it: a default used in four works out of four is a decision that has already been
110
+ taken four times; a default used once is not yet worth a key.
111
+
112
+ ### 1.5.4 Problems in the configuration files (flag, do not fix)
113
+
114
+ Report problems, change nothing. Validate the base and active overlay separately, name the file
115
+ that owns each problem, and ignore inactive overlays. An unknown root `FLOW.*.md` file gets one
116
+ warning listing the supported harness names because no command will read it. **Scope: these files.**
117
+ Whether the world they describe exists —
118
+ CLIs installed *and authenticated*, agents discoverable, hooks executable, the MCP reachable, the
119
+ base branch resolvable — is §2 below; flag the key here, check the world there, never both.
120
+
121
+ - **Fan-out and cost ceilings**: `agents.fanout_max` must be a positive integer; else flag and note
122
+ the default `4` applies. `agents.budget_max` must be a non-negative integer (`0` = no ceiling);
123
+ else flag and note the default `12`. **Both absent → say so as a finding, not a pass**: the review
124
+ chain is the plugin's most expensive command and these are its only brake, so report the effective
125
+ numbers and where to lower them. `budget_max` under the count of reviewers `quality.review_skill`
126
+ or `quality.reviewers` defines → flag: the panel alone will exhaust the command's budget and every
127
+ later phase gets skipped for cost. `agents.fanout_tool` names a harness tool, not an agent: set
128
+ but not exposed by this harness → note the fan-out falls back to plain parallel subagents (not an
129
+ error).
130
+ - **Models**: `models.*` values are **free text for the harness** — never flag a model name as
131
+ invalid, never suggest a "better" one, never invent a default. Report only: a key outside
132
+ `agents` / `workers` (flag — a typo, it will be ignored; the retired `study` / `code` / `test` /
133
+ `review` keys get one line saying they are no longer read and that `agents` covers the subagents
134
+ they used to name), and whether this harness can set a model per subagent (if not, every value
135
+ degrades to inheritance).
136
+ - **Coherence**: `git.worktree` is `ask`/`always` with `git.worktree_path` empty → note the default
137
+ `.worktrees/{branch}` applies. `git.host` and `git.cli` disagree → flag. Whether the declared
138
+ commands, agents and MCP exist here is §2.1-§2.3.
139
+ - **Tracker transitions**: any of `tracker.start_cmd` / `done_cmd` / `abandon_cmd` set while
140
+ `tracker.tool` is `none`/empty → flag (no ticket to move). `start_cmd` references `{ASSIGNEE}` with
141
+ both `tracker.assignee` and `git.assignee` empty → note the token won't substitute. `git.host` is
142
+ `github`/`gitlab` and `done_cmd` is set → note it is usually redundant with `Closes #N` auto-close
143
+ (harmless). These `*_cmd` run best-effort and never block.
144
+ - **Data access**: `data.explain_cmd` / `schema_cmd` / `sandbox_cmd` / `seed_cmd` are commands, not
145
+ agents — never run them; "does the binary exist" is §2.1. Whole `data` section empty →
146
+ not an error: note the query duel in `/flow:work:query` and `/flow:feat:review §3.6` runs on the
147
+ schema alone and declares what it cannot prove; if the repo clearly talks to a database (a
148
+ migrations directory, an ORM config), say what filling `volumes` alone buys — a reviewer arguing
149
+ about real row counts. `explain_cmd`/`schema_cmd` without a `{QUERY}` / `{TABLE}` token → flag
150
+ (nothing substituted). Anything that looks like the **production** database → flag loudly: these
151
+ run against a development or throwaway database, never a live one.
152
+ - **Autonomy**: `autonomy.mode` empty → note it defaults to `manual` (every phase stops and, at the
153
+ end, proposes the next command as a one-click confirmation — never runs it unconfirmed). Set →
154
+ echo the mode and remind that the hard gates stop and ask in every mode and that `guided`/`auto`
155
+ never ask about the flow's own mechanics or anything already decided (both lists: `flow:flow-core`
156
+ skill §2). Unrecognized value → flag, `manual` assumed.
157
+
158
+ ## 2. Checks
159
+
160
+ Each check reports exactly one of **ok** (silent, see §3) · **missing** (the flow will degrade or
161
+ refuse) · **degraded** (it runs, quietly worse than the config promises), plus the fix.
162
+
163
+ ### 2.1 Tools
164
+
165
+ - **Git host CLI** (`git.cli`, or auto-detected from `git.host`): installed (`command -v gh glab tea az`)
166
+ **and authenticated** — `gh auth status`, `glab auth status` (installed-but-unauthenticated fails
167
+ at `ship`, push refused). Read-only, no network writes.
168
+ - **Tracker CLI** (`tracker.tool`): installed, and authenticated where the tool can say so cheaply.
169
+ Missing → ticket reads become manual paste; `start`/`done`/`abandon` transitions silently do nothing.
170
+ - **Quality commands** (`quality.test`, `test_one`, `static_analysis`, `style_fix`, `db_update`,
171
+ `db_diff`) and `git.worktree_resync` entries: `make <target>` → the target exists
172
+ in the `Makefile`; npm/composer script → the script exists; `./gradlew <task>`/`mvn`/`dotnet`/`xcodebuild`/`flutter` → the wrapper or binary is on `PATH` (or in the repo, for `gradlew`); otherwise the binary is on `PATH`.
173
+ **Never run them** — presence only. Declared-but-absent → flag loudly: `validate` gates on it.
174
+ - **Data-access commands** (`data.explain_cmd`, `schema_cmd`, `sandbox_cmd`, `seed_cmd`): the binary
175
+ or `make` target exists. Never run them, never touch a database. Absent section → not a failure:
176
+ note that `/flow:work:query` argues from the schema alone and says what it cannot prove.
177
+
178
+ ### 2.2 Agents
179
+
180
+ - Every **role** set in `agents.*` (not `fanout_max` / `fanout_tool` — not agents), plus
181
+ `quality.reviewers` and `quality.review_skill`: discoverable in `~/.claude/agents`, the repo's
182
+ `.agents/agents`, or a plugin. Report each missing name and that it falls back to `general-purpose`
183
+ (a skill: skipped) — a panel missing agents reviews less and still reports a clean pass.
184
+ - Harness cannot set a model per subagent → note that every `models.*` value degrades to inheritance.
185
+
186
+ ### 2.3 Knowledge sources
187
+
188
+ - For each `knowledge.*` role that is set (`search` may list several): an `mcp__*` tool → it is exposed **this session**; a shell command → its binary is on `PATH`. Unreachable → the steps using that role degrade quietly (no lookup, findings stay in artifacts, `KNOWLEDGE.md`) — say so, with the role.
189
+ - A `domain_memory` section still present → say in one line that nothing reads it any more and show the four `knowledge` lines that replace it.
190
+ - No role set while a knowledge MCP *is* available (`mcp__domain-memory__*`, `mcp__codegraph__*`, or any tool whose name says search/knowledge/memory) → say so once. Nothing is broken; the source is unused.
191
+
192
+ ### 2.4 Hooks
193
+
194
+ - The plugin's hooks are installed, **executable**, and the version this plugin expects: the push
195
+ guard (`hooks/block-push-to-master.sh`) and the session-start update notice. Check the `+x` bit,
196
+ not just the path — a hook without it fails open and silently.
197
+ - `hooks.json` parses; a syntax error there disables the hooks without a word.
198
+
199
+ ### 2.5 Repo state
200
+
201
+ - The base branch (`git.default_base`, empty → detected) **exists and is reachable** from here
202
+ (`git rev-parse --verify`, `git ls-remote --exit-code`).
203
+ - Worktree coherence: `git.worktree` is `ask`/`always` → `git.worktree_path` resolves and its parent
204
+ is writable; no stale entries in `git worktree list` (directory gone). Flag, never prune — pruning
205
+ is `/flow:work:clean`.
206
+ - The repo has a remote, and the current branch's upstream is not another branch's.
207
+ - `.claude/work/` exists or can be created, and every `meta.json` in it parses (an unparseable one
208
+ is a work the flow refuses to `resume`).
209
+ - `.claude/work/` is git-ignored or deliberately tracked — **info line, not a failure**: say which
210
+ it is, and that `/flow:init` offers to ignore it.
211
+
212
+ ### 2.6 Harness
213
+
214
+ - The tool named in `agents.fanout_tool` is exposed by this harness. Absent → the fan-out falls
215
+ back to plain parallel subagents (the portable path, not an error).
216
+ - `agents.fanout_max` is a positive integer (else the default `4` applies) and `agents.budget_max`
217
+ a non-negative integer (`0` = no ceiling; else the default `12` applies). Report both effective
218
+ numbers with the count of panel members `quality.review_skill`/`quality.reviewers` defines, so
219
+ the widest command's cost is visible before it is paid, not after.
220
+ - The `flow-core` skill file exists under the plugin root: `~/.claude/flow/CORE.gemini.md`.
221
+ Missing → every phase command runs without its shared rules; fix: reinstall or update the plugin.
222
+
223
+ ## 3. Output
224
+
225
+ §1.5 always prints — it is the answer to half the question. Start it with one line naming the files
226
+ that produced the effective configuration (`FLOW.md + FLOW.codex.md`, `FLOW.md only`, active
227
+ overlay only, or defaults only). **The checks are quiet on success**:
228
+ one line per check that is *not* ok, grouped by the six areas above, plus a summary line. Close with
229
+ `N effective keys set (O from overlay), M using fallbacks, K warnings` from §1.5 next to the
230
+ findings count.
231
+
232
+
233
+
234
+ ```
235
+ flow doctor — 3 findings
236
+
237
+ Tools ✗ glab installed but not authenticated → glab auth login
238
+ Agents ✗ quality.reviewers: security-auditor not found → review runs with 4 of 5, silently
239
+ Hooks · block-push-to-master.sh is not executable → chmod +x (fails open: pushes to main are NOT blocked)
240
+
241
+ ok: tracker CLI · quality commands · knowledge sources · base branch · worktrees · harness
242
+ ```
243
+
244
+ - Everything ok → one line naming what was checked.
245
+ - Order findings by **what they cost**, not by area: fails-open-and-silent (a dead hook, a missing
246
+ reviewer) outranks fails-loudly (a missing CLI).
247
+ - Every finding carries its fix on the same line: a config fix points at the source file and key or
248
+ `/flow:init`; a machine fix gives the command to run.
249
+ - Never fix, install, or write to either FLOW config file; never chain into another command —
250
+ including in `guided`/`auto`. This command exists to be trusted as read-only.
251
+ """