--- name: atas-change-radius description: Before an AI coding agent edits code, maps everything the change can reach (callers, imports, data shapes, config, tests, docs, deploy and SEO side effects), ranks the risk, and after the edit checks each item on the map with evidence, so a small fix does not quietly break something else. Use when asked to change, rename, refactor, upgrade a dependency, or fix a bug in an existing codebase, especially in a live website or app. Not for brand-new projects with no existing code, code style reviews, or writing tests from scratch. license: Proprietary. See LICENSE.md metadata: author: AIToolAndSkill version: "1.0" collection: AIToolAndSkill Originals --- # Change Radius Most breakages from AI edits are not in the line that changed. They are one step away: a caller that relied on the old behaviour, a config key that was renamed, a page that was indexed under the old URL. You draw the radius before touching anything, then walk it again afterwards. ## Step 1: State the change Write two lines: what will change, and what must stay exactly the same. If the user's request is vague, propose these two lines and confirm before going on. ## Step 2: Draw the radius Search the codebase (do not rely on memory or file names alone). For the thing being changed (function, component, route, field, setting, package), find: | Ring | Look for | |---|---| | **1. Direct** | Every call site, import, reference and string mention, including tests, scripts and templates. | | **2. Data** | Database fields, API request and response shapes, JSON files, local storage, cookies, cache keys, anything saved with the old shape. | | **3. Config** | Environment variables, build settings, feature flags, CI workflows, server rules (redirects, headers). | | **4. Outside** | Public URLs, SEO tags and sitemaps, emails or webhooks other systems depend on, mobile apps or clients using the API, documentation. | List each finding with file and line. Say how you searched (the exact search terms) so the user can trust the map. If the codebase is too big to search fully, say which parts you covered. ## Step 3: Rank the risk Mark each finding: - **High**: user-facing, money, data loss, security, or anything outside the codebase you cannot test. - **Medium**: internal behaviour with tests that can catch it. - **Low**: comments, docs, dead code. Then choose the safest approach and say why. Prefer, in order: change behind the same interface; add new and keep old until callers move; change everything at once only when the radius is small and fully tested. For data or URL changes, plan the migration or redirect before the code change. ## Step 4: Make the change Edit only what is inside the radius you mapped. If you discover something new while editing, add it to the map and say so. Do not fix unrelated things you notice; list them for later. ## Step 5: Walk the radius again For every item on the map, show evidence it still works: - Run the existing tests, type check, linter and build, and quote the result lines. - For items with no test, describe the manual check you did and what you saw, or the exact steps the user should do. - Search again for the old name or shape to prove no reference was missed (show the search and that it returns nothing unexpected). Then report: ``` CHANGE RADIUS: Map: places · high · medium · low Verified: Not verified (needs you): Follow-ups noticed (not changed): How to undo: ``` ## Stop and ask - A high-risk item cannot be tested from here (payments, live database, third-party integrations, public URLs). - The change needs a data migration, deletes data, or changes a public URL. - The radius is much larger than the user probably expected. Show the map and ask whether to continue, narrow the change, or split it. ## Done check - [ ] The map lists files and lines for all four rings, with the search terms used. - [ ] Every high-risk item is either verified with evidence or listed under "needs you". - [ ] Tests, type check and build were run after the change, with results shown. - [ ] A final search for the old name or shape was run. - [ ] An undo path is written down. ## Example Request: "Rename the `price` field to `priceInr` in tool data." Radius: 40 JSON files, 3 components, the schema file, the search index, the RSS feed, and the comparison pages (ring 1–2); no public URL change (ring 4 clear). Risk: high for the schema (build fails on a miss). Approach: update the schema and all files in one commit, run build and type check, then search for `.price` and `"price"` to confirm zero leftovers. --- Made by AIToolAndSkill (aitoolandskill.com). Free to use; see LICENSE.md.