fix(han-coding): gate out-of-scope production changes in tdd and automated-test-planning - #191
Merged
Merged
Conversation
…mated-test-planning An honestly-evidenced finding at CRIT could walk a production change into a build that never authorized it. In automated-test-planning, a security item whose own text named "first add an explicit order" landed in the plan as a test to write. In tdd, the observed-failure gate confirmed the red was real, and green arrived by editing a shared engine every application in the monorepo consumes. Neither skill asked whether the test deserved to exist in that build. tdd gains a scope gate as the observed-failure gate's companion. Step 1 records a scope boundary in files and directories. Step 2 tests every list item against it and works a three-rung resolution ladder when one trips: redesign the test, defer the item as its own ticket, or escalate when the requested behavior cannot be delivered without the change. The Red phase names the files green would touch before touching any of them, and Step 5 reports what the gate moved. failure-modes.md documents the failure as mode 10, including the way it compounds when a later test leans on the new behavior for a deterministic fixture. automated-test-planning gains a prerequisite sweep before priorities are assigned. An item that cannot be tested until shipped code changes leaves the priority tiers for a Blocked by a Production Change section carrying the change, the file, and the file's other consumers. The sweep runs over security items on the same terms, because CRIT ranks a finding's severity and says nothing about whose ticket the fix belongs to. The blocked count sits in the Summary bullets, where a caveat beneath the Technical Reference would lose the attention contest to a CRIT label above it. Closes #188
mxriverlynn
marked this pull request as ready for review
August 20, 2026 15:09
This was referenced Aug 20, 2026
Merged
mxriverlynn
added a commit
that referenced
this pull request
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #188.
The defect
An honestly-evidenced finding at CRIT could walk a production change into a build that never authorized it.
In
automated-test-planning, everyadversarial-security-analystitem lands at CRIT. One such item's own text said the test "requires first adding an explicitorder" — a production change to shared code, packaged as a test to write. Nothing asked whether that change belonged to the ticket.In
tdd, the item entered the behavior list carrying that CRIT label, which the YAGNI gate read as evidence. The test went red exactly as designed, the observed-failure gate was satisfied mechanically, and green arrived by editing a model in a shared Rails engine that every application in the monorepo consumes. The red was genuine. Nobody checked whether the test deserved to exist in that build.What changed
tddgains a scope gateThe observed-failure gate proves a red is real. It does not prove this build owns producing the missing behavior. The scope gate is its companion, wired at four points:
CODEOWNERS. When the request names no files, the boundary is the application the behavior lives in, with its dependencies outside.references/failure-modes.mddocuments this as failure mode 10, including how it compounds: a later test leans on the new behavior for a deterministic fixture, so the out-of-scope change becomes load-bearing for work that could have arranged its own setup. Rung 1 catches that case explicitly.automated-test-planninggains a prerequisite sweepA new Step 3 sweep, run before IDs and priorities are assigned, pulls any item that cannot be tested until shipped code changes first. Those leave the priority tiers for a Blocked by a Production Change section recording the change needed, the file that would carry it, and that file's other consumers, so a reader can see the blast radius and open a separate ticket.
The sweep applies to security items on the same terms as every other. The SEC classification rule now says so directly: CRIT ranks a finding's severity and says nothing about whose ticket the fix belongs to.
The blocked count sits in the Summary bullets rather than only in the Technical Reference, because the issue's own report noted that "the CRIT/HIGH labels got more attention than the caveats did."
Files
han-coding/skills/tdd/SKILL.mdhan-coding/skills/tdd/references/failure-modes.mdhan-coding/skills/automated-test-planning/SKILL.mdhan-coding/skills/automated-test-planning/references/template.mdhan-coding/docs/skills/tdd.mdhan-coding/docs/skills/automated-test-planning.mdVerification
npm run lint(13 hooks) andnpm test(80 Bats assertions) both pass.tdd/SKILL.mdis 285 lines andautomated-test-planning/SKILL.mdis 274, both well under the 500-line progressive-disclosure ceiling; the narrative failure-mode content went toreferences/, and the gate's conditional logic stayed in the SKILL body. No version bumped and noAskUserQuestionadded toallowed-tools.