writ check
Validate a writ file.
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. |
Output
Section titled “Output”When the file is correct, the command prints one line:
bug-fixer.yaml: validWhen 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 requiredSeverity
Section titled “Severity”| 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.
Explain the writ
Section titled “Explain the writ”The --explain flag shows the authored terms:
writ check bug-fixer.yaml --explainAn 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.
Apply organization ceilings
Section titled “Apply organization ceilings”writ check bug-fixer.yaml --effective --explainThe 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.
Use the command in continuous integration
Section titled “Use the command in continuous integration”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" doneExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | The file is valid. |
| 2 | The file is not valid. |