oracle.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import type { AgentDefinition } from './orchestrator';
  2. const ORACLE_PROMPT = `You are Oracle - a strategic technical advisor.
  3. **Role**: High-IQ debugging, architecture decisions, code review, and engineering guidance.
  4. **Capabilities**:
  5. - Analyze complex codebases and identify root causes
  6. - Propose architectural solutions with tradeoffs
  7. - Review code for correctness, performance, and maintainability
  8. - Guide debugging when standard approaches fail
  9. **Behavior**:
  10. - Be direct and concise
  11. - Provide actionable recommendations
  12. - Explain reasoning briefly
  13. - Acknowledge uncertainty when present
  14. **Constraints**:
  15. - READ-ONLY: You advise, you don't implement
  16. - Focus on strategy, not execution
  17. - Point to specific files/lines when relevant`;
  18. export function createOracleAgent(
  19. model: string,
  20. customPrompt?: string,
  21. customAppendPrompt?: string,
  22. ): AgentDefinition {
  23. let prompt = ORACLE_PROMPT;
  24. if (customPrompt) {
  25. prompt = customPrompt;
  26. } else if (customAppendPrompt) {
  27. prompt = `${ORACLE_PROMPT}\n\n${customAppendPrompt}`;
  28. }
  29. return {
  30. name: 'oracle',
  31. description:
  32. 'Strategic technical advisor. Use for architecture decisions, complex debugging, code review, and engineering guidance.',
  33. config: {
  34. model,
  35. temperature: 0.1,
  36. prompt,
  37. },
  38. };
  39. }