Skip to content

Commit bd41e18

Browse files
committed
docs: add rule for respecting file modifications
Add guidance to never overwrite user changes when encountering modified files. When a file has been modified, always review changes and either ask the user, incorporate their changes, or explain the conflict. This prevents accidentally discarding intentional user modifications.
1 parent ebd2ee6 commit bd41e18

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.ai/rules/code-quality.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ When making a new package or finishing a task:
3131
- Research every error - don't assume you know the cause
3232
- Confirm with research, understand WHY, then approach resolution
3333

34+
## Respecting File Modifications
35+
36+
When you encounter a file that has been modified since you last read it:
37+
- **NEVER** blindly overwrite user changes with your planned changes
38+
- **ALWAYS** review what changed and why
39+
- Consider these options:
40+
1. Ask the user if they want to keep their modifications
41+
2. Incorporate their changes into your update
42+
3. Explain the conflict and ask how to proceed
43+
- This applies even when the modification seems minor or was done by a linter
44+
- The user's changes are intentional and should be respected
45+
3446
## Parallelization
3547

3648
When possible, run Tasks in your Task list in parallel.

0 commit comments

Comments
 (0)