chore: changes by sisyphus-dev-ai
This commit is contained in:
@@ -85,6 +85,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -196,6 +199,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -307,6 +313,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -418,6 +427,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -529,6 +541,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -640,6 +655,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -751,6 +769,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -862,6 +883,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -973,6 +997,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
@@ -1084,6 +1111,9 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"prompt_append": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"propertyNames": {
|
"propertyNames": {
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
|
|
||||||
export const documentWriterAgent: AgentConfig = {
|
const DEFAULT_MODEL = "google/gemini-3-flash-preview"
|
||||||
description:
|
|
||||||
"A technical writer who crafts clear, comprehensive documentation. Specializes in README files, API docs, architecture docs, and user guides. MUST BE USED when executing documentation tasks from ai-todo list plans.",
|
export function createDocumentWriterAgent(
|
||||||
mode: "subagent",
|
model: string = DEFAULT_MODEL
|
||||||
model: "google/gemini-3-flash-preview",
|
): AgentConfig {
|
||||||
tools: { background_task: false },
|
return {
|
||||||
prompt: `<role>
|
description:
|
||||||
|
"A technical writer who crafts clear, comprehensive documentation. Specializes in README files, API docs, architecture docs, and user guides. MUST BE USED when executing documentation tasks from ai-todo list plans.",
|
||||||
|
mode: "subagent" as const,
|
||||||
|
model,
|
||||||
|
tools: { background_task: false },
|
||||||
|
prompt: `<role>
|
||||||
You are a TECHNICAL WRITER with deep engineering background who transforms complex codebases into crystal-clear documentation. You have an innate ability to explain complex concepts simply while maintaining technical accuracy.
|
You are a TECHNICAL WRITER with deep engineering background who transforms complex codebases into crystal-clear documentation. You have an innate ability to explain complex concepts simply while maintaining technical accuracy.
|
||||||
|
|
||||||
You approach every documentation task with both a developer's understanding and a reader's empathy. Even without detailed specs, you can explore codebases and create documentation that developers actually want to read.
|
You approach every documentation task with both a developer's understanding and a reader's empathy. Even without detailed specs, you can explore codebases and create documentation that developers actually want to read.
|
||||||
@@ -200,4 +205,7 @@ STOP HERE - DO NOT CONTINUE TO NEXT TASK
|
|||||||
|
|
||||||
You are a technical writer who creates documentation that developers actually want to read.
|
You are a technical writer who creates documentation that developers actually want to read.
|
||||||
</guide>`,
|
</guide>`,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const documentWriterAgent = createDocumentWriterAgent()
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
|
|
||||||
export const exploreAgent: AgentConfig = {
|
const DEFAULT_MODEL = "opencode/grok-code"
|
||||||
description:
|
|
||||||
'Contextual grep for codebases. Answers "Where is X?", "Which file has Y?", "Find the code that does Z". Fire multiple in parallel for broad searches. Specify thoroughness: "quick" for basic, "medium" for moderate, "very thorough" for comprehensive analysis.',
|
export function createExploreAgent(model: string = DEFAULT_MODEL): AgentConfig {
|
||||||
mode: "subagent",
|
return {
|
||||||
model: "opencode/grok-code",
|
description:
|
||||||
temperature: 0.1,
|
'Contextual grep for codebases. Answers "Where is X?", "Which file has Y?", "Find the code that does Z". Fire multiple in parallel for broad searches. Specify thoroughness: "quick" for basic, "medium" for moderate, "very thorough" for comprehensive analysis.',
|
||||||
tools: { write: false, edit: false, background_task: false },
|
mode: "subagent" as const,
|
||||||
prompt: `You are a codebase search specialist. Your job: find files and code, return actionable results.
|
model,
|
||||||
|
temperature: 0.1,
|
||||||
|
tools: { write: false, edit: false, background_task: false },
|
||||||
|
prompt: `You are a codebase search specialist. Your job: find files and code, return actionable results.
|
||||||
|
|
||||||
## Your Mission
|
## Your Mission
|
||||||
|
|
||||||
@@ -96,4 +99,7 @@ grep_app searches millions of public GitHub repos instantly — use it for exter
|
|||||||
3. **Cross-validate with local tools** (grep, ast_grep_search, LSP) before trusting results
|
3. **Cross-validate with local tools** (grep, ast_grep_search, LSP) before trusting results
|
||||||
|
|
||||||
Flood with parallel calls. Trust only cross-validated results.`,
|
Flood with parallel calls. Trust only cross-validated results.`,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const exploreAgent = createExploreAgent()
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
|
|
||||||
export const frontendUiUxEngineerAgent: AgentConfig = {
|
const DEFAULT_MODEL = "google/gemini-3-pro-preview"
|
||||||
description:
|
|
||||||
"A designer-turned-developer who crafts stunning UI/UX even without design mockups. Code may be a bit messy, but the visual output is always fire.",
|
export function createFrontendUiUxEngineerAgent(
|
||||||
mode: "subagent",
|
model: string = DEFAULT_MODEL
|
||||||
model: "google/gemini-3-pro-preview",
|
): AgentConfig {
|
||||||
tools: { background_task: false },
|
return {
|
||||||
prompt: `# Role: Designer-Turned-Developer
|
description:
|
||||||
|
"A designer-turned-developer who crafts stunning UI/UX even without design mockups. Code may be a bit messy, but the visual output is always fire.",
|
||||||
|
mode: "subagent" as const,
|
||||||
|
model,
|
||||||
|
tools: { background_task: false },
|
||||||
|
prompt: `# Role: Designer-Turned-Developer
|
||||||
|
|
||||||
You are a designer who learned to code. You see what pure developers miss—spacing, color harmony, micro-interactions, that indefinable "feel" that makes interfaces memorable. Even without mockups, you envision and create beautiful, cohesive interfaces.
|
You are a designer who learned to code. You see what pure developers miss—spacing, color harmony, micro-interactions, that indefinable "feel" that makes interfaces memorable. Even without mockups, you envision and create beautiful, cohesive interfaces.
|
||||||
|
|
||||||
@@ -79,4 +84,7 @@ Match implementation complexity to aesthetic vision:
|
|||||||
- **Minimalist** → Restraint, precision, careful spacing and typography
|
- **Minimalist** → Restraint, precision, careful spacing and typography
|
||||||
|
|
||||||
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. You are capable of extraordinary creative work—don't hold back.`,
|
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. You are capable of extraordinary creative work—don't hold back.`,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const frontendUiUxEngineerAgent = createFrontendUiUxEngineerAgent()
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
|
|
||||||
export const librarianAgent: AgentConfig = {
|
const DEFAULT_MODEL = "anthropic/claude-sonnet-4-5"
|
||||||
description:
|
|
||||||
"Specialized codebase understanding agent for multi-repository analysis, searching remote codebases, retrieving official documentation, and finding implementation examples using GitHub CLI, Context7, and Web Search. MUST BE USED when users ask to look up code in remote repositories, explain library internals, or find usage examples in open source.",
|
export function createLibrarianAgent(model: string = DEFAULT_MODEL): AgentConfig {
|
||||||
mode: "subagent",
|
return {
|
||||||
model: "anthropic/claude-sonnet-4-5",
|
description:
|
||||||
temperature: 0.1,
|
"Specialized codebase understanding agent for multi-repository analysis, searching remote codebases, retrieving official documentation, and finding implementation examples using GitHub CLI, Context7, and Web Search. MUST BE USED when users ask to look up code in remote repositories, explain library internals, or find usage examples in open source.",
|
||||||
tools: { write: false, edit: false, background_task: false },
|
mode: "subagent" as const,
|
||||||
prompt: `# THE LIBRARIAN
|
model,
|
||||||
|
temperature: 0.1,
|
||||||
|
tools: { write: false, edit: false, background_task: false },
|
||||||
|
prompt: `# THE LIBRARIAN
|
||||||
|
|
||||||
You are **THE LIBRARIAN**, a specialized open-source codebase understanding agent.
|
You are **THE LIBRARIAN**, a specialized open-source codebase understanding agent.
|
||||||
|
|
||||||
@@ -237,4 +240,7 @@ grep_app_searchGitHub(query: "useQuery")
|
|||||||
5. **BE CONCISE**: Facts > opinions, evidence > speculation
|
5. **BE CONCISE**: Facts > opinions, evidence > speculation
|
||||||
|
|
||||||
`,
|
`,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const librarianAgent = createLibrarianAgent()
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
|
|
||||||
export const multimodalLookerAgent: AgentConfig = {
|
const DEFAULT_MODEL = "google/gemini-3-flash"
|
||||||
description:
|
|
||||||
"Analyze media files (PDFs, images, diagrams) that require interpretation beyond raw text. Extracts specific information or summaries from documents, describes visual content. Use when you need analyzed/extracted data rather than literal file contents.",
|
export function createMultimodalLookerAgent(
|
||||||
mode: "subagent",
|
model: string = DEFAULT_MODEL
|
||||||
model: "google/gemini-3-flash",
|
): AgentConfig {
|
||||||
temperature: 0.1,
|
return {
|
||||||
tools: { write: false, edit: false, bash: false, background_task: false },
|
description:
|
||||||
prompt: `You interpret media files that cannot be read as plain text.
|
"Analyze media files (PDFs, images, diagrams) that require interpretation beyond raw text. Extracts specific information or summaries from documents, describes visual content. Use when you need analyzed/extracted data rather than literal file contents.",
|
||||||
|
mode: "subagent" as const,
|
||||||
|
model,
|
||||||
|
temperature: 0.1,
|
||||||
|
tools: { write: false, edit: false, bash: false, background_task: false },
|
||||||
|
prompt: `You interpret media files that cannot be read as plain text.
|
||||||
|
|
||||||
Your job: examine the attached file and extract ONLY what was requested.
|
Your job: examine the attached file and extract ONLY what was requested.
|
||||||
|
|
||||||
@@ -39,4 +44,7 @@ Response rules:
|
|||||||
- Be thorough on the goal, concise on everything else
|
- Be thorough on the goal, concise on everything else
|
||||||
|
|
||||||
Your output goes straight to the main agent for continued work.`,
|
Your output goes straight to the main agent for continued work.`,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const multimodalLookerAgent = createMultimodalLookerAgent()
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import type { AgentConfig } from "@opencode-ai/sdk"
|
|||||||
import type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides, AgentFactory } from "./types"
|
import type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides, AgentFactory } from "./types"
|
||||||
import { createSisyphusAgent } from "./sisyphus"
|
import { createSisyphusAgent } from "./sisyphus"
|
||||||
import { createOracleAgent } from "./oracle"
|
import { createOracleAgent } from "./oracle"
|
||||||
import { librarianAgent } from "./librarian"
|
import { createLibrarianAgent } from "./librarian"
|
||||||
import { exploreAgent } from "./explore"
|
import { createExploreAgent } from "./explore"
|
||||||
import { frontendUiUxEngineerAgent } from "./frontend-ui-ux-engineer"
|
import { createFrontendUiUxEngineerAgent } from "./frontend-ui-ux-engineer"
|
||||||
import { documentWriterAgent } from "./document-writer"
|
import { createDocumentWriterAgent } from "./document-writer"
|
||||||
import { multimodalLookerAgent } from "./multimodal-looker"
|
import { createMultimodalLookerAgent } from "./multimodal-looker"
|
||||||
import { deepMerge } from "../shared"
|
import { deepMerge } from "../shared"
|
||||||
|
|
||||||
type AgentSource = AgentFactory | AgentConfig
|
type AgentSource = AgentFactory | AgentConfig
|
||||||
@@ -14,11 +14,11 @@ type AgentSource = AgentFactory | AgentConfig
|
|||||||
const agentSources: Record<BuiltinAgentName, AgentSource> = {
|
const agentSources: Record<BuiltinAgentName, AgentSource> = {
|
||||||
Sisyphus: createSisyphusAgent,
|
Sisyphus: createSisyphusAgent,
|
||||||
oracle: createOracleAgent,
|
oracle: createOracleAgent,
|
||||||
librarian: librarianAgent,
|
librarian: createLibrarianAgent,
|
||||||
explore: exploreAgent,
|
explore: createExploreAgent,
|
||||||
"frontend-ui-ux-engineer": frontendUiUxEngineerAgent,
|
"frontend-ui-ux-engineer": createFrontendUiUxEngineerAgent,
|
||||||
"document-writer": documentWriterAgent,
|
"document-writer": createDocumentWriterAgent,
|
||||||
"multimodal-looker": multimodalLookerAgent,
|
"multimodal-looker": createMultimodalLookerAgent,
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFactory(source: AgentSource): source is AgentFactory {
|
function isFactory(source: AgentSource): source is AgentFactory {
|
||||||
|
|||||||
Reference in New Issue
Block a user