tcrdd

Installation
SKILL.md

TCRDD

Red/green/refactor driven by native git: each phase stages, runs the tests, and auto-commits on the expected result or auto-reverts (git reset --hard) otherwise. No external tool required.

Precondition: start from a clean tree — no uncommitted changes and no untracked files. The revert primitive (git add -A + git reset --hard) deletes untracked files with no reflog recovery, so any untracked file present when the cycle starts is lost. git stash -u (or a dedicated worktree) anything you want to keep before the first add -A.

Mode

  • Interactive (a human is in the loop): use the approval gates below — plan approval, then diff approval before each stage-and-test cycle.
  • Autonomous (no human available to approve, e.g. running unattended): just run the loop. Approval gates are optional — skip them and proceed. Still commit per phase and still take one baby step at a time. Do not freeze waiting for an approval that will never come.

Critical guardrails

  • Inspect an actual full test-runner result before declaring RED/GREEN or committing. Never advance based on a prediction.
  • Keep one baby step per phase, including unattended runs; never batch a full test suite or implementation.
  • Stage with git add -A before tests so a failed step also reverts new files. Capture failure details before resetting, then append to tcr-failure-log.md and commit the log separately after the reset. Read the git cycle before executing a phase.
  • Resolve the repository's test command once (package script, Makefile, language convention, then README/CI or ask); reuse the full CI suite every phase unless the user explicitly scopes it.
  • Autonomous runs: set a budget, use an isolated worktree for concurrent agents, tag phase commits, and stop when the budget is reached. After more than two reverts of the same step, split it; if a second round of splitting stalls, halt and report a blocker. Follow autonomous execution for the required structured handoff.
  • Skip or downgrade only for trivial code, GUI layout fiddling, trusted third-party internals, or genuine throwaway work. Extract and TCRDD lasting GUI logic; test your code at third-party boundaries. Read pragmatics for exceptions and narrow limits.
Installs
182
Repository
bsene/skills
GitHub Stars
7
First Seen
Mar 18, 2026