@ionivetech/mugiwara 0.5.4 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +4 -3
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/.cursor-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +2 -2
  6. package/.opencode/commands/mugiwara-continue.md +16 -0
  7. package/.opencode/commands/mugiwara-execute.md +6 -4
  8. package/.opencode/commands/mugiwara-heal.md +6 -4
  9. package/.opencode/commands/mugiwara-plan.md +6 -4
  10. package/.opencode/commands/mugiwara-review.md +6 -4
  11. package/.opencode/commands/mugiwara-security.md +6 -4
  12. package/.opencode/commands/mugiwara-ship.md +6 -4
  13. package/.opencode/commands/mugiwara.md +4 -2
  14. package/.opencode/commands/using-mugiwara.md +7 -13
  15. package/.opencode/plugins/mugiwara.mjs +18 -6
  16. package/AGENTS.md +2 -2
  17. package/GEMINI.md +1 -1
  18. package/README.md +240 -217
  19. package/content/agents/brook-healing.md +17 -3
  20. package/content/agents/chopper-checkpoint.md +17 -3
  21. package/content/agents/eval-runner.md +17 -2
  22. package/content/agents/franky-gates.md +19 -5
  23. package/content/agents/jinbe-security.md +19 -3
  24. package/content/agents/luffy-orchestrator.md +6 -3
  25. package/content/agents/memory-keeper.md +15 -0
  26. package/content/agents/nami-planner.md +21 -6
  27. package/content/agents/onboarding-guide.md +145 -0
  28. package/content/agents/resume-coordinator.md +21 -5
  29. package/content/agents/robin-reviewer.md +18 -3
  30. package/content/agents/sanji-quality.md +19 -4
  31. package/content/agents/skeptic-verifier.md +18 -3
  32. package/content/agents/usopp-brainstorm.md +17 -3
  33. package/content/agents/zoro-execution.md +19 -5
  34. package/content/skills/mugiwara-backend/SKILL.md +1 -1
  35. package/content/skills/mugiwara-brainstorm/SKILL.md +5 -1
  36. package/content/skills/mugiwara-checkpoint/SKILL.md +2 -2
  37. package/content/skills/mugiwara-contract-first/SKILL.md +2 -36
  38. package/content/skills/mugiwara-contract-first/references/process.md +37 -0
  39. package/content/skills/mugiwara-execution/SKILL.md +30 -13
  40. package/content/skills/mugiwara-execution/references/resume-batching.md +32 -0
  41. package/content/skills/mugiwara-frontend/SKILL.md +1 -1
  42. package/content/skills/mugiwara-gates/SKILL.md +32 -30
  43. package/content/skills/mugiwara-healing/SKILL.md +1 -1
  44. package/content/skills/mugiwara-orchestration/SKILL.md +41 -25
  45. package/content/skills/mugiwara-orchestration/references/delegation-pillars.md +40 -0
  46. package/content/skills/mugiwara-orchestration/references/triage-escalation.md +96 -0
  47. package/content/skills/mugiwara-planning/SKILL.md +23 -27
  48. package/content/skills/mugiwara-planning/references/plan-template.md +42 -0
  49. package/content/skills/mugiwara-pr/SKILL.md +2 -2
  50. package/content/skills/mugiwara-quality/SKILL.md +10 -6
  51. package/content/skills/mugiwara-resume/SKILL.md +7 -2
  52. package/content/skills/mugiwara-review/SKILL.md +20 -1
  53. package/content/skills/mugiwara-review/references/code-attributes.md +38 -0
  54. package/content/skills/mugiwara-root-cause/SKILL.md +3 -30
  55. package/content/skills/mugiwara-root-cause/references/process.md +35 -0
  56. package/content/skills/mugiwara-security/SKILL.md +17 -32
  57. package/content/skills/mugiwara-security/references/owasp-top10.md +12 -0
  58. package/content/skills/mugiwara-security/references/rationalizations.md +8 -0
  59. package/content/skills/mugiwara-ship/SKILL.md +5 -4
  60. package/content/skills/mugiwara-workflow/SKILL.md +74 -77
  61. package/content/skills/mugiwara-workflow/references/workspace-layout.md +50 -0
  62. package/content/skills/using-mugiwara/SKILL.md +8 -19
  63. package/dist/mugiwara.js +206 -87
  64. package/gemini-extension.json +1 -1
  65. package/hooks/session-start.ts +1 -1
  66. package/package.json +12 -5
  67. package/plugin.json +2 -2
  68. package/references/multi-actor.md +1 -1
  69. package/scripts/evidence.sh +13 -6
  70. package/scripts/gate-selftest.ts +266 -0
  71. package/scripts/initiative.ts +248 -0
  72. package/scripts/lane.sh +15 -0
  73. package/scripts/mission-report.sh +141 -76
  74. package/scripts/onboard.ts +292 -0
  75. package/scripts/release-notes.ts +42 -13
  76. package/scripts/retrieval-eval.ts +1 -2
  77. package/scripts/run-evals.ts +1 -1
  78. package/scripts/savepoint.sh +97 -50
  79. package/scripts/validate-content.ts +84 -7
  80. package/scripts/verify-install.ts +72 -0
  81. package/src/args.ts +1 -1
  82. package/src/cli.ts +49 -22
  83. package/src/frontmatter.ts +3 -3
  84. package/src/installer.ts +44 -15
  85. package/src/mission.ts +7 -5
  86. package/src/targets/claude.ts +20 -3
  87. package/src/targets/generic.ts +1 -1
  88. package/src/targets/opencode.ts +53 -11
  89. package/docs/adoption-guide.md +0 -72
  90. package/docs/agent-anatomy.md +0 -72
  91. package/docs/agents.md +0 -53
  92. package/docs/audit-trail.md +0 -65
  93. package/docs/claude-setup.md +0 -43
  94. package/docs/codex-setup.md +0 -26
  95. package/docs/comparison.md +0 -58
  96. package/docs/compliance-matrix.md +0 -81
  97. package/docs/config.md +0 -55
  98. package/docs/copilot-setup.md +0 -29
  99. package/docs/cost.md +0 -45
  100. package/docs/cursor-setup.md +0 -25
  101. package/docs/developer-onboarding.md +0 -89
  102. package/docs/enforcement.md +0 -35
  103. package/docs/execution-model.md +0 -92
  104. package/docs/gemini-setup.md +0 -27
  105. package/docs/getting-started.md +0 -158
  106. package/docs/git-strategy.md +0 -62
  107. package/docs/harness-matrix.md +0 -41
  108. package/docs/index.md +0 -56
  109. package/docs/install-antigravity.md +0 -45
  110. package/docs/install-claude.md +0 -75
  111. package/docs/install-cli.md +0 -103
  112. package/docs/install-codex.md +0 -44
  113. package/docs/install-copilot.md +0 -45
  114. package/docs/install-cursor.md +0 -45
  115. package/docs/install-gemini.md +0 -44
  116. package/docs/install-kimi.md +0 -45
  117. package/docs/install-opencode.md +0 -129
  118. package/docs/install-pi.md +0 -46
  119. package/docs/install.md +0 -53
  120. package/docs/lanes.md +0 -82
  121. package/docs/modes.md +0 -74
  122. package/docs/opencode-setup.md +0 -54
  123. package/docs/pr-summary.md +0 -54
  124. package/docs/rule-based-setup.md +0 -31
  125. package/docs/skill-anatomy.md +0 -71
  126. package/docs/skills.md +0 -55
  127. package/docs/troubleshooting.md +0 -91
  128. package/docs/windsurf-setup.md +0 -18
  129. package/docs/workflow.md +0 -89
  130. package/evals/cases/_no-skill.json +0 -16
  131. package/evals/cases/adversarial-pressure-fake-pass.json +0 -25
  132. package/evals/cases/adversarial-pressure-skip-review.json +0 -25
  133. package/evals/cases/lane-exploratory-vague.json +0 -24
  134. package/evals/cases/lane-sensitivity-payment.json +0 -24
  135. package/evals/cases/positive-refactor-existing-tests.json +0 -25
  136. package/evals/cases/positive-resume-mid-mission.json +0 -24
  137. package/evals/cases/routing-agent-security.json +0 -25
  138. package/evals/cases/routing-auth-feature.json +0 -26
  139. package/evals/cases/routing-backend.json +0 -25
  140. package/evals/cases/routing-bug-one-file.json +0 -26
  141. package/evals/cases/routing-claim-audit.json +0 -25
  142. package/evals/cases/routing-context-budget.json +0 -25
  143. package/evals/cases/routing-contract-first.json +0 -25
  144. package/evals/cases/routing-execution.json +0 -25
  145. package/evals/cases/routing-frontend.json +0 -26
  146. package/evals/cases/routing-gates.json +0 -25
  147. package/evals/cases/routing-git.json +0 -25
  148. package/evals/cases/routing-healing.json +0 -25
  149. package/evals/cases/routing-lessons.json +0 -25
  150. package/evals/cases/routing-orchestration.json +0 -25
  151. package/evals/cases/routing-planning.json +0 -26
  152. package/evals/cases/routing-pr.json +0 -25
  153. package/evals/cases/routing-quality.json +0 -25
  154. package/evals/cases/routing-ship.json +0 -26
  155. package/evals/cases/routing-sunset.json +0 -25
  156. package/evals/cases/routing-using-mugiwara.json +0 -25
  157. package/evals/cases/routing-workflow.json +0 -25
  158. package/evals/floor.json +0 -6
@@ -1,26 +0,0 @@
1
- # Codex Setup
2
-
3
- ## Install
4
-
5
- ```bash
6
- codex plugin marketplace add ionivetech/mugiwara
7
- codex plugin add mugiwara@mugiwara
8
- ```
9
-
10
- Or via the CLI:
11
-
12
- ```bash
13
- npx @ionivetech/mugiwara@latest --project ./my-app --target codex --yes
14
- ```
15
-
16
- **Update** — `codex plugin update mugiwara`. **Uninstall** — `codex plugin remove mugiwara`.
17
-
18
- ## What you get
19
-
20
- - 32 skills as markdown rules in `.codex/mugiwara/`.
21
- - An `AGENTS.md` bootstrap pointer (created if missing).
22
-
23
- ## Notes
24
-
25
- Codex is a **project-only** target. Agents are skills-only here — the crew
26
- pipeline runs through the rule files.
@@ -1,58 +0,0 @@
1
- # Positioning
2
-
3
- What mugiwara is and when to use something else.
4
-
5
- ## What mugiwara is
6
-
7
- **Mugiwara is the governance layer for AI-assisted engineering work.** Every
8
- change carries a human-reviewable trail — which wave, what evidence, approved
9
- by whom — and the cost of the process scales to the size of the work.
10
-
11
- - **Lane sizing** — process scales from zero waves (typo) to nine (auth
12
- migration), computed from the diff by `scripts/lane.sh`, not guessed.
13
- - **Evidence trail** — every wave boundary writes computed state to
14
- `state.json`. No wave passes on a spoken claim. `scripts/evidence.sh` wraps
15
- check commands and captures output.
16
- - **Resume from disk** — lose context mid-mission and the crew rebuilds from
17
- `.mugiwara/` instead of restarting.
18
- - **15 named agents** in a 9-wave gated pipeline — each wave has a defined
19
- owner, handoff, and verification gate.
20
- - **26 skills** with skip gates on all of them, progressive disclosure into
21
- `references/`, and deterministic tooling for lane, evidence, and state.
22
-
23
- ## What mugiwara refuses
24
-
25
- - **A runtime or daemon.** Orchestration stays in the harness. Pure markdown.
26
- - **Auto-merge or auto-deploy.** Human review at the PR is the terminal gate.
27
- - **Unattended marathon mode.** Mugiwara runs inline by default — you watch
28
- every wave. Subagents only for parallel work.
29
- - **Skill-count growth.** 26 is the ceiling; a new skill replaces an old one.
30
- - **Head-to-head feature scorecards.** The compliance matrix replaces them.
31
-
32
- ## When to use something else
33
-
34
- - **Deep autonomous marathon runs.** If you want an agent to disappear for
35
- hours on subagent-driven builds with minimal visibility, superpowers'
36
- `subagent-driven-development` is built for exactly that.
37
- - **Reference-encyclopedia depth.** agent-skills carries richer per-skill
38
- engineering references (Hyrum's Law, test pyramid, Chesterton's Fence).
39
- - **A runtime service.** If you need API-driven, deployable agent crews, use a
40
- framework (LangGraph, CrewAI).
41
- - **A single mega-prompt.** If you want one instruction with no ceremony,
42
- mugiwara's pipeline is overkill for you.
43
-
44
- ## Reproducible facts
45
-
46
- Generated from `content/` and `scripts/validate-content.ts`:
47
-
48
- | Metric | Value |
49
- |--------|:-----:|
50
- | Skills | 26 |
51
- | Agents | 15 |
52
- | Index (all descriptions) | ~10k chars (~2.5k tokens) |
53
- | Avg skill size | ~1.2k tokens |
54
- | Skills with skip gate | 26/26 |
55
- | References/ files | growing |
56
- | Evals | 11 cases |
57
-
58
- *Figures from Aug 2026. Recalculate with `bun scripts/validate-content.ts --check-manifest`.*
@@ -1,81 +0,0 @@
1
- # Compliance Matrix
2
-
3
- For each model + harness + tier combination, how well mugiwara's rules hold.
4
- Published with failures — the first pack to admit where it breaks.
5
-
6
- ## How to read
7
-
8
- - ✅ Rule holds ≥90% of the time
9
- - ⚠️ Rule holds 60-89% of the time — use guided mode, or expect model to miss it
10
- - ❌ Rule holds <60% of the time — not reliable, document the gap
11
-
12
- ## Rules under test
13
-
14
- | # | Rule | Mechanism | Pillar |
15
- |---|------|-----------|--------|
16
- | R1 | Lane sizing | `scripts/lane.sh` | 2 |
17
- | R2 | Skip gates respected | Skill prose | 1 |
18
- | R3 | Evidence over claims | Chopper re-verification | 1 |
19
- | R4 | Wave boundaries (banner + report) | Workflow skill | 2 |
20
- | R5 | Heal loop bound (≤3 cycles) | Orchestration skill | 2 |
21
- | R6 | DoD verified (5 axes) | `references/definition-of-done.md` | 1 |
22
- | R7 | State written at wave boundary | `scripts/savepoint.sh` | 2 |
23
- | R8 | Source-backed code (no hallucinated APIs) | `references/source-grounding.md` | 4 |
24
- | R9 | Blocker ledger written on failure | Agent discipline | 1 |
25
- | R10 | Mission report at closure | `scripts/savepoint.sh` | 1 |
26
-
27
- ## Results by model
28
-
29
- ### Claude Sonnet 4 — opencode (Tier 1)
30
-
31
- | Rule | Verdict | Notes |
32
- |------|---------|-------|
33
- | R1 | ✅ | Lane computed by script |
34
- | R2 | ⚠️ | Occasionally skips on low-signal tasks |
35
- | R3 | ✅ | Chopper re-runs checks reliably |
36
- | R4 | ✅ | Banners + reports consistent |
37
- | R5 | ✅ | Heal loop bound respected |
38
- | R6 | ✅ | DoD axes checked |
39
- | R7 | ✅ | Savepoint script runs |
40
- | R8 | ⚠️ | Hallucinates APIs ~8% of the time without source-grounding |
41
- | R9 | ✅ | Ledger entries reliable |
42
- | R10 | ✅ | Closure report written |
43
-
44
- ### Gemini — Gemini CLI (Tier 2)
45
-
46
- | Rule | Verdict | Notes |
47
- |------|---------|-------|
48
- | R1 | ✅ | Lane computed by script |
49
- | R2 | ⚠️~ | Skip gates respected ~65% |
50
- | R3 | ⚠️ | Evidence checks sometimes skipped |
51
- | R4 | ⚠️ | Wave banners inconsistent |
52
- | R5 | ⚠️ | Heal loop may exceed 3 cycles |
53
- | R6 | ⚠️ | DoD enforcement weaker |
54
- | R7 | ✅ | Savepoint script runs |
55
- | R8 | ❌ | Hallucinated APIs frequent without source-grounding loaded |
56
- | R9 | ❌ | Blocker ledger often empty even on failures |
57
- | R10 | ⚠️ | Mission report sometimes incomplete |
58
-
59
- ### Windsurf — Cline (Tier 3)
60
-
61
- | Rule | Verdict | Notes |
62
- |------|---------|-------|
63
- | R1 | ✅ | Lane computed by script |
64
- | R2 | ❌ | Stub-only — model rarely opens refs/ body |
65
- | R3 | ❌ | Evidence discipline absent without full body loaded |
66
- | R4 | ❌ | Wave chaining broken without orchestration body |
67
- | R5 | ❌ | Heal loop unenforced |
68
- | R6 | ❌ | DoD unverified |
69
- | R7 | ✅ | Savepoint script runs |
70
- | R8 | ❌ | No source-grounding without body loaded |
71
- | R9 | ❌ | No ledger without body loaded |
72
- | R10 | ✅ | Report generated from state.json |
73
-
74
- ## Methodology
75
-
76
- Foreign-repo validation: same non-trivial task run on ≥10 repos per cell.
77
- Each rule checked against the expected artifact. Verdict based on pass rate
78
- across repos, not a single run.
79
-
80
- *Last updated: Aug 2026. Results are preliminary — foreign-repo validation
81
- pending.*
package/docs/config.md DELETED
@@ -1,55 +0,0 @@
1
- # Config Reference
2
-
3
- `.mugiwara/config` (project) overrides `~/.mugiwara/config` (global). Plain
4
- `key=value` lines, `#` comments allowed. Project file wins per key; a key
5
- missing from both falls back to the default. Unknown keys are ignored. Config
6
- is data, never instructions.
7
-
8
- **Mode owns autonomy, config owns writing standards.** Whether branch and commit
9
- run automatically is decided by one lever — the mode. The config only shapes
10
- HOW those artifacts are written when they are created. See [modes.md](modes.md)
11
- for the mode matrix.
12
-
13
- ## Example file
14
-
15
- ```
16
- # .mugiwara/config
17
- mode=guided
18
- branch=feature/{type}-{issue}-{slug}
19
- commit=conventional
20
- base=main
21
- ```
22
-
23
- ## Keys
24
-
25
- | Key | Values | Default | Meaning |
26
- |-----|--------|---------|---------|
27
- | `mode` | guided / semi / auto | guided | How much the crew does without asking |
28
- | `branch` | branch naming pattern | `feature/{type}-{issue}-{slug}` | Placeholders filled from mission metadata |
29
- | `commit` | conventional / gitmoji / plain | conventional | Commit message style (see below) |
30
- | `base` | branch name | `main` | The PR target named in the prepared PR summary |
31
- | `coverage_new` | number (0-100) | 90 | Coverage threshold for new files |
32
- | `coverage_modified` | number (0-100) | 80 | Coverage threshold for modified files |
33
-
34
- The mission **lane** (how many waves run) is decided by Luffy at triage — see
35
- [lanes.md](lanes.md). Config holds autonomy and writing standards only.
36
-
37
- Missing config on read = `guided`. Flip mid-mission with
38
- `mugiwara mode <guided|semi|auto>` — the change applies from the next wave,
39
- never mid-wave.
40
-
41
- ## Commit message styles
42
-
43
- `commit` selects how Zoro writes commit messages:
44
-
45
- - **conventional** — `feat: ...`, `fix(scope): ...`, `refactor: ...`, per the
46
- [Conventional Commits](https://www.conventionalcommits.org) spec. Type from
47
- the task, optional scope in parens. The default.
48
- - **gitmoji** — a leading emoji carries the intent, e.g. `✨ feat: ...`,
49
- `🐛 fix: ...`. Signals the change type at a glance in log views that render
50
- emoji; a bit noisy in plain terminals.
51
- - **plain** — no prefix, just a short imperative sentence: `Fix export csv
52
- encoding`. Clearest for repos that don't use any convention.
53
-
54
- Switch freely per project — it only affects the message format, never the
55
- one-logical-task-one-commit rule.
@@ -1,29 +0,0 @@
1
- # GitHub Copilot Setup
2
-
3
- ## Install via the marketplace
4
-
5
- ```bash
6
- copilot plugin marketplace add ionivetech/mugiwara
7
- copilot plugin install mugiwara
8
- ```
9
-
10
- ## Install via CLI
11
-
12
- ```bash
13
- npx @ionivetech/mugiwara@latest --project ./my-app --target copilot --yes
14
- ```
15
-
16
- **Update** — `copilot plugin update mugiwara`. **Uninstall** — `copilot plugin uninstall mugiwara`.
17
-
18
- ## What you get
19
-
20
- - 32 skills as `.instructions.md` files in `.github/` (project) or
21
- `~/.copilot/` (global).
22
- - Agents as markdown files in `instructions/` / `agents/`.
23
-
24
- ## Copilot caveat
25
-
26
- Copilot CLI reads the Claude marketplace for skills, but the agents are
27
- Claude-native `.md` files and do not auto-discover in Copilot. Skills install
28
- and function; for full agent support use the CLI install path, which writes
29
- Copilot-native `.instructions.md` skills and `.md` agents.
package/docs/cost.md DELETED
@@ -1,45 +0,0 @@
1
- # Token Cost Model
2
-
3
- Three-layer token architecture. Every layer has a cost and a purpose.
4
-
5
- ## The three layers
6
-
7
- | Layer | Loaded | Purpose | Current size |
8
- |-------|--------|---------|:---:|
9
- | **Index** — all `description` frontmatter | Every session, every harness | Retrieval — which skill fires | ~2.9k tokens |
10
- | **Body** — SKILL.md content | When the skill triggers | Capability — how well it performs | ~1.2k avg / skill |
11
- | **References** — `references/*.md` | On demand, when the agent opens them | Depth — worked examples, checklists | ~0 (to build) |
12
-
13
- Only the **index** is a recurring cost. Body and references pay only when used.
14
-
15
- ## Index budget
16
-
17
- - **Target:** 1.2k tokens (descriptions + agent pointers)
18
- - **Gate:** 5k chars hard CI cap — any skill/agent description that pushes the total over fails validation
19
- - **Current:** 2.9k tokens, loaded on every session
20
-
21
- Reduction path:
22
- 1. Prune 32 → 26 skills: ~2.5k
23
- 2. Descriptions → trigger-only (~150 chars): ~1.8k
24
- 3. Agent descriptions → pointer lines: ~1.2k
25
-
26
- ## Cost per lane
27
-
28
- | Lane | Waves | Estimated tokens | Typical budget |
29
- |------|-------|:---:|:---:|
30
- | 0 Direct | none | ~0 | — |
31
- | 1 Lean | execute → quality | ~4k | warn at 6k, stop at 12k |
32
- | 2 Standard | plan → execute → audit → review | ~10k | warn at 15k, stop at 30k |
33
- | 3 Full | all 9 waves | ~20k | warn at 30k, stop at 60k |
34
- | 4 Spike | brainstorm → re-triage | ~3k | warn at 5k, stop at 9k |
35
-
36
- Budget guidance: ~1.5× warns, 3× stops. Write state to `.mugiwara/state.json` before stopping.
37
-
38
- ## Per-mission cost
39
-
40
- `state.json` carries `tokens_est` — the estimated tokens consumed by this mission. At closure, the mission report surfaces:
41
- - Total tokens for the mission
42
- - Lane it ran on
43
- - Cost delta vs. lane budget
44
-
45
- This turns lane sizing from "process efficiency" into a number an engineering manager can act on. No other skills pack produces this because no other pack sizes work.
@@ -1,25 +0,0 @@
1
- # Cursor Setup
2
-
3
- ## Install
4
-
5
- ```
6
- /add-plugin mugiwara
7
- ```
8
-
9
- Or via the CLI:
10
-
11
- ```bash
12
- npx @ionivetech/mugiwara@latest --project ./my-app --target cursor --yes
13
- ```
14
-
15
- **Update** — re-run `/add-plugin mugiwara`. **Uninstall** — `/remove-plugin mugiwara`.
16
-
17
- ## What you get
18
-
19
- - 32 skills as markdown rule files.
20
- - The `.cursor-plugin/plugin.json` manifest.
21
-
22
- ## Notes
23
-
24
- Cursor is a **project-only** target. Agents are skills-only here — the crew
25
- pipeline runs through the rule files.
@@ -1,89 +0,0 @@
1
- # Developer Onboarding
2
-
3
- Set up, validate, and contribute to the mugiwara repo.
4
-
5
- ## Requirements
6
-
7
- | Dependency | Required for | Version |
8
- |------------|--------------|---------|
9
- | Node.js | running the CLI and the built artifact | >= 20.11 |
10
- | Bun | building from source, running tests | optional (preferred) |
11
-
12
- ```bash
13
- bun install
14
- ```
15
-
16
- ## Repo layout
17
-
18
- ```
19
- mugiwara/
20
- ├── content/ # single source of truth: skills/ + agents/ markdown
21
- ├── agents/ # symlink → content/agents (Claude Code plugin reads plugin root)
22
- ├── skills/ # symlink → content/skills
23
- ├── src/ # CLI, installer, targets, frontmatter parser
24
- ├── scripts/ # validate-content, sync-version, run-evals, install scripts
25
- ├── test/ # vitest suite
26
- ├── .opencode/plugins/ # opencode plugin (registers crew at config load)
27
- ├── .claude-plugin/ # Claude Code marketplace + sync.sh (symlink guard)
28
- └── docs/ # these docs
29
- ```
30
-
31
- ## The source of truth
32
-
33
- `content/` is the only physical source. The repo-root `agents/` and `skills/`
34
- are **symlinks** into it, so harnesses that read the plugin root (Claude Code
35
- marketplace) see the same files — there is no copy to drift. On a fresh clone
36
- where the symlinks are missing, recreate them:
37
-
38
- ```bash
39
- sh .claude-plugin/sync.sh
40
- ```
41
-
42
- Always edit `content/`. `bun run validate --check-sync` verifies the symlinks
43
- resolve to `content/` and never diverge.
44
-
45
- ## Validation
46
-
47
- ```bash
48
- bun run validate # 26 skills + 14 agents: names, descriptions, skip gates, line limits
49
- bun run validate --check-sync # symlinks resolve to content/, never diverge
50
- bun run typecheck # tsc --noEmit
51
- bun run test # vitest
52
- bun run evals # eval suite valid (structure + coverage gates)
53
- bun run evals --run # optional: execute cases against a model CLI (MUGIWARA_EVAL_CMD)
54
- ```
55
-
56
- ## Editing a skill or agent
57
-
58
- 1. Edit `content/skills/<name>/SKILL.md` or `content/agents/<name>.md`.
59
- 2. Respect the house style (see [skill-anatomy.md](skill-anatomy.md) and
60
- [agent-anatomy.md](agent-anatomy.md)): evidence over claims, exact commands,
61
- red flags, ≤120-line skill bodies.
62
- 3. `bun run validate && bun run typecheck && bun run test`
63
-
64
- ## Adding a new skill or agent
65
-
66
- 1. Create the content file following the anatomy docs.
67
- 2. If it's an agent, list its held skills in frontmatter; give it a
68
- `description` ≥20 chars.
69
- 3. If it's a skill, pick a folder name that matches `name`; description 20–500
70
- chars; body ≤120 lines; include a `## Skip when` block (1–4 bullets, numeric
71
- thresholds) so the skill knows when it does not apply.
72
- 4. Update the crew/technique tables in `README.md` and the docs (`agents.md`,
73
- `skills.md`).
74
- 5. Sync + validate + test.
75
-
76
- ## Building and publishing
77
-
78
- ```bash
79
- bun run build # dist/mugiwara.js
80
- bun run sync-version # sync version from package.json into manifests
81
- bun prepack # build + sync-version
82
- ```
83
-
84
- Version numbers in the manifests sync from `package.json` via `sync-version`
85
- (runs automatically on publish).
86
-
87
- ## Contributing
88
-
89
- Open an issue or pull request on GitHub: <https://github.com/ionivetech/mugiwara>.
@@ -1,35 +0,0 @@
1
- # Enforcement
2
-
3
- A markdown harness cannot force a model to comply with prose — that is the
4
- ceiling of every skills pack, mugiwara included. What keeps the pipeline honest
5
- is a mix of mechanism and discipline.
6
-
7
- ## Mechanisms (computed, no model)
8
-
9
- | Rule | Mechanism |
10
- |------|-----------|
11
- | Lane sizing | `scripts/lane.sh` computes lane from `git diff --name-only` |
12
- | State persistence | `scripts/savepoint.sh` writes `state.json` at every wave boundary |
13
- | Evidence capture | `scripts/evidence.sh <label> -- <cmd>` writes stdout/stderr to `.mugiwara/results/<hash>.log` |
14
- | Index budget | validator enforces 12k char ceiling on skill + agent descriptions |
15
- | Manifest sync | validator asserts manifest set-equals `content/`; CI blocks drift |
16
- | Skill format | validator checks name, description length, body ≤120 lines, skip gate, duplicate names |
17
-
18
- ## Discipline (prose the model follows)
19
-
20
- | Rule | Enforced by |
21
- |------|------------|
22
- | Skip gates | Every skill declares `## Skip when` (1-4 bullets, numeric threshold). Validator fails build without it. |
23
- | Evidence over claims | Iron law in every skill: no wave passes on assertion. Checked by Chopper's re-verification. |
24
- | Wave boundaries | Every wave opens with `## Wave N — <crew>` banner, closes with checkpoint report. |
25
- | Heal loop bound | Max 3 cycles (Wave 8 → Wave 4). After 3, escalate to human. |
26
- | DoD canonical | `references/definition-of-done.md` — one bar, linked from checkpoint + gates. |
27
-
28
- ## Honest limits
29
-
30
- Mugiwara cannot force an agent to follow a skill on any tier. Models can skip
31
- a skill, rush a wave, or pass on a claim. Mechanisms (savepoint, lane, evidence)
32
- leave a trace regardless of model cooperation. Discipline rules rely on the
33
- model reading and choosing to follow them.
34
-
35
- That is true on every tier and every harness. Mugiwara is a skills pack, not a supervisor.
@@ -1,92 +0,0 @@
1
- # Execution Model
2
-
3
- Why the crew runs in your main conversation — and when subagents are actually
4
- used.
5
-
6
- ## Auto-activation
7
-
8
- The workflow **auto-activates.** At session start the crew is announced; when
9
- you give a non-trivial request, the pipeline runs by itself — you do not need
10
- to call `/using-mugiwara`. It remains an optional explicit router if you want
11
- to hand-route a mission.
12
-
13
- ## Inline by default
14
-
15
- The crew runs **inline**. The main thread embodies each crew role using that
16
- member's skill, so every wave plays out in your main conversation and you watch
17
- it happen:
18
-
19
- - Luffy's triage, Nami's planning, Zoro's execution, Chopper's audit, Sanji's
20
- quality, Franky's gates, Robin/Jinbe's review, Brook's healing, Luffy's
21
- closure — all performed in the main thread.
22
- - Evidence is written to `.mugiwara/` files; the conversation carries terse
23
- verdicts and evidence pointers.
24
-
25
- ## When subagents ARE used
26
-
27
- Subagents exist to parallelize, never to hide work:
28
-
29
- 1. **`[PARALLEL]` task batches** — independent tasks that touch no shared files
30
- or interfaces run concurrently, one per worker subagent. This is the only
31
- place Zoro delegates.
32
- 2. **Parallel fixes** — Brook spawns workers for independent heal fixes.
33
- 3. **Background / long-running checks** — work that would stall the
34
- conversation.
35
- 4. **Check subagents** — Chopper, Robin, and Jinbe may spawn subagents for
36
- independent re-runs or diff passes.
37
-
38
- Worker results return as reports; the main thread summarizes them inline with
39
- evidence pointers.
40
-
41
- ## Why not dispatch every wave to a subagent?
42
-
43
- Every harness — Claude Code, opencode, Codex, Cursor, Gemini — hides subagent
44
- internals behind a click or a side panel. If each wave ran as a subagent, you'd
45
- be clicking through the whole mission to see what happened. Running the crew in
46
- the main conversation is the only way the process is genuinely visible.
47
-
48
- There's also a context cost to deep nesting: crew-inside-crew subagents bloat
49
- context and hide decisions. Inline keeps the user in the loop and the story
50
- linear.
51
-
52
- ## Rules that keep it sane
53
-
54
- - Crew members never dispatch another crew member. A role that must split work
55
- returns the split to the main thread, which spawns the workers.
56
- - Escalation = "blocked" + ledger row returned to the main thread.
57
- - Sequential work never takes a subagent round-trip — no skipping, no hidden
58
- reordering, plan order is plan order.
59
-
60
- ## Checkpoint reports
61
-
62
- You see progress as **checkpoint reports**, not a firehose: a wave banner
63
- (`## Wave N — <crew> (<skill>)`), one compact report per crew member at each
64
- stage boundary (what ran / result / evidence pointer), a progress summary per
65
- wave, and a pause when something fails or gets risky. Subagents are used only
66
- where they genuinely help: independent `[PARALLEL]` task batches, Brook's
67
- reviewer/security re-verification workers, and background checks.
68
-
69
- ## Manual stages
70
-
71
- Prefer to drive the stages yourself? Every stage has a slash command that loads
72
- the skill, runs the crew role inline, and bridges state from `.mugiwara/`:
73
-
74
- | Command | Runs | Reads state from |
75
- |---------|------|------------------|
76
- | `/mugiwara-plan` | Nami | `.mugiwara/spec/` |
77
- | `/mugiwara-execute` | Zoro | `.mugiwara/plans/` |
78
- | `/mugiwara-review` | Robin | `.mugiwara/results/` + diff |
79
- | `/mugiwara-security` | Jinbe | `.mugiwara/results/` + diff |
80
- | `/mugiwara-heal` | Brook | `.mugiwara/issues/` |
81
- | `/mugiwara-ship` | Luffy | plan + results |
82
-
83
- You can jump into any stage — e.g. run `/mugiwara-plan` first, then
84
- `/mugiwara-execute` later when you're ready.
85
-
86
- ## Trade-off
87
-
88
- Inline execution grows the main-thread context over a long mission. The crew
89
- mitigates this: evidence goes to `.mugiwara/` files, reports are terse, and
90
- subagents isolate the genuinely heavy parallel work. For missions that must
91
- minimize main-context growth, the crew supports dispatching specific waves to a
92
- subagent — at the cost of visibility.
@@ -1,27 +0,0 @@
1
- # Gemini CLI Setup
2
-
3
- ## Install
4
-
5
- ```bash
6
- gemini extensions install https://github.com/ionivetech/mugiwara
7
- ```
8
-
9
- Or via the CLI:
10
-
11
- ```bash
12
- npx @ionivetech/mugiwara@latest --project ./my-app --target gemini --yes
13
- ```
14
-
15
- **Update** — `gemini extensions update mugiwara`.
16
- **Uninstall** — `gemini extensions remove mugiwara`.
17
-
18
- ## What you get
19
-
20
- - 32 skills as markdown rules in `.gemini/mugiwara/`.
21
- - A `GEMINI.md` bootstrap pointer (created if missing).
22
-
23
- ## Notes
24
-
25
- Gemini is a **project-only** target — skipped (with a note) on `--global`
26
- installs. Agents are skills-only here (no native subagent registry); the crew
27
- pipeline runs through the rule files.