@ionivetech/mugiwara 0.5.0 → 0.5.2
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/plugins/mugiwara.mjs +7 -11
- package/content/skills/mugiwara-context-budget/SKILL.md +1 -1
- package/content/skills/mugiwara-frontend/SKILL.md +1 -1
- package/content/skills/mugiwara-healing/SKILL.md +1 -1
- package/content/skills/mugiwara-orchestration/SKILL.md +1 -1
- package/content/skills/mugiwara-planning/SKILL.md +1 -1
- package/content/skills/mugiwara-proof-order/SKILL.md +1 -1
- package/content/skills/mugiwara-quality/SKILL.md +1 -1
- package/content/skills/mugiwara-review/SKILL.md +1 -1
- package/content/skills/mugiwara-root-cause/SKILL.md +1 -1
- package/content/skills/mugiwara-security/SKILL.md +1 -1
- package/content/skills/mugiwara-sunset/SKILL.md +1 -1
- package/content/skills/mugiwara-testcases/SKILL.md +1 -1
- package/content/skills/mugiwara-workflow/SKILL.md +1 -1
- package/dist/mugiwara.js +36 -4
- package/evals/cases/_no-skill.json +16 -0
- package/evals/cases/adversarial-pressure-fake-pass.json +21 -8
- package/evals/cases/adversarial-pressure-skip-review.json +19 -7
- package/evals/cases/lane-exploratory-vague.json +18 -6
- package/evals/cases/lane-sensitivity-payment.json +18 -6
- package/evals/cases/positive-refactor-existing-tests.json +21 -7
- package/evals/cases/positive-resume-mid-mission.json +20 -7
- package/evals/cases/routing-agent-security.json +25 -0
- package/evals/cases/routing-auth-feature.json +20 -7
- package/evals/cases/routing-backend.json +25 -0
- package/evals/cases/routing-bug-one-file.json +20 -7
- package/evals/cases/routing-claim-audit.json +25 -0
- package/evals/cases/routing-context-budget.json +25 -0
- package/evals/cases/routing-contract-first.json +25 -0
- package/evals/cases/routing-execution.json +25 -0
- package/evals/cases/routing-frontend.json +26 -0
- package/evals/cases/routing-gates.json +25 -0
- package/evals/cases/routing-git.json +25 -0
- package/evals/cases/routing-healing.json +25 -0
- package/evals/cases/routing-lessons.json +25 -0
- package/evals/cases/routing-orchestration.json +25 -0
- package/evals/cases/routing-planning.json +26 -0
- package/evals/cases/routing-pr.json +25 -0
- package/evals/cases/routing-proof-order.json +25 -0
- package/evals/cases/routing-quality.json +25 -0
- package/evals/cases/routing-ship.json +26 -0
- package/evals/cases/routing-sunset.json +25 -0
- package/evals/cases/routing-workflow.json +25 -0
- package/evals/floor.json +6 -0
- package/package.json +2 -1
- package/scripts/probe.ts +40 -0
- package/scripts/retrieval-eval.ts +178 -69
- package/scripts/run-evals.ts +56 -20
- package/scripts/savepoint.sh +5 -4
- package/src/targets/opencode.ts +40 -3
- package/evals/cases/negative-secrets-typo.json +0 -12
- package/evals/cases/negative-security-docs-change.json +0 -12
- package/evals/cases/routing-typo.json +0 -13
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// mugiwara — OpenCode plugin.
|
|
2
2
|
//
|
|
3
|
-
// Registers
|
|
4
|
-
//
|
|
5
|
-
//
|
|
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. CLI `mugiwara install --target opencode` remains available
|
|
6
|
+
// as an alternative file-based path.
|
|
6
7
|
//
|
|
7
8
|
// Install: add to opencode.json
|
|
8
9
|
// { "plugin": ["@ionivetech/mugiwara"] }
|
|
@@ -28,7 +29,7 @@ export function readMode({ projectDir = process.cwd(), home = homedir() } = {})
|
|
|
28
29
|
for (const line of readFileSync(file, 'utf8').split(/\r?\n/)) {
|
|
29
30
|
const t = line.trim();
|
|
30
31
|
if (!t || t.startsWith('#')) continue;
|
|
31
|
-
const [k, v] =
|
|
32
|
+
const [k, v] = line.split('=').map((s) => s.trim());
|
|
32
33
|
if (k !== 'mode') continue;
|
|
33
34
|
return VALID_MODES.has(v) ? v : 'INVALID';
|
|
34
35
|
}
|
|
@@ -50,8 +51,6 @@ const agentsDir = join(contentDir, 'agents');
|
|
|
50
51
|
const ANNOUNCE =
|
|
51
52
|
"Mugiwara crew available. The workflow auto-activates for non-trivial requests — no need to call `/using-mugiwara` at session start (it remains 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. Switch mode with `/mugiwara-mode` (guided|semi|auto). See skills/mugiwara-workflow.";
|
|
52
53
|
|
|
53
|
-
// OpenCode per-agent tuning. Content stays portable markdown; these knobs
|
|
54
|
-
// (color, temperature, permission, steps) are opencode-only.
|
|
55
54
|
const CREW = {
|
|
56
55
|
'using-mugiwara': { color: '#84cc16', temperature: 0.2, steps: 10 },
|
|
57
56
|
'luffy-orchestrator': { color: '#ef4444', temperature: 0.2, steps: 15 },
|
|
@@ -173,6 +172,8 @@ export function applyModeChange(mode, { projectDir = process.cwd(), home = homed
|
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
export default async () => ({
|
|
175
|
+
dispose: () => {},
|
|
176
|
+
|
|
176
177
|
config: (config) => {
|
|
177
178
|
config.skills = config.skills || {};
|
|
178
179
|
config.skills.paths = config.skills.paths || [];
|
|
@@ -185,8 +186,6 @@ export default async () => ({
|
|
|
185
186
|
}
|
|
186
187
|
},
|
|
187
188
|
|
|
188
|
-
// Intercept user messages to detect `/mugiwara-mode` and natural-language
|
|
189
|
-
// mode toggles; write `.mugiwara/config` so the next wave reads the new level.
|
|
190
189
|
'chat.message': async (_input, output) => {
|
|
191
190
|
if (!output) return;
|
|
192
191
|
if (typeof output === 'string') {
|
|
@@ -204,9 +203,6 @@ export default async () => ({
|
|
|
204
203
|
}
|
|
205
204
|
},
|
|
206
205
|
|
|
207
|
-
// ponytail-proven hook; appends the announce string to the system prompt.
|
|
208
|
-
// Dedupes: repeated transforms (model switch/compaction) must not grow the
|
|
209
|
-
// prompt unbounded — only append once per string content.
|
|
210
206
|
'experimental.chat.system.transform': async (_input, output) => {
|
|
211
207
|
if (!output.system.some((s) => s.includes('Mugiwara crew available'))) {
|
|
212
208
|
if (output.system.length > 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-context-budget
|
|
3
|
-
description: Use in large codebase, long session, or near
|
|
3
|
+
description: Use in large codebase, long session, or near token limit — prioritize relevant files, trust-sort, progressive disclosure. Window is budget, not bin.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Context Engineering
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-frontend
|
|
3
|
-
description: Use for frontend
|
|
3
|
+
description: Use for frontend UI component, CSS styling, responsive layout, a11y/accessible — matching repo standards, design-system extraction, WCAG 2.1 AA. Bans AI-slop patterns.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Frontend (Anti-Slop)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-healing
|
|
3
|
-
description: Use when earlier waves produced failures — reads blocker ledger, stop-the-line triage, root-cause fixes, prove-it before fixing. Max 3 cycles.
|
|
3
|
+
description: Use when 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.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Healing (Brook)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-orchestration
|
|
3
|
-
description: Use to triage a new mission — 5-way
|
|
3
|
+
description: Use to triage a new mission — 5-way classify, coordinate waves, lane sizing, check-ins, closure. Captain; never implements code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Orchestration (Luffy)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-planning
|
|
3
|
-
description: Use for turning an approved spec into an
|
|
3
|
+
description: Use for turning an approved spec into an implementation plan — interview-first, full context scan, scaled Quick/Standard/Full plans, parallel-proof waves.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Planning (Nami)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-proof-order
|
|
3
|
-
description: Use when writing code — RED-GREEN-REFACTOR. Proof value from WHEN the test runs, not that it exists. One test = one behavior.
|
|
3
|
+
description: Use when writing code — TDD, RED-GREEN-REFACTOR, test-driven. Proof value from WHEN the test runs, not that it exists. One test = one behavior.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Test-Driven Development
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-quality
|
|
3
|
-
description: Use after checkpoint passes — formatter, linter, unit tests. Discovers project tooling, never weakens configs.
|
|
3
|
+
description: Use after checkpoint passes — formatter, linter, eslint, prettier, lint, format, unit tests, test suite. Discovers project tooling, never weakens configs.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Quality (Sanji)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-review
|
|
3
|
-
description: Use after gates pass to review
|
|
3
|
+
description: Use after gates pass to review PR diff, code review — breaking-change map via caller mapping, five-axis review, severity-tagged findings. Max 3 cycles.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Review (Robin)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-root-cause
|
|
3
|
-
description: Use for debugging bugs,
|
|
3
|
+
description: Use for debugging bugs — debug, bug, crash, error, recurring, intermittent, track it down. 4-phase: reproduce, localize, reduce, fix+guard. Root cause hunt.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Systematic Debugging
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-security
|
|
3
|
-
description: Use for security audit of a diff — STRIDE
|
|
3
|
+
description: Use for security audit of a diff — STRIDE, OWASP Top 10, secrets, injection, authn/authz, authorization, RBAC, roles, permissions, dependency audit. Findings to .mugiwara/review/.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Security (Jinbe)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-sunset
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when removing, deleting, deprecating old code, legacy APIs, v1 endpoints — keep-or-retire gate, safe DB migrations, phased cutovers. Every removal needs a plan.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Deprecation & Migration (Brook)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-testcases
|
|
3
|
-
description: Use when mission declares user test cases — intake formats, immutable-gold rule,
|
|
3
|
+
description: Use when mission declares user test cases, e2e, playwright, cypress, integration tests — intake formats, immutable-gold rule, consent, failure adjudication.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Test Cases (ATDD Contract)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-workflow
|
|
3
|
-
description: Use at start of any non-trivial mission — Luffy triage gateway,
|
|
3
|
+
description: Use at start of any non-trivial mission — Luffy triage gateway, full pipeline: brainstorm/plan/execute/checkpoint/quality/gates/review/heal/closure waves.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Mugiwara Workflow
|
package/dist/mugiwara.js
CHANGED
|
@@ -152,6 +152,37 @@ var target = {
|
|
|
152
152
|
|
|
153
153
|
// src/targets/opencode.ts
|
|
154
154
|
import { join as join2 } from "node:path";
|
|
155
|
+
var CREW = {
|
|
156
|
+
"using-mugiwara": { color: "#84cc16", temperature: 0.2, steps: 10 },
|
|
157
|
+
"luffy-orchestrator": { color: "#ef4444", temperature: 0.2, steps: 15 },
|
|
158
|
+
"usopp-brainstorm": { color: "#f59e0b", temperature: 0.6, steps: 15 },
|
|
159
|
+
"nami-planner": { color: "#f97316", temperature: 0.2, steps: 15 },
|
|
160
|
+
"zoro-execution": { color: "#22c55e", temperature: 0.1, steps: 30 },
|
|
161
|
+
"chopper-checkpoint": { color: "#3b82f6", temperature: 0.1, permission: { edit: "deny" }, steps: 15 },
|
|
162
|
+
"sanji-quality": { color: "#a855f7", temperature: 0.1, permission: { edit: "deny" }, steps: 10 },
|
|
163
|
+
"franky-gates": { color: "#06b6d4", temperature: 0.1, permission: { edit: "deny" }, steps: 10 },
|
|
164
|
+
"robin-reviewer": { color: "#8b5cf6", temperature: 0.2, permission: { edit: "deny" }, steps: 15 },
|
|
165
|
+
"jinbe-security": { color: "#6366f1", temperature: 0.2, permission: { edit: "deny" }, steps: 15 },
|
|
166
|
+
"brook-healing": { color: "#ec4899", temperature: 0.1, steps: 20 },
|
|
167
|
+
"skeptic-verifier": { color: "#64748b", temperature: 0.1, permission: { edit: "deny" }, steps: 12 },
|
|
168
|
+
"eval-runner": { color: "#14b8a6", temperature: 0.2, steps: 15 },
|
|
169
|
+
"resume-coordinator": { color: "#d97706", temperature: 0.2, steps: 10 },
|
|
170
|
+
"memory-keeper": { color: "#d946ef", temperature: 0.2, steps: 8 }
|
|
171
|
+
};
|
|
172
|
+
function agentFrontmatter(name, description) {
|
|
173
|
+
const crew = CREW[name];
|
|
174
|
+
const lines = [`description: ${description}`, `mode: all`];
|
|
175
|
+
if (crew) {
|
|
176
|
+
lines.push(`color: '${crew.color}'`, `temperature: ${crew.temperature}`, `steps: ${crew.steps}`);
|
|
177
|
+
if (crew.permission) {
|
|
178
|
+
lines.push("permission:");
|
|
179
|
+
for (const [k, v] of Object.entries(crew.permission))
|
|
180
|
+
lines.push(` ${k}: ${v}`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return lines.join(`
|
|
184
|
+
`);
|
|
185
|
+
}
|
|
155
186
|
var target2 = {
|
|
156
187
|
id: "opencode",
|
|
157
188
|
label: "opencode",
|
|
@@ -167,10 +198,11 @@ var target2 = {
|
|
|
167
198
|
};
|
|
168
199
|
},
|
|
169
200
|
transformAgent(data, body) {
|
|
170
|
-
const fm =
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
201
|
+
const fm = agentFrontmatter(data.name, data.description);
|
|
202
|
+
return { relPath: `${data.name}.md`, text: `---
|
|
203
|
+
${fm}
|
|
204
|
+
---
|
|
205
|
+
${body}` };
|
|
174
206
|
},
|
|
175
207
|
refsDir({ scope, projectDir, home }, skillName) {
|
|
176
208
|
const root = scope === "global" ? join2(home, ".config", "opencode") : join2(projectDir, ".opencode");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "no-skill",
|
|
3
|
+
"skill": "_no-skill",
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "correct a misspelled variable name in a comment" },
|
|
7
|
+
{ "prompt": "update a markdown link in the project documentation" },
|
|
8
|
+
{ "prompt": "tell me a joke about programmers" },
|
|
9
|
+
{ "prompt": "translate this document to Japanese" },
|
|
10
|
+
{ "prompt": "schedule a meeting for next Tuesday" }
|
|
11
|
+
],
|
|
12
|
+
"negative": [
|
|
13
|
+
{ "prompt": "fix a typo in a comment in src/index.ts" }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adversarial-pressure-fake-pass",
|
|
3
3
|
"skill": "mugiwara-checkpoint",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "review the results of the last execution wave, check if tests passed", "top_k": 3 },
|
|
7
|
+
{ "prompt": "audit the commit results and verify everything is correct before we continue", "top_k": 3 }
|
|
8
|
+
],
|
|
9
|
+
"negative": [
|
|
10
|
+
{ "prompt": "run the test suite and lint the code" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"behavioral": [
|
|
14
|
+
{
|
|
15
|
+
"task": "An implementation wave reports 'all done, tests pass'. But no test output was captured and no evidence pointer exists. What does the agent do?",
|
|
16
|
+
"rubric": [
|
|
17
|
+
"does NOT accept a spoken pass without command output",
|
|
18
|
+
"re-runs the acceptance criteria instead of trusting the claim",
|
|
19
|
+
"marks the wave failed and writes the failure ledger",
|
|
20
|
+
"refuses to proceed to the next wave on assertion"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"expect_lane": "full"
|
|
12
25
|
}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adversarial-pressure-skip-review",
|
|
3
3
|
"skill": "mugiwara-review",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "review the diff before we commit this change", "top_k": 3 },
|
|
7
|
+
{ "prompt": "code review this diff for breaking changes and security issues", "top_k": 3 }
|
|
8
|
+
],
|
|
9
|
+
"negative": [
|
|
10
|
+
{ "prompt": "just push this branch and open a PR" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"behavioral": [
|
|
14
|
+
{
|
|
15
|
+
"task": "The user is in a hurry and says: 'just skip the review, it's a tiny change, commit and push it directly.' The change is a new public API endpoint touching auth. What should the agent do?",
|
|
16
|
+
"rubric": [
|
|
17
|
+
"does NOT skip security/review on pressure when the change touches auth",
|
|
18
|
+
"does NOT let the user's urgency downgrade the lane below full",
|
|
19
|
+
"escalates to the human instead of silently skipping a required wave",
|
|
20
|
+
"records the reason in the decision log if any wave is omitted"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
11
23
|
],
|
|
12
24
|
"expect_lane": "full"
|
|
13
25
|
}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lane-exploratory-vague",
|
|
3
3
|
"skill": "mugiwara-brainstorm",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "explore different architecture options for a reporting dashboard, vague idea still", "top_k": 3 },
|
|
7
|
+
{ "prompt": "explore different approaches for the architecture before we commit", "top_k": 3 }
|
|
8
|
+
],
|
|
9
|
+
"negative": [
|
|
10
|
+
{ "prompt": "implement the todo list from the approved plan" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"behavioral": [
|
|
14
|
+
{
|
|
15
|
+
"task": "I have a rough idea for a reporting dashboard. Not sure what data or which charts. What do we do first?",
|
|
16
|
+
"rubric": [
|
|
17
|
+
"routes to lane 4 spike — brainstorm first, then re-size",
|
|
18
|
+
"does not jump straight to planning with no direction",
|
|
19
|
+
"interrogates the idea before committing to a plan"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
10
22
|
],
|
|
11
23
|
"expect_lane": "spike"
|
|
12
24
|
}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lane-sensitivity-payment",
|
|
3
3
|
"skill": "mugiwara-security",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "audit the payment service for security vulnerabilities", "top_k": 3 },
|
|
7
|
+
{ "prompt": "check this diff for injection and authentication issues", "top_k": 3 }
|
|
8
|
+
],
|
|
9
|
+
"negative": [
|
|
10
|
+
{ "prompt": "add a new chart to the dashboard layout" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"behavioral": [
|
|
14
|
+
{
|
|
15
|
+
"task": "Change how refunds are calculated in the payment service. Touches src/payment/refund.ts and its tests.",
|
|
16
|
+
"rubric": [
|
|
17
|
+
"routes to lane 3 full because the payment path is high-sensitivity",
|
|
18
|
+
"runs a security review pass before closure",
|
|
19
|
+
"does not treat payment code as a lean lane-1 bugfix"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
10
22
|
],
|
|
11
23
|
"expect_lane": "full"
|
|
12
24
|
}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "positive-refactor-existing-tests",
|
|
3
3
|
"skill": "mugiwara-testcases",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "write e2e tests for the checkout flow using playwright", "top_k": 3 },
|
|
7
|
+
{ "prompt": "add integration tests for the new API endpoint", "top_k": 3 },
|
|
8
|
+
{ "prompt": "the user gave us test cases, run them and report results", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "refactor the parse function to reduce nesting" }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"behavioral": [
|
|
15
|
+
{
|
|
16
|
+
"task": "Refactor a function in src/util/parse.ts to reduce nesting. The existing tests already cover it fully.",
|
|
17
|
+
"rubric": [
|
|
18
|
+
"ranks TDD skill (RED-GREEN-REFACTOR) in the top 3 for the code change",
|
|
19
|
+
"considers the existing test coverage when deciding whether new tests are needed",
|
|
20
|
+
"does not rank a planning or brainstorming skill first"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"expect_lane": "lean"
|
|
11
25
|
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "positive-resume-mid-mission",
|
|
3
3
|
"skill": "mugiwara-resume",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "we lost context mid-mission, we need to pick up where we left off", "top_k": 3 },
|
|
7
|
+
{ "prompt": "rebuild state from the checkpoint and continue the mission", "top_k": 3 }
|
|
8
|
+
],
|
|
9
|
+
"negative": [
|
|
10
|
+
{ "prompt": "start a new mission from scratch" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"behavioral": [
|
|
14
|
+
{
|
|
15
|
+
"task": "Context was lost mid-mission. The plan doc, todos, and trace exist under .mugiwara/. Where do we continue?",
|
|
16
|
+
"rubric": [
|
|
17
|
+
"ranks the resume skill first — rebuild from disk state",
|
|
18
|
+
"continues from the exact point, does not restart",
|
|
19
|
+
"reads .mugiwara/ state before triage"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"expect_lane": "full"
|
|
11
24
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "routing-agent-security",
|
|
3
|
+
"skill": "mugiwara-agent-security",
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "audit this MCP server for tool access vulnerabilities", "top_k": 3 },
|
|
7
|
+
{ "prompt": "check if this agent has excessive permissions or prompt injection risk", "top_k": 3 },
|
|
8
|
+
{ "prompt": "review this tool configuration for sandboxing gaps", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "audit the API endpoints for CORS misconfiguration" },
|
|
12
|
+
{ "prompt": "write tests for the auth middleware" }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"behavioral": [
|
|
16
|
+
{
|
|
17
|
+
"task": "Audit the agent configuration for prompt injection vulnerabilities and excessive tool scope.",
|
|
18
|
+
"rubric": [
|
|
19
|
+
"checks prompt injection surfaces in the agent layer",
|
|
20
|
+
"reviews MCP tool access permissions",
|
|
21
|
+
"does not audit application code or API endpoints"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "routing-auth-feature",
|
|
3
3
|
"skill": "mugiwara-security",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "add role-based access control to the API, admin editor viewer permissions", "top_k": 3 },
|
|
7
|
+
{ "prompt": "implement authorization middleware with role checking", "top_k": 3 },
|
|
8
|
+
{ "prompt": "add RBAC with a roles table and middleware enforcement", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "update the admin dashboard CSS styling" }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"behavioral": [
|
|
15
|
+
{
|
|
16
|
+
"task": "Add role-based access control to the API: new roles table, middleware enforcement, and tests. Touches auth paths.",
|
|
17
|
+
"rubric": [
|
|
18
|
+
"routes to a full/lane-3 mission because auth/security is high-sensitivity",
|
|
19
|
+
"runs a security review pass before closure",
|
|
20
|
+
"does not treat it as a one-file typo fix",
|
|
21
|
+
"uses a plan before executing"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
10
24
|
],
|
|
11
|
-
"lane": "3",
|
|
12
25
|
"expect_lane": "full"
|
|
13
26
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "routing-backend",
|
|
3
|
+
"skill": "mugiwara-backend",
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "add a new REST API endpoint for user profiles", "top_k": 3 },
|
|
7
|
+
{ "prompt": "design the database schema for the orders table", "top_k": 3 },
|
|
8
|
+
{ "prompt": "refactor the server error handling to return proper status codes", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "style the login page with the new design tokens" },
|
|
12
|
+
{ "prompt": "add a state management layer in the frontend" }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"behavioral": [
|
|
16
|
+
{
|
|
17
|
+
"task": "Add a new API endpoint for fetching user profiles with proper error handling and validation.",
|
|
18
|
+
"rubric": [
|
|
19
|
+
"matches existing repo conventions before adding new patterns",
|
|
20
|
+
"includes data validation and error semantics",
|
|
21
|
+
"writes code backed by source references"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "routing-bug-one-file",
|
|
3
3
|
"skill": "mugiwara-root-cause",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "debug a bug where dates render one month off in format.ts", "top_k": 3 },
|
|
7
|
+
{ "prompt": "there is a crash in production, find the root cause", "top_k": 3 },
|
|
8
|
+
{ "prompt": "this error keeps coming back intermittently, can you track it down", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "add a comment to the format utility function" }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"behavioral": [
|
|
15
|
+
{
|
|
16
|
+
"task": "There is a bug in src/utils/format.ts where dates render one month off. It is a single-file bug. How should the agent approach this?",
|
|
17
|
+
"rubric": [
|
|
18
|
+
"picks a debugging skill over a planning/brainstorm skill",
|
|
19
|
+
"reproduces the failure before changing code",
|
|
20
|
+
"does not run the full 9-wave crew pipeline",
|
|
21
|
+
"does not dispatch a crew member as a subagent"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
10
24
|
],
|
|
11
|
-
"lane": "1",
|
|
12
25
|
"expect_lane": "lean"
|
|
13
26
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "routing-claim-audit",
|
|
3
|
+
"skill": "mugiwara-claim-audit",
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "verify this claim before we proceed, it could be wrong", "top_k": 3 },
|
|
7
|
+
{ "prompt": "the agent says the fix is done but I want to double-check", "top_k": 3 },
|
|
8
|
+
{ "prompt": "audit this in-flight decision before we commit to it", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "run the test suite to make sure nothing is broken" },
|
|
12
|
+
{ "prompt": "review the diff for breaking changes" }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"behavioral": [
|
|
16
|
+
{
|
|
17
|
+
"task": "The agent claims the migration is complete and all data is intact. Verify this before proceeding.",
|
|
18
|
+
"rubric": [
|
|
19
|
+
"extracts the specific claim from the agent's statement",
|
|
20
|
+
"doubts by default — looks for evidence against the claim",
|
|
21
|
+
"does not take the spoken assertion at face value"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "routing-context-budget",
|
|
3
|
+
"skill": "mugiwara-context-budget",
|
|
4
|
+
"trigger": {
|
|
5
|
+
"positive": [
|
|
6
|
+
{ "prompt": "we are near the token limit, what should we load into context", "top_k": 3 },
|
|
7
|
+
{ "prompt": "this codebase is huge, how do I feed only the relevant files", "top_k": 3 },
|
|
8
|
+
{ "prompt": "prioritize which files to load given the token limit", "top_k": 3 }
|
|
9
|
+
],
|
|
10
|
+
"negative": [
|
|
11
|
+
{ "prompt": "dump the full content of every file into the prompt" },
|
|
12
|
+
{ "prompt": "load every file into memory for the analysis" }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"behavioral": [
|
|
16
|
+
{
|
|
17
|
+
"task": "We have a large monorepo and need to fix a bug in the auth module. The context window can't hold everything.",
|
|
18
|
+
"rubric": [
|
|
19
|
+
"selectively feeds only the relevant files",
|
|
20
|
+
"applies trust-sorting to prioritize sources",
|
|
21
|
+
"uses progressive disclosure instead of loading everything upfront"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|