tcr-kentbeck

Installation
SKILL.md

TCR (Test && Commit || Revert)

Non-negotiables

When this skill applies, treat TCR as mandatory, not optional:

  1. One small step — Prefer the smallest change that could move tests toward green (or add a failing test first in strict TDD, then minimal implementation).

  2. Run tests — Use the project’s real test command (see Detecting the test command). Always run the full suite for that command (same as CI / default project test entrypoint): e.g. pytest with no path arguments, npm test / pnpm test / yarn test, cargo test, go test ./..., make test if that runs everything. Do not narrow to a single file, class, or -k filter unless the user explicitly asks for a scoped run.

  3. Green → commit — If tests pass, commit that step immediately with a message that describes what changed (present tense, imperative).

  4. Red → revert — If tests fail, do not keep the change. Restore the working tree to the last committed state (git restore . / git checkout -- . or revert unstaged edits as appropriate). Then retry with a smaller or different step.

  5. Red → log — After reverting, append an entry to tcr-failure-log.md at the repository root (create it with a short title if missing). Record what went wrong so the failure is not invisible: when (ISO timestamp or equivalent), which test(s) failed and the assertion or error (or a short traceback excerpt), what change was attempted (intent in one or two sentences), and optionally what to try next. This file is append-only; do not delete past entries. Commit this log update with the next green commit if it is part of the same work, or as its own tiny commit if the user prefers a clean separation.

Do not accumulate uncommitted red edits “to fix in the next message.” Red means revert first, then log.

Workflow loop

Installs
1
GitHub Stars
2
First Seen
Oct 3, 2026