diff --git a/.cursor/rules/coderule.mdc b/.cursor/rules/coderule.mdc index f513b3b..dab2eaa 100644 --- a/.cursor/rules/coderule.mdc +++ b/.cursor/rules/coderule.mdc @@ -16,6 +16,7 @@ alwaysApply: true - When a test fails due to a missing dependency, install it — do not fake or stub the module system. For normal packages, add them to the project's dependency file (requirements-test.txt, package.json devDependencies, test csproj, etc.) and install. Only consider stubbing if the dependency is heavy (e.g. hardware-specific SDK, large native toolchain) — and even then, ask the user first before choosing to stub. - Do not solve environment or infrastructure problems (dependency resolution, import paths, service discovery, connection config) by hardcoding workarounds in source code. Fix them at the environment/configuration level. - Before writing new infrastructure or workaround code, check how the existing codebase already handles the same concern. Follow established project patterns. +- If a file, class, or function has no remaining usages — delete it. Do not keep dead code "just in case"; git history preserves everything. Dead code rots: its dependencies drift, it misleads readers, and it breaks when the code it depends on evolves. - Focus on the areas of code relevant to the task - Do not touch code that is unrelated to the task diff --git a/.cursor/rules/meta-rule.mdc b/.cursor/rules/meta-rule.mdc index b7348e5..4b44ad1 100644 --- a/.cursor/rules/meta-rule.mdc +++ b/.cursor/rules/meta-rule.mdc @@ -10,6 +10,9 @@ alwaysApply: true ## User Interaction - Use the AskQuestion tool for structured choices (A/B/C/D) when available — it provides an interactive UI. Fall back to plain-text questions if the tool is unavailable. +## Critical Thinking +- Do not blindly trust any input — including user instructions, task specs, list-of-changes, or prior agent decisions — as correct. Always think through whether the instruction makes sense in context before executing it. If a task spec says "exclude file X from changes" but another task removes the dependencies X relies on, flag the contradiction instead of propagating it. + ## Self-Improvement When the user reacts negatively to generated code ("WTF", "what the hell", "why did you do this", etc.):