@ionivetech/mugiwara 0.5.2 → 0.5.3

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 (53) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +18 -0
  3. package/.claude-plugin/plugin.json +64 -0
  4. package/.claude-plugin/sync.sh +18 -0
  5. package/.codex-plugin/plugin.json +18 -0
  6. package/.cursor-plugin/plugin.json +19 -0
  7. package/.kimi-plugin/plugin.json +18 -0
  8. package/.opencode/commands/mugiwara.md +13 -7
  9. package/.opencode/commands/using-mugiwara.md +26 -0
  10. package/.opencode/plugins/mugiwara-helpers.mjs +90 -0
  11. package/.opencode/plugins/mugiwara.mjs +6 -99
  12. package/AGENTS.md +183 -0
  13. package/GEMINI.md +12 -0
  14. package/README.md +86 -56
  15. package/content/agents/luffy-orchestrator.md +1 -1
  16. package/content/agents/zoro-execution.md +1 -1
  17. package/content/skills/mugiwara-execution/SKILL.md +2 -5
  18. package/content/skills/{mugiwara-proof-order/SKILL.md → mugiwara-execution/references/tdd.md} +4 -7
  19. package/content/skills/using-mugiwara/SKILL.md +52 -0
  20. package/dist/mugiwara.js +0 -1
  21. package/docs/adoption-guide.md +1 -1
  22. package/docs/agents.md +5 -3
  23. package/docs/claude-setup.md +1 -1
  24. package/docs/developer-onboarding.md +1 -1
  25. package/docs/getting-started.md +1 -1
  26. package/docs/index.md +1 -1
  27. package/docs/install-antigravity.md +45 -0
  28. package/docs/install-claude.md +75 -0
  29. package/docs/install-cli.md +103 -0
  30. package/docs/install-codex.md +44 -0
  31. package/docs/install-copilot.md +45 -0
  32. package/docs/install-cursor.md +45 -0
  33. package/docs/install-gemini.md +44 -0
  34. package/docs/install-kimi.md +45 -0
  35. package/docs/install-opencode.md +129 -0
  36. package/docs/install-pi.md +46 -0
  37. package/docs/install.md +53 -0
  38. package/docs/opencode-setup.md +1 -1
  39. package/docs/skills.md +1 -1
  40. package/evals/cases/routing-claim-audit.json +1 -1
  41. package/evals/cases/routing-using-mugiwara.json +25 -0
  42. package/evals/floor.json +1 -1
  43. package/gemini-extension.json +6 -0
  44. package/hooks/hooks.json +11 -0
  45. package/hooks/mugiwara-mode-tracker.ts +80 -0
  46. package/hooks/session-start.ts +1 -1
  47. package/package.json +13 -2
  48. package/plugin.json +15 -0
  49. package/src/targets/opencode.ts +0 -1
  50. package/.opencode/commands/mugiwara-mode.md +0 -6
  51. package/content/agents/using-mugiwara.md +0 -44
  52. package/content/skills/mugiwara-proof-order/references/proof-order-examples.md +0 -62
  53. package/evals/cases/routing-proof-order.json +0 -25
@@ -0,0 +1,44 @@
1
+ # Codex Install
2
+
3
+ Mugiwara installs as a native Codex plugin.
4
+
5
+ ## Prerequisites
6
+
7
+ - [Codex](https://github.com/openai/codex) CLI or app installed
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ codex plugin marketplace add ionivetech/mugiwara && codex plugin add mugiwara@mugiwara
13
+ ```
14
+
15
+ ## How it works
16
+
17
+ Codex reads `.codex-plugin/plugin.json` which references `content/skills/`.
18
+ All 26 skills are auto-discovered. Agents come from `content/agents/` via the
19
+ `agents/` symlink.
20
+
21
+ ## Verify
22
+
23
+ Ask:
24
+
25
+ ```
26
+ what mugiwara crew members are available?
27
+ ```
28
+
29
+ ## Update
30
+
31
+ ```bash
32
+ codex plugin update mugiwara
33
+ ```
34
+
35
+ ## Uninstall
36
+
37
+ ```bash
38
+ codex plugin 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).
@@ -0,0 +1,45 @@
1
+ # GitHub Copilot Install
2
+
3
+ Mugiwara installs as a Copilot plugin directly from the GitHub repo.
4
+
5
+ ## Prerequisites
6
+
7
+ - [GitHub Copilot](https://docs.github.com/en/copilot) extension installed
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ copilot plugin install https://github.com/ionivetech/mugiwara
13
+ ```
14
+
15
+ ## How it works
16
+
17
+ Copilot clones the repo and auto-discovers skills from `content/skills/`
18
+ and agents from `content/agents/`.
19
+
20
+ ## Verify
21
+
22
+ Ask:
23
+
24
+ ```
25
+ what mugiwara crew members are available?
26
+ ```
27
+
28
+ ## Update
29
+
30
+ Reinstall with the same command:
31
+
32
+ ```bash
33
+ copilot plugin install https://github.com/ionivetech/mugiwara
34
+ ```
35
+
36
+ ## Uninstall
37
+
38
+ ```bash
39
+ copilot plugin uninstall 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).
@@ -0,0 +1,45 @@
1
+ # Cursor Install
2
+
3
+ Mugiwara installs through Cursor's plugin marketplace.
4
+
5
+ ## Prerequisites
6
+
7
+ - [Cursor](https://cursor.com) installed
8
+
9
+ ## Install
10
+
11
+ ```
12
+ /add-plugin mugiwara
13
+ ```
14
+
15
+ ## How it works
16
+
17
+ Cursor reads `.cursor-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
+ Re-run:
31
+
32
+ ```
33
+ /add-plugin mugiwara
34
+ ```
35
+
36
+ ## Uninstall
37
+
38
+ ```
39
+ /remove-plugin 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).
@@ -0,0 +1,44 @@
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).
@@ -0,0 +1,45 @@
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).
@@ -0,0 +1,129 @@
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`
@@ -0,0 +1,46 @@
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).
@@ -0,0 +1,53 @@
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
@@ -35,7 +35,7 @@ npx @ionivetech/mugiwara@latest --project ./my-app --target opencode --yes
35
35
 
36
36
  - 32 skills in `.opencode/skills/` (project) or `~/.config/opencode/skills/`
37
37
  (global).
38
- - 15 agents registered as subagents via the plugin.
38
+ - 14 agents registered as subagents via the plugin.
39
39
  - The plugin announces the crew at session start and injects the inline
40
40
  execution model into the system prompt.
41
41
 
package/docs/skills.md CHANGED
@@ -35,7 +35,7 @@ it embodies a role.
35
35
 
36
36
  | Skill | Teaches |
37
37
  |-------|---------|
38
- | `mugiwara-proof-order` | RED-GREEN-REFACTORproof value from WHEN the test runs, not that it exists |
38
+ | `using-mugiwara` | Front-door router explains the crew, classifies missions, routes to specialist |
39
39
  | `mugiwara-root-cause` | 4-phase: reproduce → localize → reduce → fix + guard; stop-the-line |
40
40
  | `mugiwara-contract-first` | Contract-first design, error semantics, boundary validation, backward compatibility |
41
41
  | `mugiwara-claim-audit` | Adversarial verification: CLAIM → EXTRACT → DOUBT → RECONCILE → STOP |
@@ -5,7 +5,7 @@
5
5
  "positive": [
6
6
  { "prompt": "verify this claim before we proceed, it could be wrong", "top_k": 3 },
7
7
  { "prompt": "the agent says the fix is done but I want to double-check", "top_k": 3 },
8
- { "prompt": "audit this in-flight decision before we commit to it", "top_k": 3 }
8
+ { "prompt": "skeptically verify this claim and doubt every assertion the model made", "top_k": 3 }
9
9
  ],
10
10
  "negative": [
11
11
  { "prompt": "run the test suite to make sure nothing is broken" },
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "routing-using-mugiwara",
3
+ "skill": "using-mugiwara",
4
+ "trigger": {
5
+ "positive": [
6
+ { "prompt": "how do I use mugiwara to accomplish a task?", "top_k": 3 },
7
+ { "prompt": "what crew members are available?", "top_k": 3 },
8
+ { "prompt": "route this task to the right specialist", "top_k": 3 }
9
+ ],
10
+ "negative": [
11
+ { "prompt": "what does git status do?" },
12
+ { "prompt": "run npm install for me" }
13
+ ]
14
+ },
15
+ "behavioral": [
16
+ {
17
+ "task": "Explain how mugiwara works and route a simple task.",
18
+ "rubric": [
19
+ "explains the crew structure",
20
+ "classifies the task correctly",
21
+ "routes to the right specialist"
22
+ ]
23
+ }
24
+ ]
25
+ }
package/evals/floor.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "rank1": 88.2,
3
- "topk": 100,
3
+ "topk": 98.7,
4
4
  "negatives": 100,
5
5
  "updated": "2026-08-11"
6
6
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "mugiwara",
3
+ "version": "0.5.3",
4
+ "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing.",
5
+ "contextFileName": "GEMINI.md"
6
+ }
package/hooks/hooks.json CHANGED
@@ -10,6 +10,17 @@
10
10
  }
11
11
  ]
12
12
  }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/mugiwara-mode-tracker.ts",
20
+ "timeout": 5
21
+ }
22
+ ]
23
+ }
13
24
  ]
14
25
  }
15
26
  }
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env bun
2
+ // hooks/mugiwara-mode-tracker.ts — UserPromptSubmit hook: intercepts
3
+ // /mugiwara <mode> commands in Claude Code chat and writes .mugiwara/config.
4
+ // Same logic as the OpenCode plugin's chat.message hook, standalone for
5
+ // Claude Code's hook process model.
6
+ //
7
+ // Input: JSON on stdin with { prompt: "..." }
8
+ // Output: JSON on stdout with { prompt: "..." } (pass-through)
9
+
10
+ const VALID_MODES = new Set(['guided', 'semi', 'auto']);
11
+
12
+ function parseModeChange(promptRaw: string): string | null {
13
+ if (typeof promptRaw !== 'string') return null;
14
+ let prompt = promptRaw.trim();
15
+ const wrapped = /^(["'`])([\s\S]*)\1$/.exec(prompt);
16
+ if (wrapped) prompt = wrapped[2].trim();
17
+ prompt = prompt.toLowerCase();
18
+ if (!prompt) return null;
19
+
20
+ const tplSet = /^(?:set |)mugiwara mode:[ \t]*(\S*)/.exec(prompt);
21
+ if (tplSet && VALID_MODES.has(tplSet[1])) return tplSet[1];
22
+
23
+ const slashMode = /^\/(?:mugiwara[-\s]?)?mode[ \t]+(\S*)/.exec(prompt);
24
+ if (slashMode && VALID_MODES.has(slashMode[1])) return slashMode[1];
25
+
26
+ const slashMain = /^\/mugiwara[ \t]+(\S*)/.exec(prompt);
27
+ if (slashMain && VALID_MODES.has(slashMain[1])) return slashMain[1];
28
+
29
+ const natural = /^mugiwara mode[ \t]+(\S*)/.exec(prompt);
30
+ if (natural && VALID_MODES.has(natural[1])) return natural[1];
31
+
32
+ return null;
33
+ }
34
+
35
+ import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync } from 'node:fs';
36
+ import { homedir, tmpdir } from 'node:os';
37
+ import { dirname, join } from 'node:path';
38
+
39
+ function applyModeChange(mode: string) {
40
+ if (!VALID_MODES.has(mode)) return;
41
+ const cwd = process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
42
+ const dir = join(cwd, '.mugiwara');
43
+ const file = join(dir, 'config');
44
+ mkdirSync(dir, { recursive: true });
45
+ const lines: string[] = [];
46
+ if (existsSync(file)) {
47
+ for (const line of readFileSync(file, 'utf8').split(/\r?\n/)) {
48
+ const t = line.trim();
49
+ if (t.startsWith('mode=')) continue;
50
+ lines.push(line);
51
+ }
52
+ }
53
+ lines.push(`mode=${mode}`);
54
+ const body = lines.filter((_l, i) => !(lines[i] === '' && (i === lines.length - 1 || i === 0))).join('\n') + '\n';
55
+ const tmp = join(tmpdir(), `mugiwara-config-${process.pid}-${Date.now()}.tmp`);
56
+ writeFileSync(tmp, body);
57
+ renameSync(tmp, file);
58
+ }
59
+
60
+ // main
61
+ async function main() {
62
+ let input = '';
63
+ for await (const chunk of process.stdin) input += chunk;
64
+ if (!input.trim()) { process.stdout.write(JSON.stringify({ prompt: '' })); return; }
65
+
66
+ let parsed: { prompt?: string };
67
+ try { parsed = JSON.parse(input); } catch { parsed = { prompt: input }; }
68
+ const prompt = parsed.prompt ?? '';
69
+
70
+ const change = parseModeChange(prompt);
71
+ if (change) applyModeChange(change);
72
+
73
+ // pass-through — always return the prompt unchanged
74
+ process.stdout.write(JSON.stringify({ prompt }));
75
+ }
76
+
77
+ main().catch(() => {
78
+ // silent — hook must never block the conversation
79
+ process.stdout.write(JSON.stringify({ prompt: '' }));
80
+ });
@@ -3,6 +3,6 @@
3
3
  console.log(
4
4
  JSON.stringify({
5
5
  additionalContext:
6
- "Mugiwara crew available. The workflow auto-activates for non-trivial requests (no need to call `/using-mugiwara` at session start; it is optional and routes to the right crew member). The crew runs inline in the main thread — Never Task-dispatch a crew member. Subagents only for [PARALLEL] task batches, concurrent review/security, and independent re-run checks. Checkpoint reports at wave/stage boundaries. Mode: guided / semi / auto (see .mugiwara/config). See skills/mugiwara-workflow."
6
+ "Mugiwara crew available. The workflow auto-activates for non-trivial requests (no need to call `/using-mugiwara` at session start; it is optional and routes to the right crew member). The crew runs inline in the main thread — Never Task-dispatch a crew member. Subagents only for [PARALLEL] task batches, concurrent review/security, and independent re-run checks. Checkpoint reports at wave/stage boundaries. Mode: guided / semi / auto (see .mugiwara/config). Switch with `/mugiwara <mode>`. See skills/mugiwara-workflow."
7
7
  })
8
8
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionivetech/mugiwara",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, self-healing. Installs into Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, pi, Windsurf, Cline, Kilo, Antigravity.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,7 +22,16 @@
22
22
  "evals",
23
23
  "scripts",
24
24
  ".opencode",
25
+ ".claude-plugin",
26
+ ".codex-plugin",
27
+ ".cursor-plugin",
28
+ ".kimi-plugin",
29
+ ".agents",
25
30
  "hooks",
31
+ "gemini-extension.json",
32
+ "GEMINI.md",
33
+ "AGENTS.md",
34
+ "plugin.json",
26
35
  "README.md",
27
36
  "LICENSE"
28
37
  ],
@@ -43,7 +52,8 @@
43
52
  "evals": "bun scripts/run-evals.ts",
44
53
  "retrieval-eval": "bun scripts/retrieval-eval.ts",
45
54
  "sync-version": "bun scripts/sync-version.ts",
46
- "gate": "bun run typecheck && bun run test && bun run build && bun scripts/validate-content.ts --check-manifest --check-docs && bun scripts/run-evals.ts && bun scripts/retrieval-eval.ts",
55
+ "gate": "bun run typecheck && bun run test && bun run build && bun scripts/validate-content.ts --check-manifest --check-docs && bun run verify-pack && bun scripts/run-evals.ts && bun scripts/retrieval-eval.ts",
56
+ "verify-pack": "npm pack --dry-run 2>&1 | grep -q 'ionivetech-mugiwara' && echo '✓ npm package clean' || (echo '✗ npm pack failed' && exit 1)",
47
57
  "prepack": "bun run build && bun run sync-version"
48
58
  },
49
59
  "keywords": [
@@ -66,6 +76,7 @@
66
76
  ],
67
77
  "devDependencies": {
68
78
  "@types/node": "^26.2.0",
79
+ "@vitest/coverage-v8": "^4.1.10",
69
80
  "typescript": "^7.0.2",
70
81
  "vitest": "^4.1.10"
71
82
  }