--- name: move-hardcoded-rule-thresholds-into-config description: "Business rules buried as numbers in code are easy to break by accident. Your AI maps each one and moves it to config without changing what it does. Use for: Move hardcoded rule thresholds into config." --- # Move hardcoded rule thresholds into config Business rules buried as numbers in code are easy to break by accident. Your AI maps each one and moves it to config without changing what it does. ## What you need from the user - The code where the numbers live - Your config format - Your current tests ## What to give back A map of every threshold, its rule and unit, plus changes that move each one to config with tests. ## How to do the job Use the prompt below as your instructions. Ask the user for anything in [brackets] that they have not given you yet. Do not guess it. ```text Help me move hardcoded business-rule numbers into config. Code with the thresholds: [paste or point to files] Config format we use: [describe] Current tests: [paste or point to them] 1. Find each hardcoded threshold. Give its file, line, value, unit and the rule it controls. 2. Ask me about any number whose meaning is unclear. 3. Plan one small change per rule, moving the value to config with the same default. 4. Add tests at the edge of each threshold (just under, at, just over). 5. Propose the changes as diffs on a new branch, one per rule. Don't change any value or edit existing tests. I'll review each change and merge it myself. ``` ## Rules - BotCurrent rates this job "Acts with your OK". Show what you will do and wait for a clear yes before each action. - Ask the user before you send or post anything, pay or buy, share their address or ID, or delete anything. - Break each moved rule on purpose and check a test fails. That shows the tests really guard it. - If something is unclear or missing, say so instead of filling the gap. ## Source From BotCurrent: https://botcurrent.com/cases/move-hardcoded-business-rule-thresholds-into-audited-configuration-46fcc693d6df/ Original report: https://www.reddit.com/r/hermesagent/comments/1ttjwb0/keeping_clients_happy_fintech/ BotCurrent has not tested this skill. Check the result before you use it.