@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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.kimi-plugin/plugin.json +1 -1
- package/.opencode/commands/mugiwara-onboard.md +15 -0
- package/.opencode/mugiwara-helpers.mjs +24 -0
- package/.opencode/plugins/mugiwara.mjs +16 -7
- package/AGENTS.md +1 -1
- package/README.md +118 -63
- package/content/agents/luffy-orchestrator.md +14 -4
- package/content/agents/onboarding-guide.md +24 -45
- package/content/agents/zoro-execution.md +4 -0
- package/content/skills/mugiwara-backend/SKILL.md +1 -1
- package/content/skills/mugiwara-brainstorm/SKILL.md +7 -0
- package/content/skills/mugiwara-checkpoint/SKILL.md +1 -1
- package/content/skills/mugiwara-claim-audit/SKILL.md +1 -1
- package/content/skills/mugiwara-execution/SKILL.md +44 -44
- package/content/skills/mugiwara-execution/references/dispatch.md +42 -0
- package/content/skills/mugiwara-frontend/SKILL.md +1 -1
- package/content/skills/mugiwara-healing/SKILL.md +1 -1
- package/content/skills/mugiwara-orchestration/SKILL.md +50 -49
- package/content/skills/mugiwara-orchestration/references/check-ins.md +34 -0
- package/content/skills/mugiwara-orchestration/references/closure.md +34 -0
- package/content/skills/mugiwara-orchestration/references/triage-escalation.md +12 -11
- package/content/skills/mugiwara-planning/SKILL.md +6 -0
- package/content/skills/mugiwara-pr/SKILL.md +18 -8
- package/content/skills/mugiwara-quality/SKILL.md +7 -0
- package/content/skills/mugiwara-ship/SKILL.md +11 -9
- package/content/skills/mugiwara-sunset/SKILL.md +1 -1
- package/content/skills/mugiwara-testcases/SKILL.md +7 -0
- package/content/skills/mugiwara-workflow/SKILL.md +4 -2
- package/content/skills/mugiwara-workflow/references/workspace-layout.md +7 -6
- package/content/skills/using-mugiwara/SKILL.md +11 -1
- package/dist/mugiwara.js +186 -13
- package/gemini-extension.json +1 -1
- package/hooks/mugiwara-mode-tracker.ts +0 -0
- package/hooks/session-start.ts +0 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/evidence.sh +16 -1
- package/scripts/gate-selftest.ts +52 -1
- package/scripts/initiative.ts +34 -20
- package/scripts/lane.sh +4 -2
- package/scripts/mission-report.sh +152 -29
- package/scripts/onboard.ts +3 -29
- package/scripts/release-notes.ts +152 -75
- package/scripts/savepoint.sh +67 -15
- package/scripts/validate-content.ts +20 -0
- package/src/cli.ts +20 -3
- package/src/installer.ts +37 -1
- package/src/mission.ts +108 -1
- package/src/targets/claude.ts +29 -8
- 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.
|
|
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.
|
|
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.
|
|
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"
|
|
@@ -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.
|
|
5
|
+
"version": "0.6.2",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ionivetech"
|
|
8
8
|
},
|
package/.kimi-plugin/plugin.json
CHANGED
|
@@ -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
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
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
|
-
|
|
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/ —
|
|
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
|
[](https://www.npmjs.com/package/@ionivetech/mugiwara)
|
|
5
5
|
[](https://github.com/ionivetech/mugiwara/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+

|
|
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
|
-
##
|
|
28
|
+
## See the evidence
|
|
25
29
|
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
35
|
+
**Lane** full . **Mode** guided . **Actor** farid . **Branch** feature/MKR-412
|
|
41
36
|
|
|
42
|
-
|
|
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
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
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 —
|
|
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
|
-
##
|
|
140
|
-
|
|
141
|
-
Mugiwara itself is free. Token usage depends on mission lane:
|
|
189
|
+
## When not to use Mugiwara
|
|
142
190
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
|
319
|
-
|
|
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
|
|
327
|
-
/plugin
|
|
328
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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:
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
28
|
-
2. Never skip a question
|
|
29
|
-
3.
|
|
30
|
-
|
|
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
|
|
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
|
|
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 —
|
|
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
|
-
**
|
|
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
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
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
|