@ionivetech/mugiwara 0.1.3 → 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.
- package/.opencode/commands/mugiwara-execute.md +11 -0
- package/.opencode/commands/mugiwara-heal.md +11 -0
- package/.opencode/commands/mugiwara-mode.md +6 -0
- package/.opencode/commands/mugiwara-plan.md +11 -0
- package/.opencode/commands/mugiwara-review.md +11 -0
- package/.opencode/commands/mugiwara-security.md +11 -0
- package/.opencode/commands/mugiwara-ship.md +11 -0
- package/.opencode/commands/mugiwara.md +11 -0
- package/.opencode/plugins/mugiwara.mjs +221 -0
- package/README.md +351 -324
- package/content/agents/brook-healing.md +8 -2
- package/content/agents/chopper-checkpoint.md +9 -4
- package/content/agents/eval-runner.md +5 -1
- package/content/agents/franky-gates.md +9 -4
- package/content/agents/jinbe-security.md +5 -1
- package/content/agents/luffy-orchestrator.md +15 -8
- package/content/agents/memory-keeper.md +4 -0
- package/content/agents/nami-planner.md +12 -5
- package/content/agents/resume-coordinator.md +5 -1
- package/content/agents/robin-reviewer.md +6 -2
- package/content/agents/sanji-quality.md +7 -3
- package/content/agents/skeptic-verifier.md +6 -2
- package/content/agents/using-mugiwara.md +16 -8
- package/content/agents/usopp-brainstorm.md +9 -3
- package/content/agents/zoro-execution.md +16 -11
- package/content/skills/mugiwara-api-and-interface-design/SKILL.md +87 -0
- package/content/skills/mugiwara-backend/SKILL.md +12 -0
- package/content/skills/mugiwara-brainstorm/SKILL.md +28 -1
- package/content/skills/mugiwara-checkpoint/SKILL.md +8 -6
- package/content/skills/mugiwara-context-engineering/SKILL.md +59 -0
- package/content/skills/mugiwara-deprecation/SKILL.md +77 -0
- package/content/skills/mugiwara-doubt-driven-development/SKILL.md +65 -0
- package/content/skills/mugiwara-dynamic-workflow/SKILL.md +3 -3
- package/content/skills/mugiwara-execution/SKILL.md +36 -15
- package/content/skills/mugiwara-frontend/SKILL.md +58 -56
- package/content/skills/mugiwara-frontend/references/checklist.md +37 -0
- package/content/skills/mugiwara-gates/SKILL.md +8 -0
- package/content/skills/mugiwara-git/SKILL.md +10 -0
- package/content/skills/mugiwara-git-worktrees/SKILL.md +62 -0
- package/content/skills/mugiwara-healing/SKILL.md +21 -3
- package/content/skills/mugiwara-mode/SKILL.md +72 -0
- package/content/skills/mugiwara-orchestration/SKILL.md +44 -8
- package/content/skills/mugiwara-planning/SKILL.md +57 -34
- package/content/skills/mugiwara-pr/SKILL.md +62 -0
- package/content/skills/mugiwara-quality/SKILL.md +29 -2
- package/content/skills/mugiwara-resume/SKILL.md +6 -4
- package/content/skills/mugiwara-security/SKILL.md +38 -1
- package/content/skills/mugiwara-ship/SKILL.md +24 -1
- package/content/skills/mugiwara-systematic-debugging/SKILL.md +77 -0
- package/content/skills/mugiwara-test-driven-development/SKILL.md +84 -0
- package/content/skills/mugiwara-testcases/SKILL.md +52 -0
- package/content/skills/mugiwara-workflow/SKILL.md +42 -13
- package/content/skills/mugiwara-writing-skills/SKILL.md +60 -0
- package/dist/mugiwara.js +42 -26
- package/docs/adoption-guide.md +72 -0
- package/docs/agent-anatomy.md +72 -0
- package/docs/agents.md +51 -0
- package/docs/claude-setup.md +43 -0
- package/docs/codex-setup.md +26 -0
- package/docs/comparison.md +63 -0
- package/docs/config.md +50 -0
- package/docs/copilot-setup.md +29 -0
- package/docs/cursor-setup.md +25 -0
- package/docs/developer-onboarding.md +85 -0
- package/docs/execution-model.md +92 -0
- package/docs/gemini-setup.md +27 -0
- package/docs/getting-started.md +96 -0
- package/docs/git-strategy.md +62 -0
- package/docs/index.md +50 -0
- package/docs/modes.md +74 -0
- package/docs/opencode-setup.md +54 -0
- package/docs/pr-summary.md +54 -0
- package/docs/rule-based-setup.md +31 -0
- package/docs/skill-anatomy.md +78 -0
- package/docs/skills.md +73 -0
- package/docs/windsurf-setup.md +18 -0
- package/docs/workflow.md +80 -0
- package/hooks/hooks.json +15 -0
- package/hooks/session-start.ts +8 -0
- package/package.json +20 -2
- package/src/targets/claude.ts +18 -1
- package/src/targets/codex.ts +1 -1
- package/src/targets/gemini.ts +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Comparison
|
|
2
|
+
|
|
3
|
+
How mugiwara fits against the alternatives.
|
|
4
|
+
|
|
5
|
+
## Mugiwara vs. plain skills (agent-skills / skills.sh)
|
|
6
|
+
|
|
7
|
+
The [agent-skills](https://github.com/addyosmani/agent-skills) ecosystem ships
|
|
8
|
+
standalone skills that an agent picks up on demand. Mugiwara ships the same
|
|
9
|
+
portable `SKILL.md` format — and also ships:
|
|
10
|
+
|
|
11
|
+
- **A named crew** — personas (Luffy, Nami, Zoro, …) on top of the skills, so
|
|
12
|
+
the pipeline has a defined owner per wave instead of "whichever skill fires."
|
|
13
|
+
- **A pipeline, not a pile** — ordered waves (triage → plan → execute →
|
|
14
|
+
checkpoint → quality → gates → review → heal → closure) with gates between.
|
|
15
|
+
- **Evidence discipline** — no wave passes on a claim; the owning role runs the
|
|
16
|
+
checks and shows output.
|
|
17
|
+
- **A workspace contract** — `.mugiwara/` holds plan, results, ledger, and
|
|
18
|
+
logs, so a mission survives context loss.
|
|
19
|
+
|
|
20
|
+
You can still install just the skills (`npx skills add ionivetech/mugiwara`).
|
|
21
|
+
|
|
22
|
+
## Mugiwara vs. agent frameworks (LangGraph, CrewAI, …)
|
|
23
|
+
|
|
24
|
+
Framework crews are code: graphs, nodes, runtimes to host. Mugiwara is:
|
|
25
|
+
|
|
26
|
+
- **Zero runtime** — pure markdown; your existing agent's own subagent
|
|
27
|
+
machinery does the work. Nothing to deploy, nothing to keep updated.
|
|
28
|
+
- **Harness-native** — installs into Claude Code, opencode, Copilot, Gemini,
|
|
29
|
+
Codex, Cursor, and 70+ tools rather than forcing one runtime.
|
|
30
|
+
- **Inline** — the pipeline runs in your main conversation (see
|
|
31
|
+
[execution-model.md](execution-model.md)); frameworks hide the work behind
|
|
32
|
+
their own execution graph.
|
|
33
|
+
|
|
34
|
+
## Mugiwara vs. a single mega-prompt
|
|
35
|
+
|
|
36
|
+
A mega-prompt gives you one big instruction. Mugiwara:
|
|
37
|
+
|
|
38
|
+
- **Splits by specialization** — 25 focused skills + 15 personas instead of one
|
|
39
|
+
document that tries to be everything, so each phase has a tight contract.
|
|
40
|
+
- **Is gated** — every wave has a verifiable gate and a recorded reason, so
|
|
41
|
+
drift is caught early.
|
|
42
|
+
- **Heals** — a bounded 3-cycle heal loop reads the failure ledger and fixes
|
|
43
|
+
root causes, instead of re-running the same mega-prompt.
|
|
44
|
+
|
|
45
|
+
## When NOT to use mugiwara
|
|
46
|
+
|
|
47
|
+
- **One-line fixes** — Luffy routes trivia straight to execution; you don't
|
|
48
|
+
need the crew for a typo.
|
|
49
|
+
- **You want a framework runtime** — if you need orchestration in code,
|
|
50
|
+
deployable graphs, or API-driven crews, a framework is the right tool.
|
|
51
|
+
- **You want the crew to merge/deploy** — mugiwara deliberately stops at push +
|
|
52
|
+
PR. Human review is the terminal gate.
|
|
53
|
+
|
|
54
|
+
## Summary
|
|
55
|
+
|
|
56
|
+
| | Mugiwara | Plain skills | Framework crews | Mega-prompt |
|
|
57
|
+
|---|----------|--------------|-----------------|-------------|
|
|
58
|
+
| Runtime | none | none | yes | none |
|
|
59
|
+
| Pipeline | ordered waves + gates | on-demand | graph | linear |
|
|
60
|
+
| Visibility | inline in your chat | inline | behind the graph | inline |
|
|
61
|
+
| Evidence gates | yes | no | configurable | no |
|
|
62
|
+
| Self-healing | yes (3-cycle loop) | no | configurable | no |
|
|
63
|
+
| Harnesses | 12+ | 70+ | one per framework | any |
|
package/docs/config.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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 | The only autonomy lever — decides whether branch/commit run automatically |
|
|
28
|
+
| `branch` | branch naming pattern | `feature/{type}-{issue}-{slug}` | Placeholders filled from mission metadata, validated to `[a-zA-Z0-9-_]` |
|
|
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
|
+
|
|
32
|
+
Missing config on read = `guided`. Flip mid-mission with
|
|
33
|
+
`mugiwara mode <guided|semi|auto>` — the change applies from the next wave,
|
|
34
|
+
never mid-wave.
|
|
35
|
+
|
|
36
|
+
## Commit message styles
|
|
37
|
+
|
|
38
|
+
`commit` selects how Zoro writes commit messages:
|
|
39
|
+
|
|
40
|
+
- **conventional** — `feat: ...`, `fix(scope): ...`, `refactor: ...`, per the
|
|
41
|
+
[Conventional Commits](https://www.conventionalcommits.org) spec. Type from
|
|
42
|
+
the task, optional scope in parens. The default.
|
|
43
|
+
- **gitmoji** — a leading emoji carries the intent, e.g. `✨ feat: ...`,
|
|
44
|
+
`🐛 fix: ...`. Signals the change type at a glance in log views that render
|
|
45
|
+
emoji; a bit noisy in plain terminals.
|
|
46
|
+
- **plain** — no prefix, just a short imperative sentence: `Fix export csv
|
|
47
|
+
encoding`. Clearest for repos that don't use any convention.
|
|
48
|
+
|
|
49
|
+
Switch freely per project — it only affects the message format, never the
|
|
50
|
+
one-logical-task-one-commit rule.
|
|
@@ -0,0 +1,29 @@
|
|
|
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.
|
|
@@ -0,0 +1,25 @@
|
|
|
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.
|
|
@@ -0,0 +1,85 @@
|
|
|
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/ # synced copy of content/agents (plugin copies at repo root)
|
|
22
|
+
├── skills/ # synced copy of 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
|
|
28
|
+
└── docs/ # these docs
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## The source of truth
|
|
32
|
+
|
|
33
|
+
`content/` is canonical. The repo-root `agents/` and `skills/` copies are
|
|
34
|
+
generated for harnesses that read the repo directly:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
sh .claude-plugin/sync.sh
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Always edit `content/`, then sync. `bun run validate --check-sync` fails if the
|
|
41
|
+
copies drift.
|
|
42
|
+
|
|
43
|
+
## Validation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bun run validate # 32 skills + 15 agents: names, descriptions, line limits
|
|
47
|
+
bun run validate --check-sync # plugin copies match content/
|
|
48
|
+
bun run typecheck # tsc --noEmit
|
|
49
|
+
bun run test # vitest (43 tests)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Editing a skill or agent
|
|
53
|
+
|
|
54
|
+
1. Edit `content/skills/<name>/SKILL.md` or `content/agents/<name>.md`.
|
|
55
|
+
2. Respect the house style (see [skill-anatomy.md](skill-anatomy.md) and
|
|
56
|
+
[agent-anatomy.md](agent-anatomy.md)): evidence over claims, exact commands,
|
|
57
|
+
red flags, ≤120-line skill bodies.
|
|
58
|
+
3. `sh .claude-plugin/sync.sh`
|
|
59
|
+
4. `bun run validate && bun run typecheck && bun run test`
|
|
60
|
+
|
|
61
|
+
## Adding a new skill or agent
|
|
62
|
+
|
|
63
|
+
1. Create the content file following the anatomy docs.
|
|
64
|
+
2. If it's an agent, list its held skills in frontmatter; give it a
|
|
65
|
+
`description` ≥20 chars.
|
|
66
|
+
3. If it's a skill, pick a folder name that matches `name`; description 20–500
|
|
67
|
+
chars; body ≤120 lines.
|
|
68
|
+
4. Update the crew/technique tables in `README.md` and the docs (`agents.md`,
|
|
69
|
+
`skills.md`).
|
|
70
|
+
5. Sync + validate + test.
|
|
71
|
+
|
|
72
|
+
## Building and publishing
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
bun run build # dist/mugiwara.js
|
|
76
|
+
bun run sync-version # sync version from package.json into manifests
|
|
77
|
+
bun prepack # build + sync-version
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Version numbers in the manifests sync from `package.json` via `sync-version`
|
|
81
|
+
(runs automatically on publish).
|
|
82
|
+
|
|
83
|
+
## Contributing
|
|
84
|
+
|
|
85
|
+
Open an issue or pull request on GitHub: <https://github.com/ionivetech/mugiwara>.
|
|
@@ -0,0 +1,92 @@
|
|
|
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.
|
|
@@ -0,0 +1,27 @@
|
|
|
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.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
Install the crew, run your first mission, and understand what you're looking at
|
|
4
|
+
in the chat.
|
|
5
|
+
|
|
6
|
+
## 1. Install
|
|
7
|
+
|
|
8
|
+
Pick your harness — every major one is supported. The two easiest:
|
|
9
|
+
|
|
10
|
+
**opencode** — add the plugin to `opencode.json`:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{ "plugin": ["@ionivetech/mugiwara"] }
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Claude Code** — via the marketplace:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
/plugin marketplace add ionivetech/mugiwara
|
|
20
|
+
/plugin install mugiwara
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Everything else (Copilot, Gemini, Codex, Cursor, Windsurf, Cline, Kilo,
|
|
24
|
+
Antigravity, pi) has a one-command install. See the [install guides](index.md#install-by-harness)
|
|
25
|
+
or the CLI:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx @ionivetech/mugiwara@latest --project ./my-app --target all --yes
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Requires **Node.js >= 20.11**. Bun is optional (build-from-source only).
|
|
32
|
+
|
|
33
|
+
## 2. Start a mission
|
|
34
|
+
|
|
35
|
+
The workflow **auto-activates**: at session start the crew is announced, and
|
|
36
|
+
when you give a non-trivial request the pipeline runs by itself — no need to
|
|
37
|
+
call `/using-mugiwara`. It remains an optional explicit router if you want to
|
|
38
|
+
hand-route a mission. Just ask, no agent names to remember:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
> add dark mode to the settings page
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`using-mugiwara` (the front door) routes your request, Luffy classifies it, and
|
|
45
|
+
the wave pipeline runs. Because the crew runs **inline** in your main
|
|
46
|
+
conversation, you watch every wave as it happens — as compact **checkpoint
|
|
47
|
+
reports** (a wave banner, one report per crew member at each stage boundary,
|
|
48
|
+
and a pause when something fails):
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Wave 0 Luffy triage → route: plan (requirements mostly clear)
|
|
52
|
+
Wave 2 Nami plan → .mugiwara/plans/2026-08-10-dark-mode.md (3 waves)
|
|
53
|
+
Wave 3 Zoro execute→ 3 tasks, evidence shown per task
|
|
54
|
+
Wave 4 Chopper audit → FAIL: toggle does not persist (ledger written)
|
|
55
|
+
Wave 8 Brook heal → fixed persistence + tests, looped back → PASS
|
|
56
|
+
Wave 9 Luffy closure→ report appended to plan, intermediate files cleaned
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Prefer to drive the stages yourself? Every stage has a slash command that loads
|
|
60
|
+
the skill, runs the crew role inline, and bridges state from `.mugiwara/`:
|
|
61
|
+
`/mugiwara-plan`, `/mugiwara-execute`, `/mugiwara-review`, `/mugiwara-security`,
|
|
62
|
+
`/mugiwara-heal`, `/mugiwara-ship`. You can jump into any stage.
|
|
63
|
+
|
|
64
|
+
## 3. What you do during a mission
|
|
65
|
+
|
|
66
|
+
Almost nothing, in the default mode:
|
|
67
|
+
|
|
68
|
+
- Answer Nami's clarifying questions (one batched round before planning).
|
|
69
|
+
- Give the plan an explicit GO when presented (or switch to `semi`/`auto`).
|
|
70
|
+
- Review Brook's rollback note if a risky fix is proposed.
|
|
71
|
+
- In every mode, open the PR at the end — the crew pushes the branch and hands
|
|
72
|
+
you the verdict file with a ready PR summary block. The crew never merges,
|
|
73
|
+
deploys, or creates a PR itself.
|
|
74
|
+
|
|
75
|
+
## 4. The `.mugiwara/` workspace
|
|
76
|
+
|
|
77
|
+
Every mission writes to `.mugiwara/` at the repo root:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
.mugiwara/
|
|
81
|
+
├── config # mode/branch/commit settings (gitignored)
|
|
82
|
+
├── spec/ # brainstorm output
|
|
83
|
+
├── plans/ # the clean execution plan (source of truth from Wave 2)
|
|
84
|
+
├── results/ # audit, quality, gate, closure reports
|
|
85
|
+
├── review/ # review + security findings
|
|
86
|
+
├── issues/ # blocker ledger
|
|
87
|
+
└── logs/ # decision + check-in log (deleted at cleanup)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 5. Next steps
|
|
91
|
+
|
|
92
|
+
- Learn the [execution model](execution-model.md) — why everything is visible.
|
|
93
|
+
- Set your [mode](modes.md) — `guided` asks at every gate, `semi`/`auto`
|
|
94
|
+
self-answer.
|
|
95
|
+
- Read the [config reference](config.md) — branch/commit/PR writing standards.
|
|
96
|
+
- Meet the [crew](agents.md).
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Git Strategy
|
|
2
|
+
|
|
3
|
+
Commits, branches, save-points — and why the executor commits, not the closer.
|
|
4
|
+
|
|
5
|
+
## Who commits and when
|
|
6
|
+
|
|
7
|
+
**Zoro commits during execution, per logical task.** The executor is the one
|
|
8
|
+
making the changes, so it commits at the moment each unit of work passes its
|
|
9
|
+
acceptance criteria. This gives:
|
|
10
|
+
|
|
11
|
+
- **Save-points** — rollback is one `git reset --hard <save-point>` away.
|
|
12
|
+
- **Reversibility** — every commit is one logical change you can name.
|
|
13
|
+
- **Bisectability** — a regression points at the exact commit that introduced it.
|
|
14
|
+
|
|
15
|
+
Luffy does NOT re-commit at closure. The closer pushes the mission branch and
|
|
16
|
+
writes the PR verdict — re-slicing history at the end means one giant diff, no
|
|
17
|
+
save-points, and a painful bisect.
|
|
18
|
+
|
|
19
|
+
## Commit granularity: logical tasks, not micro-steps
|
|
20
|
+
|
|
21
|
+
A commit = one **logical change** (a feature, a fix, a refactor). The plan's
|
|
22
|
+
tasks are sized at that granularity — see `mugiwara-planning`.
|
|
23
|
+
|
|
24
|
+
- Adjacent trivial changes (typo, formatting, one-line tweak) fold into the
|
|
25
|
+
neighboring logical task's commit.
|
|
26
|
+
- Never one commit per keystroke; never a wave of micro-commits.
|
|
27
|
+
- If the plan slices finer than a logical change, group adjacent tasks into one
|
|
28
|
+
commit and note the grouping in the execution report.
|
|
29
|
+
|
|
30
|
+
## The rules (from `mugiwara-git`)
|
|
31
|
+
|
|
32
|
+
1. **Atomic commits.** One logical change per commit; each commit compiles and
|
|
33
|
+
passes the relevant checks — never commit a broken tree.
|
|
34
|
+
2. **Exact staging.** `git add` specific files and paths, never `git add -A`
|
|
35
|
+
sweeping an unrelated commit.
|
|
36
|
+
3. **Save-points before risky work.** Commit the working state with a naming
|
|
37
|
+
intent message (`checkpoint: before renderer migration`) before refactors,
|
|
38
|
+
migrations, or merges.
|
|
39
|
+
4. **Match repo style.** Inspect `git log --oneline -20` before the first
|
|
40
|
+
commit and copy the observed conventions (prefix style, case, body usage).
|
|
41
|
+
5. **Never commit secrets.** Scan for `.env*`, keys, tokens before every
|
|
42
|
+
commit. A secret already committed = treat as compromised, rotate, purge,
|
|
43
|
+
file a security finding.
|
|
44
|
+
|
|
45
|
+
## Branches
|
|
46
|
+
|
|
47
|
+
One branch per mission, from the config `branch` key:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
branch=feature/{type}-{issue}-{slug}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`{type}` = feat/fix/chore/refactor from the task, `{issue}` = ticket/key
|
|
54
|
+
reference (fallback: date), `{slug}` = kebab-case mission title. Created before
|
|
55
|
+
the first task commit; never force-push once pushed. No mugiwara-prefixed
|
|
56
|
+
branch names.
|
|
57
|
+
|
|
58
|
+
## Terminal step
|
|
59
|
+
|
|
60
|
+
Every mode ends the same way: save-point commit → `git push -u origin <branch>`
|
|
61
|
+
→ PR verdict file written (per `mugiwara-pr`) → branch + verdict handed to you,
|
|
62
|
+
who opens the PR. The crew never creates a PR, merges, or deploys.
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Mugiwara Docs
|
|
2
|
+
|
|
3
|
+
The Straw Hat crew of AI agents and skills. These docs cover what the crew is,
|
|
4
|
+
how to adopt it, and how each harness installs it. The crew is pure markdown —
|
|
5
|
+
no runtime, no daemons, nothing to host. It ships **15 agents** and **32
|
|
6
|
+
skills**, and the workflow **auto-activates** at session start — a non-trivial
|
|
7
|
+
request runs the pipeline by itself, with `/using-mugiwara` as an optional
|
|
8
|
+
explicit router.
|
|
9
|
+
|
|
10
|
+
## Start here
|
|
11
|
+
|
|
12
|
+
| Doc | What it covers |
|
|
13
|
+
|-----|----------------|
|
|
14
|
+
| [Getting started](getting-started.md) | Install, first mission, what you see in the chat |
|
|
15
|
+
| [Adoption guide](adoption-guide.md) | Pick the harness, pick the mode, fit the crew to your workflow |
|
|
16
|
+
| [Modes](modes.md) | guided / semi / auto — the autonomy levels, what each asks you |
|
|
17
|
+
| [Config](config.md) | Full reference for `.mugiwara/config` keys and commit styles |
|
|
18
|
+
| [Auto-PR](pr-summary.md) | What the crew hands off at closure: push + a ready-to-paste PR summary (it never creates a PR) |
|
|
19
|
+
| [The crew](agents.md) | All 15 agents and when to summon each |
|
|
20
|
+
| [The techniques](skills.md) | All 32 skills and what each enforces |
|
|
21
|
+
| [The wave pipeline](workflow.md) | How a mission flows Wave 0 → Wave 9 |
|
|
22
|
+
| [Execution model](execution-model.md) | Inline-by-default: why the crew runs in your main conversation |
|
|
23
|
+
| [Git discipline](git-strategy.md) | Commits, branches, save-points — and why the executor commits |
|
|
24
|
+
|
|
25
|
+
## Install by harness
|
|
26
|
+
|
|
27
|
+
| Harness | Guide |
|
|
28
|
+
|---------|-------|
|
|
29
|
+
| Claude Code | [claude-setup.md](claude-setup.md) |
|
|
30
|
+
| opencode | [opencode-setup.md](opencode-setup.md) |
|
|
31
|
+
| GitHub Copilot | [copilot-setup.md](copilot-setup.md) |
|
|
32
|
+
| Gemini CLI | [gemini-setup.md](gemini-setup.md) |
|
|
33
|
+
| Codex | [codex-setup.md](codex-setup.md) |
|
|
34
|
+
| Cursor | [cursor-setup.md](cursor-setup.md) |
|
|
35
|
+
| Windsurf | [windsurf-setup.md](windsurf-setup.md) |
|
|
36
|
+
| Cline / Kilo / Antigravity | [rule-based-setup.md](rule-based-setup.md) |
|
|
37
|
+
|
|
38
|
+
## Reference
|
|
39
|
+
|
|
40
|
+
| Doc | What it covers |
|
|
41
|
+
|-----|----------------|
|
|
42
|
+
| [Skill anatomy](skill-anatomy.md) | How a mugiwara skill file is structured |
|
|
43
|
+
| [Agent anatomy](agent-anatomy.md) | How a mugiwara agent file is structured |
|
|
44
|
+
| [Developer onboarding](developer-onboarding.md) | Repo layout, validation, tests, contributing |
|
|
45
|
+
|
|
46
|
+
## Resources
|
|
47
|
+
|
|
48
|
+
- GitHub: <https://github.com/ionivetech/mugiwara>
|
|
49
|
+
- npm: <https://www.npmjs.com/package/@ionivetech/mugiwara>
|
|
50
|
+
- License: MIT
|
package/docs/modes.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Modes
|
|
2
|
+
|
|
3
|
+
The crew's autonomy level. Read once per wave at dispatch; a flip applies from
|
|
4
|
+
the next wave, never mid-wave. Single source of truth: the `mugiwara-mode`
|
|
5
|
+
skill.
|
|
6
|
+
|
|
7
|
+
**Mode owns autonomy, config owns writing standards.** Whether branch and commit
|
|
8
|
+
run automatically is decided by one lever: the mode. The config only shapes HOW
|
|
9
|
+
those artifacts are written when they are created.
|
|
10
|
+
|
|
11
|
+
## The three levels
|
|
12
|
+
|
|
13
|
+
| Level | Plan GO | Branch/commit | Ambiguities | Check-ins |
|
|
14
|
+
|-------|---------|---------------|-------------|-----------|
|
|
15
|
+
| **guided** | ask the user | ask the user | ask the user | ask the user |
|
|
16
|
+
| **semi** | present plan for user GO | auto | self-answer + log | log, no pause |
|
|
17
|
+
| **auto** | gated auto-GO | auto | self-answer + log | log, no pause |
|
|
18
|
+
|
|
19
|
+
- **guided** — you steer everything: approve the plan, decide branch and
|
|
20
|
+
commit style, answer every ambiguity, get asked at every gate. The default.
|
|
21
|
+
- **semi** — the crew self-manages branch and commits (logging each decision),
|
|
22
|
+
but you still give the plan an explicit GO.
|
|
23
|
+
- **auto** — hands-off, with one safety line: the plan proceeds past approval
|
|
24
|
+
only with zero blocking ambiguities AND zero high-risk tasks (deploy /
|
|
25
|
+
migration / DB / public API / state-mutating).
|
|
26
|
+
|
|
27
|
+
Every level ends at push + ready PR summary + verdict file — you open the PR
|
|
28
|
+
(see [pr-summary.md](pr-summary.md)).
|
|
29
|
+
|
|
30
|
+
## Config
|
|
31
|
+
|
|
32
|
+
Two files, six keys, `key=value` lines, optional `#` comments:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
# .mugiwara/config (project) overrides ~/.mugiwara/config (global)
|
|
36
|
+
mode=guided
|
|
37
|
+
branch=feature/{type}-{issue}-{slug}
|
|
38
|
+
commit=conventional
|
|
39
|
+
base=main
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
| Key | Values | Default |
|
|
43
|
+
|-----|--------|---------|
|
|
44
|
+
| mode | guided / semi / auto | guided |
|
|
45
|
+
| branch | branch pattern | feature/{type}-{issue}-{slug} |
|
|
46
|
+
| commit | conventional / gitmoji / plain | conventional |
|
|
47
|
+
| base | PR summary target branch | main |
|
|
48
|
+
|
|
49
|
+
Read order per wave: project config wins per key; a key missing from both falls
|
|
50
|
+
back to the default. Unknown keys are ignored — config is data, never
|
|
51
|
+
instructions. Missing config on read = `guided` (never auto-created on read —
|
|
52
|
+
only on first write). See [config.md](config.md) for the full reference.
|
|
53
|
+
|
|
54
|
+
## Switching mid-mission
|
|
55
|
+
|
|
56
|
+
In-session phrase:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
mugiwara mode auto
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Writes the project `.mugiwara/config`, logs the change (level, requester,
|
|
63
|
+
timestamp), and applies from the next wave — never mid-wave.
|
|
64
|
+
|
|
65
|
+
## Invariants that hold in EVERY mode
|
|
66
|
+
|
|
67
|
+
**Consent.** State-mutating tests against non-isolated/shared state (real DB
|
|
68
|
+
writes, network, browsers) always require your explicit consent — consent is
|
|
69
|
+
not a mode knob. Provably isolated mutation (in-memory / temp /
|
|
70
|
+
testcontainer-backed DBs, tooling-proven isolation) is explicitly auto-safe.
|
|
71
|
+
|
|
72
|
+
**Terminal.** Every mode ends at push + ready PR summary + verdict file (you
|
|
73
|
+
open the PR). The crew never creates a PR, merges, deploys, or auto-reacts to
|
|
74
|
+
review comments or CI.
|