From de53cd67804c87d33921e5bb67a28149af0ade27 Mon Sep 17 00:00:00 2001 From: Jordan Winters Date: Fri, 24 Jul 2026 13:06:16 -0500 Subject: [PATCH 1/3] docs(skills): verification-first implementation loop (U17/O10) Upgrade the testing skill's regression-test-per-bug content into an explicit red-green-observe discipline: a bug fix's failing regression test must be run and its failure observed before the fix, a feature states a falsifiable "done when" before implementation, and a completion claim cites evidence (test output, pushed SHA) rather than narrating it. builder/SKILL.md cross-references the loop from its Implementation Workflow instead of restating it, keeping testing the single policy home. docs/hooks.md's opt-in recipes gain a paragraph on mechanical TDD enforcement for teams that want a hard PreToolUse block, citing nizos/tdd-guard as a worked external example (not vendored) that composes with the shipped commit/task quality gates. Source: artifacts/research_ai_coding_frustrations.md Part 3, O10. --- .claude/skills/builder/SKILL.md | 2 ++ .claude/skills/core-engineering/testing/SKILL.md | 6 ++++++ CHANGELOG.md | 1 + docs/hooks.md | 6 +++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.claude/skills/builder/SKILL.md b/.claude/skills/builder/SKILL.md index dd3d188..e70639e 100644 --- a/.claude/skills/builder/SKILL.md +++ b/.claude/skills/builder/SKILL.md @@ -28,6 +28,8 @@ Follow the `testing` skill for TDD/coverage methodology. For root-cause investig 4. **Integrate** — Use Grep to verify integration points 5. **Test** — Run tests to verify functionality +Step 5 runs on `testing`'s red-green-observe loop: run the failing regression test and observe it fail before fixing a bug, state a falsifiable "done when" before implementing a feature, and close with cited evidence (test output, SHA) — never narration. + ## Focus - Implement from approved plans/specs - Write tests alongside code (TDD) diff --git a/.claude/skills/core-engineering/testing/SKILL.md b/.claude/skills/core-engineering/testing/SKILL.md index 6abedb2..59320e9 100644 --- a/.claude/skills/core-engineering/testing/SKILL.md +++ b/.claude/skills/core-engineering/testing/SKILL.md @@ -9,6 +9,12 @@ description: Write effective tests for code quality and reliability. Use when im Give every change a check it can run before calling it done: red-then-green for new logic, a failing-then-passing regression test for bug fixes, or the existing suite for anything else. No change ships without one. +**Red-green-observe, not red-green-assume**: "confirm it fails" (the Regression workflow item below, and TDD's "watch it fail" step) means actually *run* the test and *read* the failure output before touching the fix or the implementation — never reason your way to "this must fail" and skip the run. + +**Falsifiable done-when**: before writing a feature's implementation, state one concrete, checkable condition that defines done — not "should work now," a condition a test or command can confirm or refute. + +**Evidence over narration**: a completion claim is only as good as what it cites — a pasted test-run result, a real exit code, a pushed commit SHA. Describing what the code should now do is not evidence; re-running the check and quoting its output is. + ## MCP Tools **Chrome DevTools** (E2E testing): diff --git a/CHANGELOG.md b/CHANGELOG.md index dcf2bfc..e348f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `pre-commit-verification.sh` rewritten from advisory-only to enforcing (jq present): on `git commit`, runs every gate `gate-lib.sh` detects, each under `timeout "${CLAUDE_GATE_TIMEOUT_SECS:-120}"` from the project dir, logging to `.claude/hooks/.state/gate-