Skip to main content

Module model

Module model 

Source
Expand description

The typed model of the command graph: what a command is, and what every projection of it may say.

Nothing here is a list of commands. The types describe the shape of a command node; the nodes themselves come from the contributors in super::native, super::tool and super::workflow, each of which reads a declaration that already exists — the clap tree, the shipped command registry, the workflow runner’s own dump — rather than restating one.

§Identity

A CommandId is <origin>.<path joined by dots>: executable.worktree.status, tool.check, workflow.site-build. The origin is in the identity because the three programs are genuinely different programs — majordomus check is the shell tool and majordomus worktree status is the Rust executable, and a graph that pretended they shared a namespace would have to invent a rule for the day they collide. The id is never a display string: it survives a renamed group, a moved recipe and a reworded summary, which is what the projections key on.

Structs§

ArgumentSpec
One argument of a command, as the declaration gives it plus what can be inferred.
Availability
Where a command means anything, and why not when it does not.
CommandGraph
The whole graph.
CommandId
The canonical identity of one command.
CommandNode
One command, from whichever program offers it.
Deprecation
A command that is no longer the name to use.
Diagnostic
One thing the build found.
Execution
How a command is actually run: the program and the words before the caller’s own.
Projections
Where one command appears, derived from its effect, its interactivity and its origin.
Provenance
Where a node came from, in enough detail to open the file.
ValueChoice
One value an argument accepts, from the declaration.

Enums§

Effect
What running a command changes. The one thing a surface policy is allowed to ask.
Interactivity
How a command behaves towards the caller’s terminal and the caller’s patience.
Origin
Which program runs a command. Part of the identity, because the three are different programs that share one name on the path.
Requirement
One thing a command needs before it can run.
Secrecy
How openly a value may be handled.
Severity
How bad a finding is.
Surface
A surface that spells commands its own way.
ValueSource
Where a value for an argument comes from, when something in this repository knows the set.

Constants§

SCHEMA
The schema every serialisation of the graph carries.