@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
@@ -1,59 +1,60 @@
1
1
  # Workspace layout
2
2
 
3
3
  Every mission creates and works inside `.mugiwara/` at the repo root.
4
+ One directory per mission — everything about a mission lives together.
4
5
 
5
- **Language:** every artifact the crew writes into `.mugiwara/` — plans, logs,
6
- results, reports, spec, state, continue, issues, review — is English, one
6
+ **Language:** every artifact the crew writes into `.mugiwara/` — plans, waves,
7
+ reports, spec, state, continue, blockers, review, decisions — is English, one
7
8
  language only. The audit trail is shared by the whole team and by future
8
9
  sessions; it must not depend on the author's conversational language. A
9
10
  mission artifact in any other language is a defect, not a style choice.
10
11
 
11
12
  ```
12
13
  .mugiwara/
13
- ├── config → runtime mode config (gitignored; project overrides global)
14
- ├── state/<mission>/ computed mission state per (mission, member): state.json (solo) or <member>.json (mugiwara savepoint)
15
- ├── continue/<mission>/ machine-written resume point per (mission, member): state.json (solo) or <member>.json
16
- ├── spec/ brainstorm output: YYYY-MM-DD-<mission>.md
17
- ├── plans/ plan doc: YYYY-MM-DD-<mission>.mdCLEAN, Nami-only, source of truth from Flow 2
18
- ├── results/ per-mission folder: results/<mission>/ holds every flow-stage artifact
19
- │ └── <mission>/
20
- ├── 01-execution.md flow stage 3: task table + evidence
21
- ├── 02-audit.md flow stage 4: checkpoint report
22
- ├── 03-quality.md flow stage 5: quality report
23
- ├── 04-gates.md → flow stage 6: gate verdict
24
- ├── 05-healing.md flow 8: healing report (only when heal ran)
25
- ├── 06-closure.md → flow stage 9: closure summary (KEEP at cleanup)
26
- ├── 07-pr-verdict.md flow stage 9: PR material (KEEP at cleanup)
27
- └── todos.md → execution checkbox list
28
- ├── reports/ mission report (aggregate): YYYY-MM-DD-<mission>.md one-file summary of all flow stages
29
- ├── review/ review + security findings
30
- ├── issues/ blocker log: YYYY-MM-DD-<mission>-blockers.md
31
- └── logs/ Luffy's decision + check-in log: YYYY-MM-DD-<mission>.md (deleted at cleanup)
14
+ ├── config → runtime mode config (gitignored; project overrides global)
15
+ ├── lessons.md cross-mission lessons ledger (memory keeper)
16
+ ├── index.md one line per archived mission (written by mugiwara archive/clean)
17
+ └── missions/<mission>/ ONE dir per mission; bare names, no date prefixes
18
+ ├── plan.md CLEAN execution plan — Nami-only, source of truth from Flow 2
19
+ ├── spec.md brainstorm output / spec bridge (consumed by planning)
20
+ ├── decisions.md → Luffy's decision + check-in log (route reasons, mode flips)
21
+ ├── blockers.md blocker ledger rows
22
+ ├── review.md Robin's findings
23
+ ├── security.md Jinbe's findings
24
+ ├── report.md closure report; archive folds the flow files into it
25
+ ├── state.json computed state per (mission): solo = state.json,
26
+ │ team = <member>.json (gitignored)
27
+ └── continue.json machine resume point: solo = continue.json,
28
+ team = continue-<member>.json (gitignored)
29
+ └── flows/ per-flow-stage artifacts, numbered by flow order
30
+ ├── 01-execution.md flow stage 3: task table + evidence
31
+ ├── 02-audit.md flow stage 4: checkpoint report
32
+ ├── 03-quality.md flow stage 5: quality report
33
+ ├── 04-gates.md → flow stage 6: gate verdict
34
+ ├── 05-healing.md → flow stage 8: healing report (only when heal ran)
35
+ ├── 06-closure.md → flow stage 9: closure summary (seeds report.md)
36
+ ├── 07-pr-verdict.md→ flow stage 9: PR material
37
+ ├── 08-verifier.md → flow stage 4.5: skeptic findings (optional)
38
+ └── todos.md → execution checkbox list
32
39
  ```
33
40
 
34
- Naming rule: every artifact inside `results/<mission>/` uses the SAME mission
35
- name, no date prefix the folder is the grouping, numbered by flow-stage order
36
- (`01-`, `02-`, …). Unnumbered support files may sit alongside the numbered
37
- ones (`todos.md`, `resume.md`, `eval.md`, evidence logs) and are not part of
38
- the flow-stages table. `reports/` and `logs/` and `plans/` files carry the
39
- `YYYY-MM-DD-` date prefix because they are cross-mission folders; `results/`
40
- does not, because each mission owns its folder.
41
+ Naming rule: bare names only. The date lives in `state.json` (`updated_at`)
42
+ and in git history; the folder is the grouping. Lane 0/1 missions write the
43
+ minimum: `state.json`, `flows/01-execution.md`, and `report.md` at closure
44
+ no plan/spec/blockers unless a blocker actually occurs (audit-lite).
41
45
 
42
46
  The plan doc stays clean: it holds ONLY the execution plan (flow stages, tasks,
43
47
  criteria, risks). Who did what, route decisions, and check-in verdicts go to
44
- `logs/`; the closure report goes to `results/<mission>/06-closure.md`. Nothing
45
- non-plan pollutes the plan doc.
48
+ `decisions.md`; the closure summary goes to `report.md`. Nothing non-plan
49
+ pollutes the plan doc.
46
50
 
47
51
  The owning agent creates the folder it needs on first write. No mission
48
52
  artifacts go outside `.mugiwara/`.
49
53
 
50
54
  ## Cleanup (Flow 9)
51
55
 
52
- Step results are evidence KEEP every file in `results/<mission>/`
53
- (`01-execution.md` through `05-healing.md`, `todos.md`, `06-closure.md`,
54
- `07-pr-verdict.md`); they feed the mission report and closure links. Delete
55
- only consumed cross-artifacts: `logs/`, `spec/`, `review/`, `issues/`,
56
- `state/<mission>/`, `continue/<mission>/`. Keep
57
- `plans/`, `reports/`, `config`, `logs/lessons.md` (canonical
58
- lessons ledger; cross-mission state: `backup/`, `manifest.json`). List
59
- candidates before deleting.
56
+ Run `mugiwara archive <mission>` (dry-run first). It folds every flow file,
57
+ review, security, blockers, and decisions into `report.md`, then removes them
58
+ along with session state (`*.json`). The mission dir ends as two durable
59
+ files: `plan.md` + `report.md`. Batch form for several closed missions:
60
+ `mugiwara clean [--all] [--before <date>]`.