Compile the context for a piece of work
The objects a session working on this issue, milestone, intent or set of paths should be given: each with its canonical identifier, the index's own provenance, every discovery path that reached it with the reason and the confidence, its version, its tier and its cost in estimated tokens — followed by everything reached and not given with the reason for each, everything that collapsed into one entry, every pair that does not agree, and the per-tier spend against the budget. Deterministic for a given tree and request; the index fingerprint it was compiled from is in the answer.
- query
- behaviorally_verified
- benchmark required
- cache process (max_entries=16)
- MCP tool majordomus_devcontext
- $ devcontext compile
Query parameters
| name | type | required | description | examples |
|---|---|---|---|---|
| issue | string | no | An issue id (`I0301`) or its canonical identifier. Its milestone, its dependencies, its declared scope and the decisions over that scope follow from it. | issue: "I0001" |
| milestone | string | no | A milestone id or slug, or its canonical identifier. | milestone: "M000" |
| intent | string | no | What the session is trying to do, in words. The only input the compiler infers from, and every entry it produces says so and carries a confidence below one. | intent: "the context a session is given and the budget it costs" |
| paths | array of string | no | Repository-relative paths the work touches, added to whatever the seeds declare. | |
| uris | array of string | no | Canonical identifiers to seed with directly, for a request about something that is neither an issue nor a milestone. | |
| budget_tokens | integer (uint64) | no | The ceiling in estimated tokens; `DEFAULT_BUDGET_TOKENS` when absent. | |
| max_depth | integer (uint) | no | How far from a seed the walk goes; `DEFAULT_MAX_DEPTH` when absent. | |
| floor | number (double) | no | Relevance below which an entry is reported rather than given; `DEFAULT_FLOOR` when absent. | |
| all_blocking_rules | boolean | no | Every blocking rule of the layer, not only the ones the work reaches. Honest and usually over budget: the answer then says `over_budget` rather than dropping what it may not drop. |
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/devcontext?issue=I0001&milestone=M000&intent=the%20context%20a%20session%20is%20given%20and%20the%20budget%20it%20costs"
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 | CompiledContext | Compile the context for a piece of work: 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. |