TCR: Test && Commit || Revert
CommunityTDD on steroids: tiny steps, auto-commit, auto-revert.
Software Engineering#code quality#git#tdd#refactoring#test-driven development#tcr#extreme programming
Authorcolek42
Version1.0.0
Installs0
System Documentation
What problem does it solve?
TCR (Test && Commit || Revert) enforces extremely small, atomic code changes by automatically committing passing tests and reverting failing ones. This practice cultivates discipline, ensures high test coverage, and provides immediate feedback on development fatigue, leading to more robust code and a sustainable pace.
Core Features & Use Cases
- Automated Commit/Revert: Forces "baby steps" by committing code only if tests pass, and reverting if they fail.
- Failure Documentation: Prompts users to log failures, turning every revert into a valuable learning opportunity for pattern recognition.
- TRC Variant: Supports the "Red" phase of TDD by committing on test failure and reverting on pass, ensuring tests are written correctly.
- Use Case: A developer is refactoring a complex function. Using TCR, they make a tiny change, run tests, and if they pass, the change is automatically committed. If tests fail, the code reverts, forcing them to rethink and make an even smaller, safer step, leading to higher quality and less fear of breaking existing functionality.
Quick Start
Basic TCR script (save as tcr.sh and make executable)
<your test command> && git commit -am "TCR $(date +%H:%M:%S)" || git restore.
Example failure documentation (add to TCR-LEARNINGS.md)
TCR Learnings
## Failure Patterns
- Combining extraction + rename: Always fails - do separately
- Refactoring without reading tests first: 70% failure rate
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: TCR: Test && Commit || Revert Download link: https://github.com/colek42/claude-plugins/archive/main.zip#tcr-test-commit-revert Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.