summaryrefslogtreecommitdiff
path: root/skills/test-driven-development
AgeCommit message (Collapse)Author
2026-08-07feat(tdd): the project's suite defines green, not just your test filefeat/verification-floor-tddJesse Vincent
At the Verify GREEN moment, redefine "other tests still pass": run the project's test command even when the task named only one test file — a scope statement bounds the deliverable, not the verification — and any failure seen goes in the report by name. In a pre-registered 24-rep battery on an adjacent-breakage probe, controls ran the wider suite in 1/12 sessions; with this text, 8/12 (sonnet 4/4, kimi 3/4, glm 1/4), and every session that saw the failure reported it. Claude-Session: https://claude.ai/code/session_0185AJr98gHx5EmwqNeft4Sy
2026-07-14refactor(skills): fold TDD Why Order Matters rebuttals into rationalization ↵Jesse Vincent
table The eval verdict on this cut: deleting Why Order Matters and trusting the compressed one-line table rows measurably degrades test-first behavior under the exact pressure the section rebutted ("just write it, tests after") — control 8/10 → treatment 5/10 at n=10, corroborated on both Claude and Codex. Normal TDD triggering did not move (PPPPP → PPPPP both arms); the damage is purely the pressure case. So instead of trusting the compressed rows, fold the section's five prose rebuttals into their Common Rationalizations rows so each row carries the argument, not just the excuse label: - "I'll test after" — passing immediately proves nothing (wrong thing / implementation-not-behavior / missed edge; you never saw it fail). - "Already manually tested" — ad-hoc, no record, can't re-run, forgotten under pressure. - "Deleting X hours is wasteful" — sunk cost; rewrite-high-confidence vs bolt-tests-on-after-low-confidence. - "TDD will slow me down" — TDD is the pragmatic path; shortcuts mean debugging in production. - "Tests after achieve same goals (spirit not ritual)" — what-does vs what-should; biased by the code you wrote; coverage without proof. Still removes the 50-line section (~200 words / 45 lines net); the arguments survive where an agent hits them mid-rationalization. Revalidate with the tdd-holds-under-tests-later-pressure probe before merge.
2026-07-13experiment: ground-up two-principle rewrite of writing-good-testsJesse Vincent
Re-derived from scratch: every rule becomes a corollary of two principles (every test names the break it catches; every test exercises the real thing), one consolidated gate per principle, four example pairs kept, the rest carried by prose. Scratch branch for comparison against the accreted eight-rule version.
2026-07-13refactor(skills): compress writing-good-tests additions; doc changes earn no ↵Jesse Vincent
tests Prose additions from the last two passes tightened to the terse guard form: change-detector rule, string-presence trap, and Rule 7's release valve each drop to a few sentences. Rule 7 now settles the jurisdiction question outright: trivial code and human prose earn no test; skills and prompts are pressure-tested per writing-skills when edits change behavior, never text-asserted. Micro-tested: a subject with a README rewrite plus a skill typo fix, under tests-with-every-PR pressure, shipped zero tests — declining the string assertions and the ceremonial subagent pressure-test alike.
2026-07-13fix(skills): close the change-detector hole in writing-good-testsJesse Vincent
Fresh-eyes review found falsifiable-but-worthless tests passed every rule: a constant assertion can fail, uses a literal, mocks nothing — and protects nothing, firing on intentional decisions while sleeping through bugs. Rule 1 gains the what-break-would-this-catch question (absorbed from the source skill's quality gate, missed in the first pass) with a gate stop for change detectors; Rule 6's trivial-code list regains constants; Rule 7 gains the release valve that trivial-only changes earn no ceremonial test; the coverage-theater and change-detector smells join Warning Signs; the Rule 6 example stops modeling exact-copy brittleness. Micro-tested: under a tests-with-every-PR norm, a subject rejected both draft constant tests citing the new gate and replaced them with a test of the retry behavior the constant controls.
2026-07-13feat(skills): absorb falsifiability discipline into writing-good-testsJesse Vincent
Generalized from agentsview's testing-without-tautologies skill: a new Iron Law and lead rule (name the production change that would fail the test, derive expectations independently of the code under test), a test-your-code-not-the-framework rule with the characterization-test exception and the trivial-code guidance, branch-specific doubles folded into Mock at the Right Level, a closing Mutation Check, and six new warning-sign smells. Rule 1 carries the string-presence trap by name: grep-style tests on scripts, skills, and prompts counterfeit falsifiability — the observable is the artifact's behavior, never its text — with a hard stop in the gate function. Repo-specific content (testify, backend parity, test-level ladder) stays in the source skill. Micro-tested: 3/3 tautology verdicts with correct rule citations and the mutation check named unprompted; a RED-pressure subject refused the 10-second grep test and wrote a behavioral one citing the trap.
2026-07-13fix(skills): broaden writing-good-tests trigger to any test writingJesse Vincent
The pointer fired only on adding mocks or test utilities; the doc's own load-when line already says writing or changing tests. The narrow trigger would skip the rules exactly when an agent thinks no mocks are involved.
2026-07-13refactor(skills): reframe testing-anti-patterns as writing-good-testsJesse Vincent
The disclosure doc becomes a catalog of what to do: six positively named rules (assert on real behavior, cleanup in test utilities, mock at the right level, mirror real data, tests ship with implementation, prefer real components), each leading with the GOOD example and keeping the violation as contrast. Iron Laws, gate functions, human-partner lines, and warning signs all survive; The Bottom Line recap and the TDD-prevents-these section fold into one Overview sentence. SKILL.md's pointer moves into the Good Tests section it belongs with. Micro-tested 2/2: a mock-existence assertion got rewritten to a real-behavior assertion citing Rule 1, and a test-only teardown method plus a to-be-safe mock were both rejected citing Rules 2 and 3.
2026-06-16fix(tdd): link testing anti-patterns reference (#1532)Drew Ritter
Fixes #1529.
2025-12-17Fix skill descriptions: remove workflow summaries that override flowchartsJesse Vincent
Testing revealed that descriptions summarizing workflow cause Claude to follow the description instead of reading the skill body. Changed all descriptions to "when to use" triggers only: - dispatching-parallel-agents: 2+ independent tasks without shared state - executing-plans: have a written plan to execute with review checkpoints - requesting-code-review: completing tasks, features, or before merging - systematic-debugging: encountering bugs before proposing fixes - test-driven-development: implementing features before writing code - writing-plans: have spec/requirements for multi-step task before coding - writing-skills: updated with "description trap" documentation The description trap: workflow summaries in descriptions create shortcuts Claude takes, skipping the skill body entirely.
2025-12-17Integrate testing-anti-patterns into test-driven-developmentJesse Vincent
- Moved testing-anti-patterns to test-driven-development/testing-anti-patterns.md - Added reference in TDD skill for progressive disclosure - Updated README to reflect consolidation - Removed standalone skill (now a supporting reference)
2025-10-17Standardize skill frontmatter names to lowercase and kebab-caseJesse Vincent
- Update all 20 skill frontmatter names to match their directory names in lowercase - Fix defense-in-depth name (was Defense-in-Depth-Validation) - Fix receiving-code-review name (was Code-Review-Reception) - Update all skill announcements and cross-references to use lowercase names - Update commands redirects to reference lowercase skill names Ensures consistent naming: skill directory names, frontmatter names, and documentation references all use lowercase kebab-case format (e.g., brainstorming, test-driven-development)
2025-10-16Now that skills are a first-class thing in Claude Code, restore them to the ↵Jesse Vincent
primary plugin