-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.jsonc
More file actions
241 lines (241 loc) · 9.26 KB
/
Copy pathopencode.jsonc
File metadata and controls
241 lines (241 loc) · 9.26 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
{
"$schema": "https://opencode.ai/config.json",
"theme": "catppuccin",
"share": "disabled",
"plugin": [
"@franlol/opencode-md-table-formatter@0.0.6",
"superpowers@git+https://github.com/obra/superpowers.git",
"./plugin/background-agents.ts",
"./plugin/notify.ts",
"./plugin/workspace-plugin.ts",
"./plugin/worktree.ts"
],
"permission": {
"task": "deny",
"skill": {
"chezmoi-expert": "allow",
"plan-protocol": "allow",
"plan-review": "allow",
"code-philosophy": "allow",
"code-review": "allow",
"frontend-philosophy": "allow"
},
"context7_*": "deny",
"exa_*": "deny",
"gh_grep_*": "deny",
"kagi_*": "deny",
"webfetch": "deny",
"worktree_*": "deny"
},
"agent": {
"researcher": {
"permission": {
"context7_*": "allow",
"exa_*": "allow",
"gh_grep_*": "allow",
"kagi_*": "deny",
"webfetch": "allow",
"write": "deny",
"edit": "deny",
"plan_read": "deny",
"todoread": "deny",
"bash": {
"*": "deny",
"gh repo view*": "allow",
"gh pr view*": "allow",
"gh pr list*": "allow",
"gh issue view*": "allow",
"gh issue list*": "allow",
"gh release view*": "allow",
"gh release list*": "allow",
"gh run view*": "allow",
"gh run list*": "allow",
"gh workflow list*": "allow",
"gh search *": "allow",
"gh api *": "allow",
"npm view*": "allow",
"npm info*": "allow",
"npm show*": "allow",
"pip show*": "allow",
"pip index*": "allow",
"cargo search*": "allow",
"cargo info*": "allow",
"man *": "allow",
"tldr *": "allow",
"dig *": "allow",
"nslookup *": "allow",
"whois *": "allow",
"host *": "allow",
"jq *": "allow",
"head *": "allow",
"tail *": "allow",
"base64 *": "allow",
"grep *": "allow",
"rg *": "allow",
"wc *": "allow",
"sort *": "allow",
"uniq *": "allow",
"cut *": "allow",
"awk *": "allow",
"tr *": "allow"
}
}
},
"scribe": {
"permission": {
"bash": {
"*": "deny"
},
"edit": "allow",
"glob": "allow",
"read": "allow",
"write": "allow",
"plan_read": "deny",
"todoread": "deny"
}
},
"coder": {
"permission": {
"context7_*": "deny",
"exa_*": "deny",
"gh_grep_*": "deny",
"read": "allow",
"write": "allow",
"edit": "allow",
"glob": "allow",
"grep": "allow",
"bash": {
"*": "allow",
"rm -rf *": "deny",
"sudo *": "deny",
"git push --force*": "deny",
"git push -f*": "deny",
"curl * | sh*": "deny",
"curl * | bash*": "deny",
"wget * -O- * | sh*": "deny",
"wget * -qO- * | sh*": "deny"
},
"plan_read": "deny",
"todoread": "deny"
}
},
"reviewer": {
"temperature": 0.1,
"permission": {
"edit": "deny",
"write": "deny",
"bash": {
"*": "deny",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow",
"git blame*": "allow",
"rg *": "allow"
},
"plan_read": "allow",
"delegation_read": "allow",
"delegation_list": "allow"
}
},
"plan": {
"permission": {
"edit": "deny",
"write": "deny",
"bash": {
"*": "deny"
},
"task": "allow",
"worktree_*": "allow"
}
},
"build": {
"prompt": "You are a **build orchestrator**. You coordinate implementation through delegation — you do NOT implement directly.\\\\\\\\n\\\\\\\\n## Workflow\\\\\\\\n\\\\\\\\nFor every request:\\\\\\\\n\\\\\\\\n1. **Route** — Load the org-routing skill to determine which organization roles should participate\\\\\\\\n2. **Consult** — Delegate to each relevant organization agent in the appropriate order\\\\\\\\n3. **Synthesize** — Aggregate recommendations from consulted organization agents\\\\\\\\n4. **Execute** — Delegate implementation to execution agents\\\\\\\\n5. **Validate** — Delegate review to validation agents where needed\\\\\\\\n6. **Report** — Return the final result\\\\\\\\n\\\\\\\\n## Organization Agents (decisions, not code)\\\\\\\\n\\\\\\\\n- `ceo` — scope, priority, go/no-go\\\\\\\\n- `pm` — requirements, acceptance criteria\\\\\\\\n- `cto` — architecture, technical decisions\\\\\\\\n- `finance` — cost analysis, build-vs-buy\\\\\\\\n- `security` — threat modeling, policy\\\\\\\\n- `qa` — test strategy, quality gates\\\\\\\\n- `devops` — deployment, observability\\\\\\\\n\\\\\\\\n## Execution Agents (implementation)\\\\\\\\n\\\\\\\\n- `coder` — write and modify code\\\\\\\\n- `researcher` — external research, documentation lookup\\\\\\\\n- `explore` — codebase analysis, file discovery\\\\\\\\n\\\\\\\\n## Validation Agents (review)\\\\\\\\n\\\\\\\\n- `reviewer` — code review\\\\\\\\n- `scribe` — documentation\\\\\\\\n- `security-auditor` — security review\\\\\\\\n- `sre-reviewer` — infrastructure review\\\\\\\\n\\\\\\\\n## Routing Guidelines\\\\\\\\n\\\\\\\\n- Do NOT invoke organization agents unless relevant\\\\\\\\n- Consult organization agents BEFORE execution agents\\\\\\\\n- Organization agents do not implement code — they provide recommendations\\\\\\\\n- Execution agents do not make organization decisions\\\\\\\\n- Cross-agent coordination is YOUR job — agents don't call each other\\\\\\\\n\\\\\\\\n## Critical Constraints\\\\\\\\n\\\\\\\\n- You CANNOT edit files or run commands directly\\\\\\\\n- For ALL implementation and verification, delegate to `coder`\\\\\\\\n- For research, delegate to `researcher`\\\\\\\\n- For code review, delegate to `reviewer`",
"permission": {
"edit": "deny",
"write": "deny",
"bash": {
"*": "deny"
},
"task": "allow",
"worktree_*": "allow"
}
},
"explore": {
"permission": {
"edit": "deny",
"write": "deny",
"plan_read": "deny",
"todoread": "deny",
"bash": {
"*": "deny",
"ls *": "allow",
"tree *": "allow",
"pwd": "allow",
"cat *": "allow",
"head *": "allow",
"tail *": "allow",
"wc *": "allow",
"file *": "allow",
"stat *": "allow",
"grep *": "allow",
"rg *": "allow",
"find *": "allow",
"git status*": "allow",
"git log*": "allow",
"git diff*": "allow",
"git show*": "allow",
"git blame*": "allow",
"git branch*": "allow",
"git ls-files*": "allow",
"uname*": "allow",
"hostname": "allow",
"whoami": "allow",
"which *": "allow",
"realpath *": "allow"
}
}
}
},
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"enabled": true
},
"exa": {
"type": "remote",
"url": "https://mcp.exa.ai/mcp",
"enabled": true
},
"gh_grep": {
"type": "remote",
"url": "https://mcp.grep.app",
"enabled": true
},
"agentmemory": {
"type": "local",
"command": [
"npx",
"-y",
"@agentmemory/mcp"
],
"environment": {
"AGENTMEMORY_URL": "http://localhost:3111",
"GRAPH_EXTRACTION_ENABLED": "true",
"CONSOLIDATION_ENABLED": "true",
"AGENTMEMORY_AUTO_COMPRESS": "true",
"AGENTMEMORY_INJECT_CONTEXT": "true"
},
"enabled": true
}
},
"instructions": [
"./tool/philosophy.md"
],
"command": {
"init": {
"description": "Bootstrap a new project from an archetype. Delegates to opencode-init shell script — no generation logic in this prompt.",
"template": "You are a project bootstrap assistant. Your job is to guide the user through creating a new project.\n\n## Your Role\n\n1. List available archetypes:\n ```bash\n ~/.config/opencode/tools/opencode-init --list-archetypes\n ```\n\n2. Show components for the chosen archetype:\n ```bash\n ~/.config/opencode/tools/opencode-init --list-components <archetype>\n ```\n\n3. Collect from user: project name, archetype, components, output directory\n\n4. Run dry-run:\n ```bash\n ~/.config/opencode/tools/opencode-init <archetype> \\\n --components <comma-sep> --output <dir> --dry-run\n ```\n\n5. Show the preview to the user and ask for confirmation\n\n6. Run generation:\n ```bash\n ~/.config/opencode/tools/opencode-init <archetype> \\\n --components <comma-sep> --output <dir>\n ```\n\n7. Display the generated scaffold summary to the user\n\n## Constraints\n\n- Do NOT parse files or YAML directly — use the script's API\n- Do NOT implement any generation logic — the script owns all generation\n- Always offer --dry-run first before writing files\n- Ask before using --force\n- Use --merge or --skip-existing if the target already has a .opencode directory"
}
}
}