@ionivetech/mugiwara 0.3.0 → 0.4.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-plan.md +4 -0
- package/README.md +320 -384
- package/content/skills/mugiwara-agent-security/SKILL.md +5 -0
- package/content/skills/mugiwara-api-and-interface-design/SKILL.md +5 -0
- package/content/skills/mugiwara-backend/SKILL.md +5 -0
- package/content/skills/mugiwara-brainstorm/SKILL.md +5 -0
- package/content/skills/mugiwara-checkpoint/SKILL.md +5 -0
- package/content/skills/mugiwara-context-engineering/SKILL.md +5 -0
- package/content/skills/mugiwara-deprecation/SKILL.md +5 -0
- package/content/skills/mugiwara-doubt-driven-development/SKILL.md +5 -0
- package/content/skills/mugiwara-dynamic-workflow/SKILL.md +5 -0
- package/content/skills/mugiwara-eval/SKILL.md +5 -0
- package/content/skills/mugiwara-execution/SKILL.md +5 -0
- package/content/skills/mugiwara-frontend/SKILL.md +12 -12
- package/content/skills/mugiwara-gates/SKILL.md +5 -0
- package/content/skills/mugiwara-git/SKILL.md +5 -0
- package/content/skills/mugiwara-git-worktrees/SKILL.md +5 -0
- package/content/skills/mugiwara-healing/SKILL.md +5 -0
- package/content/skills/mugiwara-lessons/SKILL.md +5 -0
- package/content/skills/mugiwara-mode/SKILL.md +5 -0
- package/content/skills/mugiwara-observability/SKILL.md +5 -0
- package/content/skills/mugiwara-orchestration/SKILL.md +13 -0
- package/content/skills/mugiwara-planning/SKILL.md +14 -13
- package/content/skills/mugiwara-pr/SKILL.md +5 -0
- package/content/skills/mugiwara-quality/SKILL.md +5 -0
- package/content/skills/mugiwara-resume/SKILL.md +5 -0
- package/content/skills/mugiwara-review/SKILL.md +5 -0
- package/content/skills/mugiwara-security/SKILL.md +17 -17
- package/content/skills/mugiwara-ship/SKILL.md +5 -0
- package/content/skills/mugiwara-systematic-debugging/SKILL.md +5 -0
- package/content/skills/mugiwara-test-driven-development/SKILL.md +5 -0
- package/content/skills/mugiwara-testcases/SKILL.md +5 -0
- package/content/skills/mugiwara-workflow/SKILL.md +6 -1
- package/content/skills/mugiwara-writing-skills/SKILL.md +5 -0
- package/dist/mugiwara.js +136 -28
- package/docs/adoption-guide.md +2 -2
- package/docs/comparison.md +166 -44
- package/docs/config.md +3 -0
- package/docs/developer-onboarding.md +17 -13
- package/docs/enforcement.md +38 -0
- package/docs/index.md +11 -5
- package/docs/lanes.md +40 -0
- package/docs/skill-anatomy.md +11 -6
- package/docs/troubleshooting.md +91 -0
- package/docs/workflow.md +15 -6
- package/evals/cases/adversarial-pressure-fake-pass.json +12 -0
- package/evals/cases/adversarial-pressure-skip-review.json +13 -0
- package/evals/cases/lane-exploratory-vague.json +12 -0
- package/evals/cases/lane-sensitivity-payment.json +12 -0
- package/evals/cases/negative-secrets-typo.json +12 -0
- package/evals/cases/negative-security-docs-change.json +12 -0
- package/evals/cases/positive-refactor-existing-tests.json +11 -0
- package/evals/cases/positive-resume-mid-mission.json +11 -0
- package/evals/cases/routing-auth-feature.json +13 -0
- package/evals/cases/routing-bug-one-file.json +13 -0
- package/evals/cases/routing-typo.json +13 -0
- package/package.json +2 -1
- package/src/args.ts +2 -1
- package/src/cli.ts +16 -20
- package/src/installer.ts +31 -3
- package/src/mission.ts +25 -0
- package/src/targets/claude.ts +4 -0
- package/src/targets/copilot.ts +4 -0
- package/src/targets/generic.ts +33 -1
- package/src/targets/kilo.ts +1 -0
- package/src/targets/opencode.ts +4 -0
package/src/targets/claude.ts
CHANGED
|
@@ -27,6 +27,10 @@ export const target: Target = {
|
|
|
27
27
|
if (data.tools) fm.tools = data.tools;
|
|
28
28
|
return { relPath: `${data.name}.md`, text: stringifyFrontmatter(fm, body) };
|
|
29
29
|
},
|
|
30
|
+
refsDir({ scope, projectDir, home }, skillName: string) {
|
|
31
|
+
const root = scope === 'global' ? join(home, '.claude') : join(projectDir, '.claude');
|
|
32
|
+
return join(root, 'skills', skillName, 'references');
|
|
33
|
+
},
|
|
30
34
|
postInstall({ scope, projectDir, home, dryRun }) {
|
|
31
35
|
// Wire the SessionStart hook (inline doctrine) into the installed .claude dir.
|
|
32
36
|
const root = scope === 'global' ? join(home, '.claude') : join(projectDir, '.claude');
|
package/src/targets/copilot.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/targets/copilot.ts
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { stringifyFrontmatter, type FrontmatterData } from '../frontmatter.ts';
|
|
4
|
+
import type { Scope } from '../manifest.ts';
|
|
4
5
|
import type { Target } from '../installer.ts';
|
|
5
6
|
|
|
6
7
|
export const target: Target = {
|
|
@@ -23,4 +24,7 @@ export const target: Target = {
|
|
|
23
24
|
text: stringifyFrontmatter({ name: data.name, description: data.description }, body),
|
|
24
25
|
};
|
|
25
26
|
},
|
|
27
|
+
refsDir(_opts: { scope: Scope; projectDir: string; home: string }, skillName: string) {
|
|
28
|
+
return join(_opts.projectDir, '.mugiwara', 'refs', skillName);
|
|
29
|
+
},
|
|
26
30
|
};
|
package/src/targets/generic.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/targets/generic.ts
|
|
2
2
|
import { existsSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
+
import type { Scope } from '../manifest.ts';
|
|
4
5
|
import type { Target } from '../installer.ts';
|
|
5
6
|
|
|
6
7
|
export function makeGeneric(opts: {
|
|
@@ -9,23 +10,54 @@ export function makeGeneric(opts: {
|
|
|
9
10
|
rulesDir: string;
|
|
10
11
|
bootstrapFile: string | null;
|
|
11
12
|
bootstrapPointer: string | null;
|
|
13
|
+
tier?: 2 | 3;
|
|
12
14
|
}): Target {
|
|
13
|
-
const { id, label, rulesDir, bootstrapFile, bootstrapPointer } = opts;
|
|
15
|
+
const { id, label, rulesDir, bootstrapFile, bootstrapPointer, tier = bootstrapPointer ? 2 : 3 } = opts;
|
|
16
|
+
const stubOnly = tier === 3;
|
|
14
17
|
return {
|
|
15
18
|
id,
|
|
16
19
|
label,
|
|
17
20
|
native: false,
|
|
21
|
+
tier,
|
|
18
22
|
paths({ scope, projectDir }: { scope: 'global' | 'project'; projectDir: string; home: string }) {
|
|
19
23
|
if (scope === 'global') throw new Error(`${label} supports project scope only`);
|
|
20
24
|
const dir = join(projectDir, rulesDir);
|
|
21
25
|
return { skillsDir: dir, agentsDir: dir };
|
|
22
26
|
},
|
|
23
27
|
transformSkill(data, body) {
|
|
28
|
+
if (stubOnly) {
|
|
29
|
+
// Stub: routing + pointer only. Full body lands in .mugiwara/refs/
|
|
30
|
+
// (outside the rules glob) so glob-loading harnesses stop eating ~40k
|
|
31
|
+
// tokens at session start. The agent reads the full file on demand.
|
|
32
|
+
return {
|
|
33
|
+
relPath: `${data.name}.md`,
|
|
34
|
+
text: `# ${data.name}\n\n> ${data.description}\n\n## Skip when\n\nFull skill: \`${data.name}\` — read \`.mugiwara/refs/${data.name}.md\` when the crew invokes this role.`,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return { relPath: `${data.name}.md`, text: `# ${data.name}\n\n> ${data.description}\n\n${body}` };
|
|
38
|
+
},
|
|
39
|
+
transformSkillFull(data, body) {
|
|
40
|
+
if (!stubOnly) return null;
|
|
24
41
|
return { relPath: `${data.name}.md`, text: `# ${data.name}\n\n> ${data.description}\n\n${body}` };
|
|
25
42
|
},
|
|
26
43
|
transformAgent(data, body) {
|
|
44
|
+
if (stubOnly) {
|
|
45
|
+
return {
|
|
46
|
+
relPath: `agent-${data.name}.md`,
|
|
47
|
+
text: `# Agent: ${data.name}\n\n> ${data.description}\n\nSkills: ${data.skills ?? ''}. Read \`.mugiwara/refs/${data.name}.md\` when embodying this role.`,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
27
50
|
return { relPath: `agent-${data.name}.md`, text: `# Agent: ${data.name}\n\n> ${data.description}\n\nSkills used: ${data.skills ?? ''}\n\n${body}` };
|
|
28
51
|
},
|
|
52
|
+
transformAgentFull(data, body) {
|
|
53
|
+
if (!stubOnly) return null;
|
|
54
|
+
return { relPath: `${data.name}.md`, text: `# Agent: ${data.name}\n\n> ${data.description}\n\nSkills used: ${data.skills ?? ''}\n\n${body}` };
|
|
55
|
+
},
|
|
56
|
+
refsDir({ projectDir }: { scope: Scope; projectDir: string; home: string }) {
|
|
57
|
+
// Keep reference detail outside the rules dir so the harness never
|
|
58
|
+
// glob-loads it; the skill names the path and the agent reads on demand.
|
|
59
|
+
return join(projectDir, '.mugiwara', 'refs');
|
|
60
|
+
},
|
|
29
61
|
postInstall({ projectDir, dryRun }) {
|
|
30
62
|
if (!bootstrapFile) return { written: [], notes: [] };
|
|
31
63
|
const notes: string[] = [];
|
package/src/targets/kilo.ts
CHANGED
package/src/targets/opencode.ts
CHANGED
|
@@ -22,4 +22,8 @@ export const target: Target = {
|
|
|
22
22
|
if (data.tools) fm.tools = data.tools;
|
|
23
23
|
return { relPath: `${data.name}.md`, text: stringifyFrontmatter(fm, body) };
|
|
24
24
|
},
|
|
25
|
+
refsDir({ scope, projectDir, home }, skillName: string) {
|
|
26
|
+
const root = scope === 'global' ? join(home, '.config', 'opencode') : join(projectDir, '.opencode');
|
|
27
|
+
return join(root, 'skills', skillName, 'references');
|
|
28
|
+
},
|
|
25
29
|
};
|