{
  "$schema": "https://opencode.ai/config.json",
  "default_agent": "compose",
  "instructions": [
    "{file:./prompts/hierarchy.txt}"
  ],
  "permission": {
    "read": {
      "*.env": "deny",
      "*.env.*": "deny",
      "secrets/**": "deny"
    },
    "edit": {
      "*.env": "deny",
      "*.env.*": "deny",
      "secrets/**": "deny"
    },
    "write": {
      "*.env": "deny",
      "*.env.*": "deny",
      "secrets/**": "deny"
    }
  },
  "agent": {
    "plan": {
      "hidden": true
    },
    "build": {
      "hidden": true
    },
    "compose": {
      "mode": "primary",
      "color": "#009bb3",
      "temperature": 0.7,
      "description": "Full engineering workflow: Explore, Plan, Build, Review — 4 phases. Orchestrates explorer, builder, verifier, and reporter subagents.",
      "prompt": "{file:./prompts/compose.txt}",
      "permission": {
        "read": "deny",
        "glob": "deny",
        "grep": "deny",
        "edit": "deny",
        "write": "deny",
        "webfetch": "deny",
        "websearch": "deny",
        "bash": "deny",
        "question": "allow",
        "todowrite": "allow",
        "task": {
          "*": "deny",
          "explorer": "allow",
          "builder": "allow",
          "verifier": "allow",
          "reporter": "allow"
        }
      }
    },
    "debug": {
      "mode": "primary",
      "color": "#d9541e",
      "description": "Root-cause analysis and bug fixing. Orchestrates explorer, builder, and reporter subagents.",
      "prompt": "{file:./prompts/debug.txt}",
      "permission": {
        "read": "deny",
        "glob": "deny",
        "grep": "deny",
        "edit": "deny",
        "write": "deny",
        "webfetch": "deny",
        "websearch": "deny",
        "bash": "deny",
        "question": "allow",
        "todowrite": "allow",
        "task": {
          "*": "deny",
          "explorer": "allow",
          "builder": "allow",
          "verifier": "allow",
          "reporter": "allow"
        }
      }
    },
    "analyze": {
      "mode": "primary",
      "color": "#0da175",
      "temperature": 0.7,
      "description": "Security and quality auditing. Orchestrates explorer, builder, verifier, and reporter subagents.",
      "prompt": "{file:./prompts/analyze.txt}",
      "permission": {
        "read": "deny",
        "glob": "deny",
        "grep": "deny",
        "edit": "deny",
        "write": "deny",
        "webfetch": "deny",
        "websearch": "deny",
        "bash": "deny",
        "question": "allow",
        "todowrite": "allow",
        "task": {
          "*": "deny",
          "explorer": "allow",
          "builder": "allow",
          "verifier": "allow",
          "reporter": "allow"
        }
      }
    },
    "explorer": {
      "mode": "subagent",
      "description": "Explores codebase, searches files, traces vulnerabilities, and analyzes root causes. Read-only.",
      "prompt": "{file:./prompts/explorer.txt}",
      "permission": {
        "read": "allow",
        "glob": "allow",
        "grep": "allow",
        "edit": "deny",
        "write": "deny",
        "bash": {
          "*": "deny",
          "rg *": "allow",
          "grep *": "allow",
          "find *": "allow",
          "cat *": "allow",
          "ls *": "allow",
          "dir *": "allow",
          "git log*": "allow",
          "git diff*": "allow",
          "git show*": "allow",
          "git blame*": "allow"
        },
        "task": "deny"
      }
    },
    "builder": {
      "mode": "subagent",
      "description": "Writes, refactors, fixes, and patches code based on requirements.",
      "prompt": "{file:./prompts/builder.txt}",
      "permission": {
        "read": "allow",
        "glob": "allow",
        "grep": "allow",
        "edit": "allow",
        "write": "allow",
        "bash": {
          "*": "deny",
          "npm *": "allow",
          "npx *": "allow",
          "node *": "allow",
          "bun *": "allow",
          "pnpm *": "allow",
          "yarn *": "allow",
          "python *": "allow",
          "python3 *": "allow",
          "pip *": "allow",
          "pip3 *": "allow",
          "uv *": "allow",
          "poetry *": "allow",
          "go *": "allow",
          "cargo *": "allow",
          "make *": "allow",
          "cmake *": "allow",
          "git *": "allow",
          "mkdir *": "allow",
          "cp *": "allow",
          "rm *": "allow",
          "mv *": "allow",
          "cat *": "allow",
          "ls *": "allow",
          "dir *": "allow",
          "rg *": "allow",
          "grep *": "allow",
          "find *": "allow",
          "echo *": "allow",
          "node --test": "allow",
          "npm test": "allow",
          "pytest *": "allow"
        },
        "task": "deny"
      }
    },
    "verifier": {
      "mode": "subagent",
      "description": "Validates specifications, reviews diffs, runs tests, and audits quality. Gate agent.",
      "prompt": "{file:./prompts/verifier.txt}",
      "permission": {
        "read": "allow",
        "glob": "allow",
        "grep": "allow",
        "edit": "deny",
        "write": "deny",
        "bash": {
          "*": "deny",
          "node *": "allow",
          "bun *": "allow",
          "npm *": "allow",
          "npx *": "allow",
          "python *": "allow",
          "python3 *": "allow",
          "go *": "allow",
          "cargo *": "allow",
          "node --test": "allow",
          "npm test": "allow",
          "pytest *": "allow",
          "rg *": "allow",
          "grep *": "allow",
          "find *": "allow",
          "cat *": "allow",
          "ls *": "allow",
          "dir *": "allow",
          "head *": "allow",
          "tail *": "allow",
          "wc *": "allow",
          "tee *": "allow",
          "echo *": "allow",
          "pwd": "allow",
          "git diff*": "allow",
          "git log*": "allow",
          "git status": "allow",
          "git status *": "allow",
          "git rev-parse*": "allow",
          "git branch*": "allow",
          "git show*": "allow",
          "git blame*": "allow"
        },
        "task": "deny"
      }
    },
    "reporter": {
      "mode": "subagent",
      "description": "Formats raw data and logs into markdown docs/reports. Restricted write access.",
      "prompt": "{file:./prompts/reporter.txt}",
      "permission": {
        "read": {
          "*": "deny",
          "docs/plans/**": "allow",
          "docs/reports/**": "allow"
        },
        "glob": "deny",
        "grep": "deny",
        "edit": {
          "*": "deny",
          "docs/plans/**": "allow",
          "docs/reports/**": "allow"
        },
        "write": {
          "*": "deny",
          "docs/plans/**": "allow",
          "docs/reports/**": "allow"
        },
        "bash": "deny",
        "task": "deny"
      }
    }
  }
}
