@ionivetech/mugiwara 0.1.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 (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +488 -0
  3. package/content/agents/brook-healing.md +36 -0
  4. package/content/agents/chopper-checkpoint.md +41 -0
  5. package/content/agents/eval-runner.md +44 -0
  6. package/content/agents/franky-gates.md +35 -0
  7. package/content/agents/jinbe-security.md +41 -0
  8. package/content/agents/luffy-orchestrator.md +44 -0
  9. package/content/agents/memory-keeper.md +37 -0
  10. package/content/agents/nami-planner.md +42 -0
  11. package/content/agents/resume-coordinator.md +39 -0
  12. package/content/agents/robin-reviewer.md +40 -0
  13. package/content/agents/sanji-quality.md +36 -0
  14. package/content/agents/skeptic-verifier.md +39 -0
  15. package/content/agents/using-mugiwara.md +36 -0
  16. package/content/agents/usopp-brainstorm.md +36 -0
  17. package/content/agents/zoro-execution.md +39 -0
  18. package/content/skills/mugiwara-agent-security/SKILL.md +58 -0
  19. package/content/skills/mugiwara-backend/SKILL.md +90 -0
  20. package/content/skills/mugiwara-brainstorm/SKILL.md +53 -0
  21. package/content/skills/mugiwara-checkpoint/SKILL.md +62 -0
  22. package/content/skills/mugiwara-dynamic-workflow/SKILL.md +85 -0
  23. package/content/skills/mugiwara-eval/SKILL.md +82 -0
  24. package/content/skills/mugiwara-execution/SKILL.md +81 -0
  25. package/content/skills/mugiwara-frontend/SKILL.md +122 -0
  26. package/content/skills/mugiwara-gates/SKILL.md +50 -0
  27. package/content/skills/mugiwara-git/SKILL.md +67 -0
  28. package/content/skills/mugiwara-healing/SKILL.md +62 -0
  29. package/content/skills/mugiwara-lessons/SKILL.md +57 -0
  30. package/content/skills/mugiwara-observability/SKILL.md +54 -0
  31. package/content/skills/mugiwara-orchestration/SKILL.md +55 -0
  32. package/content/skills/mugiwara-planning/SKILL.md +98 -0
  33. package/content/skills/mugiwara-quality/SKILL.md +39 -0
  34. package/content/skills/mugiwara-resume/SKILL.md +49 -0
  35. package/content/skills/mugiwara-review/SKILL.md +86 -0
  36. package/content/skills/mugiwara-security/SKILL.md +87 -0
  37. package/content/skills/mugiwara-ship/SKILL.md +58 -0
  38. package/content/skills/mugiwara-workflow/SKILL.md +90 -0
  39. package/dist/mugiwara.js +602 -0
  40. package/package.json +29 -0
  41. package/scripts/install.ps1 +14 -0
  42. package/scripts/install.sh +17 -0
  43. package/src/args.ts +31 -0
  44. package/src/cli.ts +187 -0
  45. package/src/frontmatter.ts +20 -0
  46. package/src/installer.ts +118 -0
  47. package/src/manifest.ts +29 -0
  48. package/src/prompt.ts +37 -0
  49. package/src/targets/antigravity.ts +10 -0
  50. package/src/targets/claude.ts +25 -0
  51. package/src/targets/cline.ts +10 -0
  52. package/src/targets/codex.ts +10 -0
  53. package/src/targets/copilot.ts +26 -0
  54. package/src/targets/gemini.ts +10 -0
  55. package/src/targets/generic.ts +43 -0
  56. package/src/targets/index.ts +14 -0
  57. package/src/targets/kilo.ts +10 -0
  58. package/src/targets/opencode.ts +25 -0
  59. package/src/targets/windsurf.ts +10 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ionive
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,488 @@
1
+ # Mugiwara
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@ionivetech%2fmugiwara)](https://www.npmjs.com/package/@ionivetech/mugiwara)
4
+ [![License: MIT](https://img.shields.io/github/license/ionivetech/mugiwara)](https://github.com/ionivetech/mugiwara/blob/main/LICENSE)
5
+ [![npm downloads](https://img.shields.io/npm/dm/@ionivetech%2fmugiwara)](https://www.npmjs.com/package/@ionivetech/mugiwara)
6
+ [![CI](https://img.shields.io/github/actions/workflow/status/ionivetech/mugiwara/ci.yml?branch=main&label=ci)](https://github.com/ionivetech/mugiwara/actions)
7
+ [![TypeScript](https://img.shields.io/badge/types-TypeScript-3178c6)](https://github.com/ionivetech/mugiwara)
8
+ [![Bun](https://img.shields.io/badge/bundler-Bun-black)](https://bun.sh)
9
+ [![GitHub](https://img.shields.io/badge/GitHub-ionivetech%2Fmugiwara-181717?logo=github)](https://github.com/ionivetech/mugiwara)
10
+
11
+ The Straw Hat crew of AI agents and skills.
12
+
13
+ Zero runtime: pure markdown your existing AI agent runs with its own subagent
14
+ machinery — no daemons, no plugins to keep updated, nothing to host.
15
+
16
+ ## Why Mugiwara
17
+
18
+ - 🧭 **A named crew.** Ten specialist agents — Luffy orchestrates, Nami plans,
19
+ Zoro executes, Chopper audits, Brook heals — each with a narrow job.
20
+ - 📦 **No runtime.** Ships markdown only: native skills and agents for
21
+ Claude Code, opencode, Copilot, Gemini CLI, Codex, Windsurf, Cline,
22
+ Kilo Code, and Antigravity.
23
+ - 🔁 **Wave pipeline.** brainstorm → plan → execute → audit → quality → gates
24
+ → review → security → heal → closure. Failure loops back through healing
25
+ (max 3 cycles), never ships broken.
26
+ - 🛡 **Evidence over claims.** No wave passes on assertion — the owning agent
27
+ shows output. No evidence, not complete.
28
+ - ⚡ **One-command install.** `npx`, `npm -g`, curl, or PowerShell — interactive
29
+ wizard or fully scriptable with flags.
30
+ - 🧪 **Everything validated.** Coverage gates, build gates, OWASP security
31
+ review, doubt-driven diff review, Definition of Done.
32
+
33
+ ### The crew — 15 agents
34
+
35
+ Each agent is a focused specialist. Agents are dispatched by your AI tool's
36
+ subagent machinery and may call the crew's shared skills.
37
+
38
+ | Agent | Crew member | Role |
39
+ |-------|-------------|------|
40
+ | `using-mugiwara` | Front Door | Start here: routes any request to the right crew member — no agent names to remember |
41
+ | `luffy-orchestrator` | Luffy | Main gateway: 5-way triage, background check-ins, work splitting, decision log, closure |
42
+ | `usopp-brainstorm` | Usopp | Critical brainstorming friend: facts over hype, options + trade-offs, no over-engineering |
43
+ | `nami-planner` | Nami | Interview-first planner: full-context scan, wave structure, anti-patterns, parallel-safe plans |
44
+ | `zoro-execution` | Zoro | Execute plans: todo list first, parallel/sequential subagent dispatch, evidence per task |
45
+ | `chopper-checkpoint` | Chopper | Verify-everything audit of wave results; writes the failure ledger (never fixes code) |
46
+ | `sanji-quality` | Sanji | Discover the stack, then format/lint/test; integration tests only with consent |
47
+ | `franky-gates` | Franky | Binary gates: coverage ≥90/80, build exit 0, Definition of Done |
48
+ | `robin-reviewer` | Robin | Doubt-driven diff review: breaking-change first, five-axis, severity-tagged findings |
49
+ | `jinbe-security` | Jinbe | Security review: OWASP, secrets, injection, auth, dependencies, untrusted-data doctrine |
50
+ | `brook-healing` | Brook | Reads the blocker ledger, Stop-the-Line root-cause fixes, ≤3 heal cycles |
51
+ | `skeptic-verifier` | Skeptic | Adversarial verification: doubt every output/plan/verdict, find what's wrong, do NOT validate |
52
+ | `eval-runner` | Eval Runner | Test engineer for the harness itself: task suites, judge-agent rubric comparison, fix the skill not the eval |
53
+ | `resume-coordinator` | Resume Coordinator | Rebuild the picture from `.mugiwara/` state after context loss; continue, never restart |
54
+ | `memory-keeper` | Memory Keeper | Institutional memory: surface past lessons at mission start, capture new ones at closure |
55
+
56
+ ### The techniques — 21 skills
57
+
58
+ | Skill | Purpose |
59
+ |-------|---------|
60
+ | `mugiwara-workflow` | The harness entry point: gateway triage, wave pipeline, workspace layout, blocker protocol, cleanup |
61
+ | `mugiwara-orchestration` | Luffy's captain behavior: 5-way classifier, check-ins, work splitting, decision log, closure |
62
+ | `mugiwara-brainstorm` | Usopp's critical sparring: interrogate, research facts, cut over-engineering, recommend |
63
+ | `mugiwara-planning` | Interview-first, full-context scan, wave plans with parallel/sequential markers + anti-patterns |
64
+ | `mugiwara-execution` | Todo list, parallel batches + sequential chains, 6-field subagent delegation, one task one commit |
65
+ | `mugiwara-checkpoint` | Verify-everything audit of every acceptance criterion; failure rows to the blocker ledger |
66
+ | `mugiwara-quality` | Discover the project's real tooling; formatter, linter, unit + consent-gated integration tests |
67
+ | `mugiwara-gates` | Coverage ≥90% new / ≥80% modified files, build validation, Definition of Done |
68
+ | `mugiwara-review` | Doubt-driven review: breaking-change analysis, five-axis, severity-tagged findings |
69
+ | `mugiwara-security` | OWASP-driven security review, untrusted-data doctrine, severity by exploitability × impact |
70
+ | `mugiwara-healing` | Reads the ledger, Stop-the-Line + Prove-It root-cause fixes, rollback prep |
71
+ | `mugiwara-frontend` | Anti-slop frontend: audit-first redesigns, design-system extraction, slop list |
72
+ | `mugiwara-git` | Atomic commits, save-points, multi-commit splitting, bisect/blame debugging |
73
+ | `mugiwara-ship` | GO/NO-GO ship gate: pre-launch checklist, feature flags, rollback plan |
74
+ | `mugiwara-dynamic-workflow` | Runtime workflow patterns: fan-out-and-synthesize, tournament, loop-until-done, classify-and-act, adversarial verification |
75
+ | `mugiwara-agent-security` | Secure the agent layer: prompt injection, memory poisoning, excessive agency, secret handling, sandboxing |
76
+ | `mugiwara-backend` | Backend/server code: repo standards first, API design, data integrity, error handling, correctness, performance, server-side security |
77
+ | `mugiwara-eval` | Test the harness itself: task suites, judge-agent rubric comparison, pass/fail per case |
78
+ | `mugiwara-observability` | Trace the crew: structured logs, OTel-compatible spans, session correlation, end-of-mission summary |
79
+ | `mugiwara-resume` | Session resume: rebuild state from `.mugiwara/` after compaction/loss; never restart |
80
+ | `mugiwara-lessons` | Cross-mission memory: actionable lessons ledger, read at triage, written at closure |
81
+
82
+ ### Frontend anti-slop gating
83
+
84
+ `--type frontend` or `--type fullstack` includes `mugiwara-frontend` in the
85
+ install; `backend` and `general` skip it. The skill enforces audit-first
86
+ redesigns, extracts the design system from the reference, and bans generic
87
+ AI-slop patterns — framework-agnostic.
88
+
89
+ ## How it works
90
+
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.
98
+
99
+ ```mermaid
100
+ flowchart TD
101
+ A[User request] --> F[using-mugiwara<br/>front door]
102
+ F --> B{Luffy gateway<br/>5-way triage}
103
+ B -- exploratory --> C[Usopp brainstorm<br/>.mugiwara/spec/]
104
+ B -- clear work --> D[Nami plan<br/>.mugiwara/plans/]
105
+ C --> D
106
+ D --> E[Zoro execute<br/>parallel / sequential]
107
+ E --> F[Chopper audit<br/>failure ledger]
108
+ F --> G[Sanji quality]
109
+ G --> H[Franky gates]
110
+ H --> I[Robin + Jinbe review<br/>parallel]
111
+ I -- pass --> J[Luffy closure<br/>ship gate]
112
+ I -- fail --> K[Brook heal<br/>max 3 cycles]
113
+ K --> F
114
+ J --> L[.mugiwara/ cleanup]
115
+ ```
116
+
117
+ The same pipeline as a portable table (renders anywhere markdown does):
118
+
119
+ | Wave | Owner | Skill | Output |
120
+ |------|-------|-------|--------|
121
+ | 0 Triage | Luffy | `mugiwara-orchestration` | 5-way route decision + reason |
122
+ | 1 Brainstorm | Usopp | `mugiwara-brainstorm` | refined direction, options, recommendation |
123
+ | 2 Planning | Nami | `mugiwara-planning` | plan doc: waves, tasks, acceptance criteria |
124
+ | 3 Execution | Zoro | `mugiwara-execution` | implemented tasks with evidence |
125
+ | 4 Checkpoint | Chopper | `mugiwara-checkpoint` | audit report + failure ledger |
126
+ | 5 Quality | Sanji | `mugiwara-quality` | formatter/linter/test results |
127
+ | 6 Gates | Franky | `mugiwara-gates` | coverage + build verdict |
128
+ | 7 Review | Robin ∥ Jinbe | `mugiwara-review` + `mugiwara-security` | severity-tagged findings (parallel) |
129
+ | 8 Healing | Brook | `mugiwara-healing` | fixes; loops back to Wave 4, max 3 cycles |
130
+ | 9 Closure | Luffy | `mugiwara-orchestration` | closure report appended to the plan |
131
+
132
+ Two rules hold the pipeline together:
133
+
134
+ - **Evidence over claims.** No wave passes on assertion — the owning agent runs
135
+ the checks and shows output. A wave that cannot produce evidence is a failed
136
+ wave. ("Subagents lie. No evidence = not complete.")
137
+ - **The plan is the source of truth.** From Wave 2 on, everything lives in
138
+ `.mugiwara/plans/<date>-<mission>.md`. No wave is skipped without the reason
139
+ recorded there.
140
+
141
+ ### The `.mugiwara/` workspace
142
+
143
+ Every mission works inside `.mugiwara/` at the repo root:
144
+
145
+ ```
146
+ .mugiwara/
147
+ ├── spec/ # brainstorm output: YYYY-MM-DD-<mission>.md
148
+ ├── plans/ # plan docs — single source of truth from Wave 2
149
+ ├── results/ # wave results: audits, test output, gate verdicts, todos
150
+ ├── review/ # review + security findings
151
+ ├── issues/ # blocker + failure ledger: YYYY-MM-DD-<mission>-blockers.md
152
+ └── logs/ # Luffy's decision log
153
+ ```
154
+
155
+ **Blocker protocol:** any crew member that hits a blocker appends a row
156
+ (`wave | task | symptom | attempted | help-needed`) to
157
+ `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` and escalates — never a silent
158
+ workaround. Brook reads the ledger in Wave 8 and heals what it lists.
159
+
160
+ **Cleanup:** at closure, Luffy deletes the superseded intermediate markdown
161
+ files (consumed results, review, and issues reports). The plan doc and closure
162
+ report stay.
163
+
164
+ The owning agent creates the folder it needs on first write. Mission artifacts
165
+ never land outside `.mugiwara/`.
166
+
167
+ ## Install
168
+
169
+ Requires **Node.js >= 20.11**. Bun is optional — you only need it to build
170
+ from source.
171
+
172
+ ### npx
173
+
174
+ ```bash
175
+ # npx — run without installing (recommended)
176
+ npx @ionivetech/mugiwara@latest
177
+
178
+ # interactive wizard (scope, target agent, project type)
179
+ # non-interactive: global Claude Code install, general type, no prompts
180
+ npx @ionivetech/mugiwara@latest --global --target claude --type general --yes
181
+
182
+ # non-interactive: project install for opencode + GitHub Copilot, frontend type
183
+ npx @ionivetech/mugiwara@latest --project ./my-app --target opencode,copilot --type frontend --yes
184
+ ```
185
+
186
+ ### npm — global install
187
+
188
+ ```bash
189
+ # npm — global install, run `mugiwara` anywhere
190
+ npm install -g @ionivetech/mugiwara
191
+ ```
192
+
193
+ ### curl — macOS / Linux
194
+
195
+ ```bash
196
+ # curl — macOS/Linux one-liner
197
+ curl -fsSL https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.sh | bash
198
+ ```
199
+
200
+ ### PowerShell — Windows
201
+
202
+ ```powershell
203
+ # PowerShell — Windows one-liner
204
+ irm https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.ps1 | iex
205
+ ```
206
+
207
+ The `install.sh` / `install.ps1` scripts check your Node version, then run the
208
+ same CLI (`npx -y @ionivetech/mugiwara@latest`), forwarding any flags you pass.
209
+
210
+ ### skills.sh — skills only, any agent
211
+
212
+ The 21 skills also ship in the standard [agentskills.io](https://agentskills.io)
213
+ layout (`skills/<name>/SKILL.md`), so you can install just the skills into
214
+ Claude Code, opencode, Copilot, Cursor, Codex, Gemini CLI, and 70+ other agents
215
+ via the [skills.sh](https://skills.sh) CLI:
216
+
217
+ ```bash
218
+ npx skills add ionivetech/mugiwara
219
+ ```
220
+
221
+ Skills only — the agents (Luffy, Nami, Zoro, …) are harness-specific and install
222
+ via the mugiwara CLI or Claude plugin above. `mugiwara skills` lists the
223
+ installable set.
224
+
225
+ ### Requirements
226
+
227
+ | Dependency | Required for | Version |
228
+ |------------|--------------|---------|
229
+ | Node.js | running the CLI and the built artifact | >= 20.11 |
230
+ | Bun | building from source, running tests | optional |
231
+
232
+ ## Quickstart
233
+
234
+ ```console
235
+ $ npx @ionivetech/mugiwara@latest --global --target claude --type general --yes
236
+ mugiwara — installing crew for: claude
237
+ ✓ claude 15 agents, 21 skills → ~/.claude/skills + ~/.claude/agents
238
+ ✓ manifest wrote ~/.mugiwara/manifest.json
239
+ ✓ done 24 files written
240
+
241
+ $ # now just ask your Claude Code session
242
+ > add dark mode to the settings page
243
+
244
+ Wave 0 Luffy triage → route: plan (requirements mostly clear)
245
+ Wave 2 Nami plan → .mugiwara/plans/2026-08-10-dark-mode.md (3 waves)
246
+ Wave 3 Zoro execute→ 3 tasks, evidence shown per task
247
+ Wave 4 Chopper audit → FAIL: toggle does not persist (ledger written)
248
+ Wave 8 Brook heal → fixed persistence + tests, looped back → PASS
249
+ Wave 9 Luffy closure→ report appended to plan, intermediate files cleaned
250
+ ```
251
+
252
+ You never drive the sequence — you answer Nami's clarifying questions up front
253
+ and review Brook's rollback note if a fix is risky.
254
+
255
+ ## Commands and flags
256
+
257
+ ### Commands
258
+
259
+ | Command | Effect |
260
+ |---------|--------|
261
+ | `mugiwara install` | Install the crew (default; wizard when flags are missing) |
262
+ | `mugiwara update` | Replace installed files, backing up differences to `.mugiwara/backup/<timestamp>/` first (project root, or `~` for global) |
263
+ | `mugiwara uninstall` | Remove exactly what the install manifest recorded |
264
+ | `mugiwara list` | Show installations (project + global manifests) |
265
+ | `mugiwara skills` | List the installable skills (agentskills.io) + skills.sh install command |
266
+ | `mugiwara --help` | Print usage and flags |
267
+ | `mugiwara --version` | Print the package version |
268
+
269
+ ### Flags
270
+
271
+ | Flag | Meaning |
272
+ |------|---------|
273
+ | `--global` | Install user-wide (writes to your home directory) |
274
+ | `--project <dir>` | Install into a project directory (default: current directory) |
275
+ | `--target <ids\|all>` | Comma-separated target IDs, or `all`. Valid: `claude, opencode, copilot, gemini, codex, windsurf, cline, kilo, antigravity` |
276
+ | `--type <t>` | Project type: `frontend`, `backend`, `fullstack`, `general`. `frontend`/`fullstack` include `mugiwara-frontend` |
277
+ | `--yes`, `-y` | Non-interactive. Requires `--global` or `--project`, `--target`, and `--type` |
278
+ | `--force` | Overwrite files that differ (conflicting files are backed up first) |
279
+ | `--dry-run` | Print the actions without writing anything |
280
+
281
+ ```bash
282
+ # non-interactive install requires all three, or it errors out
283
+ npx @ionivetech/mugiwara@latest --project ./app --target claude --type frontend --yes
284
+
285
+ # preview what an install would write, without touching the disk
286
+ npx @ionivetech/mugiwara@latest --global --target all --type general --yes --dry-run
287
+
288
+ # global installs skip targets that only support project scope (with a note)
289
+ npx @ionivetech/mugiwara@latest --global --target all --type general --yes
290
+ ```
291
+
292
+ ### Install manifest
293
+
294
+ Every install writes `.mugiwara/manifest.json` (in the project dir, or `~` for
295
+ global). The manifest records the version, scope, type, targets, and the exact
296
+ list of written files — which is what `update` and `uninstall` use to operate
297
+ safely.
298
+
299
+ ## Targets
300
+
301
+ All nine supported targets. **Native** targets get first-class skills and
302
+ agents; the rest get markdown rule files the tool picks up from a conventions
303
+ directory. Targets marked *project only* are skipped (with a note) when you
304
+ install with `--global`.
305
+
306
+ | Target | Scope | Installs as |
307
+ |--------|-------|-------------|
308
+ | Claude Code | global + project | Native skills (`SKILL.md`) + agents in `.claude/skills` / `.claude/agents` (`~/.claude` globally) |
309
+ | opencode | global + project | Native skills + agents in `.opencode/skills` / `.opencode/agents` (`~/.config/opencode` globally) |
310
+ | GitHub Copilot | global + project | Skills as `.instructions.md` files + agents in `instructions/` / `agents/` (`.github` project, `~/.copilot` global) |
311
+ | Gemini CLI | project only | Markdown rules in `.gemini/mugiwara/` + `GEMINI.md` pointer |
312
+ | Codex | project only | Markdown rules in `.codex/mugiwara/` + `AGENTS.md` pointer |
313
+ | Windsurf | project only | Rules files in `.devin/rules` |
314
+ | Cline | project only | Rules files in `.clinerules` |
315
+ | Kilo Code | project only | Rules files in `.kilo/rules` + `kilo.jsonc` pointer |
316
+ | Antigravity | project only | Rules files in `.agents/rules` |
317
+
318
+ For rule-based targets, skills land as `mugiwara-*.md` and agents as
319
+ `agent-<name>.md`. Targets with a bootstrap file (`Gemini`, `Codex`, `Kilo`)
320
+ create it if it doesn't exist and otherwise tell you the line to add, so your
321
+ tool points at the crew.
322
+
323
+ ## Claude Code plugin install
324
+
325
+ Mugiwara also ships as a **Claude Code plugin** with a marketplace — the
326
+ primary target. The plugin bundles the 15 agents + 21 skills as copies at the
327
+ repo root (`agents/`, `skills/`) plus a `SessionStart` hook that announces the
328
+ crew. Regenerate the copies from `content/` with `.claude-plugin/sync.sh`.
329
+
330
+ ```bash
331
+ # Claude Code (fully supported)
332
+ /plugin marketplace add ionivetech/mugiwara
333
+ /plugin install mugiwara
334
+ ```
335
+
336
+ GitHub Copilot CLI can read the same `.claude-plugin/` marketplace and consume
337
+ the skills as native Copilot skills:
338
+
339
+ ```bash
340
+ # GitHub Copilot CLI (skills + marketplace readable)
341
+ copilot plugin marketplace add ionivetech/mugiwara
342
+ copilot plugin install mugiwara
343
+ ```
344
+
345
+ > **Copilot caveat.** The agents are **Claude-native `.md` files** — they will
346
+ > not auto-discover in Copilot and may need `.agent.md` conversion to work as
347
+ > Copilot plugin agents. Skills install and function; agents are best consumed
348
+ > through the regular CLI install path (which writes Copilot-native
349
+ > `.instructions.md` skills and `.md` agents).
350
+
351
+ ## FAQ / troubleshooting
352
+
353
+ **Why is the content so short?** The skills are dense instructions, not prose.
354
+ Each agent/skill file is one flat-frontmatter markdown doc, body ≤120 lines —
355
+ short enough for your AI tool to read fully and act on. Density beats verbosity:
356
+ the harness doesn't ship essays, it ships protocols.
357
+
358
+ **Do I need Bun?** No. The runtime is plain Node.js >= 20.11 — the built
359
+ artifact (`dist/mugiwara.js`) runs on Node. Bun is only for building from
360
+ source and running tests.
361
+
362
+ **How is Mugiwara different from a framework like CrewAI?** CrewAI is a
363
+ runtime you program against. Mugiwara is content-only: markdown skills and
364
+ agents your existing AI tool loads natively and executes with its own subagent
365
+ machinery. There is no runtime, no SDK, nothing to host.
366
+
367
+ **Does it work on Windows?** Yes — PowerShell one-liner
368
+ (`irm ...install.ps1 | iex`), and the CLI itself runs anywhere Node >= 20.11
369
+ does.
370
+
371
+ **How do I uninstall?** `mugiwara uninstall` removes exactly what the install
372
+ manifest recorded — nothing more, nothing less. For a plugin install, remove it
373
+ from the plugin marketplace/manager instead.
374
+
375
+ **Why is the npm package `@ionivetech/mugiwara` and not `mugiwara`?**
376
+ `mugiwara` is taken on npm. The package is scoped as `@ionivetech/mugiwara`;
377
+ all install methods above already point at the scoped name.
378
+
379
+ **Where does a plugin install put files?** At the repo root of the plugin
380
+ itself (`agents/`, `skills/`), plus a `SessionStart` hook — it does not copy
381
+ into your project's `.claude/`. The CLI install is what writes into your
382
+ project or home directory.
383
+
384
+ **How do updates work?** `mugiwara update` replaces installed files, backing up
385
+ differences to `.mugiwara/backup/<timestamp>/` first. Plugin installs update
386
+ through the plugin marketplace when the repo publishes new content.
387
+
388
+ ## Development
389
+
390
+ ### Prerequisites
391
+
392
+ - **Bun** — the build and test toolchain
393
+ - **Node.js >= 20.11** — the built artifact runs on plain Node
394
+
395
+ ```bash
396
+ bun install # install dev dependencies
397
+ bun run build # bundle src/cli.ts → dist/mugiwara.js (Bun, ESM, node target)
398
+ bun run test # vitest suites
399
+ bun run typecheck # tsc --noEmit
400
+ bun run validate # bun scripts/validate-content.ts — content schema lint
401
+ node dist/mugiwara.js --version # smoke-test the built CLI
402
+ ```
403
+
404
+ `bun run build` runs automatically on `npm pack` / `npm publish` (via
405
+ `prepack`).
406
+
407
+ ### Project layout
408
+
409
+ ```
410
+ mugiwara/
411
+ ├── src/ # TypeScript: CLI, installer, target adapters
412
+ │ └── targets/ # one adapter per AI agent (claude, opencode, gemini, ...)
413
+ ├── test/ # vitest suites
414
+ ├── content/ # single source of truth for the crew
415
+ │ ├── skills/ # 21 skills (one dir per skill, SKILL.md inside)
416
+ │ └── agents/ # 15 agents (<name>.md)
417
+ ├── scripts/ # install.sh, install.ps1, validate-content.ts
418
+ ├── hooks/ # Claude Code SessionStart hook (hooks.json + session-start.ts)
419
+ ├── .claude-plugin/ # Claude plugin + marketplace metadata; sync.sh copies
420
+ ├── agents/ # plugin copies of content/agents/ (generated by sync.sh)
421
+ ├── skills/ # plugin copies of content/skills/ (generated by sync.sh)
422
+ ├── dist/ # bundled CLI output (generated, gitignored)
423
+ ├── docs/ # specs, plans, research
424
+ └── package.json
425
+ ```
426
+
427
+ ### Adding a skill
428
+
429
+ 1. Create `content/skills/<name>/SKILL.md` — flat frontmatter (`name`,
430
+ `description`), body ≤ 120 lines.
431
+ 2. Reference it from at least one agent's `skills` field in
432
+ `content/agents/*.md`.
433
+ 3. Run `bun run validate` to confirm it passes the schema.
434
+ 4. Re-sync the plugin copies with `.claude-plugin/sync.sh`.
435
+
436
+ ### Adding an agent
437
+
438
+ 1. Create `content/agents/<name>.md` with a `skills` field listing the skills
439
+ it calls.
440
+ 2. Run `bun run validate`.
441
+ 3. Re-sync with `.claude-plugin/sync.sh`.
442
+
443
+ ## Content schema
444
+
445
+ Every skill and agent is a single markdown file with **flat frontmatter** — no
446
+ nested fields:
447
+
448
+ ```yaml
449
+ ---
450
+ name: mugiwara-example
451
+ description: Use when <trigger condition> — <what it does, how it behaves>.
452
+ ---
453
+
454
+ <body>
455
+ ```
456
+
457
+ | Rule | Detail |
458
+ |------|--------|
459
+ | Naming | `name` must equal the directory (skills) or file (agents) name |
460
+ | Description | `description` 20–500 characters for skills, ≥20 for agents |
461
+ | Trigger phrasing | Descriptions start with "Use when …" (skills) or "Dispatch when …" (agents) so your AI tool auto-selects the right one |
462
+ | Skill body | ≤ 120 lines |
463
+ | Agent `skills` | Every agent must list the skills it calls, comma-separated; each must exist |
464
+ | References | Every skill except `mugiwara-workflow` must be referenced by at least one agent |
465
+ | Uniqueness | No duplicate `name` across skills and agents |
466
+
467
+ Run `bun run validate` before opening a PR — it checks all of this and exits
468
+ non-zero on any violation.
469
+
470
+ ## Contributing
471
+
472
+ Open an issue or pull request on GitHub. If you add content (skills/agents),
473
+ follow the [content schema](#content-schema) and run `bun run validate` before
474
+ opening the PR.
475
+
476
+ ## Resources
477
+
478
+ - GitHub: <https://github.com/ionivetech/mugiwara>
479
+ - npm: <https://www.npmjs.com/package/@ionivetech/mugiwara>
480
+ - Star history: <https://star-history.com/#ionivetech/mugiwara>
481
+
482
+ ## License
483
+
484
+ MIT. Copyright (c) 2026 ionive. See [LICENSE](LICENSE).
485
+
486
+ ---
487
+
488
+ [![Star History Chart](https://api.star-history.com/svg?repos=ionivetech/mugiwara&type=Date)](https://star-history.com/#ionivetech/mugiwara)
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: brook-healing
3
+ description: Dispatch when any wave produced failures - test failures, gate failures, review or security findings. Triages each failure, applies minimal root-cause fixes, prepares rollback for risky ones, re-runs the failed checks.
4
+ skills: mugiwara-healing, mugiwara-git
5
+ ---
6
+
7
+ # Brook — Healing (Musician)
8
+
9
+ ## Role
10
+
11
+ Self-healing: repairs what failed in earlier waves, minimally, and proves each fix. Reads the failure ledger and works it down.
12
+
13
+ ## When dispatched
14
+
15
+ Wave 8 of `mugiwara-workflow`, with failure inputs from Chopper/Sanji/Franky/Robin/Jinbe.
16
+
17
+ ## Rules
18
+
19
+ 1. Follow `mugiwara-healing` exactly (triage matrix, root-cause rule, cycle counter).
20
+ 2. Read `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` and work each row; mark rows fixed as you clear them.
21
+ 3. Never weaken or delete tests/configs to silence a failure.
22
+ 4. Apply `mugiwara-git` for fixes: atomic commits, save-points before a risky fix, rollback plan prepared for risky ones.
23
+ 5. Same failure after 3 heal cycles → stop and escalate to Luffy with full history.
24
+ 6. Re-run the failed checks and attach evidence per fix.
25
+
26
+ ## Output
27
+
28
+ Fixed list + escalated list in `.mugiwara/results/<mission>-healing.md` → back to Wave 4 (Chopper) for re-audit.
29
+
30
+ ## Red flags
31
+
32
+ - Patching the symptom instead of the root cause.
33
+ - Deleting or weakening a test/config to silence a failure.
34
+ - A drive-by refactor riding along with a fix.
35
+ - Marking a code failure as `env`.
36
+ - Healing past 3 cycles without escalating.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: chopper-checkpoint
3
+ description: Dispatch after each execution wave to audit results against the plan - re-runs every acceptance criterion, verifies commit hygiene and parallel-file safety, classifies failures honestly, appends ledger rows, and issues a Definition-of-Done verdict. Auditor only; never fixes code.
4
+ skills: mugiwara-checkpoint
5
+ ---
6
+
7
+ # Chopper — Checkpoint (Auditor)
8
+
9
+ ## Role
10
+
11
+ Audits execution against the plan. Trusts nothing; re-verifies everything. Does not fix — findings only.
12
+
13
+ ## When dispatched
14
+
15
+ Wave 4 of `mugiwara-workflow`, with the plan doc and Zoro's execution report.
16
+
17
+ ## Rules
18
+
19
+ 1. Follow `mugiwara-checkpoint` exactly (verify-everything gate, audit protocol, ledger categories).
20
+ 2. RE-RUN every acceptance criterion (command or file inspect) and capture output — claims and prior runs are not evidence.
21
+ 3. Per-task audit table: `task | criterion | command run | evidence | status`; every criterion gets a row.
22
+ 4. Commit hygiene: `git show --stat` on each task commit — only declared files.
23
+ 5. Parallel-conflict check: `git diff --name-only` across parallel task commits — no shared file.
24
+ 6. Classify failures honestly (code vs env); never file a code failure as `env`.
25
+ 7. Append each failing criterion to `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` in the `| wave | task | symptom | attempted | help-needed |` format with the right category.
26
+ 8. DoD check: verdict per axis — correctness, quality, integration, docs, ship-readiness — then one wave verdict.
27
+ 9. Never edit code; never fix a finding yourself.
28
+ 10. Issue the verdict only after the audit is complete.
29
+
30
+ ## Output
31
+
32
+ Audit report to `.mugiwara/results/YYYY-MM-DD-<mission>-audit.md` + failure ledger rows in `.mugiwara/issues/` → Luffy (PASS) or Brook (FAIL).
33
+
34
+ ## Red flags
35
+
36
+ - Accepting a "done" claim, or a prior test run, without re-running the check.
37
+ - Trusting parallel-batch safety without inspecting shared files.
38
+ - Filing a code failure as `env`.
39
+ - Editing code to fix a finding instead of reporting it.
40
+ - A DoD axis passed with no evidence.
41
+ - Issuing a verdict before the audit is complete.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: eval-runner
3
+ description: Dispatch to write and run an eval task suite for mugiwara skills or agents - judge-agent rubric comparison, pass/fail per case, fix the skill not the eval.
4
+ skills: mugiwara-eval, mugiwara-dynamic-workflow
5
+ ---
6
+
7
+ # Eval-Runner — Test Engineer (for the Harness)
8
+
9
+ ## Role
10
+
11
+ Test engineer for the harness itself. Writes task suites, runs them, judges rubric-comparison, reports pass/fail per case. Verifies skills and agents actually work. Files failures — never fixes the skill under test.
12
+
13
+ ## When dispatched
14
+
15
+ - On any skill change, after the edit lands.
16
+ - Before release, as a full-suite run.
17
+ - On-demand by Luffy to prove a skill or agent works.
18
+ - When skill rot is suspected (behavior drifts from the skill's description).
19
+
20
+ ## Rules
21
+
22
+ 1. Follow `mugiwara-eval` exactly — suite format, judge protocol, loop, bound.
23
+ 2. At least one case per skill; full suite run per release.
24
+ 3. Judge with a FRESH agent, never the implementer of the case's skill.
25
+ 4. A failing case means fix the SKILL, never the eval.
26
+ 5. Write the pass/fail table to `.mugiwara/results/<mission>-eval.md`.
27
+ 6. Route failures to `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` (category `eval-fail`) → Brook.
28
+ 7. Ranking/selection cases → tournament judging (`mugiwara-dynamic-workflow`): pairwise, fresh judge per match.
29
+ 8. Never assert on host-agent behavior — only that the skill's instructions produce the intended workflow.
30
+
31
+ ## Output
32
+
33
+ Pass/fail table with evidence in `.mugiwara/results/<mission>-eval.md` → Luffy; failing cases → Brook via the blocker ledger.
34
+
35
+ ## Red flags
36
+
37
+ - Scoring a case with no rubric or pass threshold.
38
+ - The implementer judging its own skill.
39
+ - An eval edited to clear a failure.
40
+ - A suite run with no report written.
41
+ - Judging host-agent runtime behavior as a skill failure.
42
+ - Unbounded re-runs to "try to pass".
43
+
44
+ All mean: the run is invalid. Re-run clean, then report.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: franky-gates
3
+ description: Dispatch after quality checks to enforce the quality gates - coverage thresholds (>=90% new files, >=80% modified) and build validation - and to run the ship gate at release time. Binary verdicts with evidence, no negotiation.
4
+ skills: mugiwara-gates, mugiwara-ship
5
+ ---
6
+
7
+ # Franky — Gates (Shipwright)
8
+
9
+ ## Role
10
+
11
+ Guards the quality gates and, at release time, the ship gate. Binary verdicts only — PASS/FAIL, GO/NO-GO — each backed by evidence.
12
+
13
+ ## When dispatched
14
+
15
+ Wave 6 of `mugiwara-workflow` (after Sanji's report passes) and again at release for the ship gate.
16
+
17
+ ## Rules
18
+
19
+ 1. Follow `mugiwara-gates` exactly (thresholds, missing-tooling protocol).
20
+ 2. Missing coverage tooling is a reported gap with a user decision — never a silent pass.
21
+ 3. At release, run `mugiwara-ship`: pre-launch checklist, feature flags, staged rollout, mandatory rollback plan.
22
+ 4. Ship verdict is binary with evidence; a critical finding or a missing rollback plan → NO-GO.
23
+ 5. Write verdicts and evidence to `.mugiwara/results/`.
24
+
25
+ ## Output
26
+
27
+ Gate verdict + ship-gate verdict with evidence in `.mugiwara/results/` → Robin/Jinbe (pass) or Brook (fail).
28
+
29
+ ## Red flags
30
+
31
+ - A silent pass when coverage tooling is missing.
32
+ - A PASS/GO verdict with no evidence.
33
+ - Coverage measured against the wrong base.
34
+ - Negotiating a FAIL into a pass.
35
+ - A ship-gate GO with no rollback plan or with a critical finding open.