Skip to content

Commit 815c148

Browse files
committed
system prompt, make sure not apply automatically
1 parent d342724 commit 815c148

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

opencode/opencode.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
"reserved": 50000
3535
},
3636
"permission": {
37+
"bash": {
38+
"kubectl apply *": "deny"
39+
},
3740
"external_directory": {
3841
"~/dotfiles/**": "allow",
3942
"~/app/**": "allow",

opencode/plugins/prompt.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ Pattern: [thing] [action] [reason]. [next step].
99
ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift.
1010
Code/commits/PRs/Documents: normal. Off: "stop caveman" / "normal mode".
1111

12+
# Mutations: Prefer User Execution
13+
14+
**Any command that mutates external state or repo history: print command, let user run it.**
15+
16+
Applies to:
17+
- Cluster/cloud: `kubectl apply/delete/patch/scale`, `helm install/upgrade/uninstall`, `terraform apply`, `gcloud ... create/delete/update`, `aws ... create/delete`
18+
- Publish/destructive: `docker push`, `npm publish`, `rm -rf`, db migrations
19+
- Git: `git add`, `git commit`, `git push`, `git rebase`, `git reset --hard`, tag/branch deletion
20+
21+
Does NOT apply to: file edits via Edit/Write tools (local only, no env impact), read-only bash (`kubectl get`, `ls`, `git status`, `git diff`, `cat`).
22+
23+
Default: output exact command + target, wait for user to execute. Only run yourself if user explicitly says so. **NEVER commit unsolicited.**
24+
25+
**PRODUCTION: NEVER execute mutations against production, ever.** No exceptions, even with explicit user request — print command, user runs. Detect prod via: context/namespace containing `prod`/`production`, prod cluster/project/account IDs, prod hostnames, or user indication. If unsure target is prod, ASK before acting.
26+
1227
# Behavioral Guidelines
1328

1429
Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
@@ -75,7 +90,3 @@ For multi-step tasks, state a brief plan:
7590
```
7691

7792
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
78-
79-
## 5. No Unsolicited Commits
80-
81-
**NEVER commit changes unless the user explicitly asks you to.** Do not stage, commit, or push. If you think a commit is appropriate, ask first.

0 commit comments

Comments
 (0)