Fix the mistakes people keep correcting
Use this when people on the team keep fixing the same thing in the agents'
work. You need the line in Terraform to change its settings. See
Manage Spotlight with Terraform.
Maintenance is on by default for a line with exactly one work station. A line
with more than one work station needs a maintenance block that names its
station before maintenance turns on. See
How maintenance works.
Set up maintenance on a line
Add a maintenance block to the line's spotlight_line resource. If the line
has more than one work station, set station to the station that takes
maintenance tasks:
maintenance {
station = "implementation"
max_open = 2
file = "ask"
}If more maintenance tasks may be open at one time, raise max_open, from 1 to
20.
To file codebase patterns without asking, set file = "automatic". To stop
patterns surfacing on the line, set enabled = false.
Run terraform apply. If Terraform rejects the line, the message names the
field. See Maintenance fields.
File or dismiss a pattern
Open Insights in the team's sidebar and select the Patterns tab, or
open the notice in the inbox that reads People keep correcting the agents for the same thing:.
Select a pattern's summary to open its page, and read Corrections behind it. Each correction links to its task.
If the corrections show a real habit of the agents, select the button for the pattern's cause:
- File a task, for a cause In the code. Spotlight files a
maintenance task at the line's maintenance station, titled
Stop a repeated correction: <summary>. - Search the station, for a cause In the station config. Spotlight starts a search of the station, or adds the pattern to the search that already runs there. If the station cannot take a search now, the pattern waits for the team again.
- Propose a memory, for a cause In how the run worked. The memory waits for review in the inbox.
If File a task is off, hover over it to see why. When every maintenance
slot on the line is taken, finish a maintenance task first, or raise
max_open. When the line has no maintenance.station, set one.
If the pattern is not worth fixing, select Dismiss. It comes back after 90 days, or sooner if people correct the same mistake twice as often.
On the pattern's page, if Spotlight cannot file it, a message above the card says why. See File and dismiss.
Review the maintenance task
The line's agent works the task like any other. Its pull request quotes the
result of
spotlight maintenance check:
how many corrections the new check caught, missed or flagged too widely.
- If the check missed corrections, or reads too wide, send the task back with what to change.
- If the check caught what it can, review the pull request as usual, and merge it.
The pattern's State then reads Fixed, watching for new corrections, and Resolved after 30 days with no new correction.
Read the measures
On the Patterns tab, each line starts with its measures:
- Corrections per run reads Fewer corrections when the line's stations needed fewer corrections in the last 30 days than in the 30 days before.
- Patterns filed and Maintenance pull requests show how many patterns people filed and how many fixes merged.
- History checks shows how many corrections the new checks caught.
- Grouping spend this month shows the spend against the cap of $5.00. When it reaches the cap, new corrections wait for the next month.
See Patterns for each tile.