@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.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +4 -3
- package/.codex-plugin/plugin.json +2 -2
- package/.cursor-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +2 -2
- package/.opencode/commands/mugiwara-continue.md +16 -0
- package/.opencode/commands/mugiwara-execute.md +6 -4
- package/.opencode/commands/mugiwara-heal.md +6 -4
- package/.opencode/commands/mugiwara-plan.md +6 -4
- package/.opencode/commands/mugiwara-review.md +6 -4
- package/.opencode/commands/mugiwara-security.md +6 -4
- package/.opencode/commands/mugiwara-ship.md +6 -4
- package/.opencode/commands/mugiwara.md +4 -2
- package/.opencode/commands/using-mugiwara.md +7 -13
- package/.opencode/plugins/mugiwara.mjs +18 -6
- package/AGENTS.md +2 -2
- package/GEMINI.md +1 -1
- package/README.md +240 -217
- package/content/agents/brook-healing.md +17 -3
- package/content/agents/chopper-checkpoint.md +17 -3
- package/content/agents/eval-runner.md +17 -2
- package/content/agents/franky-gates.md +19 -5
- package/content/agents/jinbe-security.md +19 -3
- package/content/agents/luffy-orchestrator.md +6 -3
- package/content/agents/memory-keeper.md +15 -0
- package/content/agents/nami-planner.md +21 -6
- package/content/agents/onboarding-guide.md +145 -0
- package/content/agents/resume-coordinator.md +21 -5
- package/content/agents/robin-reviewer.md +18 -3
- package/content/agents/sanji-quality.md +19 -4
- package/content/agents/skeptic-verifier.md +18 -3
- package/content/agents/usopp-brainstorm.md +17 -3
- package/content/agents/zoro-execution.md +19 -5
- package/content/skills/mugiwara-backend/SKILL.md +1 -1
- package/content/skills/mugiwara-brainstorm/SKILL.md +5 -1
- package/content/skills/mugiwara-checkpoint/SKILL.md +2 -2
- package/content/skills/mugiwara-contract-first/SKILL.md +2 -36
- package/content/skills/mugiwara-contract-first/references/process.md +37 -0
- package/content/skills/mugiwara-execution/SKILL.md +30 -13
- package/content/skills/mugiwara-execution/references/resume-batching.md +32 -0
- package/content/skills/mugiwara-frontend/SKILL.md +1 -1
- package/content/skills/mugiwara-gates/SKILL.md +32 -30
- package/content/skills/mugiwara-healing/SKILL.md +1 -1
- package/content/skills/mugiwara-orchestration/SKILL.md +41 -25
- package/content/skills/mugiwara-orchestration/references/delegation-pillars.md +40 -0
- package/content/skills/mugiwara-orchestration/references/triage-escalation.md +96 -0
- package/content/skills/mugiwara-planning/SKILL.md +23 -27
- package/content/skills/mugiwara-planning/references/plan-template.md +42 -0
- package/content/skills/mugiwara-pr/SKILL.md +2 -2
- package/content/skills/mugiwara-quality/SKILL.md +10 -6
- package/content/skills/mugiwara-resume/SKILL.md +7 -2
- package/content/skills/mugiwara-review/SKILL.md +20 -1
- package/content/skills/mugiwara-review/references/code-attributes.md +38 -0
- package/content/skills/mugiwara-root-cause/SKILL.md +3 -30
- package/content/skills/mugiwara-root-cause/references/process.md +35 -0
- package/content/skills/mugiwara-security/SKILL.md +17 -32
- package/content/skills/mugiwara-security/references/owasp-top10.md +12 -0
- package/content/skills/mugiwara-security/references/rationalizations.md +8 -0
- package/content/skills/mugiwara-ship/SKILL.md +5 -4
- package/content/skills/mugiwara-workflow/SKILL.md +74 -77
- package/content/skills/mugiwara-workflow/references/workspace-layout.md +50 -0
- package/content/skills/using-mugiwara/SKILL.md +8 -19
- package/dist/mugiwara.js +206 -87
- package/gemini-extension.json +1 -1
- package/hooks/session-start.ts +1 -1
- package/package.json +12 -5
- package/plugin.json +2 -2
- package/references/multi-actor.md +1 -1
- package/scripts/evidence.sh +13 -6
- package/scripts/gate-selftest.ts +266 -0
- package/scripts/initiative.ts +248 -0
- package/scripts/lane.sh +15 -0
- package/scripts/mission-report.sh +141 -76
- package/scripts/onboard.ts +292 -0
- package/scripts/release-notes.ts +42 -13
- package/scripts/retrieval-eval.ts +1 -2
- package/scripts/run-evals.ts +1 -1
- package/scripts/savepoint.sh +97 -50
- package/scripts/validate-content.ts +84 -7
- package/scripts/verify-install.ts +72 -0
- package/src/args.ts +1 -1
- package/src/cli.ts +49 -22
- package/src/frontmatter.ts +3 -3
- package/src/installer.ts +44 -15
- package/src/mission.ts +7 -5
- package/src/targets/claude.ts +20 -3
- package/src/targets/generic.ts +1 -1
- package/src/targets/opencode.ts +53 -11
- package/docs/adoption-guide.md +0 -72
- package/docs/agent-anatomy.md +0 -72
- package/docs/agents.md +0 -53
- package/docs/audit-trail.md +0 -65
- package/docs/claude-setup.md +0 -43
- package/docs/codex-setup.md +0 -26
- package/docs/comparison.md +0 -58
- package/docs/compliance-matrix.md +0 -81
- package/docs/config.md +0 -55
- package/docs/copilot-setup.md +0 -29
- package/docs/cost.md +0 -45
- package/docs/cursor-setup.md +0 -25
- package/docs/developer-onboarding.md +0 -89
- package/docs/enforcement.md +0 -35
- package/docs/execution-model.md +0 -92
- package/docs/gemini-setup.md +0 -27
- package/docs/getting-started.md +0 -158
- package/docs/git-strategy.md +0 -62
- package/docs/harness-matrix.md +0 -41
- package/docs/index.md +0 -56
- package/docs/install-antigravity.md +0 -45
- package/docs/install-claude.md +0 -75
- package/docs/install-cli.md +0 -103
- package/docs/install-codex.md +0 -44
- package/docs/install-copilot.md +0 -45
- package/docs/install-cursor.md +0 -45
- package/docs/install-gemini.md +0 -44
- package/docs/install-kimi.md +0 -45
- package/docs/install-opencode.md +0 -129
- package/docs/install-pi.md +0 -46
- package/docs/install.md +0 -53
- package/docs/lanes.md +0 -82
- package/docs/modes.md +0 -74
- package/docs/opencode-setup.md +0 -54
- package/docs/pr-summary.md +0 -54
- package/docs/rule-based-setup.md +0 -31
- package/docs/skill-anatomy.md +0 -71
- package/docs/skills.md +0 -55
- package/docs/troubleshooting.md +0 -91
- package/docs/windsurf-setup.md +0 -18
- package/docs/workflow.md +0 -89
- package/evals/cases/_no-skill.json +0 -16
- package/evals/cases/adversarial-pressure-fake-pass.json +0 -25
- package/evals/cases/adversarial-pressure-skip-review.json +0 -25
- package/evals/cases/lane-exploratory-vague.json +0 -24
- package/evals/cases/lane-sensitivity-payment.json +0 -24
- package/evals/cases/positive-refactor-existing-tests.json +0 -25
- package/evals/cases/positive-resume-mid-mission.json +0 -24
- package/evals/cases/routing-agent-security.json +0 -25
- package/evals/cases/routing-auth-feature.json +0 -26
- package/evals/cases/routing-backend.json +0 -25
- package/evals/cases/routing-bug-one-file.json +0 -26
- package/evals/cases/routing-claim-audit.json +0 -25
- package/evals/cases/routing-context-budget.json +0 -25
- package/evals/cases/routing-contract-first.json +0 -25
- package/evals/cases/routing-execution.json +0 -25
- package/evals/cases/routing-frontend.json +0 -26
- package/evals/cases/routing-gates.json +0 -25
- package/evals/cases/routing-git.json +0 -25
- package/evals/cases/routing-healing.json +0 -25
- package/evals/cases/routing-lessons.json +0 -25
- package/evals/cases/routing-orchestration.json +0 -25
- package/evals/cases/routing-planning.json +0 -26
- package/evals/cases/routing-pr.json +0 -25
- package/evals/cases/routing-quality.json +0 -25
- package/evals/cases/routing-ship.json +0 -26
- package/evals/cases/routing-sunset.json +0 -25
- package/evals/cases/routing-using-mugiwara.json +0 -25
- package/evals/cases/routing-workflow.json +0 -25
- package/evals/floor.json +0 -6
package/docs/install-gemini.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Gemini CLI Install
|
|
2
|
-
|
|
3
|
-
Mugiwara installs as a Gemini CLI extension.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
gemini extensions install https://github.com/ionivetech/mugiwara
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## How it works
|
|
16
|
-
|
|
17
|
-
Gemini reads `gemini-extension.json` (which points to `GEMINI.md` as the
|
|
18
|
-
context file) and auto-discovers skills from `content/skills/`. The
|
|
19
|
-
`GEMINI.md` file describes the crew and workflow bootstrap.
|
|
20
|
-
|
|
21
|
-
## Verify
|
|
22
|
-
|
|
23
|
-
Ask:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
what mugiwara crew members are available?
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Update
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
gemini extensions update mugiwara
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Uninstall
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
gemini extensions remove mugiwara
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Configuration
|
|
42
|
-
|
|
43
|
-
After install, configure mugiwara in `.mugiwara/config` (project) or
|
|
44
|
-
`~/.mugiwara/config` (global). See [docs/config.md](config.md).
|
package/docs/install-kimi.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Kimi Code Install
|
|
2
|
-
|
|
3
|
-
Mugiwara installs through Kimi Code's plugin system.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- [Kimi Code](https://kimi.moonshot.cn) installed
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
/plugins install https://github.com/ionivetech/mugiwara
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## How it works
|
|
16
|
-
|
|
17
|
-
Kimi Code reads `.kimi-plugin/plugin.json` and auto-discovers skills from
|
|
18
|
-
`content/skills/`.
|
|
19
|
-
|
|
20
|
-
## Verify
|
|
21
|
-
|
|
22
|
-
Ask:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
what mugiwara crew members are available?
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Update
|
|
29
|
-
|
|
30
|
-
Reinstall:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
/plugins install https://github.com/ionivetech/mugiwara
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Uninstall
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
/plugins remove mugiwara
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Configuration
|
|
43
|
-
|
|
44
|
-
After install, configure mugiwara in `.mugiwara/config` (project) or
|
|
45
|
-
`~/.mugiwara/config` (global). See [docs/config.md](config.md).
|
package/docs/install-opencode.md
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# OpenCode Install
|
|
2
|
-
|
|
3
|
-
Mugiwara installs through OpenCode's native npm plugin system.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- [OpenCode](https://opencode.ai) installed
|
|
8
|
-
- Node.js >= 20.11
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
Add to `opencode.json` (global at `~/.config/opencode/opencode.json` or
|
|
13
|
-
project-level at `.opencode/opencode.json`):
|
|
14
|
-
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"$schema": "https://opencode.ai/config.json",
|
|
18
|
-
"plugin": ["@ionivetech/mugiwara"]
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Restart OpenCode.
|
|
23
|
-
|
|
24
|
-
### Pinning a version
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
{ "plugin": ["@ionivetech/mugiwara@^0.5.0"] }
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## How it works
|
|
31
|
-
|
|
32
|
-
The plugin (`mugiwara.mjs`) does three things:
|
|
33
|
-
|
|
34
|
-
1. **Config hook** — registers `content/skills/` as a skills path and
|
|
35
|
-
`content/agents/` as agents so OpenCode discovers the full crew
|
|
36
|
-
(26 skills + 14 agents) without any file copying.
|
|
37
|
-
|
|
38
|
-
2. **System transform hook** — injects the crew announce header and active
|
|
39
|
-
autonomy mode into every session's system prompt.
|
|
40
|
-
|
|
41
|
-
3. **Chat message hook** — intercepts `/mugiwara-mode` commands and
|
|
42
|
-
natural-language mode switches, writing `.mugiwara/config`.
|
|
43
|
-
|
|
44
|
-
Skills are loaded on-demand via OpenCode's native `skill` tool. Agents appear
|
|
45
|
-
as subagents with full config (color, temperature, permissions, step limits).
|
|
46
|
-
|
|
47
|
-
## Verify
|
|
48
|
-
|
|
49
|
-
Ask your agent:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
what mugiwara crew members are available?
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Or type `/mugiwara` to see the crew router.
|
|
56
|
-
|
|
57
|
-
## Update
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm update @ionivetech/mugiwara
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Or bump the version constraint in `opencode.json` and restart.
|
|
64
|
-
|
|
65
|
-
## Uninstall
|
|
66
|
-
|
|
67
|
-
Remove `"@ionivetech/mugiwara"` from the `plugin` array in `opencode.json`,
|
|
68
|
-
then restart OpenCode.
|
|
69
|
-
|
|
70
|
-
## Troubleshooting
|
|
71
|
-
|
|
72
|
-
### Plugin not loading
|
|
73
|
-
|
|
74
|
-
1. Check logs: `opencode --print-logs`
|
|
75
|
-
2. Verify the plugin line in `opencode.json`
|
|
76
|
-
3. Ensure you're on a recent OpenCode version
|
|
77
|
-
|
|
78
|
-
### Server error on startup
|
|
79
|
-
|
|
80
|
-
Fixed in v0.5.3. Ensure you're on the latest:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm update @ionivetech/mugiwara
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
If it persists, file at https://github.com/ionivetech/mugiwara/issues.
|
|
87
|
-
|
|
88
|
-
### Skills not found
|
|
89
|
-
|
|
90
|
-
1. Use the `skill` tool to list available skills
|
|
91
|
-
2. Check the plugin loaded (see "Plugin not loading")
|
|
92
|
-
3. Each skill needs a `SKILL.md` with valid YAML frontmatter (`name`, `description`)
|
|
93
|
-
|
|
94
|
-
### Windows
|
|
95
|
-
|
|
96
|
-
Some Windows OpenCode builds have Bun path issues with npm packages. If the
|
|
97
|
-
plugin won't install, try:
|
|
98
|
-
|
|
99
|
-
```powershell
|
|
100
|
-
npm install @ionivetech/mugiwara --prefix "$HOME\.config\opencode"
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Then use the local path in `opencode.json`:
|
|
104
|
-
|
|
105
|
-
```json
|
|
106
|
-
{ "plugin": ["~/.config/opencode/node_modules/@ionivetech/mugiwara"] }
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Tool mapping
|
|
110
|
-
|
|
111
|
-
Mugiwara skills reference general actions. On OpenCode these map to:
|
|
112
|
-
|
|
113
|
-
| Action | OpenCode tool |
|
|
114
|
-
|--------|---------------|
|
|
115
|
-
| Create a todo | `todowrite` |
|
|
116
|
-
| Dispatch a subagent | `task` with `subagent_type` |
|
|
117
|
-
| Invoke a skill | `skill` |
|
|
118
|
-
| Read a file | `read` |
|
|
119
|
-
| Edit a file | `edit` or `write` |
|
|
120
|
-
| Run a shell command | `bash` |
|
|
121
|
-
| Search code | `grep`, `glob` |
|
|
122
|
-
| Fetch a URL | `webfetch` |
|
|
123
|
-
|
|
124
|
-
## Configuration
|
|
125
|
-
|
|
126
|
-
After install, configure mugiwara in `.mugiwara/config` (project) or
|
|
127
|
-
`~/.mugiwara/config` (global). See [docs/config.md](config.md).
|
|
128
|
-
|
|
129
|
-
Switch autonomy mode at runtime: `/mugiwara-mode guided|semi|auto`
|
package/docs/install-pi.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Pi Install
|
|
2
|
-
|
|
3
|
-
Mugiwara installs as a Pi package.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- [Pi](https://github.com/pi) CLI installed
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pi install git:github.com/ionivetech/mugiwara
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## How it works
|
|
16
|
-
|
|
17
|
-
Pi reads `package.json` `pi` field (`skills: ["./content/skills"]`) and
|
|
18
|
-
loads all 26 skills. The Pi extension (`pi-extension/`) registers runtime
|
|
19
|
-
hooks if present.
|
|
20
|
-
|
|
21
|
-
## Verify
|
|
22
|
-
|
|
23
|
-
Ask:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
what mugiwara crew members are available?
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Update
|
|
30
|
-
|
|
31
|
-
Reinstall with the same command:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
pi install git:github.com/ionivetech/mugiwara
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Uninstall
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
pi remove mugiwara
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Configuration
|
|
44
|
-
|
|
45
|
-
After install, configure mugiwara in `.mugiwara/config` (project) or
|
|
46
|
-
`~/.mugiwara/config` (global). See [docs/config.md](config.md).
|
package/docs/install.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Install Mugiwara
|
|
2
|
-
|
|
3
|
-
Mugiwara installs as a native plugin on every supported platform. Pick your
|
|
4
|
-
platform below for detailed instructions.
|
|
5
|
-
|
|
6
|
-
Requires **Node.js >= 20.11** on the host machine.
|
|
7
|
-
|
|
8
|
-
## Platforms
|
|
9
|
-
|
|
10
|
-
| Platform | Install doc | Native plugin? |
|
|
11
|
-
|----------|-------------|:---:|
|
|
12
|
-
| Claude Code | [install-claude](install-claude.md) | ✅ |
|
|
13
|
-
| OpenCode | [install-opencode](install-opencode.md) | ✅ |
|
|
14
|
-
| Gemini CLI | [install-gemini](install-gemini.md) | ✅ |
|
|
15
|
-
| Codex | [install-codex](install-codex.md) | ✅ |
|
|
16
|
-
| GitHub Copilot | [install-copilot](install-copilot.md) | ✅ |
|
|
17
|
-
| Cursor | [install-cursor](install-cursor.md) | ✅ |
|
|
18
|
-
| Antigravity | [install-antigravity](install-antigravity.md) | ✅ |
|
|
19
|
-
| Kimi Code | [install-kimi](install-kimi.md) | ✅ |
|
|
20
|
-
| Pi | [install-pi](install-pi.md) | ✅ |
|
|
21
|
-
| Windsurf / Cline / Kilo | [install-cli](install-cli.md) | CLI-based |
|
|
22
|
-
|
|
23
|
-
## One-liner
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# macOS / Linux
|
|
27
|
-
curl -fsSL https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.sh | bash
|
|
28
|
-
# Windows
|
|
29
|
-
irm https://raw.githubusercontent.com/ionivetech/mugiwara/main/scripts/install.ps1 | iex
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Global CLI
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npm i -g @ionivetech/mugiwara
|
|
36
|
-
mugiwara install --target all --yes
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Verify
|
|
40
|
-
|
|
41
|
-
On any platform, ask:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
what mugiwara crew members are available?
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Configuration
|
|
48
|
-
|
|
49
|
-
See [docs/config.md](config.md) for all `.mugiwara/config` options.
|
|
50
|
-
|
|
51
|
-
## Report issues
|
|
52
|
-
|
|
53
|
-
https://github.com/ionivetech/mugiwara/issues
|
package/docs/lanes.md
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Lanes & Sizing
|
|
2
|
-
|
|
3
|
-
The crew sizes a mission before it runs. Lane is computed from the diff by
|
|
4
|
-
`scripts/lane.sh` — deterministic, not estimated.
|
|
5
|
-
|
|
6
|
-
## The lanes
|
|
7
|
-
|
|
8
|
-
| Lane | Picks when | Waves | Token budget |
|
|
9
|
-
|------|-----------|-------|:------:|
|
|
10
|
-
| **0 · Direct** | typo, rename, 1 file <20 LOC | none | ~0 |
|
|
11
|
-
| **1 · Lean** | bug in 1-2 files, <50 LOC | execute → quality | ~4k |
|
|
12
|
-
| **2 · Standard** | feature, 3-8 files | plan → execute → audit → review | ~10k |
|
|
13
|
-
| **3 · Full** | architecture, migration, 9+ files, or auth/payment/API touched | all 9 waves | ~20k |
|
|
14
|
-
| **4 · Spike** | exploratory, needs direction | brainstorm → re-triage | ~3k |
|
|
15
|
-
|
|
16
|
-
## How lane is computed
|
|
17
|
-
|
|
18
|
-
`scripts/lane.sh <base-ref>` runs `git diff --name-only` against the base ref
|
|
19
|
-
and applies deterministic rules:
|
|
20
|
-
|
|
21
|
-
| Diff | Lane |
|
|
22
|
-
|------|------|
|
|
23
|
-
| 0 files changed | Direct |
|
|
24
|
-
| 1 file, <20 LOC added | Direct |
|
|
25
|
-
| 1 file, ≥20 LOC added | Lean |
|
|
26
|
-
| 2 files | Lean |
|
|
27
|
-
| 3–8 files | Standard |
|
|
28
|
-
| 9+ files | Full |
|
|
29
|
-
|
|
30
|
-
**Sensitive path escalation.** Files matching these patterns always escalate to
|
|
31
|
-
Lane 3 (Full), regardless of file count:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
auth/ payment/ billing/ crypto/ secrets/ .env
|
|
35
|
-
migration/ .sql schema. .prisma .terraform .tf
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Use `--json` for machine output:
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"lane": "full",
|
|
43
|
-
"reason": "sensitive paths (src/auth/login.ts) — escalated from standard",
|
|
44
|
-
"files_touched": 5,
|
|
45
|
-
"sensitive_paths": ["src/auth/login.ts"],
|
|
46
|
-
"base": "main"
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Token budget
|
|
51
|
-
|
|
52
|
-
Every lane has a budget enforced by `scripts/savepoint.sh` at each wave
|
|
53
|
-
boundary. The harness sets `MUGIWARA_TOKENS` env var with estimated tokens
|
|
54
|
-
consumed.
|
|
55
|
-
|
|
56
|
-
| Status | Condition | Action |
|
|
57
|
-
|--------|-----------|--------|
|
|
58
|
-
| ok | tokens < 1.5× budget | Continue |
|
|
59
|
-
| warn | tokens ≥ 1.5× budget | Log warning to decision log |
|
|
60
|
-
| stop | tokens ≥ 3× budget | Write state, report to user, pause mission |
|
|
61
|
-
|
|
62
|
-
Budget guidance, not a hard kill switch. The model decides whether to stop —
|
|
63
|
-
savepoint just writes the status to `state.json`.
|
|
64
|
-
|
|
65
|
-
## Escalation
|
|
66
|
-
|
|
67
|
-
Lane **escalates when work outgrows the estimate.** At every wave boundary,
|
|
68
|
-
`scripts/savepoint.sh` re-checks the diff. If files grew or a sensitive path
|
|
69
|
-
appeared, lane rises. A lane **never auto-drops.** Under-process costs more
|
|
70
|
-
than over-process.
|
|
71
|
-
|
|
72
|
-
Manual escalation: if the user says "this is bigger than I thought — run the
|
|
73
|
-
full pipeline," Luffy records it in the decision log and escalates.
|
|
74
|
-
|
|
75
|
-
## SPIKE lane (Lane 4)
|
|
76
|
-
|
|
77
|
-
Exploratory missions start at Lane 4. Usopp brainstorms, then the mission is
|
|
78
|
-
re-triaged into the right lane. A spike that stays a spike (no code change
|
|
79
|
-
decided) ends at Wave 1.
|
|
80
|
-
|
|
81
|
-
Lane is computed per mission by `scripts/lane.sh`, not stored in
|
|
82
|
-
`.mugiwara/config`.
|
package/docs/modes.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
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.
|
package/docs/opencode-setup.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
**Update** — bump the package version in the `plugin` array (or `mugiwara update`).
|
|
31
|
-
|
|
32
|
-
**Uninstall** — remove the entry from the array.
|
|
33
|
-
|
|
34
|
-
## What you get
|
|
35
|
-
|
|
36
|
-
- 32 skills in `.opencode/skills/` (project) or `~/.config/opencode/skills/`
|
|
37
|
-
(global).
|
|
38
|
-
- 14 agents registered as subagents via the plugin.
|
|
39
|
-
- The plugin announces the crew at session start and injects the inline
|
|
40
|
-
execution model into the system prompt.
|
|
41
|
-
|
|
42
|
-
## Use it
|
|
43
|
-
|
|
44
|
-
The workflow **auto-activates** — at session start the crew is announced, and a
|
|
45
|
-
non-trivial request runs the pipeline by itself. `/using-mugiwara` is an
|
|
46
|
-
optional explicit router if you want to hand-route a mission:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
> add dark mode to the settings page
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Restart opencode after installing — config is loaded once at startup. The crew
|
|
53
|
-
runs inline in your main conversation; subagents only for `[PARALLEL]` batches
|
|
54
|
-
and background checks. You never need to click into a subagent to see progress.
|
package/docs/pr-summary.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# PR summary (closure handoff)
|
|
2
|
-
|
|
3
|
-
At the end of a mission the crew pushes the branch and **stops** — it never
|
|
4
|
-
creates a PR, in any mode. What you get instead is a ready-to-paste **PR
|
|
5
|
-
summary** so you can open the pull request without writing a description.
|
|
6
|
-
|
|
7
|
-
This mirrors the reference workflows (superpowers `finishing-a-development-branch`,
|
|
8
|
-
agent-skills): the integration decision stays with the human. Mugiwara's
|
|
9
|
-
addition is that the PR description is already written.
|
|
10
|
-
|
|
11
|
-
## What happens at the terminal
|
|
12
|
-
|
|
13
|
-
1. Save-point commit → push the mission branch with plain `git push -u origin <branch>`.
|
|
14
|
-
2. Write `.mugiwara/results/YYYY-MM-DD-<mission>-pr-verdict.md` per `mugiwara-pr` —
|
|
15
|
-
it includes the **PR summary block** (copy-paste title + body).
|
|
16
|
-
3. Hand the branch + verdict file to you. You open the PR and paste the block.
|
|
17
|
-
|
|
18
|
-
No `gh` CLI, no PR API calls, no auto-reaction to review comments or CI.
|
|
19
|
-
|
|
20
|
-
## The PR summary block
|
|
21
|
-
|
|
22
|
-
The verdict file's PR summary is shaped by `.mugiwara/config` (project) /
|
|
23
|
-
`~/.mugiwara/config` (global):
|
|
24
|
-
|
|
25
|
-
| Key | Default | What it shapes |
|
|
26
|
-
|-----|---------|----------------|
|
|
27
|
-
| `base` | `main` | The target branch named in the PR summary |
|
|
28
|
-
|
|
29
|
-
Example:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
mode=guided
|
|
33
|
-
branch=feature/{type}-{issue}-{slug}
|
|
34
|
-
commit=conventional
|
|
35
|
-
base=main
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
The title is a concise `{type}: {summary}` line from mission metadata; the body
|
|
39
|
-
is the verdict-file PR summary block (what changed, evidence, checks). The
|
|
40
|
-
summary is **material, never posted** — the crew's job ends at push.
|
|
41
|
-
|
|
42
|
-
## Why no auto-create
|
|
43
|
-
|
|
44
|
-
- PR creation is an external, irreversible side effect (public artifact, CI
|
|
45
|
-
trigger, reviewer notifications) — keeping it human avoids surprise and
|
|
46
|
-
security surface.
|
|
47
|
-
- The crew never needs forge credentials (`gh` auth, API tokens), so there is
|
|
48
|
-
nothing to leak and nothing to configure.
|
|
49
|
-
- The stop-at-PR invariant holds in every mode: no auto-reaction to review
|
|
50
|
-
comments, no auto-healing CI, no merge, no deploy.
|
|
51
|
-
|
|
52
|
-
See [`mugiwara-pr`](../content/skills/mugiwara-pr/SKILL.md) for the terminal
|
|
53
|
-
procedure and [`mugiwara-mode`](../content/skills/mugiwara-mode/SKILL.md) for
|
|
54
|
-
the mode contract.
|
package/docs/rule-based-setup.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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.
|
package/docs/skill-anatomy.md
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Skill Anatomy
|
|
2
|
-
|
|
3
|
-
Every mugiwara skill is a single `SKILL.md` file. No code, no runtime — just
|
|
4
|
-
frontmatter plus a playbook the agent follows.
|
|
5
|
-
|
|
6
|
-
## File structure
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
skills/<skill-name>/SKILL.md
|
|
10
|
-
skills/<skill-name>/references/<topic>.md # optional: overflow detail
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```markdown
|
|
14
|
-
---
|
|
15
|
-
name: mugiwara-checkpoint
|
|
16
|
-
description: Use after an execution wave to audit results against the plan.
|
|
17
|
-
---
|
|
18
|
-
# Checkpoint (Chopper)
|
|
19
|
-
|
|
20
|
-
<playbook body>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Frontmatter
|
|
24
|
-
|
|
25
|
-
| Field | Required | Notes |
|
|
26
|
-
|-------|----------|-------|
|
|
27
|
-
| `name` | yes | lowercase, hyphen-separated, matches folder name, ≤64 chars |
|
|
28
|
-
| `description` | yes | 20–500 chars; trigger conditions + disambiguators only. Front-load trigger keywords. |
|
|
29
|
-
| `license`/`compatibility`/`metadata` | no | optional |
|
|
30
|
-
|
|
31
|
-
## Playbook body
|
|
32
|
-
|
|
33
|
-
1. **Title + one-line identity** — role name and what it does/doesn't do.
|
|
34
|
-
2. **Skip when** — required. ≤4 bullets, numeric threshold. Validator fails
|
|
35
|
-
build without it.
|
|
36
|
-
3. **Protocol** — numbered steps, exact commands, exact file paths.
|
|
37
|
-
4. **Decision tables** — signal → action.
|
|
38
|
-
5. **Iron law** — one memorable non-negotiable line.
|
|
39
|
-
6. **Common rationalizations** — excuses + correct reply.
|
|
40
|
-
7. **Red flags** — stop conditions + what to do.
|
|
41
|
-
|
|
42
|
-
## Style rules
|
|
43
|
-
|
|
44
|
-
- **Evidence over claims.** Say what to run, never what to assume.
|
|
45
|
-
- **Concrete, never aspirational.** Exact paths, exact commands.
|
|
46
|
-
- **≤120 lines.** Grow beyond → split or move to `references/`.
|
|
47
|
-
- **Progressive disclosure.** Sections >15–20 lines move to
|
|
48
|
-
`references/<topic>.md`; body gets a one-line pointer saying what to read
|
|
49
|
-
and why.
|
|
50
|
-
- **220-char description ceiling.** Descriptions carry trigger vocabulary, not
|
|
51
|
-
procedure. Procedure belongs in the body.
|
|
52
|
-
|
|
53
|
-
## Three-layer discipline
|
|
54
|
-
|
|
55
|
-
| Stays in body | Moves to references |
|
|
56
|
-
|---------------|---------------------|
|
|
57
|
-
| Skip when, red flags, rationalizations | Worked examples |
|
|
58
|
-
| "Never do X" rules | Long checklists |
|
|
59
|
-
| Step order, decision trees | Reference tables, edge cases, templates |
|
|
60
|
-
|
|
61
|
-
Test: body = what changes behavior on every run. References = what you open
|
|
62
|
-
after deciding to do the work.
|
|
63
|
-
|
|
64
|
-
## Validation
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
bun run validate
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Checks: name matches folder, description 20–500 chars, body ≤120 lines, no
|
|
71
|
-
duplicate names, `## Skip when` block with 1–4 bullets.
|