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:
YeonGyu-Kim
2025-12-30 23:56:09 +09:00
parent 8cbdfbaf78
commit c6efe70f09
11 changed files with 565 additions and 191 deletions

View File

@@ -1,7 +1,28 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import type { AgentPromptMetadata } from "./types"
const DEFAULT_MODEL = "opencode/grok-code"
export const EXPLORE_PROMPT_METADATA: AgentPromptMetadata = {
category: "exploration",
cost: "FREE",
promptAlias: "Explore",
keyTrigger: "2+ modules involved → fire `explore` background",
triggers: [
{ domain: "Explore", trigger: "Find existing codebase structure, patterns and styles" },
],
useWhen: [
"Multiple search angles needed",
"Unfamiliar module structure",
"Cross-layer pattern discovery",
],
avoidWhen: [
"You know exactly what to search",
"Single keyword/pattern suffices",
"Known file location",
],
}
export function createExploreAgent(model: string = DEFAULT_MODEL): AgentConfig {
return {
description: