writ amend
Change the bounds of a writ.
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. |
Narrow and widen
Section titled “Narrow and widen”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.
# Narrower. This applies at once.writ amend bug-fixer.yaml --cost $1.00
# Wider. This asks first.writ amend bug-fixer.yaml --cost $5.00To answer the question in advance, add --yes:
writ amend bug-fixer.yaml --cost $5.00 --yesChange more than one bound
Section titled “Change more than one bound”writ amend bug-fixer.yaml --iterations 60 --wall-clock 30mThe command examines each change. If one change widens a bound, the command asks about that change.
Remove a bound
Section titled “Remove a bound”Set the value to 0:
writ amend bug-fixer.yaml --max-files 0This removes the limit on the number of changed files. Removal is a widening amendment, so the command asks first.
Why the command and not an editor
Section titled “Why the command and not an editor”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.