feat(agents): implement dynamic Sisyphus prompt system with agent metadata
Introduce a new dynamic prompt generation system for Sisyphus orchestrator that leverages agent metadata for intelligent delegation. This revives the dynamic-sisyphus-agent-prompt branch with comprehensive refactoring. Changes: - Add AgentPromptMetadata, AgentCategory, AgentCost, DelegationTrigger types - Create sisyphus-prompt-builder with dynamic prompt generation logic - Add AGENT_PROMPT_METADATA exports to all agent modules (oracle, librarian, explore, frontend-ui-ux-engineer, document-writer, multimodal-looker) - Refactor sisyphus.ts to use buildDynamicSisyphusPrompt() - Add AvailableAgent type export for type safety This enables Sisyphus to make intelligent agent selection decisions based on agent capabilities, costs, and delegation triggers, improving orchestration efficiency. 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -1,8 +1,35 @@
|
||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||
import type { AgentPromptMetadata } from "./types"
|
||||
import { isGptModel } from "./types"
|
||||
|
||||
const DEFAULT_MODEL = "openai/gpt-5.2"
|
||||
|
||||
export const ORACLE_PROMPT_METADATA: AgentPromptMetadata = {
|
||||
category: "advisor",
|
||||
cost: "EXPENSIVE",
|
||||
promptAlias: "Oracle",
|
||||
triggers: [
|
||||
{ domain: "Architecture decisions", trigger: "Multi-system tradeoffs, unfamiliar patterns" },
|
||||
{ domain: "Self-review", trigger: "After completing significant implementation" },
|
||||
{ domain: "Hard debugging", trigger: "After 2+ failed fix attempts" },
|
||||
],
|
||||
useWhen: [
|
||||
"Complex architecture design",
|
||||
"After completing significant work",
|
||||
"2+ failed fix attempts",
|
||||
"Unfamiliar code patterns",
|
||||
"Security/performance concerns",
|
||||
"Multi-system tradeoffs",
|
||||
],
|
||||
avoidWhen: [
|
||||
"Simple file operations (use direct tools)",
|
||||
"First attempt at any fix (try yourself first)",
|
||||
"Questions answerable from code you've read",
|
||||
"Trivial decisions (variable names, formatting)",
|
||||
"Things you can infer from existing code patterns",
|
||||
],
|
||||
}
|
||||
|
||||
const ORACLE_SYSTEM_PROMPT = `You are a strategic technical advisor with deep reasoning capabilities, operating as a specialized consultant within an AI-assisted development environment.
|
||||
|
||||
## Context
|
||||
|
||||
Reference in New Issue
Block a user