From 1746f9c20443d562e044e3856e24824cbeed4f1c Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Tue, 2 Jun 2026 20:28:35 +0200 Subject: [PATCH] whats-next: require pql plan export + commit after ticket mutations Ticket changes land only in the gitignored .pql/pql.db; the post-checkout/post-merge hooks rebuild it from the committed changelog on every branch switch, so un-exported tickets vanish silently (this is how the T-208-T-225 tree was lost). Add an export-and-commit step to Step 3a and a matching anti-pattern, cross-linked to the pql skill. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/skills/whats-next/SKILL.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.claude/skills/whats-next/SKILL.md b/.claude/skills/whats-next/SKILL.md index 136c570d..1a6060bd 100644 --- a/.claude/skills/whats-next/SKILL.md +++ b/.claude/skills/whats-next/SKILL.md @@ -217,6 +217,19 @@ Batch transition (comma-separated IDs): pql ticket status T-1,T-2,T-3 in_progress ``` +**Then persist it.** Ticket mutations (status here, and any `ticket new` in +Step 2) land only in the gitignored `.pql/pql.db`. The post-checkout/post-merge +hooks rebuild that DB from the committed changelog on every branch switch — so +un-exported changes vanish silently the next time anyone switches branches. After +creating or transitioning tickets, always: + +```bash +pql plan export # regenerates .pql/changelog/*.sql +git add .pql/changelog && git commit # durable; survives rebuild +``` + +See the [pql skill](../pql/SKILL.md#versioning-planning-state--data-loss-footgun-read-this). + ### 3b. Branch? Default no. Solo-dev flow on this repo — work lands directly on `main` (see recent @@ -250,6 +263,10 @@ End with a tight summary: ## Anti-patterns - Don't skip Step 0 — stale `pql.db` makes the rest of the skill lie. +- Don't leave ticket changes un-exported — `pql.db` is gitignored and the + post-checkout/post-merge hooks rebuild it from the committed changelog, so a + branch switch silently drops un-exported tickets. Always `pql plan export` + + commit `.pql/changelog/` after mutating tickets (Step 3a). - Don't activate a batch the user hasn't confirmed. - Don't spawn refinement agents for tickets that have no description — use `pql ticket refine` instead; it's cheaper and writes back through the