Read the effective rule stack (console plane)
GET /v1/admin/orgs/{org_id}/projects/{project_id}/rules
Read the §7 precedence-ordered effective writing-rule stack for the resolved org/project (and optional category), applied SERVER-SIDE (deterministic, NO LLM). The agent-plane read (GET /v1/rules) is AgentKey-only, so the console reads the SAME ordered list here (Clerk session) for its rules panel.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path 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 scopeResource not found.
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