Everyday productivity
Add reusable instructions to a coding assistant
You will have a one-page instruction file with five rules and a test showing the assistant follows it.
Before you start
- A coding assistant you already use
- A small project to test on
Why standing rules help
A coding assistant starts from scratch each time. A short rules file tells it how your project works and what to avoid, so you stop repeating yourself.
Step 1: Write five rules
- How to run the project and its tests.
- The style rules you care about.
- Things it must never change, such as the settings file.
- How to name things.
- What to do when unsure: ask, do not guess.
Keep it to one page. Long files get skimmed.
Step 2: Put it where the tool looks
Different tools look for the file in different places and under different names. Check your tool’s documentation for the right one.
Step 3: Test it
Read the project rules, then make a small, harmless change to [a test file]. Tell me which rules you followed. Do not change anything outside that file.
Stay safe
- Never put keys or passwords in the rules file.
- Review every change before you accept it.
- Use version control so you can undo.
Common mistakes to avoid
- Writing a long file nobody reads
- Putting secrets in it
- Accepting changes without review
- Not testing that the rules are used
Final checklist
- My file has five rules
- It is where my tool looks
- I tested it on a harmless change
- No secrets are inside