Every rule against the proof there is for it
The whole rule corpus joined to the tree and the ledger: per rule, its class, its enforcement mode, the validator and the cases it names, whether each is in the tree, the execution behind each, the CI gates that run them, and the sentence explaining how the state was derived. The tallies count the whole corpus even when the answer is filtered, and the findings name every rule whose declared class the proof does not support. Kept per checkout state, never longer: the ledger is a file that changes outside this process, and an edit of it, of a validator or of any tracked file, a new untracked file, a commit or a new ref is a new answer.
- query
- behaviorally_verified
- benchmark required
- cache checkout (max_entries=8)
- MCP tool majordomus_rules
- MCP resource {"name": "rules", "uri": "majordomus://rules"}
- $ rules report
Query parameters
| name | type | required | description | examples |
|---|---|---|---|---|
| state | RuleState | null | no | Only rules in this proof state (`proven`, `inputs_unchanged`, `stale`, `failing`, `not_run`, `unrunnable`, `dangling`, `unproven`). Absent: every rule. | |
| class | RuleClass | null | no | Only rules of this class (`blocking`, `advisory`). Absent: every rule. | blocking: "blocking" |
| namespace | string | no | Only rules of this namespace — `project` for this repository's own, `majordomus` for the vendored package. Absent: both. | |
| findings_only | boolean | no | Only the rules whose declared class the proof does not support, with the findings. The tallies still count the whole corpus, so a filtered answer never misreports how much of it was examined. | findings: true |
Try it
The port is whatever the server logged; 8741 is the one it asks for first. The values are the operation's first example.
curl -s "http://127.0.0.1:8741/api/v1/rules?class=blocking&findings_only=true"
Tested by apps/majordomus-cli/tests/http_serve.rs, which replays the route with these values against a server on a real socket.
Responses
| status | body | meaning |
|---|---|---|
| 200 | RulesReport | Every rule against the proof there is for it: the result. |
| 400 | ErrorBody | invalid_input: The input does not fit the schema: a parameter of the wrong type, an unknown one, or a value the capability rejects. |
| 404 | ErrorBody | not_found: The input names something the repository does not hold. |
| 500 | ErrorBody | internal: The capability failed for a reason of its own; the message names it. |
| default | ErrorBody | Any other failure the transport reports: 405 method_not_allowed for another method on this path, 400 invalid_input for a body that is not a JSON object. |