Skip to Content

Rules

⚡ 3 min read

Rules (Guidelines on the home page) — one policy the agent should follow in a specific situation. Keep unrelated policies in separate files — do not stack several topics into one Rule.

Save each file as --kind rule --name <name>.


Shape

/transcodes asks for this shape. The CLI does not enforce it.

Size100–500 tokens, one policy
FrontmatterNon-empty description; globs as a YAML array (not a plain string)
Sections# Must, # Never
--- description: Load when writing about the product globs: - "docs/**/*.md" - "content/**/*.mdx" --- # Must - Use product names and approved claims from the Knowledge Base - Leave a fact out when the Knowledge Base does not state it # Never - Invent a product name, price, or customer - Treat a guess as a durable fact

description should say when the Rule loads. globs should match the files where it applies.

If you need two unrelated Must/Never groups, split them into two Rules with their own descriptions and globs.


Save

transcodes persona save --persona developer --kind rule --name security --content-file /tmp/security.md

Next: Skills · Knowledge Base

Last updated on