oh-my-opencode-serverlocal 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja-JP.md +775 -0
  3. package/README.ko-KR.md +796 -0
  4. package/README.md +792 -0
  5. package/README.zh-CN.md +765 -0
  6. package/dist/agents/council.d.ts +27 -0
  7. package/dist/agents/councillor.d.ts +2 -0
  8. package/dist/agents/designer.d.ts +2 -0
  9. package/dist/agents/explorer.d.ts +2 -0
  10. package/dist/agents/fixer.d.ts +2 -0
  11. package/dist/agents/index.d.ts +31 -0
  12. package/dist/agents/librarian.d.ts +2 -0
  13. package/dist/agents/observer.d.ts +2 -0
  14. package/dist/agents/oracle.d.ts +2 -0
  15. package/dist/agents/orchestrator.d.ts +28 -0
  16. package/dist/agents/permissions.d.ts +10 -0
  17. package/dist/cli/background-subagents.d.ts +13 -0
  18. package/dist/cli/companion.d.ts +4 -0
  19. package/dist/cli/config-io.d.ts +25 -0
  20. package/dist/cli/config-manager.d.ts +4 -0
  21. package/dist/cli/custom-skills-registry.d.ts +18 -0
  22. package/dist/cli/custom-skills.d.ts +13 -0
  23. package/dist/cli/doctor.d.ts +38 -0
  24. package/dist/cli/index.d.ts +3 -0
  25. package/dist/cli/index.js +3565 -0
  26. package/dist/cli/install.d.ts +7 -0
  27. package/dist/cli/model-key-normalization.d.ts +1 -0
  28. package/dist/cli/paths.d.ts +35 -0
  29. package/dist/cli/providers.d.ts +145 -0
  30. package/dist/cli/skills.d.ts +24 -0
  31. package/dist/cli/system.d.ts +6 -0
  32. package/dist/cli/types.d.ts +47 -0
  33. package/dist/companion/manager.d.ts +50 -0
  34. package/dist/companion/updater.d.ts +36 -0
  35. package/dist/config/agent-mcps.d.ts +11 -0
  36. package/dist/config/constants.d.ts +38 -0
  37. package/dist/config/council-schema.d.ts +137 -0
  38. package/dist/config/index.d.ts +5 -0
  39. package/dist/config/loader.d.ts +88 -0
  40. package/dist/config/runtime-preset.d.ts +11 -0
  41. package/dist/config/schema.d.ts +1107 -0
  42. package/dist/config/strip-orchestrator-model.d.ts +9 -0
  43. package/dist/config/utils.d.ts +18 -0
  44. package/dist/council/council-manager.d.ts +53 -0
  45. package/dist/council/index.d.ts +1 -0
  46. package/dist/hooks/apply-patch/codec.d.ts +7 -0
  47. package/dist/hooks/apply-patch/errors.d.ts +25 -0
  48. package/dist/hooks/apply-patch/execution-context.d.ts +27 -0
  49. package/dist/hooks/apply-patch/index.d.ts +15 -0
  50. package/dist/hooks/apply-patch/matching.d.ts +26 -0
  51. package/dist/hooks/apply-patch/operations.d.ts +3 -0
  52. package/dist/hooks/apply-patch/prepared-changes.d.ts +17 -0
  53. package/dist/hooks/apply-patch/resolution.d.ts +19 -0
  54. package/dist/hooks/apply-patch/rewrite.d.ts +7 -0
  55. package/dist/hooks/apply-patch/test-helpers.d.ts +6 -0
  56. package/dist/hooks/apply-patch/types.d.ts +80 -0
  57. package/dist/hooks/auto-update-checker/cache.d.ts +11 -0
  58. package/dist/hooks/auto-update-checker/checker.d.ts +38 -0
  59. package/dist/hooks/auto-update-checker/constants.d.ts +12 -0
  60. package/dist/hooks/auto-update-checker/index.d.ts +18 -0
  61. package/dist/hooks/auto-update-checker/skill-sync.d.ts +67 -0
  62. package/dist/hooks/auto-update-checker/types.d.ts +34 -0
  63. package/dist/hooks/chat-headers.d.ts +16 -0
  64. package/dist/hooks/command-hook-utils.d.ts +5 -0
  65. package/dist/hooks/deepwork/index.d.ts +13 -0
  66. package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
  67. package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
  68. package/dist/hooks/filter-available-skills/index.d.ts +19 -0
  69. package/dist/hooks/foreground-fallback/index.d.ts +122 -0
  70. package/dist/hooks/image-hook.d.ts +8 -0
  71. package/dist/hooks/index.d.ts +16 -0
  72. package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
  73. package/dist/hooks/loop-command/index.d.ts +13 -0
  74. package/dist/hooks/phase-reminder/index.d.ts +25 -0
  75. package/dist/hooks/post-file-tool-nudge/index.d.ts +23 -0
  76. package/dist/hooks/reflect/index.d.ts +13 -0
  77. package/dist/hooks/session-lifecycle.d.ts +10 -0
  78. package/dist/hooks/task-session-manager/index.d.ts +58 -0
  79. package/dist/hooks/task-session-manager/pending-call-tracker.d.ts +13 -0
  80. package/dist/hooks/task-session-manager/task-context-tracker.d.ts +14 -0
  81. package/dist/hooks/types.d.ts +26 -0
  82. package/dist/index.d.ts +5 -0
  83. package/dist/index.js +39519 -0
  84. package/dist/interview/dashboard-manager.d.ts +21 -0
  85. package/dist/interview/dashboard.d.ts +67 -0
  86. package/dist/interview/document.d.ts +29 -0
  87. package/dist/interview/helpers.d.ts +10 -0
  88. package/dist/interview/index.d.ts +1 -0
  89. package/dist/interview/manager.d.ts +21 -0
  90. package/dist/interview/parser.d.ts +11 -0
  91. package/dist/interview/prompts.d.ts +7 -0
  92. package/dist/interview/server.d.ts +15 -0
  93. package/dist/interview/service.d.ts +45 -0
  94. package/dist/interview/session-server.d.ts +21 -0
  95. package/dist/interview/types.d.ts +111 -0
  96. package/dist/interview/ui.d.ts +11 -0
  97. package/dist/loop/loop-session.d.ts +64 -0
  98. package/dist/mcp/context7.d.ts +6 -0
  99. package/dist/mcp/grep-app.d.ts +6 -0
  100. package/dist/mcp/index.d.ts +8 -0
  101. package/dist/mcp/types.d.ts +12 -0
  102. package/dist/mcp/websearch.d.ts +9 -0
  103. package/dist/multiplexer/cmux/close-policy.d.ts +20 -0
  104. package/dist/multiplexer/cmux/index.d.ts +102 -0
  105. package/dist/multiplexer/cmux/session-lifecycle.d.ts +92 -0
  106. package/dist/multiplexer/cmux/session-state.d.ts +45 -0
  107. package/dist/multiplexer/factory.d.ts +17 -0
  108. package/dist/multiplexer/herdr/index.d.ts +35 -0
  109. package/dist/multiplexer/index.d.ts +12 -0
  110. package/dist/multiplexer/session-manager.d.ts +69 -0
  111. package/dist/multiplexer/shared.d.ts +31 -0
  112. package/dist/multiplexer/tmux/index.d.ts +26 -0
  113. package/dist/multiplexer/types.d.ts +57 -0
  114. package/dist/multiplexer/zellij/index.d.ts +47 -0
  115. package/dist/tools/acp-run.d.ts +3 -0
  116. package/dist/tools/ast-grep/cli.d.ts +15 -0
  117. package/dist/tools/ast-grep/constants.d.ts +25 -0
  118. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  119. package/dist/tools/ast-grep/index.d.ts +10 -0
  120. package/dist/tools/ast-grep/tools.d.ts +3 -0
  121. package/dist/tools/ast-grep/types.d.ts +30 -0
  122. package/dist/tools/ast-grep/utils.d.ts +4 -0
  123. package/dist/tools/cancel-task.d.ts +16 -0
  124. package/dist/tools/council.d.ts +10 -0
  125. package/dist/tools/index.d.ts +7 -0
  126. package/dist/tools/preset-manager.d.ts +26 -0
  127. package/dist/tools/smartfetch/binary.d.ts +3 -0
  128. package/dist/tools/smartfetch/cache.d.ts +6 -0
  129. package/dist/tools/smartfetch/constants.d.ts +12 -0
  130. package/dist/tools/smartfetch/index.d.ts +3 -0
  131. package/dist/tools/smartfetch/network.d.ts +38 -0
  132. package/dist/tools/smartfetch/secondary-model.d.ts +35 -0
  133. package/dist/tools/smartfetch/tool.d.ts +3 -0
  134. package/dist/tools/smartfetch/types.d.ts +122 -0
  135. package/dist/tools/smartfetch/utils.d.ts +20 -0
  136. package/dist/tui-state.d.ts +18 -0
  137. package/dist/tui.d.ts +13 -0
  138. package/dist/tui.js +1112 -0
  139. package/dist/utils/agent-variant.d.ts +23 -0
  140. package/dist/utils/background-job-board.d.ts +113 -0
  141. package/dist/utils/background-job-coordinator.d.ts +72 -0
  142. package/dist/utils/background-job-store.d.ts +46 -0
  143. package/dist/utils/compat.d.ts +29 -0
  144. package/dist/utils/councillor-models.d.ts +20 -0
  145. package/dist/utils/env.d.ts +3 -0
  146. package/dist/utils/escape-html.d.ts +1 -0
  147. package/dist/utils/frontmatter.d.ts +6 -0
  148. package/dist/utils/guards.d.ts +4 -0
  149. package/dist/utils/index.d.ts +10 -0
  150. package/dist/utils/internal-initiator.d.ts +11 -0
  151. package/dist/utils/logger.d.ts +6 -0
  152. package/dist/utils/polling.d.ts +21 -0
  153. package/dist/utils/session.d.ts +75 -0
  154. package/dist/utils/subagent-depth.d.ts +35 -0
  155. package/dist/utils/system-collapse.d.ts +6 -0
  156. package/dist/utils/task.d.ts +20 -0
  157. package/dist/utils/zip-extractor.d.ts +1 -0
  158. package/package.json +108 -0
  159. package/src/companion/companion-manifest.json +12 -0
  160. package/src/skills/clonedeps/README.md +23 -0
  161. package/src/skills/clonedeps/SKILL.md +240 -0
  162. package/src/skills/clonedeps/codemap.md +32 -0
  163. package/src/skills/codemap/README.md +59 -0
  164. package/src/skills/codemap/SKILL.md +163 -0
  165. package/src/skills/codemap/codemap.md +36 -0
  166. package/src/skills/codemap/scripts/codemap.mjs +483 -0
  167. package/src/skills/codemap/scripts/codemap.test.ts +129 -0
  168. package/src/skills/codemap.md +78 -0
  169. package/src/skills/deepwork/SKILL.md +122 -0
  170. package/src/skills/loop-engineering/SKILL.md +30 -0
  171. package/src/skills/oh-my-opencode-slim/SKILL.md +326 -0
  172. package/src/skills/reflect/SKILL.md +326 -0
  173. package/src/skills/simplify/README.md +19 -0
  174. package/src/skills/simplify/SKILL.md +138 -0
  175. package/src/skills/simplify/codemap.md +36 -0
  176. package/src/skills/verification-planning/SKILL.md +102 -0
  177. package/src/skills/worktrees/SKILL.md +171 -0
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: deepwork
3
+ description: High-cost orchestrator workflow for large, high-risk, multi-phase coding efforts with meaningful dependencies and review gates. Do not activate for routine multi-file changes.
4
+ ---
5
+
6
+ # Deepwork
7
+
8
+ Deepwork is an orchestrator workflow for heavy coding sessions. Use it only
9
+ when the work is clearly large or high-risk: multiple dependent phases,
10
+ cross-cutting architectural change, unsafe-to-partially-ship migration, or
11
+ sustained coordination across several specialist lanes.
12
+
13
+ Do not infer Deepwork merely because a task touches multiple files. Do not use
14
+ it for trivial edits, quick docs changes, simple bug fixes, or routine bounded
15
+ features.
16
+
17
+ ## Core Contract
18
+
19
+ When deepwork is active, the orchestrator must manage the work as a scheduler,
20
+ not as the default implementation worker.
21
+
22
+ Required behavior:
23
+
24
+ - before planning, delegation, or creating a deepwork state file, inspect the
25
+ existing `.gitignore` and `.ignore`; add only missing entries, without
26
+ duplicates, so `.gitignore` contains `.slim/deepwork/` and `.ignore` contains
27
+ `!.slim/deepwork/` and `!.slim/deepwork/**`;
28
+ - keep OpenCode todos aligned with the active deepwork phase;
29
+ - create and maintain a local markdown progress file under `.slim/deepwork/`;
30
+ - write valuable research findings into that file as confirmed research context
31
+ when they are received and reconciled;
32
+ - draft a plan before implementation;
33
+ - ask `@oracle` to review the plan and revise it until acceptable;
34
+ - create a phased implementation/delegation plan;
35
+ - before oracle reviews, add relevant confirmed research findings and file
36
+ references to the deepwork file so oracle can review the plan or phase from
37
+ accepted context instead of redoing discovery;
38
+ - ask `@oracle` to review that implementation plan before execution;
39
+ - after oracle review and before each implementation phase, decide the execution
40
+ path: what can run in parallel, what must be sequential, which specialists to
41
+ delegate to, and whether to split the same agent into multiple bounded lanes;
42
+ - after each phase, validate, update the deepwork file, prepare the plan file
43
+ for oracle review and ask `@oracle` to review the phase result, fix
44
+ actionable issues, then continue;
45
+ - when a phase includes `@designer`, preserve designer intent across later
46
+ phases. Use `@fixer` only for mechanical follow-up that does not alter the
47
+ UI/UX;
48
+ - finish with final validation and a concise summary.
49
+
50
+ ## Designer Handoff Guardrail
51
+
52
+ When a deepwork phase includes `@designer`, treat the delivered UI/UX as
53
+ accepted design intent for later phases. Record any important design decisions in
54
+ the deepwork file before continuing.
55
+
56
+ After designer work:
57
+
58
+ - preserve layout, rhythm, hierarchy, motion, spacing, color, affordances,
59
+ responsiveness, and component feel;
60
+ - review and improve user-facing copy with grounded, normal wording, but do not
61
+ change visual structure or interaction intent;
62
+ - route follow-up visual, responsive, motion, hierarchy, polish, or
63
+ component-feel changes back to `@designer`;
64
+ - use `@fixer` only for bounded mechanical follow-up that preserves the design
65
+ exactly, such as wiring, tests, type fixes, or non-visual behavior changes;
66
+ - if design intent must change, record why in the deepwork file before changing
67
+ it.
68
+
69
+ ## Deepwork File
70
+
71
+ Create a task-specific file such as:
72
+
73
+ ```text
74
+ .slim/deepwork/<short-task-slug>.md
75
+ ```
76
+
77
+ Before creating this file—and before planning or delegation—inspect the existing
78
+ `.gitignore` and `.ignore`. Add only missing entries and do not add duplicates:
79
+
80
+ ```gitignore
81
+ # .gitignore
82
+ .slim/deepwork/
83
+ ```
84
+
85
+ ```gitignore
86
+ # .ignore
87
+ !.slim/deepwork/
88
+ !.slim/deepwork/**
89
+ ```
90
+
91
+ These rules keep deepwork state git-local while allowing OpenCode to read it.
92
+
93
+ Do not follow a rigid template. Choose whatever markdown structure best fits the
94
+ work. The file only needs to remain useful as persistent session state and should
95
+ capture, as applicable:
96
+
97
+ - current goal and understanding;
98
+ - researched, factual context from `@librarian` to avoid oracle doing its own
99
+ research;
100
+ - plan drafts and oracle review notes;
101
+ - implementation phases and status;
102
+ - validation results;
103
+ - unresolved questions, blockers, and follow-ups.
104
+
105
+ Update this file after major decisions, valuable specialist research, reviews,
106
+ phase completions, validation results, and scope changes.
107
+ When `@librarian` docs, code reads, or external references produce useful
108
+ information, reconcile the result and record the accepted findings here so later
109
+ planning and reviews share the same context instead of rediscovering it.
110
+ Don't put actual contents of local files, reference them by path only.
111
+
112
+ ## Scheduler Discipline
113
+
114
+ Use the scheduler model throughout:
115
+
116
+ - follow Orchestrator delegations rules
117
+ - record task/session IDs and ownership boundaries;
118
+ - wait for hook-driven background completion before consuming background results;
119
+ - avoid blocking Orchestrator lane while background jobs run; if no independent
120
+ work remains, stop briefly and let the completion event resume the workflow;
121
+ - do not advance to the next phase while relevant jobs are running or terminal
122
+ results are unreconciled.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: loop-engineering
3
+ description: Loop engineering runtime Grill + Monitor
4
+ ---
5
+
6
+ # Loop Engineering Skill
7
+
8
+ ## Grill (orchestrator interview)
9
+
10
+ 1. Goal: "What are you trying to accomplish?"
11
+ 2. Success criteria: "Describe how we know the loop succeeded."
12
+ 3. Success type: choose from `test`, `build`, `lint`, `command`, `fileExists`, `oracle`, `observer`, `manual`. For CLI steps provide `successCommand`; for file detection provide `successPath`.
13
+ 4. Execute agent: fixer / designer / explorer / librarian
14
+ 5. Verify agent: oracle / observer / test
15
+ 6. Max attempts (default 3)
16
+ 7. Optional context files: which files or directories should be read before execution?
17
+
18
+ ## Loop Monitor
19
+
20
+ - Listen to callbacks:
21
+ - `onLoopComplete(loopID, success)` → report final outcome
22
+ - `onEscalated(loopID, reason)` → escalate to human
23
+ - `onManualReview(loopID, reason)` → prompt human to approve/fail and call `resolveManualReview(loopID, passed, reason)`
24
+ - Show current state and attempt count on each callback
25
+ - For manual verification, present the failure reason before asking for pass/fail
26
+ - If human forces cancellation, call `cancel(loopID)` through the orchestrator
27
+
28
+ ## Notes
29
+ - Manual verification is the minimal on-ramp (autoresearch pattern). It pauses the loop until `resolveManualReview` is called. Do not auto-resolve.
30
+ - BackgroundJobBoard signals (totalErrors, timeoutCount) are already baked into the runtime.
@@ -0,0 +1,326 @@
1
+ ---
2
+ name: oh-my-opencode-slim
3
+ description: Configure and improve oh-my-opencode-slim for the current user. Use when users want to tune agents, models, prompts, custom agents, skills, MCPs, presets, or plugin behavior. Also use when recurring workflow friction suggests a safe config or prompt improvement.
4
+ ---
5
+
6
+ # oh-my-opencode-slim Configuration Skill
7
+
8
+ You help users configure, customize, and safely improve their
9
+ oh-my-opencode-slim setup.
10
+
11
+ The goal is not just to answer configuration questions. When useful, help the
12
+ user make their agent system better for future runs: tune models, adjust
13
+ agent prompts, add focused custom agents, enable or restrict tools, and document
14
+ restart requirements.
15
+
16
+ ## When to Use
17
+
18
+ Use this skill when the user asks about or is likely to benefit from changes to:
19
+
20
+ - `~/.config/opencode/oh-my-opencode-slim.json` or `.jsonc`
21
+ - `.opencode/` or `~/.config/opencode/` plugin/agent configuration
22
+ - agent models, variants, presets, or provider routing
23
+ - orchestrator delegation behavior or specialist-agent prompts
24
+ - custom agents under `agents.<name>`
25
+ - custom agent `prompt` and `orchestratorPrompt` blocks
26
+ - skills, MCP permissions, tool access, or disabled agents
27
+ - background orchestration, session reuse, multiplexer panes, or deepwork
28
+ - recurring workflow friction that could be fixed by a prompt/config change
29
+
30
+ Also use it proactively, with restraint, when a session reveals a repeatable
31
+ improvement opportunity. Example: if the user repeatedly asks the same agent to
32
+ follow a project-specific rule, suggest adding that rule to a prompt or config.
33
+
34
+ ## What Is Possible
35
+
36
+ oh-my-opencode-slim is configured through a plugin config file, usually:
37
+
38
+ ```text
39
+ ~/.config/opencode/oh-my-opencode-slim.json
40
+ ```
41
+
42
+ or:
43
+
44
+ ```text
45
+ ~/.config/opencode/oh-my-opencode-slim.jsonc
46
+ ```
47
+
48
+ Concrete files agents should know:
49
+
50
+ | Path | Use |
51
+ |---|---|
52
+ | `~/.config/opencode/opencode.json` | OpenCode core config: plugin registration and providers |
53
+ | `~/.config/opencode/oh-my-opencode-slim.jsonc` | User plugin config with comments/trailing commas; takes precedence over `.json` |
54
+ | `~/.config/opencode/oh-my-opencode-slim.json` | User plugin config generated by installer |
55
+ | `<project>/.opencode/oh-my-opencode-slim.json` | Project-local plugin overrides checked before user config |
56
+ | `~/.config/opencode/oh-my-opencode-slim/{agent}.md` | Full prompt replacement for a built-in agent |
57
+ | `~/.config/opencode/oh-my-opencode-slim/{agent}_append.md` | Append-only prompt tuning for a built-in agent |
58
+ | `~/.config/opencode/oh-my-opencode-slim/{preset}/{agent}.md` | Preset-specific full prompt replacement |
59
+ | `~/.config/opencode/oh-my-opencode-slim/{preset}/{agent}_append.md` | Preset-specific append-only prompt tuning |
60
+ | `~/.config/opencode/skills/<skill-name>/SKILL.md` | Installed skill prompt payload |
61
+
62
+ Built-in agent prompt file names are exact agent names:
63
+
64
+ - `orchestrator.md` / `orchestrator_append.md`
65
+ - `oracle.md` / `oracle_append.md`
66
+ - `librarian.md` / `librarian_append.md`
67
+ - `explorer.md` / `explorer_append.md`
68
+ - `designer.md` / `designer_append.md`
69
+ - `fixer.md` / `fixer_append.md`
70
+ - `observer.md` / `observer_append.md`
71
+ - `council.md` / `council_append.md`
72
+
73
+ Prefer `{agent}_append.md` for small behavior tuning. Use `{agent}.md` only when
74
+ the user intentionally wants to replace the bundled prompt entirely.
75
+
76
+ Prompt override lookup order:
77
+
78
+ 1. If a `preset` is active, check
79
+ `~/.config/opencode/oh-my-opencode-slim/{preset}/` first.
80
+ 2. Fall back to `~/.config/opencode/oh-my-opencode-slim/`.
81
+ 3. If both `{agent}.md` and `{agent}_append.md` exist, the replacement prompt is
82
+ loaded first and the append file is added after it.
83
+ 4. If no prompt files exist, the built-in prompt from the plugin package is used.
84
+
85
+ Common customizations:
86
+
87
+ - **Switch presets**: choose which generated or custom preset is active.
88
+ - **Tune models**: assign different models/variants per agent.
89
+ - **Limit costs**: use cheaper models for `explorer`, `librarian`, and `fixer`.
90
+ - **Improve quality**: use stronger models for `orchestrator`, `oracle`, or
91
+ design-heavy `designer` work.
92
+ - **Control skills**: set `skills` per agent with `['*']`, explicit names, or
93
+ exclusions like `['*', '!codemap']`.
94
+ - **Control MCPs**: set `mcps` per agent with the same allow/exclude style.
95
+ - **Enable optional agents**: remove agents from `disabled_agents` and configure
96
+ an appropriate model, such as a vision-capable `observer`.
97
+ - **Add custom agents**: define focused specialists under `agents.<name>`.
98
+ - **Tune prompts**: override or extend an agent's prompt for local workflow
99
+ preferences.
100
+ - **Guide delegation**: add `orchestratorPrompt` for custom agents so the
101
+ Orchestrator knows when to call them and when not to.
102
+
103
+ Important schema boundary:
104
+
105
+ - Built-in agents (`orchestrator`, `oracle`, `librarian`, `explorer`,
106
+ `designer`, `fixer`, `observer`, `council`) can set models, variants, skills,
107
+ MCPs, options, and display names in config.
108
+ - Built-in agent `prompt` and `orchestratorPrompt` fields are **not** supported
109
+ in `oh-my-opencode-slim.json[c]`; use markdown prompt override files instead.
110
+ - Unknown keys under top-level `agents` are custom agents. Custom agents may use
111
+ `prompt` and `orchestratorPrompt` directly in config.
112
+
113
+ ## Config Shapes
114
+
115
+ ### Tune a built-in agent model/skills/MCPs
116
+
117
+ Edit the active preset under `presets.<preset>.<agent>`:
118
+
119
+ ```jsonc
120
+ {
121
+ "preset": "openai",
122
+ "presets": {
123
+ "openai": {
124
+ "orchestrator": {
125
+ "model": "openai/gpt-5.6-terra",
126
+ "variant": "high",
127
+ "skills": ["*"],
128
+ "mcps": ["*", "!context7"]
129
+ },
130
+ "librarian": {
131
+ "model": "openai/gpt-5.6-luna",
132
+ "variant": "low",
133
+ "skills": [],
134
+ "mcps": ["websearch", "context7", "gh_grep"]
135
+ }
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ ### Append instructions to a built-in prompt
142
+
143
+ Create, for example:
144
+
145
+ ```text
146
+ ~/.config/opencode/oh-my-opencode-slim/orchestrator_append.md
147
+ ```
148
+
149
+ or for only the `openai` preset:
150
+
151
+ ```text
152
+ ~/.config/opencode/oh-my-opencode-slim/openai/orchestrator_append.md
153
+ ```
154
+
155
+ Example content:
156
+
157
+ ```markdown
158
+ ## Local Orchestrator Preference
159
+
160
+ - Before spawning parallel writer agents, identify non-overlapping file ownership.
161
+ - If file ownership overlaps, ask the user or serialize the work.
162
+ ```
163
+
164
+ ### Replace a built-in prompt entirely
165
+
166
+ Create:
167
+
168
+ ```text
169
+ ~/.config/opencode/oh-my-opencode-slim/orchestrator.md
170
+ ```
171
+
172
+ Use this rarely. Full replacements must restate all essential plugin behavior,
173
+ because they replace the bundled prompt.
174
+
175
+ ## Safe Improvement Rules
176
+
177
+ Configuration changes affect future agent behavior, so treat them as user-owned.
178
+
179
+ 1. **Ask before changing config or prompts.**
180
+ - Explain the proposed improvement briefly.
181
+ - State which file would change.
182
+ - Ask for confirmation unless the user explicitly requested the exact edit.
183
+ 2. **Prefer narrow changes.**
184
+ - Do not rewrite large prompts when a small rule solves the problem.
185
+ - Do not add custom agents for one-off tasks.
186
+ 3. **Preserve existing user settings.**
187
+ - Merge with current config rather than regenerating from scratch.
188
+ - Keep comments and formatting where practical for JSONC files.
189
+ 4. **Avoid hidden behavior changes.**
190
+ - Mention cost, permissions, or delegation changes before applying them.
191
+ - Be explicit if a model/provider change may increase spend.
192
+ 5. **Tell the user about restart requirements.**
193
+ - OpenCode may need a restart for config, prompt, agent, skill, MCP, or plugin
194
+ changes to take effect.
195
+ - Phrase it as: "This should apply on the next OpenCode run; restart OpenCode
196
+ if you need it immediately."
197
+
198
+ ## Configuration Workflow
199
+
200
+ When making or proposing changes:
201
+
202
+ 1. **Inspect current setup**
203
+ - Read the existing oh-my-opencode-slim config file.
204
+ - Identify active `preset` and relevant agent blocks.
205
+ - Check whether the user has local project `.opencode/` overrides.
206
+ 2. **Decide the smallest useful change**
207
+ - Model/preset tuning for performance, quality, or cost.
208
+ - Prompt tuning for recurring behavior.
209
+ - Custom agent when a repeatable specialty deserves a separate lane.
210
+ - Skill/MCP permission change when access is too broad or too narrow.
211
+ 3. **Ask for confirmation**
212
+ - Show a concise proposal.
213
+ - Include the target file path.
214
+ 4. **Apply the edit carefully**
215
+ - Preserve unrelated settings.
216
+ - Prefer JSONC-compatible output if editing a JSONC file.
217
+ - Keep agent names and skill/MCP names exact.
218
+ 5. **Validate**
219
+ - Ensure the file remains parseable.
220
+ - Run available config checks if the repository provides them.
221
+ 6. **Explain activation**
222
+ - Tell the user whether the change applies immediately or on next OpenCode
223
+ run/restart.
224
+
225
+ ## Custom Agent Pattern
226
+
227
+ Custom agents work best when they are narrow, repeatable, and easy for the
228
+ Orchestrator to route.
229
+
230
+ Use this shape as a starting point:
231
+
232
+ ```jsonc
233
+ {
234
+ "agents": {
235
+ "api-reviewer": {
236
+ "model": "openai/gpt-5.6",
237
+ "variant": "high",
238
+ "prompt": "You review API design, compatibility, error semantics, and migration risk. Return concise findings with file references.",
239
+ "orchestratorPrompt": "Delegate to @api-reviewer for API contract changes, public SDK changes, backwards-compatibility questions, or migration-risk review. Do not use it for routine implementation.",
240
+ "skills": [],
241
+ "mcps": []
242
+ }
243
+ }
244
+ }
245
+ ```
246
+
247
+ Good custom agents have:
248
+
249
+ - a specific job;
250
+ - clear trigger conditions in `orchestratorPrompt`;
251
+ - explicit non-use conditions;
252
+ - only the skills and MCPs they actually need;
253
+ - a model appropriate to the task's judgment/cost needs.
254
+
255
+ Avoid custom agents that duplicate existing specialists:
256
+
257
+ - codebase scouting → `explorer`
258
+ - external docs/research → `librarian`
259
+ - architecture/debugging/review → `oracle`
260
+ - UI/UX polish → `designer`
261
+ - scoped mechanical implementation → `fixer`
262
+
263
+ ## Prompt Tuning Pattern
264
+
265
+ Prompt edits are best for recurring behavior that should happen across many
266
+ sessions.
267
+
268
+ Good reasons to tune a prompt:
269
+
270
+ - The Orchestrator repeatedly delegates too much or too little for this user's
271
+ workflow.
272
+ - A specialist repeatedly misses a project-specific convention.
273
+ - The user wants a stable communication or verification style.
274
+ - The team has a recurring review checklist or deployment rule.
275
+
276
+ Poor reasons to tune a prompt:
277
+
278
+ - A one-off task failed once.
279
+ - The current problem can be solved by normal instruction in this session.
280
+ - The change would make the agent worse for general use.
281
+
282
+ When suggesting a prompt improvement, say:
283
+
284
+ ```text
285
+ I noticed this is recurring. I can add a small rule to <agent/config path> so
286
+ future runs handle it automatically. Want me to make that config change?
287
+ ```
288
+
289
+ ## Examples
290
+
291
+ ### Make Orchestrator more conservative with background writers
292
+
293
+ Proposal:
294
+
295
+ ```text
296
+ I can add a narrow Orchestrator prompt rule to avoid parallel writer agents in
297
+ the same directory unless their file ownership is explicit. Target:
298
+ ~/.config/opencode/oh-my-opencode-slim/orchestrator_append.md. Apply it?
299
+ ```
300
+
301
+ ### Add a project-specific reviewer
302
+
303
+ Proposal:
304
+
305
+ ```text
306
+ This looks repeatable enough for a custom read-only reviewer agent. I can add
307
+ `api-reviewer` with no skills or MCPs and an `orchestratorPrompt` that routes
308
+ public API changes to it. Apply to your oh-my-opencode-slim config?
309
+ ```
310
+
311
+ ### Warn about restart
312
+
313
+ After editing:
314
+
315
+ ```text
316
+ Updated the config. This should apply on the next OpenCode run; restart
317
+ OpenCode if you need it immediately.
318
+ ```
319
+
320
+ ## Final Checklist
321
+
322
+ - [ ] Did the user confirm config/prompt edits, unless explicitly requested?
323
+ - [ ] Did the edit preserve existing settings?
324
+ - [ ] Is the active preset still valid?
325
+ - [ ] Are skill/MCP/tool permissions intentional and minimal?
326
+ - [ ] Did you mention OpenCode restart/next-run behavior?