@@ -157,6 +157,52 @@ The `**Status:** READY_FOR_NEXT_TASK` line signals to the orchestrator that this
157157- Meaningful variable names (` userEmail ` not ` e ` )
158158- One concept per function
159159
160+ ## Scope Creep Prevention
161+
162+ ### Out of Scope Actions
163+
164+ ** Do NOT do these during a task:**
165+
166+ - Refactoring code you're not directly modifying
167+ - Fixing pre-existing lint/type errors in other files
168+ - Updating unrelated tests
169+ - Adding features not mentioned in the task
170+ - Renaming functions/variables outside the task scope
171+ - Upgrading dependencies unless the task specifically requires it
172+
173+ ### File Budget Warnings
174+
175+ | Task Size | Max Files | Warning Threshold |
176+ | -----------| -----------| -------------------|
177+ | Small | 3 | 2+ files = verify scope |
178+ | Medium | 6 | 4+ files = verify scope |
179+ | Large | 12 | 8+ files = verify scope |
180+
181+ If you're touching more files than expected, pause and ask: "Is this necessary for the task?"
182+
183+ ### Scope Creep vs. Acceptable Changes
184+
185+ | Type | Example |
186+ | ------| ---------|
187+ | ** SCOPE CREEP** | "While adding validation, I also refactored the error handling in 5 other files" |
188+ | ** ACCEPTABLE** | "Added validation and updated the 2 tests that directly test the validation" |
189+ | ** SCOPE CREEP** | "Fixed the bug and also updated all the JSDoc comments in the module" |
190+ | ** ACCEPTABLE** | "Fixed the bug and added a comment explaining the edge case" |
191+
192+ ### Self-Check Before Completing
193+
194+ Ask yourself: ** "Am I modifying files not listed in the task? If yes, can I justify each one?"**
195+
196+ Valid justifications:
197+ - The file contains tests for the code I changed
198+ - The file imports/exports something I modified (breaking change)
199+ - The task explicitly mentioned this file
200+
201+ Invalid justifications:
202+ - "I noticed it could be improved"
203+ - "It was related"
204+ - "I was already in that area of the code"
205+
160206## Error Recovery
161207
162208| Situation | Action |
0 commit comments