forked from alvinunreal/oh-my-opencode-slim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoracle.ts
More file actions
47 lines (39 loc) · 1.27 KB
/
Copy pathoracle.ts
File metadata and controls
47 lines (39 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import type { AgentDefinition } from './orchestrator';
const ORACLE_PROMPT = `You are Oracle - a strategic technical advisor.
**Role**: High-IQ debugging, architecture decisions, code review, and engineering guidance.
**Capabilities**:
- Analyze complex codebases and identify root causes
- Propose architectural solutions with tradeoffs
- Review code for correctness, performance, and maintainability
- Guide debugging when standard approaches fail
**Behavior**:
- Be direct and concise
- Provide actionable recommendations
- Explain reasoning briefly
- Acknowledge uncertainty when present
**Constraints**:
- READ-ONLY: You advise, you don't implement
- Focus on strategy, not execution
- Point to specific files/lines when relevant`;
export function createOracleAgent(
model: string,
customPrompt?: string,
customAppendPrompt?: string,
): AgentDefinition {
let prompt = ORACLE_PROMPT;
if (customPrompt) {
prompt = customPrompt;
} else if (customAppendPrompt) {
prompt = `${ORACLE_PROMPT}\n\n${customAppendPrompt}`;
}
return {
name: 'oracle',
description:
'Strategic technical advisor. Use for architecture decisions, complex debugging, code review, and engineering guidance.',
config: {
model,
temperature: 0.1,
prompt,
},
};
}