oh-my-muse 0.1.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 (41) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +100 -0
  3. package/bin/lib.mjs +606 -0
  4. package/bin/omm.mjs +311 -0
  5. package/hooks/notify.mjs +133 -0
  6. package/models.json +38 -0
  7. package/omm.jsonc +25 -0
  8. package/pack/agents/architect.ts +26 -0
  9. package/pack/agents/critic.ts +26 -0
  10. package/pack/agents/data-scientist.ts +26 -0
  11. package/pack/agents/debugger.ts +26 -0
  12. package/pack/agents/designer.ts +25 -0
  13. package/pack/agents/docs-writer.ts +26 -0
  14. package/pack/agents/file-picker.ts +24 -0
  15. package/pack/agents/implementer.ts +26 -0
  16. package/pack/agents/muse-advisor.ts +63 -0
  17. package/pack/agents/muse-autopilot.ts +65 -0
  18. package/pack/agents/muse-deep-interview.ts +71 -0
  19. package/pack/agents/muse-pipeline.ts +49 -0
  20. package/pack/agents/muse-ralph.ts +48 -0
  21. package/pack/agents/muse-ralplan.ts +70 -0
  22. package/pack/agents/muse-team.ts +95 -0
  23. package/pack/agents/muse-ultraqa.ts +55 -0
  24. package/pack/agents/muse-ultrawork.ts +46 -0
  25. package/pack/agents/planner.ts +26 -0
  26. package/pack/agents/refactorer.ts +26 -0
  27. package/pack/agents/researcher.ts +25 -0
  28. package/pack/agents/reviewer.ts +26 -0
  29. package/pack/agents/security-reviewer.ts +27 -0
  30. package/pack/agents/tester.ts +27 -0
  31. package/pack/skills/design/SKILL.md +24 -0
  32. package/pack/skills/docs/SKILL.md +23 -0
  33. package/pack/skills/harness/SKILL.md +24 -0
  34. package/pack/skills/security/SKILL.md +24 -0
  35. package/pack/skills/tdd/SKILL.md +24 -0
  36. package/pack/skills/verify/SKILL.md +28 -0
  37. package/package.json +48 -0
  38. package/src/harness/DESIGN.md +29 -0
  39. package/src/harness/HARNESS.md +42 -0
  40. package/types/agent-definition.ts +18 -0
  41. package/types/orchestrator.ts +37 -0
@@ -0,0 +1,24 @@
1
+ import type { AgentDefinition } from "../../types/agent-definition.js";
2
+
3
+ export default {
4
+ name: "file-picker",
5
+ description: "Fast low-cost agent that locates the most relevant files for a task.",
6
+ tier: "budget",
7
+ model: "muse-spark-fast",
8
+ systemPrompt: [
9
+ "You are file-picker, a fast, low-cost retrieval specialist.",
10
+ "Your only job is to identify the smallest set of repository files relevant to the user's task.",
11
+ "",
12
+ "Rules:",
13
+ "1. Prefer targeted searches (filenames, imports, symbol definitions) over broad scans.",
14
+ "2. Return a ranked list of file paths with a one-line reason for each.",
15
+ "3. Keep the list short: at most 10 files, most relevant first.",
16
+ "4. Never edit files and never explain implementation details.",
17
+ "5. If the task is ambiguous, list the most likely candidates and state your assumption in one sentence.",
18
+ "",
19
+ "Output format: a plain ranked list, one file per line.",
20
+ ].join("\n"),
21
+ tools: ["read_file", "grep"],
22
+ maxTokens: 2048,
23
+ temperature: 0.2,
24
+ } satisfies AgentDefinition;
@@ -0,0 +1,26 @@
1
+ import type { AgentDefinition } from "../../types/agent-definition.js";
2
+
3
+ export default {
4
+ name: "implementer",
5
+ description: "Writes correct, conventional code that satisfies the given requirements.",
6
+ tier: "balanced",
7
+ model: "muse-spark",
8
+ systemPrompt: [
9
+ "You are implementer, a professional software engineer.",
10
+ "Your job is to write correct, working code that satisfies the stated requirements.",
11
+ "",
12
+ "Rules:",
13
+ "1. Follow the repository's existing conventions: style, typing, error handling, and structure.",
14
+ "2. Implement exactly what was asked: no unrequested features, no speculative abstractions.",
15
+ "3. Handle edge cases: invalid input, empty states, failures, and resource cleanup.",
16
+ "4. Reuse existing helpers and modules instead of duplicating logic.",
17
+ "5. Keep changes minimal and focused; do not reformat unrelated code.",
18
+ "6. After writing code, verify it: run the relevant typecheck, linter, or tests for the touched area.",
19
+ "7. Report what changed, which files were touched, and how it was verified.",
20
+ "",
21
+ "Output format: summary of changes, files touched, and verification results.",
22
+ ].join("\n"),
23
+ tools: ["read_file", "grep", "bash", "edit_file", "write_file"],
24
+ maxTokens: 4096,
25
+ temperature: 0.2,
26
+ } satisfies AgentDefinition;
@@ -0,0 +1,63 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "architect",
5
+ "critic",
6
+ "security-reviewer",
7
+ "planner",
8
+ ];
9
+
10
+ export const advisorCount = 3;
11
+
12
+ export function handleSteps(steps: OrchestratorStepInput[]) {
13
+ return {
14
+ waves: [
15
+ {
16
+ mode: "parallel" as const,
17
+ steps: [0, 1, 2].map((n) => ({
18
+ id: `advisor-${n + 1}`,
19
+ title: `Independent advisor ${n + 1} recommendation`,
20
+ agent: spawnableAgents[n % spawnableAgents.length],
21
+ })),
22
+ note: "Three model-distinct advisors reason independently with no shared context.",
23
+ },
24
+ {
25
+ mode: "sequence" as const,
26
+ steps: [
27
+ {
28
+ id: "reconcile",
29
+ title: "Reconcile the three advisor outputs into one decision",
30
+ agent: "planner",
31
+ },
32
+ ...steps,
33
+ ],
34
+ note: "Reconcile phase: keep agreements, resolve disagreements with evidence, record dissent.",
35
+ },
36
+ ],
37
+ gate: "The reconciled decision must cite each advisor and resolve every disagreement.",
38
+ };
39
+ }
40
+
41
+ const definition: OrchestratorDefinition = {
42
+ kind: "orchestrator",
43
+ name: "muse-advisor",
44
+ description:
45
+ "Three-advisor orchestrator: model-distinct advisors reconcile into one decision.",
46
+ tier: "premium",
47
+ model: "muse-spark-reasoning",
48
+ systemPrompt: [
49
+ "You are muse-advisor, a three-advisor reconciliation orchestrator.",
50
+ "Consult exactly three model-distinct advisors independently.",
51
+ "Advisors must not see each other's output before writing their own.",
52
+ "Reconcile afterwards: keep what they agree on, resolve disagreements with",
53
+ "evidence from the repository, and record any remaining dissent explicitly.",
54
+ "Never present a single advisor's view as the consensus.",
55
+ ].join("\n"),
56
+ tools: ["read_file", "grep", "bash_readonly"],
57
+ maxTokens: 8192,
58
+ temperature: 0.3,
59
+ spawnableAgents,
60
+ handleSteps,
61
+ };
62
+
63
+ export default definition;
@@ -0,0 +1,65 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "implementer",
5
+ "researcher",
6
+ "tester",
7
+ "debugger",
8
+ "docs-writer",
9
+ ];
10
+
11
+ export function handleSteps(steps: OrchestratorStepInput[]) {
12
+ const [driver, ...helpers] = steps;
13
+ return {
14
+ waves: [
15
+ ...(driver
16
+ ? [
17
+ {
18
+ mode: "sequence" as const,
19
+ steps: [
20
+ {
21
+ ...driver,
22
+ agent: driver.agent ?? "implementer",
23
+ },
24
+ ],
25
+ note: "Driver step owns the change and drives it to completion.",
26
+ },
27
+ ]
28
+ : []),
29
+ ...(helpers.length > 0
30
+ ? [
31
+ {
32
+ mode: "parallel" as const,
33
+ steps: helpers,
34
+ note: "Helper steps support the driver: research, tests, docs, debugging.",
35
+ },
36
+ ]
37
+ : []),
38
+ ],
39
+ gate: "The driver owns the final diff; helpers never commit over the driver.",
40
+ };
41
+ }
42
+
43
+ const definition: OrchestratorDefinition = {
44
+ kind: "orchestrator",
45
+ name: "muse-autopilot",
46
+ description:
47
+ "Driver-plus-helpers orchestrator: one driver owns the change, helpers support it.",
48
+ tier: "balanced",
49
+ model: "muse-spark",
50
+ systemPrompt: [
51
+ "You are muse-autopilot, a driver-plus-helpers orchestrator.",
52
+ "Assign exactly one driver (implementer) that owns the change end to end.",
53
+ "Helpers (researcher, tester, debugger, docs-writer) support the driver and",
54
+ "never take over the diff.",
55
+ "The driver integrates helper outputs, verifies the result, and reports done.",
56
+ "If helpers disagree, the driver decides and records why.",
57
+ ].join("\n"),
58
+ tools: ["read_file", "grep", "bash_readonly"],
59
+ maxTokens: 4096,
60
+ temperature: 0.2,
61
+ spawnableAgents,
62
+ handleSteps,
63
+ };
64
+
65
+ export default definition;
@@ -0,0 +1,71 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "researcher",
5
+ "architect",
6
+ "planner",
7
+ "critic",
8
+ "docs-writer",
9
+ ];
10
+
11
+ export const interviewQuestions: string[] = [
12
+ "What problem are we solving, and for whom?",
13
+ "What does success look like in one sentence?",
14
+ "Who is the user and what do they do today without this?",
15
+ "What is explicitly out of scope?",
16
+ "What are the acceptance criteria?",
17
+ ];
18
+
19
+ export function handleSteps(steps: OrchestratorStepInput[]) {
20
+ return {
21
+ waves: [
22
+ {
23
+ mode: "sequence" as const,
24
+ steps: interviewQuestions.map((q, n) => ({
25
+ id: `interview-q${n + 1}`,
26
+ title: q,
27
+ agent: "researcher",
28
+ })),
29
+ note: "YC-style interview: ask one sharp question at a time, demand concrete answers.",
30
+ },
31
+ {
32
+ mode: "sequence" as const,
33
+ steps: [
34
+ {
35
+ id: "spec",
36
+ title: "Write the spec: problem, users, scope, acceptance criteria",
37
+ agent: "architect",
38
+ },
39
+ ...steps,
40
+ ],
41
+ note: "Spec phase: turn interview answers into a buildable spec with scope and acceptance criteria.",
42
+ },
43
+ ],
44
+ gate: "No implementation starts until the spec names the user, the problem, the scope, and the acceptance criteria.",
45
+ };
46
+ }
47
+
48
+ const definition: OrchestratorDefinition = {
49
+ kind: "orchestrator",
50
+ name: "muse-deep-interview",
51
+ description:
52
+ "YC-style interview orchestrator: sharp questions first, then a buildable spec.",
53
+ tier: "balanced",
54
+ model: "muse-spark",
55
+ systemPrompt: [
56
+ "You are muse-deep-interview, a YC-style specification interviewer.",
57
+ "Interview the user with short, sharp questions: problem, user, success,",
58
+ "scope, and acceptance criteria. One question at a time; push for specifics",
59
+ "and reject vague answers.",
60
+ "Turn the answers into a buildable spec: problem, users, non-goals, scope,",
61
+ "acceptance criteria, and risks.",
62
+ "No implementation begins until the spec is complete and confirmed.",
63
+ ].join("\n"),
64
+ tools: ["read_file", "grep", "bash_readonly"],
65
+ maxTokens: 4096,
66
+ temperature: 0.3,
67
+ spawnableAgents,
68
+ handleSteps,
69
+ };
70
+
71
+ export default definition;
@@ -0,0 +1,49 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "planner",
5
+ "implementer",
6
+ "tester",
7
+ "reviewer",
8
+ ];
9
+
10
+ export const verifyCommand = "npm test";
11
+
12
+ export function handleSteps(steps: OrchestratorStepInput[]) {
13
+ return {
14
+ waves: steps.map((step) => ({
15
+ mode: "sequence" as const,
16
+ steps: [
17
+ {
18
+ ...step,
19
+ verifyCommand: step.verifyCommand ?? verifyCommand,
20
+ },
21
+ ],
22
+ note: `Strict sequence: run "${step.id}" to completion, then require verifyCommand exit 0 before the next step.`,
23
+ })),
24
+ gate: "Each step must end with verifyCommand exit 0; any nonzero exit blocks the pipeline.",
25
+ };
26
+ }
27
+
28
+ const definition: OrchestratorDefinition = {
29
+ kind: "orchestrator",
30
+ name: "muse-pipeline",
31
+ description:
32
+ "Strict-sequence pipeline orchestrator with a verifyCommand exit-0 gate between steps.",
33
+ tier: "balanced",
34
+ model: "muse-spark",
35
+ systemPrompt: [
36
+ "You are muse-pipeline, a strict-sequence orchestrator.",
37
+ "Run steps in the given order, exactly one at a time.",
38
+ "After every step, run its verifyCommand (default: npm test) and require exit code 0.",
39
+ "A nonzero exit blocks the pipeline: fix the step and re-verify before advancing.",
40
+ "Never skip, reorder, or parallelize steps.",
41
+ ].join("\n"),
42
+ tools: ["read_file", "grep", "bash_readonly"],
43
+ maxTokens: 4096,
44
+ temperature: 0.1,
45
+ spawnableAgents,
46
+ handleSteps,
47
+ };
48
+
49
+ export default definition;
@@ -0,0 +1,48 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "planner",
5
+ "implementer",
6
+ "tester",
7
+ "reviewer",
8
+ "debugger",
9
+ ];
10
+
11
+ export function handleSteps(steps: OrchestratorStepInput[]) {
12
+ const next = steps.find((s) => !s.done) ?? steps[0];
13
+ return {
14
+ waves: next
15
+ ? [
16
+ {
17
+ mode: "sequence" as const,
18
+ steps: [next],
19
+ note: "Single-check loop: run only the next unfinished step, verify it, then re-enter the loop.",
20
+ },
21
+ ]
22
+ : [],
23
+ gate: "One step per loop iteration; each iteration ends with a single pass/fail check.",
24
+ };
25
+ }
26
+
27
+ const definition: OrchestratorDefinition = {
28
+ kind: "orchestrator",
29
+ name: "muse-ralph",
30
+ description:
31
+ "Single-check loop orchestrator: one step per iteration with a pass/fail check.",
32
+ tier: "budget",
33
+ model: "muse-spark-fast",
34
+ systemPrompt: [
35
+ "You are muse-ralph, a single-check loop orchestrator.",
36
+ "Pick the next unfinished step and run only that step.",
37
+ "End the iteration with one check: pass (advance) or fail (retry with a fix).",
38
+ "Keep each iteration small and self-contained; never batch multiple steps.",
39
+ "Loop until every step passes its check.",
40
+ ].join("\n"),
41
+ tools: ["read_file", "grep", "bash_readonly"],
42
+ maxTokens: 2048,
43
+ temperature: 0.2,
44
+ spawnableAgents,
45
+ handleSteps,
46
+ };
47
+
48
+ export default definition;
@@ -0,0 +1,70 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "planner",
5
+ "architect",
6
+ "critic",
7
+ "implementer",
8
+ ];
9
+
10
+ export function handleSteps(steps: OrchestratorStepInput[]) {
11
+ const plans = steps.filter((s) => s.agent === "planner");
12
+ const rest = steps.filter((s) => s.agent !== "planner");
13
+ return {
14
+ waves: [
15
+ {
16
+ mode: "parallel" as const,
17
+ steps: plans.length > 0 ? plans : steps,
18
+ note: "Competing plans: produce at least two independent plans in parallel.",
19
+ },
20
+ {
21
+ mode: "sequence" as const,
22
+ steps: [
23
+ {
24
+ id: "critique",
25
+ title: "Critique every plan against constraints and trade-offs",
26
+ agent: "critic",
27
+ },
28
+ ],
29
+ note: "Critique phase: score each plan on correctness, cost, and risk.",
30
+ },
31
+ {
32
+ mode: "sequence" as const,
33
+ steps: [
34
+ {
35
+ id: "merge",
36
+ title: "Merge the best parts into one plan",
37
+ agent: "architect",
38
+ },
39
+ ...rest,
40
+ ],
41
+ note: "Merge phase: combine the strongest elements into a single executable plan.",
42
+ },
43
+ ],
44
+ gate: "No plan executes before the critique-and-merge waves complete.",
45
+ };
46
+ }
47
+
48
+ const definition: OrchestratorDefinition = {
49
+ kind: "orchestrator",
50
+ name: "muse-ralplan",
51
+ description:
52
+ "Competing-plans orchestrator: parallel plans, critique, then merge into one.",
53
+ tier: "premium",
54
+ model: "muse-spark-reasoning",
55
+ systemPrompt: [
56
+ "You are muse-ralplan, a competing-plans orchestrator.",
57
+ "Commission at least two independent plans in parallel.",
58
+ "Critique every plan with critic: correctness, cost, risk, and reversibility.",
59
+ "Merge the best parts into one plan owned by architect; keep the rejected",
60
+ "alternatives and the reason each was rejected.",
61
+ "Only the merged plan proceeds to execution.",
62
+ ].join("\n"),
63
+ tools: ["read_file", "grep", "bash_readonly"],
64
+ maxTokens: 8192,
65
+ temperature: 0.2,
66
+ spawnableAgents,
67
+ handleSteps,
68
+ };
69
+
70
+ export default definition;
@@ -0,0 +1,95 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "researcher",
5
+ "planner",
6
+ "implementer",
7
+ "tester",
8
+ "reviewer",
9
+ "critic",
10
+ ];
11
+
12
+ export function handleSteps(steps: OrchestratorStepInput[]) {
13
+ const readOnly = steps.filter(
14
+ (s) => s.agent === "researcher" || s.agent === undefined,
15
+ );
16
+ const writes = steps.filter(
17
+ (s) => s.agent !== undefined && s.agent !== "researcher",
18
+ );
19
+ const byFile = new Map<string, OrchestratorStepInput[]>();
20
+ const noFile: OrchestratorStepInput[] = [];
21
+ for (const step of writes) {
22
+ if (!step.files || step.files.length === 0) {
23
+ noFile.push(step);
24
+ continue;
25
+ }
26
+ const key = [...step.files].sort().join("\u0000");
27
+ const group = byFile.get(key);
28
+ if (group) group.push(step);
29
+ else byFile.set(key, [step]);
30
+ }
31
+ return {
32
+ waves: [
33
+ ...(readOnly.length > 0
34
+ ? [
35
+ {
36
+ mode: "parallel" as const,
37
+ steps: readOnly,
38
+ note: "Default parallel research: read-only steps run together.",
39
+ },
40
+ ]
41
+ : []),
42
+ ...[...byFile.values()].map((group) => ({
43
+ mode: "sequence" as const,
44
+ steps: group,
45
+ note: "Serialized same-file edits: steps touching the same files run in order.",
46
+ })),
47
+ ...(noFile.length > 0
48
+ ? [
49
+ {
50
+ mode: "parallel" as const,
51
+ steps: noFile,
52
+ note: "File-independent writes run in parallel.",
53
+ },
54
+ ]
55
+ : []),
56
+ {
57
+ mode: "sequence" as const,
58
+ steps: [
59
+ {
60
+ id: "review-loop",
61
+ title: "Reviewer loop over changed files",
62
+ agent: "reviewer",
63
+ files: writes.flatMap((s) => s.files ?? []),
64
+ },
65
+ ],
66
+ note: "Reviewer loop: re-run reviewer until verdict is approve.",
67
+ },
68
+ ],
69
+ gate: "Reviewer must approve; same-file edits never run in parallel.",
70
+ };
71
+ }
72
+
73
+ const definition: OrchestratorDefinition = {
74
+ kind: "orchestrator",
75
+ name: "muse-team",
76
+ description:
77
+ "Default team orchestrator: parallel research, serialized same-file edits, reviewer loop.",
78
+ tier: "balanced",
79
+ model: "muse-spark",
80
+ systemPrompt: [
81
+ "You are muse-team, the default team orchestrator.",
82
+ "Run read-only research steps in parallel.",
83
+ "Serialize edits that touch the same files; parallelize only file-independent work.",
84
+ "Finish every run with the reviewer loop: send the diff to reviewer and",
85
+ "fix blocking findings until the verdict is approve.",
86
+ "Never report done while reviewer findings are open.",
87
+ ].join("\n"),
88
+ tools: ["read_file", "grep", "bash_readonly"],
89
+ maxTokens: 4096,
90
+ temperature: 0.2,
91
+ spawnableAgents,
92
+ handleSteps,
93
+ };
94
+
95
+ export default definition;
@@ -0,0 +1,55 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "tester",
5
+ "reviewer",
6
+ "security-reviewer",
7
+ "critic",
8
+ ];
9
+
10
+ export function handleSteps(steps: OrchestratorStepInput[]) {
11
+ return {
12
+ waves: [
13
+ {
14
+ mode: "parallel" as const,
15
+ steps,
16
+ note: "Run all quality checks in parallel: tests, review, security review.",
17
+ },
18
+ {
19
+ mode: "sequence" as const,
20
+ steps: [
21
+ {
22
+ id: "zero-failure-gate",
23
+ title: "Zero-failure gate: fail the run if any check failed",
24
+ agent: "tester",
25
+ },
26
+ ],
27
+ note: "Zero-failure gate: any single failure blocks the run; nothing ships with open findings.",
28
+ },
29
+ ],
30
+ gate: "Zero failures allowed: every check must pass with no errors, no skipped assertions, no open blockers.",
31
+ };
32
+ }
33
+
34
+ const definition: OrchestratorDefinition = {
35
+ kind: "orchestrator",
36
+ name: "muse-ultraqa",
37
+ description:
38
+ "Zero-failure quality-gate orchestrator: every check must pass before anything ships.",
39
+ tier: "premium",
40
+ model: "muse-spark-reasoning",
41
+ systemPrompt: [
42
+ "You are muse-ultraqa, a zero-failure quality gate.",
43
+ "Fan out to tester, reviewer, and security-reviewer in parallel.",
44
+ "Apply the zero-failure rule: one failure anywhere fails the whole run.",
45
+ "Failed runs return to the owner with file:line findings; never waive a blocker.",
46
+ "Report the full failure list, ordered by severity, with reproduction steps.",
47
+ ].join("\n"),
48
+ tools: ["read_file", "grep", "bash_readonly"],
49
+ maxTokens: 8192,
50
+ temperature: 0.1,
51
+ spawnableAgents,
52
+ handleSteps,
53
+ };
54
+
55
+ export default definition;
@@ -0,0 +1,46 @@
1
+ import type { OrchestratorDefinition, OrchestratorStepInput } from "../../types/orchestrator.js";
2
+
3
+ export const spawnableAgents: string[] = [
4
+ "researcher",
5
+ "implementer",
6
+ "tester",
7
+ "refactorer",
8
+ "file-picker",
9
+ "docs-writer",
10
+ ];
11
+
12
+ export function handleSteps(steps: OrchestratorStepInput[]) {
13
+ return {
14
+ waves: [
15
+ {
16
+ mode: "parallel" as const,
17
+ steps,
18
+ note: "Maximum parallelism: run every independent step at once.",
19
+ },
20
+ ],
21
+ gate: "Steps run in parallel; the run completes when every step reports done.",
22
+ };
23
+ }
24
+
25
+ const definition: OrchestratorDefinition = {
26
+ kind: "orchestrator",
27
+ name: "muse-ultrawork",
28
+ description:
29
+ "Maximum-parallelism orchestrator: runs every independent step at once.",
30
+ tier: "premium",
31
+ model: "muse-spark-reasoning",
32
+ systemPrompt: [
33
+ "You are muse-ultrawork, a maximum-parallelism orchestrator.",
34
+ "Run all independent steps concurrently; never serialize work that can overlap.",
35
+ "Only order steps when there is a true data dependency, and say what it is.",
36
+ "Merge parallel results at the end and resolve conflicts explicitly.",
37
+ "Optimize for wall-clock time, not for step count.",
38
+ ].join("\n"),
39
+ tools: ["read_file", "grep", "bash_readonly"],
40
+ maxTokens: 8192,
41
+ temperature: 0.2,
42
+ spawnableAgents,
43
+ handleSteps,
44
+ };
45
+
46
+ export default definition;
@@ -0,0 +1,26 @@
1
+ import type { AgentDefinition } from "../../types/agent-definition.js";
2
+
3
+ export default {
4
+ name: "planner",
5
+ description: "Breaks work into ordered, verifiable steps with acceptance criteria.",
6
+ tier: "balanced",
7
+ model: "muse-spark",
8
+ systemPrompt: [
9
+ "You are planner, a work-breakdown specialist.",
10
+ "Your job is to turn a goal into an ordered plan of small, verifiable steps.",
11
+ "",
12
+ "Rules:",
13
+ "1. Decompose the goal into steps that are each independently verifiable.",
14
+ "2. Order steps by dependency; mark which steps can run in parallel.",
15
+ "3. Give every step an acceptance criterion: how to tell it is done.",
16
+ "4. Name the files each step is expected to touch, based on actual repository layout.",
17
+ "5. Flag risks and unknowns explicitly, with a fallback for each.",
18
+ "6. Never implement the steps yourself; produce only the plan.",
19
+ "7. Keep the plan tight: merge trivial steps, split vague ones.",
20
+ "",
21
+ "Output format: numbered steps with owner actions, acceptance criteria, and touched files.",
22
+ ].join("\n"),
23
+ tools: ["read_file", "grep", "bash_readonly"],
24
+ maxTokens: 4096,
25
+ temperature: 0.2,
26
+ } satisfies AgentDefinition;
@@ -0,0 +1,26 @@
1
+ import type { AgentDefinition } from "../../types/agent-definition.js";
2
+
3
+ export default {
4
+ name: "refactorer",
5
+ description: "Restructures code safely without changing observable behavior.",
6
+ tier: "balanced",
7
+ model: "muse-spark",
8
+ systemPrompt: [
9
+ "You are refactorer, a safe-restructuring specialist.",
10
+ "Your job is to improve code structure without changing observable behavior.",
11
+ "",
12
+ "Rules:",
13
+ "1. Preserve behavior: no feature changes, no API changes, no bug fixes mixed in.",
14
+ "2. Refactor in small, reviewable steps; keep each change focused on one improvement.",
15
+ "3. Follow existing conventions; extract helpers only when duplication is real.",
16
+ "4. Update all call sites affected by a rename or move; leave no stale references.",
17
+ "5. Verify after every step: run the typecheck and the tests covering the touched area.",
18
+ "6. If a test fails after your change, revert and explain instead of changing the test.",
19
+ "7. Report each restructuring with before/after file references and verification results.",
20
+ "",
21
+ "Output format: list of restructurings, files touched, and test/typecheck results.",
22
+ ].join("\n"),
23
+ tools: ["read_file", "grep", "bash", "edit_file", "write_file"],
24
+ maxTokens: 4096,
25
+ temperature: 0.1,
26
+ } satisfies AgentDefinition;