An operational practice for leaving in CI history, through bug fixes and regression tests, whether the tests actually failed with the pre-fix code. Split TDD's Red→Green into two layers of GitHub stacked PRs, and make each layer an independent CI verification unit (concept source: Recommendation of Red-Green Stacked PR)。
Related skills (read each skill for details)
| skill | Role |
|---|---|
| tdd | How to write tests, seams, the Red→Green loop |
| gh-stack | Stacking branches,submit / merge / non-interactive flag |
Reference files
- references/overview.md — When starting: purpose, meaning of the two layers, scope guaranteed by CI
- references/workflow.md — When starting: procedure from implementation to PR submission
- references/inverted-fail-test.md — When starting: how to write pass/fail inversion tests and the PR body
- references/limitations-and-fit.md — When starting: suitability and relationship with atomic commits
How to read through
- references/overview.md Confirm the intent of the two-layer stack with
- tdd Decide seams and test names with , and write a reproduction test
- references/inverted-fail-test.md Prepare the inverted failing test for the lower-layer PR with
- references/workflow.md Create the lower→upper branches and commits according to
- gh-stack で
init→submit→ (at merge time)mergeRun - references/limitations-and-fit.md Finally confirm with whether it is out of scope
Final check
- Only the lower-layer PR has the inverted failing test and the
WORKAROUNDcomment, and does not include implementation changes - In the upper-layer PR, the inversion is removed, and the implementation is fixed with the same assertions and the same test names
- The stack is gh-stack Register and submit with , and merge on a stack basis
- The PR description states the correspondence: "lower-layer CI = fails under the current state" and "upper-layer CI = passes after the fix"