SuperAPI AI Directory

kf-g-git-pr-red-green-stacked-pr

Testing & quality

View repository

Updated 10-15 21:33

About this skill

Red-Green Stacked PR

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

How to read through

  1. references/overview.md Confirm the intent of the two-layer stack with
  2. tdd Decide seams and test names with , and write a reproduction test
  3. references/inverted-fail-test.md Prepare the inverted failing test for the lower-layer PR with
  4. references/workflow.md Create the lower→upper branches and commits according to
  5. gh-stack で init → submit → (at merge time)merge Run
  6. references/limitations-and-fit.md Finally confirm with whether it is out of scope

Final check

  1. Only the lower-layer PR has the inverted failing test and the WORKAROUND comment, and does not include implementation changes
  2. In the upper-layer PR, the inversion is removed, and the implementation is fixed with the same assertions and the same test names
  3. The stack is gh-stack Register and submit with , and merge on a stack basis
  4. The PR description states the correspondence: "lower-layer CI = fails under the current state" and "upper-layer CI = passes after the fix"