export_rules
Export promoted behavioral patterns as structured JSON for programmatic use in analytics or external systems. Filters to high-confidence rules.
Instructions
Export promoted-level patterns (rule + universal) as structured JSON.
Filters to patterns with promoted >= 2 — the threshold set by
consolidate() after enough reinforcement. Intended for programmatic
consumption: analytics pipelines, sibling agents, external
dashboards. Read-only; takes no parameters.
For human-readable Markdown use export_claude_md(). For platform-
specific formats use export_platform() (.cursorrules, .windsurf,
AGENTS.md) or export_skill() (anthropics/skills SKILL.md). For
lower-confidence audits use list_instincts(min_confidence=5).
Returns:
{"rules": [<record>, ...], "count": int, "hint": str}
Each <record> has: "pattern" (str key with prefix),
"category" ("sequence"|"preference"|"fix_pattern"|"combo"),
"confidence" (int observation count),
"promoted" (2=rule, 3=universal — lower levels are filtered out),
"level" ("rule"|"universal"),
"project" (str fingerprint, "" = global),
"source" (str origin tag), "metadata" (parsed dict),
"explain" (str human note),
"first_seen" and "last_seen" (ISO 8601 timestamps).
Sorted by promoted descending, then confidence descending.
Empty "rules" means no pattern has reached rule level yet —
the "hint" directs to run consolidate() first, then retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||