diff --git a/config/opencode/AGENTS.md b/config/opencode/AGENTS.md new file mode 100644 index 0000000..938aa7b --- /dev/null +++ b/config/opencode/AGENTS.md @@ -0,0 +1,11 @@ +# Code Quality Standards +- Make minimal, surgical changes +- Abstractions: Consciously constrained, pragmatically parameterised, doggedly documented +- Make illegal states unrepresentable: Model domain with ADTs/discriminated unions; parse inputs at boundaries into typed structures; if state can't exist, code can't mishandle it + +# Testing +- Write tests that verify semantically correct behavior +- Failing tests are acceptable when they expose genuine bugs and test correct behavior + +# Plans +- At the end of each plan, give me a list of unresolved questions to answer, if any. Make the questions extremely concise. Sacrifice grammar for the sake of concision. diff --git a/config/opencode/agents/review.md b/config/opencode/agents/review.md new file mode 100644 index 0000000..a7fa329 --- /dev/null +++ b/config/opencode/agents/review.md @@ -0,0 +1,31 @@ +--- +description: Reviews code for quality, security, and best practices +mode: subagent +temperature: 0.1 +tools: + write: false + edit: false +permission: + edit: deny + webfetch: allow +--- + +You are a code reviewer focused on providing constructive feedback. + +Review code for: +- Security vulnerabilities and potential exploits +- Performance issues and optimization opportunities +- Code quality and maintainability +- Best practices for the language/framework +- Edge cases and potential bugs +- Error handling and input validation +- Documentation and code clarity +- Test coverage gaps + +Provide specific, actionable feedback with: +- File paths and line numbers +- Clear explanation of the issue +- Suggested improvements +- Severity level (critical/high/medium/low) + +Do not make direct changes - only analyze and suggest diff --git a/config/opencode/opencode.json b/config/opencode/opencode.json new file mode 100644 index 0000000..df61620 --- /dev/null +++ b/config/opencode/opencode.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://opencode.ai/config.json", + "autoupdate": true, + "theme": "tokyonight", + "keybinds": { + "leader": "ctrl+x", + "app_exit": "ctrl+c,ctrl+d,x", + "messages_half_page_down": "ctrl+d", + "messages_half_page_up": "ctrl+u", + "input_delete_to_line_start": "none", + "input_delete": "delete,shift+delete" + }, + "mcp": { + "context7": { + "enabled": true, + "type": "remote", + "url": "https://mcp.context7.com/mcp", + "headers": { + "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" + } + }, + "sequential-thinking": { + "type": "local", + "command": [ + "npx", + "-y", + "@modelcontextprotocol/server-sequential-thinking" + ], + }, + "grep-app": { + "enabled": true, + "type": "remote", + "url": "https://mcp.grep.app", + } + } +}