The layer's directory contracts
Every directory of the layer the index knows, with the contract it declares, whether it owes one and which contract decided, and — for a named path, or when asked for everywhere — the effective chain composed from the root down, least specific first.
- query
- behaviorally_verified
- benchmark required
- cache process (max_entries=8, ttl_seconds=5)
- MCP tool majordomus_directories
- MCP resource {"name": "directories", "uri": "majordomus://directories"}
Query parameters
| name | type | required | description | examples |
|---|---|---|---|---|
| path | string | no | One directory, repository-relative and inside the layer. Its effective chain is always resolved. Absent means every directory of the layer. | one-directory: ".ai/repo/rules" |
| effective | boolean | no | Resolve the effective chain for every directory, not only for a named one. | effective-everywhere: true |
| state | DirectoryState | null | no | Only directories in this state: `documented`, `exempt` or `owed`. | owed: "owed" |
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/directories?path=.ai%2Frepo%2Frules&effective=true&state=owed"
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 | DirectoryReport | The layer's directory contracts: 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. |