@ionivetech/mugiwara 0.2.0 → 0.3.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.
- package/.opencode/commands/mugiwara-execute.md +11 -0
- package/.opencode/commands/mugiwara-heal.md +11 -0
- package/.opencode/commands/mugiwara-mode.md +6 -0
- package/.opencode/commands/mugiwara-plan.md +11 -0
- package/.opencode/commands/mugiwara-review.md +11 -0
- package/.opencode/commands/mugiwara-security.md +11 -0
- package/.opencode/commands/mugiwara-ship.md +11 -0
- package/.opencode/commands/mugiwara.md +11 -0
- package/.opencode/plugins/mugiwara.mjs +126 -7
- package/README.md +252 -205
- package/content/agents/brook-healing.md +2 -2
- package/content/agents/luffy-orchestrator.md +3 -2
- package/content/agents/robin-reviewer.md +1 -1
- package/content/agents/skeptic-verifier.md +1 -1
- package/content/agents/using-mugiwara.md +5 -1
- package/content/agents/usopp-brainstorm.md +1 -1
- package/content/agents/zoro-execution.md +1 -1
- package/content/skills/mugiwara-api-and-interface-design/SKILL.md +87 -0
- package/content/skills/mugiwara-context-engineering/SKILL.md +59 -0
- package/content/skills/mugiwara-doubt-driven-development/SKILL.md +65 -0
- package/content/skills/mugiwara-execution/SKILL.md +4 -0
- package/content/skills/mugiwara-frontend/SKILL.md +58 -56
- package/content/skills/mugiwara-frontend/references/checklist.md +37 -0
- package/content/skills/mugiwara-gates/SKILL.md +4 -0
- package/content/skills/mugiwara-git-worktrees/SKILL.md +62 -0
- package/content/skills/mugiwara-healing/SKILL.md +12 -0
- package/content/skills/mugiwara-mode/SKILL.md +13 -4
- package/content/skills/mugiwara-orchestration/SKILL.md +19 -1
- package/content/skills/mugiwara-planning/SKILL.md +13 -15
- package/content/skills/mugiwara-pr/SKILL.md +17 -6
- package/content/skills/mugiwara-quality/SKILL.md +10 -0
- package/content/skills/mugiwara-security/SKILL.md +38 -1
- package/content/skills/mugiwara-ship/SKILL.md +24 -1
- package/content/skills/mugiwara-systematic-debugging/SKILL.md +77 -0
- package/content/skills/mugiwara-test-driven-development/SKILL.md +84 -0
- package/content/skills/mugiwara-workflow/SKILL.md +8 -2
- package/content/skills/mugiwara-writing-skills/SKILL.md +60 -0
- package/dist/mugiwara.js +42 -26
- package/docs/adoption-guide.md +1 -1
- package/docs/agents.md +2 -2
- package/docs/claude-setup.md +9 -4
- package/docs/codex-setup.md +3 -1
- package/docs/config.md +50 -0
- package/docs/copilot-setup.md +3 -1
- package/docs/cursor-setup.md +3 -1
- package/docs/developer-onboarding.md +1 -1
- package/docs/execution-model.md +33 -0
- package/docs/gemini-setup.md +4 -1
- package/docs/getting-started.md +16 -4
- package/docs/index.md +7 -2
- package/docs/modes.md +22 -12
- package/docs/opencode-setup.md +9 -2
- package/docs/pr-summary.md +54 -0
- package/docs/skill-anatomy.md +5 -0
- package/docs/skills.md +17 -5
- package/docs/windsurf-setup.md +3 -1
- package/hooks/hooks.json +15 -0
- package/hooks/session-start.ts +8 -0
- package/package.json +2 -1
- package/src/targets/claude.ts +18 -1
- package/src/targets/codex.ts +1 -1
- package/src/targets/gemini.ts +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# PR summary (closure handoff)
|
|
2
|
+
|
|
3
|
+
At the end of a mission the crew pushes the branch and **stops** — it never
|
|
4
|
+
creates a PR, in any mode. What you get instead is a ready-to-paste **PR
|
|
5
|
+
summary** so you can open the pull request without writing a description.
|
|
6
|
+
|
|
7
|
+
This mirrors the reference workflows (superpowers `finishing-a-development-branch`,
|
|
8
|
+
agent-skills): the integration decision stays with the human. Mugiwara's
|
|
9
|
+
addition is that the PR description is already written.
|
|
10
|
+
|
|
11
|
+
## What happens at the terminal
|
|
12
|
+
|
|
13
|
+
1. Save-point commit → push the mission branch with plain `git push -u origin <branch>`.
|
|
14
|
+
2. Write `.mugiwara/results/YYYY-MM-DD-<mission>-pr-verdict.md` per `mugiwara-pr` —
|
|
15
|
+
it includes the **PR summary block** (copy-paste title + body).
|
|
16
|
+
3. Hand the branch + verdict file to you. You open the PR and paste the block.
|
|
17
|
+
|
|
18
|
+
No `gh` CLI, no PR API calls, no auto-reaction to review comments or CI.
|
|
19
|
+
|
|
20
|
+
## The PR summary block
|
|
21
|
+
|
|
22
|
+
The verdict file's PR summary is shaped by `.mugiwara/config` (project) /
|
|
23
|
+
`~/.mugiwara/config` (global):
|
|
24
|
+
|
|
25
|
+
| Key | Default | What it shapes |
|
|
26
|
+
|-----|---------|----------------|
|
|
27
|
+
| `base` | `main` | The target branch named in the PR summary |
|
|
28
|
+
|
|
29
|
+
Example:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
mode=guided
|
|
33
|
+
branch=feature/{type}-{issue}-{slug}
|
|
34
|
+
commit=conventional
|
|
35
|
+
base=main
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The title is a concise `{type}: {summary}` line from mission metadata; the body
|
|
39
|
+
is the verdict-file PR summary block (what changed, evidence, checks). The
|
|
40
|
+
summary is **material, never posted** — the crew's job ends at push.
|
|
41
|
+
|
|
42
|
+
## Why no auto-create
|
|
43
|
+
|
|
44
|
+
- PR creation is an external, irreversible side effect (public artifact, CI
|
|
45
|
+
trigger, reviewer notifications) — keeping it human avoids surprise and
|
|
46
|
+
security surface.
|
|
47
|
+
- The crew never needs forge credentials (`gh` auth, API tokens), so there is
|
|
48
|
+
nothing to leak and nothing to configure.
|
|
49
|
+
- The stop-at-PR invariant holds in every mode: no auto-reaction to review
|
|
50
|
+
comments, no auto-healing CI, no merge, no deploy.
|
|
51
|
+
|
|
52
|
+
See [`mugiwara-pr`](../content/skills/mugiwara-pr/SKILL.md) for the terminal
|
|
53
|
+
procedure and [`mugiwara-mode`](../content/skills/mugiwara-mode/SKILL.md) for
|
|
54
|
+
the mode contract.
|
package/docs/skill-anatomy.md
CHANGED
|
@@ -9,6 +9,7 @@ via the agentskills.io layout.
|
|
|
9
9
|
|
|
10
10
|
```
|
|
11
11
|
skills/<skill-name>/SKILL.md
|
|
12
|
+
skills/<skill-name>/references/<topic>.md # optional: overflow detail, linked from the body
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
```markdown
|
|
@@ -53,6 +54,10 @@ style:
|
|
|
53
54
|
- **Boundaries are explicit.** Auditor skills say "never edit code"; executor
|
|
54
55
|
skills say "never report done without command output."
|
|
55
56
|
- **≤120 lines.** Skills that grow past that get split, not stretched.
|
|
57
|
+
- **Progressive disclosure.** Keep the trigger-scannable description and the
|
|
58
|
+
decision tree in the body; when a section exceeds roughly 15–20 lines, move
|
|
59
|
+
the detail to a `references/<topic>.md` file and drop a one-line pointer in
|
|
60
|
+
the body saying what to read and why.
|
|
56
61
|
|
|
57
62
|
## How skills reference each other
|
|
58
63
|
|
package/docs/skills.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# The Techniques —
|
|
1
|
+
# The Techniques — 32 Skills
|
|
2
2
|
|
|
3
3
|
Each skill is a portable markdown playbook — the "how to" the crew follows when
|
|
4
4
|
it embodies a role. Skills are the actual content; agents are the personas.
|
|
@@ -16,22 +16,34 @@ it embodies a role. Skills are the actual content; agents are the personas.
|
|
|
16
16
|
| `mugiwara-quality` | Discover the project's real tooling; formatter, linter, unit tests under the consent matrix |
|
|
17
17
|
| `mugiwara-gates` | Coverage ≥90% new / ≥80% modified, build validation, Definition of Done |
|
|
18
18
|
| `mugiwara-review` | Doubt-driven review: breaking-change analysis, five-axis, severity-tagged findings |
|
|
19
|
-
| `mugiwara-security` |
|
|
19
|
+
| `mugiwara-security` | STRIDE-first security review, OWASP Top 10 mapping, authn/authz, secrets, dependency audit, untrusted-data doctrine |
|
|
20
20
|
| `mugiwara-healing` | Reads the ledger, Stop-the-Line + Prove-It root-cause fixes, rollback prep |
|
|
21
21
|
|
|
22
22
|
## Mission control
|
|
23
23
|
|
|
24
24
|
| Skill | Enforces |
|
|
25
25
|
|-------|----------|
|
|
26
|
-
| `mugiwara-mode` | Runtime levels guided / semi / auto, consent invariants, gated auto-GO, push + ready-PR terminal |
|
|
26
|
+
| `mugiwara-mode` | Runtime levels guided / semi / auto: mode owns autonomy, config owns writing standards, consent invariants, gated auto-GO, push + ready-PR terminal |
|
|
27
27
|
| `mugiwara-git` | Atomic commits, save-points, multi-commit splitting, bisect/blame debugging |
|
|
28
28
|
| `mugiwara-testcases` | User-test intake (ATDD): immutable-gold rule, declarative-AC routing, consent, failure adjudication |
|
|
29
|
-
| `mugiwara-pr` |
|
|
29
|
+
| `mugiwara-pr` | Terminal: push + verdict file with a ready PR summary block; never creates a PR, stop-at-PR invariant |
|
|
30
30
|
| `mugiwara-ship` | GO/NO-GO ship gate: pre-launch checklist, feature flags, rollback plan |
|
|
31
31
|
| `mugiwara-deprecation` | Sunset & migration discipline: keep-or-retire gate, cutover playbooks, safe schema changes |
|
|
32
32
|
| `mugiwara-resume` | Session resume: rebuild state from `.mugiwara/` after compaction/loss; never restart |
|
|
33
33
|
| `mugiwara-lessons` | Cross-mission memory: actionable lessons ledger, read at triage, written at closure |
|
|
34
|
-
| `mugiwara-observability` | Trace the crew: structured logs, OTel-compatible spans, session correlation |
|
|
34
|
+
| `mugiwara-observability` | Trace the crew: structured logs, OTel-compatible spans, session correlation, end-of-mission summary |
|
|
35
|
+
|
|
36
|
+
## Engineering practice
|
|
37
|
+
|
|
38
|
+
| Skill | Enforces |
|
|
39
|
+
|-------|----------|
|
|
40
|
+
| `mugiwara-writing-skills` | Meta-skill: how mugiwara authors skills — anatomy, ≤120-line rule, progressive disclosure, anti-rationalization |
|
|
41
|
+
| `mugiwara-systematic-debugging` | 4-phase root-cause discipline: reproduce → localize → reduce → fix + guard; stop-the-line, prove-it first |
|
|
42
|
+
| `mugiwara-test-driven-development` | RED-GREEN-REFACTOR, proof-of-when, test pyramid, one test = one behavior |
|
|
43
|
+
| `mugiwara-api-and-interface-design` | Contract-first design, error semantics, boundary validation, backward compatibility, versioning |
|
|
44
|
+
| `mugiwara-doubt-driven-development` | Adversarial fresh-context verification of in-flight decisions: claim → extract → doubt → reconcile → stop |
|
|
45
|
+
| `mugiwara-git-worktrees` | Isolated parallel branches via `git worktree`, branch hygiene, safe cleanup |
|
|
46
|
+
| `mugiwara-context-engineering` | Token/context management: feed selectively, trust-sort sources, progressive disclosure, rules files |
|
|
35
47
|
|
|
36
48
|
## Domain & advanced
|
|
37
49
|
|
package/docs/windsurf-setup.md
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
npx @ionivetech/mugiwara@latest --project ./my-app --target windsurf --yes
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
**Update** — `mugiwara update`. **Uninstall** — `mugiwara uninstall`.
|
|
10
|
+
|
|
9
11
|
## What you get
|
|
10
12
|
|
|
11
|
-
-
|
|
13
|
+
- 32 skills as rules files in `.devin/rules`.
|
|
12
14
|
|
|
13
15
|
## Notes
|
|
14
16
|
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// hooks/session-start.ts — SessionStart hook: reminds the agent the crew is available.
|
|
3
|
+
console.log(
|
|
4
|
+
JSON.stringify({
|
|
5
|
+
additionalContext:
|
|
6
|
+
"Mugiwara crew available. The workflow auto-activates for non-trivial requests (no need to call `/using-mugiwara` at session start; it is optional and routes to the right crew member). The crew runs inline in the main thread — Never Task-dispatch a crew member. Subagents only for [PARALLEL] task batches, concurrent review/security, and independent re-run checks. Checkpoint reports at wave/stage boundaries. Mode: guided / semi / auto (see .mugiwara/config). See skills/mugiwara-workflow."
|
|
7
|
+
})
|
|
8
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionivetech/mugiwara",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The Straw Hat crew of AI agents and skills: brainstorm, plan, execute, checkpoint, quality, gates, review, security, self-healing. Installs into Claude Code, opencode, Copilot, Gemini, Codex, Cursor, Kimi, pi, Windsurf, Cline, Kilo, Antigravity.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"content",
|
|
20
20
|
"docs",
|
|
21
21
|
".opencode",
|
|
22
|
+
"hooks",
|
|
22
23
|
"scripts/install.sh",
|
|
23
24
|
"scripts/install.ps1",
|
|
24
25
|
"README.md",
|
package/src/targets/claude.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
// src/targets/claude.ts
|
|
2
|
-
import {
|
|
2
|
+
import { existsSync, readFileSync, mkdirSync, copyFileSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
3
5
|
import { stringifyFrontmatter, type FrontmatterData } from '../frontmatter.ts';
|
|
4
6
|
import type { Target } from '../installer.ts';
|
|
5
7
|
|
|
8
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const HOOK_SRC = join(here, '..', '..', 'hooks', 'session-start.ts');
|
|
10
|
+
|
|
6
11
|
export const target: Target = {
|
|
7
12
|
id: 'claude',
|
|
8
13
|
label: 'Claude Code',
|
|
@@ -22,4 +27,16 @@ export const target: Target = {
|
|
|
22
27
|
if (data.tools) fm.tools = data.tools;
|
|
23
28
|
return { relPath: `${data.name}.md`, text: stringifyFrontmatter(fm, body) };
|
|
24
29
|
},
|
|
30
|
+
postInstall({ scope, projectDir, home, dryRun }) {
|
|
31
|
+
// Wire the SessionStart hook (inline doctrine) into the installed .claude dir.
|
|
32
|
+
const root = scope === 'global' ? join(home, '.claude') : join(projectDir, '.claude');
|
|
33
|
+
const hookFile = join(root, 'hooks', 'session-start.ts');
|
|
34
|
+
if (dryRun) return { written: [], notes: [] };
|
|
35
|
+
if (existsSync(HOOK_SRC) && !existsSync(hookFile)) {
|
|
36
|
+
mkdirSync(dirname(hookFile), { recursive: true });
|
|
37
|
+
copyFileSync(HOOK_SRC, hookFile);
|
|
38
|
+
return { written: [hookFile], notes: [] };
|
|
39
|
+
}
|
|
40
|
+
return { written: [], notes: [] };
|
|
41
|
+
},
|
|
25
42
|
};
|
package/src/targets/codex.ts
CHANGED
|
@@ -6,5 +6,5 @@ export const target = makeGeneric({
|
|
|
6
6
|
label: 'Codex',
|
|
7
7
|
rulesDir: '.codex/mugiwara',
|
|
8
8
|
bootstrapFile: 'AGENTS.md',
|
|
9
|
-
bootstrapPointer: 'Mugiwara crew installed in .codex/mugiwara/ — read .codex/mugiwara/mugiwara-workflow.md to run the pipeline.',
|
|
9
|
+
bootstrapPointer: 'Mugiwara crew installed in .codex/mugiwara/ — read .codex/mugiwara/mugiwara-workflow.md to run the pipeline inline in the main conversation.',
|
|
10
10
|
});
|
package/src/targets/gemini.ts
CHANGED
|
@@ -6,5 +6,5 @@ export const target = makeGeneric({
|
|
|
6
6
|
label: 'Gemini',
|
|
7
7
|
rulesDir: '.gemini/mugiwara',
|
|
8
8
|
bootstrapFile: 'GEMINI.md',
|
|
9
|
-
bootstrapPointer: 'Mugiwara crew installed in .gemini/mugiwara/ — read .gemini/mugiwara/mugiwara-workflow.md to run the pipeline.',
|
|
9
|
+
bootstrapPointer: 'Mugiwara crew installed in .gemini/mugiwara/ — read .gemini/mugiwara/mugiwara-workflow.md to run the pipeline inline in the main conversation.',
|
|
10
10
|
});
|