Expand description
template.json and brief.md: what a job template declares, its checks,
the Rule of Two, and the brief it renders from parameters
(docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §5.4, §6).
The trigger, action and policy are defaults for a job made from the
template. Only what this module needs is checked here (the trigger’s and
the action’s kind, the policy’s approval); the job definition checks the
rest when a job is created.
Structs§
- JobTemplate
Manifest - JobTemplate
Param - One parameter, as a JSON Schema subset:
string(withenum, orformat: "credential"for a Vault entry reference),number,boolean, andarrayof strings. - JobTemplate
Param Items - JobTemplate
Params params: a JSON Schema object of parameters.- JobTemplate
Secret - A secret the job’s agent uses through Vault: an environment name and
the
credentialparameter naming the Vault entry. - Rendered
Brief - A brief rendered from parameters, and the parameters it used (the given ones and the defaults).
Enums§
- JobTemplate
Kind - Param
Kind - A parameter’s type, from its schema.
Constants§
- OUTSIDE_
OUTPUTS - Outputs that write outside: to a repository, another agent, or a deployment.
- TEMPLATE_
VERSION
Functions§
- param_
kind - placeholders
- The parameter names
briefuses. - render
briefwith each placeholder replaced by its parameter’s value, in one pass: a value is inserted as data and never read for placeholders.- resolve_
params - The values for
m’s parameters: each given one checked, defaults for the rest. An unknown or missing parameter is an error. - rule_
of_ two - The Rule of Two (§6): a run that reads untrusted input can’t also hold secrets and write outside, unless each run waits for the operator’s approval.
- rule_
of_ two_ with rule_of_two, wheregraph_credentialsays the template’s graph or trigger reads a credential from the Vault (auth.vault): that counts as holding secrets whateversecretsdeclares, which a Drone template cannot declare at all.graph_approvalsays an Approval block stands on every path to each write outside the graph makes (graph::approval_guards_every_write): a person is in between, as the policy would put one.- validate
- Check a manifest and its brief; the first problem, in words the author
can act on.
folderis the package’s folder name.