Skip to content llms.txt

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.

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)

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-d6aa8d5fbe2c
name: typescript
type: rules
source_format: md
source_type: provider
added_at: 2026-03-11T19:23:53Z
added_by: syllago

Content (typescript.md):

---
description: TypeScript coding conventions for this project
globs: "**/*.ts"
---
Use strict TypeScript with explicit return types. Prefer functional
patterns 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.

Rules are supported by every provider:

ProviderFormatExtensionNotes
Claude CodeMarkdown.mdCLAUDE.md or .claude/rules/
Gemini CLIMarkdown.mdGEMINI.md
Copilot CLIMarkdown.md.github/copilot-instructions.md or AGENTS.md
CodexMarkdown.mdAGENTS.md
CursorMDC.mdc.cursor/rules/ or .cursorrules
WindsurfMarkdown.md.windsurfrules or .windsurf/rules/
ZedMarkdown.md.rules, .cursorrules, or CLAUDE.md
ClineMarkdown.md.clinerules/
Roo CodeMarkdown.md.roo/rules/ with mode-specific subdirectories
OpenCodeMarkdown.mdAGENTS.md or CLAUDE.md
KiroMarkdown.md.kiro/steering/
AmpMarkdown.mdAGENTS.md, AGENT.md, CLAUDE.md

Most providers use plain Markdown, but two require conversion:

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 conventions
globs: "**/*.ts"
alwaysApply: false
---
Use strict TypeScript with explicit return types.

Cursor output (.mdc):

---
description: TypeScript coding conventions
globs: "**/*.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 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 conventions
globs: "**/*.ts"
---
Use strict TypeScript with explicit return types.

OpenCode output (.yaml):

name: typescript
description: TypeScript coding conventions
globs:
- "**/*.ts"
content: |
Use strict TypeScript with explicit return types.
Terminal window
syllago create rules my-rule --provider claude-code

This scaffolds a new rule directory under local/ with template files and .syllago.yaml metadata.

Terminal window
syllago add --from claude-code

This scans the provider’s config directory and imports any rules into your syllago library in the provider-neutral format.

Rules install to the target provider’s rules directory, converting format automatically:

Terminal window
syllago install my-rule --to cursor
Terminal window
syllago inspect rules/claude-code/my-rule

Shows the full metadata and content for pre-install auditing.