View Single Post
Old 04-06-2025, 11:18 AM  
Mr Pheer
Living inside your head.
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: In your AirBNB
Posts: 20,427
AI coding project instructions

I've been coding projects with AI for some time now and have had some pretty significant setbacks due to a coding agent losing sight of the goal and adding or taking away project features for no apparent reason as the project grows in size and complexity.

Sometimes I add a new feature and it removes a previous one. Why? Who fucking knows. Sometimes I fix something then move on and fix something else, and then it breaks the previous thing we just fixed again. Aggravating, to say the least.

A few days ago, Claude Sonnet (inside Cursor) started talking to itself about my project and went on for 15 minutes just adding random shit like logging and stats and creating a database and a bunch of stuff I didn't ask for, didn't want, and didn't need.

So, I wrote a clear set of instructions to stop the scope creep (losing sight of the goal) and the removal of things and breaking of others. It's helped me out lot, more than i expected so I'm sharing it here. You can add the instructions to the beginning of your project overview, so that when coding inside of cursor, the AI is much less likely to leave the reservation and start causing havoc and wasted time. it helps me, maybe it helps you.

## DEVELOPMENT GUIDELINES - READ FIRST

### Strict Development Approach

1. **Strict Adherence to Requirements**
- Implement ONLY what is explicitly requested
- Do not add unrequested features or remove existing ones
- Always confirm before making significant changes

2. **Documentation-First Approach**
- Document current working state before making changes
- Create clear reference points that can be used if needed
- Maintain accurate documentation of implemented features

3. **Incremental Changes with Verification**
- Make small, testable changes rather than large rewrites
- Verify each change works before proceeding
- Include explicit verification steps for each change

4. **Version Control Checkpoints**
- Create clear save points before significant changes
- Use proper branching and versioning practices
- Enable easy reversion if changes cause issues

5. **Clear Communication About Tradeoffs**
- Explain potential issues rather than making unilateral decisions
- Present options with pros and cons instead of choosing autonomously
- Seek explicit approval before implementing solutions with tradeoffs

6. **Preserve Working Functionality**
- When a feature is fixed, it must remain fixed
- New features must never break existing functionality
- Each time a change is made, verify that previously fixed issues have not been reintroduced
- Run regression tests on previously fixed components after implementing new features

7. **Anticipate Consequences**
- Before implementing any change, think through all potential impacts on other system components
- Identify dependencies between components and how changes might affect them
- Consider edge cases and failure modes before implementation
- Develop mitigation strategies for potential negative impacts

8. **Testing Protocol**
- After implementing any change, test not just the new feature but all related functionality
- Maintain a checklist of previously fixed issues to verify after each change
- Use both automated tests and manual verification when appropriate
- Document testing results in a consistent format



This shit should be like common sense for a coding agent, but it clearly is not. If you've spent any time coding with AI then you know what i'm talking about.
Mr Pheer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote