oh-my-claudecode-opencode 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 (48) hide show
  1. package/README.md +361 -0
  2. package/assets/AGENTS.md +357 -0
  3. package/assets/omco.example.json +34 -0
  4. package/assets/omco.schema.json +375 -0
  5. package/dist/agents/index.d.ts +139 -0
  6. package/dist/config/index.d.ts +179 -0
  7. package/dist/config/model-resolver.d.ts +46 -0
  8. package/dist/hooks/agent-usage-reminder.d.ts +12 -0
  9. package/dist/hooks/autopilot.d.ts +32 -0
  10. package/dist/hooks/context-recovery.d.ts +15 -0
  11. package/dist/hooks/continuation-messages.d.ts +24 -0
  12. package/dist/hooks/edit-error-recovery.d.ts +33 -0
  13. package/dist/hooks/index.d.ts +23 -0
  14. package/dist/hooks/keyword-detector.d.ts +23 -0
  15. package/dist/hooks/notepad.d.ts +109 -0
  16. package/dist/hooks/omc-orchestrator.d.ts +14 -0
  17. package/dist/hooks/persistent-mode.d.ts +60 -0
  18. package/dist/hooks/ralph-loop.d.ts +37 -0
  19. package/dist/hooks/ralph-verifier.d.ts +22 -0
  20. package/dist/hooks/remember-tag-processor.d.ts +47 -0
  21. package/dist/hooks/session-recovery.d.ts +10 -0
  22. package/dist/hooks/skill-injector.d.ts +16 -0
  23. package/dist/hooks/system-prompt-injector.d.ts +24 -0
  24. package/dist/hooks/todo-continuation-enforcer.d.ts +21 -0
  25. package/dist/hooks/tui-status.d.ts +72 -0
  26. package/dist/hooks/ultraqa-loop.d.ts +38 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.js +31047 -0
  29. package/dist/plugin-handlers/config-handler.d.ts +35 -0
  30. package/dist/plugin-handlers/index.d.ts +1 -0
  31. package/dist/prd/index.d.ts +2 -0
  32. package/dist/prd/prd-manager.d.ts +34 -0
  33. package/dist/prd/progress-tracker.d.ts +22 -0
  34. package/dist/prompts/ultrawork.d.ts +3 -0
  35. package/dist/shared/logger.d.ts +3 -0
  36. package/dist/shared/session-state.d.ts +5 -0
  37. package/dist/state/autopilot-state.d.ts +30 -0
  38. package/dist/state/index.d.ts +5 -0
  39. package/dist/state/ralph-state.d.ts +18 -0
  40. package/dist/state/ultraqa-state.d.ts +34 -0
  41. package/dist/state/ultrawork-state.d.ts +13 -0
  42. package/dist/state/verification-state.d.ts +15 -0
  43. package/dist/tools/background-manager.d.ts +22 -0
  44. package/dist/tools/background-tools.d.ts +3 -0
  45. package/dist/tools/builtin.d.ts +1 -0
  46. package/dist/tools/call-omo-agent.d.ts +3 -0
  47. package/dist/tools/index.d.ts +4 -0
  48. package/package.json +63 -0
package/README.md ADDED
@@ -0,0 +1,361 @@
1
+ # oh-my-claudecode-opencode (omco)
2
+
3
+ > 🔄 **OpenCode port of [oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) v3.0.11**
4
+
5
+ **oh-my-claudecode-opencode** (omco) - Multi-agent orchestration plugin that brings [oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) features to [OpenCode](https://github.com/opencode-ai/opencode).
6
+
7
+ Like Sisyphus condemned to roll his boulder eternally, this plugin ensures your AI assistant **never stops until the task is complete**.
8
+
9
+ ---
10
+
11
+ ## 🎯 What is this?
12
+
13
+ This project **ports the powerful features** of [oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) v3.0.11 (a Claude Code plugin) to the **OpenCode platform**.
14
+
15
+ | Original (Claude Code) | This Port (OpenCode) |
16
+ |------------------------|----------------------|
17
+ | [oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) | **oh-my-claudecode-opencode** (omco) |
18
+ | Shell hooks + Node.js bridge | Native TypeScript plugin API |
19
+ | Stop hook (proactive blocking) | session.idle event (reactive) |
20
+
21
+ ### Key Features Ported
22
+ - ✅ Ultrawork Mode (maximum intensity parallel execution)
23
+ - ✅ Ralph Loop (self-referential completion loop)
24
+ - ✅ TODO Continuation Enforcer
25
+ - ✅ PRD-based task tracking
26
+ - ✅ Notepad memory system (`<remember>` tags)
27
+ - ✅ Background agent orchestration
28
+ - ✅ Session state persistence
29
+
30
+ ---
31
+
32
+ ## Features
33
+
34
+ ### Core Capabilities
35
+
36
+ - **TODO Continuation Enforcer** - Automatically reminds the assistant to complete pending tasks
37
+ - **Ultrawork Mode** - Maximum intensity parallel execution triggered by keywords
38
+ - **Ralph Loop** - Self-referential loop that continues until verified completion
39
+ - **Background Agents** - Run explore/librarian agents in parallel without blocking
40
+ - **Agent Usage Reminder** - Encourages using specialized agents over direct tool calls
41
+
42
+ ### Specialized Agents
43
+
44
+ > **Note:** New agent names are available with backward compatibility for legacy names.
45
+
46
+ | Agent (New) | Alias (Legacy) | Model | Purpose |
47
+ |-------------|----------------|-------|---------|
48
+ | `architect` | `oracle` | Opus | Strategic architecture & debugging advisor (READ-ONLY) |
49
+ | `architect-medium` | `oracle-medium` | Sonnet | Balanced architectural analysis (READ-ONLY) |
50
+ | `architect-low` | `oracle-low` | Haiku | Fast architectural checks (READ-ONLY) |
51
+ | `researcher` | `librarian` | Sonnet | Documentation & reference researcher |
52
+ | `researcher-low` | `librarian-low` | Haiku | Quick documentation lookup |
53
+ | `explore` | - | Haiku | Fast codebase search |
54
+ | `explore-medium` | - | Sonnet | Deeper codebase analysis |
55
+ | `designer` | `frontend-engineer` | Sonnet | UI/UX designer-developer |
56
+ | `designer-low` | `frontend-engineer-low` | Haiku | Fast UI changes |
57
+ | `designer-high` | `frontend-engineer-high` | Opus | Complex UI architecture |
58
+ | `writer` | `document-writer` | Haiku | Technical documentation |
59
+ | `executor` | `sisyphus-junior` | Sonnet | Focused task executor |
60
+ | `executor-low` | `sisyphus-junior-low` | Haiku | Simple task execution |
61
+ | `executor-high` | `sisyphus-junior-high` | Opus | Complex multi-file tasks |
62
+ | `planner` | `prometheus` | Opus | Strategic planning |
63
+ | `analyst` | `metis` | Opus | Pre-planning analysis |
64
+ | `critic` | `momus` | Opus | Plan review |
65
+ | `vision` | `multimodal-looker` | Sonnet | Visual/media analysis |
66
+ | `qa-tester` | - | Sonnet | Interactive CLI testing |
67
+
68
+ ## Installation
69
+
70
+ ```bash
71
+ # Using npm
72
+ npm install oh-my-claudecode-opencode
73
+
74
+ # Using bun
75
+ bun add oh-my-claudecode-opencode
76
+
77
+ # Using pnpm
78
+ pnpm add oh-my-claudecode-opencode
79
+ ```
80
+
81
+ Then add to your OpenCode configuration:
82
+
83
+ ```json
84
+ {
85
+ "plugins": ["oh-my-claudecode-opencode"]
86
+ }
87
+ ```
88
+
89
+ ## Usage
90
+
91
+ ### Ultrawork Mode
92
+
93
+ Trigger maximum performance mode by including keywords in your prompt:
94
+
95
+ ```
96
+ ultrawork: Implement the authentication system with tests
97
+ ```
98
+
99
+ or
100
+
101
+ ```
102
+ ulw refactor the database layer
103
+ ```
104
+
105
+ Keywords: `ultrawork`, `ulw`, `uw`
106
+
107
+ ### Slash Commands
108
+
109
+ | Command | Description |
110
+ |---------|-------------|
111
+ | `/ultrawork <task>` | Maximum intensity parallel execution |
112
+ | `/ralph-loop <task>` | Completion guarantee loop |
113
+ | `/ultrawork-ralph <task>` | Combined max intensity + completion guarantee |
114
+ | `/ultraqa <goal>` | QA cycling workflow |
115
+ | `/ralplan <task>` | Iterative planning with Planner/Architect/Critic |
116
+ | `/plan <task>` | Start planning session |
117
+ | `/review <plan>` | Review plan with Critic |
118
+ | `/doctor` | Diagnose installation issues |
119
+ | `/cancel-ralph` | Cancel Ralph Loop |
120
+ | `/cancel-ultraqa` | Cancel UltraQA |
121
+
122
+ ### Ralph Loop
123
+
124
+ Start a self-referential loop that continues until the task is verified complete:
125
+
126
+ ```
127
+ /ralph-loop "Implement user registration with email verification"
128
+ ```
129
+
130
+ Cancel with:
131
+
132
+ ```
133
+ /cancel-ralph
134
+ ```
135
+
136
+ ### Background Agents
137
+
138
+ The plugin provides tools for running agents in the background:
139
+
140
+ ```typescript
141
+ // Run explore agent in background
142
+ background_task(agent="explore", prompt="Find all authentication-related files")
143
+
144
+ // Run librarian for documentation research
145
+ background_task(agent="librarian", prompt="Find JWT best practices documentation")
146
+
147
+ // Get results when ready
148
+ background_output(task_id="...")
149
+
150
+ // Cancel all background tasks
151
+ background_cancel(all=true)
152
+ ```
153
+
154
+ ### Call Agents Directly
155
+
156
+ ```typescript
157
+ // Synchronous call
158
+ call_omo_agent(
159
+ subagent_type="oracle",
160
+ prompt="Review this architecture decision...",
161
+ run_in_background=false
162
+ )
163
+
164
+ // Async call
165
+ call_omo_agent(
166
+ subagent_type="explore",
167
+ prompt="Find all React components",
168
+ run_in_background=true
169
+ )
170
+ ```
171
+
172
+ ## Configuration
173
+
174
+ Create `.opencode/omco.json` in your project:
175
+
176
+ ```json
177
+ {
178
+ "disabled_hooks": [],
179
+ "background_task": {
180
+ "max_concurrent": 5,
181
+ "timeout_ms": 300000
182
+ },
183
+ "ralph_loop": {
184
+ "max_iterations": 50,
185
+ "idle_timeout_ms": 30000
186
+ },
187
+ "todo_continuation": {
188
+ "idle_threshold_ms": 15000,
189
+ "reminder_interval_ms": 60000
190
+ },
191
+ "ultrawork": {
192
+ "keywords": ["ultrawork", "ulw", "uw"],
193
+ "auto_parallel": true
194
+ }
195
+ }
196
+ ```
197
+
198
+ ### Configuration Options
199
+
200
+ | Option | Description | Default |
201
+ |--------|-------------|---------|
202
+ | `disabled_hooks` | Hooks to disable | `[]` |
203
+ | `background_task.max_concurrent` | Max parallel background tasks | `5` |
204
+ | `background_task.timeout_ms` | Background task timeout | `300000` |
205
+ | `ralph_loop.max_iterations` | Max loop iterations | `50` |
206
+ | `ralph_loop.idle_timeout_ms` | Idle time before continuation | `30000` |
207
+ | `todo_continuation.idle_threshold_ms` | Idle threshold for TODO check | `15000` |
208
+ | `ultrawork.keywords` | Trigger keywords | `["ultrawork", "ulw", "uw"]` |
209
+
210
+ ### Model Provider Configuration
211
+
212
+ By default, oh-my-claudecode-opencode uses **GitHub Copilot Claude 4.5 models** for the three tiers:
213
+
214
+ | Tier | Default Model |
215
+ |------|---------------|
216
+ | `haiku` | `github-copilot/claude-haiku-4.5` |
217
+ | `sonnet` | `github-copilot/claude-sonnet-4.5` |
218
+ | `opus` | `github-copilot/claude-opus-4.5` |
219
+
220
+ To use other providers like Google or OpenAI, configure `model_mapping.tierDefaults`:
221
+
222
+ ```json
223
+ {
224
+ "model_mapping": {
225
+ "tierDefaults": {
226
+ "haiku": "google/gemini-3-flash",
227
+ "sonnet": "google/gemini-3-pro-low",
228
+ "opus": "openai/gpt-5.2"
229
+ }
230
+ }
231
+ }
232
+ ```
233
+
234
+ **Model Format**: Always use `provider/model-name` format (e.g., `github-copilot/claude-sonnet-4.5`, `google/gemini-3-flash`)
235
+
236
+ **Tier Semantics**:
237
+ | Tier | Purpose | Typical Use |
238
+ |------|---------|-------------|
239
+ | `haiku` | Fast, cheap | explore, simple lookups, quick checks |
240
+ | `sonnet` | Balanced | executor, designer, most agents |
241
+ | `opus` | Most capable | architect, planner, complex reasoning |
242
+
243
+ **Partial Configuration**: You only need to specify tiers you want to override. Unspecified tiers fall back to Copilot Claude defaults.
244
+
245
+ **Per-Agent Override**: Override specific agents with either a tier or concrete model:
246
+
247
+ ```json
248
+ {
249
+ "agents": {
250
+ "architect": { "model": "openai/gpt-5.2" },
251
+ "explore": { "tier": "sonnet" },
252
+ "executor": { "model": "google/gemini-3-pro-low", "temperature": 0.3 }
253
+ }
254
+ }
255
+ ```
256
+
257
+ **Debug Logging**: Enable model resolution logging:
258
+
259
+ ```json
260
+ {
261
+ "model_mapping": {
262
+ "debugLogging": true
263
+ }
264
+ }
265
+ ```
266
+
267
+ ### Disabling Hooks
268
+
269
+ ```json
270
+ {
271
+ "disabled_hooks": [
272
+ "agent-usage-reminder",
273
+ "keyword-detector"
274
+ ]
275
+ }
276
+ ```
277
+
278
+ Available hooks:
279
+ - `todo-continuation-enforcer`
280
+ - `keyword-detector`
281
+ - `ralph-loop`
282
+ - `session-recovery`
283
+ - `agent-usage-reminder`
284
+
285
+ ## How It Works
286
+
287
+ ### TODO Continuation Enforcer
288
+
289
+ When the assistant has incomplete TODO items and becomes idle:
290
+
291
+ 1. Plugin detects idle state (no tool calls for configured threshold)
292
+ 2. Checks if pending/in_progress TODOs exist
293
+ 3. Injects continuation prompt:
294
+
295
+ ```
296
+ [SYSTEM REMINDER - TODO CONTINUATION]
297
+ Incomplete tasks remain in your todo list. Continue working on the next pending task.
298
+ Proceed without asking for permission. Mark each task complete when finished.
299
+ Do not stop until all tasks are done.
300
+ ```
301
+
302
+ ### Ralph Loop
303
+
304
+ Self-referential execution loop:
305
+
306
+ 1. User invokes `/ralph-loop "task description"`
307
+ 2. Plugin creates PRD (Product Requirements Document) if not exists
308
+ 3. Monitors for completion signals (`<promise>DONE</promise>`)
309
+ 4. Re-injects task prompt on idle until completion
310
+ 5. Tracks iterations to prevent infinite loops
311
+
312
+ ### Ultrawork Mode
313
+
314
+ When triggered:
315
+
316
+ 1. Injects high-intensity system prompt
317
+ 2. Encourages parallel execution
318
+ 3. Minimizes confirmation requests
319
+ 4. Maximizes throughput
320
+
321
+ ## Development
322
+
323
+ ```bash
324
+ # Clone the repo
325
+ git clone https://github.com/devswha/oh-my-claudecode-opencode.git
326
+ cd oh-my-claudecode-opencode
327
+
328
+ # Install dependencies
329
+ bun install
330
+
331
+ # Build
332
+ bun run build
333
+
334
+ # Type check
335
+ bun run typecheck
336
+
337
+ # Run tests
338
+ bun test
339
+ ```
340
+
341
+ ## Philosophy
342
+
343
+ Named after Sisyphus from Greek mythology - condemned to roll a boulder up a hill for eternity. Like Sisyphus, this plugin embodies **persistence**:
344
+
345
+ - Tasks are tracked until completion
346
+ - The assistant cannot simply "give up"
347
+ - Work continues until the boulder reaches the summit
348
+
349
+ > "The struggle itself toward the heights is enough to fill a man's heart. One must imagine Sisyphus happy." - Albert Camus
350
+
351
+ ## Credits
352
+
353
+ This project is an **OpenCode port** of [oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) by [@Yeachan-Heo](https://github.com/Yeachan-Heo).
354
+
355
+ Special thanks to:
356
+ - [oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) - The original Claude Code plugin this project ports
357
+ - [OpenCode](https://github.com/opencode-ai/opencode) - The target platform
358
+
359
+ ## License
360
+
361
+ MIT
@@ -0,0 +1,357 @@
1
+ # Assets
2
+
3
+ **Parent:** [../AGENTS.md](../AGENTS.md)
4
+
5
+ ## Porting Context
6
+
7
+ oh-my-claudecode 설정 스키마를 OpenCode 형식으로 변환한 JSON 스키마. omo-omcs.schema.json은 oh-my-claudecode의 설정 스키마를 기반으로 하며, OpenCode 환경에 맞게 조정되었다. IDE 자동완성 및 검증 지원을 제공한다.
8
+
9
+ ## Overview
10
+
11
+ This directory contains static project assets, primarily the JSON schema definition for omo-omcs configuration validation.
12
+
13
+ ## Key Files
14
+
15
+ ### `omo-omcs.schema.json`
16
+ **Purpose**: JSON Schema for configuration file validation
17
+ **Schema Version**: Draft-07
18
+ **Usage**: Provides IDE autocomplete and validation for `.opencode/omo-omcs.json`
19
+
20
+ ## Schema Structure
21
+
22
+ ### Root Configuration Object
23
+
24
+ The schema defines a comprehensive configuration structure for the omo-omcs plugin:
25
+
26
+ ```json
27
+ {
28
+ "$schema": "http://json-schema.org/draft-07/schema#",
29
+ "title": "omo-omcs Configuration",
30
+ "description": "Configuration schema for Oh My OpenCode Sisyphus plugin",
31
+ "type": "object"
32
+ }
33
+ ```
34
+
35
+ ### Configuration Properties
36
+
37
+ #### `disabled_hooks`
38
+ **Type**: Array of strings
39
+ **Description**: List of hooks to disable
40
+ **Enum Values**:
41
+ - `todo-continuation-enforcer` - Disable TODO continuation prompts
42
+ - `keyword-detector` - Disable ultrawork/ralph keyword detection
43
+ - `ralph-loop` - Disable ralph-loop mode
44
+ - `session-recovery` - Disable session recovery
45
+ - `agent-usage-reminder` - Disable agent usage reminders
46
+
47
+ **Example**:
48
+ ```json
49
+ {
50
+ "disabled_hooks": ["todo-continuation-enforcer", "agent-usage-reminder"]
51
+ }
52
+ ```
53
+
54
+ #### `background_task`
55
+ **Type**: Object
56
+ **Description**: Background task execution configuration
57
+
58
+ **Properties**:
59
+ - `max_concurrent` (integer, 1-10, default: 5)
60
+ - Maximum concurrent background tasks
61
+
62
+ - `timeout_ms` (integer, 1000-600000, default: 300000)
63
+ - Default timeout in milliseconds (5 minutes)
64
+
65
+ **Example**:
66
+ ```json
67
+ {
68
+ "background_task": {
69
+ "max_concurrent": 3,
70
+ "timeout_ms": 120000
71
+ }
72
+ }
73
+ ```
74
+
75
+ #### `ralph_loop`
76
+ **Type**: Object
77
+ **Description**: Ralph-loop persistence mode configuration
78
+
79
+ **Properties**:
80
+ - `max_iterations` (integer, 1-100, default: 50)
81
+ - Maximum iterations before forced stop
82
+
83
+ - `idle_timeout_ms` (integer, 5000-300000, default: 30000)
84
+ - Idle timeout before continuation prompt (30 seconds)
85
+
86
+ - `prd_path` (string, default: ".omc/prd.json")
87
+ - Path to PRD file for structured tracking
88
+
89
+ **Example**:
90
+ ```json
91
+ {
92
+ "ralph_loop": {
93
+ "max_iterations": 75,
94
+ "idle_timeout_ms": 20000,
95
+ "prd_path": ".omc/requirements.json"
96
+ }
97
+ }
98
+ ```
99
+
100
+ #### `todo_continuation`
101
+ **Type**: Object
102
+ **Description**: TODO continuation enforcer configuration
103
+
104
+ **Properties**:
105
+ - `idle_threshold_ms` (integer, 5000-120000, default: 15000)
106
+ - Time before checking for incomplete TODOs (15 seconds)
107
+
108
+ - `reminder_interval_ms` (integer, 10000-300000)
109
+ - Interval between reminder prompts
110
+
111
+ **Example**:
112
+ ```json
113
+ {
114
+ "todo_continuation": {
115
+ "idle_threshold_ms": 10000,
116
+ "reminder_interval_ms": 30000
117
+ }
118
+ }
119
+ ```
120
+
121
+ ## IDE Integration
122
+
123
+ ### VSCode Setup
124
+
125
+ Enable schema validation in VSCode:
126
+
127
+ 1. **Option 1: In config file**
128
+ ```json
129
+ {
130
+ "$schema": "node_modules/oh-my-ssalsyphus/assets/omo-omcs.schema.json",
131
+ "disabled_hooks": []
132
+ }
133
+ ```
134
+
135
+ 2. **Option 2: In VSCode settings.json**
136
+ ```json
137
+ {
138
+ "json.schemas": [
139
+ {
140
+ "fileMatch": [".opencode/omo-omcs.json"],
141
+ "url": "./node_modules/oh-my-ssalsyphus/assets/omo-omcs.schema.json"
142
+ }
143
+ ]
144
+ }
145
+ ```
146
+
147
+ ### Benefits
148
+ - **Autocomplete**: IDE suggests valid property names
149
+ - **Validation**: Real-time error checking
150
+ - **Documentation**: Hover tooltips show property descriptions
151
+ - **Type checking**: Prevents invalid values (wrong types, out of range)
152
+
153
+ ## Schema Validation Examples
154
+
155
+ ### Valid Configuration
156
+ ```json
157
+ {
158
+ "$schema": "node_modules/oh-my-ssalsyphus/assets/omo-omcs.schema.json",
159
+ "disabled_hooks": ["agent-usage-reminder"],
160
+ "background_task": {
161
+ "max_concurrent": 8,
162
+ "timeout_ms": 180000
163
+ },
164
+ "ralph_loop": {
165
+ "max_iterations": 100,
166
+ "idle_timeout_ms": 25000,
167
+ "prd_path": ".omc/prd.json"
168
+ },
169
+ "todo_continuation": {
170
+ "idle_threshold_ms": 20000
171
+ }
172
+ }
173
+ ```
174
+
175
+ ### Invalid Examples
176
+
177
+ #### Out of Range
178
+ ```json
179
+ {
180
+ "background_task": {
181
+ "max_concurrent": 15 // ❌ Max is 10
182
+ }
183
+ }
184
+ ```
185
+
186
+ #### Invalid Hook Name
187
+ ```json
188
+ {
189
+ "disabled_hooks": ["invalid-hook"] // ❌ Not in enum
190
+ }
191
+ ```
192
+
193
+ #### Wrong Type
194
+ ```json
195
+ {
196
+ "ralph_loop": {
197
+ "max_iterations": "50" // ❌ Should be integer, not string
198
+ }
199
+ }
200
+ ```
201
+
202
+ ## Schema Maintenance
203
+
204
+ ### Updating the Schema
205
+
206
+ When adding new config options:
207
+
208
+ 1. **Add to Zod schema** (`src/config/index.ts`):
209
+ ```typescript
210
+ const ConfigSchema = z.object({
211
+ new_feature: z.object({
212
+ enabled: z.boolean().optional()
213
+ }).optional()
214
+ });
215
+ ```
216
+
217
+ 2. **Add to JSON schema** (`assets/omo-omcs.schema.json`):
218
+ ```json
219
+ {
220
+ "properties": {
221
+ "new_feature": {
222
+ "type": "object",
223
+ "properties": {
224
+ "enabled": {
225
+ "type": "boolean",
226
+ "default": false
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ ```
233
+
234
+ 3. **Update documentation** (this file)
235
+
236
+ 4. **Add validation test** (`tests/config.test.ts`)
237
+
238
+ ### Schema Versioning
239
+
240
+ - Schema follows JSON Schema Draft-07
241
+ - Breaking changes require major version bump
242
+ - New optional properties = minor version bump
243
+ - Clarifications/docs = patch version bump
244
+
245
+ ## Package Export
246
+
247
+ The schema is exported via package.json:
248
+
249
+ ```json
250
+ {
251
+ "exports": {
252
+ "./schema.json": "./assets/omo-omcs.schema.json"
253
+ }
254
+ }
255
+ ```
256
+
257
+ Usage in user projects:
258
+ ```json
259
+ {
260
+ "$schema": "node_modules/oh-my-ssalsyphus/schema.json"
261
+ }
262
+ ```
263
+
264
+ ## Validation Tools
265
+
266
+ ### Manual Validation
267
+
268
+ ```bash
269
+ # Install ajv-cli
270
+ npm install -g ajv-cli
271
+
272
+ # Validate config
273
+ ajv validate \
274
+ -s node_modules/oh-my-ssalsyphus/assets/omo-omcs.schema.json \
275
+ -d .opencode/omo-omcs.json
276
+ ```
277
+
278
+ ### Programmatic Validation
279
+
280
+ ```typescript
281
+ import Ajv from 'ajv';
282
+ import schema from 'oh-my-ssalsyphus/schema.json';
283
+
284
+ const ajv = new Ajv();
285
+ const validate = ajv.compile(schema);
286
+
287
+ const config = { /* ... */ };
288
+ const valid = validate(config);
289
+
290
+ if (!valid) {
291
+ console.error(validate.errors);
292
+ }
293
+ ```
294
+
295
+ ## Schema Features
296
+
297
+ ### Property Constraints
298
+ - **Type enforcement**: string, integer, boolean, array, object
299
+ - **Range validation**: minimum, maximum for integers
300
+ - **Enum validation**: Fixed set of allowed values
301
+ - **Default values**: Auto-filled by IDE
302
+ - **Required properties**: Currently all optional
303
+
304
+ ### Additional Validation
305
+ - `additionalProperties: false` - Prevent unknown properties
306
+ - Descriptions for all properties - IDE tooltips
307
+ - Default values documented - User guidance
308
+
309
+ ## Common Patterns
310
+
311
+ ### Timeout Configuration
312
+ All timeouts use milliseconds:
313
+ - 1000ms = 1 second
314
+ - 60000ms = 1 minute
315
+ - 300000ms = 5 minutes
316
+
317
+ ### Iteration Limits
318
+ Prevent infinite loops:
319
+ - `max_iterations`: 1-100 (ralph-loop)
320
+ - `max_concurrent`: 1-10 (background tasks)
321
+
322
+ ### Path Configuration
323
+ Use relative paths from project root:
324
+ - `.omc/prd.json` - PRD file
325
+ - `.omc/progress.txt` - Progress tracking
326
+
327
+ ## Integration Points
328
+
329
+ - **Config Loader**: `/home/calvin/workspace/omo-omcs/src/config/` - Uses Zod for runtime validation
330
+ - **Documentation**: `/home/calvin/workspace/omo-omcs/docs/` - Schema usage in README
331
+ - **Tests**: `/home/calvin/workspace/omo-omcs/tests/` - Schema validation tests
332
+
333
+ ## Future Enhancements
334
+
335
+ ### Planned Schema Features
336
+ - **Agent-specific config**: Override settings per agent
337
+ - **Mode presets**: Predefined mode combinations
338
+ - **Notification settings**: Configure toast/prompt behavior
339
+ - **Logging config**: Debug levels, output formats
340
+ - **Performance tuning**: Token limits, parallelization settings
341
+
342
+ ### Schema Improvements
343
+ - **$ref support**: Reusable schema definitions
344
+ - **Conditional schemas**: If/then/else validation
345
+ - **Pattern properties**: Dynamic property names
346
+ - **Dependencies**: Property interdependencies
347
+ - **Examples**: Inline config examples
348
+
349
+ ## Dependencies
350
+
351
+ - None (pure JSON schema)
352
+
353
+ ## Related Documentation
354
+
355
+ - [Config System](../src/config/AGENTS.md) - Runtime config loading
356
+ - [Documentation](../docs/AGENTS.md) - Usage examples
357
+ - [JSON Schema Spec](https://json-schema.org/draft-07/schema) - Schema reference