@ionivetech/mugiwara 0.6.6 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -7
  3. package/.codex-plugin/plugin.json +2 -7
  4. package/.cursor-plugin/plugin.json +2 -7
  5. package/.kimi-plugin/plugin.json +2 -7
  6. package/.opencode/plugins/mugiwara.mjs +3 -18
  7. package/AGENTS.md +5 -4
  8. package/GEMINI.md +3 -3
  9. package/README.md +69 -63
  10. package/content/agents/brook-healing.md +8 -4
  11. package/content/agents/chopper-checkpoint.md +7 -3
  12. package/content/agents/eval-runner.md +4 -4
  13. package/content/agents/franky-gates.md +3 -3
  14. package/content/agents/jinbe-security.md +6 -7
  15. package/content/agents/luffy-orchestrator.md +11 -13
  16. package/content/agents/memory-keeper.md +4 -4
  17. package/content/agents/nami-planner.md +4 -4
  18. package/content/agents/resume-coordinator.md +7 -7
  19. package/content/agents/robin-reviewer.md +7 -3
  20. package/content/agents/sanji-quality.md +2 -2
  21. package/content/agents/skeptic-verifier.md +2 -2
  22. package/content/agents/usopp-brainstorm.md +3 -3
  23. package/content/agents/zoro-execution.md +6 -6
  24. package/content/skills/mugiwara-backend/SKILL.md +2 -0
  25. package/content/skills/mugiwara-backend/references/database.md +61 -0
  26. package/content/skills/mugiwara-brainstorm/SKILL.md +1 -1
  27. package/content/skills/mugiwara-checkpoint/SKILL.md +6 -5
  28. package/content/skills/mugiwara-checkpoint/references/ledger-format.md +1 -1
  29. package/content/skills/mugiwara-execution/SKILL.md +8 -8
  30. package/content/skills/mugiwara-execution/references/dispatch.md +1 -1
  31. package/content/skills/mugiwara-execution/references/resume-batching.md +2 -2
  32. package/content/skills/mugiwara-frontend/SKILL.md +3 -2
  33. package/content/skills/mugiwara-frontend/references/checklist.md +14 -0
  34. package/content/skills/mugiwara-gates/SKILL.md +8 -5
  35. package/content/skills/mugiwara-healing/SKILL.md +2 -2
  36. package/content/skills/mugiwara-lessons/SKILL.md +2 -2
  37. package/content/skills/mugiwara-orchestration/SKILL.md +7 -7
  38. package/content/skills/mugiwara-orchestration/references/check-ins.md +2 -2
  39. package/content/skills/mugiwara-orchestration/references/closure.md +17 -12
  40. package/content/skills/mugiwara-orchestration/references/triage-escalation.md +11 -1
  41. package/content/skills/mugiwara-planning/SKILL.md +3 -18
  42. package/content/skills/mugiwara-planning/references/plan-template.md +2 -2
  43. package/content/skills/mugiwara-quality/SKILL.md +5 -2
  44. package/content/skills/mugiwara-resume/SKILL.md +2 -2
  45. package/content/skills/mugiwara-review/SKILL.md +3 -2
  46. package/content/skills/mugiwara-security/SKILL.md +1 -1
  47. package/content/skills/mugiwara-ship/SKILL.md +1 -1
  48. package/content/skills/mugiwara-ship/references/cleanup.md +17 -16
  49. package/content/skills/mugiwara-workflow/SKILL.md +9 -12
  50. package/content/skills/mugiwara-workflow/references/workspace-layout.md +39 -38
  51. package/dist/mugiwara.js +904 -462
  52. package/gemini-extension.json +1 -1
  53. package/hooks/auto-savepoint.js +18 -10
  54. package/hooks/auto-savepoint.ts +23 -23
  55. package/hooks/engagement-marker.js +1 -1
  56. package/hooks/engagement-marker.ts +1 -1
  57. package/hooks/pipeline-guard.js +16 -12
  58. package/hooks/pipeline-guard.ts +22 -19
  59. package/hooks/session-start.js +13 -10
  60. package/hooks/session-start.ts +24 -19
  61. package/package.json +2 -2
  62. package/plugin.json +1 -1
  63. package/references/complexity.md +27 -4
  64. package/references/definition-of-done.md +1 -1
  65. package/references/multi-actor.md +0 -3
  66. package/references/prose-style.md +54 -0
  67. package/scripts/check-doc-links.ts +40 -0
  68. package/scripts/conformance.ts +6 -16
  69. package/scripts/coverage-gate.ts +20 -6
  70. package/scripts/gate-selftest.ts +118 -7
  71. package/scripts/lane.sh +54 -8
  72. package/scripts/lib/patterns.sh +5 -0
  73. package/scripts/policy-force.ts +22 -0
  74. package/scripts/retrieval-eval.ts +1 -1
  75. package/scripts/savepoint.sh +136 -58
  76. package/scripts/validate-content.ts +22 -9
  77. package/scripts/verify-install.ts +9 -7
  78. package/src/args.ts +2 -2
  79. package/src/budget.ts +56 -0
  80. package/src/cli.ts +161 -110
  81. package/src/continue.ts +29 -10
  82. package/src/installer.ts +25 -20
  83. package/src/integrity.ts +158 -0
  84. package/src/mission.ts +228 -95
  85. package/src/policy.ts +156 -0
  86. package/src/provenance.ts +116 -0
  87. package/src/rollback.ts +95 -0
  88. package/src/routing.ts +69 -0
  89. package/src/run.ts +2 -2
  90. package/src/sign.ts +61 -0
  91. package/src/targets/claude.ts +2 -2
  92. package/.opencode/commands/mugiwara-execute.md +0 -13
  93. package/.opencode/commands/mugiwara-heal.md +0 -13
  94. package/.opencode/commands/mugiwara-onboard.md +0 -14
  95. package/.opencode/commands/mugiwara-plan.md +0 -17
  96. package/.opencode/commands/mugiwara-ship.md +0 -13
  97. package/.opencode/commands/using-mugiwara.md +0 -20
  98. package/content/skills/mugiwara-agent-security/SKILL.md +0 -58
  99. package/content/skills/mugiwara-agent-security/references/checklist.md +0 -20
  100. package/content/skills/mugiwara-context-budget/SKILL.md +0 -66
  101. package/content/skills/mugiwara-context-budget/references/context-budget.md +0 -37
  102. package/content/skills/mugiwara-pr/SKILL.md +0 -69
  103. package/content/skills/mugiwara-pr/references/verdict-format.md +0 -31
  104. package/content/skills/mugiwara-sunset/SKILL.md +0 -82
  105. package/content/skills/using-mugiwara/SKILL.md +0 -51
  106. package/references/token-budget.md +0 -56
  107. package/scripts/evidence.sh +0 -81
  108. package/scripts/initiative.ts +0 -296
  109. package/scripts/mission-report.sh +0 -293
  110. package/src/onboard.ts +0 -207
@@ -5,13 +5,13 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "The Straw Hat crew for AI agents",
8
- "version": "0.6.6"
8
+ "version": "0.7.0"
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.6",
14
+ "version": "0.7.0",
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.6",
4
+ "version": "0.7.0",
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"
@@ -33,12 +33,10 @@
33
33
  "memory-keeper"
34
34
  ],
35
35
  "skills": [
36
- "mugiwara-agent-security",
37
36
  "mugiwara-backend",
38
37
  "mugiwara-brainstorm",
39
38
  "mugiwara-checkpoint",
40
39
  "mugiwara-claim-audit",
41
- "mugiwara-context-budget",
42
40
  "mugiwara-contract-first",
43
41
  "mugiwara-execution",
44
42
  "mugiwara-frontend",
@@ -48,17 +46,14 @@
48
46
  "mugiwara-lessons",
49
47
  "mugiwara-orchestration",
50
48
  "mugiwara-planning",
51
- "mugiwara-pr",
52
49
  "mugiwara-quality",
53
50
  "mugiwara-resume",
54
51
  "mugiwara-review",
55
52
  "mugiwara-root-cause",
56
53
  "mugiwara-security",
57
54
  "mugiwara-ship",
58
- "mugiwara-sunset",
59
55
  "mugiwara-testcases",
60
- "mugiwara-workflow",
61
- "using-mugiwara"
56
+ "mugiwara-workflow"
62
57
  ]
63
58
  }
64
59
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mugiwara",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
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"
@@ -17,12 +17,10 @@
17
17
  "skills": "./content/skills/",
18
18
  "metadata": {
19
19
  "skills": [
20
- "mugiwara-agent-security",
21
20
  "mugiwara-backend",
22
21
  "mugiwara-brainstorm",
23
22
  "mugiwara-checkpoint",
24
23
  "mugiwara-claim-audit",
25
- "mugiwara-context-budget",
26
24
  "mugiwara-contract-first",
27
25
  "mugiwara-execution",
28
26
  "mugiwara-frontend",
@@ -32,17 +30,14 @@
32
30
  "mugiwara-lessons",
33
31
  "mugiwara-orchestration",
34
32
  "mugiwara-planning",
35
- "mugiwara-pr",
36
33
  "mugiwara-quality",
37
34
  "mugiwara-resume",
38
35
  "mugiwara-review",
39
36
  "mugiwara-root-cause",
40
37
  "mugiwara-security",
41
38
  "mugiwara-ship",
42
- "mugiwara-sunset",
43
39
  "mugiwara-testcases",
44
- "mugiwara-workflow",
45
- "using-mugiwara"
40
+ "mugiwara-workflow"
46
41
  ],
47
42
  "agents": [
48
43
  "brook-healing",
@@ -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.6",
5
+ "version": "0.7.0",
6
6
  "author": {
7
7
  "name": "ionivetech"
8
8
  },
@@ -18,12 +18,10 @@
18
18
  "skills": "./content/skills/",
19
19
  "metadata": {
20
20
  "skills": [
21
- "mugiwara-agent-security",
22
21
  "mugiwara-backend",
23
22
  "mugiwara-brainstorm",
24
23
  "mugiwara-checkpoint",
25
24
  "mugiwara-claim-audit",
26
- "mugiwara-context-budget",
27
25
  "mugiwara-contract-first",
28
26
  "mugiwara-execution",
29
27
  "mugiwara-frontend",
@@ -33,17 +31,14 @@
33
31
  "mugiwara-lessons",
34
32
  "mugiwara-orchestration",
35
33
  "mugiwara-planning",
36
- "mugiwara-pr",
37
34
  "mugiwara-quality",
38
35
  "mugiwara-resume",
39
36
  "mugiwara-review",
40
37
  "mugiwara-root-cause",
41
38
  "mugiwara-security",
42
39
  "mugiwara-ship",
43
- "mugiwara-sunset",
44
40
  "mugiwara-testcases",
45
- "mugiwara-workflow",
46
- "using-mugiwara"
41
+ "mugiwara-workflow"
47
42
  ],
48
43
  "agents": [
49
44
  "brook-healing",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mugiwara",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
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"
@@ -17,12 +17,10 @@
17
17
  "skills": "./content/skills/",
18
18
  "metadata": {
19
19
  "skills": [
20
- "mugiwara-agent-security",
21
20
  "mugiwara-backend",
22
21
  "mugiwara-brainstorm",
23
22
  "mugiwara-checkpoint",
24
23
  "mugiwara-claim-audit",
25
- "mugiwara-context-budget",
26
24
  "mugiwara-contract-first",
27
25
  "mugiwara-execution",
28
26
  "mugiwara-frontend",
@@ -32,17 +30,14 @@
32
30
  "mugiwara-lessons",
33
31
  "mugiwara-orchestration",
34
32
  "mugiwara-planning",
35
- "mugiwara-pr",
36
33
  "mugiwara-quality",
37
34
  "mugiwara-resume",
38
35
  "mugiwara-review",
39
36
  "mugiwara-root-cause",
40
37
  "mugiwara-security",
41
38
  "mugiwara-ship",
42
- "mugiwara-sunset",
43
39
  "mugiwara-testcases",
44
- "mugiwara-workflow",
45
- "using-mugiwara"
40
+ "mugiwara-workflow"
46
41
  ],
47
42
  "agents": [
48
43
  "brook-healing",
@@ -1,8 +1,9 @@
1
1
  // mugiwara — OpenCode plugin.
2
2
  //
3
3
  // Registers skills/agents via config hook (superpowers pattern: one plugin,
4
- // zero file-copy), announces the crew at session start, and handles runtime
5
- // mode switching. Helpers live in mugiwara-helpers.mjs this module has a
4
+ // zero file-copy) and handles runtime mode switching. Deliberately silent at
5
+ // session start: mugiwara activates only when its skills/agents are used.
6
+ // Helpers live in mugiwara-helpers.mjs — this module has a
6
7
  // single export because OpenCode's legacy loader calls every exported function
7
8
  // as a plugin (same constraint ponytail documents).
8
9
  //
@@ -65,9 +66,6 @@ function readBannerColors() {
65
66
  }
66
67
  }
67
68
 
68
- const ANNOUNCE =
69
- "Mugiwara crew available. The workflow auto-activates for non-trivial requests — no need to call `/using-mugiwara` at session start (it is an optional router). Run the crew pipeline inline in the main conversation: embody ONE crew role at a time using its skill, wait for its report, then move to the next. Never Task-dispatch a crew member — the crew runs in the main thread; subagents only for [PARALLEL] task batches, concurrent review/security, and independent re-run checks. Progress shows as checkpoint reports at wave/stage boundaries, pausing on failure or risk. Every wave opens with a banner `===== ⚔️ WAVE N — CREW (ROLE) =====` and closes with a handoff `→ Wave N+1 — Crew (Role)`; Zoro shows per-task progress `[task N/M]` with each task's evidence. Switch mode with `/mugiwara` (guided|semi|auto). See skills/mugiwara-workflow.";
70
-
71
69
  function parseFrontmatter(text) {
72
70
  const m = text.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);
73
71
  if (!m) throw new Error('Missing frontmatter fence (---)');
@@ -172,17 +170,4 @@ export default async () => ({
172
170
  }
173
171
  }
174
172
  },
175
-
176
- 'experimental.chat.system.transform': async (_input, output) => {
177
- if (!output?.system || !Array.isArray(output.system)) return;
178
- if (!output.system.some((s) => s.includes('Mugiwara crew available'))) {
179
- if (output.system.length > 0) {
180
- output.system[output.system.length - 1] += '\n\n' + ANNOUNCE;
181
- } else {
182
- output.system.push(ANNOUNCE);
183
- }
184
- }
185
- const active = `Active mode: ${readMode()} (guided|semi|auto; flip applies next wave).`;
186
- if (!output.system.some((s) => s.includes('Active mode:'))) output.system.push(active);
187
- },
188
173
  });
package/AGENTS.md CHANGED
@@ -9,8 +9,9 @@ exceptions. Comments in source code should be English. This conversation is the
9
9
  only place Indonesian is acceptable.
10
10
 
11
11
  **`.mugiwara/` artifacts are English too.** Every file the crew writes —
12
- `plans/`, `logs/`, `results/`, `reports/`, `spec/`, `state/`, `continue/`,
13
- `issues/`, `review/` is written in English, one language only. A mission
12
+ Every `.mugiwara/missions/<mission>/` artifact `plan.md`, `flows/*`,
13
+ `report.md`, `spec.md`, `decisions.md`, `blockers.md`, `review.md`,
14
+ state and continue JSON — is written in English, one language only. A mission
14
15
  artifact in any other language is a defect, not a style choice. The audit
15
16
  trail is read by the whole team and by future sessions; it must not depend on
16
17
  the author's conversational language.
@@ -184,7 +185,7 @@ mention every agent file. Enforced by `--check-docs`.
184
185
 
185
186
  ## Skill count
186
187
 
187
- 26 is the ceiling. A new skill replaces an old one — never add to grow.
188
+ 21 is the ceiling. A new skill replaces an old one — never add to grow.
188
189
 
189
190
  ## Commit style
190
191
 
@@ -193,7 +194,7 @@ Conventional Commits: `feat:`, `fix:`, `refactor:`, `docs:`, `chore:`.
193
194
  ## Directory map
194
195
 
195
196
  ```
196
- content/skills/ — 26 skill dirs, each with SKILL.md + optional references/
197
+ content/skills/ — 21 skill dirs, each with SKILL.md + optional references/
197
198
  content/agents/ — 14 agent .md files (11 user-facing + 3 internal)
198
199
  references/ — shared reference files (definition-of-done, source-grounding, etc.)
199
200
  docs/ — user-facing documentation
package/GEMINI.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Mugiwara
2
2
 
3
3
  The Straw Hat crew of AI agents and skills. 11 specialist agents — Luffy
4
- orchestrates, Nami plans, Zoro executes, Chopper audits, Brook heals — plus 26
4
+ orchestrates, Nami plans, Zoro executes, Chopper audits, Brook heals — plus 21
5
5
  skills covering brainstorming, planning, execution, checkpointing, quality,
6
6
  gates, review, security, and self-healing.
7
7
 
8
- Start any non-trivial mission by loading the `using-mugiwara` skill (or ask "how do I
9
- use mugiwara?") — it routes you to the right crew member. See
8
+ Start any non-trivial mission by loading the `mugiwara-orchestration` skill
9
+ it is the gatekeeper: classify, route, check-in, close. See
10
10
  `content/skills/mugiwara-workflow/SKILL.md` for the full pipeline.
11
11
 
12
12
  For development standards when working on mugiwara itself, see `AGENTS.md`.
package/README.md CHANGED
@@ -27,8 +27,7 @@ every agent, every skill, every rule is static markdown.
27
27
 
28
28
  ## See the evidence
29
29
 
30
- A closed mission leaves a report you can actually read. This is the exact
31
- format `mugiwara run mission-report.sh` produces:
30
+ A closed mission leaves a report you can actually read — and after `mugiwara archive <mission>`, the whole trail folds INTO it. This is the shape of `.mugiwara/missions/<mission>/report.md`:
32
31
 
33
32
  # Mission: invitation-accepted-flow . 2026-08-11
34
33
 
@@ -43,16 +42,16 @@ format `mugiwara run mission-report.sh` produces:
43
42
 
44
43
  | Flow stage | Artifact | Verdict |
45
44
  |------|----------|---------|
46
- | Execute (Flow 3) | `01-execution.md` | PASS |
47
- | Checkpoint (Flow 4) | `02-audit.md` | PASS |
48
- | Quality (Flow 5) | `03-quality.md` | PASS |
49
- | Gates (Flow 6) | `04-gates.md` | PASS |
50
- | Healing (Flow 8) | `05-healing.md` | PASS |
51
- | Closure (Flow 9) | `06-closure.md` | GO |
45
+ | Execute (Flow 3) | `flows/01-execution.md` | PASS |
46
+ | Checkpoint (Flow 4) | `flows/02-audit.md` | PASS |
47
+ | Quality (Flow 5) | `flows/03-quality.md` | PASS |
48
+ | Gates (Flow 6) | `flows/04-gates.md` | PASS |
49
+ | Healing (Flow 8) | `flows/05-healing.md` | PASS |
50
+ | Closure (Flow 9) | `flows/06-closure.md` | GO |
52
51
 
53
52
  ## Review & blockers
54
53
 
55
- Review + security files: invitation-accepted-flow-review.md, invitation-accepted-flow-security.md
54
+ Review + security findings: review.md, security.md
56
55
  Findings: 3
57
56
  Blocker ledger rows: 1
58
57
 
@@ -78,7 +77,7 @@ all nine flow stages. Mugiwara itself is free; token usage depends on the lane:
78
77
  | Standard (feature) | 5–7 | ~13k | 25k |
79
78
  | Full (architecture) | 9–11 | ~23k | 50k |
80
79
 
81
- Usage tracked in `.mugiwara/state/<mission>/[member].json` per mission. Budget warns at 1.5×,
80
+ Usage tracked in `.mugiwara/missions/<mission>/[member].json` per mission. Budget warns at 1.5×,
82
81
  pauses at 3×. Lane bases are measured from the skills/agents loaded per lane
83
82
  by `scripts/lane-base.ts` — the constants fail CI if they drift from content
84
83
  load.
@@ -98,7 +97,7 @@ load.
98
97
  npx @ionivetech/mugiwara@latest install --target all --yes
99
98
  ```
100
99
 
101
- First run: run `mugiwara onboard` in your terminal for guided setup (zero-LLM wizard). Then ask something non-trivial:
100
+ First run: install writes `.mugiwara/config` with defaults edit it anytime (mode, coverage, depths). Then ask something non-trivial:
102
101
 
103
102
  ```
104
103
  > add role-based access control: admin, editor, viewer
@@ -117,14 +116,14 @@ pipeline config to write.**
117
116
  | You say | What happens |
118
117
  | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
118
  | `add search bar to products page` | Luffy triages → Nami plans 3 tasks → Zoro executes TDD → Chopper audits → Sanji runs quality → Franky gates → Robin reviews → code pushed, PR summary ready |
120
- | `split payment system: gateway, ledger, fraud` | Nami interviews team → writes initiative plan with sub-missions + assignees → each dev works in own branch → the plan's sub-mission table shows progress → all done initiative closure |
119
+ | `split payment system: gateway, ledger, fraud` | Nami interviews → writes one plan split into sub-missions, each with its own branch and done-criteria → each dev resumes only their own sub-mission → all mergeable at the end |
121
120
  | `Brook, fix the failing login test` | Healer reads failure ledger, root-cause fixes, proves fix ≤3 cycles |
122
121
  | `Jinbe, audit auth middleware` | STRIDE + OWASP + dependency audit. Read-only — never touches code |
123
122
  | `/mugiwara auto` | Switches to full autonomy — all flow stages run without asking, from the next flow stage |
124
123
 
125
124
  - **Full pipeline** when the task is big or direction is unclear
126
125
  - **Direct agent** when you know exactly what you need — say the name
127
- - **Slash commands** when you want to drive: `/mugiwara-plan`, `/mugiwara-review`, `/mugiwara-security`, `/mugiwara-ship`, `/mugiwara onboard`
126
+ - **Slash commands** when you want to drive: `/mugiwara`, `/mugiwara-continue`, `/mugiwara-review`, `/mugiwara-security`
128
127
 
129
128
  → [Full walkthrough](docs/getting-started.md) · [Full workflow walkthrough](docs/concepts/workflow.md)
130
129
 
@@ -132,16 +131,37 @@ pipeline config to write.**
132
131
 
133
132
  ### All features
134
133
 
134
+ **Every day, on every repo:**
135
+
135
136
  | Feature | What you get |
136
137
  | ------------------------ | ----------------------------------------------------------------------------------------------- |
137
138
  | **Lane sizing** | Work auto-sized from `git diff`. Typo = instant fix. Auth migration = full pipeline. |
138
139
  | **Evidence trail** | `.mugiwara/` workspace: plans, audit reports, quality reports, review findings, blocker ledger. |
139
- | **Team collaboration** | One shared plan, per-(mission, member) state + resume. Any number of engineers, zero collisions. |
140
+ | **Closure integrity** | Archive fails on dangling links, secrets in the trail, or missing evidence. |
141
+ | **Provenance** | Per-commit attribution — agent, model, lane, evidence. `mugiwara blame`. |
142
+ | **Rollback map** | Executable `rollback.sh` per mission: exact revert commands. Human runs it. Under squash merges the diff is collapsed — `rollback.sh` contains `UNRESOLVED` guidance with `git log --grep="<mission>"` and `exit 1` instead of a silent "nothing to revert" (measured caveat). |
143
+ | **Review routing** | Ranked reading order in every report: sensitive paths first, scaffolding last. |
144
+ | **Staleness guard** | Resume warns when main moved past the mission's base. |
145
+
146
+ **When a team scales it up:**
147
+
148
+ | Feature | What you get |
149
+ | ------------------------ | ----------------------------------------------------------------------------------------------- |
150
+ | **Policy as code** | `mugiwara.policy.yml`: force lanes up, raise coverage gates, flag paths for human approval. |
151
+ | **Signed attestation** | Optional minisign signing of the report — evidence that cannot be edited after the fact. |
152
+ | **Handoff** | `mugiwara handoff`: engineer-to-engineer report from computed state. |
153
+ | **Context budget** | Trail size measured at closure; optional ceiling fails the archive like a test. |
154
+ | **Team collaboration** | One shared plan, per-(mission, member) state + resume. Zero collisions. |
155
+
156
+ **Always on, under the surface:**
157
+
158
+ | Feature | What you get |
159
+ | ------------------------ | ----------------------------------------------------------------------------------------------- |
140
160
  | **Self-healing** | Brook reads all failures at once, fixes root causes, re-runs verification. ≤3 cycles. |
141
- | **Resume from anywhere** | Session lost? Rebuilds from `.mugiwara/state/<mission>/` + machine-written `continue/<mission>/`. Continues, never restarts. Auto surfaces in-flight work (lists when ambiguous). |
161
+ | **Resume from anywhere** | Rebuilds from `.mugiwara/` state. Continues, never restarts. |
142
162
  | **12 platforms** | Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, Pi, Antigravity + CLI. |
143
163
 
144
- → All 28 features, with how-to-use + scenarios: [Every feature](docs/concepts/features.md) · [Team collaboration](docs/concepts/collaboration.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)
164
+ → All 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) · [Provenance](docs/concepts/provenance.md) · [Policy](docs/concepts/policy-as-code.md) · [Closure tools](docs/concepts/closure-tools.md) · [Permissions](docs/concepts/permissions.md)
145
165
 
146
166
  ## The pipeline
147
167
 
@@ -161,32 +181,11 @@ flowchart TB
161
181
 
162
182
  ## The crew
163
183
 
164
- 11 agents (+3 internal). Each has role boundaries — auditors
165
- and reviewers are read-only. Call them by name or let the pipeline auto-route.
166
-
167
- | Agent | Role | Permission |
168
- | -------------------- | --------------------------------------------------------------------------------------- | :-----------: |
169
- | `luffy-orchestrator` | Captain — triage, check-ins, closure | — |
170
- | `usopp-brainstorm` | Critical friend — interrogates, researches, recommends | — |
171
- | `nami-planner` | Planner — interviews, full scan, scaled plans, team initiatives | — |
172
- | `zoro-execution` | Executor — TDD per task, evidence per commit | — |
173
- | `chopper-checkpoint` | Auditor — re-runs criteria, failure ledger | **read-only** |
174
- | `sanji-quality` | Quality — format, lint, test, duplication, complexity, maintainability, code attributes | — |
175
- | `franky-gates` | Gates — coverage, build, DoD, per-condition sonar gate | — |
176
- | `robin-reviewer` | Reviewer — breaking-change map, reliability rating, code attribute deep review | **read-only** |
177
- | `jinbe-security` | Security — STRIDE, OWASP, hotspots, SCA license, secret scan, responsibility | **read-only** |
178
- | `brook-healing` | Healer — reads ledger, root-cause fixes ≤3 cycles | — |
179
- | `resume-coordinator` | Resumer — rebuilds state from `.mugiwara/`, continues never restarts | — |
180
-
181
- **Internal agents** (dispatch-only):
182
-
183
- | Agent | Role | Used by |
184
- | ------------------ | ----------------------------------------------------- | ------------------------------ |
185
- | `skeptic-verifier` | Adversarial verifier — doubts every claim | Flow 4.5, high-stakes missions |
186
- | `eval-runner` | Harness tester — task suites, judge rubric | `bun scripts/run-evals.ts` |
187
- | `memory-keeper` | Lessons ledger — surface at start, capture at closure | Flow 0 (read), Flow 9 (write) |
188
-
189
- → [Agent details: summoning, boundaries, parameters](docs/concepts/agents.md)
184
+ 11 agents (+3 internal), one specialist per role — auditors and reviewers are
185
+ read-only by declared tool scope. Full table, summoning syntax, and boundary
186
+ rules live in one place:
187
+
188
+ [Agent details: roles, scopes, summoning, boundaries](docs/concepts/agents.md)
190
189
 
191
190
  ## Team collaboration
192
191
 
@@ -196,36 +195,34 @@ colliding, and one engineer can juggle several missions.
196
195
 
197
196
  ```
198
197
  .mugiwara/
199
- ├── state/<mission>/state.json # solo state
200
- ├── state/<mission>/<member>.json # your team member state
201
- ├── continue/<mission>/state.json # solo resume point
202
- ├── continue/<mission>/<member>.json # your resume point
203
- └── plans/<mission>.md # ONE shared plan (source of truth)
198
+ └── missions/<mission>/
199
+ ├── plan.md # ONE shared plan (source of truth)
200
+ ├── state.json # solo state
201
+ ├── <member>.json # per-member state
202
+ ├── continue.json # solo resume point
203
+ └── continue-<member>.json # per-member resume point
204
204
  ```
205
205
 
206
206
  Quick start for a team:
207
207
 
208
208
  ```bash
209
- # Nami writes one plan with a ## Sub-missions table (assignee + branch per member)
210
- /mugiwara-plan # guided/semi asks "Solo or team?"
209
+ # Nami writes one plan; very-large scopes get a ## Mission split with a
210
+ # sub-mission per part, each with its own branch and done-criteria.
211
211
 
212
- # Each member works on their own branch, resume only their own work
212
+ # Each member works on their own branch, resumes only their own work
213
213
  /mugiwara continue # list every in-flight mission for YOU
214
214
  /mugiwara continue payment-gateway # solo → resume; team → list members
215
215
  /mugiwara continue payment-gateway patty # resume exactly patty's work
216
216
 
217
217
  # Coordination radar
218
- mugiwara initiative status plans/<mission>.md # who's where
219
- mugiwara initiative conflict-check plans/<mission>.md # shared-file overlap
220
- # In an installed project: read the sub-mission table in the plan doc, and
221
- # `mugiwara status` for computed per-mission position.
218
+ mugiwara status # computed per-mission position: flow stage, tasks, lane, blockers
222
219
  ```
223
220
 
224
221
  Auto mode runs every flow stage autonomously — and never downgrades to guided
225
222
  mid-mission. In a team plan, auto covers **your member scope only**: resuming
226
223
  your sub-mission runs it to ship, never the other members'.
227
224
 
228
- → [Full collaboration guide with a worked example](docs/concepts/collaboration.md) · [Multi-actor reference](references/multi-actor.md)
225
+ → [Multi-actor reference](references/multi-actor.md)
229
226
 
230
227
  ## When not to use Mugiwara
231
228
 
@@ -251,11 +248,12 @@ Switch mode any time: `/mugiwara guided | semi | auto`. Or edit `.mugiwara/confi
251
248
  | `coverage_modified` | 80 | Coverage threshold for modified files (%) |
252
249
  | `review_depth` | full | full / standard / quick — Robin's review depth |
253
250
  | `quality_depth` | full | full / standard / quick — Sanji's check depth |
251
+ | `verify_merged` | off | on merges Flow 5+6 into one verify pass (never Lane 3) |
254
252
  | `delegate_threshold`| 60 | % of token budget at which remaining tasks dispatch to workers |
255
253
  | `heal_max_cycles` | 3 | Max heal-loop cycles before human escalation |
256
254
  | `verbosity` | normal | normal / full — how much the crew echoes. `normal` hides investigation steps (reads, greps) and file contents; edits, results, decisions stay visible. `full` echoes everything. Never suppresses decisions, questions, blockers, or lane rises |
257
255
 
258
- Set via `mugiwara onboard` or edit directly. Unknown keys ignored. Project
256
+ Set via edit directly (`.mugiwara/config`). Unknown keys ignored. Project
259
257
  config (`.mugiwara/config`) overrides global (`~/.mugiwara/config`).
260
258
 
261
259
  **How much does the crew ask you?**
@@ -276,14 +274,12 @@ mid-mission. Only a genuine blocker or the heal halt pauses.
276
274
 
277
275
  | Need | Command / Doc |
278
276
  | ----------------------- | ---------------------------------------- |
279
- | First-time setup | `mugiwara onboard` (terminal) or `/mugiwara onboard` |
280
- | Plan a feature | `/mugiwara-plan` or just describe it |
281
277
  | Review a PR diff | `/mugiwara-review` or "review this PR" |
282
278
  | Security audit | `/mugiwara-security` or "Jinbe, audit X" |
283
- | Ship gate check | `/mugiwara-ship` |
284
- | See initiative progress | `mugiwara initiative status <plan>` |
285
279
  | Resume a mission | `/mugiwara continue <mission> [member]` or "where were we?" |
286
280
  | See mission position | `mugiwara status` (flow stage, tasks, lane, blockers, budget) |
281
+ | Close out a mission | `mugiwara archive <mission>` — folds the trail into report.md |
282
+ | Tidy closed missions | `mugiwara clean` (batch; `--all --force` includes in-flight) |
287
283
  | Switch mode | `/mugiwara guided\|semi\|auto` |
288
284
  | Check gate locally | `bun run gate` |
289
285
  | All docs | [docs/](docs/) |
@@ -418,7 +414,7 @@ Uninstall: `mugiwara uninstall`
418
414
 
419
415
  </details>
420
416
 
421
- All platforms get the full crew — 11 agents (+3 internal), 26 skills.
417
+ All platforms get the full crew — 11 agents (+3 internal), 21 skills.
422
418
  Enforcement depth varies by harness; see the [harness matrix](docs/reference/harness-matrix.md).
423
419
 
424
420
  → [How the skills stay small: three-layer disclosure](docs/reference/skill-anatomy.md)
@@ -453,6 +449,13 @@ mugiwara update --target <id> --yes # overwrite to latest
453
449
  mugiwara uninstall # remove installed files
454
450
  mugiwara list # show installations
455
451
  mugiwara list --check # health check
452
+ mugiwara status # computed mission state
453
+ mugiwara continue [mission] [member] # resume / list in-flight
454
+ mugiwara archive <mission> # fold the trail into report.md (integrity-gated)
455
+ mugiwara clean [--all] [--before <date>] # batch-archive closed missions
456
+ mugiwara blame <path> # provenance note on the last commit touching path
457
+ mugiwara handoff <mission> # engineer-to-engineer handoff report
458
+ mugiwara sign <mission> [--verify] # optional minisign attestation of report.md
456
459
  mugiwara reset --keep-logs # wipe state, keep lessons
457
460
  ```
458
461
 
@@ -460,7 +463,9 @@ mugiwara reset --keep-logs # wipe state, keep lessons
460
463
 
461
464
  **Start here:** [Getting started](docs/getting-started.md) · [What mugiwara replaces](docs/concepts/comparison.md)
462
465
 
463
- **Concepts:** [Workflow](docs/concepts/workflow.md) · [Lanes](docs/concepts/lanes.md) · [Modes](docs/concepts/modes.md) · [Execution model](docs/concepts/execution-model.md) · [Git strategy](docs/concepts/git-strategy.md) · [Config](docs/concepts/config.md) · [Cost](docs/concepts/cost.md) · [Audit trail](docs/concepts/audit-trail.md) · [Security](docs/concepts/security.md)
466
+ **Concepts:** [Workflow](docs/concepts/workflow.md) · [Lanes](docs/concepts/lanes.md) · [Modes](docs/concepts/modes.md) · [Execution model](docs/concepts/execution-model.md) · [Git strategy](docs/concepts/git-strategy.md) · [Config](docs/concepts/config.md) · [Cost](docs/concepts/cost.md) · [Audit trail](docs/concepts/audit-trail.md) · [Security](docs/concepts/security.md) · [Provenance](docs/concepts/provenance.md) · [Policy as code](docs/concepts/policy-as-code.md) · [Closure tools](docs/concepts/closure-tools.md) · [Permissions](docs/concepts/permissions.md)
467
+
468
+ **Adopt:** [Adoption guide](docs/reference/adoption-guide.md) · [Adoption kit](docs/adoption.md)
464
469
 
465
470
  **Crew:** [Agents](docs/concepts/agents.md) · [Skills](docs/concepts/skills.md)
466
471
 
@@ -476,8 +481,9 @@ mugiwara reset --keep-logs # wipe state, keep lessons
476
481
 
477
482
  | Claim | Status |
478
483
  |---|---|
479
- | Retrieval routing rank-1 | **93.5%**, 181 probes, offline, in CI |
484
+ | Retrieval routing rank-1 | **94.3%**, 150 probes, offline, in CI |
480
485
  | Reference pointers resolve | **66/66**, 3 tiers, in CI |
486
+ | Index size published vs measured | **doc-gated** — validator fails on drift, in CI |
481
487
  | Lane constants match content load | **verified**, in CI |
482
488
  | Write-scope enforcement | **opencode only** — rules-based elsewhere |
483
489
  | Cross-harness mission behavior | **12/12 platforms** — 9 rules-dir installs + 3 marketplace manifests, in CI |
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: brook-healing
3
3
  description: Persona for mugiwara-healing. Root-cause healer: reads blocker ledger, triages failures, spawns parallel heal workers, max 3 cycles.
4
- skills: mugiwara-healing, mugiwara-git, mugiwara-sunset, mugiwara-root-cause, mugiwara-orchestration
4
+ skills: mugiwara-healing, mugiwara-git, mugiwara-root-cause, mugiwara-orchestration
5
5
  write-scope: source
6
6
  ---
7
7
 
@@ -9,7 +9,7 @@ write-scope: source
9
9
 
10
10
  ## Before you start
11
11
 
12
- 1. Read the mission state (`.mugiwara/state/<mission>/[member].json`) for this member.
12
+ 1. Read the mission state (`.mugiwara/missions/<mission>/state.json | <member>.json`) for this member.
13
13
  2. Full entry protocol: `_shared/references/agent-protocol.md` — 4 checks; run in order.
14
14
  3. Announce `→ Flow N — <crew>`. **If triage routed elsewhere, say so and stop.** Being summoned is not authorisation to do another crew member's job.
15
15
 
@@ -17,6 +17,10 @@ write-scope: source
17
17
 
18
18
  Self-healing: repairs what failed in earlier flow stages, minimally, and proves each fix. Reads the failure ledger and works it down.
19
19
 
20
+ ## Tool scope
21
+
22
+ Read + write inside the repo + shell for tests and builds. No network access — healing never reaches outside the checkout (no package downloads, no API calls); a fix that needs a new dependency escalates to Luffy instead. Enforced where the harness supports it (docs/concepts/permissions.md); on tier 2/3 this section is the contract, not enforcement.
23
+
20
24
  ## Experience
21
25
 
22
26
  Surgeon who fixes root causes, not symptoms. Abilities: triage matrix, minimal-diff discipline, rollback prep before risky fixes, proving each fix by re-running the failed check.
@@ -28,7 +32,7 @@ Flow 8 of `mugiwara-workflow`, with failure inputs from Chopper/Sanji/Franky/Rob
28
32
  ## Rules
29
33
 
30
34
  1. Follow `mugiwara-healing` exactly (triage matrix, root-cause rule, cycle counter).
31
- 2. Read `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` and work each row; mark rows fixed as you clear them.
35
+ 2. Read `.mugiwara/missions/<mission>/blockers.md` and work each row; mark rows fixed as you clear them.
32
36
  3. Never weaken or delete tests/configs to silence a failure.
33
37
  4. Apply `mugiwara-git` for fixes: atomic commits, save-points before a risky fix, rollback plan prepared for risky ones.
34
38
  5. Same failure after 3 heal cycles → stop and escalate to Luffy with full history.
@@ -38,7 +42,7 @@ Flow 8 of `mugiwara-workflow`, with failure inputs from Chopper/Sanji/Franky/Rob
38
42
 
39
43
  ## Output
40
44
 
41
- Fixed list + escalated list in `.mugiwara/results/<mission>/05-healing.md` → summarized inline → back to Flow 4 (Chopper) for re-audit.
45
+ Fixed list + escalated list in `.mugiwara/missions/<mission>/flows/05-healing.md` → summarized inline → back to Flow 4 (Chopper) for re-audit.
42
46
 
43
47
  ## Return to Luffy
44
48
 
@@ -10,7 +10,7 @@ write-scope: artifacts
10
10
 
11
11
  ## Before you start
12
12
 
13
- 1. Read the mission state (`.mugiwara/state/<mission>/[member].json`) for this member.
13
+ 1. Read the mission state (`.mugiwara/missions/<mission>/state.json | <member>.json`) for this member.
14
14
  2. Full entry protocol: `_shared/references/agent-protocol.md` — 4 checks; run in order.
15
15
  3. Announce `→ Flow N — <crew>`. **If triage routed elsewhere, say so and stop.** Being summoned is not authorisation to do another crew member's job.
16
16
 
@@ -18,6 +18,10 @@ write-scope: artifacts
18
18
 
19
19
  Audits execution against the plan. Trusts nothing; re-verifies everything — efficiently. Does not fix — findings only.
20
20
 
21
+ ## Tool scope
22
+
23
+ Read + shell (inspection commands only: `git show/log/diff`, test re-runs). Never Write/Edit a source file; the only permitted writes are mission artifacts under `.mugiwara/`. An auditor that can edit code is not an auditor — enforced where the harness supports it (see docs/concepts/permissions.md); on tier 2/3 this section is the contract, not enforcement.
24
+
21
25
  ## Experience
22
26
 
23
27
  QA lead who has caught "works on my machine" for 20 years. Abilities: re-running every claim, commit forensics (`git show --stat`), parallel-file conflict detection, honest code-vs-env classification, zero tolerance for borrowed evidence.
@@ -34,7 +38,7 @@ Flow 4 of `mugiwara-workflow`, with the plan doc and Zoro's execution report.
34
38
  4. Commit hygiene: `git log --stat <flow-base>..HEAD` once — only declared files per task commit.
35
39
  5. Parallel-conflict check: `git diff --name-only` across parallel task commits — no shared file.
36
40
  6. Classify failures honestly (code vs env); never file a code failure as `env`.
37
- 7. Append each failing criterion to `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` in the `| flow stage | task | symptom | attempted | help-needed |` format with the right category.
41
+ 7. Append each failing criterion to `.mugiwara/missions/<mission>/blockers.md` in the `| flow stage | task | symptom | attempted | help-needed |` format with the right category.
38
42
  8. DoD check: verdict per axis — correctness, quality, integration, docs, ship-readiness — then one flow-stage verdict.
39
43
  9. Never edit code; never fix a finding yourself.
40
44
  10. Issue the verdict only after the audit is complete.
@@ -42,7 +46,7 @@ Flow 4 of `mugiwara-workflow`, with the plan doc and Zoro's execution report.
42
46
 
43
47
  ## Output
44
48
 
45
- Audit report to `.mugiwara/results/<mission>/02-audit.md` + failure ledger rows in `.mugiwara/issues/` → summarized inline in the conversation (Luffy on PASS, Brook on FAIL).
49
+ Audit report to `.mugiwara/missions/<mission>/flows/02-audit.md` + failure ledger rows in `.mugiwara/missions/<mission>/blockers.md` → summarized inline in the conversation (Luffy on PASS, Brook on FAIL).
46
50
 
47
51
  ## Return to Luffy
48
52