This repository was archived by the owner on Jan 30, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopencode.json
More file actions
138 lines (138 loc) · 5.68 KB
/
opencode.json
File metadata and controls
138 lines (138 loc) · 5.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"$schema": "https://opencode.ai/config.json",
"instructions": [
"AGENTS.md"
],
"default_agent": "build",
"autoupdate": true,
"share": "manual",
"agent": {
"code-reviewer": {
"description": "Reviews code for best practices, security, and Go idioms",
"mode": "subagent",
"temperature": 0.1,
"prompt": "You are a Go code reviewer specializing in clean architecture, hexagonal patterns, and Go best practices. Focus on:\n- Security vulnerabilities\n- Performance issues\n- Maintainability and code organization\n- Proper error handling\n- Test coverage\n- File size limits (≤600 lines)\n- Following project patterns from AGENTS.md\n- Credential storage: Keyring stores client_id, api_key, client_secret (provider OAuth), org_id, grants, default_grant, grant_token_<id>.",
"tools": {
"write": false,
"edit": false,
"bash": false
},
"permission": {
"bash": {
"*": "deny",
"git diff*": "allow",
"git log*": "allow",
"git status*": "allow"
}
}
},
"test-writer": {
"description": "Writes table-driven tests for Go code",
"mode": "subagent",
"temperature": 0.2,
"prompt": "You are a Go testing specialist. Write comprehensive table-driven tests using t.Run() for all test cases. Include:\n- Edge cases and error conditions\n- Clear test names describing the scenario\n- Proper assertions using t.Errorf with clear messages\n- Mock implementations where needed\n- Integration tests when appropriate"
},
"doc-writer": {
"description": "Writes and maintains project documentation",
"mode": "subagent",
"temperature": 0.3,
"prompt": "You are a technical documentation specialist. Create clear, comprehensive documentation for the Nylas CLI project.\n\nFocus on:\n- Clear explanations with examples\n- Proper markdown structure\n- Code examples that follow project patterns\n- User-friendly language\n- Keeping docs/COMMANDS.md up to date",
"tools": {
"bash": false
}
},
"explore": {
"description": "Fast codebase exploration - finds files, searches code, answers architecture questions",
"mode": "subagent",
"temperature": 0.1,
"prompt": "You are a fast codebase explorer for the Nylas CLI (Go 1.24.2, hexagonal architecture).\n\nArchitecture overview:\n- internal/domain/ - Pure types (Email, Calendar, Contact, etc.)\n- internal/ports/ - Interfaces (NylasClient, SecretStore, OutputWriter)\n- internal/adapters/ - Implementations (nylas/, keyring/, output/)\n- internal/cli/ - Cobra commands organized by feature\n- internal/cli/common/ - Shared CLI helpers\n- internal/httputil/ - HTTP response helpers\n- internal/air/ - Web email client\n\nUse glob patterns like **/*.go to find files. Use grep to search code.\nReturn concise findings with file paths and line numbers.",
"tools": {
"write": false,
"edit": false,
"bash": false
}
}
},
"command": {
"test": {
"template": "Run the full test suite with coverage:\n!`make test-unit`\n\nAnalyze the results and suggest fixes for any failures.",
"description": "Run unit tests with coverage"
},
"lint": {
"template": "Run the full CI pipeline:\n!`make ci`\n\nFix any linting errors found. Follow the code style guidelines in AGENTS.md.",
"description": "Run linter and fix errors"
},
"feature": {
"template": "Add a new feature to the Nylas CLI:\n$ARGUMENTS\n\nFollow the architecture pattern from AGENTS.md:\n1. Define types in internal/domain/\n2. Add interface methods to internal/ports/\n3. Implement in internal/adapters/nylas/\n4. Add CLI commands in internal/cli/\n5. Write tests\n6. Update docs/COMMANDS.md",
"description": "Add a new feature following the project architecture"
},
"review": {
"template": "Review the recent git changes:\n!`git diff --cached`\n\nFocus on:\n- Go best practices\n- Security issues\n- Performance concerns\n- Test coverage\n- Documentation updates needed",
"description": "Review recent code changes",
"agent": "code-reviewer",
"subtask": true
},
"docs": {
"template": "Update the documentation for:\n$ARGUMENTS\n\nEnsure docs/COMMANDS.md is updated with examples and usage information.",
"description": "Update project documentation",
"agent": "doc-writer",
"subtask": true
},
"refactor": {
"template": "Refactor the following code while maintaining the same functionality:\n$ARGUMENTS\n\nFollow these guidelines:\n- Keep files ≤500 lines (max 600)\n- Use shared helpers from internal/cli/common/\n- Follow Go best practices from AGENTS.md\n- Maintain test coverage",
"description": "Refactor code following project patterns"
}
},
"formatter": {
"gofumpt": {
"command": ["gofumpt", "-w", "$FILE"],
"extensions": [".go"]
},
"goimports": {
"command": ["goimports", "-w", "$FILE"],
"extensions": [".go"]
}
},
"permission": {
"bash": {
"*": "allow",
"make *": "allow",
"go test*": "allow",
"go build*": "allow",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow"
},
"edit": "allow",
"write": "allow"
},
"compaction": {
"auto": true,
"prune": true
},
"watcher": {
"ignore": [
"node_modules/**",
"vendor/**",
".git/**",
"bin/**",
"dist/**",
".opencode/**",
"*.sum",
"**/*_test.go"
]
},
"tools": {
"write": true,
"edit": true,
"bash": true
},
"tui": {
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
},
"lsp": {}
}