# AWL recipes, walls and artifacts

Assembly parameters, dependency steps, artifact digests, preconditions and execution receipts.

A recipe assembles declared commands and artifacts under typed parameters and explicit checks. Compose resolves its inputs without execution. Fire checks preconditions and referenced bytes, then runs the declared steps.

## Assembly words

- `recipe`: Declares an assembly act: typed parameters with declared kinds, and the ordered steps those parameters feed. Arguments: form: declaration; positions: top-level.
- `parameter`: Declares one of a recipe's typed parameters and its kind — `skeleton`, `per_item`, `both`, or `re_derive`. Arguments: form: assembly-clause; positions: recipe-body.
- `derives`: Names the source address a `re_derive` parameter is read from at the fire minute, never at the compose minute. Arguments: form: assembly-clause; positions: recipe-body.
- `extract`: Names what a derivation takes out of its source — `line <n>` or `whole`, and nothing an evaluator would be needed for. Arguments: form: assembly-clause; positions: recipe-body.
- `wall`: Declares a wall once, so its prompt rendering and its mechanical enforcement come from one source and cannot disagree. Arguments: form: declaration; positions: top-level.
- `allows`: Declares one path pattern a wall admits; the patterns are what both of the wall's renderings are projected from. Arguments: form: assembly-clause; positions: wall-body.
- `excludes`: Declares bytes that must not appear — a term a round measured out of a wall, or the sentinel that says an artifact was never filled. Arguments: form: assembly-clause; positions: wall-body, artifact-body.
- `artifact`: Declares something a recipe reaches for outside the document, by the address its bytes live at, so the reference census can measure it. Arguments: form: declaration; positions: top-level, recipe-step.
- `digest`: Declares an artifact's content digest, which the fire step measures the deployed bytes against before anything runs. Arguments: form: assembly-clause; positions: artifact-body.
- `restores`: Declares the path a fired artifact must restore byte-exactly; the restoration is byte-compared and refuses if inexact. Arguments: form: assembly-clause; positions: artifact-body.
- `runs`: Names the declared command a recipe step or a worker action runs; neither ever carries a shell string, which is unparseable rather than discouraged. Arguments: form: header-clause; positions: worker-block, recipe-step.
- `captures`: Declares the typed result a step reads a declared artifact into. Arguments: form: assembly-clause; positions: recipe-step.
- `fires`: Names the declared demonstration artifact a step fires, so a known-answer red is executed rather than remembered. Arguments: form: assembly-clause; positions: recipe-step.
- `expecting`: Names the known answer a fired artifact is compared against, typed; a mismatch refuses the stage with both sides' bytes. Arguments: form: assembly-clause; positions: recipe-step.
- `requires`: Declares a required precondition. Fire requires the operator to mark it as met. Arguments: form: assembly-clause; positions: recipe-step.


## Parameters and boundaries

A parameter's kind says how it is filled. A re-derived parameter is read from its declared source at fire time, because an earlier composition can become stale. Unfilled skeleton values are refused by name.

Walls declare admitted paths and excluded content. Artifacts declare their address, digest and any restoration promise. The reference census compares deployed bytes with the declared digest before steps run.

## Syntax examples

**Recipe declarations — syntax 1**

```text
wall changed_paths
  allows "crates/aion-awl"
  allows ".fleet/"
  excludes "mutation vocabulary"

artifact gate_entry ".fleet/gate-entry.sh"
  digest "1e1e3ad2ae66bb0bef5b82a8e154491032ee3d7598ac361a731a5f0917b47a6b"
  excludes "RECORD-RUN-PENDING"

recipe stage_the_flight
  parameter branch: String per_item
  parameter control_expect: String re_derive derives "origin/main:workflows/investigate/investigate_worker.awl" extract "line 22"
  step self_test
    requires "workers serving the queue"
    fires artifact gate_entry expecting "deliverable_absent"
  step push
    after self_test
    runs command push_branch
```


## Ordering and receipts

Step dependencies determine execution order. The operator must mark each required precondition as met. A refused fire still returns a receipt naming what was measured and which stage refused.

The CLI's recipe commands implement the local tree and process ports. They do not bypass the language's composition and fire checks. Read [recipe command help](/aion/reference/cli-authoring/#command-awl-recipe).

## Parameter kinds and checks

- `skeleton`: Fixed across dispatches of the assembly.
- `per_item`: Supplied for each dispatch.
- `both`: Partly fixed and partly supplied per dispatch.
- `re_derive`: Read from the declared source at fire time. It has no hand-written literal. Extraction is whole or a one-based line number.
- `Venue values`: A parameter for a value already supplied by dispatch has no default; consume the dispatch value rather than restating it.
- `Artifact digest`: Exactly 64 lowercase hexadecimal SHA-256 characters; fire compares the referenced deployed bytes.
- `Preconditions`: Every required at-fire precondition must be answered by name. Missing answers refuse before execution.
