Get the ordered writing-rule set (precedence ladder applied)
GET /v1/rules
Return the ORDERED active rule list with the deterministic §7 precedence ladder applied SERVER-SIDE (NO LLM on our side): hard before soft; specificity per-agent > category > general/house-style; human before agent; newest rev/created_at; higher priority. Includes the general/house-style layer (D2) IN ADDITION to the named category’s rules, plus a soft return cap (≈25/category + 25 general, dropping the least-specific general first). The agent reconciles the ordered list semantically; we never apply a rule. Rules are CUSTOMER-scoped and agent-attributed (the cross-agent exception).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Category id (cat_…). Empty returns ONLY the house-style/general layer.
Narrow to one layer (general | category). Default returns both.
Responses
Section titled “ Responses ”Ok
The ORDERED active rule set (the §7 precedence ladder applied SERVER-SIDE, capped). Category rules precede general/house-style rules; within each, highest precedence first. The agent reconciles the list semantically (NO LLM on our side).
object
A learned writing rule (rule_…) in the Review Loop (D2/D11). House-style/ general (scope=‘general’, applies across all categories) or category-scoped. Append-only by supersession: an edit is a new rev (same lineage_id) with the prior flipped to superseded. Read by the agent at compose/redraft time via the ordered get_rules ladder; we never apply it. Opaque ids only (D10).
object
Opaque rule id (rule_…).
Ownership layer (org/project model). org = house-style inherited by every project in the org; project = layered on top (the agent-plane default). Project/per-agent rules outrank broader org rules in the ordered get_rules ladder.
The org this rule belongs to.
The project this rule belongs to; empty for an org-layer rule.
Stable lineage handle across versions (rln_…).
General = house-style (D2).
Set iff scope=category (cat_…).
Set for a per-agent override; empty = all org agents.
Hard = non-overridable.
The prior rev this row superseded (rule_…).
Opaque short-lived proof of this exact effective rules snapshot. Omitted on filtered scope queries.
Missing or invalid credential.
The canonical error envelope. error is a stable machine code.
object
Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).
Example
forbiddenHuman-readable detail (never leaks internals).
Example
missing required scopeAuthenticated but lacking the required scope, or out of quota.
The canonical error envelope. error is a stable machine code.
object
Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).
Example
forbiddenHuman-readable detail (never leaks internals).
Example
missing required scope