From ae67414bf9ac6e7bada90e3981835858faca0f6f Mon Sep 17 00:00:00 2001 From: Thomas Powell <104777878+tpowell-progress@users.noreply.github.com> Date: Thu, 13 Aug 2026 13:56:56 -0400 Subject: [PATCH] docs: add red-green TDD workflow guidance to Copilot instructions Signed-off-by: Thomas Powell Signed-off-by: Thomas Powell <104777878+tpowell-progress@users.noreply.github.com> --- .github/copilot-instructions.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8213bb8cd2..80d11f3a57 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -218,3 +218,13 @@ When documenting UI elements, follow these guidelines: - **Conceptual docs** — architecture overviews, explanations, mental models - **Release notes** — changes per version, grouped by type - **READMEs** — project and repository overviews + +## Red-Green Test-Driven Development + +When making code changes in this repository, follow a red-green TDD workflow: + +1. **Red**: Write or update a test that captures the desired behavior or reproduces the bug. Run the test (locally or let CI run it) and confirm it **fails**. +2. **Green**: Write the minimal code change needed to make the failing test pass. Re-run the test (locally or in CI) and confirm it now **passes**. +3. **Refactor**: With the passing test as a safety net, clean up the implementation as needed, re-running tests to ensure they remain green. + +Do not write the fix before the failing test exists. This ensures every change is backed by a test that would have caught the issue, and that the fix is verifiably correct. \ No newline at end of file