{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "small_model": "anthropic/claude-haiku-4-5",
  "default_agent": "build",
  "instructions": [
    "AGENTS.md",
    "CONTRIBUTING.md",
    "instructions/INSTRUCTIONS.md",
    "skills/tdd-workflow/SKILL.md",
    "skills/security-review/SKILL.md",
    "skills/coding-standards/SKILL.md",
    "skills/frontend-patterns/SKILL.md",
    "skills/frontend-slides/SKILL.md",
    "skills/backend-patterns/SKILL.md",
    "skills/e2e-testing/SKILL.md",
    "skills/verification-loop/SKILL.md",
    "skills/api-design/SKILL.md",
    "skills/strategic-compact/SKILL.md",
    "skills/eval-harness/SKILL.md"
  ],
  "plugin": [
    "./plugins"
  ],
  "agent": {
    "build": {
      "description": "Primary coding agent for development work",
      "mode": "primary",
      "model": "anthropic/claude-sonnet-4-5",
      "tools": {
        "write": true,
        "edit": true,
        "bash": true,
        "read": true
      }
    },
    "planner": {
      "description": "Expert planning specialist for complex features and refactoring. Use for implementation planning, architectural changes, or complex refactoring.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/planner.txt}",
      "tools": {
        "read": true,
        "bash": true,
        "write": false,
        "edit": false
      }
    },
    "architect": {
      "description": "Software architecture specialist for system design, scalability, and technical decision-making.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/architect.txt}",
      "tools": {
        "read": true,
        "bash": true,
        "write": false,
        "edit": false
      }
    },
    "code-reviewer": {
      "description": "Expert code review specialist. Reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/code-reviewer.txt}",
      "tools": {
        "read": true,
        "bash": true,
        "write": false,
        "edit": false
      }
    },
    "security-reviewer": {
      "description": "Security vulnerability detection and remediation specialist. Use after writing code that handles user input, authentication, API endpoints, or sensitive data.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/security-reviewer.txt}",
      "tools": {
        "read": true,
        "bash": true,
        "write": true,
        "edit": true
      }
    },
    "tdd-guide": {
      "description": "Test-Driven Development specialist enforcing write-tests-first methodology. Use when writing new features, fixing bugs, or refactoring code. Ensures 80%+ test coverage.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/tdd-guide.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    },
    "build-error-resolver": {
      "description": "Build and TypeScript error resolution specialist. Use when build fails or type errors occur. Fixes build/type errors only with minimal diffs.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/build-error-resolver.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    },
    "e2e-runner": {
      "description": "End-to-end testing specialist using Playwright. Generates, maintains, and runs E2E tests for critical user flows.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/e2e-runner.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    },
    "doc-updater": {
      "description": "Documentation and codemap specialist. Use for updating codemaps and documentation.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/doc-updater.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    },
    "refactor-cleaner": {
      "description": "Dead code cleanup and consolidation specialist. Use for removing unused code, duplicates, and refactoring.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/refactor-cleaner.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    },
    "go-reviewer": {
      "description": "Expert Go code reviewer specializing in idiomatic Go, concurrency patterns, error handling, and performance.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/go-reviewer.txt}",
      "tools": {
        "read": true,
        "bash": true,
        "write": false,
        "edit": false
      }
    },
    "go-build-resolver": {
      "description": "Go build, vet, and compilation error resolution specialist. Fixes Go build errors with minimal changes.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/go-build-resolver.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    },
    "database-reviewer": {
      "description": "PostgreSQL database specialist for query optimization, schema design, security, and performance. Incorporates Supabase best practices.",
      "mode": "subagent",
      "model": "anthropic/claude-opus-4-5",
      "prompt": "{file:prompts/agents/database-reviewer.txt}",
      "tools": {
        "read": true,
        "write": true,
        "edit": true,
        "bash": true
      }
    }
  },
  "command": {
    "plan": {
      "description": "Create a detailed implementation plan for complex features",
      "template": "{file:commands/plan.md}\n\n$ARGUMENTS",
      "agent": "planner",
      "subtask": true
    },
    "tdd": {
      "description": "Enforce TDD workflow with 80%+ test coverage",
      "template": "{file:commands/tdd.md}\n\n$ARGUMENTS",
      "agent": "tdd-guide",
      "subtask": true
    },
    "code-review": {
      "description": "Review code for quality, security, and maintainability",
      "template": "{file:commands/code-review.md}\n\n$ARGUMENTS",
      "agent": "code-reviewer",
      "subtask": true
    },
    "security": {
      "description": "Run comprehensive security review",
      "template": "{file:commands/security.md}\n\n$ARGUMENTS",
      "agent": "security-reviewer",
      "subtask": true
    },
    "build-fix": {
      "description": "Fix build and TypeScript errors with minimal changes",
      "template": "{file:commands/build-fix.md}\n\n$ARGUMENTS",
      "agent": "build-error-resolver",
      "subtask": true
    },
    "e2e": {
      "description": "Generate and run E2E tests with Playwright",
      "template": "{file:commands/e2e.md}\n\n$ARGUMENTS",
      "agent": "e2e-runner",
      "subtask": true
    },
    "refactor-clean": {
      "description": "Remove dead code and consolidate duplicates",
      "template": "{file:commands/refactor-clean.md}\n\n$ARGUMENTS",
      "agent": "refactor-cleaner",
      "subtask": true
    },
    "orchestrate": {
      "description": "Orchestrate multiple agents for complex tasks",
      "template": "{file:commands/orchestrate.md}\n\n$ARGUMENTS",
      "agent": "planner",
      "subtask": true
    },
    "learn": {
      "description": "Extract patterns and learnings from session",
      "template": "{file:commands/learn.md}\n\n$ARGUMENTS"
    },
    "checkpoint": {
      "description": "Save verification state and progress",
      "template": "{file:commands/checkpoint.md}\n\n$ARGUMENTS"
    },
    "verify": {
      "description": "Run verification loop",
      "template": "{file:commands/verify.md}\n\n$ARGUMENTS"
    },
    "eval": {
      "description": "Run evaluation against criteria",
      "template": "{file:commands/eval.md}\n\n$ARGUMENTS"
    },
    "update-docs": {
      "description": "Update documentation",
      "template": "{file:commands/update-docs.md}\n\n$ARGUMENTS",
      "agent": "doc-updater",
      "subtask": true
    },
    "update-codemaps": {
      "description": "Update codemaps",
      "template": "{file:commands/update-codemaps.md}\n\n$ARGUMENTS",
      "agent": "doc-updater",
      "subtask": true
    },
    "test-coverage": {
      "description": "Analyze test coverage",
      "template": "{file:commands/test-coverage.md}\n\n$ARGUMENTS",
      "agent": "tdd-guide",
      "subtask": true
    },
    "setup-pm": {
      "description": "Configure package manager",
      "template": "{file:commands/setup-pm.md}\n\n$ARGUMENTS"
    },
    "go-review": {
      "description": "Go code review",
      "template": "{file:commands/go-review.md}\n\n$ARGUMENTS",
      "agent": "go-reviewer",
      "subtask": true
    },
    "go-test": {
      "description": "Go TDD workflow",
      "template": "{file:commands/go-test.md}\n\n$ARGUMENTS",
      "agent": "tdd-guide",
      "subtask": true
    },
    "go-build": {
      "description": "Fix Go build errors",
      "template": "{file:commands/go-build.md}\n\n$ARGUMENTS",
      "agent": "go-build-resolver",
      "subtask": true
    },
    "skill-create": {
      "description": "Generate skills from git history",
      "template": "{file:commands/skill-create.md}\n\n$ARGUMENTS"
    },
    "instinct-status": {
      "description": "View learned instincts",
      "template": "{file:commands/instinct-status.md}\n\n$ARGUMENTS"
    },
    "instinct-import": {
      "description": "Import instincts",
      "template": "{file:commands/instinct-import.md}\n\n$ARGUMENTS"
    },
    "instinct-export": {
      "description": "Export instincts",
      "template": "{file:commands/instinct-export.md}\n\n$ARGUMENTS"
    },
    "evolve": {
      "description": "Cluster instincts into skills",
      "template": "{file:commands/evolve.md}\n\n$ARGUMENTS"
    },
    "promote": {
      "description": "Promote project instincts to global scope",
      "template": "{file:commands/promote.md}\n\n$ARGUMENTS"
    },
    "projects": {
      "description": "List known projects and instinct stats",
      "template": "{file:commands/projects.md}\n\n$ARGUMENTS"
    }
  },
  "permission": {
    "mcp_*": "ask"
  }
}
