feat: add self-tdd watchdog — continuous test runner CLI

Adds `src/self_tdd/watchdog.py` with a `_run_tests()` function that
shells out to pytest and a `watch` command that polls on a configurable
interval, printing green on recovery and full short-traceback output on
regression. No files are modified and no commits are made automatically.

Usage:
    self-tdd watch            # default 60s interval
    self-tdd watch -i 15      # poll every 15s

Also adds 6 unit tests and wires the `self-tdd` entry point +
`src/self_tdd` wheel include into pyproject.toml.

https://claude.ai/code/session_01DMjQ5qMZ8iHeyix1j3GS7c
This commit is contained in:
Claude
2026-02-21 16:36:56 +00:00
parent 982c42ba45
commit 7619407b63
4 changed files with 127 additions and 1 deletions

View File

@@ -31,10 +31,11 @@ dev = [
[project.scripts]
timmy = "timmy.cli:main"
self-tdd = "self_tdd.watchdog:main"
[tool.hatch.build.targets.wheel]
sources = {"src" = ""}
include = ["src/timmy", "src/dashboard", "src/config.py"]
include = ["src/timmy", "src/dashboard", "src/config.py", "src/self_tdd"]
[tool.pytest.ini_options]
testpaths = ["tests"]