2026-06-20 17:18:48 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:21:53 +01:00
2026-06-20 17:02:23 +01:00
2026-06-20 17:02:23 +01:00

Pi TDD Cycle.

Spike for a Deterministic Red - Green - Refactor state machine that keeps people and coding agents in the loop

Quick solo spike in preparation for a workshop at Socrates UK 2026 to develop a simple tdd extension for Pi.dev .

Inspired by a session by Emily Bache yesterday on reviewing various people's approaches to the RPG rules kata, and a conversation with Jon Jagger on states in the red green refactor cycle, and how we could use LLMs to give people feedback.

Both people and coding agents want to get the job done. So often I find the refactor step is skipped or rushed. The spike version appears to sometimes not pause for developer feedback after Red (when it is time to review the output, and make sure the test feedback is comprehensible), but it (limited testing YMMV) appears to stop on refactor, and cycle back to Refactor, until the developer approves going ahead.

You can choose to write tests and code by yourself, and use the cycle to slow you down, and optionally use an LLM to identify some code smells. You can then choose to act or ignore the code smells. Up to you when the cycle continues.

Screenshot of the widget in action. Green Phase done, Refactoring widget with developer options showing.

You can read how this spike came together in the [spike session transcript](transcripts/code-smells.html spike.html).

MIT licensed .

Description
Guide people and coding agents to work in small steps, as deterministically as possible.
Readme MIT 1 MiB
Languages
HTML 89.4%
TypeScript 10.6%