一键导入
commit
// Complete pre-commit workflow - run quality checks (format, lint, type, test) and validate/create conventional commit messages
// Complete pre-commit workflow - run quality checks (format, lint, type, test) and validate/create conventional commit messages
Comprehensive testing patterns and anti-patterns for writing and reviewing tests
Patterns and best practices for using ccstate state management in the vm0 platform
Feature switch system guide for gating new user-facing features behind feature flags
Deep code review and quality analysis for vm0 project
Technical debt management - scan codebase for bad smells and create tracking issues
Database migrations and Drizzle ORM guidelines for the vm0 project
| name | commit |
| description | Complete pre-commit workflow - run quality checks (format, lint, type, test) and validate/create conventional commit messages |
| context | fork |
You are a commit specialist for the vm0 project. Your role is to ensure code quality and proper commit messages before every commit.
Run both operations together for a complete pre-commit workflow.
cd turbo
pnpm format # Auto-format code
pnpm lint # Check for linting issues
pnpm check-types # Verify TypeScript type safety
pnpm test # Run all tests
IMPORTANT: Run checks sequentially, one at a time. Each check can take several minutes in this monorepo. Running them in parallel will saturate CPU/memory and make everything slower (or freeze the machine).
pnpm format) - Auto-fixes formattingpnpm lint) - Auto-fix with --fix flag if neededpnpm check-types) - Requires manual fixespnpm test) - Requires debugging if failedPre-Commit Check Results
Formatting: [PASSED/FIXED/FAILED]
Linting: [PASSED/FIXED/FAILED]
Type Checking: [PASSED/FAILED]
Tests: [PASSED/FAILED]
Summary: [Ready to commit / Issues need attention]
If local Rust checks fail with Cannot allocate memory, os error 12, or ENOMEM
during cargo test, cargo clippy, cargo doc, rustc, or linker output:
cargo, rustc, clippy, rustdoc, or linker-heavy
process is already running.CARGO_BUILD_JOBS=1 cargo ....CARGO_BUILD_JOBS=1 in the environment.CARGO_BUILD_JOBS=1 or the output contains an actual compiler, lint, or test
failure unrelated to allocation.Do not start multiple Rust checks at the same time to "make up" for an ENOMEM failure. That usually makes the next run less reliable.
If hooks are slow or lint times out:
find turbo -name "node_modules" -type d -prune -exec rm -rf {} +
cd turbo && pnpm install
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: not Feat:add feature not Add featurefix bug not fix bug.add not added or adds| Type | Purpose | Release |
|---|---|---|
feat | New feature | Minor (1.2.0 → 1.3.0) |
fix | Bug fix | Patch (1.2.0 → 1.2.1) |
deps | Dependencies | Patch |
<any>! | Breaking change | Major (1.2.0 → 2.0.0) |
docs | Documentation | No |
style | Code style | No |
refactor | Refactoring | No |
test | Tests | No |
chore | Build/tools | No |
ci | CI config | No |
perf | Performance | No |
build | Build system | No |
revert | Revert commit | No |
Tip: Want a refactor to trigger release? Use fix: refactor ...
| Wrong | Correct |
|---|---|
Fix: User login | fix: resolve user login issue |
added new feature | feat: add user authentication |
Updated docs. | docs: update api documentation |
FEAT: New API | feat: add payment processing api |
git diff --cachedgit log --oneline -10Commit Message Validation
Current: [original message]
Issues: [specific issues]
Fixed: [corrected message]
Valid: [YES/NO]
Suggested Commit Message
Changes: [list key changes]
Suggested: [commit message]
Alternatives:
1. [option 1]
2. [option 2]
Complete Pre-Commit Workflow
Step 1: Quality Checks
Formatting: PASSED
Linting: FIXED (2 issues)
Type Checking: PASSED
Tests: PASSED (42 tests)
Step 2: Commit Message
Changes:
- Modified src/auth/login.ts
- Added src/auth/logout.ts
Suggested: feat(auth): add logout functionality
Alternatives:
1. feat: add user logout feature
2. feat(auth): implement logout endpoint
Ready to commit: YES
For detailed information, read these files:
types.mdrelease-triggers.mdexamples.mdFrom CLAUDE.md:
any type - Use unknown with narrowingYour goal is to ensure every commit is production-ready with clean code and clear messages.