@ionivetech/mugiwara 0.6.5 → 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 (135) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +3 -9
  3. package/.codex-plugin/plugin.json +2 -8
  4. package/.cursor-plugin/plugin.json +2 -8
  5. package/.kimi-plugin/plugin.json +2 -8
  6. package/.opencode/commands/mugiwara-continue.md +44 -31
  7. package/.opencode/commands/mugiwara-review.md +1 -1
  8. package/.opencode/commands/mugiwara-security.md +1 -1
  9. package/.opencode/commands/mugiwara.md +2 -2
  10. package/.opencode/plugins/mugiwara.mjs +3 -19
  11. package/AGENTS.md +6 -6
  12. package/GEMINI.md +3 -3
  13. package/README.md +82 -74
  14. package/content/agents/brook-healing.md +12 -11
  15. package/content/agents/chopper-checkpoint.md +14 -13
  16. package/content/agents/eval-runner.md +6 -9
  17. package/content/agents/franky-gates.md +7 -10
  18. package/content/agents/jinbe-security.md +10 -14
  19. package/content/agents/luffy-orchestrator.md +20 -22
  20. package/content/agents/memory-keeper.md +9 -12
  21. package/content/agents/nami-planner.md +7 -10
  22. package/content/agents/resume-coordinator.md +12 -15
  23. package/content/agents/robin-reviewer.md +13 -12
  24. package/content/agents/sanji-quality.md +9 -12
  25. package/content/agents/skeptic-verifier.md +7 -10
  26. package/content/agents/usopp-brainstorm.md +6 -9
  27. package/content/agents/zoro-execution.md +9 -12
  28. package/content/skills/mugiwara-backend/SKILL.md +4 -0
  29. package/content/skills/mugiwara-backend/references/database.md +61 -0
  30. package/content/skills/mugiwara-brainstorm/SKILL.md +1 -1
  31. package/content/skills/mugiwara-checkpoint/SKILL.md +17 -14
  32. package/content/skills/mugiwara-checkpoint/references/ledger-format.md +5 -5
  33. package/content/skills/mugiwara-contract-first/SKILL.md +2 -0
  34. package/content/skills/mugiwara-execution/SKILL.md +24 -24
  35. package/content/skills/mugiwara-execution/references/dispatch.md +3 -3
  36. package/content/skills/mugiwara-execution/references/resume-batching.md +2 -2
  37. package/content/skills/mugiwara-frontend/SKILL.md +5 -6
  38. package/content/skills/mugiwara-frontend/references/checklist.md +14 -0
  39. package/content/skills/mugiwara-gates/SKILL.md +14 -10
  40. package/content/skills/mugiwara-git/SKILL.md +7 -2
  41. package/content/skills/mugiwara-healing/SKILL.md +7 -5
  42. package/content/skills/mugiwara-healing/references/workers.md +2 -2
  43. package/content/skills/mugiwara-lessons/SKILL.md +2 -2
  44. package/content/skills/mugiwara-orchestration/SKILL.md +28 -26
  45. package/content/skills/mugiwara-orchestration/references/check-ins.md +17 -16
  46. package/content/skills/mugiwara-orchestration/references/closure.md +18 -13
  47. package/content/skills/mugiwara-orchestration/references/output-contract.md +9 -9
  48. package/content/skills/mugiwara-orchestration/references/triage-escalation.md +32 -22
  49. package/content/skills/mugiwara-planning/SKILL.md +5 -18
  50. package/content/skills/mugiwara-planning/references/plan-template.md +3 -3
  51. package/content/skills/mugiwara-quality/SKILL.md +10 -7
  52. package/content/skills/mugiwara-resume/SKILL.md +20 -22
  53. package/content/skills/mugiwara-review/SKILL.md +7 -2
  54. package/content/skills/mugiwara-review/references/five-axis-worksheet.md +1 -1
  55. package/content/skills/mugiwara-root-cause/SKILL.md +2 -0
  56. package/content/skills/mugiwara-security/SKILL.md +6 -2
  57. package/content/skills/mugiwara-ship/SKILL.md +2 -2
  58. package/content/skills/mugiwara-ship/references/cleanup.md +17 -16
  59. package/content/skills/mugiwara-testcases/SKILL.md +5 -3
  60. package/content/skills/mugiwara-workflow/SKILL.md +32 -35
  61. package/content/skills/mugiwara-workflow/references/workspace-layout.md +41 -40
  62. package/dist/mugiwara.js +1370 -153
  63. package/gemini-extension.json +1 -1
  64. package/hooks/auto-savepoint.js +114 -0
  65. package/hooks/auto-savepoint.ts +102 -0
  66. package/hooks/engagement-marker.js +59 -0
  67. package/hooks/engagement-marker.ts +97 -0
  68. package/hooks/hooks.json +41 -2
  69. package/hooks/mugiwara-mode-tracker.js +79 -0
  70. package/hooks/pipeline-guard.js +186 -0
  71. package/hooks/pipeline-guard.ts +270 -0
  72. package/hooks/session-start.js +109 -0
  73. package/hooks/session-start.ts +62 -45
  74. package/package.json +7 -3
  75. package/plugin.json +1 -1
  76. package/references/agent-protocol.md +15 -0
  77. package/references/complexity.md +77 -0
  78. package/references/definition-of-done.md +1 -1
  79. package/references/multi-actor.md +4 -7
  80. package/references/prose-style.md +54 -0
  81. package/references/skill-versioning.md +1 -1
  82. package/references/wave-banners.md +16 -16
  83. package/scripts/build-hooks.ts +56 -0
  84. package/scripts/check-doc-links.ts +40 -0
  85. package/scripts/conformance.ts +23 -16
  86. package/scripts/coverage-gate.ts +193 -0
  87. package/scripts/gate-selftest.ts +118 -7
  88. package/scripts/install.ps1 +5 -4
  89. package/scripts/install.sh +4 -4
  90. package/scripts/lane.sh +56 -6
  91. package/scripts/lib/patterns.sh +89 -0
  92. package/scripts/policy-force.ts +22 -0
  93. package/scripts/retrieval-eval.ts +1 -1
  94. package/scripts/savepoint.sh +249 -67
  95. package/scripts/validate-content.ts +22 -9
  96. package/scripts/verify-install.ts +156 -44
  97. package/src/args.ts +2 -2
  98. package/src/budget.ts +56 -0
  99. package/src/cli.ts +272 -4
  100. package/src/continue.ts +262 -0
  101. package/src/installer.ts +59 -15
  102. package/src/integrity.ts +158 -0
  103. package/src/mission.ts +228 -95
  104. package/src/policy.ts +156 -0
  105. package/src/provenance.ts +116 -0
  106. package/src/rollback.ts +95 -0
  107. package/src/routing.ts +69 -0
  108. package/src/run.ts +82 -0
  109. package/src/sign.ts +61 -0
  110. package/src/targets/claude.ts +140 -2
  111. package/src/targets/copilot.ts +20 -1
  112. package/src/targets/generic.ts +9 -4
  113. package/src/targets/opencode.ts +0 -1
  114. package/.opencode/commands/mugiwara-execute.md +0 -13
  115. package/.opencode/commands/mugiwara-heal.md +0 -13
  116. package/.opencode/commands/mugiwara-onboard.md +0 -15
  117. package/.opencode/commands/mugiwara-plan.md +0 -17
  118. package/.opencode/commands/mugiwara-ship.md +0 -13
  119. package/.opencode/commands/using-mugiwara.md +0 -20
  120. package/content/agents/onboarding-guide.md +0 -124
  121. package/content/skills/mugiwara-agent-security/SKILL.md +0 -58
  122. package/content/skills/mugiwara-agent-security/references/checklist.md +0 -20
  123. package/content/skills/mugiwara-context-budget/SKILL.md +0 -64
  124. package/content/skills/mugiwara-context-budget/references/context-budget.md +0 -37
  125. package/content/skills/mugiwara-pr/SKILL.md +0 -69
  126. package/content/skills/mugiwara-pr/references/verdict-format.md +0 -31
  127. package/content/skills/mugiwara-security/references/owasp-mapping.md +0 -30
  128. package/content/skills/mugiwara-sunset/SKILL.md +0 -82
  129. package/content/skills/using-mugiwara/SKILL.md +0 -51
  130. package/references/token-budget.md +0 -34
  131. package/scripts/evidence.sh +0 -81
  132. package/scripts/initiative.ts +0 -296
  133. package/scripts/mission-report.sh +0 -292
  134. package/scripts/onboard.ts +0 -266
  135. package/scripts/probe.ts +0 -40
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: mugiwara-checkpoint
3
- description: Use after an execution wave to audit results — re-run acceptance criteria, verify commit hygiene, classify failures honestly, issue DoD verdict. Auditor only.
3
+ description: Use after an execution flow stage to audit results — re-run acceptance criteria, verify commit hygiene, classify failures honestly, issue DoD verdict. Auditor only.
4
4
  ---
5
5
 
6
6
  # Checkpoint (Chopper)
7
7
 
8
8
  ## Skip when
9
9
 
10
- - No execution wave completed this mission — nothing to audit yet.
10
+ - No execution flow stage completed this mission — nothing to audit yet.
11
11
  - User explicitly deferred the audit and recorded the reason in the decision log.
12
12
 
13
13
  Auditor, not fixer. Trust nothing; verify everything. Output is an audit report, not a code change.
@@ -18,26 +18,29 @@ Subagents lie. No evidence = not complete. A "done" claim is a starting point, n
18
18
 
19
19
  ## Audit protocol
20
20
 
21
- For every task in the completed wave, in order:
21
+ For every task in the completed flow stage, in order:
22
22
 
23
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
- 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
- 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
- 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.
27
- 5. **Parallel-conflict check.** Run `git diff --name-only` across parallel task commits: no file may be touched by 2 tasks. A shared file means the parallel claim was false.
28
- 6. **Honest classification.** Classify every failure truthfully as code or env. Never file a code failure as `env`. If you cannot prove it is env (reproduce on a clean checkout), it is code.
24
+ 2. **Dedupe re-runs.** Several criteria often share the same command (a flow stage of tasks all keyed on `npm test`). Run each UNIQUE check command ONCE per flow stage, scope it to the files this flow stage 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
+ 3. **Scope by diff.** Before re-running, inspect what actually changed (`git diff --name-only <flow-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
+ 4. **Reuse across flow stages.** If the diff is unchanged since the previous wave's report recorded a check result (same `flow-base`, same command), cite that result instead of re-running it. Changed diff run fresh. This is the one exception to "never reuse a prior run": the prior run must be your own crew's, on-disk, with an identical diff.
27
+ 5. **Commit hygiene.** Run `git log --stat <flow-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.
28
+ 6. **Parallel-conflict check.** Run `git diff --name-only` across parallel task commits: no file may be touched by 2 tasks. A shared file means the parallel claim was false.
29
+ 7. **Honest classification.** Classify every failure truthfully as code or env. Never file a code failure as `env`. If you cannot prove it is env (reproduce on a clean checkout), it is code.
29
30
 
30
31
  ## Failure ledger
31
32
 
32
- Append each failing criterion as one row to `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md`:
33
+ Row schema + worked rows: `references/ledger-format.md`.
33
34
 
34
- `| wave | task | symptom | attempted | help-needed |`
35
+ Append each failing criterion as one row to `.mugiwara/missions/<mission>/blockers.md`:
36
+
37
+ `| flow stage | task | symptom | attempted | help-needed |`
35
38
 
36
39
  Category goes in `symptom` or `help-needed` as context. Categories: `test-fail` (test/lint/build command fails), `missing-impl` (criterion unverifiable, artifact absent), `parallel-conflict` (concurrent tasks modified shared state), `env` (environment, proven), `regression` (previously passing check now fails). Reuse the existing blocker ledger; create it only if absent.
37
40
 
38
41
  ## Definition of Done check
39
42
 
40
- Per axis — `correctness`, `quality`, `integration`, `docs`, `ship-readiness` — each with evidence, then one wave verdict. Full definitions: `_shared/references/definition-of-done.md`. Any FAIL axis → wave verdict FAIL.
43
+ Per axis — `correctness`, `quality`, `integration`, `docs`, `ship-readiness` — each with evidence, then one flow-stage verdict. Full definitions: `_shared/references/definition-of-done.md`. Any FAIL axis → flow-stage verdict FAIL.
41
44
 
42
45
  ## Auditor only
43
46
 
@@ -45,17 +48,17 @@ Never edit code. Findings only. Any urge to fix a finding means the audit has st
45
48
 
46
49
  ## Output
47
50
 
48
- Audit report to `.mugiwara/results/<mission>/02-audit.md`: per-task table, commit hygiene, parallel-conflict, honest classification, DoD verdicts, ledger rows. Show the verdict and the key evidence inline in the conversation — PASS → next wave. FAIL → report + ledger to Brook (Wave 8). You never fix a finding yourself; you may spawn check subagents for independent re-runs.
51
+ Audit report to `.mugiwara/missions/<mission>/flows/02-audit.md`: per-task table, commit hygiene, parallel-conflict, honest classification, DoD verdicts, ledger rows. Show the verdict and the key evidence inline in the conversation — PASS → next flow stage. FAIL → report + ledger to Brook (Flow 8). You never fix a finding yourself; you may spawn check subagents for independent re-runs.
49
52
 
50
53
  ## Common rationalizations
51
54
 
52
- - "The test passed last run." → Re-run it now — once, scoped to what changed this wave. A stale result is not evidence, and a wave of duplicate runs is waste.
55
+ - "The test passed last run." → Re-run it now — once, scoped to what changed this flow stage. A stale result is not evidence, and a flow stage of duplicate runs is waste.
53
56
  - "It's just an env issue." → Prove it on a clean checkout; unproven env is code.
54
57
  - "One small fix would clear it." → You are the auditor, not the healer. Report it.
55
58
 
56
59
  ## Iron Law
57
60
 
58
- TRUST NOTHING; VERIFY EVERYTHING. No evidence, no pass — and the evidence must be produced by your own re-run, not borrowed from the executor. Verify once per unique check, scoped to the wave's diff — thorough, not wasteful.
61
+ TRUST NOTHING; VERIFY EVERYTHING. No evidence, no pass — and the evidence must be produced by your own re-run, not borrowed from the executor. Verify once per unique check, scoped to the flow stage's diff — thorough, not wasteful.
59
62
 
60
63
  ## Red flags
61
64
 
@@ -1,18 +1,18 @@
1
1
  # Ledger Format
2
2
 
3
- Blocker ledger row format used by Chopper (wave-audit) and Brook (healing).
3
+ Blocker ledger row format used by Chopper (flow-audit) and Brook (healing).
4
4
 
5
5
  ## Row format
6
6
 
7
7
  ```
8
- | wave | task | symptom | attempted | help-needed |
8
+ | flow stage | task | symptom | attempted | help-needed |
9
9
  ```
10
10
 
11
11
  ## Fields
12
12
 
13
13
  | Field | Required | Description |
14
14
  |-------|----------|-------------|
15
- | `wave` | yes | Which wave produced the failure (4, 5, 6, 7, 8) |
15
+ | `flow stage` | yes | Which flow stage produced the failure (4, 5, 6, 7, 8) |
16
16
  | `task` | yes | Task identifier from the plan (T3, T5, etc.) |
17
17
  | `symptom` | yes | What failed — error message, exit code, missing artifact. Include category: `test-fail`, `missing-impl`, `parallel-conflict`, `env`, `regression` |
18
18
  | `attempted` | yes | What was tried — "re-ran npm test -- scope", "checked caller imports" |
@@ -22,7 +22,7 @@ Blocker ledger row format used by Chopper (wave-audit) and Brook (healing).
22
22
 
23
23
  ```
24
24
  | 4 | T3 | test-fail: formatDate returns wrong locale | re-ran with en-US locale explicitly | locale detection differs between Node 18 and 20 |
25
- | 4 | T5 | missing-impl: no thumbnail endpoint | searched routes/ dir, not found | endpoint was in a different plan wave |
25
+ | 4 | T5 | missing-impl: no thumbnail endpoint | searched routes/ dir, not found | endpoint was in a different plan flow stage |
26
26
  | 5 | T2 | env: vitest hangs on CI | re-ran locally, passes | needs --pool=forks flag on CI |
27
27
  ```
28
28
 
@@ -31,4 +31,4 @@ Blocker ledger row format used by Chopper (wave-audit) and Brook (healing).
31
31
  - Every blocker gets one row. Never combine two failures into one row.
32
32
  - Category goes in `symptom` or `help-needed` — whichever is more specific.
33
33
  - `env` classification must be proven (reproduce on clean checkout). Unproven = `test-fail`.
34
- - File at `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md`. Create if absent.
34
+ - File at `.mugiwara/missions/<mission>/blockers.md`. Create if absent.
@@ -27,6 +27,8 @@ Framework APIs from docs, not memory: `_shared/references/source-grounding.md`.
27
27
 
28
28
  Full 5-step protocol: `references/process.md` — contract first, error semantics, boundary validation, backward compatibility, versioning discipline. 27 lines; every step required.
29
29
 
30
+ Versioning + deprecation moves: `references/versioning-playbook.md`.
31
+
30
32
  ## Rationalizations
31
33
 
32
34
  | Rationalization | Reality |
@@ -8,7 +8,7 @@ description: Use when executing an approved plan — todo list first, sequential
8
8
  ## Skip when
9
9
 
10
10
  - No approved plan exists to execute — this is triage, brainstorm, or planning territory.
11
- - Lane 0 direct work (typo, rename, single small fix) with no wave structure.
11
+ - Lane 0 direct work (typo, rename, single small fix) with no flow-stage structure.
12
12
 
13
13
  Execute the plan exactly. No silent reordering, no skipping steps, no "close enough".
14
14
 
@@ -17,7 +17,7 @@ Execute the plan exactly. No silent reordering, no skipping steps, no "close eno
17
17
  - `guided`: before touching any code, ASK THE USER — auto branch (dedicated mission branch, recommended, keeps `main` clean) or work on the current branch; auto commit per task or commit at user-controlled checkpoints. With `auto_commit=off`: the branch ask stays, the commit question is skipped — changes stay uncommitted.
18
18
  - `semi`: auto-create the mission branch per the config `branch` key; auto-commit per task in the config `commit` style ONLY when `auto_commit=on` (default). Off → leave every task's changes uncommitted; the user commits manually.
19
19
  - `auto`: auto-create the branch and auto-commit per task ALWAYS — `auto_commit=off` has no effect in auto mode.
20
- Record mode + branch + commit style + `auto_commit` in the decision log (`.mugiwara/logs/YYYY-MM-DD-<mission>.md`) and in `.mugiwara/results/<mission>/todos.md` — every mode.
20
+ Record mode + branch + commit style + `auto_commit` in the decision log (`.mugiwara/missions/<mission>/decisions.md`) and in `.mugiwara/missions/<mission>/flows/todos.md` — every mode.
21
21
 
22
22
  Code to the installed version's docs, not memory: `_shared/references/source-grounding.md`. The plan doc stays clean — never edit it during execution except through Nami. If the user says no auto-commit in `guided`, still run every acceptance check and leave the diff staged or presented for approval. State-mutating consent is NOT covered by this rule — it still applies in every mode. One-task-one-commit, save-points, and atomic-commit rules hold unchanged in every mode.
23
23
 
@@ -25,14 +25,14 @@ Code to the installed version's docs, not memory: `_shared/references/source-gro
25
25
 
26
26
  Before touching code:
27
27
 
28
- 1. Create `.mugiwara/results/<mission>/todos.md` — one checkbox per task, derived from the plan.
28
+ 1. Create `.mugiwara/missions/<mission>/flows/todos.md` — one checkbox per task, derived from the plan.
29
29
  2. Check each box off only when the task completes, WITH its evidence link (`[path](relative/path)`, clickable).
30
30
  3. Re-check the whole list after each task and after each batch; unmarked boxes mean the mission is not done.
31
- 4. Mirror EVERY transition into the host's native todo tool (`todowrite` on opencode; `TaskUpdate` on Claude Code; none on tier 2/3 — plan doc only) in the SAME response the task's evidence lands — one transition per call, never batched at wave end. Per-host table: `docs/reference/harness-matrix.md`.
31
+ 4. Mirror EVERY transition into the host's native todo tool (`todowrite` on opencode; `TaskUpdate` on Claude Code; none on tier 2/3 — plan doc only) in the SAME response the task's evidence lands — one transition per call, never batched at flow-stage end. Per-host table: `docs/reference/harness-matrix.md`. Every task response opens with `[task N/M] <status>` — progress is visible on every harness, todo tool or not.
32
32
 
33
- ## Wave execution
33
+ ## Flow-stage execution
34
34
 
35
- Before starting: if `.mugiwara/continue/<mission>/[member].json` exists, resume from its next_action — never re-run completed tasks; verify against todos `[x]` marks. Full protocol: `references/resume-batching.md` — batch-resume, TDD, user-test oracle.
35
+ Before starting: if `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` exists, resume from its next_action — never re-run completed tasks; verify against todos `[x]` marks. Full protocol: `references/resume-batching.md` — batch-resume, TDD, user-test oracle.
36
36
 
37
37
  1. Read the plan doc fully before touching code.
38
38
  2. Build the task graph from `[PARALLEL]`/`[SEQUENTIAL]` markers and depends-on fields.
@@ -44,14 +44,15 @@ Before starting: if `.mugiwara/continue/<mission>/[member].json` exists, resume
44
44
  ## Worker dispatch triggers
45
45
 
46
46
  1. **Independence** — `[PARALLEL]` batches, concurrent, one task per worker.
47
- 2. **Context pressure** — when `tokens_est` exceeds `delegate_threshold`% of
48
- `budget` (read from `.mugiwara/config`, default 60) mid-execution, remaining
49
- SEQUENTIAL tasks dispatch to workers one at a time, in plan order. Order is
50
- preserved; only the context resets. Announce: `⚠ context 62% remaining tasks run in fresh workers, plan order unchanged.`
47
+ 2. **Context pressure** — when `delegate_due` reads `true` in
48
+ `.mugiwara/missions/<mission>/state.json | <member>.json` (savepoint computes it as
49
+ `tokens_est delegate_threshold% of budget`, config default 60), remaining
50
+ SEQUENTIAL tasks dispatch to workers one at a time, in plan order.
51
+ Announce: `⚠ context — remaining tasks run in fresh workers, plan order unchanged.`
51
52
 
52
- The threshold stays relative, never absolute: `tokens_est > delegate_threshold%
53
- × budget` (read from `.mugiwara/config`, default 60), never `tokens_est >
54
- 80,000` (obsolete in six months). A bigger window raises the threshold; it does not remove it.
53
+ Computed, never manual: savepoint emits `delegate_due` (relative
54
+ `tokens_est delegate_threshold% × budget`, default 60), never an absolute
55
+ `tokens_est > 80,000` (obsolete in six months). A bigger budget raises the bar; it does not remove it.
55
56
 
56
57
  ## Tier gating & fallback
57
58
 
@@ -59,14 +60,14 @@ Real worker dispatch exists only where the harness has subagents — tier 1
59
60
  (Claude Code, opencode) plus Copilot. Gate the context-pressure trigger on
60
61
  that capability: if the harness cannot dispatch, do not promise fresh workers.
61
62
 
62
- Where workers are unavailable and context pressure crosses the threshold:
63
+ Where workers are unavailable and `delegate_due` is true:
63
64
  write a savepoint, run the checkpoint, and suggest a fresh session via
64
- `resume`. Announce: `⚠ context 62% — no worker dispatch on this harness;
65
+ `resume`. Announce: `⚠ context — no worker dispatch on this harness;
65
66
  savepoint written, resume in a fresh session (plan order unchanged).`
66
67
 
67
68
  ## Batch resume
68
69
 
69
- After each batch, update `.mugiwara/continue/<mission>/[member].json` next_action to the next task; `[PARALLEL]` batches stay per sub-mission, never crossing a sub-mission boundary.
70
+ After each batch, update `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` next_action to the next task; `[PARALLEL]` batches stay per sub-mission, never crossing a sub-mission boundary.
70
71
 
71
72
  ## Task batching & delegation format (parallel workers only)
72
73
 
@@ -76,14 +77,13 @@ six-field worker prompt. Thin prompts cause thin results.
76
77
  ## Surfacing rule
77
78
 
78
79
  > **Delegated work is not hidden work.** A worker may run out of view; its
79
- > result may not. Every worker returns a wave banner, a one-line verdict, and an
80
+ > result may not. Every worker returns a flow stage banner, a one-line verdict, and an
80
81
  > evidence link into the main thread. The user never clicks into a subagent to
81
82
  > know what happened.
82
83
  > Isolation is for context and permission, never for autonomy.
83
84
 
84
85
  ## TDD discipline & user tests
85
-
86
- Full protocol: `references/resume-batching.md` — batch-resume, TDD RED-GREEN-REFACTOR (`references/tdd.md`), user tests as oracle, failing-first rule.
86
+ Full protocol: `references/resume-batching.md` — batch-resume, TDD RED-GREEN-REFACTOR (`references/tdd.md`), user tests as oracle, failing-first rule. One task end to end, RED through commit: `references/worked-example.md`.
87
87
 
88
88
  ## One logical task, one commit
89
89
 
@@ -91,7 +91,7 @@ Commit per LOGICAL task — a feature, fix, or refactor, not a micro-step; verif
91
91
 
92
92
  ## Blockers → issues ledger
93
93
 
94
- Blocked → one row `| wave | task | symptom | attempted | help-needed |` to `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md`, then escalate to Luffy. Never work around a blocker silently.
94
+ Blocked → one row `| flow stage | task | symptom | attempted | help-needed |` to `.mugiwara/missions/<mission>/blockers.md`, then escalate to Luffy. Never work around a blocker silently.
95
95
 
96
96
  ## Frontend tasks
97
97
 
@@ -99,11 +99,11 @@ Any task touching UI markup, styling, or components applies `mugiwara-frontend`
99
99
 
100
100
  ## Report
101
101
 
102
- After each wave: compact task table (status, evidence link, deviations) shown inline in the conversation. Format: `references/dispatch.md` — report table. Then return to Luffy, who routes to Chopper (Wave 4). Write detailed execution log to `.mugiwara/results/<mission>/01-execution.md`. Never dispatch another crew member.
102
+ After each flow stage: compact task table (status, evidence link, deviations) shown inline in the conversation. Format: `references/dispatch.md` — report table. Then return to Luffy, who routes to Chopper (Flow 4). Write detailed execution log to `.mugiwara/missions/<mission>/flows/01-execution.md`. Never dispatch another crew member.
103
103
 
104
104
  ## Step budget
105
105
 
106
- Tool calls are finite — harnesses cap them per session; a 9-wave mission that wastes them stalls before closure. Combine evidence runs (`evidence.sh <m> quality -- bash -c "lint && test"` — one call, not two); write wave artifacts once at wave end, not incrementally; never re-read what you just wrote; batch reads (one glob beats five reads); open a reference only when its pointer condition triggers.
106
+ Tool calls are finite — harnesses cap them per session; a 9-flow-stage mission that wastes them stalls before closure. Combine evidence runs (`bash -c "lint && test"` — one call, not two); write flow stage artifacts once at flow-stage end, not incrementally; never re-read what you just wrote; batch reads (one glob beats five reads); open a reference only when its pointer condition triggers.
107
107
 
108
108
  Budget guide: Lane 1 ≤15 calls · Lane 2 ≤35 · Lane 3 ≤60. Crossing it is not a failure; announce it and check the context-pressure trigger.
109
109
 
@@ -117,8 +117,8 @@ Budget guide: Lane 1 ≤15 calls · Lane 2 ≤35 · Lane 3 ≤60. Crossing it is
117
117
  - Echoing raw output when `verbosity=normal` — summarize and cite the evidence path.
118
118
  - The task's TDD order inverted (implementation before the failing test).
119
119
  - A test passing immediately without having failed first (wrong test or testing existing behavior).
120
- - A commit containing files beyond its declared task, or a wave of micro-commits with no logical grouping.
120
+ - A commit containing files beyond its declared task, or a flow stage of micro-commits with no logical grouping.
121
121
  - Dispatching a worker whose result is not summarized inline with an evidence link.
122
- - Host todo UI lags the plan doc — task done but unchecked, or list never seeded at Wave 2.
122
+ - Host todo UI lags the plan doc — task done but unchecked, or list never seeded at Flow 2.
123
123
 
124
124
  All mean: stop, realign to the plan, or escalate to Luffy.
@@ -1,7 +1,7 @@
1
1
  # Dispatch & batching detail
2
2
 
3
3
  Full detail behind `content/skills/mugiwara-execution/SKILL.md` — the output
4
- rule, the worker prompt format, and the per-wave report table.
4
+ rule, the worker prompt format, and the per-flow stage report table.
5
5
 
6
6
  ## Task batching
7
7
 
@@ -15,7 +15,7 @@ T2: ✅ | 7 pointers rewritten | grep refs/ → clean
15
15
  T3: ✅ | 38/38 tests | bun run test
16
16
  ```
17
17
 
18
- Full logs go to `.mugiwara/results/<mission>/01-execution.md`. The main thread shows the summary table only. Tool calls visible below the banner are noise — batch them, squash the output.
18
+ Full logs go to `.mugiwara/missions/<mission>/flows/01-execution.md`. The main thread shows the summary table only. Tool calls visible below the banner are noise — batch them, squash the output.
19
19
 
20
20
  ## Delegation format (parallel workers only)
21
21
 
@@ -32,7 +32,7 @@ A delegation prompt shorter than ~30 lines is too short — beef it up. Thin pro
32
32
 
33
33
  ## Report table
34
34
 
35
- After each wave: compact task table (status, evidence pointer, deviations) shown inline in the conversation. Format:
35
+ After each flow stage: compact task table (status, evidence pointer, deviations) shown inline in the conversation. Format:
36
36
 
37
37
  ```
38
38
  | # | Task | Status | Evidence link |
@@ -23,9 +23,9 @@ that passes on first run has proven nothing.
23
23
 
24
24
  ## Batch-resume protocol
25
25
 
26
- - Before starting a wave: if `.mugiwara/continue/<mission>/[member].json` exists, resume from its
26
+ - Before starting a flow stage: if `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` exists, resume from its
27
27
  next_action — never re-run completed tasks; verify against todos `[x]` marks.
28
- - After each batch: update `.mugiwara/continue/<mission>/[member].json` next_action to the next task.
28
+ - After each batch: update `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` next_action to the next task.
29
29
  - `[PARALLEL]` batches stay per sub-mission — a batch never crosses a
30
30
  sub-mission boundary.
31
31
  - continue is the handoff contract: state proves what is done,
@@ -28,8 +28,7 @@ Match the repo's standard before writing anything new; reuse its components and
28
28
  Capture current layout, spacing/type scales, palette, and component inventory before changing existing UI. Fix real problems; do not restyle what works.
29
29
 
30
30
  ## Design-system extraction (before markup)
31
-
32
- Extract tokens from the stack's design system BEFORE markup — spacing scale, type scale, role-based palette, radii, shadows, motion language. Name them semantically (`surface-muted`, not `c3`); store where the stack keeps tokens. No tokens extracted, no markup written. Then turn tokens into a small primitive set (button, input, card, icon, layout helpers) before composing screens — reuse primitives everywhere; every bespoke component is debt on every screen.
31
+ Extract tokens from the stack's design system BEFORE markup — spacing scale, type scale, role-based palette, radii, shadows, motion language. Name them semantically (`surface-muted`, not `c3`); store where the stack keeps tokens. No tokens extracted, no markup written; token set and naming: `references/design-tokens.md`. Then turn tokens into a small primitive set (button, input, card, icon, layout helpers) before composing screens — reuse primitives everywhere; every bespoke component is debt on every screen.
33
32
 
34
33
  ## Component architecture
35
34
 
@@ -66,14 +65,13 @@ Extract tokens first, then reproduce structure faithfully: hierarchy, alignment,
66
65
  Mobile-first: start at the smallest screen, add breakpoints as layout needs them. Default full-width stacked; columns only when there is room. Use the stack's breakpoints, not a parallel scale; fluid containers, type, and spacing. Verify at every breakpoint, including between them — 3 widths checked is not 12 checked.
67
66
 
68
67
  ## Banned AI-default patterns (the slop list)
69
-
70
68
  - Centered hero trio: headline + subtitle + two buttons, dead center, gradient text.
71
69
  - Row of 3-4 identical feature cards with icon-circle + title + two lines.
72
70
  - Purple/indigo gradient everything; glassmorphism everywhere; emoji as icons.
73
71
  - Placeholder content where real product copy exists.
74
72
  - Stock hero illustrations when the design specifies otherwise.
75
73
 
76
- If the brief genuinely calls for one of these, execute it well — but the default is: don't.
74
+ Full catalog with the tell for each: `references/slop-catalog.md`. If the brief genuinely calls for one of these, execute it well — but the default is: don't.
77
75
 
78
76
  ## WCAG 2.1 AA accessibility
79
77
 
@@ -87,14 +85,15 @@ Non-negotiable baseline. Full checklist: `references/checklist.md`.
87
85
 
88
86
  ## Testability and verification
89
87
 
90
- Add stable `data-testid` to interactive elements per the repo's testing convention. Never test by CSS class or by text that changes. Then compare the result against the reference side by side; list remaining deltas before calling it done.
88
+ Add stable `data-testid` to every interactive element per the repo's testing convention; async states (loading/error/empty) get testids too. Never test by CSS class or by text that changes. Prefer role/label queries (`getByRole`) in tests — an accessible name doubles as an accessibility assertion. Keyboard paths for non-trivial interactions (menu, modal, form) are asserted, not assumed. Then compare the result against the reference side by side; list remaining deltas before calling it done.
91
89
 
92
90
  ## Performance
93
91
 
92
+ - Core Web Vitals are the bar: LCP <2.5s, CLS <0.1, INP <200ms. Images carry width/height or aspect-ratio (CLS); the LCP asset is preloaded and fonts ship `font-display` (LCP); input handlers stay off the main thread (INP).
94
93
  - No layout thrash: batch DOM reads/writes; heavy work off the scroll path; animate only transform/opacity.
95
94
  - Assets: no giant images/font payloads; lazy-load below the fold; no whole icon library for two icons.
96
95
  - No re-render storms: memoize heavy computation, stable keys, no work in render.
97
- - Measure before optimizing; do not guess the bottleneck.
96
+ - Repo has Lighthouse or lighthouse-ci? Run it — performance and accessibility scores meet the repo's budgets, deltas explained. Measure before optimizing; do not guess the bottleneck.
98
97
 
99
98
  ## Frontend security
100
99
 
@@ -35,3 +35,17 @@ Run before calling a view done. Every box must check; unchecked boxes are not do
35
35
  - [ ] Dynamic updates announced via `aria-live` with appropriate `polite`/`assertive`.
36
36
  - [ ] `prefers-reduced-motion` respected; motion scales, never disables content.
37
37
  - [ ] No interaction reachable only by mouse; nothing requires drag to operate.
38
+
39
+ ## Testability
40
+
41
+ - [ ] Stable `data-testid` on every interactive element and on each async state (loading/error/empty).
42
+ - [ ] Tests query by role/label, never by CSS class or mutable text.
43
+ - [ ] Keyboard paths asserted in tests for non-trivial interactions (menu, modal, form submit).
44
+
45
+ ## Performance (Core Web Vitals)
46
+
47
+ - [ ] Every image has width/height or aspect-ratio — no layout shift on load.
48
+ - [ ] LCP asset preloaded; fonts use `font-display: swap`; nothing above the fold lazy-loaded.
49
+ - [ ] Below-fold media and routes lazy-loaded; no whole icon/font library imported for a few glyphs.
50
+ - [ ] Input handlers free of long tasks; heavy work deferred or chunked (INP).
51
+ - [ ] Lighthouse/lighthouse-ci run when the repo has it: performance and accessibility at/above budget, deltas listed.
@@ -16,28 +16,32 @@ Gates are binary: pass or fail, with evidence. No negotiation, no "almost passes
16
16
 
17
17
  1. Measure coverage with the project's existing tooling.
18
18
  2. Read thresholds from `.mugiwara/config` then `~/.mugiwara/config` for `coverage_new` and `coverage_modified`. Defaults: new ≥ 90%, modified ≥ 80%. Missing key or 0 = no threshold. Identify new/modified via git diff.
19
- 3. No coverage tooling → report the gap, propose minimal tooling, ask user to add or waive.
20
- 4. User-AC declared (per `mugiwara-testcases`): config thresholds apply to unit-level code only; user-AC verdict governs ship-readiness.
19
+ 3. No coverage tooling or no test suite record a SKIP with its reason. Never a fake pass; propose minimal tooling, ask user to add or waive.
20
+ 4. In this repo the gate is executable: `bun run coverage-gate` (`scripts/coverage-gate.ts`) does all three against the mission's `base_sha`, and runs as the last step of `bun run gate`. Never lower a threshold or exclude a file to make it green add the missing tests.
21
+ 5. User-AC declared (per `mugiwara-testcases`): config thresholds apply to unit-level code only; user-AC verdict governs ship-readiness.
21
22
 
22
23
  ## Sonar-style quality gate
23
24
 
24
- Franky reads evidence from prior wave reports (never re-runs
25
- checks): Jinbe (`.mugiwara/review/<mission>-security.md`),
26
- Robin (`.mugiwara/review/<mission>-review.md`), Sanji
27
- (`.mugiwara/results/<mission>/03-quality.md`).
25
+ Franky reads evidence from prior flow-stage reports (never re-runs
26
+ checks): Jinbe (`.mugiwara/missions/<mission>/security.md`),
27
+ Robin (`.mugiwara/missions/<mission>/review.md`), Sanji
28
+ (`.mugiwara/missions/<mission>/flows/03-quality.md`).
28
29
  Evaluated: Vulnerabilities=0, Bugs=0, Code smells≤project
29
30
  threshold, Coverage(new code)≥config threshold,
30
31
  Duplications(new code)<3%, Security hotspots reviewed≥80%.
32
+ These mirror Sonar's default gate on new code; its AI-Code variant adds
33
+ security rating A and reliability rating C on new code with hotspots 100%
34
+ reviewed — adopt when the team asks for it.
31
35
  PASS when ALL pass — list each with actual + threshold.
32
36
  Missing data → CANNOT pass: report gap, do not fake.
33
37
 
34
38
  ## Build gate
35
39
 
36
- Run the project's build (or typecheck for interpreted stacks). Must exit 0. Capture the tail of output.
40
+ Run the project's build (or typecheck for interpreted stacks). Must exit 0. Capture the tail of output. Skip when `flows/03-quality.md` already recorded an exit-0 build on an unchanged diff.
37
41
 
38
42
  ## Optional e2e gate (per `mugiwara-quality`)
39
43
 
40
- Runs only when quality wave triggered it (repo e2e setup + changed-file e2e patterns, user consent). Skipped/unrun is logged, never blocks PASS. Final verdict: coverage + sonar + build + DoD.
44
+ Runs only when quality flow stage triggered it (repo e2e setup + changed-file e2e patterns, user consent). Skipped/unrun is logged, never blocks PASS. Final verdict: coverage + sonar + build + DoD.
41
45
 
42
46
  ## Definition of Done standing gate
43
47
 
@@ -50,8 +54,8 @@ A fixed cross-project bar. Full definitions: `_shared/references/definition-of-d
50
54
 
51
55
  ## Verdict
52
56
 
53
- PASS only when coverage AND sonar AND build AND DoD all pass with evidence. Write verdict to `.mugiwara/results/<mission>/04-gates.md`.
54
- PASS → return to Luffy (routes to Robin/Jinbe). FAIL → list files under threshold + by how much → return to Luffy (routes to Brook). Never dispatch next wave yourself.
57
+ PASS only when coverage AND sonar AND build AND DoD all pass with evidence. Write verdict to `.mugiwara/missions/<mission>/flows/04-gates.md`.
58
+ PASS → return to Luffy (routes to Robin/Jinbe). FAIL → list files under threshold + by how much → return to Luffy (routes to Brook). Never dispatch the next flow stage yourself.
55
59
 
56
60
  ## Red flags
57
61
 
@@ -7,7 +7,7 @@ description: Use for commits, splitting, or git history debugging — atomic com
7
7
 
8
8
  ## Skip when
9
9
 
10
- - No commits to make this wave — nothing staged, nothing to split or amend.
10
+ - No commits to make this flow stage — nothing staged, nothing to split or amend.
11
11
  - User handles version control manually for this mission.
12
12
 
13
13
  Git hygiene keeps the mission reversible: one logical change per commit, a save-point before risky work, and history you can bisect.
@@ -29,7 +29,7 @@ Git hygiene keeps the mission reversible: one logical change per commit, a save-
29
29
 
30
30
  1. A large task becomes multiple commits, one per logical step in the plan.
31
31
  2. Split boundaries follow the plan's tasks: no commit spans two plan tasks, no plan task is left partially committed.
32
- 3. Commit each step the moment it is green; never batch a whole wave into one commit.
32
+ 3. Commit each step the moment it is green; never batch a whole flow stage into one commit.
33
33
 
34
34
  ## Commit message conventions
35
35
 
@@ -37,12 +37,17 @@ Git hygiene keeps the mission reversible: one logical change per commit, a save-
37
37
  2. Scoped subject when scope is not obvious: `feat(auth): enforce session TTL`.
38
38
  3. Body (after a blank line) explains WHY, not what. What is visible in the diff; why is not.
39
39
  4. Match the repo's existing style — detect it before writing messages (below).
40
+ 5. Config `commit` may be a template: any value containing `{` is a template with
41
+ placeholders `{type}` `{issue}` `{title}` (e.g. `{issue}: {title}` → `CR-5432: Testing
42
+ button`). Fill placeholders from mission metadata; `{issue}` falls back to the date.
43
+ Style names (conventional/gitmoji/plain) keep their normal rules.
40
44
 
41
45
  ## Style detection
42
46
 
43
47
  1. Inspect existing history before the first commit: `git log --oneline -20`.
44
48
  2. Copy the observed conventions: prefix style (`feat:`/`fix:` vs plain), subject case, body usage, subject length.
45
49
  3. No commits in the repo yet → adopt conventional commits and note it in the plan.
50
+ 4. A config `commit` template overrides history detection — the user's format wins.
46
51
 
47
52
  ## Branch naming
48
53
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mugiwara-healing
3
- description: Use when an execution wave failed, earlier waves produced failures, broken things to fix — reads blocker ledger, stop-the-line triage, root-cause fixes, prove-it before fixing. Max 3 cycles.
3
+ description: Use when an execution flow stage failed, earlier flow stages produced failures, broken things to fix — reads blocker ledger, stop-the-line triage, root-cause fixes, prove-it before fixing. Max 3 cycles.
4
4
  ---
5
5
 
6
6
  # Healing (Brook)
@@ -14,7 +14,7 @@ Fix what failed, minimally, and prove it. One clean retry per cycle.
14
14
 
15
15
  ## Read the ledger first
16
16
 
17
- Brook's inputs: `.mugiwara/issues/YYYY-MM-DD-<mission>-blockers.md` rows + quality report (Sanji), gate verdict (Franky), review findings (Robin), security report (Jinbe). Process each ledger row — every row is one healing unit. Rows are appended by any agent that hit a blocker; never skip a row.
17
+ Brook's inputs: `.mugiwara/missions/<mission>/blockers.md` rows + quality report (Sanji), gate verdict (Franky), review findings (Robin), security report (Jinbe). Process each ledger row — every row is one healing unit. Rows are appended by any agent that hit a blocker; never skip a row.
18
18
 
19
19
  ## Stop-the-Line triage (per failure)
20
20
 
@@ -39,6 +39,8 @@ Before fixing a bug: write the failing test that reproduces it, watch it fail, t
39
39
 
40
40
  ## Triage matrix
41
41
 
42
+ Full taxonomy behind the matrix: `references/failure-taxonomy.md`.
43
+
42
44
  | Failure | Action |
43
45
  |---------|--------|
44
46
  | lint/format error | auto-fix (formatter when supported), re-run |
@@ -53,15 +55,15 @@ Before fixing a bug: write the failing test that reproduces it, watch it fail, t
53
55
  2. Every code fix ships with the failed check now passing (run it, capture output).
54
56
  3. Never delete or weaken tests/configs to make a failure disappear.
55
57
  4. After healing: update the ledger — mark each healed row with evidence; keep unfixed rows for escalation.
56
- 5. Cycle counter: read `heal_cycle` from `.mugiwara/state/<mission>/[member].json` (savepoint writes it). After this wave the flow returns to Wave 4 (Chopper) for re-audit. **At 3, STOP and escalate to the user with full history — a halt, not a red flag.** Red flags are prose; the counter is state. Never re-run past 3.
58
+ 5. Cycle counter: read `heal_halt` from `.mugiwara/missions/<mission>/state.json | <member>.json` (savepoint writes it as `heal_cycle ≥ heal_max_cycles`, config default 3). After this flow stage the flow returns to Flow 4 (Chopper) for re-audit. **When `heal_halt` reads `true`, STOP and escalate to the user with full history — a halt, not a red flag.** Red flags are prose; the counter is state. Never re-run past `heal_max_cycles`.
57
59
 
58
60
  ## Worker subagents
59
61
 
60
- Brook runs inline for triage + ledger reading; parallel fixes use disposable WORKER subagents. Full protocol: `references/workers.md` — heal-worker grouping (independent rows in parallel), 5-field worker prompt, validation workers (reviewer/security/re-run), then back to Wave 4. Workers are NOT crew members.
62
+ Brook runs inline for triage + ledger reading; parallel fixes use disposable WORKER subagents. Full protocol: `references/workers.md` — heal-worker grouping (independent rows in parallel), 5-field worker prompt, validation workers (reviewer/security/re-run), then back to Flow 4. Workers are NOT crew members.
61
63
 
62
64
  ## Output
63
65
 
64
- Fixed list (finding → commit → evidence), escalated list (finding → plan → owner), updated ledger → back to Wave 4 (Chopper).
66
+ Fixed list (finding → commit → evidence), escalated list (finding → plan → owner), updated ledger → back to Flow 4 (Chopper).
65
67
 
66
68
  ## Red flags
67
69
 
@@ -20,7 +20,7 @@ Group 2 [SEQUENTIAL]: Row 3 (rbac.ts)
20
20
  ```
21
21
 
22
22
  Each heal worker receives a prompt with 5 fields:
23
- - **FAILURE** — ledger row verbatim (wave, task, symptom, attempted)
23
+ - **FAILURE** — ledger row verbatim (flow stage, task, symptom, attempted)
24
24
  - **ROOT CAUSE** — Brook's triage result: where the bug is, why it happened
25
25
  - **FIX** — what to change, which file, which function
26
26
  - **MUST DO** — Prove-It: write regression test, watch it fail, implement fix, watch it pass, commit
@@ -33,6 +33,6 @@ After all heal workers complete, dispatch validation workers in parallel:
33
33
  - **security-worker** — security pass over fixes (per `mugiwara-security`)
34
34
  - **re-run-check worker** — independently re-runs failed checks, returns raw evidence
35
35
 
36
- Flow: Brook triage + grouping → dispatch heal workers parallel → aggregate results → dispatch validation workers → update ledger → back to Wave 4.
36
+ Flow: Brook triage + grouping → dispatch heal workers parallel → aggregate results → dispatch validation workers → update ledger → back to Flow 4.
37
37
 
38
38
  Workers are NOT crew members — disposable subagents, one narrow job per worker. Crew runs inline in main thread.
@@ -14,7 +14,7 @@ The crew's institutional memory. Every mission writes what it learned so the nex
14
14
 
15
15
  ## The ledger
16
16
 
17
- `.mugiwara/logs/lessons.md` — append-only, shared across all missions in this repo.
17
+ `.mugiwara/lessons.md` — append-only, shared across all missions in this repo.
18
18
 
19
19
  ```
20
20
  | YYYY-MM-DD | mission | area | lesson |
@@ -47,7 +47,7 @@ A lesson that can't change future behavior is noise. Skip it.
47
47
 
48
48
  ## Memory hygiene
49
49
 
50
- Lessons are cross-mission but per-repo. The ledger lives in `.mugiwara/logs/` so it never pollutes the codebase. Read the whole file, apply only the rows touching this mission's area.
50
+ Lessons are cross-mission but per-repo. The ledger lives at `.mugiwara/lessons.md` so it never pollutes the codebase. Read the whole file, apply only the rows touching this mission's area.
51
51
 
52
52
  ## Common rationalizations
53
53