commit
Git Commit with Quality Gates
Enforce code quality before every commit.
Workflow (MANDATORY ORDER)
-
Quality Gates (BLOCKING - must pass)
./scripts/quality-gates.sh- Validates >90% test coverage
- Runs all tests with strict warnings
- Checks security vulnerabilities
- Verifies code quality standards
If quality gates FAIL: STOP. Fix issues before proceeding.
-
Check Status
git status git diff --stat -
Stage Changes
git add -p # Interactive staging for atomic commits # OR git add <specific-files> -
Create Commit (use message format below)
git commit -
Sync with Remote
git pull --rebase -
Handle Conflicts (if any)
- STOP - DO NOT AUTO-FIX
- Notify user for manual resolution
- Only proceed after user confirms resolution
-
Push
git push
Commit Message Format
type(scope): Brief description (50 chars max)
- Why this change was necessary from user perspective
- What problem it solves or capability it enables
- Reference issue/ticket numbers if applicable
Commit Types
| Type | Purpose |
|---|---|
feat |
New user-facing feature |
fix |
Bug fix resolving user issue |
docs |
Documentation changes |
refactor |
Code restructure (no user-facing changes) |
perf |
Performance improvement |
test |
Test additions/changes |
chore |
Build/dependency updates |
Message Rules
- Subject: 50 chars max, capitalized, no period
- Body: Wrap at 72 chars
- Use imperative mood: "Add feature" not "Added feature"
- Explain WHY from user perspective, not WHAT code changed
Examples
Good:
feat(search): Add filters to help users find documents faster
Users were spending too much time scrolling through results.
New filters reduce search time by 60% in user testing.
Fixes #123
Bad:
improved stuff
Atomic Commit Principle
- Each commit = ONE logical change
- Commit must compile and pass tests
- Use
git add -pfor partial staging
Optional Pre-Push Checks
For larger changes:
./scripts/check-doctests.sh
./scripts/check_performance_regression.sh
References
More from d-o-hub/rust-self-learning-memory
loop-agent
Execute workflow agents iteratively for refinement and progressive improvement until quality criteria are met. Use when tasks require repetitive refinement, multi-iteration improvements, progressive optimization, or feedback loops until convergence.
51web-search-researcher
Research topics using web search and content fetching to find accurate, current information. Use when you need modern information, official documentation, best practices, technical solutions, or comparisons beyond your training data.
46perplexity-researcher-reasoning-pro
Highest level of research and reasoning capabilities for complex decision-making with significant consequences, strategic planning, technical architecture decisions, multi-stakeholder problems, or high-complexity troubleshooting requiring expert-level judgment and sophisticated reasoning chains. Prioritizes actively maintained repositories and validates website sources for 2025 relevance.
44context-retrieval
Retrieve relevant episodic context from memory for informed decision-making. Use when you need past episodes, patterns, or solutions to similar tasks.
44rust-code-quality
Perform comprehensive Rust code quality reviews against best practices for async Rust, error handling, testing, and project structure
43codebase-analyzer
Analyze implementation details, trace data flow, explain technical workings, locate files, and consolidate codebases. Use when you need to understand HOW code works, find file locations, or assess technical debt.
40