Guide / artifact / RULE

RULE artifact: publish instructions

Use a RULE artifact for markdown instructions that should be applied globally, to matching files, or when a tool recognizes a description.

The rule props

content declares how the markdown entrypoint should be applied. Providers translate the same neutral shape into their native frontmatter or managed instruction file.

apply Use always for global instructions, specific_files for file-pattern targeting, or the provider's smart-trigger mode when you provide smart_trigger.
entrypoint Relative markdown path such as RULE.md. It must be in files and is read as UTF-8 text.
file_patterns Patterns used with specific_files, for example **/*.go or frontend/**. They are written into the provider's native targeting metadata.
smart_trigger Human-readable activation description for providers that support description-based rule discovery.

Examples of the three modes

Use only the props needed by the chosen mode. Keeping the mode explicit makes the same release predictable across providers.

// Always apply
{ "apply": "always", "entrypoint": "RULE.md" }

// Apply to matching files
{
  "apply": "specific_files",
  "entrypoint": "RULE.md",
  "file_patterns": ["**/*.go", "internal/**"]
}

// Ask the provider to discover it by description
{
  "apply": "smart_trigger",
  "entrypoint": "RULE.md",
  "smart_trigger": "Apply when reviewing database migrations"
}

Write the markdown

Make the rule actionable: explain the constraint, show the preferred pattern, identify exceptions and keep the scope aligned with apply. Do not put provider-specific generated frontmatter in the source unless the provider requires it; the applicator supplies its own metadata.

  • Include RULE.md and any linked references in files.
  • Use specific_files only when file_patterns are meaningful; an empty target list cannot express useful scope.
  • Bump version when the rule's behavior changes, even if the filename stays the same.
  • Test the installed result in each target provider because native rule discovery differs.

What install materializes

Providers write a HubBound-owned rule file or managed markdown block. Cursor and Copilot use native targeting metadata for specific files; Claude Code and other providers translate the same intent into their supported rule format. A provider can soft-skip unsupported optional modes.