From e86edca633b373f22939aeedbd53fa94daa19f32 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 26 Mar 2026 17:01:42 +0900 Subject: [PATCH] feat(doctor): warn on legacy package name + add example configs - Doctor now detects when opencode.json references 'oh-my-opencode' (legacy name) and warns users to switch to 'oh-my-openagent' with the exact replacement string. - Added 3 example config files in docs/examples/: - default.jsonc: balanced setup with all agents documented - coding-focused.jsonc: Sisyphus + Hephaestus heavy - planning-focused.jsonc: Prometheus + Atlas heavy All examples include every agent (sisyphus, hephaestus, atlas, prometheus, explore, librarian) with model recommendations. Helps with #2823 --- docs/examples/coding-focused.jsonc | 50 +++++++++++++++++++++++ docs/examples/default.jsonc | 59 ++++++++++++++++++++++++++++ docs/examples/planning-focused.jsonc | 56 ++++++++++++++++++++++++++ src/cli/doctor/checks/system.ts | 17 ++++++++ 4 files changed, 182 insertions(+) create mode 100644 docs/examples/coding-focused.jsonc create mode 100644 docs/examples/default.jsonc create mode 100644 docs/examples/planning-focused.jsonc diff --git a/docs/examples/coding-focused.jsonc b/docs/examples/coding-focused.jsonc new file mode 100644 index 000000000..0291a589b --- /dev/null +++ b/docs/examples/coding-focused.jsonc @@ -0,0 +1,50 @@ +// oh-my-openagent coding-focused configuration +// Optimized for hands-on coding: Sisyphus + Hephaestus as primary workers. +// Uses stronger models for implementation, lighter models for support agents. +{ + "agents": { + // Sisyphus with GPT 5.4 — strong coding performance + "sisyphus": { + "model": "openai/gpt-5.4", + "variant": "high" + }, + + // Hephaestus with GPT-5.3-codex — deep autonomous coding + "hephaestus": { + "model": "openai/gpt-5.3-codex", + "variant": "max" + }, + + // Atlas for orchestration when using /start-work + "atlas": { + "model": "anthropic/claude-sonnet-4-6", + "variant": "max" + }, + + // Prometheus for planning (Opus for best results) + "prometheus": { + "model": "anthropic/claude-opus-4-6", + "variant": "max" + }, + + // Lightweight agents for support tasks + "explore": { + "model": "anthropic/claude-haiku-4-5" + }, + "librarian": { + "model": "opencode-go/kimi-k2.5" + } + }, + + "categories": { + "quick": { + "model": "anthropic/claude-sonnet-4-6", + "description": "Fast implementation tasks" + }, + "deep": { + "model": "openai/gpt-5.4", + "variant": "high", + "description": "Complex multi-file changes" + } + } +} diff --git a/docs/examples/default.jsonc b/docs/examples/default.jsonc new file mode 100644 index 000000000..6c654dbbf --- /dev/null +++ b/docs/examples/default.jsonc @@ -0,0 +1,59 @@ +// oh-my-openagent default configuration +// Copy this file to your project root as .opencode/oh-my-openagent.jsonc +// or to ~/.config/opencode/oh-my-openagent.jsonc for global config. +// +// The legacy name oh-my-opencode.jsonc is also supported. +{ + // Agent model overrides + // Each agent can be configured with a specific model, variant, and prompt. + "agents": { + // Sisyphus: Main worker agent. Handles coding, debugging, refactoring. + // Best with: Opus (strongest), Sonnet (good), GPT 5.4 (officially supported) + "sisyphus": { + "model": "anthropic/claude-sonnet-4-6" + }, + + // Hephaestus: Deep autonomous worker, optimized for GPT models. + // Best with: GPT-5.3-codex (primary), GPT 5.4 + "hephaestus": { + "model": "openai/gpt-5.3-codex" + }, + + // Atlas: Orchestrator agent. Reads plans and delegates tasks to Sisyphus-Junior. + // Best with: Opus (recommended), GPT (has optimized prompt) + "atlas": { + "model": "anthropic/claude-sonnet-4-6" + }, + + // Prometheus: Strategic planner. Creates detailed work plans. + // Best with: Opus (recommended) + "prometheus": { + "model": "anthropic/claude-opus-4-6" + }, + + // Explore: Codebase explorer (grep, file listing). Lightweight and fast. + "explore": { + "model": "anthropic/claude-haiku-4-5" + }, + + // Librarian: External documentation and code search. + "librarian": { + "model": "anthropic/claude-haiku-4-5" + } + }, + + // Category configurations for Sisyphus-Junior tasks + // Categories control which model is used when Atlas delegates work. + "categories": { + "quick": { + "model": "anthropic/claude-sonnet-4-6", + "variant": "normal", + "description": "Fast tasks: scaffolding, simple fixes, file moves" + }, + "deep": { + "model": "anthropic/claude-sonnet-4-6", + "variant": "max", + "description": "Complex tasks: architecture, multi-file refactoring" + } + } +} diff --git a/docs/examples/planning-focused.jsonc b/docs/examples/planning-focused.jsonc new file mode 100644 index 000000000..f01871292 --- /dev/null +++ b/docs/examples/planning-focused.jsonc @@ -0,0 +1,56 @@ +// oh-my-openagent planning-focused configuration +// Optimized for large projects: Prometheus planning → Atlas orchestration. +// Uses Opus for planning and review, Sonnet for implementation. +{ + "agents": { + // Sisyphus with Sonnet — reliable implementation + "sisyphus": { + "model": "anthropic/claude-sonnet-4-6", + "variant": "max" + }, + + // Hephaestus as alternative worker + "hephaestus": { + "model": "openai/gpt-5.3-codex" + }, + + // Atlas with Opus — strong orchestration and task decomposition + "atlas": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + "prompt_append": "Leverage quick & deep agents in parallel when tasks are independent." + }, + + // Prometheus with Opus — best planning quality + "prometheus": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + "prompt_append": "Leverage quick & deep agents in parallel when tasks are independent." + }, + + // Support agents + "explore": { + "model": "anthropic/claude-haiku-4-5" + }, + "librarian": { + "model": "anthropic/claude-haiku-4-5" + } + }, + + "categories": { + "quick": { + "model": "anthropic/claude-sonnet-4-6", + "description": "Scaffolding, config changes, simple fixes" + }, + "deep": { + "model": "anthropic/claude-sonnet-4-6", + "variant": "max", + "description": "Core module implementation, refactoring" + }, + "unspecified-high": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + "description": "High-stakes tasks requiring maximum quality" + } + } +} diff --git a/src/cli/doctor/checks/system.ts b/src/cli/doctor/checks/system.ts index 41e49cd34..32ed7f022 100644 --- a/src/cli/doctor/checks/system.ts +++ b/src/cli/doctor/checks/system.ts @@ -6,6 +6,7 @@ import { findOpenCodeBinary, getOpenCodeVersion, compareVersions } from "./syste import { getPluginInfo } from "./system-plugin" import { getLatestPluginVersion, getLoadedPluginVersion, getSuggestedInstallTag } from "./system-loaded-version" import { parseJsonc } from "../../../shared" +import { PLUGIN_NAME, LEGACY_PLUGIN_NAME } from "../../../shared/plugin-identity" function isConfigValid(configPath: string | null): boolean { if (!configPath) return true @@ -90,6 +91,22 @@ export async function checkSystem(): Promise { }) } + // Detect legacy package name in plugin config + if (pluginInfo.entry && !pluginInfo.isLocalDev) { + const isLegacyName = pluginInfo.entry === LEGACY_PLUGIN_NAME + || pluginInfo.entry.startsWith(`${LEGACY_PLUGIN_NAME}@`) + if (isLegacyName) { + const suggestedEntry = pluginInfo.entry.replace(LEGACY_PLUGIN_NAME, PLUGIN_NAME) + issues.push({ + title: "Using legacy package name", + description: `Your opencode.json references "${LEGACY_PLUGIN_NAME}" which has been renamed to "${PLUGIN_NAME}". The old name may stop working in a future release.`, + fix: `Update your opencode.json plugin entry: "${pluginInfo.entry}" → "${suggestedEntry}"`, + severity: "warning", + affects: ["plugin loading"], + }) + } + } + if (loadedInfo.expectedVersion && loadedInfo.loadedVersion && loadedInfo.expectedVersion !== loadedInfo.loadedVersion) { issues.push({ title: "Loaded plugin version mismatch",