diff --git a/.config/opencode/opencode.jsonc b/.config/opencode/opencode.jsonc deleted file mode 100644 index 72bc771..0000000 --- a/.config/opencode/opencode.jsonc +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://opencode.ai/config.json", - "model": "openrouter/deepseek/deepseek-v4-flash", - "small_model": "openrouter/deepseek/deepseek-v4-flash", - "plugin": [ - "opencode-openai-residency", - [ - "opencode-auto-resume", - { - "chunkTimeoutMs": 45000, - "gracePeriodMs": 3000, - "maxRetries": 3, - "subagentWaitMs": 20000, - "checkIntervalMs": 2000 - } - ] - ], - "provider": { - "openai": { - "options": { - "enforce_residency": "us", - "ua_override": true - } - }, - "openrouter": { - "models": { - "z-ai/glm-5.2": { "options": { "provider": { "order": ["Z.AI"], "quantizations": ["fp8"], "allow_fallbacks": false } } }, - "moonshotai/kimi-k3": { "options": { "provider": { "order": ["Moonshot AI"], "quantizations": ["int4"], "allow_fallbacks": false } } }, - "minimax/minimax-m3": { "options": { "provider": { "order": ["DeepInfra"], "quantizations": ["bf16"], "allow_fallbacks": false } } }, - "deepseek/deepseek-v4-pro": { "options": { "provider": { "order": ["SiliconFlow"], "quantizations": ["fp8"], "allow_fallbacks": false } } }, - "deepseek/deepseek-v4-flash": { "options": { "provider": { "order": ["SiliconFlow"], "quantizations": ["fp8"], "allow_fallbacks": false } } } - } - } - }, - "skills": { - "paths": ["~/.agents/skills", "~/.dotfiles/skills", "~/.claude/skills/skillopt"] - }, - "mcp": { - "sequential-thinking": { "type": "local", "command": ["pnpm", "dlx", "@modelcontextprotocol/server-sequential-thinking"], "enabled": true }, - "context7": { "type": "local", "command": ["pnpm", "dlx", "@upstash/context7-mcp"], "enabled": true }, - "playwright": { "type": "local", "command": ["pnpm", "dlx", "@playwright/mcp@latest"], "enabled": true }, - "serena": { "type": "local", "command": ["serena", "start-mcp-server", "--context=claude-code", "--project-from-cwd"], "enabled": true } - }, - "agent": { - "general": { "model": "openrouter/deepseek/deepseek-v4-flash", "textVerbosity": "low" }, - "build": { "model": "openrouter/deepseek/deepseek-v4-flash", "textVerbosity": "low" }, - "plan": { "model": "openrouter/deepseek/deepseek-v4-pro", "textVerbosity": "low" }, - "explore": { "model": "openrouter/deepseek/deepseek-v4-flash", "textVerbosity": "low" }, - "coding": { "model": "openrouter/moonshotai/kimi-k3", "textVerbosity": "low", "description": "Top-quality coding escalation for difficult implementation and refactoring work." }, - "title": { "textVerbosity": "low" }, - "summary": { "textVerbosity": "low" }, - "compaction": { "textVerbosity": "low" } - }, - "lsp": false -} diff --git a/README.md b/README.md index 79c819b..e5e8a7d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This repository contains: - **Shell configurations**: Bash, Zsh, and common shell utilities - **Git configuration**: Global git settings and helpers - **Claude Code integration**: Comprehensive development guidelines and MCP server configurations -- **OpenCode integration**: Portable global config with model routing and quantization preferences +- **OpenCode integration**: Portable custom agents - **Development tools**: Prettier, Stylelint, and other code quality tools ## Quick Start @@ -30,11 +30,9 @@ See **[SETUP-CLAUDE.md](SETUP-CLAUDE.md)** for complete setup instructions. ## OpenCode -`bin/install.sh` links `.config/opencode/opencode.jsonc` to -`~/.config/opencode/opencode.jsonc`. The committed config contains global -model defaults, OpenRouter provider ordering, quantization preferences, MCP -servers, and agent defaults. API keys and other credentials stay in environment -variables or OpenCode's local auth store and are not exported here. +`bin/install.sh` links the custom agents in `.config/opencode/agents/` into +`~/.config/opencode/agents/`. OpenCode configuration, API keys, and credentials +remain local and are not managed by this repository. **Quick links**: - 📖 **[CLAUDE.md](CLAUDE.md)** - Comprehensive development guidelines diff --git a/bin/install-opencode.sh b/bin/install-opencode.sh index 32cc386..9f3c84e 100755 --- a/bin/install-opencode.sh +++ b/bin/install-opencode.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Link the portable OpenCode configuration into its global config location. +# Link portable OpenCode agents into the global agent directory. set -euo pipefail @@ -18,39 +18,9 @@ EOF esac REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -SOURCE="$REPO_ROOT/.config/opencode/opencode.jsonc" -TARGET="$HOME/.config/opencode/opencode.jsonc" AGENT_SOURCE_DIR="$REPO_ROOT/.config/opencode/agents" AGENT_TARGET_DIR="$HOME/.config/opencode/agents" -[[ -f "$SOURCE" ]] || { echo "install-opencode: source missing: $SOURCE" >&2; exit 1; } - -if [[ -L "$TARGET" && "$(readlink "$TARGET")" == "$SOURCE" ]]; then - echo " OpenCode config already linked: $TARGET" - exit 0 -fi - -if [[ -e "$TARGET" || -L "$TARGET" ]]; then - backup="$TARGET.pre-dotfiles" - if [[ -e "$backup" || -L "$backup" ]]; then - echo "install-opencode: refusing to overwrite existing backup: $backup" >&2 - exit 1 - fi - if [[ $DRY_RUN -eq 1 ]]; then - echo " [dry-run] move $TARGET to $backup" - else - mv "$TARGET" "$backup" - fi -fi - -if [[ $DRY_RUN -eq 1 ]]; then - echo " [dry-run] link $SOURCE to $TARGET" -else - mkdir -p "$(dirname "$TARGET")" - ln -s "$SOURCE" "$TARGET" - echo " linked OpenCode config: $TARGET" -fi - if [[ $DRY_RUN -eq 0 ]]; then mkdir -p "$AGENT_TARGET_DIR" fi diff --git a/bin/install.sh b/bin/install.sh index a66c209..0032368 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -3,7 +3,7 @@ # 1. install-runtime-deps.sh — python/gh/git/rg/jq/direnv # 2. install-skills.sh — symlink/copy agent skills from manifest # 3. install-worklog.sh — clone _worklog repo + wire hooks -# 4. install-opencode.sh — link OpenCode config +# 4. install-opencode.sh — link OpenCode agents # 5. doctor.sh — verify # # Refuses Windows-native. WSL2 is the supported Windows path. @@ -126,7 +126,7 @@ else fi echo -echo "=== 4/5 OpenCode config ===" +echo "=== 4/5 OpenCode agents ===" if [[ $DRY_RUN -eq 1 ]]; then echo " [dry-run] would run: bin/install-opencode.sh" else