Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:28:27 +08:00
commit 277c92829e
12 changed files with 317 additions and 0 deletions

23
commands/stage.md Normal file
View File

@@ -0,0 +1,23 @@
---
description: Intelligently stage files based on their purpose
---
Smart file staging with three categories:
1. **Check git status** and categorize untracked/modified files into:
- **Project files**: Source code, tests, configs that belong in the repo
- **Git-ignored**: Files matching .gitignore patterns (node_modules, __pycache__, .env, etc.)
- **Temporary/scratch**: Random scripts, test files, debug outputs created during development
2. **Detection heuristics**:
- Project files: In src/, tests/, config files (package.json, pyproject.toml, tsconfig.json, etc.), documentation
- Git-ignored: Check against .gitignore patterns
- Temporary: test*.py, scratch.*, debug.*, temp.*, random filenames not following project conventions
3. **Present categorization** to user with clear breakdown
4. **Ask for confirmation** before staging project files
5. **Suggest adding** temporary files to .gitignore if they match patterns
IMPORTANT: Never blindly stage all files. Always categorize and confirm with user.