@ionivetech/mugiwara 0.6.0 → 0.6.2

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 (54) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.cursor-plugin/plugin.json +1 -1
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/.opencode/commands/mugiwara-onboard.md +15 -0
  7. package/.opencode/mugiwara-helpers.mjs +24 -0
  8. package/.opencode/plugins/mugiwara.mjs +16 -7
  9. package/AGENTS.md +1 -1
  10. package/README.md +118 -63
  11. package/content/agents/luffy-orchestrator.md +14 -4
  12. package/content/agents/onboarding-guide.md +24 -45
  13. package/content/agents/zoro-execution.md +4 -0
  14. package/content/skills/mugiwara-backend/SKILL.md +1 -1
  15. package/content/skills/mugiwara-brainstorm/SKILL.md +7 -0
  16. package/content/skills/mugiwara-checkpoint/SKILL.md +1 -1
  17. package/content/skills/mugiwara-claim-audit/SKILL.md +1 -1
  18. package/content/skills/mugiwara-execution/SKILL.md +44 -44
  19. package/content/skills/mugiwara-execution/references/dispatch.md +42 -0
  20. package/content/skills/mugiwara-frontend/SKILL.md +1 -1
  21. package/content/skills/mugiwara-healing/SKILL.md +1 -1
  22. package/content/skills/mugiwara-orchestration/SKILL.md +50 -49
  23. package/content/skills/mugiwara-orchestration/references/check-ins.md +34 -0
  24. package/content/skills/mugiwara-orchestration/references/closure.md +34 -0
  25. package/content/skills/mugiwara-orchestration/references/triage-escalation.md +12 -11
  26. package/content/skills/mugiwara-planning/SKILL.md +6 -0
  27. package/content/skills/mugiwara-pr/SKILL.md +18 -8
  28. package/content/skills/mugiwara-quality/SKILL.md +7 -0
  29. package/content/skills/mugiwara-ship/SKILL.md +11 -9
  30. package/content/skills/mugiwara-sunset/SKILL.md +1 -1
  31. package/content/skills/mugiwara-testcases/SKILL.md +7 -0
  32. package/content/skills/mugiwara-workflow/SKILL.md +4 -2
  33. package/content/skills/mugiwara-workflow/references/workspace-layout.md +7 -6
  34. package/content/skills/using-mugiwara/SKILL.md +11 -1
  35. package/dist/mugiwara.js +186 -13
  36. package/gemini-extension.json +1 -1
  37. package/hooks/mugiwara-mode-tracker.ts +0 -0
  38. package/hooks/session-start.ts +0 -0
  39. package/package.json +1 -1
  40. package/plugin.json +1 -1
  41. package/scripts/evidence.sh +16 -1
  42. package/scripts/gate-selftest.ts +52 -1
  43. package/scripts/initiative.ts +34 -20
  44. package/scripts/lane.sh +4 -2
  45. package/scripts/mission-report.sh +152 -29
  46. package/scripts/onboard.ts +3 -29
  47. package/scripts/release-notes.ts +152 -75
  48. package/scripts/savepoint.sh +67 -15
  49. package/scripts/validate-content.ts +20 -0
  50. package/src/cli.ts +20 -3
  51. package/src/installer.ts +37 -1
  52. package/src/mission.ts +108 -1
  53. package/src/targets/claude.ts +29 -8
  54. package/src/targets/opencode.ts +12 -8
@@ -5,13 +5,13 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "The Straw Hat crew for AI agents",
8
- "version": "0.6.0"
8
+ "version": "0.6.2"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "mugiwara",
13
13
  "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing.",
14
- "version": "0.6.0",
14
+ "version": "0.6.2",
15
15
  "source": "./"
16
16
  }
17
17
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mugiwara",
3
3
  "displayName": "Mugiwara",
4
- "version": "0.6.0",
4
+ "version": "0.6.2",
5
5
  "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing.",
6
6
  "author": {
7
7
  "name": "ionivetech"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mugiwara",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing.",
5
5
  "author": {
6
6
  "name": "ionivetech"
@@ -2,7 +2,7 @@
2
2
  "name": "mugiwara",
3
3
  "displayName": "Mugiwara",
4
4
  "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing.",
5
- "version": "0.6.0",
5
+ "version": "0.6.2",
6
6
  "author": {
7
7
  "name": "ionivetech"
8
8
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mugiwara",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing.",
5
5
  "author": {
6
6
  "name": "ionivetech"
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Run the Mugiwara onboarding wizard — conversation via the onboarding-guide agent, or the terminal wizard (bun scripts/onboard.ts) for CLI users.
3
+ ---
4
+ Mugiwara onboard: $ARGUMENTS
5
+
6
+ Run the onboarding wizard. Two paths:
7
+
8
+ 1. Conversation (default): the onboarding-guide agent runs the 9-question
9
+ wizard through the host's native question tool (choices + free type),
10
+ then writes .mugiwara/config. No network.
11
+ 2. Terminal (CLI users / non-interactive hosts):
12
+ `bun scripts/onboard.ts`
13
+
14
+ The wizard never writes .mugiwara/onboard.json. All 15 crew agents are always
15
+ active — no agent-selection step.
@@ -88,3 +88,27 @@ export function applyModeChange(mode, { projectDir = process.cwd(), home = homed
88
88
  mkdirSync(dirname(log), { recursive: true });
89
89
  appendFileSync(log, `| ${new Date().toISOString()} | mode flip | guided/semi/auto -> ${mode} | user |\n`);
90
90
  }
91
+
92
+ export const DEFAULT_CONFIG_LINES = [
93
+ 'mode=guided',
94
+ 'branch=feature/{type}-{issue}-{slug}',
95
+ 'commit=conventional',
96
+ 'base=main',
97
+ 'coverage_new=90',
98
+ 'coverage_modified=80',
99
+ 'review_depth=full',
100
+ 'quality_depth=full',
101
+ ];
102
+
103
+ // Idempotent: writes the full default config only when .mugiwara/config is
104
+ // absent (a fresh repo's first use). Never overwrites an existing config —
105
+ // mode=guided is the safe default; the user's later edits win.
106
+ export function ensureDefaultConfig({ projectDir = process.cwd() } = {}) {
107
+ const dir = join(projectDir, '.mugiwara');
108
+ const file = join(dir, 'config');
109
+ if (existsSync(file)) return false;
110
+ assertNotSymlink(file);
111
+ mkdirSync(dir, { recursive: true });
112
+ writeFileSync(file, DEFAULT_CONFIG_LINES.join('\n') + '\n');
113
+ return true;
114
+ }
@@ -14,7 +14,7 @@
14
14
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
15
15
  import { dirname, join } from 'node:path';
16
16
  import { fileURLToPath } from 'node:url';
17
- import { readMode, parseModeChange, applyModeChange } from '../mugiwara-helpers.mjs';
17
+ import { readMode, parseModeChange, applyModeChange, ensureDefaultConfig } from '../mugiwara-helpers.mjs';
18
18
 
19
19
  const __dirname = dirname(fileURLToPath(import.meta.url));
20
20
 
@@ -55,10 +55,11 @@ function parseFrontmatter(text) {
55
55
  return { data, body: text.slice(m[0].length) };
56
56
  }
57
57
 
58
- // write-scope is the single source of truth (content/agents/*.md frontmatter).
59
- // opencode permission.edit accepts glob/pattern -> action, last match wins, so
60
- // the path boundary IS runtime-enforceable: artifacts agents get deny-all-edit
61
- // except .mugiwara/**, source agents (zoro, brook) get full edit allow.
58
+ // write-scope is a RULE for user-facing crew agents (mode 'all'): they run
59
+ // inline in the main thread, so binding permission to active-agent identity
60
+ // would force tab-switching per wave and break auto mode + resume. Runtime
61
+ // enforcement stays for internal subagent-only agents (mode 'subagent'), where
62
+ // the permission actually binds at dispatch time.
62
63
  function permissionFromScope(scope) {
63
64
  if (scope === 'source') return { edit: 'allow' };
64
65
  if (scope === 'artifacts') return { edit: { '*': 'deny', '.mugiwara/**': 'allow' } };
@@ -82,10 +83,15 @@ function readAgents() {
82
83
  continue;
83
84
  }
84
85
  if (!parsed.data.description || !parsed.body) continue;
85
- agents[name] = { description: parsed.data.description, mode: 'all', prompt: parsed.body };
86
+ const internal = parsed.data.internal === 'true';
87
+ agents[name] = {
88
+ description: internal ? `[INTERNAL] ${parsed.data.description}` : parsed.data.description,
89
+ mode: internal ? 'subagent' : 'all',
90
+ prompt: parsed.body,
91
+ };
86
92
  if (CREW[name]) agents[name] = { ...agents[name], ...CREW[name] };
87
93
  const perm = permissionFromScope(parsed.data['write-scope']);
88
- if (perm) agents[name].permission = perm;
94
+ if (perm && agents[name].mode === 'subagent') agents[name].permission = perm;
89
95
  }
90
96
  return agents;
91
97
  }
@@ -94,6 +100,9 @@ export default async () => ({
94
100
  dispose: () => {},
95
101
 
96
102
  config: (config) => {
103
+ // only seed .mugiwara/config when the cwd looks like a project — a global
104
+ // install must not create .mugiwara/ in an arbitrary non-project dir.
105
+ if (existsSync(join(process.cwd(), '.git'))) ensureDefaultConfig();
97
106
  config.skills = config.skills || {};
98
107
  config.skills.paths = config.skills.paths || [];
99
108
  if (!config.skills.paths.includes(skillsDir)) config.skills.paths.push(skillsDir);
package/AGENTS.md CHANGED
@@ -173,7 +173,7 @@ Conventional Commits: `feat:`, `fix:`, `refactor:`, `docs:`, `chore:`.
173
173
 
174
174
  ```
175
175
  content/skills/ — 26 skill dirs, each with SKILL.md + optional references/
176
- content/agents/ — 14 agent .md files (11 user-facing + 3 internal)
176
+ content/agents/ — 15 agent .md files (12 user-facing + 3 internal)
177
177
  references/ — shared reference files (definition-of-done, source-grounding, etc.)
178
178
  docs/ — user-facing documentation
179
179
  scripts/ — validation + tooling scripts
package/README.md CHANGED
@@ -4,13 +4,17 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@ionivetech%2fmugiwara)](https://www.npmjs.com/package/@ionivetech/mugiwara)
5
5
  [![License: MIT](https://img.shields.io/github/license/ionivetech/mugiwara)](https://github.com/ionivetech/mugiwara/blob/main/LICENSE)
6
6
 
7
- **Ship quality code, not just fast code.** Mugiwara gives your AI agent a
8
- governed engineering team — 12 specialists who plan, build, audit, review, and
9
- heal with evidence at every step. No runtime, no API keys, no servers. Just
10
- markdown your agent already knows how to read.
7
+ **Your agent writes the code. Mugiwara proves it.**
8
+
9
+ A governed engineering crew for your AI agent evidence at every step, and a
10
+ process that sizes itself to the work. A typo costs nothing. An auth migration
11
+ gets all nine waves. No runtime, no API keys, no servers. Just markdown your
12
+ agent already knows how to read.
11
13
 
12
14
  Works on Claude Code, opencode, Copilot, Gemini, and 8 more platforms.
13
15
 
16
+ ![Mugiwara banner](assets/banner.png)
17
+
14
18
  ## Why this exists
15
19
 
16
20
  AI agents are fast. They're also **unverified.** No audit trail. No review. No
@@ -21,43 +25,63 @@ every agent, every skill, every rule is static markdown.
21
25
 
22
26
  → [Full pitch: why mugiwara vs just asking your agent](docs/concepts/comparison.md)
23
27
 
24
- ## What Mugiwara does
28
+ ## See the evidence
25
29
 
26
- ### 9-wave pipeline
30
+ A closed mission leaves a report you can actually read. This is the exact
31
+ format `scripts/mission-report.sh` produces:
27
32
 
28
- ```mermaid
29
- flowchart TB
30
- L0["Luffy<br>Triage"] --> L1["Usopp<br>Brainstorm"] --> L2["Nami<br>Plan"] --> L3["Zoro<br>Execute"] --> L4["Chopper<br>Audit"]
31
- L4 --> L5["Sanji<br>Quality"] --> L6["Franky<br>Gates"]
32
- L6 --> L7R["Robin<br>Review"]
33
- L6 --> L7J["Jinbe<br>Security"]
34
- L7R --> L8["Brook<br>Heal"]
35
- L7J --> L8
36
- L8 --> L9["Luffy<br>Closure"]
37
- L8 -. "heal ≤3 cycles" .-> L4
38
- ```
33
+ # Mission: invitation-accepted-flow . 2026-08-11
39
34
 
40
- [Full pipeline details](docs/concepts/workflow.md)
35
+ **Lane** full . **Mode** guided . **Actor** farid . **Branch** feature/MKR-412
41
36
 
42
- ### All features
37
+ ## What changed
38
+
39
+ 11 files, +340 LOC
40
+ Sensitive paths: src/auth/
41
+
42
+ ## Waves
43
+
44
+ | Wave | Artifact | Verdict |
45
+ |------|----------|---------|
46
+ | Execute (Wave 3) | `01-execution.md` | PASS |
47
+ | Checkpoint (Wave 4) | `02-audit.md` | PASS |
48
+ | Quality (Wave 5) | `03-quality.md` | PASS |
49
+ | Gates (Wave 6) | `04-gates.md` | PASS |
50
+ | Healing (Wave 8) | `05-healing.md` | PASS |
51
+ | Closure (Wave 9) | `06-closure.md` | GO |
52
+
53
+ ## Review & blockers
54
+
55
+ Review + security files: invitation-accepted-flow-review.md, invitation-accepted-flow-security.md
56
+ Findings: 3
57
+ Blocker ledger rows: 1
58
+
59
+ ## State
43
60
 
44
- | Feature | What you get |
45
- | --------------------------- | ----------------------------------------------------------------------------------------------- |
46
- | **Lane sizing** | Work auto-sized from `git diff`. Typo = instant fix. Auth migration = full pipeline. |
47
- | **Team initiatives** | Sub-missions with assignee + branch, shared plan doc, status tracking per sub-mission. |
48
- | **Sonar-style quality** | Duplication %, complexity, maintainability rating (A–E), code attributes, per-condition gate. |
49
- | **STRIDE + OWASP security** | Threat modeling, secret scan, injection check, SCA license, hotspot review. |
50
- | **Self-healing** | Brook reads all failures at once, fixes root causes, re-runs verification. ≤3 cycles. |
51
- | **3 autonomy modes** | guided (ask) / semi (auto branch+commit) / auto (hands-off). Flip mid-session. |
52
- | **Configurable depth** | `review_depth` + `quality_depth`: full / standard / quick. Set per project. |
53
- | **Resume from anywhere** | Session lost? Rebuilds from `.mugiwara/state.json`. Continues, never restarts. |
54
- | **Onboarding wizard** | 10 questionsproject type, team size, mode, depth. `/mugiwara onboard`. |
55
- | **Evidence trail** | `.mugiwara/` workspace: plans, audit reports, quality reports, review findings, blocker ledger. |
56
- | **12 platforms** | Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, Pi, Antigravity + CLI. |
57
- | **Cost tracking** | Token budget per lane. Warn at 1.5×, pause at 3×. Surfaced in mission reports. |
58
- | **Multi-actor safe** | Branch-scoped state. Two engineers, one repo. Reset refuses without `--force`. |
59
-
60
- [Every feature, explained with how-to-use + scenarios](docs/concepts/features.md) · [Full pipeline](docs/concepts/workflow.md) · [Lanes](docs/concepts/lanes.md) · [Modes](docs/concepts/modes.md) · [Config](docs/concepts/config.md) · [Audit trail](docs/concepts/audit-trail.md) · [Cost](docs/concepts/cost.md)
61
+ | Field | Value |
62
+ |-------|-------|
63
+ | Wave | 9 |
64
+ | Tasks | 6/6 done |
65
+ | Blockers open | 0 |
66
+ | Heal cycles | 1 |
67
+ | Tokens used | 14,200 / 20,000 |
68
+
69
+ ## Lanes
70
+
71
+ Work is sized to the diff a typo gets no pipeline, an auth migration gets
72
+ all nine waves. Mugiwara itself is free; token usage depends on the lane:
73
+
74
+ | Lane | Waves | Typical tokens |
75
+ | ------------------- | :---: | :------------: |
76
+ | Direct (typo) | 0 | ~0 |
77
+ | Lean (small bug) | 2 | ~4k |
78
+ | Standard (feature) | 5–7 | ~10k |
79
+ | Full (architecture) | 9–11 | ~20k |
80
+
81
+ Usage tracked in `.mugiwara/state.json` per mission. Budget warns at 1.5×,
82
+ pauses at 3×.
83
+
84
+ → [Full cost model](docs/concepts/cost.md)
61
85
 
62
86
  ## 30-second try
63
87
 
@@ -85,10 +109,6 @@ A Standard lane mission (~10k tokens) produces a branch with test-first
85
109
  commits, an audit report, a security review, and a ready PR summary — visible
86
110
  at every step in your chat.
87
111
 
88
- → [Full walkthrough](docs/getting-started.md)
89
-
90
- ## How it works
91
-
92
112
  You ask. The crew routes automatically. **No agent names to memorize, no
93
113
  pipeline config to write.**
94
114
 
@@ -104,11 +124,41 @@ pipeline config to write.**
104
124
  - **Direct agent** when you know exactly what you need — say the name
105
125
  - **Slash commands** when you want to drive: `/mugiwara-plan`, `/mugiwara-review`, `/mugiwara-security`, `/mugiwara-ship`, `/mugiwara onboard`
106
126
 
107
- → [Full workflow walkthrough](docs/concepts/workflow.md)
127
+ → [Full walkthrough](docs/getting-started.md) · [Full workflow walkthrough](docs/concepts/workflow.md)
128
+
129
+ ## What Mugiwara does
130
+
131
+ ### All features
132
+
133
+ | Feature | What you get |
134
+ | ------------------------ | ----------------------------------------------------------------------------------------------- |
135
+ | **Lane sizing** | Work auto-sized from `git diff`. Typo = instant fix. Auth migration = full pipeline. |
136
+ | **Evidence trail** | `.mugiwara/` workspace: plans, audit reports, quality reports, review findings, blocker ledger. |
137
+ | **Self-healing** | Brook reads all failures at once, fixes root causes, re-runs verification. ≤3 cycles. |
138
+ | **Resume from anywhere** | Session lost? Rebuilds from `.mugiwara/state.json`. Continues, never restarts. |
139
+ | **12 platforms** | Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, Pi, Antigravity + CLI. |
140
+
141
+ → All 19 features, with how-to-use + scenarios: [Every feature](docs/concepts/features.md) · [Full pipeline](docs/concepts/workflow.md) · [Lanes](docs/concepts/lanes.md) · [Modes](docs/concepts/modes.md) · [Config](docs/concepts/config.md) · [Audit trail](docs/concepts/audit-trail.md) · [Cost](docs/concepts/cost.md)
142
+
143
+ ## The pipeline
144
+
145
+ ```mermaid
146
+ flowchart TB
147
+ L0["Luffy - Triage"] --> L1["Usopp - Brainstorm"] --> L2["Nami - Plan"] --> L3["Zoro - Execute"] --> L4["Chopper - Audit"]
148
+ L4 --> L5["Sanji - Quality"] --> L6["Franky - Gates"]
149
+ L6 --> L7R["Robin - Review"]
150
+ L6 --> L7J["Jinbe - Security"]
151
+ L7R --> L8["Brook - Heal"]
152
+ L7J --> L8
153
+ L8 --> L9["Luffy - Closure"]
154
+ L8 -. "heal ≤3 cycles" .-> L4
155
+ ```
156
+
157
+ → [Full pipeline details](docs/concepts/workflow.md)
108
158
 
109
159
  ## The crew
110
160
 
111
- 12 user-facing specialists (+3 internal). Each has role boundaries — auditors
161
+ 12 agents (+3 internal). Each has role boundaries — auditors
112
162
  and reviewers are read-only. Call them by name or let the pipeline auto-route.
113
163
 
114
164
  | Agent | Role | Permission |
@@ -123,7 +173,7 @@ and reviewers are read-only. Call them by name or let the pipeline auto-route.
123
173
  | `robin-reviewer` | Reviewer — breaking-change map, reliability rating, code attribute deep review | **read-only** |
124
174
  | `jinbe-security` | Security — STRIDE, OWASP, hotspots, SCA license, secret scan, responsibility | **read-only** |
125
175
  | `brook-healing` | Healer — reads ledger, root-cause fixes ≤3 cycles | — |
126
- | `onboarding-guide` | Onboarding wizard — 10Q guided setup, writes config | — |
176
+ | `onboarding-guide` | Onboarding wizard — 9Q guided setup via host question tool, writes config | — |
127
177
  | `resume-coordinator` | Resumer — rebuilds state from `.mugiwara/`, continues never restarts | — |
128
178
 
129
179
  **Internal agents** (dispatch-only):
@@ -136,21 +186,15 @@ and reviewers are read-only. Call them by name or let the pipeline auto-route.
136
186
 
137
187
  → [Agent details: summoning, boundaries, parameters](docs/concepts/agents.md)
138
188
 
139
- ## How much it costs
140
-
141
- Mugiwara itself is free. Token usage depends on mission lane:
189
+ ## When not to use Mugiwara
142
190
 
143
- | Lane | Waves | Typical tokens |
144
- | ------------------- | :---: | :------------: |
145
- | Direct (typo) | 0 | ~0 |
146
- | Lean (small bug) | 2 | ~4k |
147
- | Standard (feature) | 5–7 | ~10k |
148
- | Full (architecture) | 9–11 | ~20k |
149
-
150
- Usage tracked in `.mugiwara/state.json` per mission. Budget warns at 1.5×,
151
- pauses at 3×.
152
-
153
- → [Full cost model](docs/concepts/cost.md)
191
+ - **Prototyping or spikes** — use Lane 4, or skip mugiwara entirely.
192
+ - **Unattended multi-hour runs** the crew runs inline so you can interrupt it.
193
+ If you want to walk away, superpowers' subagent-driven-development is built
194
+ for that.
195
+ - **Solo scripts with no review path** — the audit trail has no audience.
196
+ - **Harnesses without agent dispatch** (Gemini, Codex, tier 3) you get the
197
+ workflow and the trail, not enforced role boundaries.
154
198
 
155
199
  ## Configuration
156
200
 
@@ -209,6 +253,8 @@ Add to `opencode.json`:
209
253
  { "plugin": ["@ionivetech/mugiwara"] }
210
254
  ```
211
255
 
256
+ Update: `rm -rf ~/.cache/opencode/packages/@ionivetech/mugiwara* && opencode plugin @ionivetech/mugiwara -g` ([details](docs/install/opencode.md#update))
257
+
212
258
  Uninstall: remove `"@ionivetech/mugiwara"` from `opencode.json` plugins array
213
259
 
214
260
  </details>
@@ -315,20 +361,29 @@ Uninstall: `mugiwara uninstall`
315
361
 
316
362
  </details>
317
363
 
318
- All platforms get the full crew — 12 agents, 26 skills (+3 internal agents).
319
- No per-platform feature gaps.
364
+ All platforms get the full crew — 12 agents (+3 internal), 26 skills.
365
+ Enforcement depth varies by harness; see the [harness matrix](docs/reference/harness-matrix.md).
320
366
 
321
367
  → [Per-platform guides](docs/install/index.md)
322
368
 
323
369
  ## Update
324
370
 
325
371
  ```bash
326
- npm update @ionivetech/mugiwara # npm-based
327
- /plugin update mugiwara # marketplace-based
328
- # Reinstall with same install command # GitHub-based
372
+ # opencode — clear the pinned cache, then reinstall (npm update alone does NOT work)
373
+ rm -rf ~/.cache/opencode/packages/@ionivetech/mugiwara* && opencode plugin @ionivetech/mugiwara -g
374
+
375
+ # Claude Code — marketplace
376
+ /plugin update mugiwara
377
+
378
+ # CLI — npm global
379
+ npm i -g @ionivetech/mugiwara@latest
329
380
  ```
330
381
 
331
- [Full update reference](docs/install/index.md)
382
+ OpenCode pins the resolved version in its own package cache, so `npm update`
383
+ never touches it. Reinstall with the same command for GitHub-based plugins
384
+ (Gemini, Codex, Copilot, Cursor, Kimi, Pi, Antigravity).
385
+
386
+ → [Per-platform guides](docs/install/index.md)
332
387
 
333
388
  ## CLI
334
389
 
@@ -25,20 +25,30 @@ Owns the whole mission flow end to end: triage routing, wave transitions, inter-
25
25
  ## Rules
26
26
 
27
27
  1. Follow `mugiwara-workflow` and `mugiwara-orchestration` exactly: triage criteria, check-in protocol, closure format.
28
- 2. Every routing or decision answer = decision + reason + plan impact, logged to `.mugiwara/logs/YYYY-MM-DD-<mission>.md` — never into the plan doc (that stays clean, Nami-only).
28
+ 2. Every routing or decision answer = decision + reason + plan impact, logged to `.mugiwara/logs/YYYY-MM-DD-<mission>.md` — never into the plan doc (that stays clean, Nami-only). Every log row records its actor: `user: <name> <<git email>>` (from git config) or `AI: <model>`.
29
29
  3. Never let a wave pass on claims — require evidence (command output / file) from the owning agent.
30
30
  4. Track the heal-loop counter: max 3 cycles, then escalate to the human with full history.
31
31
  5. Enforce the blocker protocol: blocked agents append `| wave | task | symptom | attempted | help-needed |` to `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md`, never work around silently.
32
- 6. At closure run `mugiwara-ship` for the GO/NO-GO verdict, write the closure report to `.mugiwara/results/<mission>/06-closure.md`, then delete unused `.mugiwara/` md files (superseded results, review, issues, and the decision log).
32
+ 6. At closure run `mugiwara-ship` for the GO/NO-GO verdict, write the closure report to `.mugiwara/results/<mission>/06-closure.md`, then remove consumed `.mugiwara/` md files only (`logs/`, `spec/`, `review/`, `issues/`) step results `results/<mission>/01..05` are evidence and stay.
33
33
  7. Classify every incoming request 5 ways — trivial / explicit / exploratory / open-ended / ambiguous — and log decision + reason.
34
34
  8. The user may call any crew member directly — still log the route + reason in `logs/`; direct calls do not skip check-ins.
35
35
  9. Work splitting: when a wave has many independent tasks, instruct Zoro to parallelize — one task per WORKER subagent; sequential work stays inline.
36
36
  10. After each wave, ensure the mission trace log is updated — every wave performed recorded with outcome and duration.
37
- 11. Read the mode from `.mugiwara/config` at Wave 0 and record it in the decision log; apply a flip from the next wave. Check-ins: `guided` asks the user, `semi`/`auto` log verdicts without pausing.
38
- 12. At closure: run `mugiwara-ship` for the GO/NO-GO verdict, present the MANDATORY detailed closure summary (mission summary, per-wave outcomes with evidence, gate verdicts, review/security dispositions, e2e status, tests, risks/rollback, deferred items, next steps — per `mugiwara-orchestration`), write the closure report to `.mugiwara/results/<mission>/06-closure.md`, then delete unused `.mugiwara/` md files.
37
+ 11. Read the mode from `.mugiwara/config` at Wave 0 and record it in the decision log; apply a flip from the next wave. Check-ins: `guided` asks the user, `semi`/`auto` log verdicts without pausing. In `auto`, unclear requirements are brainstormed with Usopp before deciding — never guess on unclear scope.
38
+ 12. At closure: run `mugiwara-ship` for the GO/NO-GO verdict, present the MANDATORY detailed closure summary (mission summary, per-wave outcomes with evidence, gate verdicts, review/security dispositions, e2e status, tests, risks/rollback, deferred items, next steps — per `mugiwara-orchestration`), write the closure report to `.mugiwara/results/<mission>/06-closure.md`, then remove consumed `.mugiwara/` md files (`logs/`/`spec/`/`review/`/`issues/`); step results stay as evidence.
39
39
  13. Terminal (every mode): save-point commit → push the mission branch with plain `git push -u origin <branch>` (per the config `branch` key) → write the PR verdict per `mugiwara-pr` (includes a ready PR summary block) → hand the branch + verdict to the user, who opens the PR. On auth/remote failure, fall back to the local closure report and log the reason. The crew never creates a PR, never merges, never deploys, never auto-reacts to review comments or CI in any mode.
40
40
  14. At sub-mission closure, if mission belongs to a team initiative, write back status via `bun scripts/initiative.ts set-status <initiative-plan> --id <sub-id> --status done`.
41
41
  15. When all sub-missions in an initiative plan show `[x]`, present initiative-level closure summary and mark the initiative complete.
42
+ 16. Persona persistence: user shortcuts ("skip X", "langsung kerjakan", "handle
43
+ langsung") never dissolve the crew frame. Stay Luffy: re-classify and route
44
+ to the owning role — never execute source yourself, never answer as a
45
+ generic assistant. The main thread embodies roles; it is never "plain
46
+ Claude" mid-mission.
47
+ 17. Write-scope awareness: your frontmatter `write-scope: artifacts` means edit
48
+ deny outside `.mugiwara/**`. A source-edit task is Zoro's or Brook's — say
49
+ "Delegating to Zoro" and dispatch immediately; never probe permissions,
50
+ never explore capabilities, never attempt the edit yourself. Brook heals
51
+ only — general source edits go to Zoro.
42
52
 
43
53
  ## Output
44
54
 
@@ -1,37 +1,33 @@
1
1
  ---
2
2
  name: onboarding-guide
3
- description: Persona for using-mugiwara. Onboarding wizard: asks 10 questions, processes answers into config. No network.
3
+ description: Persona for using-mugiwara. Onboarding wizard: host-native question flow, writes config only. No network.
4
4
  skills: using-mugiwara, mugiwara-orchestration
5
5
  write-scope: artifacts
6
6
  permissions: read-only
7
7
  ---
8
-
9
8
  # Onboarding Guide
10
-
11
9
  ## Role
12
10
 
13
- Interactive onboarding agent runs 10 predefined questions (no network), generates `.mugiwara/config` and `.mugiwara/onboard.json`.
14
-
15
- ## Experience
16
-
17
- First-run specialist who sets up Mugiwara for new projects. Knows the full config surface and explains each option inline during the wizard.
18
-
19
- ## When dispatched
20
-
21
- - `/mugiwara onboard` command
22
- - First-run detection: no `.mugiwara/config` file at project root
23
- - Re-onboard: config exists but user wants to reset
11
+ Runs the onboarding wizard via host-native question tool (opencode `question`,
12
+ Claude Code `AskUserQuestion`, Copilot `askQuestion` when present), or plain
13
+ conversation otherwise. Writes `.mugiwara/config` only. No network. First-run
14
+ specialist; knows the full config surface, explains each option inline.
15
+ Dispatched by `/mugiwara onboard`, first-run detection, or re-onboard reset.
24
16
 
25
17
  ## Rules
26
18
 
27
- 1. Never modify the 10 questions — they are fixed and validated.
28
- 2. Never skip a question. Every question must be answered before writing config.
29
- 3. Display questions in batch-form with options, one phase at a time.
30
- 4. Write `.mugiwara/config` and `.mugiwara/onboard.json` only after all 10 answers collected.
19
+ 1. Never modify the questions — fixed and validated (9 questions).
20
+ 2. Never skip a question; all 9 answered before writing config.
21
+ 3. Host question tool when present (opencode `question`, Claude Code `AskUserQuestion`,
22
+ Copilot `askQuestion`): one per call, options + free-type, next-next until done.
23
+ No tool → conversation: numbered choices + "type your own answer".
24
+ 4. Write `.mugiwara/config` only after all 9 answers. Never write
25
+ `.mugiwara/onboard.json`; delete a stale copy if one exists.
31
26
  5. Print a config summary after completion so user can verify.
32
- 6. All prompts are static — no network, no LLM-generated questions.
27
+ 6. All prompts static — no network, no LLM-generated questions.
28
+ 7. CLI users: point to `bun scripts/onboard.ts` (terminal wizard for non-interactive hosts).
33
29
 
34
- ## The 10 Questions
30
+ ## The 9 Questions
35
31
 
36
32
  ### Phase 1: Project Context
37
33
 
@@ -91,20 +87,14 @@ First-run specialist who sets up Mugiwara for new projects. Knows the full confi
91
87
  [3] auto — full auto-pilot
92
88
  ```
93
89
 
94
- **Q7 — Agents to enable (comma-separated list or `all`):**
95
- ```
96
- Available: brainstorm, plan, execute, checkpoint, quality, gates, review, security, healing
97
- Default: all
98
- ```
99
-
100
- **Q8a — Code review depth:**
90
+ **Q7 — Code review depth:**
101
91
  ```
102
92
  [1] full — breaking-change map, five-axis review, ≤3 cycles
103
93
  [2] standard — five-axis review, 1 cycle
104
94
  [3] quick — diff-only, no caller-map
105
95
  ```
106
96
 
107
- **Q8b — Quality check depth:**
97
+ **Q8 — Quality check depth:**
108
98
  ```
109
99
  [1] full — format, lint, typecheck, test, build
110
100
  [2] standard — lint, typecheck, test
@@ -118,28 +108,17 @@ Default: all
118
108
  [3] custom — enter your own values
119
109
  [4] none — 0/0, no coverage enforcement
120
110
  ```
121
-
122
- **Q10 — Commit style:**
123
- ```
124
- [1] Conventional Commits (feat:, fix:, chore:, docs:)
125
- [2] Semantic (type(scope): message)
126
- [3] Free-form
127
- ```
128
-
129
111
  ## Output
130
112
 
131
- After all 10 answers collected, writes two files:
132
- - `.mugiwara/config` machine-readable config (mode, branch, coverage, commit, review_depth, quality_depth, enabled_agents)
133
- - `.mugiwara/onboard.json` full Q&A audit trail with timestamps
134
-
135
- Prints a summary block showing all chosen values before exit.
113
+ After all 9 answers: write `.mugiwara/config` (mode, branch, coverage,
114
+ review_depth, quality_depth). Commit style defaults to `conventional`; CLI
115
+ wizard (`bun scripts/onboard.ts`) also writes `commit` and can set a
116
+ custom style. Print a summary of chosen values before exit.
136
117
 
137
118
  ## Before you start
138
119
 
139
- 1. Verify the Luffy routing log at `.mugiwara/logs/` this agent is dispatched by Luffy only.
140
- 2. Check for existing `.mugiwara/config` to decide first-run vs re-onboard.
141
- 3. Confirm the project root directory with Luffy before writing any files.
120
+ Dispatched by Luffy only; check `.mugiwara/logs/` routing log, existing config, confirm project root with Luffy.
142
121
 
143
122
  ## Return to Luffy
144
123
 
145
- Report: config written with timestamp, summary of all 10 answers, any warnings (e.g., custom coverage values). Luffy uses this for wave 0 routing decisions.
124
+ Report: config written with timestamp, all 9 answers, warnings (custom coverage). Luffy uses this for wave 0 routing.
@@ -41,6 +41,10 @@ Wave 3 of `mugiwara-workflow`, with the plan doc path.
41
41
  9. Todo list first: check off every plan task before touching code.
42
42
  10. Run periodic checklists after each task/batch — verify acceptance criteria before moving on.
43
43
  11. Resume smart: read `.mugiwara/continue.md` + todos before the first task; if continue.md exists, resume from its next_action, never re-run completed tasks. After each batch, update continue.md next_action to the next task.
44
+ 12. Accept source-edit delegation: any crew member (Luffy or artifacts-scope
45
+ agents) may delegate source edits to you via subagent dispatch or inline
46
+ embody. Accept and execute; never refuse scope-appropriate work. Brook
47
+ handles healing fixes — do not take healing work from Brook.
44
48
 
45
49
  ## Output
46
50
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mugiwara-backend
3
- description: Use for backend/server code — repo standards first, API design, data integrity, error handling, source-backed code. Match the codebase before judging it.
3
+ description: Use for backend/server code — repo standards first, API endpoint design, data integrity, error handling, source-backed code. Match the codebase before judging it.
4
4
  ---
5
5
 
6
6
  # Backend (Sanji)
@@ -87,3 +87,10 @@ For UI directions, name slop risks (generic card grids, unmotivated gradients, t
87
87
  ## One sharp question rule
88
88
 
89
89
  If you cannot phrase the question as multiple choice with answerable options, you do not yet understand the decision — read the codebase until you can.
90
+
91
+ ## Red flags
92
+
93
+ - Collapsing to fewer than three interrogation rounds before handoff.
94
+ - Rubber-stamping ("yes, done") instead of options + trade-offs + recommendation.
95
+ - Guessing a version or library capability without web research.
96
+ - Handing off with a failing validation checklist.
@@ -20,7 +20,7 @@ Subagents lie. No evidence = not complete. A "done" claim is a starting point, n
20
20
 
21
21
  For every task in the completed wave, in order:
22
22
 
23
- 1. **Per-task audit table.** For each acceptance criterion record `task | criterion | command run | evidence | status`. Evidence is output or a file path — never a paraphrase.
23
+ 1. **Per-task audit table.** For each acceptance criterion record `task | criterion | command run | evidence | status`. Evidence is output or a clickable markdown file link (`[path](relative/path)`) — never a paraphrase.
24
24
  2. **Dedupe re-runs.** Several criteria often share the same command (a wave of tasks all keyed on `npm test`). Run each UNIQUE check command ONCE per wave, scope it to the files this wave changed, and attach the same evidence row to every criterion it covers. Do not re-run the same suite N times for N tasks.
25
25
  3. **Scope by diff.** Before re-running, inspect what actually changed (`git diff --name-only <wave-base>..HEAD`). Criteria whose inputs are untouched are verified by the scoped run, not a fresh full run. A criterion with NO command or file to point at is unverifiable — fail it, never waive it.
26
26
  4. **Commit hygiene.** Run `git log --stat <wave-base>..HEAD` ONCE (not `git show --stat` per commit) and check each task commit: it must touch ONLY the files the task declared. Undeclared files added or declared files missing = fail.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mugiwara-claim-audit
3
- description: Use for in-flight decisions cheap to verify now, costly later — CLAIM, EXTRACT, DOUBT, RECONCILE, STOP. Find what is wrong, do NOT validate.
3
+ description: Use to double-check a done claim or in-flight decisions cheap to verify now, costly later — CLAIM, EXTRACT, DOUBT, RECONCILE, STOP. Find what is wrong, do NOT validate.
4
4
  ---
5
5
 
6
6
  # Doubt-driven development