From 743c7d92f0c63f735dd4f15215a8d66a4b4844aa Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Thu, 11 Jun 2026 20:50:45 -0400 Subject: [PATCH] fix(13-03): exclude .planning from Prettier so the format gate stays green GSD planning artifacts (.planning/**) are rewritten by tooling on every workflow run and are never hand-formatted. Including them in Prettier scope caused pnpm format:check to exit 1 on virtually every future PR, making the SC-3 green baseline impossible to hold. Add .planning/ to .prettierignore, mirroring the same rationale as dist/ and apps/api/src/db/migrations/. Real source docs (README.md, docs/**) remain in Prettier scope. No playwright-report/, test-results/, or coverage/ directories exist to ignore. --- .../13-real-lint-gate-eslint/13-03-SUMMARY.md | 24 +++++++++++++++++++ .prettierignore | 3 +++ 2 files changed, 27 insertions(+) diff --git a/.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md b/.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md index 01f63f6..a371d33 100644 --- a/.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md +++ b/.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md @@ -120,3 +120,27 @@ Green baseline verified: - `pnpm format:check` — exit 0 - `pnpm typecheck` — exit 0 - `pnpm --filter @familysync/pwa test` — 191/191 passing + +## Correction (post-verification) + +**Gap found:** An independent re-run of `pnpm format:check` after the initial plan execution exited 1, not 0. Three GSD-managed files were not Prettier-formatted: + +- `.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md` +- `.planning/ROADMAP.md` +- `.planning/STATE.md` + +**Root cause:** `.planning/` was not in `.prettierignore`. GSD rewrites these planning docs on every workflow run (after every plan execution, state updates, roadmap sync, etc.) and never applies Prettier formatting to them. Including them in Prettier scope means the format gate fails on virtually every future PR, making SC-3 ("baseline gate ends green") impossible to hold in practice. + +**Fix applied:** Added `.planning/` to `.prettierignore` with an explanatory comment. This mirrors the existing rationale for `dist/` and `apps/api/src/db/migrations/` — tool-generated output that must not gate Prettier. Real source docs (README.md, docs/**) remain in Prettier scope; they were reformatted in commit 982438d and stay formatted. + +No other generated paths required ignoring — `playwright-report/`, `test-results/`, and `coverage/` directories do not exist on this tree. + +**Verified exit codes after fix:** + +| Command | Exit Code | +|---------|-----------| +| `pnpm format:check` | 0 | +| `pnpm lint` | 0 | +| `pnpm typecheck` | 0 | + +**Commit:** `fix(13-03): exclude .planning from Prettier so the format gate stays green` diff --git a/.prettierignore b/.prettierignore index b442e3b..a1f8ce0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,3 +3,6 @@ node_modules/ pnpm-lock.yaml apps/api/src/db/migrations/ *.html +# GSD planning artifacts — tool-generated and rewritten on every workflow run; +# never hand-formatted; must not gate Prettier (same rationale as dist/). +.planning/