-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.jsonc
More file actions
112 lines (107 loc) · 6.38 KB
/
Copy pathopencode.jsonc
File metadata and controls
112 lines (107 loc) · 6.38 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
{
"$schema": "https://opencode.ai/config.json",
// SWE multi-agent system — master default; use swe-plan for Spec→Plan gates
"default_agent": "swe",
// Shared engineering protocols loaded into every session
"instructions": [
".opencode/instructions/swe-protocol.md",
".opencode/instructions/delegation.md",
".opencode/instructions/verification.md",
".opencode/instructions/definition-of-done.md",
".opencode/instructions/risk-tiers.md",
".opencode/instructions/change-discipline.md",
".opencode/instructions/spec-plan-build.md",
".opencode/instructions/interrupt.md"
],
"permission": {
"skill": {
"*": "allow"
},
// Conservative defaults for destructive git; agents tighten further
"bash": {
"*": "allow",
"git push --force*": "ask",
"git push -f*": "ask",
"git reset --hard*": "ask",
"git clean*": "ask",
"rm -rf /*": "deny",
"rm -rf ~/*": "deny"
}
},
"agent": {
// Keep built-in build available; prefer swe-build for implementation work
"build": {
"description": "General-purpose builder (fallback). Prefer swe for oversight and swe-build for software-engineering implementation."
},
"plan": {
"description": "Stock read-only plan. Prefer swe-plan for Spec→Plan→Build (specs/ + plans/ + human gates)."
}
},
"command": {
"swe-spec": {
"description": "Plan mode: create specs/ then plans/ with human approval gates (no app code)",
"agent": "swe-plan",
"template": "Developer prompt / product request:\n$ARGUMENTS\n\nPlan mode only. Explore if needed. @spec-writer → specs/ → self-review → human-review-gate → STOP. After specs approved: @plan-writer → plans/ → self-review → human-review-gate → STOP. Never implement application code. Handoff to swe + /swe-build when plans approved."
},
"swe-plan": {
"description": "Plan mode: durable plans/ from approved specs (or full specs→plans)",
"agent": "swe-plan",
"template": "Planning request:\n$ARGUMENTS\n\nRead specs/STATUS.md and plans/STATUS.md. If specs not approved, run specs phase + human gate first. Else @plan-writer + plan-authoring. Self-review → human-review-gate → stop. Never write application source. Never mark approved yourself."
},
"swe-build": {
"description": "Build mode: implement from approved specs/ and plans/",
"agent": "swe-build",
"template": "Build request:\n$ARGUMENTS\n\nConfirm specs + plans STATUS approved (or explicit waiver). Load build-from-spec. Execute plans/08-build-checklist.md. Update plans/PROGRESS.md. Honor interrupts. No silent scope expansion. verification-loop → DoD → report."
},
"swe-interrupt": {
"description": "Checkpoint progress and stop the current runaway turn",
"agent": "swe",
"template": "INTERRUPT now.\n$ARGUMENTS\n\nLoad interrupt-handling. Checkpoint plans/PROGRESS.md or specs/PROGRESS.md. status=interrupted. Do not continue planning or implementation this turn. Summarize resume via /swe-resume. Prefer Esc (session_interrupt) mid-turn; this command forces a clean stop on the next turn."
},
"swe-resume": {
"description": "Resume from specs/plans PROGRESS.md after an interrupt",
"agent": "swe",
"template": "RESUME after interrupt.\n$ARGUMENTS\n\nLoad interrupt-handling. Read STATUS + PROGRESS. If still in specs/plans phase, tell user to switch to swe-plan and continue gates. If build phase with approvals, continue next_step via build-from-spec. Never treat interrupt as approval."
},
"swe-fix": {
"description": "Investigate and fix a bug with full SWE loop",
"agent": "swe",
"template": "Bug report / failure:\n$ARGUMENTS\n\nAssign a risk tier. Follow: understand → reproduce → root-cause → minimal fix → regression test → verification-loop → DoD checklist → report. Use @debugger and skills failure-reproduction / stack-trace-analysis / root-cause-analysis when useful. Do not stop after writing code."
},
"swe-feature": {
"description": "Implement a feature with plan, tests, and verification",
"agent": "swe",
"template": "Feature request:\n$ARGUMENTS\n\nIf large/greenfield, prefer /swe-spec first. If ambiguous, load acceptance-criteria. Assign risk tier. Explore → plan → implement with the right domain skill (frontend-change / backend-change / fullstack-change / api-change / database-change) → tests → verification-loop → DoD. Delegate only when complexity warrants it."
},
"swe-review": {
"description": "Independent review of current changes",
"agent": "swe",
"template": "Review current changes.\n$ARGUMENTS\n\nInspect git status/diff first. @code-reviewer (include error-handling-review for T2+). @security-reviewer if trust boundaries. Report ranked findings with file evidence."
},
"swe-explore": {
"description": "Map repository structure for a task",
"agent": "swe",
"template": "Explore the repository for:\n$ARGUMENTS\n\nUse @repo-explorer and repository-mapping / impact-analysis as needed. Do not modify files."
},
"swe-ci": {
"description": "Diagnose and fix CI/build failures",
"agent": "swe",
"template": "CI / build failure:\n$ARGUMENTS\n\nReproduce → classify env|flake|deps|code|test → root-cause → minimal fix → re-run failing check → broader verification → DoD."
},
"swe-refactor": {
"description": "Behavior-preserving focused refactor",
"agent": "swe",
"template": "Refactor request:\n$ARGUMENTS\n\nDefine invariants. Prefer characterization tests. Use focused-refactor only. No feature work mixed in. verification-loop after risky steps. @code-reviewer for scope creep."
},
"swe-deps": {
"description": "Upgrade or adapt dependencies safely",
"agent": "swe",
"template": "Dependency change:\n$ARGUMENTS\n\nDelegate to @dependency-agent or follow its procedure. impact-analysis on usages, minimal API adaptations, install + verify. Do not upgrade unrelated packages."
},
"swe-pr": {
"description": "Package current work for review/PR",
"agent": "swe",
"template": "Prepare this work for review/PR.\n$ARGUMENTS\n\nLoad pr-preparation and git-hygiene. Inspect real diff vs base. Ensure DoD + verification evidence. Only commit/push/create PR if the user explicitly asked. Summary must match the diff."
}
}
}