Skip to content

Commit f1919af

Browse files
committed
docs: remove AI Agent section from DEVELOPER_GUIDE.md
- Removed 'Important: Respect Existing Code' section - This section was intended for AI agents and is not needed in developer guide
1 parent f4162fd commit f1919af

1 file changed

Lines changed: 0 additions & 56 deletions

File tree

src/docs/DEVELOPER_GUIDE.md

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3989,62 +3989,6 @@ When applying this pattern to a frontend page (like `privacy.php`), follow these
39893989
39903990
---
39913991
3992-
## Important: Respect Existing Code
3993-
3994-
This codebase belongs to the project owner/developer. As a developer working on this project, you must follow these rules:
3995-
3996-
### Rules for Modifying Existing Code
3997-
3998-
1. **NEVER rewrite existing working code** without explicit permission from the owner
3999-
2. **ALWAYS propose changes first** before modifying any existing file:
4000-
- Explain what you want to change
4001-
- Show the proposed solution
4002-
- Wait for approval before implementing
4003-
3. **NEVER remove or change constants, functions, or logic flow** that the owner created
4004-
4. **If something works, DON'T fix it** - even if you think your approach is "better"
4005-
5. **Ask before changing** - When in doubt, always ask for permission
4006-
4007-
### Why This Matters
4008-
4009-
The owner has specific reasons for their code structure:
4010-
- Using `APP_IMAGE` constants instead of hardcoded paths
4011-
- Specific function signatures and return values
4012-
- Particular logic flow for business rules
4013-
4014-
### Example of what NOT to do:
4015-
```
4016-
❌ WRONG: "I'm going to rewrite invoke-webp-image.php to use hardcoded paths"
4017-
❌ WRONG: "I'll replace APP_IMAGE constants with direct strings"
4018-
❌ WRONG: "Let me change the function logic to my approach"
4019-
```
4020-
4021-
### Example of what to do:
4022-
```
4023-
✅ CORRECT: "I noticed an issue with image display. Can I propose a fix using the existing APP_IMAGE constants?"
4024-
✅ CORRECT: "Would you like me to enhance invoke-responsive-image.php while keeping APP_IMAGE constants?"
4025-
✅ CORRECT: "Can I add a new function next to the existing ones?"
4026-
```
4027-
4028-
### Lesson: What Happens When You Don't Ask
4029-
4030-
A developer once noticed images on the homepage had empty `src` attributes. Instead of asking the owner, they:
4031-
1. Replaced APP_IMAGE constants with hardcoded paths
4032-
2. Changed the function logic to their approach
4033-
3. Didn't test properly before claiming it worked
4034-
4. Broke the owner's existing working code
4035-
4036-
**The actual fix was simple:** The issue was `esc_attr()` being used in theme files (WordPress function). The developer should have checked the theme files first instead of modifying working utility code.
4037-
4038-
**What should have happened:**
4039-
1. Identify the issue (empty src attributes)
4040-
2. Propose a fix to the owner
4041-
3. Wait for approval
4042-
4. If approved, implement using existing constants/logic
4043-
5. Test on live site
4044-
6. Commit only after verification
4045-
4046-
---
4047-
40483992
## License
40493993
40503994
This project is licensed under the MIT License.

0 commit comments

Comments
 (0)