Enforces Test-Commit-Revert (TCR) discipline in Aider by blocking direct commits and requiring automated test-driven workflow via tcr.sh script.
This skill enforces Test-Commit-Revert (TCR) discipline when using Aider. It prevents direct git commits and requires all changes to flow through an automated TCR script that ensures tests pass before committing.
Apply these settings to your Aider configuration:
Set the following flags to prevent Aider from making direct git commits:
```yaml
auto-commits: false
dirty-commits: false
```
Replace Aider's default commit behavior with a prompt that redirects to the TCR script:
```yaml
commit-prompt: |
STOP! You must use ./scripts/tcr.sh to commit.
Direct git commits are forbidden.
Run: ./scripts/tcr.sh "your message"
```
Mark the following files and directories as read-only to prevent accidental modification:
```yaml
read-only:
- .git/**
- scripts/tcr.sh
- scripts/revert-to-safe.sh
- scripts/verify-jail.sh
- scripts/setup-tcr-jail.sh
- .claude/**
- .opencode/**
- .aider*
- .cursorrules
- .cursorignore
```
1. **Make Changes**: Aider edits code as requested
2. **Run TCR Script**: Execute `./scripts/tcr.sh "commit message"`
3. **Automatic Testing**: Script runs test suite
4. **Conditional Commit**:
- Tests pass → Changes committed automatically
- Tests fail → Changes reverted automatically
5. **No Manual Commits**: Direct `git commit` is blocked
When working with Aider under TCR jail:
1. Request code changes from Aider normally
2. After changes are made, Aider will prompt you to use the TCR script
3. Run `./scripts/tcr.sh "description of changes"`
4. The script validates changes through testing
5. Only tested, passing code enters the repository
Protected files include:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/tcr-jail-for-aider/raw