From c37c90f98ec4c94acbc5eb76d5f8a1f6f8ea4289 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Tue, 17 Feb 2026 21:37:58 +0100 Subject: [PATCH] docs: add bug-to-test rule in CLAUDE.md --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 5a321496..3b3cec6b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,6 +50,7 @@ Laputa App is a personal knowledge and life management desktop app, built with T - `pnpm test:e2e` runs Playwright (E2E) - Every new module should have tests - Test with realistic data — use real markdown files with YAML frontmatter, not toy examples +- **Bug → Test rule**: Every bug found manually that tests didn't catch MUST result in a new test (unit or E2E) so it never regresses. Ask yourself: "Why didn't tests catch this?" and close the gap. - Edge cases matter: empty frontmatter, missing fields, malformed YAML, files with no H1 title ### Code Quality