From 2749e984b998fd06cb37d224a004a542384bc1b1 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Thu, 24 Sep 2026 06:04:41 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E8=A7=84=E5=88=99=E6=96=87=E4=BB=B6=20rules.mdc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursor/rules/rules.mdc | 82 ----------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 .cursor/rules/rules.mdc diff --git a/.cursor/rules/rules.mdc b/.cursor/rules/rules.mdc deleted file mode 100644 index 97ec7e4..0000000 --- a/.cursor/rules/rules.mdc +++ /dev/null @@ -1,82 +0,0 @@ ---- -alwaysApply: true ---- - -# System Directives - - -Unless the user explicitly says otherwise, these rules apply to all projects and technology stacks. - -## Basic Rules - -- Always reply in Chinese unless the user explicitly requests another language. -- The current development environment is Windows. -- Follow YAGNI and KISS. Solve the current problem with the simplest correct approach. -- Prefer existing project capabilities, conventions, utilities, and standard tooling. -- Do not over-engineer, and do not add abstractions, dependencies, frameworks, services, or parallel implementations for hypothetical needs. - -## Project Directory - -- If an existing project directory matches the task, work in that directory. -- If no project directory exists, first check `E:\code\TempCode`. -- If it exists, create a new working directory there with a name that matches the task purpose, and use it as the current project directory. -- If it does not exist, ask the user where files should be stored before creating anything. -- Do not scatter project files across unrelated directories, and do not write directly to the user's home directory unless explicitly asked. - -## Changes And Cleanup - -After implementation, clean up before reporting completion: - -- Delete temporary files, test artifacts, fake data, temporary scripts, debug logs, and unused configuration. -- Remove commented-out old code, unused imports, variables, functions, assets, and unreachable code. -- Keep only files, code, and necessary logs that are required for real use. - -## Project Memory - -After every feature, modification, or bug fix, update the project memory: - -- Use `aidocs/project_context.md` by default. -- Add `aidocs/` to `.gitignore` by default. Project memory is local only and must not be committed to Git. -- Create the memory file if it does not exist. -- Record architecture changes, new dependencies, new conventions, key logic, and important lessons. -- Do not scatter project memory across multiple files unless clearly necessary. -- Keep the document description at the top of the memory file. Add each new memory entry after the description and before older entries. -- Keep memory history in reverse chronological order, with the newest entry first, like a timeline. - -## Git - -Before finishing a project task, handle version control: - -- Initialize Git if `.git` does not exist. -- Ensure `.gitignore` exists and matches the real project structure. -- Commit only real, meaningful changes. Do not create empty commits. -- Commit message format: `: `. -- Allowed types: `feat`, `fix`, `refactor`, `style`, `docs`, `chore`, `revert`. -- Before committing, inspect all working tree changes. -- If there are changes not made in the current session, check whether they break code or introduce obvious problems. -- If those changes are reasonable user edits, such as copy changes or feature improvements, and they do not break code, include them in the commit instead of leaving them unstaged. -- If non-current-session changes appear to break code, contain sensitive information, or conflict with the current goal, ask the user before committing. - -## Execution Order - -Unless the user explicitly asks to skip steps, follow this order: - -1. Implement. -2. Clean up. -3. Update `aidocs/project_context.md`. -4. Update other documentation if needed. -5. Initialize or check Git. -6. Check `.gitignore`. -7. Commit meaningful changes. -8. Report the result or ask for next steps. - -## Non-Project Task Exception - -- Pure consulting, explanations, remote troubleshooting, server configuration, device debugging, command guidance, and one-off diagnostics do not require creating a project directory. -- These tasks do not require project memory updates, Git initialization, `.gitignore` checks, or commits. -- If the task later becomes code creation, file generation, or a reusable deliverable, handle it as a project task from that point onward. - -## No Silent Skipping - -- Do not silently skip cleanup, project memory, Git, `.gitignore`, or commits during project tasks. -- If steps are skipped because the task is non-project work or because the user explicitly requested it, briefly explain the reason when relevant.