Find and improve every user-visible error message within [repository, product, or named scope]. If no scope is supplied, use the user-facing surfaces in the current repository and state any exclusions before editing. Inventory error strings in source code, surfaced API or client errors, and reachable browser states. Record each one in a CSV with its location, trigger, current copy, user risk, proposed replacement, implementation status, and verification result. Rank the errors by user harm. Rewrite one coherent group at a time using plain language and a useful recovery step when one exists. Do not expose provider names, stack traces, internal identifiers, or implementation details. After each change, run the relevant tests, exercise the affected state in a real browser when possible, and search again for raw or internal error text. Do not mark an unreachable state as verified. Stop when every row is verified or explicitly blocked. Finish with the CSV, changed files, test evidence, browser evidence, and blocked items.
claude-code · codex
Use this when
Use this when a product exposes raw, internal, inconsistent, or unhelpful error messages and the complete user-facing error surface needs a controlled rewrite.
How it runs
Inventory source strings, surfaced API or client failures, and reachable browser error states in one CSV.
Rank errors by user harm and rewrite one coherent group with plain language and a useful recovery step.
Run relevant tests, exercise the affected states, and search again for internal or raw error text.
Repeat until every row is verified or explicitly blocked, then return the inventory and evidence.
Done when
✓ Every in-scope user-facing error is clear and accounted for. The inventory contains no silently skipped row: each error is verified in its reachable state or marked blocked with the missing evidence.
Why it works
Error copy is often scattered across source code and runtime paths, so isolated rewrites leave inconsistent states behind. A durable inventory makes the sweep complete and reviewable.
Implementation note
Do not claim a clean sweep for states that could not be reached. Preserve technical detail in logs while keeping provider names, stack traces, identifiers, and implementation details out of user-facing copy.
Drive a suspected memory leak to ground: reproduce growth under a repeated workload, capture heap snapshots, and fix the retention until memory stays flat.
/goal heap usage stays flat (within 5%) across 500 repetitions of the failing workload in the leak-repro script — capture heap snapshots before and after, identify what is being retained and by which reference chain, fix the leak, and re-run the repro to confirm; stop after 10 turns
Take a ticket, bug report, failing behavior, or customer complaint and turn it into a review-ready patch. Reproduce the failure in the smallest representative environment, prove the root cause, make the smallest credible fix, and rerun the original reproduction plus relevant regression tests. If the issue cannot be reproduced after two serious attempts, say so. Do not fold unrelated refactors into the patch. Finish with the cause, changed files, before-and-after proof, risks, and pull-request summary.