@ionivetech/mugiwara 0.2.0 → 0.3.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 (62) hide show
  1. package/.opencode/commands/mugiwara-execute.md +11 -0
  2. package/.opencode/commands/mugiwara-heal.md +11 -0
  3. package/.opencode/commands/mugiwara-mode.md +6 -0
  4. package/.opencode/commands/mugiwara-plan.md +11 -0
  5. package/.opencode/commands/mugiwara-review.md +11 -0
  6. package/.opencode/commands/mugiwara-security.md +11 -0
  7. package/.opencode/commands/mugiwara-ship.md +11 -0
  8. package/.opencode/commands/mugiwara.md +11 -0
  9. package/.opencode/plugins/mugiwara.mjs +126 -7
  10. package/README.md +252 -205
  11. package/content/agents/brook-healing.md +2 -2
  12. package/content/agents/luffy-orchestrator.md +3 -2
  13. package/content/agents/robin-reviewer.md +1 -1
  14. package/content/agents/skeptic-verifier.md +1 -1
  15. package/content/agents/using-mugiwara.md +5 -1
  16. package/content/agents/usopp-brainstorm.md +1 -1
  17. package/content/agents/zoro-execution.md +1 -1
  18. package/content/skills/mugiwara-api-and-interface-design/SKILL.md +87 -0
  19. package/content/skills/mugiwara-context-engineering/SKILL.md +59 -0
  20. package/content/skills/mugiwara-doubt-driven-development/SKILL.md +65 -0
  21. package/content/skills/mugiwara-execution/SKILL.md +4 -0
  22. package/content/skills/mugiwara-frontend/SKILL.md +58 -56
  23. package/content/skills/mugiwara-frontend/references/checklist.md +37 -0
  24. package/content/skills/mugiwara-gates/SKILL.md +4 -0
  25. package/content/skills/mugiwara-git-worktrees/SKILL.md +62 -0
  26. package/content/skills/mugiwara-healing/SKILL.md +12 -0
  27. package/content/skills/mugiwara-mode/SKILL.md +13 -4
  28. package/content/skills/mugiwara-orchestration/SKILL.md +19 -1
  29. package/content/skills/mugiwara-planning/SKILL.md +13 -15
  30. package/content/skills/mugiwara-pr/SKILL.md +17 -6
  31. package/content/skills/mugiwara-quality/SKILL.md +10 -0
  32. package/content/skills/mugiwara-security/SKILL.md +38 -1
  33. package/content/skills/mugiwara-ship/SKILL.md +24 -1
  34. package/content/skills/mugiwara-systematic-debugging/SKILL.md +77 -0
  35. package/content/skills/mugiwara-test-driven-development/SKILL.md +84 -0
  36. package/content/skills/mugiwara-workflow/SKILL.md +8 -2
  37. package/content/skills/mugiwara-writing-skills/SKILL.md +60 -0
  38. package/dist/mugiwara.js +42 -26
  39. package/docs/adoption-guide.md +1 -1
  40. package/docs/agents.md +2 -2
  41. package/docs/claude-setup.md +9 -4
  42. package/docs/codex-setup.md +3 -1
  43. package/docs/config.md +50 -0
  44. package/docs/copilot-setup.md +3 -1
  45. package/docs/cursor-setup.md +3 -1
  46. package/docs/developer-onboarding.md +1 -1
  47. package/docs/execution-model.md +33 -0
  48. package/docs/gemini-setup.md +4 -1
  49. package/docs/getting-started.md +16 -4
  50. package/docs/index.md +7 -2
  51. package/docs/modes.md +22 -12
  52. package/docs/opencode-setup.md +9 -2
  53. package/docs/pr-summary.md +54 -0
  54. package/docs/skill-anatomy.md +5 -0
  55. package/docs/skills.md +17 -5
  56. package/docs/windsurf-setup.md +3 -1
  57. package/hooks/hooks.json +15 -0
  58. package/hooks/session-start.ts +8 -0
  59. package/package.json +2 -1
  60. package/src/targets/claude.ts +18 -1
  61. package/src/targets/codex.ts +1 -1
  62. package/src/targets/gemini.ts +1 -1
package/README.md CHANGED
@@ -3,29 +3,51 @@
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.
6
+ The Straw Hat crew of AI agents and skills — a complete software development
7
+ workflow for your coding agent.
7
8
 
8
- Zero runtime: pure markdown your existing AI agent runs with its own subagent
9
- machinery no daemons, no plugins to keep updated, nothing to host.
9
+ Skills encode the workflows, quality gates, and best practices a senior
10
+ engineering team applies to software, packaged so your agent follows them
11
+ consistently across every phase of development. The crew **auto-activates**:
12
+ give a non-trivial request and the pipeline runs inline in your main
13
+ conversation — with checkpoint reports at every stage, nothing hidden behind a
14
+ subagent click.
10
15
 
11
- ## Why Mugiwara
16
+ ```
17
+ TRIAGE PLAN BUILD VERIFY REVIEW SHIP
18
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
19
+ │ Luffy │ ──▶ │ Nami │ ──▶ │ Zoro │ ──▶ │ Chopper │ ──▶ │ Robin + │ ──▶ │ push + │
20
+ │ 5-way │ │ waves + │ │ TDD per │ │ Sanji + │ │ Jinbe │ │ ready PR │
21
+ │ triage │ │ tasks │ │ task │ │ Franky │ │ review+ │ │ summary │
22
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
23
+ ```
12
24
 
13
- - 🧭 **A named crew.** Ten specialist agents Luffy orchestrates, Nami plans,
14
- Zoro executes, Chopper audits, Brook heals each with a narrow job.
25
+ Zero runtime: pure markdown your existing AI agent runs with its own subagent
26
+ machinery no daemons, no plugins to keep updated, nothing to host. 32 skills,
27
+ 15 agents, and per-stage commands, ready for Claude Code, opencode, Gemini CLI,
28
+ Codex, Cursor, Copilot, Kimi, pi, Windsurf, Cline, Kilo Code, and Antigravity.
29
+
30
+ ## Philosophy
31
+
32
+ - 🧭 **Skills are the product, agents are the engine.** Skills are the
33
+ user-facing surface — they auto-activate, they ship to any harness, and you
34
+ never need to learn an agent name. The named agents are opencode-native
35
+ enforcement underneath: permission isolation, role lenses, parallel review.
36
+ Pick mugiwara up the same way you'd pick up a skills pack.
37
+ - 🧑‍🚀 **The crew runs in the main thread.** No crew member is dispatched as a
38
+ hidden subagent. You watch the pipeline happen, you can interrupt any time,
39
+ and every wave shows a checkpoint report — never a narration of every tool call.
40
+ - ⚖️ **Mode owns autonomy, config owns writing standards.** Whether branch,
41
+ commit, and PR run automatically is decided by one lever: the mode
42
+ (guided / semi / auto). The config only shapes HOW those artifacts are
43
+ written when they are created.
44
+ - 🛡 **Evidence over claims.** No wave passes on assertion — the owning agent
45
+ shows output. No evidence, not complete.
15
46
  - 📦 **No runtime.** Ships markdown only: native skills and agents for
16
47
  Claude Code, opencode, Copilot, Gemini CLI, Codex, Cursor, Kimi, pi,
17
48
  Windsurf, Cline, Kilo Code, and Antigravity.
18
- - 🔁 **Wave pipeline.** brainstorm → plan → execute → audit → quality → gates
19
- → review → security → heal → closure. Failure loops back through healing
20
- (max 3 cycles), never ships broken.
21
- - 🛡 **Evidence over claims.** No wave passes on assertion — the owning agent
22
- shows output. No evidence, not complete.
23
- - ⚡ **One-command install.** `npx`, `npm -g`, curl, or PowerShell — interactive
24
- wizard or fully scriptable with flags.
25
- - 🧪 **Everything validated.** Coverage gates, build gates, OWASP security
26
- review, doubt-driven diff review, Definition of Done.
27
49
 
28
- ### The crew — 15 agents
50
+ ## The crew — 15 agents
29
51
 
30
52
  Each agent is a focused specialist. The main thread embodies each crew role
31
53
  inline using its skill; agents may also be summoned directly by your AI tool's
@@ -33,44 +55,43 @@ agent machinery and may call the crew's shared skills.
33
55
 
34
56
  | Agent | Crew member | Role |
35
57
  |-------|-------------|------|
36
- | `using-mugiwara` | Front Door | Start here: routes any request to the right crew member — no agent names to remember |
37
- | `luffy-orchestrator` | Luffy | Main gateway: 5-way triage, background check-ins, work splitting, decision log, closure |
58
+ | `using-mugiwara` | Front Door | Optional router: explains the crew, routes any request to the right crew member — no agent names to remember |
59
+ | `luffy-orchestrator` | Luffy | Captain: 5-way triage, check-ins, work splitting, decision log, detailed closure |
38
60
  | `usopp-brainstorm` | Usopp | Critical brainstorming friend: facts over hype, options + trade-offs, no over-engineering |
39
- | `nami-planner` | Nami | Interview-first planner: full-context scan, wave structure, anti-patterns, parallel-safe plans |
61
+ | `nami-planner` | Nami | Interview-first planner: full-context scan, waves-first plans, file-level dependency edges, break points |
40
62
  | `zoro-execution` | Zoro | Execute plans inline: todo list first, sequential tasks in the main thread, parallel batches via worker subagents, evidence per task |
41
- | `chopper-checkpoint` | Chopper | Verify-everything audit of wave results (deduped + scoped re-runs); writes the failure ledger (never fixes code) |
42
- | `sanji-quality` | Sanji | Discover the stack, then format/lint/test; integration tests only with consent |
63
+ | `chopper-checkpoint` | Chopper | Verify-everything audit of wave results; writes the failure ledger (never fixes code) |
64
+ | `sanji-quality` | Sanji | Discover the stack, then format/lint/test; integration and optional e2e tests only with consent |
43
65
  | `franky-gates` | Franky | Binary gates: coverage ≥90/80, build exit 0, Definition of Done |
44
66
  | `robin-reviewer` | Robin | Doubt-driven diff review: breaking-change first, five-axis, severity-tagged findings |
45
- | `jinbe-security` | Jinbe | Security review: OWASP, secrets, injection, auth, dependencies, untrusted-data doctrine |
46
- | `brook-healing` | Brook | Reads the blocker ledger, Stop-the-Line root-cause fixes, ≤3 heal cycles |
67
+ | `jinbe-security` | Jinbe | Security review: STRIDE first, OWASP, secrets, injection, auth, dependencies, untrusted-data doctrine |
68
+ | `brook-healing` | Brook | Reads the blocker ledger, Stop-the-Line root-cause fixes, worker subagents for fast re-verification, ≤3 heal cycles |
47
69
  | `skeptic-verifier` | Skeptic | Adversarial verification: doubt every output/plan/verdict, find what's wrong, do NOT validate |
48
- | `eval-runner` | Eval Runner | Test engineer for the harness itself: task suites, judge-agent rubric comparison, fix the skill not the eval |
70
+ | `eval-runner` | Eval Runner | Test engineer for the harness itself: task suites, judge-agent rubric comparison |
49
71
  | `resume-coordinator` | Resume Coordinator | Rebuild the picture from `.mugiwara/` state after context loss; continue, never restart |
50
72
  | `memory-keeper` | Memory Keeper | Institutional memory: surface past lessons at mission start, capture new ones at closure |
51
73
 
52
- ### The techniques — 25 skills
74
+ ## The techniques — 32 skills
53
75
 
54
76
  | Skill | Purpose |
55
77
  |-------|---------|
56
- | `mugiwara-workflow` | The harness entry point: inline execution model, gateway triage, wave pipeline, workspace layout, blocker protocol, cleanup |
57
- | `mugiwara-orchestration` | Luffy's captain behavior: 5-way classifier, check-ins, work splitting, decision log, closure |
58
- | `mugiwara-mode` | Runtime levels guided / semi / auto via `.mugiwara/config`: branch + commit style, consent invariants, gated auto-GO, push + ready-PR terminal |
78
+ | `mugiwara-workflow` | The harness entry point: inline execution model, gateway triage, wave pipeline, checkpoint reports, workspace layout, blocker protocol |
79
+ | `mugiwara-orchestration` | Luffy's captain behavior: 5-way classifier, check-ins, work splitting, decision log, detailed closure |
80
+ | `mugiwara-mode` | Runtime levels guided / semi / auto via `.mugiwara/config`: mode owns autonomy, config owns writing standards, consent invariants, gated auto-GO, push + ready-PR terminal |
59
81
  | `mugiwara-brainstorm` | Usopp's critical sparring: interrogate, research facts, cut over-engineering, recommend |
60
- | `mugiwara-planning` | Interview-first, full-context scan, wave plans with parallel/sequential markers + anti-patterns |
61
- | `mugiwara-execution` | Todo list, sequential tasks inline + parallel worker batches, 6-field delegation for parallel work, one commit per logical task |
62
- | `mugiwara-checkpoint` | Verify-everything audit of every acceptance criterion — deduped and scoped to the wave's diff; failure rows to the blocker ledger |
63
- | `mugiwara-quality` | Discover the project's real tooling; formatter, linter, unit tests, declared user suites under the consent matrix |
64
- | `mugiwara-gates` | Coverage ≥90% new / ≥80% modified files, build validation, Definition of Done; user-AC verdict overrides thresholds |
82
+ | `mugiwara-planning` | Interview-first, waves-first plans with file-level dependency edges, break points, parallel-safe waves + anti-patterns |
83
+ | `mugiwara-execution` | Todo list, sequential tasks inline + parallel worker batches, one commit per logical task, checkpoint-report batching |
84
+ | `mugiwara-checkpoint` | Verify-everything audit of every acceptance criterion — deduped and scoped to the wave's diff |
85
+ | `mugiwara-quality` | Discover the project's real tooling; formatter, linter, unit tests, optional e2e gate (only when the repo has e2e AND changes touch e2e) |
86
+ | `mugiwara-gates` | Coverage ≥90% new / ≥80% modified files, build validation, Definition of Done; optional e2e position after quality |
65
87
  | `mugiwara-testcases` | User-test intake (ATDD): accepted formats, immutable-gold rule, declarative-AC routing, consent, failure adjudication |
66
88
  | `mugiwara-review` | Doubt-driven review: breaking-change analysis, five-axis, severity-tagged findings |
67
- | `mugiwara-security` | OWASP-driven security review, untrusted-data doctrine, severity by exploitability × impact |
68
- | `mugiwara-healing` | Reads the ledger, Stop-the-Line + Prove-It root-cause fixes, rollback prep |
89
+ | `mugiwara-security` | STRIDE-first security review, OWASP Top 10 mapping, authn/authz, secrets, dependency audit, boundary system, untrusted-data doctrine |
90
+ | `mugiwara-healing` | Reads the ledger, Stop-the-Line + Prove-It root-cause fixes, worker subagents (reviewer/security/re-run), rollback prep |
69
91
  | `mugiwara-deprecation` | Sunset & migration discipline: keep-or-retire gate, cutover playbooks, safe schema changes |
70
- | `mugiwara-frontend` | Anti-slop frontend: audit-first redesigns, design-system extraction, slop list |
92
+ | `mugiwara-frontend` | Anti-slop frontend: audit-first redesigns, component architecture, design systems, state, responsive, WCAG 2.1 AA |
71
93
  | `mugiwara-git` | Atomic commits, save-points, multi-commit splitting, bisect/blame debugging |
72
- | `mugiwara-ship` | GO/NO-GO ship gate: pre-launch checklist, feature flags, rollback plan |
73
- | `mugiwara-pr` | CI/CD loop terminal: one verdict file + one comment + one check-run on the ready PR via `gh`, stop-at-PR invariant |
94
+ | `mugiwara-pr` | Terminal: push + verdict file with a ready PR summary block; never creates a PR, stop-at-PR invariant |
74
95
  | `mugiwara-dynamic-workflow` | Runtime workflow patterns: fan-out-and-synthesize, tournament, loop-until-done, classify-and-act, adversarial verification |
75
96
  | `mugiwara-agent-security` | Secure the agent layer: prompt injection, memory poisoning, excessive agency, secret handling, sandboxing |
76
97
  | `mugiwara-backend` | Backend/server code: repo standards first, API design, data integrity, error handling, correctness, performance, server-side security |
@@ -78,29 +99,34 @@ agent machinery and may call the crew's shared skills.
78
99
  | `mugiwara-observability` | Trace the crew: structured logs, OTel-compatible spans, session correlation, end-of-mission summary |
79
100
  | `mugiwara-resume` | Session resume: rebuild state from `.mugiwara/` after compaction/loss; never restart |
80
101
  | `mugiwara-lessons` | Cross-mission memory: actionable lessons ledger, read at triage, written at closure |
102
+ | `mugiwara-writing-skills` | Meta-skill: how mugiwara authors skills — anatomy, ≤120-line rule, progressive disclosure, anti-rationalization |
103
+ | `mugiwara-systematic-debugging` | 4-phase root-cause discipline: reproduce → localize → reduce → fix + guard; stop-the-line, prove-it first |
104
+ | `mugiwara-test-driven-development` | RED-GREEN-REFACTOR, proof-of-when, test pyramid, one test = one behavior |
105
+ | `mugiwara-api-and-interface-design` | Contract-first design, error semantics, boundary validation, backward compatibility, versioning |
106
+ | `mugiwara-doubt-driven-development` | Adversarial fresh-context verification of in-flight decisions: claim → extract → doubt → reconcile → stop |
107
+ | `mugiwara-git-worktrees` | Isolated parallel branches via `git worktree`, branch hygiene, safe cleanup |
108
+ | `mugiwara-context-engineering` | Token/context management: feed selectively, trust-sort sources, progressive disclosure, rules files |
81
109
 
82
110
  ### Every capability, always
83
111
 
84
- Every install ships the full crew — all 25 skills and 15 agents, including
112
+ Every install ships the full crew — all 32 skills and 15 agents, including
85
113
  the anti-slop `mugiwara-frontend`, `mugiwara-backend`, and `mugiwara-agent-security`
86
114
  skills. No project-type selection: you get every capability, and the harness
87
115
  routes each task to the right skill.
88
116
 
89
117
  ## How it works
90
118
 
91
- Every mission starts with `using-mugiwara` the easy-to-remember front door
92
- that routes you to the right crew member (no agent names to memorize). It
93
- feeds the **Luffy gateway**, which classifies the request (trivial / explicit /
94
- exploratory / open-ended / ambiguous) and routes it: exploratory ideas go to
95
- Usopp's brainstorm, clear work goes straight to Nami's planning. You can also
96
- summon any crew member directly. From there the mission runs as a **wave
97
- pipeline** owned by one crew member per wave, executed inline in your main
98
- conversation.
119
+ **The workflow auto-activates.** At session start the crew is announced; when
120
+ you give a non-trivial request, the pipeline runs by itself you do not need
121
+ to call `/using-mugiwara`. It remains an optional explicit router if you want
122
+ to hand-route a mission.
123
+
124
+ From there the mission runs as a **wave pipeline** owned by one crew member
125
+ per wave, executed inline in your main conversation.
99
126
 
100
127
  ```mermaid
101
128
  flowchart TD
102
- U[User request] --> FD[using-mugiwara]
103
- FD --> G{Luffy triage}
129
+ U[User request] --> G{Luffy triage}
104
130
  G -- exploratory --> B[Usopp brainstorm]
105
131
  G -- clear work --> N[Nami plan]
106
132
  B --> N
@@ -112,25 +138,49 @@ flowchart TD
112
138
  RJ -- pass --> LC[Luffy closure]
113
139
  RJ -- fail --> BH[Brook heal]
114
140
  BH --> CP
115
- LC --> CL[cleanup]
141
+ LC --> CL[push + ready PR summary]
116
142
  ```
117
143
 
118
- The same pipeline as a portable table (renders anywhere markdown does):
119
-
120
144
  | Wave | Owner | Skill | Output |
121
145
  |------|-------|-------|--------|
122
146
  | 0 Triage | Luffy | `mugiwara-orchestration` | 5-way route decision + reason |
123
147
  | 1 Brainstorm | Usopp | `mugiwara-brainstorm` | refined direction, options, recommendation |
124
- | 2 Planning | Nami | `mugiwara-planning` | plan doc: waves, tasks, acceptance criteria |
148
+ | 2 Planning | Nami | `mugiwara-planning` | plan doc: waves, tasks, file-level dependency edges, acceptance |
125
149
  | 3 Execution | Zoro | `mugiwara-execution` | implemented tasks with evidence |
126
150
  | 4 Checkpoint | Chopper | `mugiwara-checkpoint` | audit report + failure ledger |
127
- | 5 Quality | Sanji | `mugiwara-quality` | formatter/linter/test results |
151
+ | 5 Quality | Sanji | `mugiwara-quality` | formatter/linter/test results (+ optional e2e) |
128
152
  | 6 Gates | Franky | `mugiwara-gates` | coverage + build verdict |
129
153
  | 7 Review | Robin ∥ Jinbe | `mugiwara-review` + `mugiwara-security` | severity-tagged findings (parallel) |
130
- | 8 Healing | Brook | `mugiwara-healing` | fixes; loops back to Wave 4, max 3 cycles |
131
- | 9 Closure | Luffy | `mugiwara-orchestration` | push + ready PR, verdict comment + check-run via `mugiwara-pr`, closure report in `.mugiwara/results/` + cleanup |
154
+ | 8 Healing | Brook | `mugiwara-healing` | fixes via worker subagents; loops to Wave 4, max 3 cycles |
155
+ | 9 Closure | Luffy | `mugiwara-orchestration` | detailed summary + push + ready PR summary (see Modes) |
132
156
 
133
- ### Modes
157
+ ### Checkpoint reports
158
+
159
+ You see progress as **checkpoint reports**, not a firehose: a wave banner
160
+ (`## Wave N — <crew> (<skill>)`), one compact report per crew member at each
161
+ stage boundary (what ran / result / evidence pointer), a progress summary per
162
+ wave, and a pause when something fails or gets risky. Subagents are used only
163
+ where they genuinely help: independent `[PARALLEL]` task batches, Brook's
164
+ reviewer/security re-verification workers, and background checks.
165
+
166
+ ## Manual stages
167
+
168
+ Want to drive the stages yourself? Every stage has a slash command that loads
169
+ the skill, runs the crew role inline, and bridges state from `.mugiwara/`:
170
+
171
+ | Command | Runs | Reads state from |
172
+ |---------|------|------------------|
173
+ | `/mugiwara-plan` | Nami | `.mugiwara/spec/` |
174
+ | `/mugiwara-execute` | Zoro | `.mugiwara/plans/` |
175
+ | `/mugiwara-review` | Robin | `.mugiwara/results/` + diff |
176
+ | `/mugiwara-security` | Jinbe | `.mugiwara/results/` + diff |
177
+ | `/mugiwara-heal` | Brook | `.mugiwara/issues/` |
178
+ | `/mugiwara-ship` | Luffy | plan + results |
179
+
180
+ You can jump into any stage — e.g. run `/mugiwara-plan` first, then
181
+ `/mugiwara-execute` later when you're ready.
182
+
183
+ ## Modes
134
184
 
135
185
  The crew runs at one of three autonomy levels, set in `.mugiwara/config`
136
186
  (project, overrides global `~/.mugiwara/config`):
@@ -139,54 +189,83 @@ The crew runs at one of three autonomy levels, set in `.mugiwara/config`
139
189
  mode=guided
140
190
  branch=feature/{type}-{issue}-{slug}
141
191
  commit=conventional
192
+ base=main
142
193
  ```
143
194
 
144
- | Level | Plan GO | Branch / commits | Ambiguities | Check-ins |
145
- |-------|---------|------------------|-------------|-----------|
195
+ | Level | Plan GO | Branch/commit | Ambiguities | Check-ins |
196
+ |-------|---------|---------------|-------------|-----------|
146
197
  | **guided** | ask the user | ask the user | ask the user | ask the user |
147
198
  | **semi** | present plan for user GO | auto | self-answer + log | log, no pause |
148
199
  | **auto** | gated auto-GO | auto | self-answer + log | log, no pause |
149
200
 
150
- - **guided** — the default, for when you want to steer everything. You approve
151
- the plan, decide branch and commit style, answer ambiguities, and get asked at
152
- every gate.
201
+ - **guided** — the default. You approve the plan, decide branch and commit,
202
+ answer ambiguities, and open the PR yourself.
153
203
  - **semi** — the crew self-manages branch, commits, and ambiguities (logging
154
204
  each decision), but you still give the plan an explicit GO.
155
205
  - **auto** — hands-off, with one safety line: the plan proceeds past approval
156
206
  only with zero blocking ambiguities AND zero high-risk tasks (deploy /
157
- migration / DB / public API / state-mutating). Otherwise it stops for you.
207
+ migration / DB / public API / state-mutating).
158
208
 
159
209
  Two invariants hold in **every** mode:
160
210
 
161
211
  - **Consent.** State-mutating tests against non-isolated/shared state (real DB
162
212
  writes, network, browsers) always require your explicit consent. Provably
163
213
  isolated mutation (in-memory / temp / testcontainer-backed) is auto-safe.
164
- - **Terminal.** Every mode ends at push + ready PR + verdict file handed to
165
- you the crew never merges, never deploys, never auto-reacts to review
166
- comments or CI.
214
+ - **Terminal.** Every mode ends at push + ready PR summary + verdict file (you
215
+ open the PR). The crew never creates a PR, merges, deploys, or auto-reacts
216
+ to review comments or CI.
167
217
 
168
- Flip mid-mission with the in-session phrase `mugiwara mode <guided|semi|auto>`
169
- the change applies from the next wave, never mid-wave. Missing config on read =
170
- `guided`. See `mugiwara-mode` for the full contract.
218
+ The PR description is prepared for you see [docs/pr-summary.md](docs/pr-summary.md)
219
+ for what the closure hands off.
171
220
 
172
- Alongside modes: declared user test cases are taken in as ATDD gold
173
- (`mugiwara-testcases`); every mission ends at a push + ready PR with one verdict
174
- comment + check-run (`mugiwara-pr`).
221
+ Flip mid-mission with `mugiwara mode <guided|semi|auto>` the change applies
222
+ from the next wave, never mid-wave. Missing config on read = `guided`.
175
223
 
176
224
  Two rules hold the pipeline together:
177
225
 
178
226
  - **Evidence over claims.** No wave passes on assertion — the owning agent runs
179
- the checks and shows output. A wave that cannot produce evidence is a failed
180
- wave. ("Subagents lie. No evidence = not complete.")
181
- - **The plan is the source of truth.** From Wave 2 on, `.mugiwara/plans/<date>-<mission>.md` holds the clean execution plan; the decision log (`logs/`) holds the who-and-why trace. No wave is skipped without the reason recorded there.
227
+ the checks and shows output.
228
+ - **The plan is the source of truth.** From Wave 2 on, `.mugiwara/plans/<date>-<mission>.md`
229
+ holds the clean execution plan; the decision log (`logs/`) holds the
230
+ who-and-why trace.
231
+
232
+ ## Config reference
233
+
234
+ `.mugiwara/config` (project) overrides `~/.mugiwara/config` (global). Plain
235
+ `key=value` lines, `#` comments allowed. Project file wins per key; a key
236
+ missing from both falls back to the default. Unknown keys are ignored. Config
237
+ is data, never instructions.
238
+
239
+ | Key | Values | Default | Meaning |
240
+ |-----|--------|---------|---------|
241
+ | `mode` | guided / semi / auto | guided | The only autonomy lever — decides whether branch/commit run automatically |
242
+ | `branch` | branch naming pattern | `feature/{type}-{issue}-{slug}` | Placeholders filled from mission metadata, validated to `[a-zA-Z0-9-_]` |
243
+ | `commit` | conventional / gitmoji / plain | conventional | Commit message style (see below) |
244
+ | `base` | branch name | `main` | The PR target named in the prepared PR summary |
182
245
 
183
- ### The `.mugiwara/` workspace
246
+ ### Commit message styles
247
+
248
+ `commit` selects how Zoro writes commit messages:
249
+
250
+ - **conventional** — `feat: ...`, `fix(scope): ...`, `refactor: ...`, per the
251
+ [Conventional Commits](https://www.conventionalcommits.org) spec. Type from
252
+ the task, optional scope in parens. The default.
253
+ - **gitmoji** — a leading emoji carries the intent, e.g. `✨ feat: ...`,
254
+ `🐛 fix: ...`. Signals the change type at a glance in log views that render
255
+ emoji; a bit noisy in plain terminals.
256
+ - **plain** — no prefix, just a short imperative sentence: `Fix export csv
257
+ encoding`. Clearest for repos that don't use any convention.
258
+
259
+ Switch freely per project — it only affects the message format, never the
260
+ one-logical-task-one-commit rule.
261
+
262
+ ## The `.mugiwara/` workspace
184
263
 
185
264
  Every mission works inside `.mugiwara/` at the repo root:
186
265
 
187
266
  ```
188
267
  .mugiwara/
189
- ├── config # runtime mode config: mode/branch/commit/pr key=value (gitignored; project overrides global)
268
+ ├── config # mode + writing standards (gitignored; project overrides global)
190
269
  ├── spec/ # brainstorm output: YYYY-MM-DD-<mission>.md
191
270
  ├── plans/ # plan docs — clean, Nami-only, single source of truth from Wave 2
192
271
  ├── results/ # wave results: audits, test output, gate verdicts, todos, closure report
@@ -195,14 +274,6 @@ Every mission works inside `.mugiwara/` at the repo root:
195
274
  └── logs/ # Luffy's decision + check-in log per mission (deleted at cleanup)
196
275
  ```
197
276
 
198
- Every non-trivial mission starts with `using-mugiwara`, which routes through the
199
- Luffy gateway; from Wave 2 the mission runs as a wave pipeline owned by one crew
200
- member per wave. **The main thread runs every wave inline** — it embodies each
201
- crew role using that member's skill, so the whole pipeline plays out in your
202
- main conversation and you watch it as it happens. Subagents are used only where
203
- they genuinely help: independent `[PARALLEL]` task batches and background
204
- checks. No work is hidden behind a subagent expand-click.
205
-
206
277
  **Blocker protocol:** any crew member that hits a blocker appends a row
207
278
  (`wave | task | symptom | attempted | help-needed`) to
208
279
  `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` and escalates — never a silent
@@ -212,31 +283,29 @@ workaround. Brook reads the ledger in Wave 8 and heals what it lists.
212
283
  files (consumed results, review, issues, and per-mission decision logs). The
213
284
  plan doc and the closure report stay.
214
285
 
215
- The owning agent creates the folder it needs on first write. Mission artifacts
216
- never land outside `.mugiwara/`.
217
-
218
286
  ## Install
219
287
 
220
288
  ### Via your AI agent
221
289
 
222
- Install the crew straight from your agent's own plugin system — no CLI needed.
223
- Pick your harness:
290
+ <details>
291
+ <summary><strong>Claude Code</strong> — agents + skills + SessionStart hook</summary>
224
292
 
225
- **Claude Code** (fully supported — agents + skills + SessionStart hook)
293
+ **Install**
226
294
 
227
295
  ```bash
228
296
  /plugin marketplace add ionivetech/mugiwara
229
297
  /plugin install mugiwara
230
298
  ```
231
299
 
232
- **GitHub Copilot CLI** (same marketplace)
300
+ **Update** re-install from the marketplace (or `mugiwara update` via CLI).
233
301
 
234
- ```bash
235
- copilot plugin marketplace add ionivetech/mugiwara
236
- copilot plugin install mugiwara
237
- ```
302
+ **Uninstall** — `/plugin uninstall mugiwara`, or `mugiwara uninstall` via CLI.
303
+ </details>
238
304
 
239
- **opencode** (native skills + agents via the opencode plugin)
305
+ <details>
306
+ <summary><strong>opencode</strong> — native skills + agents via plugin</summary>
307
+
308
+ **Install** — add to `opencode.json`:
240
309
 
241
310
  ```json
242
311
  { "plugin": ["@ionivetech/mugiwara"] }
@@ -248,49 +317,99 @@ Or from the git repo directly:
248
317
  { "plugin": ["mugiwara@git+https://github.com/ionivetech/mugiwara.git"] }
249
318
  ```
250
319
 
251
- **Codex**
320
+ **Update** — bump the package version in the `plugin` array (or `mugiwara update`).
321
+
322
+ **Uninstall** — remove the entry from the array.
323
+ </details>
324
+
325
+ <details>
326
+ <summary><strong>GitHub Copilot CLI</strong> — same marketplace</summary>
327
+
328
+ **Install**
329
+
330
+ ```bash
331
+ copilot plugin marketplace add ionivetech/mugiwara
332
+ copilot plugin install mugiwara
333
+ ```
334
+
335
+ > Copilot caveat: skills install and function; the agents are Claude-native
336
+ > `.md` files and are best consumed via the CLI install path, which writes
337
+ > Copilot-native `.instructions.md` skills.
338
+
339
+ **Update** — `copilot plugin update mugiwara`. **Uninstall** — `copilot plugin uninstall mugiwara`.
340
+ </details>
341
+
342
+ <details>
343
+ <summary><strong>Gemini CLI</strong> — extension</summary>
344
+
345
+ **Install**
346
+
347
+ ```bash
348
+ gemini extensions install https://github.com/ionivetech/mugiwara
349
+ ```
350
+
351
+ **Update** — `gemini extensions update mugiwara`.
352
+ **Uninstall** — `gemini extensions remove mugiwara`.
353
+ </details>
354
+
355
+ <details>
356
+ <summary><strong>Codex</strong> — plugin</summary>
357
+
358
+ **Install**
252
359
 
253
360
  ```bash
254
361
  codex plugin marketplace add ionivetech/mugiwara
255
362
  codex plugin add mugiwara@mugiwara
256
363
  ```
257
364
 
258
- **Cursor**
365
+ **Update** — `codex plugin update mugiwara`. **Uninstall** — `codex plugin remove mugiwara`.
366
+ </details>
367
+
368
+ <details>
369
+ <summary><strong>Cursor</strong> — plugin</summary>
370
+
371
+ **Install**
259
372
 
260
373
  ```
261
374
  /add-plugin mugiwara
262
375
  ```
263
376
 
264
- **Gemini CLI**
377
+ **Update** — re-run `/add-plugin mugiwara`. **Uninstall** — `/remove-plugin mugiwara`.
378
+ </details>
265
379
 
266
- ```bash
267
- gemini extensions install https://github.com/ionivetech/mugiwara
268
- ```
380
+ <details>
381
+ <summary><strong>Kimi Code</strong> plugin</summary>
269
382
 
270
- **Kimi Code**
383
+ **Install**
271
384
 
272
385
  ```
273
386
  /plugins install https://github.com/ionivetech/mugiwara
274
387
  ```
275
388
 
276
- **pi**
389
+ **Update** — `/plugins update mugiwara`. **Uninstall** — `/plugins remove mugiwara`.
390
+ </details>
391
+
392
+ <details>
393
+ <summary><strong>pi</strong> — package</summary>
394
+
395
+ **Install**
277
396
 
278
397
  ```bash
279
398
  pi install git:github.com/ionivetech/mugiwara
280
399
  ```
281
400
 
282
- Agent installs register the 25 skills; the agents (Luffy, Nami, Zoro, …) come
283
- natively with the harnesses that support them (Claude Code, opencode). On
284
- harnesses that install skills only (Gemini, Codex, Cursor, Kimi, pi), the
285
- agents are available via the CLI below.
401
+ **Update** `pi update mugiwara`. **Uninstall** `pi remove mugiwara`.
402
+ </details>
403
+
404
+ <details>
405
+ <summary><strong>npx / npm / curl / PowerShell</strong> — the mugiwara CLI</summary>
286
406
 
287
- ### Via script / CLI
407
+ Requires **Node.js >= 20.11**. Bun is optional — only needed to build from source.
288
408
 
289
- Requires **Node.js >= 20.11**. Bun is optional — only needed to build from
290
- source.
409
+ **Install**
291
410
 
292
411
  ```bash
293
- # npx — run without installing
412
+ # run without installing (wizard)
294
413
  npx @ionivetech/mugiwara@latest
295
414
 
296
415
  # non-interactive: global Claude Code install, no prompts
@@ -313,10 +432,12 @@ curl -fsSL https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/in
313
432
  irm https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.ps1 | iex
314
433
  ```
315
434
 
316
- The `install.sh` / `install.ps1` scripts check your Node version, then run the
317
- same CLI (`npx -y @ionivetech/mugiwara@latest`), forwarding any flags you pass.
435
+ **Update** `mugiwara update` (or `npm update -g @ionivetech/mugiwara`).
318
436
 
319
- **Skills only, any agent** the 25 skills also ship in the standard
437
+ **Uninstall** `mugiwara uninstall` (removes exactly what the manifest recorded; or `npm uninstall -g @ionivetech/mugiwara`).
438
+ </details>
439
+
440
+ **Skills only, any agent** — all 32 skills ship in the standard
320
441
  [agentskills.io](https://agentskills.io) layout (`skills/<name>/SKILL.md`), so
321
442
  you can install just the skills into Claude Code, opencode, Copilot, Cursor,
322
443
  Codex, Gemini CLI, and 70+ other agents via [skills.sh](https://skills.sh):
@@ -325,48 +446,14 @@ Codex, Gemini CLI, and 70+ other agents via [skills.sh](https://skills.sh):
325
446
  npx skills add ionivetech/mugiwara
326
447
  ```
327
448
 
328
- Skills only agents (Luffy, Nami, Zoro, …) are harness-specific and install
329
- via the agent-native methods above or the mugiwara CLI. `mugiwara skills`
330
- lists the installable set.
331
-
332
- ### Requirements
333
-
334
- | Dependency | Required for | Version |
335
- |------------|--------------|---------|
336
- | Node.js | running the CLI and the built artifact | >= 20.11 |
337
- | Bun | building from source, running tests | optional |
338
-
339
- ## Quickstart
340
-
341
- ```console
342
- $ npx @ionivetech/mugiwara@latest --global --target claude --yes
343
- mugiwara — installing crew for: claude
344
- ✓ claude 15 agents, 25 skills → ~/.claude/skills + ~/.claude/agents
345
- ✓ manifest wrote ~/.mugiwara/manifest.json
346
- ✓ done 24 files written
347
-
348
- $ # now just ask your Claude Code session
349
- > add dark mode to the settings page
350
-
351
- Wave 0 Luffy triage → route: plan (requirements mostly clear)
352
- Wave 2 Nami plan → .mugiwara/plans/2026-08-10-dark-mode.md (3 waves)
353
- Wave 3 Zoro execute→ 3 tasks, evidence shown per task
354
- Wave 4 Chopper audit → FAIL: toggle does not persist (ledger written)
355
- Wave 8 Brook heal → fixed persistence + tests, looped back → PASS
356
- Wave 9 Luffy closure→ report appended to plan, intermediate files cleaned
357
- ```
358
-
359
- You never drive the sequence — you answer Nami's clarifying questions up front
360
- and review Brook's rollback note if a fix is risky.
361
-
362
- ## Commands and flags
449
+ ## CLI commands and flags
363
450
 
364
451
  ### Commands
365
452
 
366
453
  | Command | Effect |
367
454
  |---------|--------|
368
455
  | `mugiwara install` | Install the crew (default; wizard when flags are missing) |
369
- | `mugiwara update` | Replace installed files, backing up differences to `.mugiwara/backup/<timestamp>/` first (project root, or `~` for global) |
456
+ | `mugiwara update` | Replace installed files, backing up differences to `.mugiwara/backup/<timestamp>/` first |
370
457
  | `mugiwara uninstall` | Remove exactly what the install manifest recorded |
371
458
  | `mugiwara list` | Show installations (project + global manifests) |
372
459
  | `mugiwara skills` | List the installable skills (agentskills.io) + skills.sh install command |
@@ -384,36 +471,17 @@ and review Brook's rollback note if a fix is risky.
384
471
  | `--force` | Overwrite files that differ (conflicting files are backed up first) |
385
472
  | `--dry-run` | Print the actions without writing anything |
386
473
 
387
- ```bash
388
- # non-interactive install requires scope + target, or it errors out
389
- npx @ionivetech/mugiwara@latest --project ./app --target claude --yes
390
-
391
- # preview what an install would write, without touching the disk
392
- npx @ionivetech/mugiwara@latest --global --target all --yes --dry-run
393
-
394
- # global installs skip targets that only support project scope (with a note)
395
- npx @ionivetech/mugiwara@latest --global --target all --yes
396
- ```
397
-
398
- ### Install manifest
399
-
400
- Every install writes `.mugiwara/manifest.json` (in the project dir, or `~` for
401
- global). The manifest records the version, scope, targets, and the exact
402
- list of written files — which is what `update` and `uninstall` use to operate
403
- safely.
474
+ Every install writes `.mugiwara/manifest.json` recording the version, scope,
475
+ targets, and the exact written files which is what `update` and `uninstall`
476
+ use to operate safely.
404
477
 
405
478
  ## Targets
406
479
 
407
- All nine supported targets. **Native** targets get first-class skills and
408
- agents; the rest get markdown rule files the tool picks up from a conventions
409
- directory. Targets marked *project only* are skipped (with a note) when you
410
- install with `--global`.
411
-
412
480
  | Target | Scope | Installs as |
413
481
  |--------|-------|-------------|
414
- | Claude Code | global + project | Native skills (`SKILL.md`) + agents in `.claude/skills` / `.claude/agents` (`~/.claude` globally) |
415
- | opencode | global + project | Native skills + agents in `.opencode/skills` / `.opencode/agents` (`~/.config/opencode` globally) |
416
- | GitHub Copilot | global + project | Skills as `.instructions.md` files + agents in `instructions/` / `agents/` (`.github` project, `~/.copilot` global) |
482
+ | Claude Code | global + project | Native skills (`SKILL.md`) + agents in `.claude/skills` / `.claude/agents` |
483
+ | opencode | global + project | Native skills + agents in `.opencode/skills` / `.opencode/agents` |
484
+ | GitHub Copilot | global + project | Skills as `.instructions.md` files + agents in `instructions/` / `agents/` |
417
485
  | Gemini CLI | project only | Markdown rules in `.gemini/mugiwara/` + `GEMINI.md` pointer |
418
486
  | Codex | project only | Markdown rules in `.codex/mugiwara/` + `AGENTS.md` pointer |
419
487
  | Windsurf | project only | Rules files in `.devin/rules` |
@@ -421,36 +489,15 @@ install with `--global`.
421
489
  | Kilo Code | project only | Rules files in `.kilo/rules` + `kilo.jsonc` pointer |
422
490
  | Antigravity | project only | Rules files in `.agents/rules` |
423
491
 
424
- For rule-based targets, skills land as `mugiwara-*.md` and agents as
425
- `agent-<name>.md`. Targets with a bootstrap file (`Gemini`, `Codex`, `Kilo`)
426
- create it if it doesn't exist and otherwise tell you the line to add, so your
427
- tool points at the crew.
428
-
429
492
  ## Plugin manifests
430
493
 
431
- Beyond the Claude Code marketplace, mugiwara ships native plugin manifests at
432
- the repo root so each harness's own installer can pick it up:
433
-
434
- | Manifest | Harness |
435
- |----------|---------|
436
- | `.claude-plugin/` | Claude Code + GitHub Copilot CLI (marketplace) |
437
- | `.opencode/plugins/mugiwara.mjs` | opencode (`plugin` array in `opencode.json`) |
438
- | `gemini-extension.json` + `GEMINI.md` | Gemini CLI |
439
- | `.codex-plugin/plugin.json` | Codex |
440
- | `.cursor-plugin/plugin.json` | Cursor |
441
- | `.kimi-plugin/plugin.json` | Kimi Code |
442
- | `package.json` `"pi"` | pi |
443
-
444
- All manifests are skills-only and mirror `content/` as the source of truth —
445
- no hooks, no runtime. The opencode plugin also registers the 15 agents as
446
- subagents. Version numbers in the manifests sync from `package.json` via
447
- `bun run sync-version` (runs automatically on publish).
448
-
449
- > **Copilot caveat.** Copilot CLI reads the Claude marketplace for skills, but
450
- > the agents are **Claude-native `.md` files** — they do not auto-discover in
451
- > Copilot. Skills install and function; agents are best consumed through the
452
- > regular CLI install path (which writes Copilot-native `.instructions.md`
453
- > skills and `.md` agents).
494
+ Mugiwara ships native plugin manifests at the repo root so each harness's own
495
+ installer can pick it up: `.claude-plugin/`, `.opencode/plugins/mugiwara.mjs`,
496
+ `gemini-extension.json` + `GEMINI.md`, `.codex-plugin/plugin.json`,
497
+ `.cursor-plugin/plugin.json`, `.kimi-plugin/plugin.json`, and the `"pi"` entry
498
+ in `package.json`. All manifests are skills-only and mirror `content/` as the
499
+ source of truth. The opencode plugin also registers the 15 agents. Versions
500
+ sync from `package.json` via `bun run sync-version`.
454
501
 
455
502
  ## Contributing
456
503