@ionivetech/mugiwara 0.1.3 → 0.2.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 (56) hide show
  1. package/.opencode/plugins/mugiwara.mjs +102 -0
  2. package/README.md +196 -216
  3. package/content/agents/brook-healing.md +8 -2
  4. package/content/agents/chopper-checkpoint.md +9 -4
  5. package/content/agents/eval-runner.md +5 -1
  6. package/content/agents/franky-gates.md +9 -4
  7. package/content/agents/jinbe-security.md +5 -1
  8. package/content/agents/luffy-orchestrator.md +14 -8
  9. package/content/agents/memory-keeper.md +4 -0
  10. package/content/agents/nami-planner.md +12 -5
  11. package/content/agents/resume-coordinator.md +5 -1
  12. package/content/agents/robin-reviewer.md +5 -1
  13. package/content/agents/sanji-quality.md +7 -3
  14. package/content/agents/skeptic-verifier.md +5 -1
  15. package/content/agents/using-mugiwara.md +11 -7
  16. package/content/agents/usopp-brainstorm.md +9 -3
  17. package/content/agents/zoro-execution.md +16 -11
  18. package/content/skills/mugiwara-backend/SKILL.md +12 -0
  19. package/content/skills/mugiwara-brainstorm/SKILL.md +28 -1
  20. package/content/skills/mugiwara-checkpoint/SKILL.md +8 -6
  21. package/content/skills/mugiwara-deprecation/SKILL.md +77 -0
  22. package/content/skills/mugiwara-dynamic-workflow/SKILL.md +3 -3
  23. package/content/skills/mugiwara-execution/SKILL.md +32 -15
  24. package/content/skills/mugiwara-gates/SKILL.md +4 -0
  25. package/content/skills/mugiwara-git/SKILL.md +10 -0
  26. package/content/skills/mugiwara-healing/SKILL.md +9 -3
  27. package/content/skills/mugiwara-mode/SKILL.md +63 -0
  28. package/content/skills/mugiwara-orchestration/SKILL.md +26 -8
  29. package/content/skills/mugiwara-planning/SKILL.md +50 -25
  30. package/content/skills/mugiwara-pr/SKILL.md +51 -0
  31. package/content/skills/mugiwara-quality/SKILL.md +19 -2
  32. package/content/skills/mugiwara-resume/SKILL.md +6 -4
  33. package/content/skills/mugiwara-testcases/SKILL.md +52 -0
  34. package/content/skills/mugiwara-workflow/SKILL.md +36 -13
  35. package/docs/adoption-guide.md +72 -0
  36. package/docs/agent-anatomy.md +72 -0
  37. package/docs/agents.md +51 -0
  38. package/docs/claude-setup.md +38 -0
  39. package/docs/codex-setup.md +24 -0
  40. package/docs/comparison.md +63 -0
  41. package/docs/copilot-setup.md +27 -0
  42. package/docs/cursor-setup.md +23 -0
  43. package/docs/developer-onboarding.md +85 -0
  44. package/docs/execution-model.md +59 -0
  45. package/docs/gemini-setup.md +24 -0
  46. package/docs/getting-started.md +84 -0
  47. package/docs/git-strategy.md +62 -0
  48. package/docs/index.md +45 -0
  49. package/docs/modes.md +64 -0
  50. package/docs/opencode-setup.md +47 -0
  51. package/docs/rule-based-setup.md +31 -0
  52. package/docs/skill-anatomy.md +73 -0
  53. package/docs/skills.md +61 -0
  54. package/docs/windsurf-setup.md +16 -0
  55. package/docs/workflow.md +80 -0
  56. package/package.json +19 -2
@@ -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 # 25 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,59 @@
1
+ # Execution Model
2
+
3
+ Why the crew runs in your main conversation — and when subagents are actually
4
+ used.
5
+
6
+ ## Inline by default
7
+
8
+ The crew runs **inline**. The main thread embodies each crew role using that
9
+ member's skill, so every wave plays out in your main conversation and you watch
10
+ it happen:
11
+
12
+ - Luffy's triage, Nami's planning, Zoro's execution, Chopper's audit, Sanji's
13
+ quality, Franky's gates, Robin/Jinbe's review, Brook's healing, Luffy's
14
+ closure — all performed in the main thread.
15
+ - Evidence is written to `.mugiwara/` files; the conversation carries terse
16
+ verdicts and evidence pointers.
17
+
18
+ ## When subagents ARE used
19
+
20
+ Subagents exist to parallelize, never to hide work:
21
+
22
+ 1. **`[PARALLEL]` task batches** — independent tasks that touch no shared files
23
+ or interfaces run concurrently, one per worker subagent. This is the only
24
+ place Zoro delegates.
25
+ 2. **Parallel fixes** — Brook spawns workers for independent heal fixes.
26
+ 3. **Background / long-running checks** — work that would stall the
27
+ conversation.
28
+ 4. **Check subagents** — Chopper, Robin, and Jinbe may spawn subagents for
29
+ independent re-runs or diff passes.
30
+
31
+ Worker results return as reports; the main thread summarizes them inline with
32
+ evidence pointers.
33
+
34
+ ## Why not dispatch every wave to a subagent?
35
+
36
+ Every harness — Claude Code, opencode, Codex, Cursor, Gemini — hides subagent
37
+ internals behind a click or a side panel. If each wave ran as a subagent, you'd
38
+ be clicking through the whole mission to see what happened. Running the crew in
39
+ the main conversation is the only way the process is genuinely visible.
40
+
41
+ There's also a context cost to deep nesting: crew-inside-crew subagents bloat
42
+ context and hide decisions. Inline keeps the user in the loop and the story
43
+ linear.
44
+
45
+ ## Rules that keep it sane
46
+
47
+ - Crew members never dispatch another crew member. A role that must split work
48
+ returns the split to the main thread, which spawns the workers.
49
+ - Escalation = "blocked" + ledger row returned to the main thread.
50
+ - Sequential work never takes a subagent round-trip — no skipping, no hidden
51
+ reordering, plan order is plan order.
52
+
53
+ ## Trade-off
54
+
55
+ Inline execution grows the main-thread context over a long mission. The crew
56
+ mitigates this: evidence goes to `.mugiwara/` files, reports are terse, and
57
+ subagents isolate the genuinely heavy parallel work. For missions that must
58
+ minimize main-context growth, the crew supports dispatching specific waves to a
59
+ subagent — at the cost of visibility.
@@ -0,0 +1,24 @@
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
+ ## What you get
16
+
17
+ - 25 skills as markdown rules in `.gemini/mugiwara/`.
18
+ - A `GEMINI.md` bootstrap pointer (created if missing).
19
+
20
+ ## Notes
21
+
22
+ Gemini is a **project-only** target — skipped (with a note) on `--global`
23
+ installs. Agents are skills-only here (no native subagent registry); the crew
24
+ pipeline runs through the rule files.
@@ -0,0 +1,84 @@
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
+ Once installed, just ask. No agent names to remember — say what you want built:
36
+
37
+ ```
38
+ > add dark mode to the settings page
39
+ ```
40
+
41
+ `using-mugiwara` (the front door) routes your request, Luffy classifies it, and
42
+ the wave pipeline runs. Because the crew runs **inline** in your main
43
+ conversation, you watch every wave as it happens:
44
+
45
+ ```
46
+ Wave 0 Luffy triage → route: plan (requirements mostly clear)
47
+ Wave 2 Nami plan → .mugiwara/plans/2026-08-10-dark-mode.md (3 waves)
48
+ Wave 3 Zoro execute→ 3 tasks, evidence shown per task
49
+ Wave 4 Chopper audit → FAIL: toggle does not persist (ledger written)
50
+ Wave 8 Brook heal → fixed persistence + tests, looped back → PASS
51
+ Wave 9 Luffy closure→ report appended to plan, intermediate files cleaned
52
+ ```
53
+
54
+ ## 3. What you do during a mission
55
+
56
+ Almost nothing, in the default mode:
57
+
58
+ - Answer Nami's clarifying questions (one batched round before planning).
59
+ - Give the plan an explicit GO when presented (or switch to `semi`/`auto`).
60
+ - Review Brook's rollback note if a risky fix is proposed.
61
+ - Open the PR at the end — the crew pushes the branch and hands you the verdict
62
+ file; the crew never merges or deploys.
63
+
64
+ ## 4. The `.mugiwara/` workspace
65
+
66
+ Every mission writes to `.mugiwara/` at the repo root:
67
+
68
+ ```
69
+ .mugiwara/
70
+ ├── config # mode/branch/commit settings (gitignored)
71
+ ├── spec/ # brainstorm output
72
+ ├── plans/ # the clean execution plan (source of truth from Wave 2)
73
+ ├── results/ # audit, quality, gate, closure reports
74
+ ├── review/ # review + security findings
75
+ ├── issues/ # blocker ledger
76
+ └── logs/ # decision + check-in log (deleted at cleanup)
77
+ ```
78
+
79
+ ## 5. Next steps
80
+
81
+ - Learn the [execution model](execution-model.md) — why everything is visible.
82
+ - Set your [mode](modes.md) — `guided` asks at every gate, `semi`/`auto`
83
+ self-answer.
84
+ - 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,45 @@
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.
6
+
7
+ ## Start here
8
+
9
+ | Doc | What it covers |
10
+ |-----|----------------|
11
+ | [Getting started](getting-started.md) | Install, first mission, what you see in the chat |
12
+ | [Adoption guide](adoption-guide.md) | Pick the harness, pick the mode, fit the crew to your workflow |
13
+ | [Modes](modes.md) | guided / semi / auto — the autonomy levels, what each asks you |
14
+ | [The crew](agents.md) | All 15 agents and when to summon each |
15
+ | [The techniques](skills.md) | All 25 skills and what each enforces |
16
+ | [The wave pipeline](workflow.md) | How a mission flows Wave 0 → Wave 9 |
17
+ | [Execution model](execution-model.md) | Inline-by-default: why the crew runs in your main conversation |
18
+ | [Git discipline](git-strategy.md) | Commits, branches, save-points — and why the executor commits |
19
+
20
+ ## Install by harness
21
+
22
+ | Harness | Guide |
23
+ |---------|-------|
24
+ | Claude Code | [claude-setup.md](claude-setup.md) |
25
+ | opencode | [opencode-setup.md](opencode-setup.md) |
26
+ | GitHub Copilot | [copilot-setup.md](copilot-setup.md) |
27
+ | Gemini CLI | [gemini-setup.md](gemini-setup.md) |
28
+ | Codex | [codex-setup.md](codex-setup.md) |
29
+ | Cursor | [cursor-setup.md](cursor-setup.md) |
30
+ | Windsurf | [windsurf-setup.md](windsurf-setup.md) |
31
+ | Cline / Kilo / Antigravity | [rule-based-setup.md](rule-based-setup.md) |
32
+
33
+ ## Reference
34
+
35
+ | Doc | What it covers |
36
+ |-----|----------------|
37
+ | [Skill anatomy](skill-anatomy.md) | How a mugiwara skill file is structured |
38
+ | [Agent anatomy](agent-anatomy.md) | How a mugiwara agent file is structured |
39
+ | [Developer onboarding](developer-onboarding.md) | Repo layout, validation, tests, contributing |
40
+
41
+ ## Resources
42
+
43
+ - GitHub: <https://github.com/ionivetech/mugiwara>
44
+ - npm: <https://www.npmjs.com/package/@ionivetech/mugiwara>
45
+ - License: MIT
package/docs/modes.md ADDED
@@ -0,0 +1,64 @@
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
+ ## The three levels
8
+
9
+ | Level | Plan GO | Branch / commits | Ambiguities | Check-ins |
10
+ |-------|---------|------------------|-------------|-----------|
11
+ | **guided** | ask the user | ask the user | ask the user | ask the user |
12
+ | **semi** | present plan for user GO | auto | self-answer + log | log, no pause |
13
+ | **auto** | gated auto-GO | auto | self-answer + log | log, no pause |
14
+
15
+ - **guided** — you steer everything: approve the plan, decide branch and
16
+ commit style, answer every ambiguity, get asked at every gate. The default.
17
+ - **semi** — the crew self-manages branch, commits, and ambiguities (logging
18
+ each decision), but you still give the plan an explicit GO.
19
+ - **auto** — hands-off, with a safety line: the plan proceeds past approval
20
+ only with zero blocking ambiguities AND zero high-risk tasks (deploy /
21
+ migration / DB / public API / state-mutating). Otherwise it stops for you.
22
+
23
+ ## Config
24
+
25
+ Two files, three keys, `key=value` lines, optional `#` comments:
26
+
27
+ ```
28
+ # .mugiwara/config (project) overrides ~/.mugiwara/config (global)
29
+ mode=guided
30
+ branch=feature/{type}-{issue}-{slug}
31
+ commit=conventional
32
+ ```
33
+
34
+ | Key | Values | Default |
35
+ |-----|--------|---------|
36
+ | mode | guided / semi / auto | guided |
37
+ | branch | branch pattern | feature/{type}-{issue}-{slug} |
38
+ | commit | conventional / gitmoji / plain | conventional |
39
+
40
+ Read order per wave: project config wins per key; a key missing from both falls
41
+ back to the default. Missing config on read = `guided` (never auto-created on
42
+ read — only on first write).
43
+
44
+ ## Switching mid-mission
45
+
46
+ In-session phrase:
47
+
48
+ ```
49
+ mugiwara mode auto
50
+ ```
51
+
52
+ Writes the project `.mugiwara/config`, logs the change (level, requester,
53
+ timestamp), and applies from the next wave — never mid-wave.
54
+
55
+ ## Invariants that hold in EVERY mode
56
+
57
+ **Consent.** State-mutating tests against non-isolated/shared state (real DB
58
+ writes, network, browsers) always require your explicit consent — consent is
59
+ not a mode knob. Provably isolated mutation (in-memory / temp /
60
+ testcontainer-backed DBs, tooling-proven isolation) is explicitly auto-safe.
61
+
62
+ **Terminal.** Every mode ends at push + ready PR + verdict file handed to you.
63
+ The crew never creates a PR, merges, deploys, or auto-reacts to review comments
64
+ or CI. PR review is the terminal gate.
@@ -0,0 +1,47 @@
1
+ # opencode Setup
2
+
3
+ opencode is a fully supported target — native skills + agents via the opencode
4
+ plugin.
5
+
6
+ ## Install via the plugin
7
+
8
+ Add to `opencode.json`:
9
+
10
+ ```json
11
+ { "plugin": ["@ionivetech/mugiwara"] }
12
+ ```
13
+
14
+ Or from the git repo directly:
15
+
16
+ ```json
17
+ { "plugin": ["mugiwara@git+https://github.com/ionivetech/mugiwara.git"] }
18
+ ```
19
+
20
+ ## Install via CLI
21
+
22
+ ```bash
23
+ # global install
24
+ npx @ionivetech/mugiwara@latest --global --target opencode --yes
25
+
26
+ # project install
27
+ npx @ionivetech/mugiwara@latest --project ./my-app --target opencode --yes
28
+ ```
29
+
30
+ ## What you get
31
+
32
+ - 25 skills in `.opencode/skills/` (project) or `~/.config/opencode/skills/`
33
+ (global).
34
+ - 15 agents registered as subagents via the plugin.
35
+ - The plugin announces the crew at session start and injects the inline
36
+ execution model into the system prompt.
37
+
38
+ ## Use it
39
+
40
+ ```
41
+ > use mugiwara
42
+ > add dark mode to the settings page
43
+ ```
44
+
45
+ Restart opencode after installing — config is loaded once at startup. The crew
46
+ runs inline in your main conversation; subagents only for `[PARALLEL]` batches
47
+ and background checks. You never need to click into a subagent to see progress.
@@ -0,0 +1,31 @@
1
+ # Rule-Based Targets: Cline, Kilo, Antigravity, pi, Kimi
2
+
3
+ These targets install the crew as markdown rule files your tool picks up from a
4
+ conventions directory. Skills-only — the crew pipeline runs through the rules.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ # all rule-based targets in one go
10
+ npx @ionivetech/mugiwara@latest --project ./my-app --target cline,kilo,antigravity --yes
11
+ ```
12
+
13
+ | Harness | Target id | Installs as |
14
+ |---------|-----------|-------------|
15
+ | Cline | `cline` | Rules in `.clinerules` |
16
+ | Kilo Code | `kilo` | Rules in `.kilo/rules` + `kilo.jsonc` pointer |
17
+ | Antigravity | `antigravity` | Rules in `.agents/rules` |
18
+
19
+ ## pi and Kimi
20
+
21
+ - **pi** — `pi install git:github.com/ionivetech/mugiwara` (declared via the
22
+ `"pi"` key in `package.json`).
23
+ - **Kimi Code** — `/plugins install https://github.com/ionivetech/mugiwara`
24
+ (`.kimi-plugin/plugin.json`).
25
+
26
+ ## Notes
27
+
28
+ All rule-based targets are **project-only** — skipped (with a note) on
29
+ `--global` installs. Targets with a bootstrap file (Gemini, Codex, Kilo) create
30
+ it if absent and otherwise tell you the line to add, so your tool points at the
31
+ crew.
@@ -0,0 +1,73 @@
1
+ # Skill Anatomy
2
+
3
+ Every mugiwara skill is a single portable `SKILL.md` file. No code, no runtime —
4
+ just frontmatter plus a playbook the agent follows. This is the format skills
5
+ ship in for Claude Code, opencode, Copilot, Cursor, Gemini, and 70+ other tools
6
+ via the agentskills.io layout.
7
+
8
+ ## File structure
9
+
10
+ ```
11
+ skills/<skill-name>/SKILL.md
12
+ ```
13
+
14
+ ```markdown
15
+ ---
16
+ name: mugiwara-checkpoint
17
+ description: Use after an execution wave to audit results against the plan. Runs every acceptance criterion as a command or file inspect, 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.
18
+ ---
19
+
20
+ # Checkpoint (Chopper)
21
+
22
+ <playbook body>
23
+ ```
24
+
25
+ ## Frontmatter
26
+
27
+ | Field | Required | Notes |
28
+ |-------|----------|-------|
29
+ | `name` | yes | lowercase, hyphen-separated, matches the folder name, ≤64 chars |
30
+ | `description` | yes | 20–500 chars; what it does AND when to trigger. Front-load the trigger keywords. Skills without a description are filtered out. |
31
+ | `license`, `compatibility`, `metadata` | no | optional extras |
32
+
33
+ ## The playbook body
34
+
35
+ The body is the actual behavior. Well-formed mugiwara skills follow a house
36
+ style:
37
+
38
+ 1. **Title + one-line identity** — `# Checkpoint (Chopper)`, then what the role
39
+ is and is not.
40
+ 2. **The protocol** — numbered steps, exact commands, exact file paths.
41
+ 3. **Decision tables** — where a judgment is needed, a table of signal → action.
42
+ 4. **The iron law** — one memorable line that states the non-negotiable
43
+ ("TRUST NOTHING; VERIFY EVERYTHING").
44
+ 5. **Common rationalizations** — the excuses to reject, and the correct reply.
45
+ 6. **Red flags** — conditions that mean "stop, this isn't done," each ending
46
+ with what to do.
47
+
48
+ ### Style rules that keep skills effective
49
+
50
+ - **Evidence over claims.** A skill says what to run, never what to assume.
51
+ - **Concrete, never aspirational.** Exact paths, exact commands; "works
52
+ correctly" is banned as an acceptance criterion.
53
+ - **Boundaries are explicit.** Auditor skills say "never edit code"; executor
54
+ skills say "never report done without command output."
55
+ - **≤120 lines.** Skills that grow past that get split, not stretched.
56
+
57
+ ## How skills reference each other
58
+
59
+ Skills cross-reference by name: an agent's frontmatter lists its held skills
60
+ (`skills: mugiwara-checkpoint`), and skills defer to each other (e.g.
61
+ `mugiwara-quality` defers to `mugiwara-mode` for the consent contract). Content
62
+ is the single source of truth; harnesses copy it verbatim.
63
+
64
+ ## Validation
65
+
66
+ Every skill is validated on check-in: name matches folder, description 20–500
67
+ chars, body ≤120 lines, no duplicate names. Run:
68
+
69
+ ```bash
70
+ bun run validate
71
+ ```
72
+
73
+ See [developer-onboarding.md](developer-onboarding.md).
package/docs/skills.md ADDED
@@ -0,0 +1,61 @@
1
+ # The Techniques — 25 Skills
2
+
3
+ Each skill is a portable markdown playbook — the "how to" the crew follows when
4
+ it embodies a role. Skills are the actual content; agents are the personas.
5
+
6
+ ## Core pipeline
7
+
8
+ | Skill | Enforces |
9
+ |-------|----------|
10
+ | `mugiwara-workflow` | The harness entry point: inline execution model, gateway triage, wave pipeline, workspace layout, blocker protocol, cleanup |
11
+ | `mugiwara-orchestration` | Luffy's captain behavior: 5-way classifier, check-ins, work splitting, decision log, closure |
12
+ | `mugiwara-brainstorm` | Usopp's critical sparring: interrogate, research facts, cut over-engineering, recommend |
13
+ | `mugiwara-planning` | Interview-first, full-context scan, wave plans with parallel/sequential markers + anti-patterns |
14
+ | `mugiwara-execution` | Todo list, sequential tasks inline + parallel worker batches, 6-field delegation for parallel work, one commit per logical task |
15
+ | `mugiwara-checkpoint` | Verify-everything audit — deduped and scoped to the wave's diff; failure rows to the blocker ledger |
16
+ | `mugiwara-quality` | Discover the project's real tooling; formatter, linter, unit tests under the consent matrix |
17
+ | `mugiwara-gates` | Coverage ≥90% new / ≥80% modified, build validation, Definition of Done |
18
+ | `mugiwara-review` | Doubt-driven review: breaking-change analysis, five-axis, severity-tagged findings |
19
+ | `mugiwara-security` | OWASP-driven security review, untrusted-data doctrine, severity by exploitability × impact |
20
+ | `mugiwara-healing` | Reads the ledger, Stop-the-Line + Prove-It root-cause fixes, rollback prep |
21
+
22
+ ## Mission control
23
+
24
+ | Skill | Enforces |
25
+ |-------|----------|
26
+ | `mugiwara-mode` | Runtime levels guided / semi / auto, consent invariants, gated auto-GO, push + ready-PR terminal |
27
+ | `mugiwara-git` | Atomic commits, save-points, multi-commit splitting, bisect/blame debugging |
28
+ | `mugiwara-testcases` | User-test intake (ATDD): immutable-gold rule, declarative-AC routing, consent, failure adjudication |
29
+ | `mugiwara-pr` | CI/CD loop terminal: one verdict file + push via plain git; stop-at-PR invariant |
30
+ | `mugiwara-ship` | GO/NO-GO ship gate: pre-launch checklist, feature flags, rollback plan |
31
+ | `mugiwara-deprecation` | Sunset & migration discipline: keep-or-retire gate, cutover playbooks, safe schema changes |
32
+ | `mugiwara-resume` | Session resume: rebuild state from `.mugiwara/` after compaction/loss; never restart |
33
+ | `mugiwara-lessons` | Cross-mission memory: actionable lessons ledger, read at triage, written at closure |
34
+ | `mugiwara-observability` | Trace the crew: structured logs, OTel-compatible spans, session correlation |
35
+
36
+ ## Domain & advanced
37
+
38
+ | Skill | Enforces |
39
+ |-------|----------|
40
+ | `mugiwara-frontend` | Anti-slop frontend: audit-first redesigns, design-system extraction, slop list |
41
+ | `mugiwara-backend` | Backend/server code: repo standards first, API design, data integrity, error handling, security |
42
+ | `mugiwara-agent-security` | Secure the agent layer: prompt injection, memory poisoning, excessive agency, secrets, sandboxing |
43
+ | `mugiwara-dynamic-workflow` | Runtime workflow patterns: fan-out-and-synthesize, tournament, loop-until-done, classify-and-act |
44
+ | `mugiwara-eval` | Test the harness itself: task suites, judge-agent rubric comparison, pass/fail per case |
45
+
46
+ ## Anatomy of a skill
47
+
48
+ Every skill is a single `SKILL.md` with frontmatter + a playbook body:
49
+
50
+ ```markdown
51
+ ---
52
+ name: mugiwara-checkpoint
53
+ description: Use after an execution wave to audit results against the plan. ...
54
+ ---
55
+
56
+ # Checkpoint (Chopper)
57
+
58
+ <playbook: protocol, rules, red flags, iron law>
59
+ ```
60
+
61
+ See [skill-anatomy.md](skill-anatomy.md) for the details.
@@ -0,0 +1,16 @@
1
+ # Windsurf Setup
2
+
3
+ ## Install
4
+
5
+ ```bash
6
+ npx @ionivetech/mugiwara@latest --project ./my-app --target windsurf --yes
7
+ ```
8
+
9
+ ## What you get
10
+
11
+ - 25 skills as rules files in `.devin/rules`.
12
+
13
+ ## Notes
14
+
15
+ Windsurf is a **project-only** target. Skills-only — the crew pipeline runs
16
+ through the rule files.