OpenCode — Rules
- File format
- Markdown
- Discovery paths
-
AGENTS.md,CLAUDE.md - Global install path
-
~/.config/opencode - Syllago install method
- Symlink, Direct copy
- Symlink support
- Yes
Features
How each feature converts to syllago's canonical format. See format conversion for what these statuses mean.
Other features
Behaviors, conventions, and capabilities that aren't tied to a single named field — things like path-based activation, discovery rules, and lifecycle behavior.
| Feature | Conversion | Summary |
|---|---|---|
cross_provider_recognition | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | OpenCode reads AGENTS.md (cross-provider convention) and CLAUDE.md (Claude Code fallback) from project root and parent directories; ~/.config/opencode/AGENTS.md and ~/.claude/CLAUDE.md at global scope; CLAUDE.md compat can be disabled via OPENCODE_DISABLE_CLAUDE_CODE env var |
file_imports | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | The instructions array in opencode.json (or ~/.config/opencode/opencode.json) lists additional rule files by relative path, glob pattern, or remote URL; all are combined with AGENTS.md and loaded into context |
hierarchical_loading | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | OpenCode traverses up from the current directory collecting AGENTS.md (or CLAUDE.md fallback) at each level; global files at ~/.config/opencode/AGENTS.md and ~/.claude/CLAUDE.md are appended; all matching files are combined into context |
| instructions array in opencode.json | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | The instructions field in opencode.json (or the global ~/.config/opencode/opencode.json) accepts a list of relative file paths, glob patterns (e.g., packages/*/AGENTS.md), or remote HTTPS URLs pointing to additional instruction files. All are fetched and combined with AGENTS.md content. Remote URLs are fetched with a 5-second timeout. |
| /init command for AGENTS.md generation | Conversion type: No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → | The /init slash command scans the project and generates or updates AGENTS.md with project-specific guidance including build/lint/test commands, architecture notes, and conventions. |
| AGENTS.md cross-provider convention | Preserved Conversion type: Preserved Syntax survives conversion but the target provider may not interpret it. Learn more → | Plain markdown rule file at project root, shared with other agent tools (no frontmatter, context-injected). |
| CLAUDE.md compatibility | Preserved Conversion type: Preserved Syntax survives conversion but the target provider may not interpret it. Learn more → | OpenCode reads CLAUDE.md at project root and ~/.claude/CLAUDE.md globally as fallbacks when no AGENTS.md exists. Compat can be fully disabled via OPENCODE_DISABLE_CLAUDE_CODE=1, or partially via OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1 (global only) or OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1. |
Sources
| Source |
|---|
| https://opencode.ai/docs/rules/ |