Summary
Follow-up to #601 (now closed - all 24 original rules shipped). Recent OpenCode schema changes (Feb-Mar 2026) introduce new validatable fields, deprecations, and a TUI config split. Research source: sst/opencode dev branch, v1.2.18.
Proposed New Rules
Deprecation Warnings (OC-DEP-*)
| Rule |
What |
Autofix |
Confidence |
| OC-DEP-001 |
mode (top-level) deprecated - use agent |
yes (safe) - rename key |
HIGH |
| OC-DEP-002 |
tools (top-level) deprecated - use permission |
yes (safe) - rename key |
HIGH |
| OC-DEP-003 |
autoshare deprecated - use share |
yes (safe) - rename key |
HIGH |
| OC-DEP-004 |
CONTEXT.md deprecated - use AGENTS.md |
yes (safe) - rename file |
HIGH |
Config Field Validation (OC-CFG-*)
| Rule |
What |
Autofix |
Confidence |
| OC-CFG-008 |
Invalid logLevel value (must be fatal/error/warn/info/debug/trace) |
yes (unsafe) - suggest closest |
HIGH |
| OC-CFG-009 |
compaction.reserved must be integer >= 0 |
no |
HIGH |
| OC-CFG-010 |
skills.urls entries must be valid URLs |
no |
HIGH |
| OC-CFG-011 |
MCP timeout must be positive integer |
no |
HIGH |
| OC-CFG-012 |
MCP OAuth invalid structure (strict: clientId/clientSecret/scope only) |
no |
MEDIUM |
Agent Validation (OC-AG-*)
| Rule |
What |
Autofix |
Confidence |
| OC-AG-005 |
top_p out of range (must be 0-1) |
no |
HIGH |
| OC-AG-006 |
Named color must be valid enum (primary/secondary/accent/success/warning/error/info) |
yes (unsafe) - suggest closest |
HIGH |
| OC-AG-007 |
Redundant steps + maxSteps on same agent |
yes (safe) - keep steps, remove maxSteps |
MEDIUM |
| OC-AG-008 |
hidden must be boolean |
no |
HIGH |
LSP/Formatter Validation (OC-LSP-*)
| Rule |
What |
Autofix |
Confidence |
| OC-LSP-001 |
Custom LSP server with command missing extensions |
no |
HIGH |
| OC-LSP-002 |
LSP extensions must be non-empty array of strings |
no |
MEDIUM |
TUI Config Validation (OC-TUI-*)
| Rule |
What |
Autofix |
Confidence |
| OC-TUI-001 |
Unknown TUI config field (strict schema) |
no |
HIGH |
| OC-TUI-002 |
scroll_speed must be >= 0.001 |
no |
HIGH |
| OC-TUI-003 |
diff_style must be "auto" or "stacked" |
yes (unsafe) - suggest closest |
MEDIUM |
Total: 18 new rules (6 with autofix)
Autofix Summary (all rules, existing + new)
| Rule |
Fix Type |
Safety |
| OC-001 |
Replace invalid share mode |
unsafe |
| OC-008 |
Replace invalid permission value |
unsafe |
| OC-SK-001 |
Remove unsupported skill field |
safe |
| OC-DEP-001 |
Rename mode to agent |
safe |
| OC-DEP-002 |
Rename tools to permission |
safe |
| OC-DEP-003 |
Rename autoshare to share |
safe |
| OC-DEP-004 |
Rename CONTEXT.md to AGENTS.md |
safe |
| OC-CFG-008 |
Suggest closest valid logLevel |
unsafe |
| OC-AG-006 |
Suggest closest valid named color |
unsafe |
| OC-AG-007 |
Remove redundant maxSteps |
safe |
| OC-TUI-003 |
Suggest closest valid diff_style |
unsafe |
Acceptance Criteria
References
Summary
Follow-up to #601 (now closed - all 24 original rules shipped). Recent OpenCode schema changes (Feb-Mar 2026) introduce new validatable fields, deprecations, and a TUI config split. Research source:
sst/opencodedev branch, v1.2.18.Proposed New Rules
Deprecation Warnings (OC-DEP-*)
mode(top-level) deprecated - useagenttools(top-level) deprecated - usepermissionautosharedeprecated - useshareCONTEXT.mddeprecated - useAGENTS.mdConfig Field Validation (OC-CFG-*)
logLevelvalue (must be fatal/error/warn/info/debug/trace)compaction.reservedmust be integer >= 0skills.urlsentries must be valid URLstimeoutmust be positive integerAgent Validation (OC-AG-*)
top_pout of range (must be 0-1)steps+maxStepson same agentsteps, removemaxStepshiddenmust be booleanLSP/Formatter Validation (OC-LSP-*)
commandmissingextensionsextensionsmust be non-empty array of stringsTUI Config Validation (OC-TUI-*)
scroll_speedmust be >= 0.001diff_stylemust be "auto" or "stacked"Total: 18 new rules (6 with autofix)
Autofix Summary (all rules, existing + new)
modetoagenttoolstopermissionautosharetoshareCONTEXT.mdtoAGENTS.mdmaxStepsAcceptance Criteria
knowledge-base/rules.jsonandVALIDATION-RULES.mdReferences
sst/opencodepackages/opencode/src/config/config.tspackages/opencode/src/tui/tui-schema.ts(split Feb 25, 2026)