@ionivetech/mugiwara 0.4.0 → 0.5.1

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 (128) hide show
  1. package/README.md +231 -371
  2. package/content/agents/brook-healing.md +2 -2
  3. package/content/agents/chopper-checkpoint.md +2 -1
  4. package/content/agents/eval-runner.md +4 -4
  5. package/content/agents/franky-gates.md +1 -1
  6. package/content/agents/jinbe-security.md +2 -1
  7. package/content/agents/luffy-orchestrator.md +3 -3
  8. package/content/agents/memory-keeper.md +1 -1
  9. package/content/agents/nami-planner.md +2 -2
  10. package/content/agents/resume-coordinator.md +8 -9
  11. package/content/agents/robin-reviewer.md +3 -2
  12. package/content/agents/sanji-quality.md +1 -1
  13. package/content/agents/skeptic-verifier.md +4 -3
  14. package/content/agents/using-mugiwara.md +3 -3
  15. package/content/agents/usopp-brainstorm.md +3 -3
  16. package/content/agents/zoro-execution.md +4 -3
  17. package/content/skills/mugiwara-agent-security/SKILL.md +14 -2
  18. package/content/skills/mugiwara-backend/SKILL.md +2 -8
  19. package/content/skills/mugiwara-backend/references/source-backed-example.md +77 -0
  20. package/content/skills/mugiwara-brainstorm/SKILL.md +2 -2
  21. package/content/skills/mugiwara-checkpoint/SKILL.md +2 -2
  22. package/content/skills/mugiwara-checkpoint/references/ledger-format.md +34 -0
  23. package/content/skills/{mugiwara-doubt-driven-development → mugiwara-claim-audit}/SKILL.md +2 -2
  24. package/content/skills/{mugiwara-context-engineering → mugiwara-context-budget}/SKILL.md +2 -2
  25. package/content/skills/mugiwara-context-budget/references/context-budget.md +37 -0
  26. package/content/skills/{mugiwara-api-and-interface-design → mugiwara-contract-first}/SKILL.md +4 -2
  27. package/content/skills/mugiwara-contract-first/references/versioning-playbook.md +36 -0
  28. package/content/skills/mugiwara-execution/SKILL.md +4 -2
  29. package/content/skills/mugiwara-execution/references/worked-example.md +88 -0
  30. package/content/skills/mugiwara-frontend/SKILL.md +13 -14
  31. package/content/skills/mugiwara-frontend/references/design-tokens.md +25 -0
  32. package/content/skills/mugiwara-frontend/references/slop-catalog.md +19 -0
  33. package/content/skills/mugiwara-gates/SKILL.md +4 -4
  34. package/content/skills/mugiwara-git/SKILL.md +1 -1
  35. package/content/skills/mugiwara-healing/SKILL.md +34 -7
  36. package/content/skills/mugiwara-healing/references/failure-taxonomy.md +23 -0
  37. package/content/skills/mugiwara-lessons/SKILL.md +1 -1
  38. package/content/skills/mugiwara-orchestration/SKILL.md +5 -5
  39. package/content/skills/mugiwara-planning/SKILL.md +2 -2
  40. package/content/skills/mugiwara-planning/references/anti-patterns.md +17 -0
  41. package/content/skills/mugiwara-planning/references/plan-template.md +46 -0
  42. package/content/skills/mugiwara-pr/SKILL.md +1 -1
  43. package/content/skills/{mugiwara-test-driven-development → mugiwara-proof-order}/SKILL.md +2 -2
  44. package/content/skills/mugiwara-proof-order/references/proof-order-examples.md +62 -0
  45. package/content/skills/mugiwara-quality/SKILL.md +3 -3
  46. package/content/skills/mugiwara-resume/SKILL.md +44 -33
  47. package/content/skills/mugiwara-review/SKILL.md +1 -1
  48. package/content/skills/mugiwara-review/references/five-axis-worksheet.md +36 -0
  49. package/content/skills/mugiwara-review/references/severity-rubric.md +20 -0
  50. package/content/skills/{mugiwara-systematic-debugging → mugiwara-root-cause}/SKILL.md +4 -2
  51. package/content/skills/mugiwara-root-cause/references/four-phase-worked.md +71 -0
  52. package/content/skills/mugiwara-security/SKILL.md +1 -1
  53. package/content/skills/mugiwara-security/references/owasp-mapping.md +30 -0
  54. package/content/skills/mugiwara-security/references/stride-worksheet.md +37 -0
  55. package/content/skills/mugiwara-ship/SKILL.md +1 -1
  56. package/content/skills/{mugiwara-deprecation → mugiwara-sunset}/SKILL.md +2 -2
  57. package/content/skills/mugiwara-testcases/SKILL.md +1 -1
  58. package/content/skills/mugiwara-testcases/references/intake-formats.md +42 -0
  59. package/content/skills/mugiwara-workflow/SKILL.md +20 -23
  60. package/dist/mugiwara.js +37 -8
  61. package/docs/agents.md +2 -2
  62. package/docs/audit-trail.md +65 -0
  63. package/docs/comparison.md +43 -170
  64. package/docs/compliance-matrix.md +81 -0
  65. package/docs/config.md +4 -2
  66. package/docs/cost.md +45 -0
  67. package/docs/enforcement.md +32 -35
  68. package/docs/getting-started.md +103 -41
  69. package/docs/harness-matrix.md +41 -0
  70. package/docs/lanes.md +65 -23
  71. package/docs/skill-anatomy.md +42 -54
  72. package/docs/skills.md +36 -54
  73. package/evals/cases/_no-skill.json +16 -0
  74. package/evals/cases/adversarial-pressure-fake-pass.json +21 -8
  75. package/evals/cases/adversarial-pressure-skip-review.json +19 -7
  76. package/evals/cases/lane-exploratory-vague.json +18 -6
  77. package/evals/cases/lane-sensitivity-payment.json +18 -6
  78. package/evals/cases/positive-refactor-existing-tests.json +22 -8
  79. package/evals/cases/positive-resume-mid-mission.json +20 -7
  80. package/evals/cases/routing-agent-security.json +25 -0
  81. package/evals/cases/routing-auth-feature.json +20 -7
  82. package/evals/cases/routing-backend.json +25 -0
  83. package/evals/cases/routing-bug-one-file.json +21 -8
  84. package/evals/cases/routing-claim-audit.json +25 -0
  85. package/evals/cases/routing-context-budget.json +25 -0
  86. package/evals/cases/routing-contract-first.json +25 -0
  87. package/evals/cases/routing-execution.json +25 -0
  88. package/evals/cases/routing-frontend.json +26 -0
  89. package/evals/cases/routing-gates.json +25 -0
  90. package/evals/cases/routing-git.json +25 -0
  91. package/evals/cases/routing-healing.json +25 -0
  92. package/evals/cases/routing-lessons.json +25 -0
  93. package/evals/cases/routing-orchestration.json +25 -0
  94. package/evals/cases/routing-planning.json +26 -0
  95. package/evals/cases/routing-pr.json +25 -0
  96. package/evals/cases/routing-proof-order.json +25 -0
  97. package/evals/cases/routing-quality.json +25 -0
  98. package/evals/cases/routing-ship.json +26 -0
  99. package/evals/cases/routing-sunset.json +25 -0
  100. package/evals/cases/routing-workflow.json +25 -0
  101. package/evals/floor.json +6 -0
  102. package/package.json +6 -4
  103. package/references/definition-of-done.md +42 -0
  104. package/references/multi-actor.md +44 -0
  105. package/references/skill-versioning.md +44 -0
  106. package/references/source-grounding.md +23 -0
  107. package/references/token-budget.md +34 -0
  108. package/scripts/evidence.sh +37 -0
  109. package/scripts/lane.sh +74 -0
  110. package/scripts/mission-report.sh +88 -0
  111. package/scripts/probe.ts +40 -0
  112. package/scripts/release-notes.ts +65 -0
  113. package/scripts/retrieval-eval.ts +261 -0
  114. package/scripts/run-evals.ts +149 -0
  115. package/scripts/savepoint.sh +166 -0
  116. package/scripts/sync-version.ts +30 -0
  117. package/scripts/validate-content.ts +226 -0
  118. package/src/cli.ts +8 -3
  119. package/src/mission.ts +26 -3
  120. package/content/skills/mugiwara-dynamic-workflow/SKILL.md +0 -90
  121. package/content/skills/mugiwara-eval/SKILL.md +0 -87
  122. package/content/skills/mugiwara-git-worktrees/SKILL.md +0 -67
  123. package/content/skills/mugiwara-mode/SKILL.md +0 -77
  124. package/content/skills/mugiwara-observability/SKILL.md +0 -59
  125. package/content/skills/mugiwara-writing-skills/SKILL.md +0 -65
  126. package/evals/cases/negative-secrets-typo.json +0 -12
  127. package/evals/cases/negative-security-docs-change.json +0 -12
  128. package/evals/cases/routing-typo.json +0 -13
package/README.md CHANGED
@@ -3,448 +3,308 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@ionivetech%2fmugiwara)](https://www.npmjs.com/package/@ionivetech/mugiwara)
4
4
  [![License: MIT](https://img.shields.io/github/license/ionivetech/mugiwara)](https://github.com/ionivetech/mugiwara/blob/main/LICENSE)
5
5
 
6
- **The Straw Hat crew of AI agents and skills.** A complete software
7
- development workflow for your coding agent triage, planning, execution,
8
- verification, review, and shipping with the discipline of a senior
9
- engineering team.
10
-
11
- Mugiwara is pure markdown. No daemons, no servers, no plugin to babysit. Your
12
- existing coding agent reads the skills and runs them itself. It works across
13
- 12 coding agents — Claude Code, opencode, Gemini CLI, Codex, Cursor, Copilot,
14
- Kimi, pi, Windsurf, Cline, Kilo Code, and Antigravity — and installs into
15
- 70+ more as plain skills.
16
-
17
- ```
18
- TRIAGE PLAN BUILD VERIFY REVIEW SHIP
19
- ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
20
- │ Luffy │ ──▶ │ Nami │ ──▶ │ Zoro │ ──▶ │ Chopper │ ──▶ │ Robin + │ ──▶ │ push + │
21
- │ 5-way │ │ waves + │ │ TDD per │ │ Sanji + │ │ Jinbe │ │ ready PR │
22
- │ triage │ │ tasks │ │ task │ │ Franky │ │ review+ │ │ summary │
23
- └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
24
- ↰ exploratory → Usopp brainstorms fail → Brook heals ↺ Wave 4
25
- ```
26
-
27
- ## Why mugiwara
28
-
29
- - **It just starts.** Give a non-trivial request — "add dark mode to the
30
- settings page" — and the crew runs the pipeline in your main conversation,
31
- with a compact checkpoint report at every stage. Nothing hides behind a
32
- subagent click; you can interrupt any time.
33
- - **The work is sized before it runs.** A one-file typo runs zero waves. An
34
- architecture change runs all nine. Luffy routes each mission to a lane, so a
35
- tiny fix never pays the price of a big feature — and a sensitive change never
36
- sneaks through the lean path.
37
- - **Evidence over claims.** No wave passes on a spoken "it works." The owning
38
- agent runs the checks and shows output. Every skill also knows when it does
39
- *not* apply — and says so, out loud.
40
- - **It remembers.** Mission state lives in `.mugiwara/` — plans, results, a
41
- failure ledger, and a lessons file. Lose context mid-mission and the crew
42
- rebuilds from disk instead of restarting.
43
- - **You stay in control.** The crew pushes the branch and hands you a
44
- ready-to-paste PR summary. It never creates a PR, merges, or deploys on its
45
- own. Three autonomy levels — guided, semi, auto — decide how much it does
46
- without asking.
6
+ Your coding agent becomes a governed engineering team. 15 specialists triage,
7
+ plan, build, audit, review, healwith evidence at every step, cost tracking,
8
+ and a process that sizes itself to your work. Pure markdown, zero runtime.
47
9
 
48
10
  ## Quick start
49
11
 
50
- Install into your harness in one command, then just ask:
51
-
52
12
  ```bash
53
13
  # Claude Code
54
14
  /plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara
55
15
 
56
- # opencode
57
- { "plugin": ["@ionivetech/mugiwara"] } # add to opencode.json
16
+ # opencode — add to opencode.json
17
+ { "plugin": ["@ionivetech/mugiwara"] }
58
18
 
59
- # or via CLI for any target
60
- npx @ionivetech/mugiwara@latest --project ./my-app --target all --yes
19
+ # CLI for any target
20
+ npx @ionivetech/mugiwara@latest --project . --target all --yes
61
21
  ```
62
22
 
63
- ```text
64
- > add dark mode to the settings page
65
- ```
23
+ Then just ask. The crew auto-activates — no agent names to remember.
66
24
 
67
- The crew announces itself at session start and routes the request. See
68
- [docs/getting-started.md](docs/getting-started.md) for the full walkthrough.
69
-
70
- ---
71
-
72
- ## The crew — 15 agents
73
-
74
- Each agent is a focused specialist. The main thread embodies each role inline
75
- using its skill; you can also summon any member directly by name. "Dispatch"
76
- means *route the mission to this role* — crew members never dispatch each other.
77
-
78
- | Agent | Crew member | Role | Summon for |
79
- |-------|-------------|------|------------|
80
- | `using-mugiwara` | Front Door | Router — classifies and routes, never implements | any new mission |
81
- | `luffy-orchestrator` | Luffy | Captain — 5-way triage, lane sizing, check-ins, closure | mission start, escalations |
82
- | `usopp-brainstorm` | Usopp | Critical friend — interrogates ideas, researches, no rubber-stamps | vague ideas, direction, options |
83
- | `nami-planner` | Nami | Planner — interview-first, full-context scan, scaled plans | turning an idea into a plan |
84
- | `zoro-execution` | Zoro | Executor — todo list first, inline tasks, parallel worker batches, evidence per task | executing an approved plan |
85
- | `chopper-checkpoint` | Chopper | Auditor — re-verifies every acceptance criterion, writes the failure ledger, never fixes | auditing a wave's results |
86
- | `sanji-quality` | Sanji | Quality — discovers real tooling, format / lint / test | after checkpoint passes |
87
- | `franky-gates` | Franky | Gates — coverage, build, Definition of Done, binary verdicts | after quality checks |
88
- | `robin-reviewer` | Robin | Reviewer — doubt-driven diff review, breaking-change map first | after gates pass |
89
- | `jinbe-security` | Jinbe | Security — STRIDE, OWASP, secrets, injection, auth, dependencies | security audit of a diff |
90
- | `brook-healing` | Brook | Healer — reads the ledger, root-cause fixes, proves each fix, ≤3 cycles | any wave produced failures |
91
- | `skeptic-verifier` | Skeptic | Adversarial verifier — doubts every output, never validates | high-stakes verdicts, plans, reviews |
92
- | `eval-runner` | Eval Runner | Harness tester — task suites, rubric comparison, pass/fail | verifying mugiwara itself works |
93
- | `resume-coordinator` | Resume Coordinator | Resumer — rebuilds from `.mugiwara/`, continues never restarts | context loss, new session mid-mission |
94
- | `memory-keeper` | Memory Keeper | Institutional memory — surfaces past lessons, captures new ones | mission start + closure |
95
-
96
- Say a name and the role embodies itself:
25
+ ## What it looks like
97
26
 
98
- ```
99
- > Chopper, audit the last wave against the plan
100
- > Nami, plan this out
101
- ```
27
+ You ask:
102
28
 
103
- Luffy still records the route and its reason, and direct calls do not skip
104
- check-ins. See [docs/agents.md](docs/agents.md).
105
-
106
- ---
107
-
108
- ## The techniques — 32 skills
109
-
110
- Skills are the actual product: portable markdown playbooks that tell the agent
111
- *how* to do each phase well. Agents are the personas; skills are the
112
- knowledge. Every skill declares **when to use it** and **when to skip it**.
113
-
114
- ### The pipeline
115
-
116
- | Skill | Used when |
117
- |-------|-----------|
118
- | `mugiwara-workflow` | starting any non-trivial mission — the harness entry point |
119
- | `mugiwara-orchestration` | triaging a new mission, coordinating waves, closing out |
120
- | `mugiwara-brainstorm` | exploring a vague idea or architecture choice before planning |
121
- | `mugiwara-planning` | turning an approved idea or spec into an execution plan |
122
- | `mugiwara-execution` | executing an approved wave-structured plan |
123
- | `mugiwara-checkpoint` | auditing a wave's results against the plan, criterion by criterion |
124
- | `mugiwara-healing` | earlier waves produced failures — test, gate, review, or security findings |
125
- | `mugiwara-resume` | a mission was interrupted, context lost, or a new session starts mid-mission |
126
- | `mugiwara-mode` | reading or changing the autonomy level (guided / semi / auto) |
127
-
128
- ### Engineering practice
129
-
130
- | Skill | Used when |
131
- |-------|-----------|
132
- | `mugiwara-test-driven-development` | writing code during execution — RED-GREEN-REFACTOR |
133
- | `mugiwara-testcases` | a mission declares user-provided test cases or acceptance criteria |
134
- | `mugiwara-systematic-debugging` | a bug, crash, or unexplained regression needs root-cause discipline |
135
- | `mugiwara-api-and-interface-design` | designing or reviewing an API, interface, or inter-service contract |
136
- | `mugiwara-doubt-driven-development` | an in-flight decision is cheap to verify now but costly to reverse later |
137
- | `mugiwara-context-engineering` | working in a large codebase, long session, or near the context limit |
138
- | `mugiwara-git` | committing, splitting commits, or debugging via git history |
139
- | `mugiwara-git-worktrees` | running parallel branches without polluting the working tree |
140
- | `mugiwara-deprecation` | retiring code or steering users onto a replacement |
141
- | `mugiwara-frontend` | any frontend implementation or redesign — anti-slop, WCAG 2.1 AA |
142
- | `mugiwara-backend` | implementing or reviewing backend/server code |
143
- | `mugiwara-agent-security` | reviewing the agent layer itself — injection, poisoning, excessive agency |
144
-
145
- ### Verification & review
146
-
147
- | Skill | Used when |
148
- |-------|-----------|
149
- | `mugiwara-quality` | running format / lint / test after checkpoint passes |
150
- | `mugiwara-gates` | enforcing coverage, build, and Definition of Done |
151
- | `mugiwara-review` | reviewing the diff adversarially after gates pass |
152
- | `mugiwara-security` | running the security audit of a diff or system |
153
- | `mugiwara-ship` | running the pre-launch gate before anything reaches users |
154
-
155
- ### Team & meta
156
-
157
- | Skill | Used when |
158
- |-------|-----------|
159
- | `mugiwara-pr` | pushing the branch and preparing the PR material at closure |
160
- | `mugiwara-lessons` | reading/writing the cross-mission lessons ledger |
161
- | `mugiwara-observability` | tracing how the crew ran a mission |
162
- | `mugiwara-dynamic-workflow` | a mission has many subtasks, needs comparison, or risks agent bias |
163
- | `mugiwara-eval` | verifying a mugiwara skill or agent actually works |
164
- | `mugiwara-writing-skills` | authoring or revising a mugiwara skill |
165
-
166
- Every install ships the full set — no project-type selection. The harness
167
- routes each task to the right skill, and a skill with nothing to do says so and
168
- steps aside. See [docs/skills.md](docs/skills.md) for the anatomy and
169
- [docs/skill-anatomy.md](docs/skill-anatomy.md) for the format spec.
170
-
171
- ---
172
-
173
- ## How mugiwara works
174
-
175
- ### Auto-activation
176
-
177
- At session start the crew is announced. Give a non-trivial request and the
178
- pipeline runs by itself — no command to remember. `/using-mugiwara` remains an
179
- optional router if you want to hand-route a mission.
180
-
181
- ### Sizing: the lanes
182
-
183
- At Wave 0, Luffy sizes the request and picks a lane. The lane decides how many
184
- waves run:
185
-
186
- | Lane | Picks when | Waves |
187
- |------|-----------|-------|
188
- | **0 · Direct** | typo, rename, one file under 20 lines | none |
189
- | **1 · Lean** | bug in 1-2 files, under 50 lines | execute → quality |
190
- | **2 · Standard** | feature, 3-8 files | plan → execute → checkpoint → review |
191
- | **3 · Full** | architecture, migration, auth/payment, API | all 9 waves |
192
- | **4 · Spike** | exploratory, needs direction | brainstorm → re-triage |
193
-
194
- The lane escalates when the work outgrows the estimate (the diff balloons, a
195
- sensitive path appears, failures repeat) — but never shrinks on its own.
196
- Under-process costs more than over-process.
197
-
198
- ### The wave pipeline
199
-
200
- ```mermaid
201
- flowchart TD
202
- U[User request] --> G{Luffy triage}
203
- G -- exploratory --> B[Usopp brainstorm]
204
- G -- clear work --> N[Nami plan]
205
- B --> N
206
- N --> Z[Zoro execute]
207
- Z --> CP[Chopper audit]
208
- CP --> SQ[Sanji quality]
209
- SQ --> FG[Franky gates]
210
- FG --> RJ[Robin + Jinbe review]
211
- RJ -- pass --> LC[Luffy closure]
212
- RJ -- fail --> BH[Brook heal]
213
- BH --> CP
214
- LC --> CL[push + ready PR summary]
29
+ ```
30
+ > add search bar to the products page
215
31
  ```
216
32
 
217
- | Wave | Owner | Skill | Output |
218
- |------|-------|-------|--------|
219
- | 0 Triage | Luffy | `mugiwara-orchestration` | route + lane + reason |
220
- | 1 Brainstorm | Usopp | `mugiwara-brainstorm` | refined direction, options, recommendation |
221
- | 2 Planning | Nami | `mugiwara-planning` | plan doc: waves, tasks, dependency edges, acceptance |
222
- | 3 Execution | Zoro | `mugiwara-execution` | implemented tasks with evidence |
223
- | 4 Checkpoint | Chopper | `mugiwara-checkpoint` | audit report + failure ledger |
224
- | 5 Quality | Sanji | `mugiwara-quality` | formatter / linter / test results |
225
- | 6 Gates | Franky | `mugiwara-gates` | coverage + build verdict |
226
- | 7 Review | Robin ∥ Jinbe | `mugiwara-review` + `mugiwara-security` | severity-tagged findings |
227
- | 8 Healing | Brook | `mugiwara-healing` | fixes; loops to Wave 4, max 3 cycles |
228
- | 9 Closure | Luffy | `mugiwara-orchestration` | summary + push + ready PR summary |
229
-
230
- **You see progress, not a firehose.** Each wave opens with a banner
231
- (`## Wave N — <crew> (<skill>)`), closes with a compact checkpoint report (what
232
- ran / result / evidence pointer), and pauses when something fails or gets
233
- risky. Subagents appear only where they genuinely help: parallel task batches
234
- and independent re-verification.
235
-
236
- ### What a mission looks like
237
-
238
- Small and specific:
33
+ The crew runs:
239
34
 
240
35
  ```
241
- > fix the date formatting bug in src/utils/format.ts
36
+ Wave 0 Luffy triage 5 files, no sensitive paths → Lane 2 Standard
37
+ Wave 2 Nami plan → 1 execution wave, 3 tasks with dependency edges
38
+ Wave 3 Zoro execute→ T1: search endpoint (test red→green, commit)
39
+ T2: search service (test red→green, commit)
40
+ T3: search component (test red→green, commit)
41
+ Wave 4 Chopper audit → re-runs all 3 criteria, checks commits → PASS
42
+ Wave 5 Sanji quality → prettier: clean, eslint: 0, 412 tests: PASS
43
+ Wave 6 Franky gates → coverage new 94%, modified 87%, build green → PASS
44
+ Wave 7 Robin review → breaking-change map: 0 breaks, 1 minor naming finding
45
+ Wave 7 Jinbe security→ no auth/payment surface touched → skip
46
+ Wave 9 Luffy closure→ mission report + push branch + ready PR summary
47
+
48
+ done. branch pushed. paste the PR summary and open.
242
49
  ```
243
50
 
244
- Luffy routes it to **Lane 1** and the crew runs two waves — Zoro reproduces and
245
- fixes, then Sanji formats and tests all visible as checkpoint reports. No
246
- nine-wave ceremony for a one-file bug.
51
+ Each wave is a compact checkpoint report in your conversation. You see
52
+ everything. Nothing hides behind a subagent click. If a wave fails, Brook reads
53
+ all failures at once, fixes them, and all verification waves re-run.
247
54
 
248
- Big and sensitive:
55
+ Now a bigger one:
249
56
 
250
57
  ```
251
- > add role-based access control to the API
58
+ > add role-based access control to the API: admin, editor, viewer roles
252
59
  ```
253
60
 
254
- That touches auth, so Luffy routes it to **Lane 3**. Nami plans the migration
255
- waves, Zoro executes test-first, Chopper re-verifies every criterion, Sanji and
256
- Franky gate it, Robin and Jinbe review, Brook heals anything that fails, and
257
- Luffy closes with a ready PR summary. Every wave reports inline.
258
-
259
- That is the point of mugiwara: **the process scales to the work, and you can
260
- see all of it.**
261
-
262
- ### The workspace
263
-
264
- Every mission works inside `.mugiwara/` at the repo root:
61
+ Auth path detected auto-escalate to Lane 3 (Full):
265
62
 
266
63
  ```
267
- .mugiwara/
268
- ├── config # mode + writing standards (gitignored)
269
- ├── spec/ # brainstorm output
270
- ├── plans/ # plan docs clean, Nami-only, source of truth from Wave 2
271
- ├── results/ # wave results: audits, test output, gate verdicts
272
- ├── review/ # review + security findings
273
- ├── issues/ # blocker + failure ledger
274
- ├── refs/ # full skill/agent bodies for glob-loading harnesses
275
- └── logs/ # decision + check-in log per mission (deleted at cleanup)
64
+ Wave 0 Luffy triage → auth/ + migration/ touched → lane 3 full
65
+ Wave 2 Nami plan → 2 execution waves, 5 tasks, parallel-safe graph
66
+ Wave 3a Zoro execute→ T1 migration + T2 middleware + T3 3 parallel endpoint guards
67
+ Wave 4 Chopper audit → T3-C: viewer can still POST /api/settings 1 ledger row
68
+ Wave 5 Sanji quality 2 integration tests fail after middleware change → 2 rows
69
+ Wave 6 Franky gates → coverage 91% / 85%, build green, DoD blocked (3 open rows)
70
+ Wave 7 Robin review 1 major: error message format inconsistent → 1 row
71
+ Wave 7 Jinbe security→ STRIDE: PASS. 0 high. deny-by-default enforced.
72
+ Wave 8 Brook heal → reads 4 ledger rows 3 parallel heal workers → fix all
73
+ Wave 4 Chopper re-audit→ PASS (cycle 2)
74
+ Wave 5 Sanji re-qual → PASS
75
+ Wave 6 Franky re-gate → PASS
76
+ Wave 7 Robin re-rev → PASS
77
+ Wave 3b Zoro execute→ T4 admin dashboard RBAC UI + T5 integration tests
78
+ Wave 4 Chopper audit → PASS
79
+ Wave 9 Luffy closure→ state.json + mission report + push + PR summary
80
+
81
+ 1 heal cycle. 4 failures from 3 different waves — all fixed at once.
276
82
  ```
277
83
 
278
- Two rules hold it together:
84
+ At closure you get a mission report:
279
85
 
280
- 1. **Evidence over claims.** No wave passes on assertion — the owning agent
281
- runs the checks and shows output.
282
- 2. **The plan is the source of truth.** From Wave 2 on, the plan doc holds the
283
- clean execution plan; the decision log holds the who-and-why trace. A
284
- skipped wave is recorded, never silent.
86
+ ```
87
+ .mugiwara/reports/2026-08-11-rbac.md
88
+
89
+ Lane full · Mode guided · Actor you · Branch feature/feat-rbac
285
90
 
286
- ### Manual stages
91
+ What changed: 12 files, +340/-82
92
+ Gates: Audit PASS · Quality PASS · Coverage 91%/85% · Security PASS
93
+ State: 12/12 tasks · 0 blockers · 1 heal cycle · 18.5k/20k tokens
94
+ ```
287
95
 
288
- Prefer to drive the stages yourself? Every stage has a slash command that loads
289
- the skill, runs the role inline, and bridges state from `.mugiwara/`:
96
+ One file. Any reviewer reads it in 30 seconds. That's the governance trail.
97
+
98
+ ## Capabilities
99
+
100
+ | Capability | What it does |
101
+ |-----------|-------------|
102
+ | **15 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. |
103
+ | **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. |
104
+ | **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. |
105
+ | **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. |
106
+ | **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. |
107
+ | **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. |
108
+ | **Self-healing** | Brook reads entire blocker ledger after all verification waves. Groups failures, spawns parallel heal workers for independent fixes. Max 3 cycles. |
109
+ | **Deterministic tooling** | `savepoint.sh` (state), `lane.sh` (sizing), `evidence.sh` (output capture), `mission-report.sh` (report). Scripts compute what models shouldn't remember. |
110
+ | **Configurable gates** | Coverage thresholds in `.mugiwara/config`: `coverage_new=90`, `coverage_modified=80`. Raise for strict repos, lower for legacy. |
111
+ | **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. |
112
+ | **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. |
113
+ | **Multi-actor safe** | Two engineers, one repo. Reset refuses without `--force`. Branch-scoped state. Shared lessons ledger. |
114
+ | **Compliance matrix** | Rule compliance per model/tier/harness. Published with failures — Gemini tier 2 ≠ Claude tier 1. Documented, not hidden. |
115
+ | **12 harnesses** | Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, pi, Windsurf, Cline, Kilo, Antigravity. 70+ more via skills.sh. Pure markdown, zero runtime. |
116
+
117
+ ## Why this instead of just asking my agent?
118
+
119
+ Your agent alone has no governance. It forgets context, skips verification, and
120
+ burns tokens on small fixes the same way it does on architecture changes. There's
121
+ no audit trail — when someone asks "what did the agent do?", you have nothing to
122
+ show.
123
+
124
+ Mugiwara wraps your agent in a team structure with defined roles, evidence gates,
125
+ and cost tracking. The same discipline you'd expect from a senior engineering
126
+ team — in your chat window, running inline, visible at every step.
127
+
128
+ ## The crew
129
+
130
+ 15 personas, 26 skills. Each with a permission boundary.
131
+
132
+ | Agent | Role | Permission |
133
+ |-------|------|------------|
134
+ | Luffy | Captain — triage, lane sizing, check-ins, closure | — |
135
+ | Nami | Planner — interviews, scans codebase, writes scaled plans | — |
136
+ | Zoro | Executor — TDD per task, commits per logical unit | **no-network** |
137
+ | Chopper | Auditor — re-runs criteria, writes failure ledger, never fixes | **read-only** |
138
+ | Sanji | Quality — format, lint, test. Never weakens configs | — |
139
+ | Franky | Gates — coverage (configurable thresholds), build, DoD | — |
140
+ | Robin | Reviewer — breaking-change map, five-axis, severity tagging | **read-only** |
141
+ | Jinbe | Security — STRIDE, OWASP, secret scan, dependency audit | **read-only** |
142
+ | Brook | Healer — reads ledger, parallel heal workers, max 3 cycles | — |
143
+ | Skeptic | Adversarial verifier — doubts everything, never validates | **read-only** |
144
+ | Usopp | Brainstorm — interrogates ideas, researches, recommends | — |
145
+ | Resume | Continuity — rebuilds from state.json, never restarts | — |
146
+ | Memory | Cross-mission lessons — read at start, write at closure | — |
147
+
148
+ See [all 15 agents](docs/agents.md) and [all 26 skills](docs/skills.md).
290
149
 
291
- | Command | Runs | Reads state from |
292
- |---------|------|------------------|
293
- | `/mugiwara-plan` | Nami | `.mugiwara/spec/` |
294
- | `/mugiwara-execute` | Zoro | `.mugiwara/plans/` |
295
- | `/mugiwara-review` | Robin | `.mugiwara/results/` + diff |
296
- | `/mugiwara-security` | Jinbe | `.mugiwara/results/` + diff |
297
- | `/mugiwara-heal` | Brook | `.mugiwara/issues/` |
298
- | `/mugiwara-ship` | Luffy | plan + results |
150
+ ## Install
299
151
 
300
- Jump in at any stage — plan today, execute tomorrow.
152
+ ### Claude Code
301
153
 
302
- ---
154
+ <details>
155
+ <summary><b>Install / Update / Uninstall</b></summary>
303
156
 
304
- ## Modes & autonomy
157
+ ```bash
158
+ /plugin marketplace add ionivetech/mugiwara && /plugin install mugiwara # install
159
+ /plugin update mugiwara # update
160
+ /plugin uninstall mugiwara # uninstall
161
+ ```
162
+ </details>
305
163
 
306
- Three autonomy levels, set in `.mugiwara/config`:
164
+ ### opencode
307
165
 
308
- | Level | Plan GO | Branch/commit | Ambiguities | Check-ins |
309
- |-------|---------|---------------|-------------|-----------|
310
- | **guided** | ask the user | ask the user | ask the user | ask the user |
311
- | **semi** | present plan for user GO | auto | self-answer + log | log, no pause |
312
- | **auto** | gated auto-GO | auto | self-answer + log | log, no pause |
166
+ <details>
167
+ <summary><b>Install / Update / Uninstall</b></summary>
313
168
 
314
- - **guided** — the default. You approve the plan, decide branch and commits,
315
- answer ambiguities, and open the PR yourself.
316
- - **semi** — the crew self-manages branch, commits, and ambiguities (logging
317
- each decision), but the plan still needs your explicit GO.
318
- - **auto** — hands-off, with one safety line: the plan proceeds only with zero
319
- blocking ambiguities AND zero high-risk tasks (deploy / migration / DB /
320
- public API / state-mutating).
169
+ ```json
170
+ { "plugin": ["@ionivetech/mugiwara"] } // add to opencode.json
171
+ ```
321
172
 
322
- Two invariants hold in every mode:
173
+ ```bash
174
+ mugiwara update # update
175
+ # remove the plugin entry from opencode.json to uninstall
176
+ ```
323
177
 
324
- - **Consent.** State-mutating tests against shared state (real DB writes,
325
- network, browsers) always require your explicit consent. Provably isolated
326
- mutation is auto-safe.
327
- - **Terminal.** Every mode ends at push + ready PR summary + verdict file. The
328
- crew never creates a PR, merges, deploys, or auto-reacts to review comments.
178
+ Restart opencode after install.
179
+ </details>
329
180
 
330
- Flip mid-mission with `mugiwara mode <guided|semi|auto>`. The PR description is
331
- prepared for you — see [docs/pr-summary.md](docs/pr-summary.md).
181
+ ### GitHub Copilot
332
182
 
333
- ---
183
+ <details>
184
+ <summary><b>Install / Update / Uninstall</b></summary>
334
185
 
335
- ## Configuration
186
+ ```bash
187
+ copilot plugin marketplace add ionivetech/mugiwara && copilot plugin install mugiwara
188
+ copilot plugin update mugiwara
189
+ copilot plugin uninstall mugiwara
190
+ ```
191
+ </details>
336
192
 
337
- `.mugiwara/config` (project) overrides `~/.mugiwara/config` (global). Plain
338
- `key=value` lines, `#` comments allowed.
193
+ ### Gemini CLI · Codex · Cursor
339
194
 
340
- | Key | Values | Default | Meaning |
341
- |-----|--------|---------|---------|
342
- | `mode` | guided / semi / auto | guided | How much the crew does without asking |
343
- | `branch` | pattern | `feature/{type}-{issue}-{slug}` | Branch naming |
344
- | `commit` | conventional / gitmoji / plain | conventional | Commit message style |
345
- | `base` | branch name | `main` | The PR target in the prepared summary |
195
+ <details>
196
+ <summary><b>Gemini</b></summary>
346
197
 
347
- Commit styles: `conventional` (`feat: ...`, `fix(scope): ...`), `gitmoji`
348
- (`✨ feat: ...`), or `plain` (`Fix export csv encoding`). See
349
- [docs/config.md](docs/config.md).
198
+ ```bash
199
+ gemini extensions install https://github.com/ionivetech/mugiwara
200
+ gemini extensions update mugiwara
201
+ gemini extensions remove mugiwara
202
+ ```
203
+ </details>
350
204
 
351
- ---
205
+ <details>
206
+ <summary><b>Codex</b></summary>
352
207
 
353
- ## Install
208
+ ```bash
209
+ codex plugin marketplace add ionivetech/mugiwara && codex plugin add mugiwara@mugiwara
210
+ codex plugin update mugiwara
211
+ codex plugin remove mugiwara
212
+ ```
213
+ </details>
354
214
 
355
- ### Via your coding agent
215
+ <details>
216
+ <summary><b>Cursor</b></summary>
356
217
 
357
- | Harness | Install |
358
- |---------|---------|
359
- | Claude Code | `/plugin marketplace add ionivetech/mugiwara` then `/plugin install mugiwara` |
360
- | opencode | add `{ "plugin": ["@ionivetech/mugiwara"] }` to `opencode.json` |
361
- | GitHub Copilot | `copilot plugin marketplace add ionivetech/mugiwara` then `copilot plugin install mugiwara` |
362
- | Gemini CLI | `gemini extensions install https://github.com/ionivetech/mugiwara` |
363
- | Codex | `codex plugin marketplace add ionivetech/mugiwara` then `codex plugin add mugiwara@mugiwara` |
364
- | Cursor | `/add-plugin mugiwara` |
365
- | Kimi Code | `/plugins install https://github.com/ionivetech/mugiwara` |
366
- | pi | `pi install git:github.com/ionivetech/mugiwara` |
218
+ ```
219
+ /add-plugin mugiwara # install & update
220
+ /remove-plugin mugiwara # uninstall
221
+ ```
222
+ </details>
367
223
 
368
- ### Via the CLI
224
+ ### Kimi · pi · Windsurf · Cline · Kilo · Antigravity
369
225
 
370
- Requires **Node.js >= 20.11**.
226
+ <details>
227
+ <summary><b>All other harnesses</b></summary>
371
228
 
372
229
  ```bash
373
- # run without installing (wizard)
374
- npx @ionivetech/mugiwara@latest
375
-
376
- # non-interactive: global Claude Code install
377
- npx @ionivetech/mugiwara@latest --global --target claude --yes
230
+ npx @ionivetech/mugiwara@latest --project . --target all --yes # install
231
+ mugiwara update # update
232
+ mugiwara uninstall # uninstall
233
+ ```
234
+ </details>
378
235
 
379
- # project install for several harnesses
380
- npx @ionivetech/mugiwara@latest --project ./my-app --target opencode,copilot --yes
236
+ ### Any agent (skills only)
381
237
 
382
- # global install, run `mugiwara` anywhere
383
- npm install -g @ionivetech/mugiwara
238
+ ```bash
239
+ npx skills add ionivetech/mugiwara # 70+ agents via skills.sh
384
240
  ```
385
241
 
242
+ ### One-liner
243
+
386
244
  ```bash
387
- # macOS / Linux one-liner
245
+ # macOS / Linux
388
246
  curl -fsSL https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.sh | bash
389
-
390
247
  # Windows
391
248
  irm https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.ps1 | iex
392
249
  ```
393
250
 
394
- ### Skills only, any agent
395
-
396
- All 32 skills ship in the standard [agentskills.io](https://agentskills.io)
397
- layout, so you can install just the skills into 70+ agents via
398
- [skills.sh](https://skills.sh):
399
-
400
- ```bash
401
- npx skills add ionivetech/mugiwara
402
- ```
403
-
404
- Update — `mugiwara update` or re-run your harness's install command. Uninstall
405
- — `mugiwara uninstall` removes exactly what the manifest recorded.
406
-
407
- ---
408
-
409
- ## CLI reference
410
-
411
- | Command | Effect |
412
- |---------|--------|
413
- | `mugiwara install` | Install the crew (default; wizard when flags are missing) |
414
- | `mugiwara update` | Replace installed files, backing up differences first |
415
- | `mugiwara uninstall` | Remove exactly what the install manifest recorded |
416
- | `mugiwara list` | Show installations (project + global manifests) |
417
- | `mugiwara reset` | Wipe mission state (`--keep-logs` preserves the lessons ledger) |
418
- | `mugiwara --help` / `--version` | Help / version |
251
+ Requires **Node.js >= 20.11**.
419
252
 
420
- | Flag | Meaning |
421
- |------|---------|
422
- | `--global` | Install user-wide |
423
- | `--project <dir>` | Install into a project directory |
424
- | `--target <ids\|all>` | Comma-separated target IDs, or `all` |
425
- | `--yes`, `-y` | Non-interactive |
426
- | `--force` | Overwrite differing files (with backup) |
427
- | `--dry-run` | Print actions without writing |
428
- | `--keep-logs` | With `reset`: keep `.mugiwara/logs` (lessons ledger) |
253
+ ## Configuration
429
254
 
430
- Every install writes `.mugiwara/manifest.json` recording the version, scope,
431
- targets, and exact written files — which is what `update` and `uninstall` use
432
- to operate safely.
255
+ `.mugiwara/config` (project) overrides `~/.mugiwara/config` (global).
433
256
 
434
- ---
257
+ | Key | Default | Meaning |
258
+ |-----|---------|---------|
259
+ | `mode` | guided | Autonomy: guided / semi / auto |
260
+ | `branch` | `feature/{type}-{issue}-{slug}` | Branch naming |
261
+ | `commit` | conventional | conventional / gitmoji / plain |
262
+ | `base` | main | PR target branch |
263
+ | `coverage_new` | 90 | Coverage threshold for new files |
264
+ | `coverage_modified` | 80 | Coverage threshold for modified files |
435
265
 
436
- ## Comparing
266
+ [Full config →](docs/config.md)
437
267
 
438
- Mugiwara is a skills pack with a named crew and a gated pipeline. For an honest
439
- side-by-side against superpowers, agent-skills, frameworks, and mega-prompts —
440
- including a measured benchmark — see [docs/comparison.md](docs/comparison.md).
268
+ ## CLI
441
269
 
442
- ## Docs & roadmap
270
+ ```bash
271
+ mugiwara install # wizard (interactive)
272
+ mugiwara install --project . --target all --yes # non-interactive
273
+ mugiwara update # replace existing files
274
+ mugiwara uninstall # remove what manifest recorded
275
+ mugiwara list # show installations
276
+ mugiwara reset --keep-logs # wipe mission state, keep lessons
277
+ mugiwara reset --force # override multi-actor guard
278
+ ```
443
279
 
444
- - [Docs index](docs/index.md) adoption guide, installs, crew & skill references
445
- - [Troubleshooting](docs/troubleshooting.md) — common problems and fixes
446
- - [Roadmap](ROADMAP.md)what is planned next
280
+ ## When not to use mugiwara
281
+
282
+ - **Autonomous marathon runs** the agent disappears for hours. Use superpowers.
283
+ - **Deep per-skill reference encyclopedia** — use agent-skills.
284
+ - **A deployable runtime** — use LangGraph / CrewAI.
285
+ - **One large instruction with no ceremony** — use a mega-prompt.
286
+
287
+ Mugiwara is for visibility, governance, and cost awareness. If those don't
288
+ matter to you, this is the wrong tool.
289
+
290
+ ## Docs
291
+
292
+ | Doc | What it covers |
293
+ |-----|---------------|
294
+ | [Getting started](docs/getting-started.md) | First mission, lane 0-3 examples, setup walkthrough |
295
+ | [Workflow](docs/workflow.md) | Full 9-wave pipeline with heal loop detail |
296
+ | [Agents](docs/agents.md) | 15 crew members, roles, permissions, how to summon |
297
+ | [Skills](docs/skills.md) | 26 techniques, 3-layer disclosure model |
298
+ | [Lanes](docs/lanes.md) | Deterministic lane sizing — computed from git diff |
299
+ | [Audit trail](docs/audit-trail.md) | 15 artifact types, how to read as reviewer |
300
+ | [Cost model](docs/cost.md) | Index/body/references layers, cost per lane |
301
+ | [Harness matrix](docs/harness-matrix.md) | Tier 1/2/3 — what differs per harness |
302
+ | [Config](docs/config.md) | All `.mugiwara/config` keys with defaults |
303
+ | [Modes](docs/modes.md) | Guided / semi / auto autonomy levels |
304
+ | [Compliance matrix](docs/compliance-matrix.md) | Rule compliance per model — published with failures |
305
+ | [Comparison](docs/comparison.md) | Positioning. When to use mugiwara vs something else. |
306
+ | [Roadmap](ROADMAP.md) | Now — Next — Then — After |
447
307
 
448
308
  ## License
449
309
 
450
- MIT. Copyright (c) 2026 ionive. See [LICENSE](LICENSE).
310
+ MIT. Copyright (c) 2026 ionive.