From a7349aacf111341bcac2d28382145146bd4c710b Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 10 Jun 2026 16:52:16 +0200 Subject: [PATCH] document that the pre-commit hook auto-stages .pql/changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tell the git-commit skill and CLAUDE.md not to hand-stage .pql/changelog — the pre-commit hook exports and stages it on every commit. The only caveat: a ticket-only turn must make at least one commit to fire the hook. Already documented in the pql skill. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/skills/git-commit/SKILL.md | 4 ++++ CLAUDE.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.claude/skills/git-commit/SKILL.md b/.claude/skills/git-commit/SKILL.md index ca3cd608..d1a651c3 100644 --- a/.claude/skills/git-commit/SKILL.md +++ b/.claude/skills/git-commit/SKILL.md @@ -134,6 +134,10 @@ Never pass multi-line messages via `-m "line1\nline2"` or multiple `-m` flags - SQLite index files (`*.sqlite`, `*.sqlite-wal`, `*.sqlite-shm`, `*.db`) — caches generated against local repos; must never land here. Gitignored defensively. - Coverage / test output (`*.out`, `coverage.*`, `*.test`) — gitignored. +## Don't hand-manage `.pql/changelog` + +The pre-commit hook exports the pql ticket DB and **auto-stages `.pql/changelog/` on every commit**. Don't `git add .pql/changelog` yourself and don't write a dedicated "flush the export" commit — just make your normal commit and the hook sweeps the ticket state in. The only thing to remember: a turn that files/changes a ticket but makes **zero commits** never fires the hook, so the change won't persist (and a later branch switch can drop it). The fix is simply to make a commit — you don't need to touch `.pql/changelog`. + ## Safety reminders (reinforced from the global Claude Code protocol) - **Never** `--no-verify`. If a pre-commit hook fails, fix the underlying issue and create a new commit. diff --git a/CLAUDE.md b/CLAUDE.md index 27908cfb..43090b7e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -89,6 +89,8 @@ Shell hygiene (keeps commands inside the permission allowlist, so they don't get Commit and push directly to `main` for routine work — this is a solo-dev repo and does not use a branch-first / feature-branch flow. Do **not** create a working branch just to land a change. (This overrides the generic "branch before committing on the default branch" assistant default.) The usual safety rules still hold: never `--no-verify`, never force-push `main`, and let the pre-push gate run. +The pre-commit hook auto-exports and stages `.pql/changelog/` (the pql ticket DB) on every commit — don't hand-stage it. A ticket change only persists if the turn makes at least one commit; with no commit the hook never fires and a later branch switch can drop it. + ## Changelog discipline [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/). Every user-visible commit adds an entry under `## [Unreleased]` in [`CHANGELOG.md`](CHANGELOG.md). Cutting a release means moving Unreleased entries under a new dated version heading **and** bumping `pubspec.yaml` `version:` in the same commit — see [`.claude/skills/git-commit/SKILL.md`](.claude/skills/git-commit/SKILL.md) for the full rule.