oh-my-opencode-slim 0.3.5 → 0.3.6
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/dist/agents/coder.d.ts +2 -0
- package/dist/agents/index.d.ts +0 -40
- package/dist/agents/orchestrator.d.ts +2 -2
- package/dist/agents/scribe.d.ts +2 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/index.js +29 -63
- package/dist/index.js +165 -70
- package/package.json +1 -1
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,48 +1,8 @@
|
|
|
1
1
|
import type { AgentConfig as SDKAgentConfig } from "@opencode-ai/sdk";
|
|
2
2
|
import { type AgentName, type PluginConfig } from "../config";
|
|
3
3
|
import { type AgentDefinition } from "./orchestrator";
|
|
4
|
-
import { createOracleAgent } from "./oracle";
|
|
5
|
-
import { createLibrarianAgent } from "./librarian";
|
|
6
|
-
import { createExploreAgent } from "./explore";
|
|
7
|
-
import { createFrontendAgent } from "./frontend";
|
|
8
|
-
import { createDocumentWriterAgent } from "./document-writer";
|
|
9
|
-
import { createMultimodalAgent } from "./multimodal";
|
|
10
|
-
import { createSimplicityReviewerAgent } from "./simplicity-reviewer";
|
|
11
4
|
export type { AgentDefinition } from "./orchestrator";
|
|
12
5
|
type SubagentName = Exclude<AgentName, "orchestrator">;
|
|
13
|
-
/** Short descriptions for each subagent (used in tool descriptions) */
|
|
14
|
-
export declare const SUBAGENT_INFO: {
|
|
15
|
-
readonly explore: {
|
|
16
|
-
readonly factory: typeof createExploreAgent;
|
|
17
|
-
readonly shortDesc: "codebase grep";
|
|
18
|
-
};
|
|
19
|
-
readonly librarian: {
|
|
20
|
-
readonly factory: typeof createLibrarianAgent;
|
|
21
|
-
readonly shortDesc: "docs/GitHub";
|
|
22
|
-
};
|
|
23
|
-
readonly oracle: {
|
|
24
|
-
readonly factory: typeof createOracleAgent;
|
|
25
|
-
readonly shortDesc: "strategy";
|
|
26
|
-
};
|
|
27
|
-
readonly "frontend-ui-ux-engineer": {
|
|
28
|
-
readonly factory: typeof createFrontendAgent;
|
|
29
|
-
readonly shortDesc: "UI/UX";
|
|
30
|
-
};
|
|
31
|
-
readonly "document-writer": {
|
|
32
|
-
readonly factory: typeof createDocumentWriterAgent;
|
|
33
|
-
readonly shortDesc: "docs";
|
|
34
|
-
};
|
|
35
|
-
readonly "multimodal-looker": {
|
|
36
|
-
readonly factory: typeof createMultimodalAgent;
|
|
37
|
-
readonly shortDesc: "image/visual analysis";
|
|
38
|
-
};
|
|
39
|
-
readonly "code-simplicity-reviewer": {
|
|
40
|
-
readonly factory: typeof createSimplicityReviewerAgent;
|
|
41
|
-
readonly shortDesc: "code review";
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
/** Generate agent list string for tool descriptions */
|
|
45
|
-
export declare function getAgentListDescription(): string;
|
|
46
6
|
/** Get list of agent names */
|
|
47
7
|
export declare function getAgentNames(): SubagentName[];
|
|
48
8
|
export declare function createAgents(config?: PluginConfig): AgentDefinition[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
2
|
export interface AgentDefinition {
|
|
3
3
|
name: string;
|
|
4
|
-
description
|
|
4
|
+
description?: string;
|
|
5
5
|
config: AgentConfig;
|
|
6
6
|
}
|
|
7
|
-
export declare function createOrchestratorAgent(model: string
|
|
7
|
+
export declare function createOrchestratorAgent(model: string): AgentDefinition;
|
|
@@ -12,4 +12,8 @@ export declare function addProviderConfig(installConfig: InstallConfig): ConfigM
|
|
|
12
12
|
export declare function addServerConfig(installConfig: InstallConfig): ConfigMergeResult;
|
|
13
13
|
export declare function generateLiteConfig(installConfig: InstallConfig): Record<string, unknown>;
|
|
14
14
|
export declare function writeLiteConfig(installConfig: InstallConfig): ConfigMergeResult;
|
|
15
|
+
/**
|
|
16
|
+
* Disable OpenCode's default subagents since the plugin provides its own
|
|
17
|
+
*/
|
|
18
|
+
export declare function disableDefaultAgents(): ConfigMergeResult;
|
|
15
19
|
export declare function detectCurrentConfig(): DetectedConfig;
|
package/dist/cli/index.js
CHANGED
|
@@ -51,18 +51,6 @@ async function isOpenCodeInstalled() {
|
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
async function isTmuxInstalled() {
|
|
55
|
-
try {
|
|
56
|
-
const proc = Bun.spawn(["tmux", "-V"], {
|
|
57
|
-
stdout: "pipe",
|
|
58
|
-
stderr: "pipe"
|
|
59
|
-
});
|
|
60
|
-
await proc.exited;
|
|
61
|
-
return proc.exitCode === 0;
|
|
62
|
-
} catch {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
54
|
async function getOpenCodeVersion() {
|
|
67
55
|
try {
|
|
68
56
|
const proc = Bun.spawn(["opencode", "--version"], {
|
|
@@ -193,29 +181,6 @@ function addProviderConfig(installConfig) {
|
|
|
193
181
|
};
|
|
194
182
|
}
|
|
195
183
|
}
|
|
196
|
-
function addServerConfig(installConfig) {
|
|
197
|
-
const configPath = getConfigJson();
|
|
198
|
-
try {
|
|
199
|
-
ensureConfigDir();
|
|
200
|
-
let config = parseConfig(configPath) ?? {};
|
|
201
|
-
if (installConfig.hasTmux) {
|
|
202
|
-
const server = config.server ?? {};
|
|
203
|
-
if (server.port === undefined) {
|
|
204
|
-
server.port = 4096;
|
|
205
|
-
}
|
|
206
|
-
config.server = server;
|
|
207
|
-
}
|
|
208
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2) + `
|
|
209
|
-
`);
|
|
210
|
-
return { success: true, configPath };
|
|
211
|
-
} catch (err) {
|
|
212
|
-
return {
|
|
213
|
-
success: false,
|
|
214
|
-
configPath,
|
|
215
|
-
error: `Failed to add server config: ${err}`
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
184
|
var MODEL_MAPPINGS = {
|
|
220
185
|
antigravity: {
|
|
221
186
|
orchestrator: "google/claude-opus-4-5-thinking",
|
|
@@ -290,6 +255,26 @@ function writeLiteConfig(installConfig) {
|
|
|
290
255
|
};
|
|
291
256
|
}
|
|
292
257
|
}
|
|
258
|
+
function disableDefaultAgents() {
|
|
259
|
+
const configPath = getConfigJson();
|
|
260
|
+
try {
|
|
261
|
+
ensureConfigDir();
|
|
262
|
+
let config = parseConfig(configPath) ?? {};
|
|
263
|
+
const agent = config.agent ?? {};
|
|
264
|
+
agent.explore = { disable: true };
|
|
265
|
+
agent.general = { disable: true };
|
|
266
|
+
config.agent = agent;
|
|
267
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + `
|
|
268
|
+
`);
|
|
269
|
+
return { success: true, configPath };
|
|
270
|
+
} catch (err) {
|
|
271
|
+
return {
|
|
272
|
+
success: false,
|
|
273
|
+
configPath,
|
|
274
|
+
error: `Failed to disable default agents: ${err}`
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
}
|
|
293
278
|
function detectCurrentConfig() {
|
|
294
279
|
const result = {
|
|
295
280
|
isInstalled: false,
|
|
@@ -424,8 +409,7 @@ async function askYesNo(rl, prompt, defaultValue = "no") {
|
|
|
424
409
|
}
|
|
425
410
|
async function runInteractiveMode(detected) {
|
|
426
411
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
427
|
-
const
|
|
428
|
-
const totalQuestions = tmuxInstalled ? 4 : 3;
|
|
412
|
+
const totalQuestions = 3;
|
|
429
413
|
try {
|
|
430
414
|
console.log(`${BOLD}Question 1/${totalQuestions}:${RESET}`);
|
|
431
415
|
printInfo("The Pantheon is tuned for Antigravity's model routing. Other models work, but results may vary.");
|
|
@@ -437,19 +421,11 @@ async function runInteractiveMode(detected) {
|
|
|
437
421
|
console.log(`${BOLD}Question 3/${totalQuestions}:${RESET}`);
|
|
438
422
|
const cerebras = await askYesNo(rl, "Do you have access to Cerebras API?", detected.hasCerebras ? "yes" : "no");
|
|
439
423
|
console.log();
|
|
440
|
-
let tmux = "no";
|
|
441
|
-
if (tmuxInstalled) {
|
|
442
|
-
console.log(`${BOLD}Question 4/4:${RESET}`);
|
|
443
|
-
printInfo(`${BOLD}Tmux detected!${RESET} We can enable tmux integration for you.`);
|
|
444
|
-
printInfo("This will spawn new panes for sub-agents, letting you watch them work in real-time.");
|
|
445
|
-
tmux = await askYesNo(rl, "Enable tmux integration?", detected.hasTmux ? "yes" : "no");
|
|
446
|
-
console.log();
|
|
447
|
-
}
|
|
448
424
|
return {
|
|
449
425
|
hasAntigravity: antigravity === "yes",
|
|
450
426
|
hasOpenAI: openai === "yes",
|
|
451
427
|
hasCerebras: cerebras === "yes",
|
|
452
|
-
hasTmux:
|
|
428
|
+
hasTmux: false
|
|
453
429
|
};
|
|
454
430
|
} finally {
|
|
455
431
|
rl.close();
|
|
@@ -459,11 +435,9 @@ async function runInstall(config) {
|
|
|
459
435
|
const detected = detectCurrentConfig();
|
|
460
436
|
const isUpdate = detected.isInstalled;
|
|
461
437
|
printHeader(isUpdate);
|
|
462
|
-
let totalSteps =
|
|
438
|
+
let totalSteps = 4;
|
|
463
439
|
if (config.hasAntigravity)
|
|
464
440
|
totalSteps += 2;
|
|
465
|
-
if (config.hasTmux)
|
|
466
|
-
totalSteps += 1;
|
|
467
441
|
let step = 1;
|
|
468
442
|
printStep(step++, totalSteps, "Checking OpenCode installation...");
|
|
469
443
|
const { ok } = await checkOpenCodeInstalled();
|
|
@@ -473,6 +447,10 @@ async function runInstall(config) {
|
|
|
473
447
|
const pluginResult = await addPluginToOpenCodeConfig();
|
|
474
448
|
if (!handleStepResult(pluginResult, "Plugin added"))
|
|
475
449
|
return 1;
|
|
450
|
+
printStep(step++, totalSteps, "Disabling OpenCode default agents...");
|
|
451
|
+
const agentResult = disableDefaultAgents();
|
|
452
|
+
if (!handleStepResult(agentResult, "Default agents disabled"))
|
|
453
|
+
return 1;
|
|
476
454
|
if (config.hasAntigravity) {
|
|
477
455
|
printStep(step++, totalSteps, "Adding auth plugins...");
|
|
478
456
|
const authResult = await addAuthPlugins(config);
|
|
@@ -483,12 +461,6 @@ async function runInstall(config) {
|
|
|
483
461
|
if (!handleStepResult(providerResult, "Providers configured"))
|
|
484
462
|
return 1;
|
|
485
463
|
}
|
|
486
|
-
if (config.hasTmux) {
|
|
487
|
-
printStep(step++, totalSteps, "Configuring OpenCode HTTP server for tmux...");
|
|
488
|
-
const serverResult = addServerConfig(config);
|
|
489
|
-
if (!handleStepResult(serverResult, "Server configured"))
|
|
490
|
-
return 1;
|
|
491
|
-
}
|
|
492
464
|
printStep(step++, totalSteps, "Writing oh-my-opencode-slim configuration...");
|
|
493
465
|
const liteResult = writeLiteConfig(config);
|
|
494
466
|
if (!handleStepResult(liteResult, "Config written"))
|
|
@@ -509,14 +481,8 @@ async function runInstall(config) {
|
|
|
509
481
|
console.log(` ${nextStep++}. Authenticate with your providers:`);
|
|
510
482
|
console.log(` ${BLUE}$ opencode auth login${RESET}`);
|
|
511
483
|
console.log();
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
console.log(` ${BLUE}$ tmux${RESET}`);
|
|
515
|
-
console.log(` ${BLUE}$ opencode${RESET}`);
|
|
516
|
-
} else {
|
|
517
|
-
console.log(` ${nextStep++}. Start OpenCode:`);
|
|
518
|
-
console.log(` ${BLUE}$ opencode${RESET}`);
|
|
519
|
-
}
|
|
484
|
+
console.log(` ${nextStep++}. Start OpenCode:`);
|
|
485
|
+
console.log(` ${BLUE}$ opencode${RESET}`);
|
|
520
486
|
console.log();
|
|
521
487
|
return 0;
|
|
522
488
|
}
|
package/dist/index.js
CHANGED
|
@@ -20585,73 +20585,172 @@ function loadPluginConfig(directory) {
|
|
|
20585
20585
|
return config2;
|
|
20586
20586
|
}
|
|
20587
20587
|
// src/agents/orchestrator.ts
|
|
20588
|
-
function createOrchestratorAgent(model
|
|
20589
|
-
const agentTable = subAgents.map((a) => `| @${a.name} | ${a.description} |`).join(`
|
|
20590
|
-
`);
|
|
20591
|
-
const prompt = ORCHESTRATOR_PROMPT_TEMPLATE.replace("{{AGENT_TABLE}}", agentTable);
|
|
20588
|
+
function createOrchestratorAgent(model) {
|
|
20592
20589
|
return {
|
|
20593
20590
|
name: "orchestrator",
|
|
20594
|
-
description: "AI coding orchestrator with access to specialized subagents",
|
|
20595
20591
|
config: {
|
|
20596
20592
|
model,
|
|
20597
20593
|
temperature: 0.1,
|
|
20598
|
-
|
|
20594
|
+
prompt: ORCHESTRATOR_PROMPT
|
|
20599
20595
|
}
|
|
20600
20596
|
};
|
|
20601
20597
|
}
|
|
20602
|
-
var
|
|
20603
|
-
You are an AI coding orchestrator
|
|
20598
|
+
var ORCHESTRATOR_PROMPT = `<Role>
|
|
20599
|
+
You are an AI coding orchestrator. You DO NOT implement - you DELEGATE.
|
|
20600
|
+
|
|
20601
|
+
**Your Identity:**
|
|
20602
|
+
- You are a CONDUCTOR, not a musician
|
|
20603
|
+
- You are a MANAGER, not a worker
|
|
20604
|
+
- You are a ROUTER, not a processor
|
|
20604
20605
|
|
|
20605
|
-
**Core
|
|
20606
|
-
- Parse implicit requirements from explicit requests
|
|
20607
|
-
- Delegate specialized work to the right subagents
|
|
20608
|
-
- Sensible parallel execution
|
|
20606
|
+
**Core Rule:** If a specialist agent can do the work, YOU MUST delegate to them.
|
|
20609
20607
|
|
|
20608
|
+
**Why Delegation Matters:**
|
|
20609
|
+
- @frontend-ui-ux-engineer \u2192 10x better designs than you
|
|
20610
|
+
- @librarian \u2192 finds docs you'd miss
|
|
20611
|
+
- @explore \u2192 searches faster than you
|
|
20612
|
+
- @oracle \u2192 catches architectural issues you'd overlook
|
|
20613
|
+
- @document-writer \u2192 writes cleaner docs for less cost
|
|
20614
|
+
- @code-simplicity-reviewer \u2192 spots complexity you're blind to
|
|
20615
|
+
- @multimodal-looker \u2192 understands images you can't parse
|
|
20616
|
+
|
|
20617
|
+
**Your value is in orchestration, not implementation.**
|
|
20610
20618
|
</Role>
|
|
20611
20619
|
|
|
20612
|
-
<
|
|
20613
|
-
|
|
20614
|
-
|-------|-----------------------|
|
|
20615
|
-
{{AGENT_TABLE}}
|
|
20616
|
-
</Subagents>
|
|
20620
|
+
<Agents>
|
|
20621
|
+
## Research Agents (Background-friendly)
|
|
20617
20622
|
|
|
20618
|
-
|
|
20619
|
-
|
|
20623
|
+
@explore - Fast codebase search and pattern matching
|
|
20624
|
+
Triggers: "find", "where is", "search for", "which file", "locate"
|
|
20625
|
+
Example: background_task(agent="explore", prompt="Find all authentication implementations")
|
|
20620
20626
|
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
background_task(agent="explore", prompt="Find all auth implementations")
|
|
20625
|
-
background_task(agent="librarian", prompt="How does library X handle Y")
|
|
20626
|
-
\`\`\`
|
|
20627
|
+
@librarian - External documentation and library research
|
|
20628
|
+
Triggers: "how does X library work", "docs for", "API reference", "best practice for"
|
|
20629
|
+
Example: background_task(agent="librarian", prompt="How does React Query handle cache invalidation")
|
|
20627
20630
|
|
|
20628
|
-
##
|
|
20629
|
-
- Use the subagent most relevant to the task description.
|
|
20630
|
-
- Use background tasks for research or search while you continue working.
|
|
20631
|
+
## Advisory Agents (Usually sync)
|
|
20631
20632
|
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20633
|
+
@oracle - Architecture, debugging, and strategic code review
|
|
20634
|
+
Triggers: "should I", "why does", "review", "debug", "what's wrong", "tradeoffs"
|
|
20635
|
+
Use when: Complex decisions, mysterious bugs, architectural uncertainty
|
|
20636
|
+
|
|
20637
|
+
@code-simplicity-reviewer - Complexity analysis and YAGNI enforcement
|
|
20638
|
+
Triggers: "too complex", "simplify", "review for complexity", after major refactors
|
|
20639
|
+
Use when: After writing significant code, before finalizing PRs
|
|
20640
|
+
|
|
20641
|
+
## Implementation Agents (Sync)
|
|
20642
|
+
|
|
20643
|
+
@frontend-ui-ux-engineer - UI/UX design and implementation
|
|
20644
|
+
Triggers: "styling", "responsive", "UI", "UX", "component design", "CSS", "animation"
|
|
20645
|
+
Use when: Any visual/frontend work that needs design sense
|
|
20646
|
+
|
|
20647
|
+
@document-writer - Technical documentation and knowledge capture
|
|
20648
|
+
Triggers: "document", "README", "update docs", "explain in docs"
|
|
20649
|
+
Use when: After features are implemented, before closing tasks
|
|
20650
|
+
|
|
20651
|
+
@multimodal-looker - Image and visual content analysis
|
|
20652
|
+
Triggers: User provides image, screenshot, diagram, mockup
|
|
20653
|
+
Use when: Need to extract info from visual inputs
|
|
20654
|
+
</Agents>
|
|
20635
20655
|
|
|
20636
20656
|
<Workflow>
|
|
20637
|
-
1
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20657
|
+
## Phase 1: Understand
|
|
20658
|
+
Parse the request. Identify explicit and implicit requirements.
|
|
20659
|
+
|
|
20660
|
+
## Phase 2: Delegation Gate (MANDATORY - DO NOT SKIP)
|
|
20661
|
+
|
|
20662
|
+
STOP. Before ANY implementation, you MUST complete this checklist:
|
|
20663
|
+
|
|
20664
|
+
\`\`\`
|
|
20665
|
+
DELEGATION CHECKLIST (complete before coding):
|
|
20666
|
+
[ ] UI/styling/design/visual/CSS/animation? \u2192 @frontend-ui-ux-engineer MUST handle
|
|
20667
|
+
[ ] Need codebase context? \u2192 @explore first
|
|
20668
|
+
[ ] External library/API docs needed? \u2192 @librarian first
|
|
20669
|
+
[ ] Architecture decision or debugging? \u2192 @oracle first
|
|
20670
|
+
[ ] Image/screenshot/diagram provided? \u2192 @multimodal-looker first
|
|
20671
|
+
[ ] Documentation to write? \u2192 @document-writer handles
|
|
20672
|
+
\`\`\`
|
|
20673
|
+
|
|
20674
|
+
**CRITICAL RULES:**
|
|
20675
|
+
1. If ANY checkbox applies \u2192 delegate BEFORE you write code
|
|
20676
|
+
2. Reading files for context \u2260 completing the task. Context gathering is Phase 1, not Phase 3.
|
|
20677
|
+
3. Your job is to DELEGATE task when specialize provide improved speed, quality or cost, not to DO it yourself this time.
|
|
20678
|
+
|
|
20679
|
+
**Anti-patterns to avoid:**
|
|
20680
|
+
- Reading files \u2192 feeling productive \u2192 implementing yourself (WRONG)
|
|
20681
|
+
- Creating todos \u2192 feeling like you planned \u2192 skipping delegation (WRONG)
|
|
20682
|
+
- "I can handle this" \u2192 doing specialist work yourself (WRONG)
|
|
20683
|
+
|
|
20684
|
+
## Phase 2.1: Task Planning
|
|
20685
|
+
1. If task has 2+ steps \u2192 Create todo list with delegations noted
|
|
20686
|
+
2. Mark current task \`in_progress\` before starting
|
|
20687
|
+
3. Mark \`completed\` immediately when done
|
|
20688
|
+
|
|
20689
|
+
## Phase 3: Execute
|
|
20690
|
+
1. Fire background research (explore, librarian) in parallel
|
|
20691
|
+
2. DELEGATE implementation to specialists based on Phase 2 checklist
|
|
20692
|
+
3. Only do work yourself if NO specialist applies
|
|
20693
|
+
4. Integrate results from specialists
|
|
20694
|
+
|
|
20695
|
+
## Phase 4: Verify
|
|
20696
|
+
- Run lsp_diagnostics to check for errors
|
|
20697
|
+
- @code-simplicity-reviewer for complex changes
|
|
20698
|
+
- Update documentation if behavior changed
|
|
20643
20699
|
</Workflow>
|
|
20700
|
+
|
|
20701
|
+
### Clarification Protocol (when asking):
|
|
20702
|
+
|
|
20703
|
+
\`\`\`
|
|
20704
|
+
I want to make sure I understand correctly.
|
|
20705
|
+
|
|
20706
|
+
**What I understood**: [Your interpretation]
|
|
20707
|
+
**What I'm unsure about**: [Specific ambiguity]
|
|
20708
|
+
**Options I see**:
|
|
20709
|
+
1. [Option A] - [effort/implications]
|
|
20710
|
+
2. [Option B] - [effort/implications]
|
|
20711
|
+
|
|
20712
|
+
**My recommendation**: [suggestion with reasoning]
|
|
20713
|
+
|
|
20714
|
+
Should I proceed with [recommendation], or would you prefer differently?
|
|
20715
|
+
\`\`\`
|
|
20716
|
+
|
|
20717
|
+
## Communication Style
|
|
20718
|
+
|
|
20719
|
+
### Be Concise
|
|
20720
|
+
- Start work immediately. No acknowledgments ("I'm on it", "Let me...", "I'll start...")
|
|
20721
|
+
- Answer directly without preamble
|
|
20722
|
+
- Don't summarize what you did unless asked
|
|
20723
|
+
- Don't explain your code unless asked
|
|
20724
|
+
- One word answers are acceptable when appropriate
|
|
20725
|
+
|
|
20726
|
+
### No Flattery
|
|
20727
|
+
Never start responses with:
|
|
20728
|
+
- "Great question!"
|
|
20729
|
+
- "That's a really good idea!"
|
|
20730
|
+
- "Excellent choice!"
|
|
20731
|
+
- Any praise of the user's input
|
|
20732
|
+
|
|
20733
|
+
### When User is Wrong
|
|
20734
|
+
If the user's approach seems problematic:
|
|
20735
|
+
- Don't blindly implement it
|
|
20736
|
+
- Don't lecture or be preachy
|
|
20737
|
+
- Concisely state your concern and alternative
|
|
20738
|
+
- Ask if they want to proceed anyway
|
|
20739
|
+
|
|
20740
|
+
## Skills
|
|
20741
|
+
For browser tasks (verification, screenshots, scraping), call omo_skill with name "playwright" first.
|
|
20742
|
+
Use omo_skill_mcp to invoke browser actions. Screenshots save to '/tmp/playwright-mcp-output/'.
|
|
20644
20743
|
`;
|
|
20645
20744
|
|
|
20646
20745
|
// src/agents/oracle.ts
|
|
20647
20746
|
function createOracleAgent(model) {
|
|
20648
20747
|
return {
|
|
20649
20748
|
name: "oracle",
|
|
20650
|
-
description: "
|
|
20749
|
+
description: "Strategic technical advisor. Use for architecture decisions, complex debugging, code review, and engineering guidance.",
|
|
20651
20750
|
config: {
|
|
20652
20751
|
model,
|
|
20653
20752
|
temperature: 0.1,
|
|
20654
|
-
|
|
20753
|
+
prompt: ORACLE_PROMPT
|
|
20655
20754
|
}
|
|
20656
20755
|
};
|
|
20657
20756
|
}
|
|
@@ -20680,11 +20779,11 @@ var ORACLE_PROMPT = `You are Oracle - a strategic technical advisor.
|
|
|
20680
20779
|
function createLibrarianAgent(model) {
|
|
20681
20780
|
return {
|
|
20682
20781
|
name: "librarian",
|
|
20683
|
-
description: "External documentation and library research",
|
|
20782
|
+
description: "External documentation and library research. Use for official docs lookup, GitHub examples, and understanding library internals.",
|
|
20684
20783
|
config: {
|
|
20685
20784
|
model,
|
|
20686
20785
|
temperature: 0.1,
|
|
20687
|
-
|
|
20786
|
+
prompt: LIBRARIAN_PROMPT
|
|
20688
20787
|
}
|
|
20689
20788
|
};
|
|
20690
20789
|
}
|
|
@@ -20713,11 +20812,11 @@ var LIBRARIAN_PROMPT = `You are Librarian - a research specialist for codebases
|
|
|
20713
20812
|
function createExploreAgent(model) {
|
|
20714
20813
|
return {
|
|
20715
20814
|
name: "explore",
|
|
20716
|
-
description: "Fast codebase search and pattern matching",
|
|
20815
|
+
description: "Fast codebase search and pattern matching. Use for finding files, locating code patterns, and answering 'where is X?' questions.",
|
|
20717
20816
|
config: {
|
|
20718
20817
|
model,
|
|
20719
20818
|
temperature: 0.1,
|
|
20720
|
-
|
|
20819
|
+
prompt: EXPLORE_PROMPT
|
|
20721
20820
|
}
|
|
20722
20821
|
};
|
|
20723
20822
|
}
|
|
@@ -20764,11 +20863,11 @@ Concise answer to the question
|
|
|
20764
20863
|
function createFrontendAgent(model) {
|
|
20765
20864
|
return {
|
|
20766
20865
|
name: "frontend-ui-ux-engineer",
|
|
20767
|
-
description: "UI/UX implementation and visual
|
|
20866
|
+
description: "UI/UX design and implementation. Use for styling, responsive design, component architecture, CSS/Tailwind, and visual polish.",
|
|
20768
20867
|
config: {
|
|
20769
20868
|
model,
|
|
20770
20869
|
temperature: 0.7,
|
|
20771
|
-
|
|
20870
|
+
prompt: FRONTEND_PROMPT
|
|
20772
20871
|
}
|
|
20773
20872
|
};
|
|
20774
20873
|
}
|
|
@@ -20799,11 +20898,11 @@ var FRONTEND_PROMPT = `You are a Frontend UI/UX Engineer - a designer turned dev
|
|
|
20799
20898
|
function createDocumentWriterAgent(model) {
|
|
20800
20899
|
return {
|
|
20801
20900
|
name: "document-writer",
|
|
20802
|
-
description: "Technical documentation and
|
|
20901
|
+
description: "Technical documentation writer. Use for README files, API docs, architecture docs, and user guides.",
|
|
20803
20902
|
config: {
|
|
20804
20903
|
model,
|
|
20805
20904
|
temperature: 0.3,
|
|
20806
|
-
|
|
20905
|
+
prompt: DOCUMENT_WRITER_PROMPT
|
|
20807
20906
|
}
|
|
20808
20907
|
};
|
|
20809
20908
|
}
|
|
@@ -20832,11 +20931,11 @@ var DOCUMENT_WRITER_PROMPT = `You are a Technical Writer - crafting clear, compr
|
|
|
20832
20931
|
function createMultimodalAgent(model) {
|
|
20833
20932
|
return {
|
|
20834
20933
|
name: "multimodal-looker",
|
|
20835
|
-
description: "Image and
|
|
20934
|
+
description: "Image and visual content analysis. Use for PDFs, screenshots, diagrams, mockups, and extracting info from visuals.",
|
|
20836
20935
|
config: {
|
|
20837
20936
|
model,
|
|
20838
20937
|
temperature: 0.1,
|
|
20839
|
-
|
|
20938
|
+
prompt: MULTIMODAL_PROMPT
|
|
20840
20939
|
}
|
|
20841
20940
|
};
|
|
20842
20941
|
}
|
|
@@ -20865,11 +20964,11 @@ var MULTIMODAL_PROMPT = `You are a Multimodal Analyst - extracting information f
|
|
|
20865
20964
|
function createSimplicityReviewerAgent(model) {
|
|
20866
20965
|
return {
|
|
20867
20966
|
name: "code-simplicity-reviewer",
|
|
20868
|
-
description: "
|
|
20967
|
+
description: "Code complexity analysis and YAGNI enforcement. Use after major refactors or before finalizing PRs to simplify code.",
|
|
20869
20968
|
config: {
|
|
20870
20969
|
model,
|
|
20871
20970
|
temperature: 0.1,
|
|
20872
|
-
|
|
20971
|
+
prompt: SIMPLICITY_REVIEWER_PROMPT
|
|
20873
20972
|
}
|
|
20874
20973
|
};
|
|
20875
20974
|
}
|
|
@@ -20960,32 +21059,29 @@ function applyOverrides(agent, override) {
|
|
|
20960
21059
|
if (override.temperature !== undefined)
|
|
20961
21060
|
agent.config.temperature = override.temperature;
|
|
20962
21061
|
if (override.prompt)
|
|
20963
|
-
agent.config.
|
|
21062
|
+
agent.config.prompt = override.prompt;
|
|
20964
21063
|
if (override.prompt_append) {
|
|
20965
|
-
agent.config.
|
|
21064
|
+
agent.config.prompt = `${agent.config.prompt}
|
|
20966
21065
|
|
|
20967
21066
|
${override.prompt_append}`;
|
|
20968
21067
|
}
|
|
20969
21068
|
}
|
|
20970
|
-
var
|
|
20971
|
-
explore:
|
|
20972
|
-
librarian:
|
|
20973
|
-
oracle:
|
|
20974
|
-
"frontend-ui-ux-engineer":
|
|
20975
|
-
"document-writer":
|
|
20976
|
-
"multimodal-looker":
|
|
20977
|
-
"code-simplicity-reviewer":
|
|
21069
|
+
var SUBAGENT_FACTORIES = {
|
|
21070
|
+
explore: createExploreAgent,
|
|
21071
|
+
librarian: createLibrarianAgent,
|
|
21072
|
+
oracle: createOracleAgent,
|
|
21073
|
+
"frontend-ui-ux-engineer": createFrontendAgent,
|
|
21074
|
+
"document-writer": createDocumentWriterAgent,
|
|
21075
|
+
"multimodal-looker": createMultimodalAgent,
|
|
21076
|
+
"code-simplicity-reviewer": createSimplicityReviewerAgent
|
|
20978
21077
|
};
|
|
20979
|
-
function getAgentListDescription() {
|
|
20980
|
-
return Object.entries(SUBAGENT_INFO).map(([name, { shortDesc }]) => `${name} (${shortDesc})`).join(", ");
|
|
20981
|
-
}
|
|
20982
21078
|
function getAgentNames() {
|
|
20983
|
-
return Object.keys(
|
|
21079
|
+
return Object.keys(SUBAGENT_FACTORIES);
|
|
20984
21080
|
}
|
|
20985
21081
|
function createAgents(config2) {
|
|
20986
21082
|
const disabledAgents = new Set(config2?.disabled_agents ?? []);
|
|
20987
21083
|
const agentOverrides = config2?.agents ?? {};
|
|
20988
|
-
const protoSubAgents = Object.entries(
|
|
21084
|
+
const protoSubAgents = Object.entries(SUBAGENT_FACTORIES).map(([name, factory]) => factory(DEFAULT_MODELS[name]));
|
|
20989
21085
|
const allSubAgents = protoSubAgents.filter((a) => !disabledAgents.has(a.name)).map((agent) => {
|
|
20990
21086
|
const override = agentOverrides[agent.name];
|
|
20991
21087
|
if (override) {
|
|
@@ -20994,7 +21090,7 @@ function createAgents(config2) {
|
|
|
20994
21090
|
return agent;
|
|
20995
21091
|
});
|
|
20996
21092
|
const orchestratorModel = agentOverrides["orchestrator"]?.model ?? DEFAULT_MODELS["orchestrator"];
|
|
20997
|
-
const orchestrator = createOrchestratorAgent(orchestratorModel
|
|
21093
|
+
const orchestrator = createOrchestratorAgent(orchestratorModel);
|
|
20998
21094
|
const oOverride = agentOverrides["orchestrator"];
|
|
20999
21095
|
if (oOverride) {
|
|
21000
21096
|
applyOverrides(orchestrator, oOverride);
|
|
@@ -21003,7 +21099,7 @@ function createAgents(config2) {
|
|
|
21003
21099
|
}
|
|
21004
21100
|
function getAgentConfigs(config2) {
|
|
21005
21101
|
const agents = createAgents(config2);
|
|
21006
|
-
return Object.fromEntries(agents.map((a) => [a.name, a.config]));
|
|
21102
|
+
return Object.fromEntries(agents.map((a) => [a.name, { ...a.config, description: a.description }]));
|
|
21007
21103
|
}
|
|
21008
21104
|
|
|
21009
21105
|
// src/features/background-manager.ts
|
|
@@ -33827,12 +33923,11 @@ tool.schema = exports_external2;
|
|
|
33827
33923
|
// src/tools/background.ts
|
|
33828
33924
|
var z2 = tool.schema;
|
|
33829
33925
|
function createBackgroundTools(ctx, manager, tmuxConfig) {
|
|
33830
|
-
const agentList = getAgentListDescription();
|
|
33831
33926
|
const agentNames = getAgentNames().join(", ");
|
|
33832
33927
|
const background_task = tool({
|
|
33833
33928
|
description: `Run agent task. Use sync=true to wait for result, sync=false (default) to run in background.
|
|
33834
33929
|
|
|
33835
|
-
Agents: ${
|
|
33930
|
+
Agents: ${agentNames}.
|
|
33836
33931
|
|
|
33837
33932
|
Async mode returns task_id immediately - use \`background_output\` to get results.
|
|
33838
33933
|
Sync mode blocks until completion and returns the result directly.`,
|
package/package.json
CHANGED