Skip to content

writ amend

Change the bounds of a writ.

Terminal window
writ amend <file> [flags]

The command rewrites the bound terms in the file and keeps the comments of the file.

Flag Purpose
--cost <amount> Set the cost bound, such as $2.50.
--iterations <number> Set the iteration bound.
--wall-clock <duration> Set the time bound, such as 20m.
--max-files <number> Set the changed files bound. A value of 0 removes the bound.
--max-changed-lines <number> Set the changed lines bound. A value of 0 removes the bound.
--yes Apply a widening amendment without a question.

The command treats the two directions differently.

Direction Behaviour
Narrow The command applies the change at once.
Widen The command asks for confirmation first.

A narrower bound gives the agent less authority, so the change is safe. A wider bound gives the agent more authority, so a person must agree to it.

Terminal window
# Narrower. This applies at once.
writ amend bug-fixer.yaml --cost $1.00
# Wider. This asks first.
writ amend bug-fixer.yaml --cost $5.00

To answer the question in advance, add --yes:

Terminal window
writ amend bug-fixer.yaml --cost $5.00 --yes
Terminal window
writ amend bug-fixer.yaml --iterations 60 --wall-clock 30m

The command examines each change. If one change widens a bound, the command asks about that change.

Set the value to 0:

Terminal window
writ amend bug-fixer.yaml --max-files 0

This removes the limit on the number of changed files. Removal is a widening amendment, so the command asks first.

An editor works. The command is better for three reasons:

  • The command validates the file, so a bad value cannot enter the file.
  • The command knows the direction of each change, so a widening amendment needs a person.
  • The file is the state of the writ at rest, and the amendment enters the record when detached runs exist.