Skip to main content

Module intents

Module intents 

Source
Expand description

The intents module:

The module is intents and not intent because the registry composes builtin modules and declarative kinds into one namespace, and intent is the kind of the records under .ai/repo/project/intents/; the registry refuses the collision, as it did for session. The command line keeps the singular word, majordomus intent <verb>.

What it answers: what must become true, derived against the plan and the evidence.

Every capability here reads crate::intent::Intents, built on demand from the index, the plan crate::plan::Plan::build derives from the same index, and the evidence ledger. Six are read-only: there is no intent status to write, because the stage is derived, and no transition, because the plan already owns the lifecycle of the work an intent is realised by (ADR 0070), and the coverage of its criteria by the plan (ADR 0073). One writes, and only a new record: intents.propose declares what must become true and leaves the intent unplanned, its stage still derived (ADR 0144).

use majordomus_cli::capability::builtin::intents;
let m = intents::module();
let ids: Vec<&str> = m.capabilities.iter().map(|e| e.capability.id.as_str()).collect();
assert_eq!(ids, ["intents.list", "intents.record", "intents.validate",
                 "intents.coverage", "intents.preflight", "intents.binding",
                 "intents.propose"]);

Structs§

IntentBindingInput
The input of intents.binding: what a worker names when it asks what its work serves. Flat strings, because the same value arrives as a query string, as MCP arguments and as the flags of majordomus intent binding.
IntentList
Every intent, with its derived stage and verdict, and how many there are in each: what majordomus intent list, GET /api/v1/intents and the majordomus_intents tool all answer with, out of one derivation.
IntentPreflightInput
The work to preflight: an issue, or the paths it will touch.
IntentProposeInput
The input of intents.propose: what must become true, and optionally its title and id.
IntentRecordInput
Which intent to read, by the id that is also its file name. An id this repository does not hold is a refusal naming what was looked for, never an empty answer.
IntentValidation
What the intent model refuses: whether it is valid, how many intents were examined, and every finding with its level. Warnings are reported and do not make it invalid.

Constants§

INTENTS_URI
The URI under which every intent, derived, is read as an MCP resource.

Functions§

module
The module the registry composes: six read-only capabilities over one derivation and one that proposes a new intent, each declared once here and projected to the command line, HTTP, MCP and OpenAPI from that declaration.