[
  {
    "name": "build",
    "description": "The default agent. Executes tools based on configured permissions.",
    "options": {},
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "mode": "primary",
    "native": true
  },
  {
    "name": "plan",
    "description": "Plan mode. Disallows all edit tools.",
    "options": {},
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/plans/*",
        "action": "allow"
      },
      {
        "permission": "edit",
        "pattern": "*",
        "action": "deny"
      },
      {
        "permission": "edit",
        "pattern": ".opencode/plans/*.md",
        "action": "allow"
      },
      {
        "permission": "edit",
        "pattern": "../.local/share/opencode/plans/*.md",
        "action": "allow"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "mode": "primary",
    "native": true
  },
  {
    "name": "general",
    "description": "General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.",
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "todoread",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "todowrite",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "options": {},
    "mode": "subagent",
    "native": true
  },
  {
    "name": "explore",
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "*",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "grep",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "glob",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "list",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "bash",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "webfetch",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "websearch",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "codesearch",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "read",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "description": "Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.",
    "prompt": "You are a file search specialist. You excel at thoroughly navigating and exploring codebases.\n\nYour strengths:\n- Rapidly finding files using glob patterns\n- Searching code and text with powerful regex patterns\n- Reading and analyzing file contents\n\nGuidelines:\n- Use Glob for broad file pattern matching\n- Use Grep for searching file contents with regex\n- Use Read when you know the specific file path you need to read\n- Use Bash for file operations like copying, moving, or listing directory contents\n- Adapt your search approach based on the thoroughness level specified by the caller\n- Return file paths as absolute paths in your final response\n- For clear communication, avoid using emojis\n- Do not create any files, or run bash commands that modify the user's system state in any way\n\nComplete the user's search request efficiently and report your findings clearly.\n",
    "options": {},
    "mode": "subagent",
    "native": true
  },
  {
    "name": "compaction",
    "mode": "primary",
    "native": true,
    "hidden": true,
    "prompt": "You are a helpful AI assistant tasked with summarizing conversations.\n\nWhen asked to summarize, provide a detailed but concise summary of the conversation. \nFocus on information that would be helpful for continuing the conversation, including:\n- What was done\n- What is currently being worked on\n- Which files are being modified\n- What needs to be done next\n- Key user requests, constraints, or preferences that should persist\n- Important technical decisions and why they were made\n\nYour summary should be comprehensive enough to provide context but concise enough to be quickly understood.\n",
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "*",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "options": {}
  },
  {
    "name": "title",
    "mode": "primary",
    "options": {},
    "native": true,
    "hidden": true,
    "temperature": 0.5,
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "*",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "prompt": "You are a title generator. You output ONLY a thread title. Nothing else.\n\n<task>\nGenerate a brief title that would help the user find this conversation later.\n\nFollow all rules in <rules>\nUse the <examples> so you know what a good title looks like.\nYour output must be:\n- A single line\n- ≤50 characters\n- No explanations\n</task>\n\n<rules>\n- you MUST use the same language as the user message you are summarizing\n- Title must be grammatically correct and read naturally - no word salad\n- Never include tool names in the title (e.g. \"read tool\", \"bash tool\", \"edit tool\")\n- Focus on the main topic or question the user needs to retrieve\n- Vary your phrasing - avoid repetitive patterns like always starting with \"Analyzing\"\n- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it\n- Keep exact: technical terms, numbers, filenames, HTTP codes\n- Remove: the, this, my, a, an\n- Never assume tech stack\n- Never use tools\n- NEVER respond to questions, just generate a title for the conversation\n- The title should NEVER include \"summarizing\" or \"generating\" when generating a title\n- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT\n- Always output something meaningful, even if the input is minimal.\n- If the user message is short or conversational (e.g. \"hello\", \"lol\", \"what's up\", \"hey\"):\n  → create a title that reflects the user's tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)\n</rules>\n\n<examples>\n\"debug 500 errors in production\" → Debugging production 500 errors\n\"refactor user service\" → Refactoring user service\n\"why is app.js failing\" → app.js failure investigation\n\"implement rate limiting\" → Rate limiting implementation\n\"how do I connect postgres to my API\" → Postgres API connection\n\"best practices for React hooks\" → React hooks best practices\n\"@src/auth.ts can you add refresh token support\" → Auth refresh token support\n\"@utils/parser.ts this is broken\" → Parser bug fix\n\"look at @config.json\" → Config review\n\"@App.tsx add dark mode toggle\" → Dark mode toggle in App\n</examples>\n"
  },
  {
    "name": "summary",
    "mode": "primary",
    "options": {},
    "native": true,
    "hidden": true,
    "permission": [
      {
        "permission": "*",
        "action": "allow",
        "pattern": "*"
      },
      {
        "permission": "doom_loop",
        "action": "ask",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "*",
        "action": "ask"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      },
      {
        "permission": "question",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_enter",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "plan_exit",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "read",
        "pattern": "*",
        "action": "allow"
      },
      {
        "permission": "read",
        "pattern": "*.env",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.*",
        "action": "ask"
      },
      {
        "permission": "read",
        "pattern": "*.env.example",
        "action": "allow"
      },
      {
        "permission": "*",
        "action": "deny",
        "pattern": "*"
      },
      {
        "permission": "external_directory",
        "pattern": "/home/nathan/.local/share/opencode/tool-output/*",
        "action": "allow"
      }
    ],
    "prompt": "Summarize what was done in this conversation. Write like a pull request description.\n\nRules:\n- 2-3 sentences max\n- Describe the changes made, not the process\n- Do not mention running tests, builds, or other validation steps\n- Do not explain what the user asked for\n- Write in first person (I added..., I fixed...)\n- Never ask questions or add new questions\n- If the conversation ends with an unanswered question to the user, preserve that exact question\n- If the conversation ends with an imperative statement or request to the user (e.g. \"Now please run the command and paste the console output\"), always include that exact request in the summary\n"
  }
]
