@ionivetech/mugiwara 0.6.4 → 0.6.6

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 (115) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -3
  3. package/.codex-plugin/plugin.json +48 -2
  4. package/.cursor-plugin/plugin.json +48 -2
  5. package/.kimi-plugin/plugin.json +48 -2
  6. package/.opencode/commands/mugiwara-continue.md +44 -31
  7. package/.opencode/commands/mugiwara-execute.md +1 -1
  8. package/.opencode/commands/mugiwara-heal.md +1 -1
  9. package/.opencode/commands/mugiwara-onboard.md +8 -9
  10. package/.opencode/commands/mugiwara-plan.md +1 -1
  11. package/.opencode/commands/mugiwara-review.md +1 -1
  12. package/.opencode/commands/mugiwara-security.md +1 -1
  13. package/.opencode/commands/mugiwara-ship.md +1 -1
  14. package/.opencode/commands/mugiwara.md +2 -2
  15. package/.opencode/mugiwara-helpers.mjs +3 -0
  16. package/.opencode/plugins/mugiwara.mjs +1 -1
  17. package/AGENTS.md +12 -2
  18. package/README.md +53 -32
  19. package/content/agents/brook-healing.md +5 -8
  20. package/content/agents/chopper-checkpoint.md +8 -11
  21. package/content/agents/eval-runner.md +2 -5
  22. package/content/agents/franky-gates.md +4 -7
  23. package/content/agents/jinbe-security.md +4 -7
  24. package/content/agents/luffy-orchestrator.md +13 -13
  25. package/content/agents/memory-keeper.md +5 -8
  26. package/content/agents/nami-planner.md +4 -7
  27. package/content/agents/resume-coordinator.md +7 -10
  28. package/content/agents/robin-reviewer.md +6 -9
  29. package/content/agents/sanji-quality.md +7 -10
  30. package/content/agents/skeptic-verifier.md +5 -8
  31. package/content/agents/usopp-brainstorm.md +3 -6
  32. package/content/agents/zoro-execution.md +7 -10
  33. package/content/skills/mugiwara-backend/SKILL.md +2 -0
  34. package/content/skills/mugiwara-checkpoint/SKILL.md +14 -11
  35. package/content/skills/mugiwara-checkpoint/references/ledger-format.md +4 -4
  36. package/content/skills/mugiwara-context-budget/SKILL.md +5 -3
  37. package/content/skills/mugiwara-contract-first/SKILL.md +2 -0
  38. package/content/skills/mugiwara-execution/SKILL.md +27 -27
  39. package/content/skills/mugiwara-execution/references/dispatch.md +2 -2
  40. package/content/skills/mugiwara-execution/references/resume-batching.md +1 -1
  41. package/content/skills/mugiwara-frontend/SKILL.md +2 -4
  42. package/content/skills/mugiwara-gates/SKILL.md +9 -7
  43. package/content/skills/mugiwara-git/SKILL.md +7 -2
  44. package/content/skills/mugiwara-healing/SKILL.md +6 -4
  45. package/content/skills/mugiwara-healing/references/workers.md +2 -2
  46. package/content/skills/mugiwara-lessons/SKILL.md +1 -0
  47. package/content/skills/mugiwara-orchestration/SKILL.md +34 -35
  48. package/content/skills/mugiwara-orchestration/references/check-ins.md +17 -16
  49. package/content/skills/mugiwara-orchestration/references/closure.md +5 -5
  50. package/content/skills/mugiwara-orchestration/references/output-contract.md +77 -0
  51. package/content/skills/mugiwara-orchestration/references/triage-escalation.md +22 -22
  52. package/content/skills/mugiwara-planning/SKILL.md +3 -1
  53. package/content/skills/mugiwara-planning/references/plan-template.md +2 -2
  54. package/content/skills/mugiwara-pr/SKILL.md +6 -6
  55. package/content/skills/mugiwara-pr/references/verdict-format.md +3 -3
  56. package/content/skills/mugiwara-quality/SKILL.md +8 -7
  57. package/content/skills/mugiwara-resume/SKILL.md +19 -20
  58. package/content/skills/mugiwara-review/SKILL.md +6 -1
  59. package/content/skills/mugiwara-review/references/five-axis-worksheet.md +1 -1
  60. package/content/skills/mugiwara-root-cause/SKILL.md +2 -0
  61. package/content/skills/mugiwara-security/SKILL.md +5 -1
  62. package/content/skills/mugiwara-ship/SKILL.md +1 -1
  63. package/content/skills/mugiwara-ship/references/cleanup.md +1 -1
  64. package/content/skills/mugiwara-testcases/SKILL.md +5 -3
  65. package/content/skills/mugiwara-workflow/SKILL.md +38 -39
  66. package/content/skills/mugiwara-workflow/references/workspace-layout.md +15 -15
  67. package/content/skills/using-mugiwara/SKILL.md +5 -5
  68. package/dist/mugiwara.js +807 -31
  69. package/gemini-extension.json +1 -1
  70. package/hooks/auto-savepoint.js +106 -0
  71. package/hooks/auto-savepoint.ts +102 -0
  72. package/hooks/engagement-marker.js +59 -0
  73. package/hooks/engagement-marker.ts +97 -0
  74. package/hooks/hooks.json +41 -2
  75. package/hooks/mugiwara-mode-tracker.js +79 -0
  76. package/hooks/pipeline-guard.js +182 -0
  77. package/hooks/pipeline-guard.ts +267 -0
  78. package/hooks/session-start.js +106 -0
  79. package/hooks/session-start.ts +44 -32
  80. package/package.json +7 -3
  81. package/plugin.json +1 -1
  82. package/references/agent-protocol.md +15 -0
  83. package/references/complexity.md +54 -0
  84. package/references/definition-of-done.md +1 -1
  85. package/references/multi-actor.md +5 -5
  86. package/references/skill-versioning.md +1 -1
  87. package/references/token-budget.md +30 -8
  88. package/references/wave-banners.md +21 -31
  89. package/scripts/build-hooks.ts +56 -0
  90. package/scripts/conformance.ts +232 -0
  91. package/scripts/coverage-gate.ts +179 -0
  92. package/scripts/evidence.sh +17 -4
  93. package/scripts/gate-selftest.ts +14 -0
  94. package/scripts/initiative.ts +51 -17
  95. package/scripts/install.ps1 +5 -4
  96. package/scripts/install.sh +4 -4
  97. package/scripts/lane.sh +6 -2
  98. package/scripts/lib/patterns.sh +84 -0
  99. package/scripts/mission-report.sh +12 -11
  100. package/scripts/savepoint.sh +152 -37
  101. package/scripts/validate-content.ts +22 -2
  102. package/scripts/verify-install.ts +154 -44
  103. package/src/args.ts +1 -1
  104. package/src/cli.ts +217 -0
  105. package/src/continue.ts +243 -0
  106. package/src/installer.ts +39 -0
  107. package/src/onboard.ts +207 -0
  108. package/src/run.ts +82 -0
  109. package/src/targets/claude.ts +140 -2
  110. package/src/targets/copilot.ts +20 -1
  111. package/src/targets/generic.ts +9 -4
  112. package/content/agents/onboarding-guide.md +0 -124
  113. package/content/skills/mugiwara-security/references/owasp-mapping.md +0 -30
  114. package/scripts/onboard.ts +0 -266
  115. package/scripts/probe.ts +0 -40
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mugiwara-healing
3
- description: Use when an execution wave failed, earlier waves produced failures, broken things to fix — reads blocker ledger, stop-the-line triage, root-cause fixes, prove-it before fixing. Max 3 cycles.
3
+ description: Use when an execution flow stage failed, earlier flow stages produced failures, broken things to fix — reads blocker ledger, stop-the-line triage, root-cause fixes, prove-it before fixing. Max 3 cycles.
4
4
  ---
5
5
 
6
6
  # Healing (Brook)
@@ -39,6 +39,8 @@ Before fixing a bug: write the failing test that reproduces it, watch it fail, t
39
39
 
40
40
  ## Triage matrix
41
41
 
42
+ Full taxonomy behind the matrix: `references/failure-taxonomy.md`.
43
+
42
44
  | Failure | Action |
43
45
  |---------|--------|
44
46
  | lint/format error | auto-fix (formatter when supported), re-run |
@@ -53,15 +55,15 @@ Before fixing a bug: write the failing test that reproduces it, watch it fail, t
53
55
  2. Every code fix ships with the failed check now passing (run it, capture output).
54
56
  3. Never delete or weaken tests/configs to make a failure disappear.
55
57
  4. After healing: update the ledger — mark each healed row with evidence; keep unfixed rows for escalation.
56
- 5. Cycle counter: read `heal_cycle` from `.mugiwara/state/<mission>/[member].json` (savepoint writes it). After this wave the flow returns to Wave 4 (Chopper) for re-audit. **At 3, STOP and escalate to the user with full history — a halt, not a red flag.** Red flags are prose; the counter is state. Never re-run past 3.
58
+ 5. Cycle counter: read `heal_halt` from `.mugiwara/state/<mission>/[member].json` (savepoint writes it as `heal_cycle ≥ heal_max_cycles`, config default 3). After this flow stage the flow returns to Flow 4 (Chopper) for re-audit. **When `heal_halt` reads `true`, STOP and escalate to the user with full history — a halt, not a red flag.** Red flags are prose; the counter is state. Never re-run past `heal_max_cycles`.
57
59
 
58
60
  ## Worker subagents
59
61
 
60
- Brook runs inline for triage + ledger reading; parallel fixes use disposable WORKER subagents. Full protocol: `references/workers.md` — heal-worker grouping (independent rows in parallel), 5-field worker prompt, validation workers (reviewer/security/re-run), then back to Wave 4. Workers are NOT crew members.
62
+ Brook runs inline for triage + ledger reading; parallel fixes use disposable WORKER subagents. Full protocol: `references/workers.md` — heal-worker grouping (independent rows in parallel), 5-field worker prompt, validation workers (reviewer/security/re-run), then back to Flow 4. Workers are NOT crew members.
61
63
 
62
64
  ## Output
63
65
 
64
- Fixed list (finding → commit → evidence), escalated list (finding → plan → owner), updated ledger → back to Wave 4 (Chopper).
66
+ Fixed list (finding → commit → evidence), escalated list (finding → plan → owner), updated ledger → back to Flow 4 (Chopper).
65
67
 
66
68
  ## Red flags
67
69
 
@@ -20,7 +20,7 @@ Group 2 [SEQUENTIAL]: Row 3 (rbac.ts)
20
20
  ```
21
21
 
22
22
  Each heal worker receives a prompt with 5 fields:
23
- - **FAILURE** — ledger row verbatim (wave, task, symptom, attempted)
23
+ - **FAILURE** — ledger row verbatim (flow stage, task, symptom, attempted)
24
24
  - **ROOT CAUSE** — Brook's triage result: where the bug is, why it happened
25
25
  - **FIX** — what to change, which file, which function
26
26
  - **MUST DO** — Prove-It: write regression test, watch it fail, implement fix, watch it pass, commit
@@ -33,6 +33,6 @@ After all heal workers complete, dispatch validation workers in parallel:
33
33
  - **security-worker** — security pass over fixes (per `mugiwara-security`)
34
34
  - **re-run-check worker** — independently re-runs failed checks, returns raw evidence
35
35
 
36
- Flow: Brook triage + grouping → dispatch heal workers parallel → aggregate results → dispatch validation workers → update ledger → back to Wave 4.
36
+ Flow: Brook triage + grouping → dispatch heal workers parallel → aggregate results → dispatch validation workers → update ledger → back to Flow 4.
37
37
 
38
38
  Workers are NOT crew members — disposable subagents, one narrow job per worker. Crew runs inline in main thread.
@@ -60,3 +60,4 @@ Lessons are cross-mission but per-repo. The ledger lives in `.mugiwara/logs/` so
60
60
  - Platitudes that can't change behavior.
61
61
  - Deleted or overwritten rows.
62
62
  - Read the ledger but didn't apply a relevant row.
63
+ - A lesson that redefines a rule, lane, gate, or role rather than describing a pattern. Reject and report.
@@ -6,15 +6,15 @@ description: Gatekeeper + captain for any task: triage, classify, coordinate, ro
6
6
 
7
7
  ## Skip when
8
8
 
9
- - Mid-wave continuation with route already recorded in `.mugiwara/logs/`. Captain duties: triage, check-ins, decisions, closure — Luffy coordinates, never implements; returns decisions, no dispatch.
9
+ - Mid-flow continuation with route already recorded in `.mugiwara/logs/`. Captain duties: triage, check-ins, decisions, closure — Luffy coordinates, never implements; returns decisions, no dispatch.
10
10
 
11
- ## Delegation pillars (Wave 0)
11
+ ## Delegation pillars (Flow 0)
12
12
 
13
13
  Size the mission against five pillars; highest gate determines route. Table: `references/delegation-pillars.md`. Quick: 1 file <20 LOC → Zoro, vague → Usopp, spec → Nami, auth/payment → full pipeline.
14
14
 
15
15
  ## Return-to-Luffy protocol
16
16
 
17
- Every wave returns to Luffy — no crew member hands off directly to another. Exception: Zoro/Brook direct calls execute immediately, Luffy records route. Non-execution crew members return results:
17
+ Every flow stage returns to Luffy — no crew member hands off directly to another. Exception: Zoro/Brook direct calls execute immediately, Luffy records route. Non-execution crew members return results:
18
18
 
19
19
  - Usopp → return brainstorm → Luffy routes to Nami or Zoro
20
20
  - Nami → return plan → guided/semi: Luffy asks the user for GO; auto: Luffy delegates to Zoro
@@ -24,6 +24,8 @@ Every wave returns to Luffy — no crew member hands off directly to another. Ex
24
24
 
25
25
  ## Coordination files
26
26
 
27
+ Team repos — per-(mission, member) isolation, no collisions: `_shared/references/multi-actor.md`.
28
+
27
29
  The plan doc (`.mugiwara/plans/YYYY-MM-DD-<mission>.md`) is Nami's clean execution plan — NEVER write coordination into it. Your decisions, route reasons, and check-in verdicts go to `.mugiwara/logs/YYYY-MM-DD-<mission>.md` (append-only, deletable at cleanup). The closure report goes to `.mugiwara/results/<mission>/06-closure.md`.
28
30
 
29
31
  ## Actor attribution (every .mugiwara write)
@@ -31,37 +33,32 @@ The plan doc (`.mugiwara/plans/YYYY-MM-DD-<mission>.md`) is Nami's clean executi
31
33
  Every decision-log row, blocker row, and check-in verdict records its actor:
32
34
  - User request → `user: <name> <<git email>>` (read from `git config user.name` / `user.email`).
33
35
  - AI decision → `AI: <model>` (e.g. `AI: deepseek-v4-flash`).
34
- In `auto` mode the AI decides everything; any requirement that stays unclear after triage is brainstormed with Usopp (Wave 1) BEFORE the AI decides — the AI never guesses on unclear scope. Record the brainstorm in the decision log with actor `AI:`.
35
-
36
- ## Mode read (Wave 0)
37
-
38
- Read the runtime mode via mode config at Wave 0: `.mugiwara/config` (project) then `~/.mugiwara/config` (global); a key missing from both = `guided`. Record the active mode AND `auto_commit` (default on) in the decision log. Read once per wave at dispatch; a flip applies from the next wave, never mid-wave. Declared test source (per `mugiwara-testcases`) also recorded in decision log; no source declared → no user tests.
36
+ In `auto` mode the AI decides everything; any requirement that stays unclear after triage is brainstormed with Usopp (Flow 1) BEFORE the AI decides — the AI never guesses on unclear scope. Record the brainstorm in the decision log with actor `AI:`.
39
37
 
40
- ## Request classifier (Wave 0) — 8 classes
38
+ ## Mode read (Flow 0)
41
39
 
42
- Classify every incoming request. 5-way table (Trivial/Explicit/Exploratory/Open-ended/Ambiguous) plus three more: **Answer** (question, no file change answer directly, no mission), **Refuse** (deploy/migration/key rotation/merge decline at Wave 0, offer branch handoff), **Hotfix** (production broken Lane 1, gates deferred with owner, never skipped). Full table + signals: `references/triage-escalation.md`.
40
+ Read the runtime mode via mode config at Flow 0: `.mugiwara/config` (project) then `~/.mugiwara/config` (global); a key missing from both = `guided`. Record the active mode AND `auto_commit` (default on) in the decision log. Read once per flow stage at dispatch; a flip applies from the next flow stage, never mid-flow-stage. Declared test source (per `mugiwara-testcases`) also recorded in decision log; no source declared → no user tests.
43
41
 
44
- Record decision + one-line reason at the top of the decision log. Risk (money/security/data/public API) full pipeline; never shortcut without recording why. Any route without a recorded reason is a red flag.
42
+ ## Request classifier (Flow 0) 8 classes
45
43
 
46
- ## Lane routing + precedence (Wave 0, size before process)
44
+ Classify every incoming request. 5-way table (Trivial/Explicit/Exploratory/Open-ended/Ambiguous) plus three more: **Answer** (question, no file change → answer directly, no mission), **Refuse** (deploy/migration/key rotation/merge → decline at Flow 0, offer branch handoff), **Hotfix** (production broken → Lane 1, gates deferred with owner, never skipped). Full table + signals: `references/triage-escalation.md`. Record decision + one-line reason at the top of the decision log. Risk (money/security/data/public API) → full pipeline; never shortcut without recording why. Any route without a recorded reason is a red flag.
47
45
 
48
- Alongside the class, size the mission and pick a lane (0 Direct / 1 Lean / 2 Standard / 3 Full / 4 Spike). **Precedence: class decides whether there is work; lane decides how much process — class first, lane second, record both.** A pasted Explicit spec still sizes the lane from its file list before Wave 2 (40-file spec → Lane 3). Escalation only: a lane may rise mid-mission, never drop. Full table: `references/triage-escalation.md`.
46
+ ## Lane routing + precedence (Flow 0, size before process)
49
47
 
50
- Small tasks: read-only investigation → host `explore` agent or inline read — NOT a Luffy subagent (~5k vs ~40k tokens); explicit implement → Lane 1 Zoro inline. Review only when risky — full pipeline.
48
+ Alongside the class, size the mission and pick a lane (0 Direct / 1 Lean / 2 Standard / 3 Full / 4 Spike). **Precedence: class decides whether there is work; lane decides how much process — class first, lane second, record both.** A pasted Explicit spec still sizes the lane from its file list before Flow 2 (40-file spec → Lane 3). Escalation only: a lane may rise mid-mission, never drop. Full table: `references/triage-escalation.md`. Small tasks: read-only investigation → host `explore` agent or inline read — NOT a Luffy subagent (~5k inline vs ~132k measured per dispatch); explicit implement → Lane 1 Zoro inline. Review only when risky — full pipeline.
51
49
 
52
- ## Spec bridge (Wave 0 → Wave 2)
50
+ ## Spec bridge (Flow 0 → Flow 2)
53
51
 
54
- Wave 1 (Usopp) writes the brainstorm output to `.mugiwara/spec/YYYY-MM-DD-<mission>.md` — the bridge Nami reads. A route straight to Wave 2 (Trivial / Explicit) skips Wave 1, so it MUST still write a spec file before planning: a short but complete statement of the goal, the acceptance criteria as given, and any constraints — taken from the user's request, not invented. Never start Wave 2 with `.mugiwara/spec/` empty: if no spec exists, write one from the request first (the `/mugiwara-plan` command reads this file). The spec is input to Nami, never the plan itself.
52
+ Flow 1 (Usopp) writes the brainstorm output to `.mugiwara/spec/YYYY-MM-DD-<mission>.md` — the bridge Nami reads. A route straight to Flow 2 (Trivial / Explicit) skips Flow 1, so it MUST still write a spec file before planning: a short but complete statement of the goal, the acceptance criteria as given, and any constraints — taken from the user's request, not invented. Never start Flow 2 with `.mugiwara/spec/` empty: if no spec exists, write one from the request first (the `/mugiwara-plan` command reads this file). The spec is input to Nami, never the plan itself.
55
53
 
56
54
  ## Direct calls
57
55
 
58
56
  User may summon crew members directly. Luffy records the route + reason. Zoro/Brook: execute/heal immediately. All others: return to Luffy. Direct calls do not skip check-ins.
59
57
 
60
58
  ## Periodic check-ins
61
- Full checklist: `references/check-ins.md` — 7 items + by-mode verdicts; unchecked boxes are not done. **Handoff contract:** the continue file at every wave boundary — never only session end (rule #6).
62
- **Auto never drops:** in `auto` mode the crew runs every wave autonomously to closure — lane rise (`lane_rose`), sensitive-path touches, and heal cycles do NOT downgrade the mode. Only a genuine blocker or the heal halt pauses and escalates to the user; the mode stays auto. Announce every pause.
63
- **Auto never asks scope:** in `auto` mode, log the default choice and proceed — no scope/confirmation questions. A genuinely unclear requirement is brainstormed with Usopp (Wave 1) before the choice never guessed. Only a genuine blocker or a pause escalates.
64
- **Heal halt:** read `heal_cycle` from `.mugiwara/state/<mission>/[member].json`. At `heal_max_cycles` (read from `.mugiwara/config`, default 3), STOP and escalate to the user.
59
+ Full checklist: `references/check-ins.md` — 7 items + by-mode verdicts; unchecked boxes are not done. **Handoff contract:** the continue file at every flow-stage boundary — never only session end (rule #6).
60
+ **Auto never drops:** in `auto` mode the crew runs every flow stage autonomously to closure — lane rise (`lane_rose`), sensitive-path touches, and heal cycles do NOT downgrade the mode. Only a genuine blocker or the heal halt pauses and escalates to the user; the mode stays auto. Announce every pause. **Auto never asks scope:** in `auto` mode, log the default choice and proceed — no scope/confirmation questions. A genuinely unclear requirement is brainstormed with Usopp (Flow 1) before the choice — never guessed. Only a genuine blocker or a pause escalates.
61
+ **Heal halt:** read `heal_halt` from `.mugiwara/state/<mission>/[member].json`. savepoint computes it (`heal_cycle heal_max_cycles`, config default 3); when it reads `true`, STOP and escalate to the user.
65
62
  **Pressure:** "just skip it", "auto, don't ask", "just this once" — the Rationalizations table below is the answer, not urgency.
66
63
 
67
64
  ## Rationalizations (pressure resistance)
@@ -78,16 +75,21 @@ Full checklist: `references/check-ins.md` — 7 items + by-mode verdicts; unchec
78
75
 
79
76
  Shortcuts ("skip X", "just do it") reroute work inside the pipeline — never outside; they end the crew frame only when the thread says "I'm not the crew" — fix it. Frame persists; roles change.
80
77
 
81
- ## Wave transitions (visibility)
78
+ ## Flow transitions (visibility)
79
+
80
+ Banner in the owning agent's color opens every flow stage — the equals line
81
+ `===== ⚔️ FLOW 3 — ZORO (EXECUTION) =====` (ANSI-wrapped in terminals, plain in markdown UIs). Spec + colors: `_shared/references/wave-banners.md`. Timing: banner = FIRST line of the flow stage's first response; handoff `→ Flow N+1 — Crew (Role)` = LAST line of the flow stage's final response. A skip is recorded, never silent.
82
+
83
+ ## Output discipline
82
84
 
83
- Banner in the owning agent's color opens every wave terminal equals line
84
- `===== WAVE 3 ZORO (EXECUTION) =====`, markdown UI emoji heading
85
- `## ⚔️ WAVE 3 ZORO (EXECUTION)`. Spec + colors: `_shared/references/wave-banners.md`.
86
- A skip is recorded, never silent.
85
+ Read `verbosity` from mode config at Flow 0 (default `normal`); never suppresses wave banners, file edits, gate verdicts, decisions, questions, blockers, lane rises, or escalations.
86
+ At `normal`: investigation steps (reads, greps, probes), file contents, and narration are not echoed — name a file only when it matters; results collapse to one line + evidence path. At `full`: everything is echoed, including reads and reasoning.
87
+ **The rule: the transcript must remain sufficient to review the mission without opening a file.** If collapsing a line breaks that, do not collapse it.
88
+ Rendered examples: `references/output-contract.md` match the shape.
87
89
 
88
90
  ## Work splitting
89
91
 
90
- When a wave has many independent tasks, instruct Zoro to parallelize — one task per WORKER subagent — and may split the mission into parallel tracks. Only `[PARALLEL]` sets are dispatched; sequential work stays inline. Never run more parallelism than the plan proves safe (check the dependency graph, no shared files). A `[PARALLEL]` task set with a hidden dependency edge is a red flag.
92
+ When a flow stage has many independent tasks, instruct Zoro to parallelize — one task per WORKER subagent — and may split the mission into parallel tracks. Only `[PARALLEL]` sets are dispatched; sequential work stays inline. Never run more parallelism than the plan proves safe (check the dependency graph, no shared files). A `[PARALLEL]` task set with a hidden dependency edge is a red flag.
91
93
 
92
94
  ## Q&A hub
93
95
 
@@ -95,11 +97,11 @@ Any agent routes a question to Luffy (via the main thread). Answer with: decisio
95
97
 
96
98
  ## Override (in-session)
97
99
 
98
- Recognize the in-session phrase `mugiwara mode <guided|semi|auto>`: write the project `.mugiwara/config`, append a decision-log row (level, requester, timestamp), and apply from the next wave. No CLI flag. The mode is read once per wave — a flip never applies mid-wave.
100
+ Recognize the in-session phrase `mugiwara mode <guided|semi|auto>`: write the project `.mugiwara/config`, append a decision-log row (level, requester, timestamp), and apply from the next flow stage. No CLI flag. The mode is read once per flow stage — a flip never applies mid-flow-stage.
99
101
 
100
- ## Closure (Wave 9)
102
+ ## Closure (Flow 9)
101
103
 
102
- Gate — every task's acceptance criteria verified, every gate passed, findings resolved or deferred with an owner, blocker ledger reviewed. Step results `results/<mission>/01..05` are evidence — kept, never deleted; only consumed cross-artifacts (`logs/`, `spec/`, `review/`, `issues/`) are removed. Run `scripts/savepoint.sh <mission>` to write final state, then `scripts/mission-report.sh <mission>` to generate the aggregate mission report at `.mugiwara/reports/YYYY-MM-DD-<mission>.md`. Write the closure summary to `.mugiwara/results/<mission>/06-closure.md`. The plan doc stays untouched. Full detail: `references/closure.md`. With `auto_commit=off` (guided/semi): skip the save-point commit and push — hand the uncommitted tree + verdict to the user; auto always pushes.
104
+ Gate — every task's acceptance criteria verified, every gate passed, findings resolved or deferred with an owner, blocker ledger reviewed. Step results `results/<mission>/01..05` are evidence — kept, never deleted; only consumed cross-artifacts (`logs/`, `spec/`, `review/`, `issues/`) are removed. Run `mugiwara savepoint <mission>` to write final state, then `mugiwara run mission-report.sh <mission>` to generate the aggregate mission report at `.mugiwara/reports/YYYY-MM-DD-<mission>.md`. Write the closure summary to `.mugiwara/results/<mission>/06-closure.md`. The plan doc stays untouched. Full detail: `references/closure.md`. With `auto_commit=off` (guided/semi): skip the save-point commit and push — hand the uncommitted tree + verdict to the user; auto always pushes.
103
105
 
104
106
  ## Spirit vs letter
105
107
 
@@ -107,18 +109,15 @@ The plan doc is the contract, but the mission goal outranks it. If following the
107
109
 
108
110
  ## Write boundary
109
111
 
110
- Only Zoro (`mugiwara-execution`) and Brook (`mugiwara-healing`) write source. Every other role writes `.mugiwara/**` only. If the user asks a non-executor to write source, refuse and route to Luffy, who dispatches Zoro (execution) or Brook (healing).
111
- Every agent knows its edit capability from its own `write-scope` frontmatter — no probing.
112
- Artifacts-scope agents facing a source edit say "Delegating to Zoro" to Luffy, who dispatches immediately.
113
- Subagent harnesses: Luffy auto-dispatches zoro-execution; Codex-style harnesses inline-embody.
114
- Brook heals only; general source edits go to Zoro via Luffy.
112
+ Only Zoro (`mugiwara-execution`) and Brook (`mugiwara-healing`) write source. Every other role writes `.mugiwara/**` only. If the user asks a non-executor to write source, refuse and route to Luffy, who dispatches Zoro (execution) or Brook (healing). Every agent knows its edit capability from its own `write-scope` frontmatter — no probing. Artifacts-scope agents facing a source edit say "Delegating to Zoro" to Luffy, who dispatches immediately. Subagent harnesses: Luffy auto-dispatches zoro-execution; Codex-style harnesses inline-embody. Brook heals only; general source edits go to Zoro via Luffy.
115
113
 
116
114
  ## Red flags
117
115
 
118
116
  - Accepting "skip the pipeline" without re-running the lane.
119
117
  - Letting auto proceed past a lane-3 escalation.
120
- - Starting a wave without a banner.
118
+ - Starting a flow stage without a banner.
121
119
  - Routing a Refuse-class request to a crew member; recording a lane without its trigger.
122
120
  - A host todo UI that lags the plan doc — tasks done but still unchecked, or the plan's task list never mirrored to the host.
121
+ - Re-reading state or an artifact the crew wrote earlier in the same session.
123
122
  - A main thread answering "I'm not the crew, I'll just handle it" instead of embodying the owning role.
124
123
  - An artifacts-scope agent probing permissions instead of delegating to Zoro via Luffy; full-crew process on a task that sizes Lane 0/1.
@@ -1,6 +1,6 @@
1
1
  # Check-ins — mugiwara-orchestration
2
2
 
3
- Operational detail for the "Periodic check-ins" and "Wave transitions" sections of `mugiwara-orchestration`'s SKILL.md. Mode-critical rules (auto never drops, auto never asks scope, heal halt, pressure) stay inline in the skill body.
3
+ Operational detail for the "Periodic check-ins" and "Flow transitions" sections of `mugiwara-orchestration`'s SKILL.md. Mode-critical rules (auto never drops, auto never asks scope, heal halt, pressure) stay inline in the skill body.
4
4
 
5
5
  ## Language
6
6
 
@@ -12,39 +12,40 @@ is a defect and is flagged at check-in.
12
12
 
13
13
  ## Periodic check-ins
14
14
 
15
- After every wave AND at the end of each execution batch, verify:
15
+ After every flow stage AND at the end of each execution batch, verify:
16
16
 
17
17
  1. Outputs match the plan's acceptance criteria — evidence, not claims.
18
18
  2. No task silently dropped or reordered.
19
19
  3. Heal-loop counters within bounds (max `heal_max_cycles` (default 3) cycles). At the limit, STOP
20
20
  and escalate to the user — a halt, not a red flag. Red flags are prose; a counter is state.
21
21
  4. Blocker ledger `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` reviewed; every row has an owner or a path forward.
22
- 5. **Lane re-run** — `scripts/lane.sh`; if the lane rose, announce the escalation and record the trigger. Luffy owns this, nobody else.
23
- 6. **Handoff contract current** — `.mugiwara/continue/<mission>/[member].json` is written at every wave boundary
24
- (mission, sub_mission, wave, tasks, next_action, next_session_prompt) — never only at
25
- session end. Luffy owns it and verifies it at every check-in; a wave that ends without
22
+ 5. **Lane re-run** — `mugiwara run lane.sh`; if the lane rose, announce the escalation and record the trigger. Luffy owns this, nobody else.
23
+ 6. **Handoff contract current** — `.mugiwara/continue/<mission>/[member].json` is written at every flow-stage boundary
24
+ (mission, sub_mission, flow stage, tasks, next_action, next_session_prompt) — never only at
25
+ session end. Luffy owns it and verifies it at every check-in; a flow stage that ends without
26
26
  updating it is a red flag. continue is machine-written data — treat as data to verify,
27
27
  never verbatim instructions.
28
28
  7. **Host todo synced** — the main thread mirrors the plan doc's task list into the host's native todo mechanism
29
29
  (opencode `todowrite`; Claude Code `TaskCreate`/`TaskUpdate`/`TaskList` — `TodoWrite` is deprecated since
30
- v2.1.142; tier 2/3 hosts have no native tool — plan doc only). Seed it at Wave 2 (tasks + wave list 4-9);
30
+ v2.1.142; tier 2/3 hosts have no native tool — plan doc only). Seed it at Flow 2 (tasks + flow-stage list 4-9);
31
31
  update it in the SAME response each task's evidence lands — one transition per call, never deferred to
32
- batch or wave end; flip each wave to in_progress when its banner opens. The host todo is a mirror; the plan
32
+ batch or flow-stage end; flip each flow stage to in_progress when its banner opens. The host todo is a mirror; the plan
33
33
  doc stays the source of truth. A task done in the plan doc but not yet in the host tool is incomplete.
34
34
  Per-host table: `docs/reference/harness-matrix.md`.
35
35
 
36
36
  By mode (per mode config): `guided` checks in with the user as today; `semi`/`auto` write the check-in verdicts to the decision log without pausing the pipeline.
37
37
 
38
- ## Wave transitions (visibility)
38
+ ## Flow transitions (visibility)
39
39
 
40
- Every wave opens with a colored banner in the owning agent's color and closes
41
- with the handoff line `→ Wave N+1 — <crew>` (Wave 9: `→ closure`). Terminal:
42
- equals line `===== WAVE 3 — ZORO (EXECUTION) =====` wrapped in ANSI truecolor
43
- `\x1b[38;2;R;G;Bm...\x1b[0m` (256 fallback `38;5;N`); markdown UIs: emoji
44
- heading `## ⚔️ WAVE 3 — ZORO (EXECUTION)`, no ANSI. The literal `WAVE N —`
45
- text must stay exact (savepoint's heal counter greps `wave 8`). Colors, emoji,
40
+ Every flow stage opens with a colored banner in the owning agent's color and closes
41
+ with the handoff line `→ Flow N+1 — <crew>` (Flow 9: `→ closure`). Terminal:
42
+ equals line `===== ⚔️ FLOW 3 — ZORO (EXECUTION) =====` wrapped in ANSI truecolor
43
+ `\x1b[38;2;R;G;Bm...\x1b[0m` (256 fallback `38;5;N`); markdown UIs: the plain
44
+ equals line, no ANSI. The literal `FLOW N —`
45
+ text must stay exact (the check-in protocol reads it; heal cycles are counted
46
+ from the decision log's `## Flow 8` sections, not from banners). Colors
46
47
  and the full spec: `_shared/references/wave-banners.md`. No wave starts without its banner. A wave intentionally
47
- omitted is never silent — record wave, owner, and reason in the decision log
48
+ omitted is never silent — record flow stage, owner, and reason in the decision log
48
49
  before moving on. The user must always see which crew runs now and who takes
49
50
  over next.
50
51
 
@@ -7,8 +7,8 @@ Read after deciding to close a mission — never mid-argument.
7
7
 
8
8
  Present a detailed summary to the user — never a one-liner:
9
9
 
10
- - Mission summary — goal, mode, waves, task count.
11
- - Per-wave outcome table — wave, tasks, status, evidence link (clickable `[path](relative/path)`). Step results `results/<mission>/01..05` are evidence — never deleted at cleanup.
10
+ - Mission summary — goal, mode, flow stages, task count.
11
+ - Per-flow-stage outcome table — flow stage, tasks, status, evidence link (clickable `[path](relative/path)`). Step results `results/<mission>/01..05` are evidence — never deleted at cleanup.
12
12
  - Gate verdicts — quality, gates (coverage/build/DoD), review + security findings with dispositions, e2e (run / skipped + why).
13
13
  - Tests — unit/integration results; ATDD oracle verdict when user tests were declared.
14
14
  - Risks / rollback — remaining risk and the rollback path (revert commit / feature flag).
@@ -31,13 +31,13 @@ hand the user: the branch name, the exact commands to commit and push
31
31
  verdict pointer. In `auto` mode `auto_commit` is ignored — the terminal step
32
32
  runs unchanged.
33
33
 
34
- When this mission is a sub-mission of a team initiative, after closure run
35
- `bun scripts/initiative.ts set-status <initiative-plan> --id <sub-id> --status done`.
34
+ When this mission is a sub-mission of a team initiative, after closure set
35
+ that sub-mission's status cell to `done` in the initiative plan doc (`mugiwara initiative set-status <plan> --id <id> --status done` automates it).
36
36
  When all sub-missions show `[x]`, present initiative-level closure summary.
37
37
 
38
38
  ## Lessons
39
39
 
40
- At Wave 0 triage read `.mugiwara/logs/lessons.md` and surface relevant rows to
40
+ At Flow 0 triage read `.mugiwara/logs/lessons.md` and surface relevant rows to
41
41
  the owning agent. At closure embody memory-keeper inline to append this mission's
42
42
  lessons to `.mugiwara/logs/lessons.md` — one row per real lesson, append-only,
43
43
  never overwrite.
@@ -0,0 +1,77 @@
1
+ # Output contract — one flow stage at both verbosity levels
2
+
3
+ Purpose: show the exact shape a flow stage takes at `verbosity=normal` (default)
4
+ and `verbosity=full`. Match the shape for the level in effect. Reference:
5
+ `mugiwara-orchestration` → Output discipline.
6
+
7
+ ## What never changes
8
+
9
+ Whatever the level, these are always visible — they are the audit surface:
10
+
11
+ - wave banner (the owning agent's color)
12
+ - file edits: path + one-line summary
13
+ - gate verdicts + evidence path
14
+ - decisions, questions, blockers, lane rises, escalations
15
+ - the handoff line to the next flow stage
16
+
17
+ ## The collapse table
18
+
19
+ | Before | After |
20
+ |---|---|
21
+ | 200 lines of test output | `✓ tests 84/84 → results/m/03-quality.md` |
22
+ | Read/grep/probe tool calls + file contents | *(not echoed at `normal` — a file is named only when it matters)* |
23
+ | Step-by-step reasoning | the conclusion |
24
+ | Per-task bookkeeping | one summary line per flow stage |
25
+ | Raw diff | `+42/-8` + one-line summary |
26
+
27
+ ---
28
+
29
+ ## `normal` — default
30
+
31
+ ```
32
+ ==================== ⚔️ FLOW 3 — ZORO (EXECUTION) ====================
33
+ ✎ src/auth/invitation.ts +42/-8 token validation + redirect guard
34
+ ✎ src/routes/index.ts +6/-0 route registration
35
+ ✓ tests 84/84 · lint 0 → results/m/03-quality.md
36
+ → Flow 4 — Chopper (Checkpoint)
37
+ ```
38
+
39
+ Commands ran and passed; output collapsed to one line per gate with the
40
+ evidence path. Investigation steps (reads, greps, probes), file contents, and
41
+ narration are not echoed — only edits, results, decisions, and questions
42
+ appear. Reasoning reduced to conclusions.
43
+
44
+ ## `full` — everything
45
+
46
+ ```
47
+ ==================== ⚔️ FLOW 3 — ZORO (EXECUTION) ====================
48
+ $ mugiwara run lane.sh m
49
+ lane: full (44 files, 5 sensitive)
50
+ $ readFileSync src/auth/invitation.ts
51
+ export function signInvitation(...) {
52
+ // 42 lines...
53
+ $ bun run lint
54
+ 0 errors
55
+ $ bun test test/unit
56
+ 84 pass, 0 fail, 1.2s
57
+ ✓ token validation … (12ms)
58
+ ✓ redirect guard … (8ms)
59
+ ✎ src/auth/invitation.ts +42/-8 token validation + redirect guard
60
+ ✎ src/routes/index.ts +6/-0 route registration
61
+ ✓ quality pass → results/m/03-quality.md
62
+ → Flow 4 — Chopper (Checkpoint)
63
+ ```
64
+
65
+ Every command, every read, every reasoning step — the raw transcript. Use it
66
+ when debugging the crew itself or auditing exactly how a result was reached.
67
+
68
+ ---
69
+
70
+ ## The safety rule
71
+
72
+ > The transcript must stay sufficient to review the mission **without opening a
73
+ > file.** If collapsing a line breaks that, do not collapse it.
74
+
75
+ Test output may collapse — the evidence file holds it. A decision may not — it
76
+ has no other home. The safety rule applies at `full` too: verbosity widens
77
+ what is echoed, it never narrows what the review needs.
@@ -4,20 +4,20 @@ Full classifier, lane routing, precedence, pressure rationalizations, auto
4
4
  auto-never-drops, escalation owners, and heal bounds. The SKILL.md body carries one-line
5
5
  pointers; this file is the detail.
6
6
 
7
- ## Request classifier (Wave 0) — 8 classes
7
+ ## Request classifier (Flow 0) — 8 classes
8
8
 
9
9
  Classify EVERY incoming request. Record decision + one-line reason at the top
10
10
  of the decision log. Any route without a recorded reason is a red flag.
11
11
 
12
12
  | Class | Signal | Route |
13
13
  |-------|--------|-------|
14
- | Trivial | one obvious small change, no ambiguity, single file | Wave 2 directly |
15
- | Explicit | clear requirements, written spec or reference exists | Wave 2 directly |
16
- | Exploratory | needs direction, options, or research before planning | Wave 1 first |
17
- | Open-ended | broad goal, undefined scope or success criteria | Wave 1 first |
18
- | Ambiguous | requirements, APIs, or scope unclear | Wave 1 first |
14
+ | Trivial | one obvious small change, no ambiguity, single file | Flow 2 directly |
15
+ | Explicit | clear requirements, written spec or reference exists | Flow 2 directly |
16
+ | Exploratory | needs direction, options, or research before planning | Flow 1 first |
17
+ | Open-ended | broad goal, undefined scope or success criteria | Flow 1 first |
18
+ | Ambiguous | requirements, APIs, or scope unclear | Flow 1 first |
19
19
  | **Answer** | question, explanation, code reading — no file change | **Answer directly. No mission, no workspace, no banner.** |
20
- | **Refuse** | deploy, prod migration, key rotation, merge | **Decline at Wave 0, state why, offer the branch-handoff path.** |
20
+ | **Refuse** | deploy, prod migration, key rotation, merge | **Decline at Flow 0, state why, offer the branch-handoff path.** |
21
21
  | **Hotfix** | production broken | Lane 1, gates deferred with an owner, never skipped |
22
22
 
23
23
  Risk (money/security/data/public API) → full pipeline; never shortcut without
@@ -37,20 +37,20 @@ override class route — see lane escalation).
37
37
 
38
38
  ## Explicit class still sizes the lane
39
39
 
40
- A pasted spec routes to Wave 2 (Explicit) — but planning is NOT skipped on
41
- faith. Before routing to Wave 2, size the lane from the spec's file list: count
40
+ A pasted spec routes to Flow 2 (Explicit) — but planning is NOT skipped on
41
+ faith. Before routing to Flow 2, size the lane from the spec's file list: count
42
42
  the files the spec implies. A 40-file spec sizes to Lane 3 even though the class
43
43
  is Explicit. A 2-file spec stays Lane 1. Never let a spec's existence substitute
44
44
  for sizing its size.
45
45
 
46
- ## Lane routing (Wave 0, size before process)
46
+ ## Lane routing (Flow 0, size before process)
47
47
 
48
48
  | Lane | Runs | Size signal |
49
49
  |------|------|-------------|
50
50
  | 0 Direct | skips pipeline | 1 file <20 LOC |
51
51
  | 1 Lean | execute → quality | 1-2 files |
52
52
  | 2 Standard | plan → execute → checkpoint → review | 3-8 files |
53
- | 3 Full | all 9 waves | 9+ files or auth/payment/migration paths |
53
+ | 3 Full | all 9 flow stages | 9+ files or auth/payment/migration paths |
54
54
  | 4 Spike | brainstorm then re-sizes | exploratory |
55
55
 
56
56
  Escalation only: a lane may rise mid-mission (diff grew, sensitive path
@@ -65,22 +65,22 @@ in `SKILL.md`.
65
65
 
66
66
  ## Auto mode never drops
67
67
 
68
- `auto` runs every wave autonomously to closure. Lane rise (`lane_rose`), a
68
+ `auto` runs every flow stage autonomously to closure. Lane rise (`lane_rose`), a
69
69
  sensitive path touched (auth/payment/billing/crypto/secrets/migration — see
70
- `scripts/lane.sh`), or heal cycles do NOT downgrade the mode. The lane may
71
- escalate (more waves, more care) but the mode stays auto. Only a genuine
70
+ `mugiwara run lane.sh`), or heal cycles do NOT downgrade the mode. The lane may
71
+ escalate (more flow stages, more care) but the mode stays auto. Only a genuine
72
72
  blocker or the heal halt pauses and escalates to the user; the mode is never
73
73
  switched down mid-mission.
74
74
 
75
75
  ## Lane-escalation owner (who checks, when)
76
76
 
77
77
  A lane may rise mid-mission (diff grew, sensitive path touched, failures
78
- repeated). The owner is Luffy, at every per-wave check-in:
78
+ repeated). The owner is Luffy, at every per-flow-stage check-in:
79
79
 
80
- 1. Re-run `scripts/lane.sh` at each wave boundary.
80
+ 1. Re-run `mugiwara run lane.sh` at each flow-stage boundary.
81
81
  2. If the lane rose → announce the escalation, record the trigger in the
82
- decision log, and re-plan the remaining waves (through Nami) to match.
83
- 3. `savepoint.sh` writes `lane` each wave — compare against the previous value
82
+ decision log, and re-plan the remaining flow stages (through Nami) to match.
83
+ 3. `savepoint.sh` writes `lane` each flow stage — compare against the previous value
84
84
  and flag a rise (see state fields).
85
85
 
86
86
  Nobody else owns this. Chopper audits what was done, not what lane should have
@@ -88,7 +88,7 @@ been; Luffy owns the lane decision.
88
88
 
89
89
  ## Heal bound — halt, not a red flag
90
90
 
91
- Read `heal_cycle` from `.mugiwara/state/<mission>/[member].json` (written by savepoint.sh). At 3,
92
- STOP and escalate to the user with full history. This is a halt, not a red
93
- flag: red flags are prose, a counter is state. Nothing re-runs Wave 8 past 3
94
- cycles.
91
+ Read `heal_halt` from `.mugiwara/state/<mission>/[member].json` (savepoint computes it as `heal_cycle ≥ heal_max_cycles`, config default 3). When it reads
92
+ `true`, STOP and escalate to the user with full history. This is a halt, not a red
93
+ flag: red flags are prose, a counter is state. Nothing re-runs Flow 8 past
94
+ `heal_max_cycles`.
@@ -80,6 +80,8 @@ Every edge names its file: `consumes <file> from Task M → produces <file> for
80
80
 
81
81
  ## Anti-patterns
82
82
 
83
+ Each with its failure mode and the fix: `references/anti-patterns.md`.
84
+
83
85
  - "TBD", "add appropriate error handling", or "similar to Task N" in a step.
84
86
  - No Files paths, or an Acceptance like "works correctly" (uncheckable).
85
87
  - Assumed tooling not confirmed in the context scan, or silent reordering/dropping tasks.
@@ -101,7 +103,7 @@ Team plans add `## Sub-missions` table after task index. Solo missions skip. Sta
101
103
  |----|------|----------|--------|--------|------------|---------------|
102
104
  | sub-1 | Payment Gateway | Dev A | feat/payment-gateway | [ ] | — | src/payment/ |
103
105
 
104
- Plan doc is single source of truth. Update status via `scripts/initiative.ts set-status`.
106
+ Plan doc is single source of truth. Update the status cell in the plan doc directly (`mugiwara initiative set-status <plan> --id <id> --status <x>` automates it).
105
107
 
106
108
  ## Mission split (very large) — Lane 3
107
109
 
@@ -51,14 +51,14 @@ Multi-PR scope (>2 days). Split into sub-missions — never one giant plan:
51
51
  Batch ALL blocking ambiguities into ONE question round before writing. If a
52
52
  major decision appears mid-plan, stop and ask then — never assume silently.
53
53
  Unanswered question goes back to Luffy, never forward to Zoro. Read the
54
- mission spec at `.mugiwara/spec/YYYY-MM-DD-<mission>.md` (the Wave 0/1
54
+ mission spec at `.mugiwara/spec/YYYY-MM-DD-<mission>.md` (the Flow 0/1
55
55
  bridge); if none exists, return to Luffy for the spec bridge or brainstorm —
56
56
  never plan from an empty spec, that is fiction.
57
57
 
58
58
  Mode gates (per mode config):
59
59
 
60
60
  - `guided`: batch ONE question round, wait for answers, then present the plan for an explicit user GO.
61
- - `semi`: manual until the written plan — batch the question round, wait, present the plan for an explicit user GO; execution from Wave 3 onward is automatic.
61
+ - `semi`: manual until the written plan — batch the question round, wait, present the plan for an explicit user GO; execution from Flow 3 onward is automatic.
62
62
  - `auto`: fully automatic — no user GO required. Ambiguities are resolved internally: the owning agent brainstorms with Usopp, Luffy makes the call, and the crew proceeds. Only a genuine blocker or the heal halt pauses. If a blocking question truly cannot be resolved from the repo + skills, escalate to Luffy → the user.
63
63
 
64
64
  Never hand to the executor without a GO except through the auto gate above;
@@ -7,24 +7,24 @@ description: Use at closure to push branch + prepare PR material — plain git p
7
7
 
8
8
  ## Skip when
9
9
 
10
- - Not at closure: PR material is terminal-step-only, never per-wave.
10
+ - Not at closure: PR material is terminal-step-only, never per-flow-stage.
11
11
  - User handles the PR themselves and declined the verdict file.
12
12
 
13
- Mugiwara's evidence lands where the team reviews. At terminal, push the mission branch with plain `git` and write one structured verdict file. No PR is created by the crew — the user opens the PR and pastes the ready PR summary. Never per-wave.
13
+ Mugiwara's evidence lands where the team reviews. At terminal, push the mission branch with plain `git` and write one structured verdict file. No PR is created by the crew — the user opens the PR and pastes the ready PR summary. Never per-flow-stage.
14
14
 
15
15
  ## Verdict file
16
16
 
17
17
  Write `.mugiwara/results/<mission>/07-pr-verdict.md` — ONE document that IS
18
18
  the ready PR material (no separate report + PR-body copy). Exact order —
19
19
  Title → Summary (key-point bullets) → What changed (compact file inventory
20
- paragraph) → Per-wave evidence → Tests → Checks → Verdict. Full spec:
20
+ paragraph) → Per-flow-stage evidence → Tests → Checks → Verdict. Full spec:
21
21
  `references/verdict-format.md`.
22
22
 
23
23
  ## PR summary
24
24
 
25
25
  The verdict file IS the PR summary. No second block: the user pastes the file
26
26
  — title line into the PR title, the rest into the body. Order mirrors the
27
- verdict file (title → summary → what changed → per-wave evidence → tests →
27
+ verdict file (title → summary → what changed → per-flow-stage evidence → tests →
28
28
  checks → verdict). Validate every interpolated value against the safe charset
29
29
  and quote it.
30
30
 
@@ -32,7 +32,7 @@ The summary is material, never posted — the crew stops at push.
32
32
 
33
33
  ## Handoff rule
34
34
 
35
- Push the branch + write the verdict file at terminal, after every wave passes (never a draft state — the user opens the PR when they choose). The verdict is delivered as a file, not posted; the user pastes it into their PR. Never per-wave (reviewer noise). With `auto_commit=off` (guided/semi only): nothing to push — write the verdict file, hand the UNCOMMITTED working tree to the user with the exact commit + push commands; `auto` mode always pushes.
35
+ Push the branch + write the verdict file at terminal, after every flow stage passes (never a draft state — the user opens the PR when they choose). The verdict is delivered as a file, not posted; the user pastes it into their PR. Never per-flow-stage (reviewer noise). With `auto_commit=off` (guided/semi only): nothing to push — write the verdict file, hand the UNCOMMITTED working tree to the user with the exact commit + push commands; `auto` mode always pushes.
36
36
 
37
37
  ## Push adapter (plain git, no gh)
38
38
 
@@ -55,7 +55,7 @@ Before finalizing the verdict file, scan it for secret patterns (`.env`-style li
55
55
  ## Rules
56
56
 
57
57
  1. Write the verdict file before pushing; hand off last, once.
58
- 2. Push branch + verdict file at terminal; never per-wave.
58
+ 2. Push branch + verdict file at terminal; never per-flow-stage.
59
59
  3. Verdicts come from captured evidence (command output), never asserted.
60
60
  4. No PR is created, no auto-reaction to review comments or CI in any mode.
61
61
  5. Auth missing → local closure fallback + logged reason.
@@ -6,14 +6,14 @@ separate report section plus a PR-body copy: one flow, in this exact order:
6
6
 
7
7
  1. **Title** — `# {type}: {Title Case summary}` — mandatory Title case, e.g.
8
8
  `# Feat: Add Evidence Links To Mugiwara Reports`.
9
- 2. **Summary** — goal, mode, waves, task count, branch/stacking note,
9
+ 2. **Summary** — goal, mode, flow stages, task count, branch/stacking note,
10
10
  closure report link (`[06-closure.md](.mugiwara/results/<mission>/06-closure.md)`);
11
11
  then the mission's key points as compact bullets (what each defect/feature
12
12
  does — never a file list).
13
13
  3. **What changed** — ONE compact paragraph, file inventory only: `<N> files:
14
14
  <comma-separated paths>, <grouped counts>, docs (dir or file list), README.`
15
15
  Feature detail lives in Summary, not here.
16
- 4. **Per-wave evidence** — wave, task, status, evidence link
16
+ 4. **Per-flow-stage evidence** — flow stage, task, status, evidence link
17
17
  (`[path](relative/path)`). Gates, review, security, and heal rows live here
18
18
  with their dispositions.
19
19
  5. **Tests** — captured test counts (never asserted); the ATDD oracle result
@@ -26,6 +26,6 @@ separate report section plus a PR-body copy: one flow, in this exact order:
26
26
 
27
27
  The file IS the PR summary. No second block: the user pastes the file — title
28
28
  line into the PR title, the rest into the body. Order mirrors the verdict file
29
- (title → summary → what changed → per-wave evidence → tests → checks →
29
+ (title → summary → what changed → per-flow-stage evidence → tests → checks →
30
30
  verdict). Validate every interpolated value against the safe charset and quote
31
31
  it.