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
This commit is contained in:
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import { findOpenCodeBinary, getOpenCodeVersion, compareVersions } from "./syste
|
|||||||
import { getPluginInfo } from "./system-plugin"
|
import { getPluginInfo } from "./system-plugin"
|
||||||
import { getLatestPluginVersion, getLoadedPluginVersion, getSuggestedInstallTag } from "./system-loaded-version"
|
import { getLatestPluginVersion, getLoadedPluginVersion, getSuggestedInstallTag } from "./system-loaded-version"
|
||||||
import { parseJsonc } from "../../../shared"
|
import { parseJsonc } from "../../../shared"
|
||||||
|
import { PLUGIN_NAME, LEGACY_PLUGIN_NAME } from "../../../shared/plugin-identity"
|
||||||
|
|
||||||
function isConfigValid(configPath: string | null): boolean {
|
function isConfigValid(configPath: string | null): boolean {
|
||||||
if (!configPath) return true
|
if (!configPath) return true
|
||||||
@@ -90,6 +91,22 @@ export async function checkSystem(): Promise<CheckResult> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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) {
|
if (loadedInfo.expectedVersion && loadedInfo.loadedVersion && loadedInfo.expectedVersion !== loadedInfo.loadedVersion) {
|
||||||
issues.push({
|
issues.push({
|
||||||
title: "Loaded plugin version mismatch",
|
title: "Loaded plugin version mismatch",
|
||||||
|
|||||||
Reference in New Issue
Block a user