Skip to content

writ check

Validate a writ file.

Terminal window
writ check <file>

The command validates the file against the schema. The command needs no network connection and no API key, so you can run it in continuous integration.

Flag Purpose
--explain Show the authored writ terms and language defaults.
--effective Apply the configured signed organization policy.

When the file is correct, the command prints one line:

bug-fixer.yaml: valid

When the file has a problem, the command prints one line for each problem. The line gives the path of the field, the severity, and the message:

bug-fixer.yaml:/grants/0: error: exactly one grant is required
Severity Result
error The file is not valid. The exit code is 2.
warning The file is valid, and something needs your attention.

A reserved field gives a warning. Read about reserved fields.

The --explain flag shows the authored terms:

Terminal window
writ check bug-fixer.yaml --explain

An omitted bound is authored-unbounded. It is not a writ clause. The managed writ issue adapter adds operational limits of 25 iterations, $1.00, and 15 minutes when those values are omitted. These managed limits are not authored terms.

Terminal window
writ check bug-fixer.yaml --effective --explain

The command verifies the configured organization policy. It lowers project bounds where the organization ceiling is smaller. It also prints the organization, sequence, allowed tools, approval patterns, and policy hash.

The command fails if the organization policy is missing, expired, changed without a new sequence, or signed by another key.

The command takes exactly one file. To validate more than one file, use a loop:

- name: Validate the writs
run: |
for file in writs/*.yaml; do
writ check "$file"
done
Code Meaning
0 The file is valid.
2 The file is not valid.