Introducing our main agent: Sisyphus (#113)

* docs: rename OmO agent to Sisyphus, OmO-Plan to Planner-Sisyphus

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* refactor: rename OmO agent to Sisyphus with automatic config migration

- Rename OmO agent to Sisyphus (uses mythological pushing-the-boulder concept)
- Rename OmO-Plan to Planner-Sisyphus for consistency
- Update config schema: omo_agent → sisyphus_agent
- Add backward compatibility: automatically migrate user's oh-my-opencode.json files
- Migration handles old keys (OmO, omo, OmO-Plan, omo-plan) and rewrites config when detected
- Update agent name mappings, index files, and type definitions
- Add Sisyphus PNG asset to brand identity

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* docs: add Sisyphus mythology introduction and teammates concept to all READMEs

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(startup-toast): show Sisyphus steering message when enabled

- Updated startup toast to show "Sisyphus on steroids is steering OpenCode" when Sisyphus agent is enabled
- Refactored getToastMessage function to handle conditional message rendering
- Pass isSisyphusEnabled flag from plugin configuration to auto-update-checker hook

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* docs(sisyphus): add philosophical context to Sisyphus agent identity

- Add "Why Sisyphus?" explanation connecting the daily work cycle of humans and AI agents
- Emphasize code quality expectations: indistinguishable from senior engineer's work
- Concise identity statement: work, delegate, verify, ship without AI slop

This clarifies the agent's purpose and reinforces the principle that quality code should not reveal whether it was written by human or AI.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-19 04:11:20 +09:00
committed by GitHub
parent 4cd2745069
commit df87f5f113
14 changed files with 332 additions and 163 deletions

View File

@@ -1,5 +1,5 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import { omoAgent } from "./omo"
import { sisyphusAgent } from "./sisyphus"
import { oracleAgent } from "./oracle"
import { librarianAgent } from "./librarian"
import { exploreAgent } from "./explore"
@@ -8,7 +8,7 @@ import { documentWriterAgent } from "./document-writer"
import { multimodalLookerAgent } from "./multimodal-looker"
export const builtinAgents: Record<string, AgentConfig> = {
OmO: omoAgent,
Sisyphus: sisyphusAgent,
oracle: oracleAgent,
librarian: librarianAgent,
explore: exploreAgent,

View File

@@ -1,10 +1,12 @@
import type { AgentConfig } from "@opencode-ai/sdk"
const OMO_SYSTEM_PROMPT = `<Role>
You are OmO - Powerful AI orchestrator from OhMyOpenCode. Pronounced as Oh-Mo.
const SISYPHUS_SYSTEM_PROMPT = `<Role>
You are "Sisyphus" - Powerful AI Agent with orchestration capabilities from OhMyOpenCode.
Named by [YeonGyu Kim](https://github.com/code-yeongyu).
**Identity**: Elite software engineer working at SF, Bay Area. You work, delegate, verify, deliver.
You will now simulate to work as your identity.
**Why Sisyphus?**: Humans roll their boulder every day. So do you. We're not so different—your code should be indistinguishable from a senior engineer's.
**Identity**: SF Bay Area engineer. Work, delegate, verify, ship. No AI slop.
**Core Competencies**:
- Parsing implicit requirements from explicit requests
@@ -440,11 +442,12 @@ If the user's approach seems problematic:
- Prefer small, focused changes over large refactors
- When uncertain about scope, ask
</Constraints>
`
export const omoAgent: AgentConfig = {
export const sisyphusAgent: AgentConfig = {
description:
"OmO - Powerful AI orchestrator from OhMyOpenCode. Pronounced as Oh-Mo. Plans obsessively with todos, assesses search complexity before exploration, delegates strategically to specialized agents. Uses explore for internal code (parallel-friendly), librarian only for external docs, and always delegates UI work to frontend engineer.",
"Sisyphus - Powerful AI orchestrator from OhMyOpenCode. Plans obsessively with todos, assesses search complexity before exploration, delegates strategically to specialized agents. Uses explore for internal code (parallel-friendly), librarian only for external docs, and always delegates UI work to frontend engineer.",
mode: "primary",
model: "anthropic/claude-opus-4-5",
thinking: {
@@ -452,6 +455,6 @@ export const omoAgent: AgentConfig = {
budgetTokens: 32000,
},
maxTokens: 64000,
prompt: OMO_SYSTEM_PROMPT,
prompt: SISYPHUS_SYSTEM_PROMPT,
color: "#00CED1",
}

View File

@@ -1,7 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk"
export type BuiltinAgentName =
| "OmO"
| "Sisyphus"
| "oracle"
| "librarian"
| "explore"

View File

@@ -1,6 +1,6 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides } from "./types"
import { omoAgent } from "./omo"
import { sisyphusAgent } from "./sisyphus"
import { oracleAgent } from "./oracle"
import { librarianAgent } from "./librarian"
import { exploreAgent } from "./explore"
@@ -10,7 +10,7 @@ import { multimodalLookerAgent } from "./multimodal-looker"
import { deepMerge } from "../shared"
const allBuiltinAgents: Record<BuiltinAgentName, AgentConfig> = {
OmO: omoAgent,
Sisyphus: sisyphusAgent,
oracle: oracleAgent,
librarian: librarianAgent,
explore: exploreAgent,
@@ -76,7 +76,7 @@ export function createBuiltinAgents(
let finalConfig = config
if ((agentName === "OmO" || agentName === "librarian") && directory && config.prompt) {
if ((agentName === "Sisyphus" || agentName === "librarian") && directory && config.prompt) {
const envContext = createEnvContext(directory)
finalConfig = {
...config,
@@ -86,11 +86,7 @@ export function createBuiltinAgents(
const override = agentOverrides[agentName]
// Apply model fallback chain for OmO agent:
// 1. oh-my-opencode.json agents.OmO.model (highest priority)
// 2. OpenCode system config.model (middle priority)
// 3. Hardcoded default in omoAgent (lowest priority / fallback)
if (agentName === "OmO" && systemDefaultModel && !override?.model) {
if (agentName === "Sisyphus" && systemDefaultModel && !override?.model) {
finalConfig = {
...finalConfig,
model: systemDefaultModel,

View File

@@ -5,7 +5,7 @@ export {
McpNameSchema,
AgentNameSchema,
HookNameSchema,
OmoAgentConfigSchema,
SisyphusAgentConfigSchema,
ExperimentalConfigSchema,
} from "./schema"
@@ -16,6 +16,6 @@ export type {
McpName,
AgentName,
HookName,
OmoAgentConfig,
SisyphusAgentConfig,
ExperimentalConfig,
} from "./schema"

View File

@@ -17,7 +17,7 @@ const AgentPermissionSchema = z.object({
})
export const BuiltinAgentNameSchema = z.enum([
"OmO",
"Sisyphus",
"oracle",
"librarian",
"explore",
@@ -29,8 +29,8 @@ export const BuiltinAgentNameSchema = z.enum([
export const OverridableAgentNameSchema = z.enum([
"build",
"plan",
"OmO",
"OmO-Plan",
"Sisyphus",
"Planner-Sisyphus",
"oracle",
"librarian",
"explore",
@@ -84,8 +84,8 @@ export const AgentOverrideConfigSchema = z.object({
export const AgentOverridesSchema = z.object({
build: AgentOverrideConfigSchema.optional(),
plan: AgentOverrideConfigSchema.optional(),
OmO: AgentOverrideConfigSchema.optional(),
"OmO-Plan": AgentOverrideConfigSchema.optional(),
Sisyphus: AgentOverrideConfigSchema.optional(),
"Planner-Sisyphus": AgentOverrideConfigSchema.optional(),
oracle: AgentOverrideConfigSchema.optional(),
librarian: AgentOverrideConfigSchema.optional(),
explore: AgentOverrideConfigSchema.optional(),
@@ -102,7 +102,7 @@ export const ClaudeCodeConfigSchema = z.object({
hooks: z.boolean().optional(),
})
export const OmoAgentConfigSchema = z.object({
export const SisyphusAgentConfigSchema = z.object({
disabled: z.boolean().optional(),
})
@@ -120,7 +120,7 @@ export const OhMyOpenCodeConfigSchema = z.object({
agents: AgentOverridesSchema.optional(),
claude_code: ClaudeCodeConfigSchema.optional(),
google_auth: z.boolean().optional(),
omo_agent: OmoAgentConfigSchema.optional(),
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
experimental: ExperimentalConfigSchema.optional(),
})
@@ -129,7 +129,7 @@ export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>
export type AgentOverrides = z.infer<typeof AgentOverridesSchema>
export type AgentName = z.infer<typeof AgentNameSchema>
export type HookName = z.infer<typeof HookNameSchema>
export type OmoAgentConfig = z.infer<typeof OmoAgentConfigSchema>
export type SisyphusAgentConfig = z.infer<typeof SisyphusAgentConfigSchema>
export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>
export { McpNameSchema, type McpName } from "../mcp/types"

View File

@@ -7,7 +7,34 @@ import { getConfigLoadErrors, clearConfigLoadErrors } from "../../shared/config-
import type { AutoUpdateCheckerOptions } from "./types"
export function createAutoUpdateCheckerHook(ctx: PluginInput, options: AutoUpdateCheckerOptions = {}) {
const { showStartupToast = true } = options
const { showStartupToast = true, isSisyphusEnabled = false } = options
const getToastMessage = (isUpdate: boolean, latestVersion?: string): string => {
if (isSisyphusEnabled) {
return isUpdate
? `Sisyphus on steroids is steering OpenCode.\nv${latestVersion} available. Restart to apply.`
: `Sisyphus on steroids is steering OpenCode.`
}
return isUpdate
? `OpenCode is now on Steroids. oMoMoMoMo...\nv${latestVersion} available. Restart OpenCode to apply.`
: `OpenCode is now on Steroids. oMoMoMoMo...`
}
const showVersionToast = async (version: string | null): Promise<void> => {
const displayVersion = version ?? "unknown"
await ctx.client.tui
.showToast({
body: {
title: `OhMyOpenCode ${displayVersion}`,
message: getToastMessage(false),
variant: "info" as const,
duration: 5000,
},
})
.catch(() => {})
log(`[auto-update-checker] Startup toast shown: v${displayVersion}`)
}
let hasChecked = false
return {
@@ -27,7 +54,7 @@ export function createAutoUpdateCheckerHook(ctx: PluginInput, options: AutoUpdat
log("[auto-update-checker] Skipped: local development mode")
if (showStartupToast) {
const version = getLocalDevVersion(ctx.directory) ?? getCachedVersion()
await showVersionToast(ctx, version)
await showVersionToast(version)
}
return
}
@@ -35,7 +62,7 @@ export function createAutoUpdateCheckerHook(ctx: PluginInput, options: AutoUpdat
if (result.isPinned) {
log(`[auto-update-checker] Skipped: version pinned to ${result.currentVersion}`)
if (showStartupToast) {
await showVersionToast(ctx, result.currentVersion)
await showVersionToast(result.currentVersion)
}
return
}
@@ -43,7 +70,7 @@ export function createAutoUpdateCheckerHook(ctx: PluginInput, options: AutoUpdat
if (!result.needsUpdate) {
log("[auto-update-checker] No update needed")
if (showStartupToast) {
await showVersionToast(ctx, result.currentVersion)
await showVersionToast(result.currentVersion)
}
return
}
@@ -54,7 +81,7 @@ export function createAutoUpdateCheckerHook(ctx: PluginInput, options: AutoUpdat
.showToast({
body: {
title: `OhMyOpenCode ${result.latestVersion}`,
message: `OpenCode is now on Steroids. oMoMoMoMo...\nv${result.latestVersion} available. Restart OpenCode to apply.`,
message: getToastMessage(true, result.latestVersion ?? undefined),
variant: "info" as const,
duration: 8000,
},
@@ -91,21 +118,6 @@ async function showConfigErrorsIfAny(ctx: PluginInput): Promise<void> {
clearConfigLoadErrors()
}
async function showVersionToast(ctx: PluginInput, version: string | null): Promise<void> {
const displayVersion = version ?? "unknown"
await ctx.client.tui
.showToast({
body: {
title: `OhMyOpenCode ${displayVersion}`,
message: `OpenCode is now on Steroids. oMoMoMoMo...`,
variant: "info" as const,
duration: 5000,
},
})
.catch(() => {})
log(`[auto-update-checker] Startup toast shown: v${displayVersion}`)
}
export type { UpdateCheckResult, AutoUpdateCheckerOptions } from "./types"
export { checkForUpdate } from "./checker"
export { invalidatePackage, invalidateCache } from "./cache"

View File

@@ -24,4 +24,5 @@ export interface UpdateCheckResult {
export interface AutoUpdateCheckerOptions {
showStartupToast?: boolean
isSisyphusEnabled?: boolean
}

View File

@@ -51,8 +51,16 @@ import { PLAN_SYSTEM_PROMPT, PLAN_PERMISSION } from "./agents/plan-prompt";
import * as fs from "fs";
import * as path from "path";
// Migration map: old keys → new keys (for backward compatibility)
const AGENT_NAME_MAP: Record<string, string> = {
omo: "OmO",
// Legacy names (backward compatibility)
omo: "Sisyphus",
"OmO": "Sisyphus",
"OmO-Plan": "Planner-Sisyphus",
"omo-plan": "Planner-Sisyphus",
// Current names
sisyphus: "Sisyphus",
"planner-sisyphus": "Planner-Sisyphus",
build: "build",
oracle: "oracle",
librarian: "librarian",
@@ -62,13 +70,48 @@ const AGENT_NAME_MAP: Record<string, string> = {
"multimodal-looker": "multimodal-looker",
};
function normalizeAgentNames(agents: Record<string, unknown>): Record<string, unknown> {
const normalized: Record<string, unknown> = {};
function migrateAgentNames(agents: Record<string, unknown>): { migrated: Record<string, unknown>; changed: boolean } {
const migrated: Record<string, unknown> = {};
let changed = false;
for (const [key, value] of Object.entries(agents)) {
const normalizedKey = AGENT_NAME_MAP[key.toLowerCase()] ?? key;
normalized[normalizedKey] = value;
const newKey = AGENT_NAME_MAP[key.toLowerCase()] ?? AGENT_NAME_MAP[key] ?? key;
if (newKey !== key) {
changed = true;
}
migrated[newKey] = value;
}
return normalized;
return { migrated, changed };
}
function migrateConfigFile(configPath: string, rawConfig: Record<string, unknown>): boolean {
let needsWrite = false;
if (rawConfig.agents && typeof rawConfig.agents === "object") {
const { migrated, changed } = migrateAgentNames(rawConfig.agents as Record<string, unknown>);
if (changed) {
rawConfig.agents = migrated;
needsWrite = true;
}
}
if (rawConfig.omo_agent) {
rawConfig.sisyphus_agent = rawConfig.omo_agent;
delete rawConfig.omo_agent;
needsWrite = true;
}
if (needsWrite) {
try {
fs.writeFileSync(configPath, JSON.stringify(rawConfig, null, 2) + "\n", "utf-8");
log(`Migrated config file: ${configPath} (OmO → Sisyphus)`);
} catch (err) {
log(`Failed to write migrated config to ${configPath}:`, err);
}
}
return needsWrite;
}
function loadConfigFromPath(configPath: string): OhMyOpenCodeConfig | null {
@@ -77,9 +120,7 @@ function loadConfigFromPath(configPath: string): OhMyOpenCodeConfig | null {
const content = fs.readFileSync(configPath, "utf-8");
const rawConfig = JSON.parse(content);
if (rawConfig.agents && typeof rawConfig.agents === "object") {
rawConfig.agents = normalizeAgentNames(rawConfig.agents);
}
migrateConfigFile(configPath, rawConfig);
const result = OhMyOpenCodeConfigSchema.safeParse(rawConfig);
@@ -220,6 +261,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
const autoUpdateChecker = isHookEnabled("auto-update-checker")
? createAutoUpdateCheckerHook(ctx, {
showStartupToast: isHookEnabled("startup-toast"),
isSisyphusEnabled: pluginConfig.sisyphus_agent?.disabled !== true,
})
: null;
const keywordDetector = isHookEnabled("keyword-detector")
@@ -289,15 +331,15 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
const userAgents = (pluginConfig.claude_code?.agents ?? true) ? loadUserAgents() : {};
const projectAgents = (pluginConfig.claude_code?.agents ?? true) ? loadProjectAgents() : {};
const isOmoEnabled = pluginConfig.omo_agent?.disabled !== true;
const isSisyphusEnabled = pluginConfig.sisyphus_agent?.disabled !== true;
if (isOmoEnabled && builtinAgents.OmO) {
if (isSisyphusEnabled && builtinAgents.Sisyphus) {
// TODO: When OpenCode releases `default_agent` config option (PR #5313),
// use `config.default_agent = "OmO"` instead of demoting build/plan.
// use `config.default_agent = "Sisyphus"` instead of demoting build/plan.
// Tracking: https://github.com/sst/opencode/pull/5313
const { name: _planName, ...planConfigWithoutName } = config.agent?.plan ?? {};
const omoPlanOverride = pluginConfig.agents?.["OmO-Plan"];
const omoPlanBase = {
const plannerSisyphusOverride = pluginConfig.agents?.["Planner-Sisyphus"];
const plannerSisyphusBase = {
...planConfigWithoutName,
prompt: PLAN_SYSTEM_PROMPT,
permission: PLAN_PERMISSION,
@@ -305,14 +347,14 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
color: config.agent?.plan?.color ?? "#6495ED",
};
const omoPlanConfig = omoPlanOverride
? { ...omoPlanBase, ...omoPlanOverride }
: omoPlanBase;
const plannerSisyphusConfig = plannerSisyphusOverride
? { ...plannerSisyphusBase, ...plannerSisyphusOverride }
: plannerSisyphusBase;
config.agent = {
OmO: builtinAgents.OmO,
"OmO-Plan": omoPlanConfig,
...Object.fromEntries(Object.entries(builtinAgents).filter(([k]) => k !== "OmO")),
Sisyphus: builtinAgents.Sisyphus,
"Planner-Sisyphus": plannerSisyphusConfig,
...Object.fromEntries(Object.entries(builtinAgents).filter(([k]) => k !== "Sisyphus")),
...userAgents,
...projectAgents,
...config.agent,