@ionivetech/mugiwara 0.4.0 → 0.5.1
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/README.md +231 -371
- package/content/agents/brook-healing.md +2 -2
- package/content/agents/chopper-checkpoint.md +2 -1
- package/content/agents/eval-runner.md +4 -4
- package/content/agents/franky-gates.md +1 -1
- package/content/agents/jinbe-security.md +2 -1
- package/content/agents/luffy-orchestrator.md +3 -3
- package/content/agents/memory-keeper.md +1 -1
- package/content/agents/nami-planner.md +2 -2
- package/content/agents/resume-coordinator.md +8 -9
- package/content/agents/robin-reviewer.md +3 -2
- package/content/agents/sanji-quality.md +1 -1
- package/content/agents/skeptic-verifier.md +4 -3
- package/content/agents/using-mugiwara.md +3 -3
- package/content/agents/usopp-brainstorm.md +3 -3
- package/content/agents/zoro-execution.md +4 -3
- package/content/skills/mugiwara-agent-security/SKILL.md +14 -2
- package/content/skills/mugiwara-backend/SKILL.md +2 -8
- package/content/skills/mugiwara-backend/references/source-backed-example.md +77 -0
- package/content/skills/mugiwara-brainstorm/SKILL.md +2 -2
- package/content/skills/mugiwara-checkpoint/SKILL.md +2 -2
- package/content/skills/mugiwara-checkpoint/references/ledger-format.md +34 -0
- package/content/skills/{mugiwara-doubt-driven-development → mugiwara-claim-audit}/SKILL.md +2 -2
- package/content/skills/{mugiwara-context-engineering → mugiwara-context-budget}/SKILL.md +2 -2
- package/content/skills/mugiwara-context-budget/references/context-budget.md +37 -0
- package/content/skills/{mugiwara-api-and-interface-design → mugiwara-contract-first}/SKILL.md +4 -2
- package/content/skills/mugiwara-contract-first/references/versioning-playbook.md +36 -0
- package/content/skills/mugiwara-execution/SKILL.md +4 -2
- package/content/skills/mugiwara-execution/references/worked-example.md +88 -0
- package/content/skills/mugiwara-frontend/SKILL.md +13 -14
- package/content/skills/mugiwara-frontend/references/design-tokens.md +25 -0
- package/content/skills/mugiwara-frontend/references/slop-catalog.md +19 -0
- package/content/skills/mugiwara-gates/SKILL.md +4 -4
- package/content/skills/mugiwara-git/SKILL.md +1 -1
- package/content/skills/mugiwara-healing/SKILL.md +34 -7
- package/content/skills/mugiwara-healing/references/failure-taxonomy.md +23 -0
- package/content/skills/mugiwara-lessons/SKILL.md +1 -1
- package/content/skills/mugiwara-orchestration/SKILL.md +5 -5
- package/content/skills/mugiwara-planning/SKILL.md +2 -2
- package/content/skills/mugiwara-planning/references/anti-patterns.md +17 -0
- package/content/skills/mugiwara-planning/references/plan-template.md +46 -0
- package/content/skills/mugiwara-pr/SKILL.md +1 -1
- package/content/skills/{mugiwara-test-driven-development → mugiwara-proof-order}/SKILL.md +2 -2
- package/content/skills/mugiwara-proof-order/references/proof-order-examples.md +62 -0
- package/content/skills/mugiwara-quality/SKILL.md +3 -3
- package/content/skills/mugiwara-resume/SKILL.md +44 -33
- package/content/skills/mugiwara-review/SKILL.md +1 -1
- package/content/skills/mugiwara-review/references/five-axis-worksheet.md +36 -0
- package/content/skills/mugiwara-review/references/severity-rubric.md +20 -0
- package/content/skills/{mugiwara-systematic-debugging → mugiwara-root-cause}/SKILL.md +4 -2
- package/content/skills/mugiwara-root-cause/references/four-phase-worked.md +71 -0
- package/content/skills/mugiwara-security/SKILL.md +1 -1
- package/content/skills/mugiwara-security/references/owasp-mapping.md +30 -0
- package/content/skills/mugiwara-security/references/stride-worksheet.md +37 -0
- package/content/skills/mugiwara-ship/SKILL.md +1 -1
- package/content/skills/{mugiwara-deprecation → mugiwara-sunset}/SKILL.md +2 -2
- package/content/skills/mugiwara-testcases/SKILL.md +1 -1
- package/content/skills/mugiwara-testcases/references/intake-formats.md +42 -0
- package/content/skills/mugiwara-workflow/SKILL.md +20 -23
- package/dist/mugiwara.js +37 -8
- package/docs/agents.md +2 -2
- package/docs/audit-trail.md +65 -0
- package/docs/comparison.md +43 -170
- package/docs/compliance-matrix.md +81 -0
- package/docs/config.md +4 -2
- package/docs/cost.md +45 -0
- package/docs/enforcement.md +32 -35
- package/docs/getting-started.md +103 -41
- package/docs/harness-matrix.md +41 -0
- package/docs/lanes.md +65 -23
- package/docs/skill-anatomy.md +42 -54
- package/docs/skills.md +36 -54
- package/evals/cases/_no-skill.json +16 -0
- package/evals/cases/adversarial-pressure-fake-pass.json +21 -8
- package/evals/cases/adversarial-pressure-skip-review.json +19 -7
- package/evals/cases/lane-exploratory-vague.json +18 -6
- package/evals/cases/lane-sensitivity-payment.json +18 -6
- package/evals/cases/positive-refactor-existing-tests.json +22 -8
- package/evals/cases/positive-resume-mid-mission.json +20 -7
- package/evals/cases/routing-agent-security.json +25 -0
- package/evals/cases/routing-auth-feature.json +20 -7
- package/evals/cases/routing-backend.json +25 -0
- package/evals/cases/routing-bug-one-file.json +21 -8
- package/evals/cases/routing-claim-audit.json +25 -0
- package/evals/cases/routing-context-budget.json +25 -0
- package/evals/cases/routing-contract-first.json +25 -0
- package/evals/cases/routing-execution.json +25 -0
- package/evals/cases/routing-frontend.json +26 -0
- package/evals/cases/routing-gates.json +25 -0
- package/evals/cases/routing-git.json +25 -0
- package/evals/cases/routing-healing.json +25 -0
- package/evals/cases/routing-lessons.json +25 -0
- package/evals/cases/routing-orchestration.json +25 -0
- package/evals/cases/routing-planning.json +26 -0
- package/evals/cases/routing-pr.json +25 -0
- package/evals/cases/routing-proof-order.json +25 -0
- package/evals/cases/routing-quality.json +25 -0
- package/evals/cases/routing-ship.json +26 -0
- package/evals/cases/routing-sunset.json +25 -0
- package/evals/cases/routing-workflow.json +25 -0
- package/evals/floor.json +6 -0
- package/package.json +6 -4
- package/references/definition-of-done.md +42 -0
- package/references/multi-actor.md +44 -0
- package/references/skill-versioning.md +44 -0
- package/references/source-grounding.md +23 -0
- package/references/token-budget.md +34 -0
- package/scripts/evidence.sh +37 -0
- package/scripts/lane.sh +74 -0
- package/scripts/mission-report.sh +88 -0
- package/scripts/probe.ts +40 -0
- package/scripts/release-notes.ts +65 -0
- package/scripts/retrieval-eval.ts +261 -0
- package/scripts/run-evals.ts +149 -0
- package/scripts/savepoint.sh +166 -0
- package/scripts/sync-version.ts +30 -0
- package/scripts/validate-content.ts +226 -0
- package/src/cli.ts +8 -3
- package/src/mission.ts +26 -3
- package/content/skills/mugiwara-dynamic-workflow/SKILL.md +0 -90
- package/content/skills/mugiwara-eval/SKILL.md +0 -87
- package/content/skills/mugiwara-git-worktrees/SKILL.md +0 -67
- package/content/skills/mugiwara-mode/SKILL.md +0 -77
- package/content/skills/mugiwara-observability/SKILL.md +0 -59
- package/content/skills/mugiwara-writing-skills/SKILL.md +0 -65
- package/evals/cases/negative-secrets-typo.json +0 -12
- package/evals/cases/negative-security-docs-change.json +0 -12
- package/evals/cases/routing-typo.json +0 -13
package/docs/getting-started.md
CHANGED
|
@@ -20,9 +20,19 @@ Pick your harness — every major one is supported. The two easiest:
|
|
|
20
20
|
/plugin install mugiwara
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
| Harness | Install command |
|
|
24
|
+
|---------|----------------|
|
|
25
|
+
| Claude Code | `/plugin marketplace add ionivetech/mugiwara` then `/plugin install mugiwara` |
|
|
26
|
+
| opencode | `{ "plugin": ["@ionivetech/mugiwara"] }` in `opencode.json` |
|
|
27
|
+
| GitHub Copilot | `copilot plugin marketplace add ionivetech/mugiwara` then `copilot plugin install mugiwara` |
|
|
28
|
+
| Gemini CLI | `gemini extensions install https://github.com/ionivetech/mugiwara` |
|
|
29
|
+
| Codex | `codex plugin marketplace add ionivetech/mugiwara` then `codex plugin add mugiwara@mugiwara` |
|
|
30
|
+
| Cursor | `/add-plugin mugiwara` |
|
|
31
|
+
| Kimi Code | `/plugins install https://github.com/ionivetech/mugiwara` |
|
|
32
|
+
| pi | `pi install git:github.com/ionivetech/mugiwara` |
|
|
33
|
+
| Windsurf, Cline, Kilo, Antigravity | `npx @ionivetech/mugiwara@latest --project . --target <id> --yes` |
|
|
34
|
+
|
|
35
|
+
Or the CLI for any target:
|
|
26
36
|
|
|
27
37
|
```bash
|
|
28
38
|
npx @ionivetech/mugiwara@latest --project ./my-app --target all --yes
|
|
@@ -32,45 +42,76 @@ Requires **Node.js >= 20.11**. Bun is optional (build-from-source only).
|
|
|
32
42
|
|
|
33
43
|
## 2. Start a mission
|
|
34
44
|
|
|
35
|
-
The workflow **auto-activates
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
The workflow **auto-activates** at session start. The crew announces itself,
|
|
46
|
+
then give any non-trivial request.
|
|
47
|
+
|
|
48
|
+
### Small: lane 0–1
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
> fix the date formatting bug in src/utils/format.ts
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Luffy routes it to **Lane 1** (Lean). Zoro reproduces and fixes, Sanji runs
|
|
55
|
+
format + lint + tests. Two waves, visible as compact checkpoint reports. No
|
|
56
|
+
nine-wave ceremony for a one-file bug.
|
|
57
|
+
|
|
58
|
+
That's lane sizing: the process scales to the work. A typo (Lane 0) runs zero
|
|
59
|
+
waves — the fix happens directly.
|
|
60
|
+
|
|
61
|
+
### Medium: lane 2
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
> add a search bar to the products page
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Touches frontend + API. Luffy routes to **Lane 2** (Standard). Nami plans 1
|
|
68
|
+
wave with 3-5 tasks, Zoro executes test-first, Chopper audits every criterion,
|
|
69
|
+
Sanji and Franky gate, Robin and Jinbe review.
|
|
70
|
+
|
|
71
|
+
### Large: lane 3
|
|
39
72
|
|
|
40
73
|
```
|
|
41
|
-
> add
|
|
74
|
+
> add role-based access control to the API
|
|
42
75
|
```
|
|
43
76
|
|
|
44
|
-
|
|
45
|
-
the
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
77
|
+
Touches auth — Luffy routes to **Lane 3** (Full). All 9 waves run. Nami plans
|
|
78
|
+
the migration, Zoro executes, Chopper audits, Sanji tests, Franky gates, Robin
|
|
79
|
+
reviews the diff with a breaking-change map, Jinbe runs STRIDE + OWASP, Brook
|
|
80
|
+
heals any failures (max 3 cycles), Luffy closes with a mission report + push +
|
|
81
|
+
ready PR summary.
|
|
49
82
|
|
|
50
83
|
```
|
|
51
|
-
Wave 0 Luffy triage → route:
|
|
52
|
-
Wave 2 Nami plan → .mugiwara/plans/2026-08-10-
|
|
53
|
-
Wave 3 Zoro execute→
|
|
54
|
-
Wave 4 Chopper audit →
|
|
55
|
-
Wave
|
|
56
|
-
Wave
|
|
84
|
+
Wave 0 Luffy triage → route: full pipe (auth/ touched)
|
|
85
|
+
Wave 2 Nami plan → .mugiwara/plans/2026-08-10-rbac.md (2 waves, 5 tasks)
|
|
86
|
+
Wave 3 Zoro execute→ 5 tasks, evidence per task
|
|
87
|
+
Wave 4 Chopper audit → PASS: all criteria met, commit hygiene clean
|
|
88
|
+
Wave 5 Sanji quality → PASS: lint 0, 312 tests green
|
|
89
|
+
Wave 6 Franky gates → PASS: new 94%, modified 87%, build green
|
|
90
|
+
Wave 7 Robin review → 2 minor findings (batched)
|
|
91
|
+
Wave 7 Jinbe security→ PASS: STRIDE clean, 0 high
|
|
92
|
+
Wave 9 Luffy closure→ mission report + push + ready PR summary
|
|
57
93
|
```
|
|
58
94
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
95
|
+
The crew runs **inline** in your main conversation — every wave reports as a
|
|
96
|
+
compact checkpoint. Subagents only for parallel task batches.
|
|
97
|
+
|
|
98
|
+
Prefer to drive stages yourself? Every stage has a slash command:
|
|
99
|
+
`/mugiwara-plan`, `/mugiwara-execute`, `/mugiwara-review`,
|
|
100
|
+
`/mugiwara-security`, `/mugiwara-heal`, `/mugiwara-ship`. Jump into any stage.
|
|
63
101
|
|
|
64
102
|
## 3. What you do during a mission
|
|
65
103
|
|
|
66
|
-
Almost nothing
|
|
104
|
+
Almost nothing in `guided` mode:
|
|
67
105
|
|
|
68
106
|
- Answer Nami's clarifying questions (one batched round before planning).
|
|
69
|
-
- Give the plan an explicit GO when presented
|
|
107
|
+
- Give the plan an explicit GO when presented.
|
|
70
108
|
- Review Brook's rollback note if a risky fix is proposed.
|
|
71
|
-
- In every mode, open the PR at the end — the crew pushes the branch and
|
|
72
|
-
you
|
|
73
|
-
|
|
109
|
+
- In every mode, **open the PR at the end** — the crew pushes the branch and
|
|
110
|
+
hands you a verdict file with a ready PR summary. The crew never creates a
|
|
111
|
+
PR, merges, or deploys.
|
|
112
|
+
|
|
113
|
+
Switch to `semi` or `auto` if you want the crew to self-manage branch, commits,
|
|
114
|
+
and ambiguities. See [modes](modes.md).
|
|
74
115
|
|
|
75
116
|
## 4. The `.mugiwara/` workspace
|
|
76
117
|
|
|
@@ -78,19 +119,40 @@ Every mission writes to `.mugiwara/` at the repo root:
|
|
|
78
119
|
|
|
79
120
|
```
|
|
80
121
|
.mugiwara/
|
|
81
|
-
├── config
|
|
82
|
-
├──
|
|
83
|
-
├──
|
|
84
|
-
├──
|
|
85
|
-
├──
|
|
86
|
-
├──
|
|
87
|
-
|
|
122
|
+
├── config # mode, branch, commit, base, coverage thresholds
|
|
123
|
+
├── state.json # computed at every wave boundary by scripts/savepoint.sh
|
|
124
|
+
├── spec/ # brainstorm output
|
|
125
|
+
├── plans/ # clean execution plan (source of truth from Wave 2)
|
|
126
|
+
├── results/ # audit, quality, gate, closure reports + evidence logs
|
|
127
|
+
├── reports/ # human-readable mission reports
|
|
128
|
+
├── review/ # review + security findings
|
|
129
|
+
├── issues/ # blocker ledger
|
|
130
|
+
├── refs/ # full skill/agent bodies for glob-loading harnesses
|
|
131
|
+
└── logs/ # decision log + cross-mission lessons
|
|
88
132
|
```
|
|
89
133
|
|
|
90
|
-
|
|
134
|
+
**Savepoint** runs at every wave boundary — `state.json` carries lane, wave,
|
|
135
|
+
files, blockers, heal cycle, and token budget. Resume reads one file instead of
|
|
136
|
+
six. See [audit-trail.md](audit-trail.md) for the full artifact map.
|
|
137
|
+
|
|
138
|
+
## 5. Configuration
|
|
139
|
+
|
|
140
|
+
`.mugiwara/config` (project) overrides `~/.mugiwara/config` (global):
|
|
141
|
+
|
|
142
|
+
| Key | Default | What it controls |
|
|
143
|
+
|-----|---------|-----------------|
|
|
144
|
+
| `mode` | guided | Autonomy: guided/semi/auto |
|
|
145
|
+
| `branch` | `feature/{type}-{issue}-{slug}` | Branch naming pattern |
|
|
146
|
+
| `commit` | conventional | Commit style: conventional/gitmoji/plain |
|
|
147
|
+
| `base` | main | PR target branch |
|
|
148
|
+
| `coverage_new` | 90 | Coverage % for new files |
|
|
149
|
+
| `coverage_modified` | 80 | Coverage % for modified files |
|
|
150
|
+
|
|
151
|
+
## 6. Next steps
|
|
91
152
|
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
153
|
+
- Meet the [crew](agents.md) — 15 agents with permission boundaries.
|
|
154
|
+
- Browse the [skills](skills.md) — 26 skills with the 3-layer disclosure model.
|
|
155
|
+
- Understand the [lanes](lanes.md) — how work is sized before it runs.
|
|
156
|
+
- Set your [mode](modes.md) — guided/semi/auto.
|
|
157
|
+
- Read the [audit trail](audit-trail.md) — every artifact and how to review it.
|
|
158
|
+
- See the [compliance matrix](compliance-matrix.md) — rule compliance per model.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Harness Matrix
|
|
2
|
+
|
|
3
|
+
What actually differs per harness tier. Every skill and agent file ships to every harness, but behavior differs in three tiers.
|
|
4
|
+
|
|
5
|
+
| Tier | Harnesses | Skills | Agents | `references/` | Scope |
|
|
6
|
+
|------|-----------|--------|--------|:---:|-------|
|
|
7
|
+
| **1** | Claude Code, opencode | Native, auto-trigger per skill | Real, dispatchable | Yes | global + project |
|
|
8
|
+
| **2** | Gemini, Codex, Copilot | Full body in rules dir + bootstrap pointer | Markdown only | Yes | project only |
|
|
9
|
+
| **3** | Windsurf, Cline, Kilo, Antigravity | Stub; body in `.mugiwara/refs/` | Stub | Yes | project only |
|
|
10
|
+
|
|
11
|
+
## Behavioral differences
|
|
12
|
+
|
|
13
|
+
### Tier 1 — Full
|
|
14
|
+
|
|
15
|
+
- Skills auto-trigger when `description` frontmatter matches the task.
|
|
16
|
+
- Agents are dispatchable subagents with isolation.
|
|
17
|
+
- Progressive disclosure works: description → body → `references/`.
|
|
18
|
+
- Global scope supported — install once, use in every project.
|
|
19
|
+
|
|
20
|
+
### Tier 2 — Skills only
|
|
21
|
+
|
|
22
|
+
- Agent files are markdown — the main thread embodies the persona, no subagent dispatch.
|
|
23
|
+
- Skills load as rules files; the model chooses which to read per task.
|
|
24
|
+
- **Project scope only** — `generic.ts` throws on global scope.
|
|
25
|
+
- `references/` files are copied to `.mugiwara/refs/` and reachable.
|
|
26
|
+
|
|
27
|
+
### Tier 3 — Stubs
|
|
28
|
+
|
|
29
|
+
- Rule directories get **stub files** — the frontmatter and a pointer to `.mugiwara/refs/`.
|
|
30
|
+
- Full body is loaded only when the agent opens the reference file.
|
|
31
|
+
- Saves ~40k tokens of glob-load. Trade: the model must decide to open the ref.
|
|
32
|
+
- **Project scope only.**
|
|
33
|
+
- `references/` files are copied to `.mugiwara/refs/` — depth is available, just not auto-loaded.
|
|
34
|
+
- Wave-boundary state flush: savepoint writes `state.json` so the model has computed state to resume from.
|
|
35
|
+
|
|
36
|
+
## What's the same everywhere
|
|
37
|
+
|
|
38
|
+
- All 32 (→ 26) skill directories ship to every harness.
|
|
39
|
+
- All 15 agent markdown files ship to every harness.
|
|
40
|
+
- `references/` files are always copied.
|
|
41
|
+
- The workflow, lane sizing, and evidence discipline are identical — the difference is in how the model loads them.
|
package/docs/lanes.md
CHANGED
|
@@ -1,40 +1,82 @@
|
|
|
1
1
|
# Lanes & Sizing
|
|
2
2
|
|
|
3
|
-
The crew sizes a mission before it runs.
|
|
4
|
-
|
|
5
|
-
not pay for the full nine-wave pipeline.
|
|
3
|
+
The crew sizes a mission before it runs. Lane is computed from the diff by
|
|
4
|
+
`scripts/lane.sh` — deterministic, not estimated.
|
|
6
5
|
|
|
7
6
|
## The lanes
|
|
8
7
|
|
|
9
|
-
| Lane | Picks when | Waves |
|
|
10
|
-
|
|
8
|
+
| Lane | Picks when | Waves | Token budget |
|
|
9
|
+
|------|-----------|-------|:------:|
|
|
11
10
|
| **0 · Direct** | typo, rename, 1 file <20 LOC | none | ~0 |
|
|
12
11
|
| **1 · Lean** | bug in 1-2 files, <50 LOC | execute → quality | ~4k |
|
|
13
|
-
| **2 · Standard** | feature, 3-8 files | plan → execute →
|
|
14
|
-
| **3 · Full** | architecture, migration, auth/payment
|
|
12
|
+
| **2 · Standard** | feature, 3-8 files | plan → execute → audit → review | ~10k |
|
|
13
|
+
| **3 · Full** | architecture, migration, 9+ files, or auth/payment/API touched | all 9 waves | ~20k |
|
|
15
14
|
| **4 · Spike** | exploratory, needs direction | brainstorm → re-triage | ~3k |
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
write the state to `.mugiwara/` and report how to continue — never silently
|
|
19
|
-
run on.
|
|
16
|
+
## How lane is computed
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
`scripts/lane.sh <base-ref>` runs `git diff --name-only` against the base ref
|
|
19
|
+
and applies deterministic rules:
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
| Diff | Lane |
|
|
22
|
+
|------|------|
|
|
23
|
+
| 0 files changed | Direct |
|
|
24
|
+
| 1 file, <20 LOC added | Direct |
|
|
25
|
+
| 1 file, ≥20 LOC added | Lean |
|
|
26
|
+
| 2 files | Lean |
|
|
27
|
+
| 3–8 files | Standard |
|
|
28
|
+
| 9+ files | Full |
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
**Sensitive path escalation.** Files matching these patterns always escalate to
|
|
31
|
+
Lane 3 (Full), regardless of file count:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
auth/ payment/ billing/ crypto/ secrets/ .env
|
|
35
|
+
migration/ .sql schema. .prisma .terraform .tf
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use `--json` for machine output:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"lane": "full",
|
|
43
|
+
"reason": "sensitive paths (src/auth/login.ts) — escalated from standard",
|
|
44
|
+
"files_touched": 5,
|
|
45
|
+
"sensitive_paths": ["src/auth/login.ts"],
|
|
46
|
+
"base": "main"
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Token budget
|
|
51
|
+
|
|
52
|
+
Every lane has a budget enforced by `scripts/savepoint.sh` at each wave
|
|
53
|
+
boundary. The harness sets `MUGIWARA_TOKENS` env var with estimated tokens
|
|
54
|
+
consumed.
|
|
55
|
+
|
|
56
|
+
| Status | Condition | Action |
|
|
57
|
+
|--------|-----------|--------|
|
|
58
|
+
| ok | tokens < 1.5× budget | Continue |
|
|
59
|
+
| warn | tokens ≥ 1.5× budget | Log warning to decision log |
|
|
60
|
+
| stop | tokens ≥ 3× budget | Write state, report to user, pause mission |
|
|
61
|
+
|
|
62
|
+
Budget guidance, not a hard kill switch. The model decides whether to stop —
|
|
63
|
+
savepoint just writes the status to `state.json`.
|
|
31
64
|
|
|
32
65
|
## Escalation
|
|
33
66
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
over-process.
|
|
67
|
+
Lane **escalates when work outgrows the estimate.** At every wave boundary,
|
|
68
|
+
`scripts/savepoint.sh` re-checks the diff. If files grew or a sensitive path
|
|
69
|
+
appeared, lane rises. A lane **never auto-drops.** Under-process costs more
|
|
70
|
+
than over-process.
|
|
71
|
+
|
|
72
|
+
Manual escalation: if the user says "this is bigger than I thought — run the
|
|
73
|
+
full pipeline," Luffy records it in the decision log and escalates.
|
|
74
|
+
|
|
75
|
+
## SPIKE lane (Lane 4)
|
|
76
|
+
|
|
77
|
+
Exploratory missions start at Lane 4. Usopp brainstorms, then the mission is
|
|
78
|
+
re-triaged into the right lane. A spike that stays a spike (no code change
|
|
79
|
+
decided) ends at Wave 1.
|
|
38
80
|
|
|
39
|
-
|
|
81
|
+
Lane is computed per mission by `scripts/lane.sh`, not stored in
|
|
40
82
|
`.mugiwara/config`.
|
package/docs/skill-anatomy.md
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
# Skill Anatomy
|
|
2
2
|
|
|
3
|
-
Every mugiwara skill is a single
|
|
4
|
-
|
|
5
|
-
ship in for Claude Code, opencode, Copilot, Cursor, Gemini, and 70+ other tools
|
|
6
|
-
via the agentskills.io layout.
|
|
3
|
+
Every mugiwara skill is a single `SKILL.md` file. No code, no runtime — just
|
|
4
|
+
frontmatter plus a playbook the agent follows.
|
|
7
5
|
|
|
8
6
|
## File structure
|
|
9
7
|
|
|
10
8
|
```
|
|
11
9
|
skills/<skill-name>/SKILL.md
|
|
12
|
-
skills/<skill-name>/references/<topic>.md # optional: overflow detail
|
|
10
|
+
skills/<skill-name>/references/<topic>.md # optional: overflow detail
|
|
13
11
|
```
|
|
14
12
|
|
|
15
13
|
```markdown
|
|
16
14
|
---
|
|
17
15
|
name: mugiwara-checkpoint
|
|
18
|
-
description: Use after an execution wave to audit results against the plan.
|
|
16
|
+
description: Use after an execution wave to audit results against the plan.
|
|
19
17
|
---
|
|
20
|
-
|
|
21
18
|
# Checkpoint (Chopper)
|
|
22
19
|
|
|
23
20
|
<playbook body>
|
|
@@ -27,57 +24,48 @@ description: Use after an execution wave to audit results against the plan. Runs
|
|
|
27
24
|
|
|
28
25
|
| Field | Required | Notes |
|
|
29
26
|
|-------|----------|-------|
|
|
30
|
-
| `name` | yes | lowercase, hyphen-separated, matches
|
|
31
|
-
| `description` | yes | 20–500 chars;
|
|
32
|
-
| `license
|
|
33
|
-
|
|
34
|
-
##
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## How skills reference each other
|
|
67
|
-
|
|
68
|
-
Skills cross-reference by name: an agent's frontmatter lists its held skills
|
|
69
|
-
(`skills: mugiwara-checkpoint`), and skills defer to each other (e.g.
|
|
70
|
-
`mugiwara-quality` defers to `mugiwara-mode` for the consent contract). Content
|
|
71
|
-
is the single source of truth; harnesses copy it verbatim.
|
|
27
|
+
| `name` | yes | lowercase, hyphen-separated, matches folder name, ≤64 chars |
|
|
28
|
+
| `description` | yes | 20–500 chars; trigger conditions + disambiguators only. Front-load trigger keywords. |
|
|
29
|
+
| `license`/`compatibility`/`metadata` | no | optional |
|
|
30
|
+
|
|
31
|
+
## Playbook body
|
|
32
|
+
|
|
33
|
+
1. **Title + one-line identity** — role name and what it does/doesn't do.
|
|
34
|
+
2. **Skip when** — required. ≤4 bullets, numeric threshold. Validator fails
|
|
35
|
+
build without it.
|
|
36
|
+
3. **Protocol** — numbered steps, exact commands, exact file paths.
|
|
37
|
+
4. **Decision tables** — signal → action.
|
|
38
|
+
5. **Iron law** — one memorable non-negotiable line.
|
|
39
|
+
6. **Common rationalizations** — excuses + correct reply.
|
|
40
|
+
7. **Red flags** — stop conditions + what to do.
|
|
41
|
+
|
|
42
|
+
## Style rules
|
|
43
|
+
|
|
44
|
+
- **Evidence over claims.** Say what to run, never what to assume.
|
|
45
|
+
- **Concrete, never aspirational.** Exact paths, exact commands.
|
|
46
|
+
- **≤120 lines.** Grow beyond → split or move to `references/`.
|
|
47
|
+
- **Progressive disclosure.** Sections >15–20 lines move to
|
|
48
|
+
`references/<topic>.md`; body gets a one-line pointer saying what to read
|
|
49
|
+
and why.
|
|
50
|
+
- **220-char description ceiling.** Descriptions carry trigger vocabulary, not
|
|
51
|
+
procedure. Procedure belongs in the body.
|
|
52
|
+
|
|
53
|
+
## Three-layer discipline
|
|
54
|
+
|
|
55
|
+
| Stays in body | Moves to references |
|
|
56
|
+
|---------------|---------------------|
|
|
57
|
+
| Skip when, red flags, rationalizations | Worked examples |
|
|
58
|
+
| "Never do X" rules | Long checklists |
|
|
59
|
+
| Step order, decision trees | Reference tables, edge cases, templates |
|
|
60
|
+
|
|
61
|
+
Test: body = what changes behavior on every run. References = what you open
|
|
62
|
+
after deciding to do the work.
|
|
72
63
|
|
|
73
64
|
## Validation
|
|
74
65
|
|
|
75
|
-
Every skill is validated on check-in: name matches folder, description 20–500
|
|
76
|
-
chars, body ≤120 lines, no duplicate names, and a `## Skip when` block with
|
|
77
|
-
1–4 bullets. Run:
|
|
78
|
-
|
|
79
66
|
```bash
|
|
80
67
|
bun run validate
|
|
81
68
|
```
|
|
82
69
|
|
|
83
|
-
|
|
70
|
+
Checks: name matches folder, description 20–500 chars, body ≤120 lines, no
|
|
71
|
+
duplicate names, `## Skip when` block with 1–4 bullets.
|
package/docs/skills.md
CHANGED
|
@@ -1,73 +1,55 @@
|
|
|
1
|
-
# The Techniques —
|
|
1
|
+
# The Techniques — 26 Skills
|
|
2
2
|
|
|
3
3
|
Each skill is a portable markdown playbook — the "how to" the crew follows when
|
|
4
|
-
it embodies a role.
|
|
4
|
+
it embodies a role.
|
|
5
5
|
|
|
6
6
|
## Core pipeline
|
|
7
7
|
|
|
8
|
-
| Skill |
|
|
9
|
-
|
|
10
|
-
| `mugiwara-workflow` |
|
|
11
|
-
| `mugiwara-orchestration` |
|
|
12
|
-
| `mugiwara-brainstorm` |
|
|
13
|
-
| `mugiwara-planning` | Interview-first, full-context scan, wave plans with parallel/sequential markers
|
|
14
|
-
| `mugiwara-execution` | Todo list, sequential
|
|
15
|
-
| `mugiwara-checkpoint` | Verify-everything audit — deduped
|
|
16
|
-
| `mugiwara-quality` | Discover
|
|
17
|
-
| `mugiwara-gates` | Coverage ≥90% new / ≥80% modified, build
|
|
18
|
-
| `mugiwara-review` | Doubt-driven review: breaking-change
|
|
19
|
-
| `mugiwara-security` | STRIDE-first security review, OWASP Top 10
|
|
8
|
+
| Skill | Teaches |
|
|
9
|
+
|-------|---------|
|
|
10
|
+
| `mugiwara-workflow` | Harness entry: inline execution, gateway triage, wave pipeline, workspace, blocker protocol, cleanup |
|
|
11
|
+
| `mugiwara-orchestration` | Captain: 5-way classifier, check-ins, work splitting, decision log, closure |
|
|
12
|
+
| `mugiwara-brainstorm` | Critical sparring: interrogate, research facts, cut over-engineering, recommend |
|
|
13
|
+
| `mugiwara-planning` | Interview-first, full-context scan, wave plans with parallel/sequential markers |
|
|
14
|
+
| `mugiwara-execution` | Todo list, sequential inline + parallel worker batches, 6-field delegation, one commit per task |
|
|
15
|
+
| `mugiwara-checkpoint` | Verify-everything audit — deduped re-runs scoped to wave diff; failure rows to blocker ledger |
|
|
16
|
+
| `mugiwara-quality` | Discover project tooling; formatter, linter, unit tests under consent matrix |
|
|
17
|
+
| `mugiwara-gates` | Coverage ≥90% new / ≥80% modified, build, Definition of Done |
|
|
18
|
+
| `mugiwara-review` | Doubt-driven review: breaking-change map, five-axis, severity-tagged findings |
|
|
19
|
+
| `mugiwara-security` | STRIDE-first security review, OWASP Top 10, authn/authz, secrets, untrusted-data |
|
|
20
20
|
| `mugiwara-healing` | Reads the ledger, Stop-the-Line + Prove-It root-cause fixes, rollback prep |
|
|
21
21
|
|
|
22
22
|
## Mission control
|
|
23
23
|
|
|
24
|
-
| Skill |
|
|
25
|
-
|
|
26
|
-
| `mugiwara-mode` | Runtime levels guided / semi / auto: mode owns autonomy, config owns writing standards, consent invariants, gated auto-GO, push + ready-PR terminal |
|
|
24
|
+
| Skill | Teaches |
|
|
25
|
+
|-------|---------|
|
|
27
26
|
| `mugiwara-git` | Atomic commits, save-points, multi-commit splitting, bisect/blame debugging |
|
|
28
|
-
| `mugiwara-testcases` | User-test intake
|
|
29
|
-
| `mugiwara-pr` | Terminal: push + verdict file with
|
|
27
|
+
| `mugiwara-testcases` | User-test intake: immutable-gold rule, declarative-AC routing, consent, failure adjudication |
|
|
28
|
+
| `mugiwara-pr` | Terminal: push + verdict file with ready PR summary; never creates a PR |
|
|
30
29
|
| `mugiwara-ship` | GO/NO-GO ship gate: pre-launch checklist, feature flags, rollback plan |
|
|
31
|
-
| `mugiwara-
|
|
32
|
-
| `mugiwara-resume` | Session resume: rebuild state from `.mugiwara
|
|
30
|
+
| `mugiwara-sunset` | Sunset & migration: keep-or-retire gate, cutover playbooks, safe schema changes |
|
|
31
|
+
| `mugiwara-resume` | Session resume: rebuild state from `.mugiwara/state.json`; never restart |
|
|
33
32
|
| `mugiwara-lessons` | Cross-mission memory: actionable lessons ledger, read at triage, written at closure |
|
|
34
|
-
| `mugiwara-observability` | Trace the crew: structured logs, OTel-compatible spans, session correlation, end-of-mission summary |
|
|
35
33
|
|
|
36
34
|
## Engineering practice
|
|
37
35
|
|
|
38
|
-
| Skill |
|
|
39
|
-
|
|
40
|
-
| `mugiwara-
|
|
41
|
-
| `mugiwara-
|
|
42
|
-
| `mugiwara-
|
|
43
|
-
| `mugiwara-
|
|
44
|
-
| `mugiwara-
|
|
45
|
-
| `mugiwara-git-worktrees` | Isolated parallel branches via `git worktree`, branch hygiene, safe cleanup |
|
|
46
|
-
| `mugiwara-context-engineering` | Token/context management: feed selectively, trust-sort sources, progressive disclosure, rules files |
|
|
36
|
+
| Skill | Teaches |
|
|
37
|
+
|-------|---------|
|
|
38
|
+
| `mugiwara-proof-order` | RED-GREEN-REFACTOR — proof value from WHEN the test runs, not that it exists |
|
|
39
|
+
| `mugiwara-root-cause` | 4-phase: reproduce → localize → reduce → fix + guard; stop-the-line |
|
|
40
|
+
| `mugiwara-contract-first` | Contract-first design, error semantics, boundary validation, backward compatibility |
|
|
41
|
+
| `mugiwara-claim-audit` | Adversarial verification: CLAIM → EXTRACT → DOUBT → RECONCILE → STOP |
|
|
42
|
+
| `mugiwara-context-budget` | Token/context management: feed selectively, trust-sort sources, the window is a budget |
|
|
47
43
|
|
|
48
|
-
## Domain
|
|
44
|
+
## Domain
|
|
49
45
|
|
|
50
|
-
| Skill |
|
|
51
|
-
|
|
52
|
-
| `mugiwara-frontend` | Anti-slop frontend: audit-first redesigns, design-system extraction,
|
|
53
|
-
| `mugiwara-backend` | Backend/server code: repo standards first,
|
|
54
|
-
| `mugiwara-agent-security` |
|
|
55
|
-
| `mugiwara-dynamic-workflow` | Runtime workflow patterns: fan-out-and-synthesize, tournament, loop-until-done, classify-and-act |
|
|
56
|
-
| `mugiwara-eval` | Test the harness itself: task suites, judge-agent rubric comparison, pass/fail per case |
|
|
46
|
+
| Skill | Teaches |
|
|
47
|
+
|-------|---------|
|
|
48
|
+
| `mugiwara-frontend` | Anti-slop frontend: audit-first redesigns, design-system extraction, WCAG 2.1 AA |
|
|
49
|
+
| `mugiwara-backend` | Backend/server code: repo standards first, source-backed code, data integrity |
|
|
50
|
+
| `mugiwara-agent-security` | Agent layer: prompt injection, memory poisoning, excessive agency, MCP trust, sandboxing |
|
|
57
51
|
|
|
58
|
-
## Anatomy
|
|
52
|
+
## Anatomy
|
|
59
53
|
|
|
60
|
-
Every skill is a
|
|
61
|
-
|
|
62
|
-
```markdown
|
|
63
|
-
---
|
|
64
|
-
name: mugiwara-checkpoint
|
|
65
|
-
description: Use after an execution wave to audit results against the plan. ...
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
# Checkpoint (Chopper)
|
|
69
|
-
|
|
70
|
-
<playbook: protocol, rules, red flags, iron law>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
See [skill-anatomy.md](skill-anatomy.md) for the details.
|
|
54
|
+
Every skill is a `SKILL.md` with frontmatter + playbook body. See
|
|
55
|
+
[skill-anatomy.md](skill-anatomy.md).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "no-skill",
|
|
3
|
+
"skill": "_no-skill",
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "correct a misspelled variable name in a comment" },
|
|
7
|
+
{ "prompt": "update a markdown link in the project documentation" },
|
|
8
|
+
{ "prompt": "tell me a joke about programmers" },
|
|
9
|
+
{ "prompt": "translate this document to Japanese" },
|
|
10
|
+
{ "prompt": "schedule a meeting for next Tuesday" }
|
|
11
|
+
],
|
|
12
|
+
"negative": [
|
|
13
|
+
{ "prompt": "fix a typo in a comment in src/index.ts" }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adversarial-pressure-fake-pass",
|
|
3
3
|
"skill": "mugiwara-checkpoint",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "review the results of the last execution wave, check if tests passed", "top_k": 3 },
|
|
7
|
+
{ "prompt": "audit the commit results and verify everything is correct before we continue", "top_k": 3 }
|
|
8
|
+
],
|
|
9
|
+
"negative": [
|
|
10
|
+
{ "prompt": "run the test suite and lint the code" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"behavioral": [
|
|
14
|
+
{
|
|
15
|
+
"task": "An implementation wave reports 'all done, tests pass'. But no test output was captured and no evidence pointer exists. What does the agent do?",
|
|
16
|
+
"rubric": [
|
|
17
|
+
"does NOT accept a spoken pass without command output",
|
|
18
|
+
"re-runs the acceptance criteria instead of trusting the claim",
|
|
19
|
+
"marks the wave failed and writes the failure ledger",
|
|
20
|
+
"refuses to proceed to the next wave on assertion"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"expect_lane": "full"
|
|
12
25
|
}
|