Rules
Rules are system prompts and custom instructions that guide AI behavior. They define coding standards, project conventions, response styles, and any other behavioral guidance for the AI tool. Rules are the most universal content type — every provider supports them.
What Rules Do
Section titled “What Rules Do”Rules tell the AI tool how to behave. Common uses:
- Coding conventions (language preferences, formatting, patterns)
- Project-specific context (architecture decisions, tech stack)
- Response style (verbosity, tone, explanation depth)
- Workflow instructions (testing requirements, review processes)
syllago Format
Section titled “syllago Format”Rules in your library are stored as a directory containing two files: a .syllago.yaml metadata file and a Markdown content file.
Metadata (.syllago.yaml):
id: d21d767c-1654-46a5-bc5c-d6aa8d5fbe2cname: typescripttype: rulessource_format: mdsource_type: provideradded_at: 2026-03-11T19:23:53Zadded_by: syllagoContent (typescript.md):
---description: TypeScript coding conventions for this projectglobs: "**/*.ts"---
Use strict TypeScript with explicit return types. Prefer functionalpatterns over classes. Write Vitest tests for all new functions.The source_format field records the original format the rule was imported from. The source_type field indicates whether it came from a provider config or was created directly.
Provider Compatibility
Section titled “Provider Compatibility”Rules are supported by every provider:
| Provider | Format | Extension | Notes |
|---|---|---|---|
| Claude Code | Markdown | .md | CLAUDE.md or .claude/rules/ |
| Gemini CLI | Markdown | .md | GEMINI.md |
| Copilot CLI | Markdown | .md | .github/copilot-instructions.md or AGENTS.md |
| Codex | Markdown | .md | AGENTS.md |
| Cursor | MDC | .mdc | .cursor/rules/ or .cursorrules |
| Windsurf | Markdown | .md | .windsurfrules or .windsurf/rules/ |
| Zed | Markdown | .md | .rules, .cursorrules, or CLAUDE.md |
| Cline | Markdown | .md | .clinerules/ |
| Roo Code | Markdown | .md | .roo/rules/ with mode-specific subdirectories |
| OpenCode | Markdown | .md | AGENTS.md or CLAUDE.md |
| Kiro | Markdown | .md | .kiro/steering/ |
| Amp | Markdown | .md | AGENTS.md, AGENT.md, CLAUDE.md |
Format Differences
Section titled “Format Differences”Most providers use plain Markdown, but two require conversion:
Cursor (MDC format)
Section titled “Cursor (MDC format)”Cursor uses MDC (Markdown Component) format with .mdc extension. Syllago maps Markdown frontmatter fields to MDC metadata headers automatically.
syllago format (Markdown with frontmatter):
---description: TypeScript coding conventionsglobs: "**/*.ts"alwaysApply: false---
Use strict TypeScript with explicit return types.Cursor output (.mdc):
---description: TypeScript coding conventionsglobs: "**/*.ts"alwaysApply: false---
Use strict TypeScript with explicit return types.The structure looks similar, but the file extension and how the metadata is parsed differs. Cursor expects .mdc and interprets the header block as MDC metadata rather than YAML frontmatter.
OpenCode (YAML format)
Section titled “OpenCode (YAML format)”OpenCode stores rules as YAML files. Syllago strips the Markdown frontmatter and converts the content into OpenCode’s YAML structure.
syllago format (Markdown):
---description: TypeScript coding conventionsglobs: "**/*.ts"---
Use strict TypeScript with explicit return types.OpenCode output (.yaml):
name: typescriptdescription: TypeScript coding conventionsglobs: - "**/*.ts"content: | Use strict TypeScript with explicit return types.Working with Rules
Section titled “Working with Rules”Creating a rule
Section titled “Creating a rule”syllago create rules my-rule --provider claude-codeThis scaffolds a new rule directory under local/ with template files and .syllago.yaml metadata.
Importing from a provider
Section titled “Importing from a provider”syllago add --from claude-codeThis scans the provider’s config directory and imports any rules into your syllago library in the provider-neutral format.
Installing to a provider
Section titled “Installing to a provider”Rules install to the target provider’s rules directory, converting format automatically:
syllago install my-rule --to cursorInspecting a rule
Section titled “Inspecting a rule”syllago inspect rules/claude-code/my-ruleShows the full metadata and content for pre-install auditing.
Further Reading
Section titled “Further Reading”- Content Types Overview — provider compatibility matrix and other content types
- Format Conversion — how syllago converts between provider formats