Best Practices
Identity and layout
- Pick stable
scriptIds and never churn them. The ID anchors dedup, failure history, and artifact paths. Treat it like a database key, not a display name. - One
scriptIdper logical script. Sharing an ID across scripts merges their failure histories; splitting one script across IDs splits its dedup. - Keep
scriptPathaccurate after refactors. When a script moves in the repo, update the config in the same commit. The fixer starts reading atscriptPath— a stale path sends the agent hunting and burns turns.
Reviewing fixes
- Verify PRs against the live site — that’s the contract. A proposed fix is the agent’s confident hypothesis backed by evidence from the failure. The human check is deliberately cheap: open the PR, glance at the diff and the agent’s reasoning, confirm against the real page, merge.
- Treat needs-attention as a page, not a log line. The confidence gate exists so that when Autowright does ask for a human, it means it. These are the failures that need new credentials, a product decision, or a flow rewrite — a code fix wasn’t the answer.
Secrets
- Keep secrets in env, not in code. Credentials are redacted from captured
artifacts, but the cheapest redaction is data that was never in a string
literal.
process.env.PORTAL_PASS, not'hunter2'.
Selectors
- Still write resilient selectors. Autowright is a safety net, not an
excuse —
getByRoleand stable data attributes break less often than positional CSS, which means fewer fix cycles, fewer PRs to review, and less spend. The healing loop is for the breaks you couldn’t prevent.
Learn the pipeline on the demo
Before wiring production scripts, run the built-in CHAOS walkthrough: a demo site with a switch that deterministically breaks a selector. You’ll watch the full loop — failure, classification, evidence bundle, agent run, PR — in a couple of minutes, on a site where nothing matters. Knowing what “normal” looks like makes the first real incident boring.
Operating rhythm
- Watch the dashboard’s needs-attention count, not just the fixed count — it’s the queue of decisions only you can make.
- Merge fix PRs promptly. Until the fix merges, every scheduled run of the broken script re-fails (deduplicated, but still red in your CI).
- Check cost trends occasionally. A rising
avg/fix usually means the agent is working harder than it should — often a
stale
scriptPathor a script that’s outgrown its selectors.