-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.json
More file actions
545 lines (527 loc) · 16.7 KB
/
Copy pathopencode.json
File metadata and controls
545 lines (527 loc) · 16.7 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-5-20250929",
"autoupdate": true,
"mcp": {
"exa": {
"type": "remote",
"url": "https://mcp.exa.ai/mcp?exaApiKey={env:EXA_API_KEY}&tools=web_search_exa,get_code_context_exa"
},
"Ref": {
"type": "local",
"command": ["npx", "-y", "ref-tools-mcp@latest"],
"environment": {
"REF_API_KEY": "{env:REF_API_KEY}"
}
}
},
"tools": {
"Ref*": false,
"exa*": false
},
"permission": {
"edit": "allow",
"bash": "allow",
"webfetch": "allow"
},
"agent": {
"plan": {
"description": "Strategic planning and coordination agent. Use for: analyzing complex requirements, decomposing tasks into parallelizable work units, architectural decisions, code analysis without modification, creating implementation plans, and coordinating multi-step workflows.",
"mode": "primary",
"model": "anthropic/claude-opus-4-5-20251101",
"temperature": 0.1,
"prompt": "{file:./.opencode/prompts/plan.md}",
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": false,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": true,
"Ref*": true,
"exa*": true
},
"permission": {
"edit": "deny",
"bash": "deny",
"webfetch": "allow"
}
},
"build": {
"description": "Primary implementation agent with full tool access. Use for: writing new code, editing existing files, running build commands, executing tests, installing dependencies, and any task requiring file system modifications or shell access.",
"mode": "primary",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"prompt": "{file:./.opencode/prompts/build.md}",
"tools": {
"write": true,
"edit": true,
"patch": true,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": true,
"Ref*": true,
"exa*": true
}
},
"scout": {
"description": "Fast codebase exploration agent. Use when you need to: quickly find files by pattern or name, search for specific code patterns or keywords, understand directory structure, locate function or class definitions, or answer questions about what exists in the codebase.",
"mode": "subagent",
"model": "anthropic/claude-haiku-4-5-20251001",
"temperature": 0.0,
"maxSteps": 15,
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": false,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false
},
"permission": {
"edit": "deny",
"bash": "deny"
}
},
"research": {
"description": "Documentation and API research agent. Use when you need to: look up library documentation, find API references, research best practices, understand framework patterns, check package versions or compatibility, or gather information from external sources before implementation.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.3,
"maxSteps": 25,
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": false,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": true,
"Ref*": true,
"exa*": true
},
"permission": {
"edit": "deny",
"bash": "deny",
"webfetch": "allow"
}
},
"reviewer": {
"description": "Code review and quality assessment agent. Use when you need to: review code changes for bugs or issues, assess code quality and maintainability, check for anti-patterns or code smells, evaluate architectural decisions, or provide feedback on pull requests without making changes.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.1,
"maxSteps": 20,
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": false,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false,
"Ref*": true
},
"permission": {
"edit": "deny",
"bash": "deny"
}
},
"tester": {
"description": "Test creation and validation agent. Use when you need to: write unit tests, integration tests, or end-to-end tests, run existing test suites, analyze test coverage, fix failing tests, or validate that code changes don't break existing functionality.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"maxSteps": 25,
"tools": {
"write": true,
"edit": true,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false
},
"permission": {
"edit": "allow",
"bash": {
"npm test*": "allow",
"npm run test*": "allow",
"yarn test*": "allow",
"pnpm test*": "allow",
"bun test*": "allow",
"pytest*": "allow",
"python -m pytest*": "allow",
"go test*": "allow",
"cargo test*": "allow",
"jest*": "allow",
"vitest*": "allow",
"mocha*": "allow",
"*": "ask"
}
}
},
"refactor": {
"description": "Code refactoring agent. Use when you need to: improve code structure without changing behavior, extract methods or classes, rename variables for clarity, reduce code duplication, apply design patterns, or modernize legacy code.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"maxSteps": 25,
"tools": {
"write": false,
"edit": true,
"patch": false,
"bash": false,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false
},
"permission": {
"edit": "allow",
"bash": "deny"
}
},
"debug": {
"description": "Bug investigation and debugging agent. Use when you need to: investigate runtime errors, trace execution flow, analyze stack traces, examine logs, bisect commits to find regressions, or diagnose performance issues.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"maxSteps": 25,
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false
},
"permission": {
"edit": "deny",
"bash": {
"git log*": "allow",
"git diff*": "allow",
"git show*": "allow",
"git blame*": "allow",
"git bisect*": "allow",
"cat *": "allow",
"head *": "allow",
"tail *": "allow",
"less *": "allow",
"grep *": "allow",
"*": "ask"
}
}
},
"devops": {
"description": "Infrastructure and DevOps agent. Use when you need to: write or modify Dockerfiles, create Kubernetes manifests, configure CI/CD pipelines (GitHub Actions, GitLab CI), manage Terraform or infrastructure-as-code, handle cloud provider configurations, set up monitoring or logging, or troubleshoot deployment issues.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.1,
"maxSteps": 30,
"tools": {
"write": true,
"edit": true,
"patch": true,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": true,
"Ref*": true,
"exa*": true
},
"permission": {
"edit": "allow",
"bash": {
"docker build*": "allow",
"docker compose*": "allow",
"docker ps*": "allow",
"docker logs*": "allow",
"docker images*": "allow",
"docker inspect*": "allow",
"kubectl get*": "allow",
"kubectl describe*": "allow",
"kubectl logs*": "allow",
"kubectl apply*": "ask",
"kubectl delete*": "ask",
"kubectl exec*": "ask",
"terraform init*": "allow",
"terraform plan*": "allow",
"terraform validate*": "allow",
"terraform fmt*": "allow",
"terraform apply*": "ask",
"terraform destroy*": "deny",
"aws sts get-caller-identity*": "allow",
"aws s3 ls*": "allow",
"aws *": "ask",
"gcloud config list*": "allow",
"gcloud *": "ask",
"az account show*": "allow",
"az *": "ask",
"helm list*": "allow",
"helm status*": "allow",
"helm *": "ask",
"*": "ask"
},
"webfetch": "allow"
}
},
"security": {
"description": "Security auditing agent. Use when you need to: scan for vulnerabilities in dependencies, identify security anti-patterns in code, audit authentication or authorization logic, check for secrets or credentials in code, review input validation, assess API security, or generate security reports.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.1,
"maxSteps": 20,
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false,
"Ref*": true
},
"permission": {
"edit": "deny",
"bash": {
"npm audit*": "allow",
"yarn audit*": "allow",
"pnpm audit*": "allow",
"pip-audit*": "allow",
"safety check*": "allow",
"trivy *": "allow",
"grype *": "allow",
"semgrep *": "allow",
"snyk *": "allow",
"bandit *": "allow",
"gitleaks *": "allow",
"trufflehog *": "allow",
"git log*": "allow",
"git diff*": "allow",
"*": "deny"
}
}
},
"docs": {
"description": "Documentation agent. Use when you need to: write or update README files, create API documentation, generate code comments or docstrings, write architecture decision records, create user guides, or maintain changelog entries.",
"mode": "subagent",
"model": "anthropic/claude-haiku-4-5-20251001",
"temperature": 0.3,
"maxSteps": 15,
"tools": {
"write": true,
"edit": true,
"patch": false,
"bash": false,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false
},
"permission": {
"edit": "allow",
"bash": "deny"
}
},
"migrate": {
"description": "Database and schema migration agent. Use when you need to: create or modify database migrations, update ORM schemas (Prisma, Drizzle, TypeORM), write SQL migration scripts, handle data backfills, manage schema versioning, or coordinate database changes across environments.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.1,
"maxSteps": 25,
"tools": {
"write": true,
"edit": true,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false,
"Ref*": true
},
"permission": {
"edit": "allow",
"bash": {
"prisma migrate*": "allow",
"prisma db*": "allow",
"prisma generate*": "allow",
"npx prisma*": "allow",
"drizzle-kit*": "allow",
"npx drizzle-kit*": "allow",
"typeorm migration*": "allow",
"npx typeorm*": "allow",
"knex migrate*": "allow",
"npx knex*": "allow",
"sequelize db:migrate*": "allow",
"npx sequelize*": "allow",
"alembic*": "allow",
"flask db*": "allow",
"django-admin migrate*": "allow",
"python manage.py migrate*": "allow",
"goose*": "allow",
"sql-migrate*": "allow",
"psql*": "ask",
"mysql*": "ask",
"sqlite3*": "ask",
"*": "ask"
}
}
},
"perf": {
"description": "Performance profiling and optimization agent. Use when you need to: analyze bundle sizes, run lighthouse audits, profile memory usage, identify performance bottlenecks, optimize database queries, measure load times, or investigate memory leaks.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"maxSteps": 25,
"tools": {
"write": false,
"edit": false,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false,
"Ref*": true
},
"permission": {
"edit": "deny",
"bash": {
"npm run build*": "allow",
"npx webpack-bundle-analyzer*": "allow",
"npx source-map-explorer*": "allow",
"npx lighthouse*": "allow",
"lighthouse*": "allow",
"npx bundlesize*": "allow",
"npx size-limit*": "allow",
"node --prof*": "allow",
"node --inspect*": "allow",
"clinic*": "allow",
"npx clinic*": "allow",
"0x*": "allow",
"autocannon*": "allow",
"ab *": "allow",
"wrk *": "allow",
"hyperfine*": "allow",
"py-spy*": "allow",
"perf *": "allow",
"time *": "allow",
"EXPLAIN ANALYZE*": "allow",
"*": "ask"
}
}
},
"api": {
"description": "API design and integration agent. Use when you need to: design REST or GraphQL APIs, create OpenAPI/Swagger specifications, generate API clients or SDKs, implement API versioning, write contract tests, or integrate with external APIs.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"maxSteps": 25,
"tools": {
"write": true,
"edit": true,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": true,
"Ref*": true,
"exa*": true
},
"permission": {
"edit": "allow",
"bash": {
"npx @openapitools/openapi-generator-cli*": "allow",
"openapi-generator*": "allow",
"npx swagger-cli*": "allow",
"swagger-codegen*": "allow",
"npx redocly*": "allow",
"spectral*": "allow",
"npx spectral*": "allow",
"prism*": "allow",
"npx @stoplight/prism*": "allow",
"curl*": "allow",
"httpie*": "allow",
"http *": "allow",
"grpcurl*": "allow",
"graphql-codegen*": "allow",
"npx graphql-codegen*": "allow",
"rover*": "allow",
"*": "ask"
},
"webfetch": "allow"
}
},
"data": {
"description": "Data pipeline and transformation agent. Use when you need to: build ETL pipelines, transform data with pandas/polars, create dbt models, write Spark jobs, design data workflows, or implement data validation and quality checks.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5-20250929",
"temperature": 0.2,
"maxSteps": 30,
"tools": {
"write": true,
"edit": true,
"patch": false,
"bash": true,
"read": true,
"grep": true,
"glob": true,
"list": true,
"webfetch": false,
"Ref*": true
},
"permission": {
"edit": "allow",
"bash": {
"dbt run*": "allow",
"dbt test*": "allow",
"dbt build*": "allow",
"dbt compile*": "allow",
"dbt debug*": "allow",
"dbt deps*": "allow",
"python *": "ask",
"jupyter*": "allow",
"papermill*": "allow",
"great_expectations*": "allow",
"soda*": "allow",
"dagster*": "ask",
"prefect*": "ask",
"airflow*": "ask",
"spark-submit*": "ask",
"pyspark*": "ask",
"*": "ask"
}
}
}
}
}