@ionivetech/mugiwara 0.5.4 → 0.6.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 (158) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +4 -3
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/.cursor-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +2 -2
  6. package/.opencode/commands/mugiwara-continue.md +16 -0
  7. package/.opencode/commands/mugiwara-execute.md +6 -4
  8. package/.opencode/commands/mugiwara-heal.md +6 -4
  9. package/.opencode/commands/mugiwara-plan.md +6 -4
  10. package/.opencode/commands/mugiwara-review.md +6 -4
  11. package/.opencode/commands/mugiwara-security.md +6 -4
  12. package/.opencode/commands/mugiwara-ship.md +6 -4
  13. package/.opencode/commands/mugiwara.md +4 -2
  14. package/.opencode/commands/using-mugiwara.md +7 -13
  15. package/.opencode/plugins/mugiwara.mjs +18 -6
  16. package/AGENTS.md +2 -2
  17. package/GEMINI.md +1 -1
  18. package/README.md +240 -217
  19. package/content/agents/brook-healing.md +17 -3
  20. package/content/agents/chopper-checkpoint.md +17 -3
  21. package/content/agents/eval-runner.md +17 -2
  22. package/content/agents/franky-gates.md +19 -5
  23. package/content/agents/jinbe-security.md +19 -3
  24. package/content/agents/luffy-orchestrator.md +6 -3
  25. package/content/agents/memory-keeper.md +15 -0
  26. package/content/agents/nami-planner.md +21 -6
  27. package/content/agents/onboarding-guide.md +145 -0
  28. package/content/agents/resume-coordinator.md +21 -5
  29. package/content/agents/robin-reviewer.md +18 -3
  30. package/content/agents/sanji-quality.md +19 -4
  31. package/content/agents/skeptic-verifier.md +18 -3
  32. package/content/agents/usopp-brainstorm.md +17 -3
  33. package/content/agents/zoro-execution.md +19 -5
  34. package/content/skills/mugiwara-backend/SKILL.md +1 -1
  35. package/content/skills/mugiwara-brainstorm/SKILL.md +5 -1
  36. package/content/skills/mugiwara-checkpoint/SKILL.md +2 -2
  37. package/content/skills/mugiwara-contract-first/SKILL.md +2 -36
  38. package/content/skills/mugiwara-contract-first/references/process.md +37 -0
  39. package/content/skills/mugiwara-execution/SKILL.md +30 -13
  40. package/content/skills/mugiwara-execution/references/resume-batching.md +32 -0
  41. package/content/skills/mugiwara-frontend/SKILL.md +1 -1
  42. package/content/skills/mugiwara-gates/SKILL.md +32 -30
  43. package/content/skills/mugiwara-healing/SKILL.md +1 -1
  44. package/content/skills/mugiwara-orchestration/SKILL.md +41 -25
  45. package/content/skills/mugiwara-orchestration/references/delegation-pillars.md +40 -0
  46. package/content/skills/mugiwara-orchestration/references/triage-escalation.md +96 -0
  47. package/content/skills/mugiwara-planning/SKILL.md +23 -27
  48. package/content/skills/mugiwara-planning/references/plan-template.md +42 -0
  49. package/content/skills/mugiwara-pr/SKILL.md +2 -2
  50. package/content/skills/mugiwara-quality/SKILL.md +10 -6
  51. package/content/skills/mugiwara-resume/SKILL.md +7 -2
  52. package/content/skills/mugiwara-review/SKILL.md +20 -1
  53. package/content/skills/mugiwara-review/references/code-attributes.md +38 -0
  54. package/content/skills/mugiwara-root-cause/SKILL.md +3 -30
  55. package/content/skills/mugiwara-root-cause/references/process.md +35 -0
  56. package/content/skills/mugiwara-security/SKILL.md +17 -32
  57. package/content/skills/mugiwara-security/references/owasp-top10.md +12 -0
  58. package/content/skills/mugiwara-security/references/rationalizations.md +8 -0
  59. package/content/skills/mugiwara-ship/SKILL.md +5 -4
  60. package/content/skills/mugiwara-workflow/SKILL.md +74 -77
  61. package/content/skills/mugiwara-workflow/references/workspace-layout.md +50 -0
  62. package/content/skills/using-mugiwara/SKILL.md +8 -19
  63. package/dist/mugiwara.js +206 -87
  64. package/gemini-extension.json +1 -1
  65. package/hooks/session-start.ts +1 -1
  66. package/package.json +12 -5
  67. package/plugin.json +2 -2
  68. package/references/multi-actor.md +1 -1
  69. package/scripts/evidence.sh +13 -6
  70. package/scripts/gate-selftest.ts +266 -0
  71. package/scripts/initiative.ts +248 -0
  72. package/scripts/lane.sh +15 -0
  73. package/scripts/mission-report.sh +141 -76
  74. package/scripts/onboard.ts +292 -0
  75. package/scripts/release-notes.ts +42 -13
  76. package/scripts/retrieval-eval.ts +1 -2
  77. package/scripts/run-evals.ts +1 -1
  78. package/scripts/savepoint.sh +97 -50
  79. package/scripts/validate-content.ts +84 -7
  80. package/scripts/verify-install.ts +72 -0
  81. package/src/args.ts +1 -1
  82. package/src/cli.ts +49 -22
  83. package/src/frontmatter.ts +3 -3
  84. package/src/installer.ts +44 -15
  85. package/src/mission.ts +7 -5
  86. package/src/targets/claude.ts +20 -3
  87. package/src/targets/generic.ts +1 -1
  88. package/src/targets/opencode.ts +53 -11
  89. package/docs/adoption-guide.md +0 -72
  90. package/docs/agent-anatomy.md +0 -72
  91. package/docs/agents.md +0 -53
  92. package/docs/audit-trail.md +0 -65
  93. package/docs/claude-setup.md +0 -43
  94. package/docs/codex-setup.md +0 -26
  95. package/docs/comparison.md +0 -58
  96. package/docs/compliance-matrix.md +0 -81
  97. package/docs/config.md +0 -55
  98. package/docs/copilot-setup.md +0 -29
  99. package/docs/cost.md +0 -45
  100. package/docs/cursor-setup.md +0 -25
  101. package/docs/developer-onboarding.md +0 -89
  102. package/docs/enforcement.md +0 -35
  103. package/docs/execution-model.md +0 -92
  104. package/docs/gemini-setup.md +0 -27
  105. package/docs/getting-started.md +0 -158
  106. package/docs/git-strategy.md +0 -62
  107. package/docs/harness-matrix.md +0 -41
  108. package/docs/index.md +0 -56
  109. package/docs/install-antigravity.md +0 -45
  110. package/docs/install-claude.md +0 -75
  111. package/docs/install-cli.md +0 -103
  112. package/docs/install-codex.md +0 -44
  113. package/docs/install-copilot.md +0 -45
  114. package/docs/install-cursor.md +0 -45
  115. package/docs/install-gemini.md +0 -44
  116. package/docs/install-kimi.md +0 -45
  117. package/docs/install-opencode.md +0 -129
  118. package/docs/install-pi.md +0 -46
  119. package/docs/install.md +0 -53
  120. package/docs/lanes.md +0 -82
  121. package/docs/modes.md +0 -74
  122. package/docs/opencode-setup.md +0 -54
  123. package/docs/pr-summary.md +0 -54
  124. package/docs/rule-based-setup.md +0 -31
  125. package/docs/skill-anatomy.md +0 -71
  126. package/docs/skills.md +0 -55
  127. package/docs/troubleshooting.md +0 -91
  128. package/docs/windsurf-setup.md +0 -18
  129. package/docs/workflow.md +0 -89
  130. package/evals/cases/_no-skill.json +0 -16
  131. package/evals/cases/adversarial-pressure-fake-pass.json +0 -25
  132. package/evals/cases/adversarial-pressure-skip-review.json +0 -25
  133. package/evals/cases/lane-exploratory-vague.json +0 -24
  134. package/evals/cases/lane-sensitivity-payment.json +0 -24
  135. package/evals/cases/positive-refactor-existing-tests.json +0 -25
  136. package/evals/cases/positive-resume-mid-mission.json +0 -24
  137. package/evals/cases/routing-agent-security.json +0 -25
  138. package/evals/cases/routing-auth-feature.json +0 -26
  139. package/evals/cases/routing-backend.json +0 -25
  140. package/evals/cases/routing-bug-one-file.json +0 -26
  141. package/evals/cases/routing-claim-audit.json +0 -25
  142. package/evals/cases/routing-context-budget.json +0 -25
  143. package/evals/cases/routing-contract-first.json +0 -25
  144. package/evals/cases/routing-execution.json +0 -25
  145. package/evals/cases/routing-frontend.json +0 -26
  146. package/evals/cases/routing-gates.json +0 -25
  147. package/evals/cases/routing-git.json +0 -25
  148. package/evals/cases/routing-healing.json +0 -25
  149. package/evals/cases/routing-lessons.json +0 -25
  150. package/evals/cases/routing-orchestration.json +0 -25
  151. package/evals/cases/routing-planning.json +0 -26
  152. package/evals/cases/routing-pr.json +0 -25
  153. package/evals/cases/routing-quality.json +0 -25
  154. package/evals/cases/routing-ship.json +0 -26
  155. package/evals/cases/routing-sunset.json +0 -25
  156. package/evals/cases/routing-using-mugiwara.json +0 -25
  157. package/evals/cases/routing-workflow.json +0 -25
  158. package/evals/floor.json +0 -6
package/README.md CHANGED
@@ -1,184 +1,207 @@
1
1
  # Mugiwara
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@ionivetech%2fmugiwara)](https://www.npmjs.com/package/@ionivetech/mugiwara)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@ionivetech%2fmugiwara)](https://www.npmjs.com/package/@ionivetech/mugiwara)
4
5
  [![License: MIT](https://img.shields.io/github/license/ionivetech/mugiwara)](https://github.com/ionivetech/mugiwara/blob/main/LICENSE)
5
6
 
6
- Your coding agent becomes a governed engineering team. 14 specialists triage,
7
- plan, build, audit, review, heal with evidence at every step, cost tracking,
8
- and a process that sizes itself to your work. Pure markdown, zero runtime.
7
+ **Ship quality code, not just fast code.** Mugiwara gives your AI agent a
8
+ governed engineering team12 specialists who plan, build, audit, review, and
9
+ heal with evidence at every step. No runtime, no API keys, no servers. Just
10
+ markdown your agent already knows how to read.
9
11
 
10
- ## Quick start
12
+ Works on Claude Code, opencode, Copilot, Gemini, and 8 more platforms.
11
13
 
12
- ```bash
13
- # Claude Code
14
- /plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara@mugiwara
14
+ ## Why this exists
15
15
 
16
- # opencode add to opencode.json
17
- { "plugin": ["@ionivetech/mugiwara"] }
16
+ AI agents are fast. They're also **unverified.** No audit trail. No review. No
17
+ "who checked this?" when something breaks. Mugiwara wraps your agent in a team
18
+ structure with role boundaries, evidence gates, and cost tracking — the same
19
+ discipline you'd expect from a senior engineering team. Zero runtime overhead:
20
+ every agent, every skill, every rule is static markdown.
18
21
 
19
- # Gemini CLI
20
- gemini extensions install https://github.com/ionivetech/mugiwara
22
+ [Full pitch: why mugiwara vs just asking your agent](docs/concepts/comparison.md)
21
23
 
22
- # Any platform via npm
23
- npx @ionivetech/mugiwara@latest install --project . --target all --yes
24
- ```
24
+ ## What Mugiwara does
25
25
 
26
- Then just ask. The crew auto-activates — no agent names to remember.
26
+ ### 9-wave pipeline
27
27
 
28
- ## What it looks like
28
+ ```mermaid
29
+ flowchart TB
30
+ L0["Luffy<br>Triage"] --> L1["Usopp<br>Brainstorm"] --> L2["Nami<br>Plan"] --> L3["Zoro<br>Execute"] --> L4["Chopper<br>Audit"]
31
+ L4 --> L5["Sanji<br>Quality"] --> L6["Franky<br>Gates"]
32
+ L6 --> L7R["Robin<br>Review"]
33
+ L6 --> L7J["Jinbe<br>Security"]
34
+ L7R --> L8["Brook<br>Heal"]
35
+ L7J --> L8
36
+ L8 --> L9["Luffy<br>Closure"]
37
+ L8 -. "heal ≤3 cycles" .-> L4
38
+ ```
29
39
 
30
- You ask:
40
+ [Full pipeline details](docs/concepts/workflow.md)
31
41
 
32
- ```
33
- > add search bar to the products page
34
- ```
42
+ ### All features
35
43
 
36
- The crew runs:
44
+ | Feature | What you get |
45
+ | --------------------------- | ----------------------------------------------------------------------------------------------- |
46
+ | **Lane sizing** | Work auto-sized from `git diff`. Typo = instant fix. Auth migration = full pipeline. |
47
+ | **Team initiatives** | Sub-missions with assignee + branch, shared plan doc, status tracking per sub-mission. |
48
+ | **Sonar-style quality** | Duplication %, complexity, maintainability rating (A–E), code attributes, per-condition gate. |
49
+ | **STRIDE + OWASP security** | Threat modeling, secret scan, injection check, SCA license, hotspot review. |
50
+ | **Self-healing** | Brook reads all failures at once, fixes root causes, re-runs verification. ≤3 cycles. |
51
+ | **3 autonomy modes** | guided (ask) / semi (auto branch+commit) / auto (hands-off). Flip mid-session. |
52
+ | **Configurable depth** | `review_depth` + `quality_depth`: full / standard / quick. Set per project. |
53
+ | **Resume from anywhere** | Session lost? Rebuilds from `.mugiwara/state.json`. Continues, never restarts. |
54
+ | **Onboarding wizard** | 10 questions — project type, team size, mode, depth. `/mugiwara onboard`. |
55
+ | **Evidence trail** | `.mugiwara/` workspace: plans, audit reports, quality reports, review findings, blocker ledger. |
56
+ | **12 platforms** | Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, Pi, Antigravity + CLI. |
57
+ | **Cost tracking** | Token budget per lane. Warn at 1.5×, pause at 3×. Surfaced in mission reports. |
58
+ | **Multi-actor safe** | Branch-scoped state. Two engineers, one repo. Reset refuses without `--force`. |
37
59
 
38
- ```
39
- Wave 0 Luffy triage → 5 files, no sensitive paths → Lane 2 Standard
40
- Wave 2 Nami plan → 1 execution wave, 3 tasks with dependency edges
41
- Wave 3 Zoro execute→ T1: search endpoint (test red→green, commit)
42
- T2: search service (test red→green, commit)
43
- T3: search component (test red→green, commit)
44
- Wave 4 Chopper audit → re-runs all 3 criteria, checks commits → PASS
45
- Wave 5 Sanji quality → prettier: clean, eslint: 0, 412 tests: PASS
46
- Wave 6 Franky gates → coverage new 94%, modified 87%, build green → PASS
47
- Wave 7 Robin review → breaking-change map: 0 breaks, 1 minor naming finding
48
- Wave 7 Jinbe security→ no auth/payment surface touched → skip
49
- Wave 9 Luffy closure→ mission report + push branch + ready PR summary
50
-
51
- done. branch pushed. paste the PR summary and open.
52
- ```
60
+ → [Every feature, explained with how-to-use + scenarios](docs/concepts/features.md) · [Full pipeline](docs/concepts/workflow.md) · [Lanes](docs/concepts/lanes.md) · [Modes](docs/concepts/modes.md) · [Config](docs/concepts/config.md) · [Audit trail](docs/concepts/audit-trail.md) · [Cost](docs/concepts/cost.md)
53
61
 
54
- Each wave is a compact checkpoint report in your conversation. You see
55
- everything. Nothing hides behind a subagent click. If a wave fails, Brook reads
56
- all failures at once, fixes them, and all verification waves re-run.
62
+ ## 30-second try
57
63
 
58
- Now a bigger one:
64
+ ```bash
65
+ # opencode — add to opencode.json, then restart
66
+ { "plugin": ["@ionivetech/mugiwara"] }
59
67
 
60
- ```
61
- > add role-based access control to the API: admin, editor, viewer roles
68
+ # Claude Code
69
+ /plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara
70
+
71
+ # Any platform via npm
72
+ npx @ionivetech/mugiwara@latest install --target all --yes
62
73
  ```
63
74
 
64
- Auth path detected auto-escalate to Lane 3 (Full):
75
+ First run: `/mugiwara onboard` for guided setup. Then ask something non-trivial:
65
76
 
66
77
  ```
67
- Wave 0 Luffy triage auth/ + migration/ touched → lane 3 full
68
- Wave 2 Nami plan → 2 execution waves, 5 tasks, parallel-safe graph
69
- Wave 3a Zoro execute→ T1 migration + T2 middleware + T3 3 parallel endpoint guards
70
- Wave 4 Chopper audit → T3-C: viewer can still POST /api/settings → 1 ledger row
71
- Wave 5 Sanji quality → 2 integration tests fail after middleware change → 2 rows
72
- Wave 6 Franky gates → coverage 91% / 85%, build green, DoD blocked (3 open rows)
73
- Wave 7 Robin review → 1 major: error message format inconsistent → 1 row
74
- Wave 7 Jinbe security→ STRIDE: PASS. 0 high. deny-by-default enforced.
75
- Wave 8 Brook heal → reads 4 ledger rows → 3 parallel heal workers → fix all
76
- Wave 4 Chopper re-audit→ PASS (cycle 2)
77
- Wave 5 Sanji re-qual → PASS
78
- Wave 6 Franky re-gate → PASS
79
- Wave 7 Robin re-rev → PASS
80
- Wave 3b Zoro execute→ T4 admin dashboard RBAC UI + T5 integration tests
81
- Wave 4 Chopper audit → PASS
82
- Wave 9 Luffy closure→ state.json + mission report + push + PR summary
83
-
84
- 1 heal cycle. 4 failures from 3 different waves — all fixed at once.
78
+ > add role-based access control: admin, editor, viewer
79
+ > audit the auth middleware for security gaps
80
+ > review the last PR for breaking changes
81
+ > split this feature across the team: payment gateway, ledger, fraud
85
82
  ```
86
83
 
87
- At closure you get a mission report:
84
+ A Standard lane mission (~10k tokens) produces a branch with test-first
85
+ commits, an audit report, a security review, and a ready PR summary — visible
86
+ at every step in your chat.
88
87
 
89
- ```
90
- .mugiwara/reports/2026-08-11-rbac.md
88
+ → [Full walkthrough](docs/getting-started.md)
91
89
 
92
- Lane full · Mode guided · Actor you · Branch feature/feat-rbac
90
+ ## How it works
93
91
 
94
- What changed: 12 files, +340/-82
95
- Gates: Audit PASS · Quality PASS · Coverage 91%/85% · Security PASS
96
- State: 12/12 tasks · 0 blockers · 1 heal cycle · 18.5k/20k tokens
97
- ```
92
+ You ask. The crew routes automatically. **No agent names to memorize, no
93
+ pipeline config to write.**
98
94
 
99
- One file. Any reviewer reads it in 30 seconds. That's the governance trail.
100
-
101
- ## Capabilities
102
-
103
- | Capability | What it does |
104
- |-----------|-------------|
105
- | **14 specialist agents** | Luffy triages, Nami plans, Zoro builds TDD, Chopper audits, Sanji checks quality, Franky enforces gates, Robin maps breaking changes, Jinbe runs STRIDE, Brook heals failures. Each with role boundaries: auditors read-only, executor no-network. |
106
- | **Lane sizing** | Process scaled to work size — computed from `git diff` by `scripts/lane.sh`. Typo = 0 waves. Auth migration = full 9-wave pipeline. Sensitive paths auto-escalate. |
107
- | **9-wave gated pipeline** | Triage Plan Execute Audit → Quality → Gates → Review+Security → Heal → Closure. Each wave gated by evidence. Pipeline runs inline — you watch everything. |
108
- | **Evidence trail** | No wave passes on a claim. `scripts/evidence.sh` captures command output. Chopper re-runs criteria. Mission report at closure one file any reviewer reads in 30 seconds. |
109
- | **State on disk** | `state.json` written at every wave boundary by `scripts/savepoint.sh`. Lane, files, blockers, token budget — all computed, zero model judgement. Resume reads one file. |
110
- | **Token budget** | Budget per lane. Warns at 1.5×, pauses at 3×. You decide: continue, split, or reduce. Cost surfaced in mission report — governance, not a kill switch. |
111
- | **Self-healing** | Brook reads entire blocker ledger after all verification waves. Groups failures, spawns parallel heal workers for independent fixes. Max 3 cycles. |
112
- | **Deterministic tooling** | `savepoint.sh` (state), `lane.sh` (sizing), `evidence.sh` (output capture), `mission-report.sh` (report). Scripts compute what models shouldn't remember. |
113
- | **Configurable gates** | Coverage thresholds in `.mugiwara/config`: `coverage_new=90`, `coverage_modified=80`. Raise for strict repos, lower for legacy. |
114
- | **3 autonomy modes** | Guided (ask everything), semi (auto branch/commit, plan needs GO), auto (hands-off except high-risk). All modes end at push + PR summary — no auto-merge. |
115
- | **3-layer skills** | 26 skills: trigger description (~150 chars) → body (≤120 lines) → 23 reference files (on demand). 5.2k char index budget — loaded every session. |
116
- | **Multi-actor safe** | Two engineers, one repo. Reset refuses without `--force`. Branch-scoped state. Shared lessons ledger. |
117
- | **Compliance matrix** | Rule compliance per model/tier/harness. Published with failures — Gemini tier 2 ≠ Claude tier 1. Documented, not hidden. |
118
- | **12 harnesses** | Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, pi, Windsurf, Cline, Kilo, Antigravity. 70+ more via skills.sh. Pure markdown, zero runtime. |
119
-
120
- ## Why this instead of just asking my agent?
121
-
122
- Your agent alone has no governance. It forgets context, skips verification, and
123
- burns tokens on small fixes the same way it does on architecture changes. There's
124
- no audit trail — when someone asks "what did the agent do?", you have nothing to
125
- show.
126
-
127
- Mugiwara wraps your agent in a team structure with defined roles, evidence gates,
128
- and cost tracking. The same discipline you'd expect from a senior engineering
129
- team — in your chat window, running inline, visible at every step.
95
+ | You say | What happens |
96
+ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
97
+ | `add search bar to products page` | Luffy triages → Nami plans 3 tasks → Zoro executes TDD → Chopper audits → Sanji runs quality → Franky gates → Robin reviews → code pushed, PR summary ready |
98
+ | `split payment system: gateway, ledger, fraud` | Nami interviews team → writes initiative plan with sub-missions + assignees → each dev works in own branch → `mugiwara initiative status` shows progress → all done → initiative closure |
99
+ | `Brook, fix the failing login test` | Healer reads failure ledger, root-cause fixes, proves fix ≤3 cycles |
100
+ | `Jinbe, audit auth middleware` | STRIDE + OWASP + dependency audit. Read-only — never touches code |
101
+ | `/mugiwara auto` | Switches to full autonomy from the next wave |
102
+
103
+ - **Full pipeline** when the task is big or direction is unclear
104
+ - **Direct agent** when you know exactly what you needsay the name
105
+ - **Slash commands** when you want to drive: `/mugiwara-plan`, `/mugiwara-review`, `/mugiwara-security`, `/mugiwara-ship`, `/mugiwara onboard`
106
+
107
+ [Full workflow walkthrough](docs/concepts/workflow.md)
130
108
 
131
109
  ## The crew
132
110
 
133
- 14 agents, 26 skills. The front door is the `using-mugiwara` skill type `/using-mugiwara` or load it from any platform. Each agent has a permission boundary.
134
-
135
- | Agent | Role | Permission |
136
- |-------|------|------------|
137
- | Luffy | Captain — triage, lane sizing, check-ins, closure | — |
138
- | Nami | Planner — interviews, scans codebase, writes scaled plans | — |
139
- | Zoro | Executor — TDD per task, commits per logical unit | **no-network** |
140
- | Chopper | Auditor — re-runs criteria, writes failure ledger, never fixes | **read-only** |
141
- | Sanji | Quality — format, lint, test. Never weakens configs | — |
142
- | Franky | Gates — coverage (configurable thresholds), build, DoD | — |
143
- | Robin | Reviewer — breaking-change map, five-axis, severity tagging | **read-only** |
144
- | Jinbe | Security — STRIDE, OWASP, secret scan, dependency audit | **read-only** |
145
- | Brook | Healer — reads ledger, parallel heal workers, max 3 cycles | — |
146
- | Skeptic | Adversarial verifier — doubts everything, never validates | **read-only** |
147
- | Usopp | Brainstorm — interrogates ideas, researches, recommends | — |
148
- | Resume | Continuity — rebuilds from state.json, never restarts | — |
149
- | Memory | Cross-mission lessons — read at start, write at closure | — |
150
-
151
- See [all 14 agents](docs/agents.md) and [all 26 skills](docs/skills.md).
111
+ 12 user-facing specialists (+3 internal). Each has role boundaries — auditors
112
+ and reviewers are read-only. Call them by name or let the pipeline auto-route.
152
113
 
153
- ## Install
114
+ | Agent | Role | Permission |
115
+ | -------------------- | --------------------------------------------------------------------------------------- | :-----------: |
116
+ | `luffy-orchestrator` | Captain — triage, check-ins, closure | — |
117
+ | `usopp-brainstorm` | Critical friend — interrogates, researches, recommends | — |
118
+ | `nami-planner` | Planner — interviews, full scan, scaled plans, team initiatives | — |
119
+ | `zoro-execution` | Executor — TDD per task, evidence per commit | — |
120
+ | `chopper-checkpoint` | Auditor — re-runs criteria, failure ledger | **read-only** |
121
+ | `sanji-quality` | Quality — format, lint, test, duplication, complexity, maintainability, code attributes | — |
122
+ | `franky-gates` | Gates — coverage, build, DoD, per-condition sonar gate | — |
123
+ | `robin-reviewer` | Reviewer — breaking-change map, reliability rating, code attribute deep review | **read-only** |
124
+ | `jinbe-security` | Security — STRIDE, OWASP, hotspots, SCA license, secret scan, responsibility | **read-only** |
125
+ | `brook-healing` | Healer — reads ledger, root-cause fixes ≤3 cycles | — |
126
+ | `onboarding-guide` | Onboarding wizard — 10Q guided setup, writes config | — |
127
+ | `resume-coordinator` | Resumer — rebuilds state from `.mugiwara/`, continues never restarts | — |
128
+
129
+ **Internal agents** (dispatch-only):
130
+
131
+ | Agent | Role | Used by |
132
+ | ------------------ | ----------------------------------------------------- | ------------------------------ |
133
+ | `skeptic-verifier` | Adversarial verifier — doubts every claim | Wave 4.5, high-stakes missions |
134
+ | `eval-runner` | Harness tester — task suites, judge rubric | `bun scripts/run-evals.ts` |
135
+ | `memory-keeper` | Lessons ledger — surface at start, capture at closure | Wave 0 (read), Wave 9 (write) |
136
+
137
+ → [Agent details: summoning, boundaries, parameters](docs/concepts/agents.md)
138
+
139
+ ## How much it costs
140
+
141
+ Mugiwara itself is free. Token usage depends on mission lane:
142
+
143
+ | Lane | Waves | Typical tokens |
144
+ | ------------------- | :---: | :------------: |
145
+ | Direct (typo) | 0 | ~0 |
146
+ | Lean (small bug) | 2 | ~4k |
147
+ | Standard (feature) | 5–7 | ~10k |
148
+ | Full (architecture) | 9–11 | ~20k |
149
+
150
+ Usage tracked in `.mugiwara/state.json` per mission. Budget warns at 1.5×,
151
+ pauses at 3×.
154
152
 
155
- Mugiwara installs as a native plugin on every platform. Full details in the per-platform guides.
153
+ [Full cost model](docs/concepts/cost.md)
156
154
 
157
- | Platform | Guide |
158
- |----------|-------|
159
- | **Claude Code** | [`/plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara@mugiwara`](docs/install-claude.md) |
160
- | **OpenCode** | [`{ "plugin": ["@ionivetech/mugiwara"] }`](docs/install-opencode.md) |
161
- | **Gemini CLI** | [`gemini extensions install https://github.com/ionivetech/mugiwara`](docs/install-gemini.md) |
162
- | **Codex** | [`codex plugin marketplace add ionivetech/mugiwara && codex plugin add mugiwara@mugiwara`](docs/install-codex.md) |
163
- | **Copilot** | [`copilot plugin install https://github.com/ionivetech/mugiwara`](docs/install-copilot.md) |
164
- | **Cursor** | [`/add-plugin mugiwara`](docs/install-cursor.md) |
165
- | **Antigravity** | [`agy plugin install https://github.com/ionivetech/mugiwara`](docs/install-antigravity.md) |
166
- | **Kimi** | [`/plugins install https://github.com/ionivetech/mugiwara`](docs/install-kimi.md) |
167
- | **Pi** | [`pi install git:github.com/ionivetech/mugiwara`](docs/install-pi.md) |
168
- | **Windsurf / Cline / Kilo** | [`npx @ionivetech/mugiwara install --target <id> --yes`](docs/install-cli.md) |
155
+ ## Configuration
156
+
157
+ Switch mode any time: `/mugiwara guided | semi | auto`. Or edit `.mugiwara/config`:
158
+
159
+ | Key | Default | What |
160
+ | ------------------- | ------------------------------- | ---------------------------------------------- |
161
+ | `mode` | guided | guided / semi / auto |
162
+ | `branch` | `feature/{type}-{issue}-{slug}` | Branch naming |
163
+ | `commit` | conventional | conventional / gitmoji / plain |
164
+ | `base` | main | PR target branch |
165
+ | `coverage_new` | 90 | Coverage threshold for new files (%) |
166
+ | `coverage_modified` | 80 | Coverage threshold for modified files (%) |
167
+ | `review_depth` | full | full / standard / quick — Robin's review depth |
168
+ | `quality_depth` | full | full / standard / quick — Sanji's check depth |
169
+
170
+ Set via `/mugiwara onboard` or edit directly. Unknown keys ignored. Project
171
+ config (`.mugiwara/config`) overrides global (`~/.mugiwara/config`).
172
+
173
+ → [All config keys](docs/concepts/config.md) · [Mode details](docs/concepts/modes.md)
174
+
175
+ ## Quick reference
176
+
177
+ | Need | Command / Doc |
178
+ | ----------------------- | ---------------------------------------- |
179
+ | First-time setup | `/mugiwara onboard` |
180
+ | Plan a feature | `/mugiwara-plan` or just describe it |
181
+ | Review a PR diff | `/mugiwara-review` or "review this PR" |
182
+ | Security audit | `/mugiwara-security` or "Jinbe, audit X" |
183
+ | Ship gate check | `/mugiwara-ship` |
184
+ | See initiative progress | `mugiwara initiative status <plan>` |
185
+ | Resume a mission | `/mugiwara resume plan <name>` |
186
+ | Switch mode | `/mugiwara guided\|semi\|auto` |
187
+ | Check gate locally | `bun run gate` |
188
+ | All docs | [docs/](docs/) |
169
189
 
170
- **[Full install guide with troubleshooting](docs/install.md)**
190
+ ## Install
171
191
 
172
- ### Claude Code
192
+ <details>
193
+ <summary><b>Claude Code</b></summary>
173
194
 
174
195
  ```bash
175
- /plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara@mugiwara
196
+ /plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara
176
197
  ```
177
198
 
178
- Update: `/plugin update mugiwara`
179
199
  Uninstall: `/plugin uninstall mugiwara`
180
200
 
181
- ### OpenCode
201
+ </details>
202
+
203
+ <details>
204
+ <summary><b>OpenCode</b></summary>
182
205
 
183
206
  Add to `opencode.json`:
184
207
 
@@ -186,155 +209,155 @@ Add to `opencode.json`:
186
209
  { "plugin": ["@ionivetech/mugiwara"] }
187
210
  ```
188
211
 
189
- Update: replace the plugin entry version, or `npm update @ionivetech/mugiwara`
190
- Uninstall: remove the plugin entry from `opencode.json`.
212
+ Uninstall: remove `"@ionivetech/mugiwara"` from `opencode.json` plugins array
191
213
 
192
- Restart opencode after install.
214
+ </details>
193
215
 
194
- ### Gemini CLI
216
+ <details>
217
+ <summary><b>Gemini CLI</b></summary>
195
218
 
196
219
  ```bash
197
220
  gemini extensions install https://github.com/ionivetech/mugiwara
198
221
  ```
199
222
 
200
- Update: `gemini extensions update mugiwara`
201
- Uninstall: `gemini extensions remove mugiwara`
223
+ Uninstall: `gemini extensions uninstall mugiwara`
202
224
 
203
- ### Codex
225
+ </details>
226
+
227
+ <details>
228
+ <summary><b>Codex</b></summary>
204
229
 
205
230
  ```bash
206
231
  codex plugin marketplace add ionivetech/mugiwara && codex plugin add mugiwara@mugiwara
207
232
  ```
208
233
 
209
- Update: `codex plugin update mugiwara`
210
- Uninstall: `codex plugin remove mugiwara`
234
+ Uninstall: `codex plugin remove mugiwara@mugiwara`
235
+
236
+ </details>
211
237
 
212
- ### GitHub Copilot
238
+ <details>
239
+ <summary><b>GitHub Copilot</b></summary>
213
240
 
214
241
  ```bash
215
242
  copilot plugin install https://github.com/ionivetech/mugiwara
216
243
  ```
217
244
 
218
- Update: reinstall with the same command.
219
245
  Uninstall: `copilot plugin uninstall mugiwara`
220
246
 
221
- ### Cursor
247
+ </details>
222
248
 
223
- ```
249
+ <details>
250
+ <summary><b>Cursor</b></summary>
251
+
252
+ ```bash
224
253
  /add-plugin mugiwara
225
254
  ```
226
255
 
227
- Update: re-run `/add-plugin mugiwara`.
228
256
  Uninstall: `/remove-plugin mugiwara`
229
257
 
230
- ### Antigravity
258
+ </details>
259
+
260
+ <details>
261
+ <summary><b>Antigravity</b></summary>
231
262
 
232
263
  ```bash
233
264
  agy plugin install https://github.com/ionivetech/mugiwara
234
265
  ```
235
266
 
236
- Update: reinstall with the same command.
237
267
  Uninstall: `agy plugin uninstall mugiwara`
238
268
 
239
- ### Kimi
269
+ </details>
240
270
 
241
- ```
271
+ <details>
272
+ <summary><b>Kimi</b></summary>
273
+
274
+ ```bash
242
275
  /plugins install https://github.com/ionivetech/mugiwara
243
276
  ```
244
277
 
245
- Update: reinstall.
246
- Uninstall: `/plugins remove mugiwara`
278
+ Uninstall: `/plugins uninstall mugiwara`
279
+
280
+ </details>
247
281
 
248
- ### Pi
282
+ <details>
283
+ <summary><b>Pi</b></summary>
249
284
 
250
285
  ```bash
251
286
  pi install git:github.com/ionivetech/mugiwara
252
287
  ```
253
288
 
254
- ### Windsurf · Cline · Kilo · Codex CLI
289
+ Uninstall: `pi uninstall mugiwara`
290
+
291
+ </details>
292
+
293
+ <details>
294
+ <summary><b>Windsurf / Cline / Kilo</b> — CLI install</summary>
255
295
 
256
296
  ```bash
257
- npx @ionivetech/mugiwara@latest install --project . --target all --yes
297
+ npx @ionivetech/mugiwara@latest install --target <id> --yes
258
298
  ```
259
299
 
260
- Substitute `all` with a specific target: `windsurf`, `cline`, `kilo`, `codex`, etc.
300
+ Uninstall: `npx @ionivetech/mugiwara@latest uninstall`
261
301
 
262
- Update: `mugiwara update`
263
- Uninstall: `mugiwara uninstall`
302
+ Targets: `windsurf`, `cline`, `kilo`, `codex`.
264
303
 
265
- ### Any agent (skills only)
304
+ </details>
305
+
306
+ <details>
307
+ <summary><b>Global CLI</b> — shorter commands after first install</summary>
266
308
 
267
309
  ```bash
268
- npx skills add ionivetech/mugiwara # 70+ agents via skills.sh
310
+ npm i -g @ionivetech/mugiwara
311
+ mugiwara install --target all --yes
269
312
  ```
270
313
 
271
- ### One-liner
314
+ Uninstall: `mugiwara uninstall`
272
315
 
273
- ```bash
274
- # macOS / Linux
275
- curl -fsSL https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.sh | bash
276
- # Windows
277
- irm https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.ps1 | iex
278
- ```
316
+ </details>
279
317
 
280
- Requires **Node.js >= 20.11**.
318
+ All platforms get the full crew — 12 agents, 26 skills (+3 internal agents).
319
+ No per-platform feature gaps.
281
320
 
282
- ## Configuration
321
+ [Per-platform guides](docs/install/index.md)
283
322
 
284
- `.mugiwara/config` (project) overrides `~/.mugiwara/config` (global).
323
+ ## Update
285
324
 
286
- | Key | Default | Meaning |
287
- |-----|---------|---------|
288
- | `mode` | guided | Autonomy: guided / semi / auto |
289
- | `branch` | `feature/{type}-{issue}-{slug}` | Branch naming |
290
- | `commit` | conventional | conventional / gitmoji / plain |
291
- | `base` | main | PR target branch |
292
- | `coverage_new` | 90 | Coverage threshold for new files |
293
- | `coverage_modified` | 80 | Coverage threshold for modified files |
325
+ ```bash
326
+ npm update @ionivetech/mugiwara # npm-based
327
+ /plugin update mugiwara # marketplace-based
328
+ # Reinstall with same install command # GitHub-based
329
+ ```
294
330
 
295
- [Full config ](docs/config.md)
331
+ [Full update reference](docs/install/index.md)
296
332
 
297
333
  ## CLI
298
334
 
299
335
  ```bash
300
- mugiwara install # wizard (interactive)
301
- mugiwara install --project . --target all --yes # non-interactive
302
- mugiwara update # replace existing files
303
- mugiwara uninstall # remove what manifest recorded
304
- mugiwara list # show installations
305
- mugiwara reset --keep-logs # wipe mission state, keep lessons
306
- mugiwara reset --force # override multi-actor guard
336
+ mugiwara install # wizard (interactive)
337
+ mugiwara install --target all --yes # non-interactive
338
+ mugiwara update --target <id> --yes # overwrite to latest
339
+ mugiwara uninstall # remove installed files
340
+ mugiwara list # show installations
341
+ mugiwara list --check # health check
342
+ mugiwara reset --keep-logs # wipe state, keep lessons
307
343
  ```
308
344
 
309
- ## When not to use mugiwara
345
+ ## Docs
310
346
 
311
- - **Autonomous marathon runs** the agent disappears for hours. Use superpowers.
312
- - **Deep per-skill reference encyclopedia** — use agent-skills.
313
- - **A deployable runtime** — use LangGraph / CrewAI.
314
- - **One large instruction with no ceremony** — use a mega-prompt.
347
+ **Start here:** [Getting started](docs/getting-started.md) · [What mugiwara replaces](docs/concepts/comparison.md)
315
348
 
316
- Mugiwara is for visibility, governance, and cost awareness. If those don't
317
- matter to you, this is the wrong tool.
349
+ **Concepts:** [Workflow](docs/concepts/workflow.md) · [Lanes](docs/concepts/lanes.md) · [Modes](docs/concepts/modes.md) · [Execution model](docs/concepts/execution-model.md) · [Git strategy](docs/concepts/git-strategy.md) · [Config](docs/concepts/config.md) · [Cost](docs/concepts/cost.md) · [Audit trail](docs/concepts/audit-trail.md)
318
350
 
319
- ## Docs
351
+ **Crew:** [Agents](docs/concepts/agents.md) · [Skills](docs/concepts/skills.md)
352
+
353
+ **Reference:** [Agent anatomy](docs/reference/agent-anatomy.md) · [Skill anatomy](docs/reference/skill-anatomy.md) · [Harness matrix](docs/reference/harness-matrix.md) · [Compliance matrix](docs/reference/compliance-matrix.md) · [Developer onboarding](docs/reference/developer-onboarding.md)
354
+
355
+ **Install per platform:** [Overview](docs/install/index.md) · [Claude](docs/install/claude.md) · [opencode](docs/install/opencode.md) · [Gemini](docs/install/gemini.md) · [Codex](docs/install/codex.md) · [Copilot](docs/install/copilot.md) · [CLI targets](docs/install/cli.md)
356
+
357
+ **Troubleshooting:** [Common problems](docs/troubleshooting.md)
320
358
 
321
- | Doc | What it covers |
322
- |-----|---------------|
323
- | [Getting started](docs/getting-started.md) | First mission, lane 0-3 examples, setup walkthrough |
324
- | [Install](docs/install.md) | Per-platform guides: Claude Code, OpenCode, Gemini, Codex, Copilot, Cursor, Antigravity, Kimi, Pi, CLI |
325
- | [Workflow](docs/workflow.md) | Full 9-wave pipeline with heal loop detail |
326
- | [Agents](docs/agents.md) | 14 crew members, roles, permissions, how to summon |
327
- | [Skills](docs/skills.md) | 26 techniques, 3-layer disclosure model |
328
- | [Lanes](docs/lanes.md) | Deterministic lane sizing — computed from git diff |
329
- | [Audit trail](docs/audit-trail.md) | 15 artifact types, how to read as reviewer |
330
- | [Cost model](docs/cost.md) | Index/body/references layers, cost per lane |
331
- | [Harness matrix](docs/harness-matrix.md) | Tier 1/2/3 — what differs per harness |
332
- | [Config](docs/config.md) | All `.mugiwara/config` keys with defaults |
333
- | [Modes](docs/modes.md) | Guided / semi / auto autonomy levels |
334
- | [Compliance matrix](docs/compliance-matrix.md) | Rule compliance per model — published with failures |
335
- | [Comparison](docs/comparison.md) | Positioning. When to use mugiwara vs something else. |
336
- | [Roadmap](ROADMAP.md) | Now — Next — Then — After |
359
+ **Roadmap:** [ROADMAP.md](ROADMAP.md)
337
360
 
338
361
  ## License
339
362
 
340
- MIT. Copyright (c) 2026 ionive.
363
+ MIT. Copyright (c) 2026 ionivetech.
@@ -1,11 +1,21 @@
1
1
  ---
2
2
  name: brook-healing
3
- description: Persona for mugiwara-healing. Root-cause healer: reads entire blocker ledger, triages + groups failures, spawns parallel heal workers for independent fixes, max 3 cycles.
4
- skills: mugiwara-healing, mugiwara-git, mugiwara-sunset, mugiwara-root-cause
3
+ description: Persona for mugiwara-healing. Root-cause healer: reads blocker ledger, triages failures, spawns parallel heal workers, max 3 cycles.
4
+ skills: mugiwara-healing, mugiwara-git, mugiwara-sunset, mugiwara-root-cause, mugiwara-orchestration
5
+ write-scope: source
5
6
  ---
6
7
 
7
8
  # Brook — Healing (Musician)
8
9
 
10
+ ## Before you start
11
+
12
+ 1. Read `.mugiwara/state.json` for this branch.
13
+ 2. No active mission → announce `## Wave 0 — Luffy (triage)`, classify the request, size the lane (`scripts/lane.sh`), read the mode, write the decision log, run `scripts/savepoint.sh`.
14
+ 3. Mission owned by another actor → stop, report the owner, ask.
15
+ 4. `base_sha` no longer an ancestor of HEAD → report drift, ask before continuing.
16
+ 5. Not a git repo → lane defaults to `standard`, state in-memory; say so once.
17
+ 6. Announce `→ Wave N — <crew>`. **If triage routed elsewhere, say so and stop.** Being summoned is not authorisation to do another crew member's job.
18
+
9
19
  ## Role
10
20
 
11
21
  Self-healing: repairs what failed in earlier waves, minimally, and proves each fix. Reads the failure ledger and works it down.
@@ -31,7 +41,11 @@ Wave 8 of `mugiwara-workflow`, with failure inputs from Chopper/Sanji/Franky/Rob
31
41
 
32
42
  ## Output
33
43
 
34
- Fixed list + escalated list in `.mugiwara/results/<mission>-healing.md` → summarized inline → back to Wave 4 (Chopper) for re-audit.
44
+ Fixed list + escalated list in `.mugiwara/results/<mission>/05-healing.md` → summarized inline → back to Wave 4 (Chopper) for re-audit.
45
+
46
+ ## Return to Luffy
47
+
48
+ Your output returns to Luffy. You do not choose the next step and you do not dispatch another crew member. Any decision outside your role — scope, lane, whether to build, who runs next — is Luffy's, always.
35
49
 
36
50
  ## Red flags
37
51