Maintain and evaluate your AI workflows
An overnight workflow can perform perfectly for months and then fail after an ordinary framework upgrade. The system around the agent ages just like the application does.
Maintain agent infrastructure like code
A new test setup, architectural migration, design-system change, or revised release process can turn yesterday's reliable instruction into today's source of bad changes. Treat agent instructions, routing documents, design-system mappings, skills, orchestration, and evaluation tasks as maintained engineering assets.
Store them in version control where practical. Give them owners, review their changes, and define the events that should trigger revalidation.
Turn failures into workflow changes
After a significant run, hold a short retrospective. Where did the agent lack context? Which exploration did it repeat? Did it ignore a boundary, duplicate a shared component, produce weak tests, or need a manual rescue? Update the smallest instruction, mapping, or workflow component that addresses the failure.
Production incidents belong in the same loop. When accepted agent-produced code causes a failure, roll back first. If the change was JavaScript-level and delivered through an over-the-air channel, use that path where appropriate.
Then trace the incident to the original run, its report, and the checks that passed or were skipped. A failure that no check caught exposes a gap in the quality gate. Turn the reproduction into an evaluation task so the same gap stays closed. The "rework after acceptance" metric below counts the event; the retrospective explains it.
Review can become a rubber stamp before an incident makes the problem visible. If reviewers approve changes faster while finding fewer issues, investigate whether AI-generated volume is reducing scrutiny.
Session transcripts can widen the evidence base when policy and consent allow it. Keep redacted transcripts as evaluation input, define their access and retention, and remove secrets and personal data. Look for loops, ignored boundaries, unsupported claims, recurring tool failures, and missing context. Repeated findings should become instruction changes and repeatable evaluation tasks.
Review recent delivery sessions periodically
Run a retrospective weekly or after N delivery sessions. Include completed, blocked, failed, and abandoned runs. Use stage reports, specifications, review dispositions, CI and device results, human interventions, and redacted transcripts where permitted.
Look for recurring causes: ambiguous requirements, missing context, repeated exploration, weak tests, review churn, stalled handoffs, device contention, or excessive retries and cost. Separate product defects from failures in the delivery process.
An agent can group the evidence and propose a short, prioritized improvement backlog. Each proposal names the supporting runs, affected instruction, skill, tool, or gate, expected benefit, and evaluation method. A person selects changes; they become reviewed patches rather than automatic edits to the operating rules.
Replay representative tasks before adoption, then compare the next delivery window with the previous one. Track whether the changes reduce failures, rework, elapsed time, or total cost without weakening verification.
Run bounded maintenance routines
Use separate routines for mutation-based test hardening, test-quality audits, documentation cleanup, and reviewer calibration. Limit the scope and budget, preserve omitted work, and send changes through the normal reviews and merge gate. Calibration should use verified dispositions, not assume every unfixed finding was incorrect.
Evaluate on repeatable tasks
Use evaluation tasks with known acceptance criteria. A compact suite can cover repository exploration, an architectural change, shared-component selection, test generation, device verification, and diagnosis from runtime evidence.
Run the same tasks after changing instructions, models, tools, or project infrastructure. Public benchmarks such as React Native Evals can seed the suite with framework-level tasks. The team's repository, conventions, and delivery workflow remain the ground truth.
Before adopting a cheaper model for a role, replay identical historical snapshots containing known defects and clean changes. Keep ground truth out of reviewer inputs and have a person resolve disputed labels. Then shadow live runs before changing the authoritative role.
Measure missed defects by severity, incorrect findings, incomplete assessments, elapsed time, and total cost including verification and fixes. Independently sample results marked clean; checking reported findings alone cannot reveal misses. Define promotion and rollback criteria in advance. A written evaluation plan is not evidence that a model passed it.
Measure delivery outcomes
Measure outcomes that connect to delivery:
- Completion without human intervention
- Time and tokens needed to reach a verified result
- Verified review findings, incorrect findings, escaped defects, and reviewer effort
- Rework after acceptance
- Device verification failures
- Incorrect or unsupported claims
- Total model, CI, device, and review cost per delivered ticket, including unsuccessful runs
- Reuse of approved shared components
Record each stage's revision, setup version, exact model, duration, token usage, retries, blockers, and outcome. Keep finding dispositions and human interventions linked to the run. Preserve unknown usage or cost as unknown, not zero.
Generated lines, prompt count, and suggestion acceptance describe activity. They cannot tell you whether the application improved. A fast agent that rebuilds the same project knowledge on every task may cost more than a slower run with good routing and durable context.