๐๐ฎ๐๐๐น๐ฒ ๐ฆ๐ฐ๐ฎ๐ฟ๐ ๐๐ ๐ฅ๐๐น๐ฒ๐: ๐๐ป๐๐ถ๐ฑ๐ฒ ๐ง๐ต๐ฒ ๐๐ฒ๐ฒ๐ฑ๐ฏ๐ฎ๐ฐ๐ธ ๐๐ถ๐น๐ฒ๐
Every rule comes from a mistake or a win. Construction rules come from accidents. Feedback files work the same way.
You need the reason behind a rule. Without the reason, you follow rules blindly. With it, you handle edge cases.
Here are 8 rules for your AI handbook:
- Use real databases for integration tests. Mocks lie. They pass tests. Then production breaks.
- Use useCallback only when the profiler shows a problem. Premature optimization clutters code.
- Keep secrets out of config files. Use secret managers. Bots steal plaintext keys.
- Keep global rules universal. Put stack rules in project files. This stops AI from suggesting the wrong tools.
- Check bundle size and activity before adding packages. Dependencies are burdens.
- Log every catch block. Silent failures are hard to find. Use console.error.
- If you remove a tool, tell your AI to stop suggesting it.
- Use the right email for work and personal projects.
If you correct your AI twice, write a rule. These files are the memory of your workflow. Each rule prevents a future mistake.
Source: https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj