operational_rules/ · Body: the rule text
The MDX body is the rule itself — the directive the agent reads when this rule matches a task. See Prompting an Operational Rule for what makes a good rule body.
Frontmatter
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
org | string | null | No | tenant | Organization name. Omit (or null) to make the rule available to every org in the tenant. |
name | string | Yes | — | Display name. Used in the matching trace on each task. |
tags | string[] | No | [] | Vocab-validated tags that scope this rule. |
Fields NOT supported
id,tenant_id,created_at,updated_at— system-set- The rule text — lives in the body, not frontmatter
document_id,source_section,text_hash— these mark rules auto-extracted from Knowledge uploads; declaring them in MDX would collide with the extractor
Example
operational_rules/nginx-restart.mdx
Tag scoping rules
Rules are matched against the target host’s tags and against tags inferred from the task action. The rule applies only when every one of its tags satisfies one of those sources.- A rule with no tags applies broadly — anywhere in the org.
- Adding scope tags (
os:,type:,tech:,shell:,app:*) narrows it to fewer hosts. - Adding a procedure tag (
procedure:restart,procedure:deploy, etc.) narrows it to fewer actions. - A rule with multiple procedure tags matches if any of them matches.
Gotchas
- Untagged + tenant-scoped = applied to everything. A rule with no
organd notagsbecomes a universal guardrail. Use sparingly. tagsis the only scope mechanism. Nohost:<name>pin exists — rule retrieval is pure tag intersection. To target a specific host, give it (and the rule) a matchingapp:<name>tag.- Auto-extracted rules from Knowledge can be replaced by re-uploads. A rule you declare in MDX is independent of the extractor and won’t be touched by re-ingest.

