Skip to main content

Module providers

Module providers 

Source
Expand description

The provider projections: AGENTS.md, CLAUDE.md, GEMINI.md and whatever else the policy’s projections[] declares, rendered from the provider templates and the canonical policy. They are one-way: the policy and the templates are the sources, the targets are caches that generate --check compares and generate rewrites.

The rendering is byte-identical to the shell tool’s majordomus update, so both agree on every stamp: a file-mode target starts with a stamp naming the policy hash and the hash of the content below it; a region-mode target carries both in its begin marker and the rest of the host document is left alone.

Enums§

TargetState
The state of one committed target against what the policy renders now. generate --check only needs stale or not; doctor wants the word.

Constants§

REGION_BEGIN
The region markers of a region-mode target.
REGION_END
The closing marker of a region-mode target.

Functions§

artifacts
Every provider projection the policy declares, rendered.
render
Fill a template: {{DEFAULT_PROFILE}}, {{CHECKPOINT_DEFAULT}} and {{POLICY_SHA}} come from the policy; any other {{TOKEN}} is an error, because a template that asks for something the policy does not carry cannot be rendered deterministically.
splice_region
Splice a rendered body into a host document between the region markers, the begin marker carrying stamp. With no host, or a host without a region, the region is appended (after a blank line when the host exists). Malformed markers (a begin without an end, out of order, or repeated) are an error.
stamp_line
The stamp a file-mode target starts with.
state_of
Classify an artifact against the file under root.
template_path
The template of a provider: the repository’s own under .ai/repo/providers/, else the distribution’s under share/providers/.