You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Add CSS/layout changes as behavioral in TDD skip-red guidance
CSS class/property changes (overflow, flex, position, layout) alter
rendered output and are not refactoring. Document that these require
full Red-Green TDD with component tests asserting expected classes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,8 @@ uv run python -m scripts.tdd_log --log tdd-abc.log green --skip-red --reason=add
232
232
233
233
The `--reason=refactoring` flag means "tests continue to pass without modification." If existing tests would FAIL after your change, you need the full Red-Green cycle -- not `--skip-red`. This applies even when the change feels minor (updating constants, changing timeouts, adjusting limits). If a test documents the current behavior and your change alters that behavior, update the test first, watch it fail, then implement the change.
234
234
235
+
**CSS/layout changes are behavioral changes.** Changing CSS classes or properties (overflow, flex, position, min-height, z-index, etc.) alters how the page renders and is NOT refactoring. Write component tests asserting the expected CSS classes or inline styles are present, watch them fail, then implement the change. Even though jsdom cannot validate visual behavior (sticky, scroll, overflow), asserting the correct classes/properties are rendered catches regressions and enforces the Red-Green cycle.
236
+
235
237
**Discovering the TDD Log File Name:**
236
238
237
239
The TDD log file name and full usage examples are provided automatically at session start via the `SessionStart` hook. Look for the message at the top of your session that says `Your TDD log file is: tdd-<id>.log` followed by copy-pasteable Red, Green, and skip-red commands with the correct `--log` value already filled in. Use those examples as templates for all `tdd_log` commands.
0 commit comments