2 min lesson
Always-on automation
Complete "Always-on automation". Check the final state against the lesson before you move on.
Check your understanding
Pick a trigger for CI triage, and write the do-nothing case into the prompt.
Outcome: You have selected a trigger and made the no-op explicit, so the automation only speaks when a run actually fails.
Pick a trigger for CI triage, and write the do-nothing case in
Always-on automation
SayOur CI is noisy. When a GitHub Actions run fails on main I want an agent to triage it, but I don't want it doing anything when the run passes.
Type
Trigger: Workflow run completedDoPick the Workflow run completed GitHub trigger, one of the five GitHub events Cursor can start an automation from.
SeeEvery completed run now carries its status and logs into the automation as context.
Type
Instruction: If the run failed, read the logs, find the first failing step, and open a PR only when there is a safe, obvious fix.SeeThe instruction names the action for the failure case.
Type
Instruction, continued: If the run succeeded, stop. Post no comment and open no PR.SeeThe do-nothing case is written into the prompt itself, not left implicit, so a passing run produces silence instead of noise.
DoPoint it at one low-risk repo first and watch the first few runs before widening scope.
SeeYou have selected a trigger and made the no-op explicit, so the automation only speaks when a run actually fails.
Learn more
Optional practice
Practice: Always-on automation
QYou've applied it. What actually proves the work is done, not just a plausible answer?