From 53064b051e7414af95a1f2898a356818e880906d Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 6 Jun 2026 21:48:21 +0200 Subject: [PATCH] refactor(meta): gate phases on the cascade hierarchy, not labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the labels-as-milestones pattern (carried over from the retired SQLite milestone subsystem) with pql's native initiative/epic hierarchy, which already modelled this: initiative T-745 (Development Cascade) holds the six phases as epics. A ticket is in a phase by being parented under that phase epic — self-maintaining, no label to apply or forget. The `phase:4` label had already drifted (66 tickets under the Phase-4 epic T-750 but only 42 labelled). Fixes: - T-750 (Phase 4) -> in_progress to mark the active phase (sequential per D-166). - Re-parented the 2 strays (T-974 Atlas-to-tile epic, T-1008 economy task) under T-750. - Dropped all 42 phase:4 labels (tombstoned in the changelog). - /whats-next, /ticket, ticket-cli.md, CLAUDE.md now gate on `pql ticket list --under --unblocked` instead of `--label phase:4`. - Fixed the label-action verb in the docs: pql uses `add|rm`, not `add|remove`. - pql-requirements #9 flipped: no milestone entity / labels-as-milestones needed — the initiative/epic tree is the answer. Verified: `pql plan rebuild` reconstructs the mutations; `--under T-750 --unblocked` returns the active phase's ready work. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/rules/ticket-cli.md | 20 ++++++----- .claude/skills/ticket/SKILL.md | 14 ++++---- .claude/skills/whats-next/SKILL.md | 20 ++++++++--- .pql/changelog/ticket_history/2026-06.sql | 3 ++ .pql/changelog/ticket_labels/2026-06.sql | 42 +++++++++++++++++++++++ .pql/changelog/tickets/2026-06.sql | 3 ++ CLAUDE.md | 4 +-- pql-requirements.md | 33 +++++++++--------- 8 files changed, 102 insertions(+), 37 deletions(-) create mode 100644 .pql/changelog/ticket_history/2026-06.sql diff --git a/.claude/rules/ticket-cli.md b/.claude/rules/ticket-cli.md index 3a498798e..f0d2072a8 100644 --- a/.claude/rules/ticket-cli.md +++ b/.claude/rules/ticket-cli.md @@ -45,9 +45,9 @@ pql ticket show T-440 --with-blockers # what blocks this pql ticket block T-7 --by T-440 # T-440 blocks T-7 pql ticket unblock T-7 --from T-440 # remove that edge -# Labels (also used as milestones — see below) -pql ticket label T-440 add phase:4 -pql ticket label T-440 remove phase:4 +# Labels (action is add | rm) +pql ticket label T-440 add needs-refinement +pql ticket label T-440 rm needs-refinement # Refinement (tickets with no description are "unrefined") pql ticket refine list @@ -80,14 +80,18 @@ pql decisions sync # parse governance/*.md -> pql.db pql decisions validate # malformed-record gate (pre-commit) ``` -## Milestones → labels +## Phases → the cascade hierarchy (no milestone entity) -pql has **no milestone entity** (the legacy milestone subsystem was vestigial). Phase -gating is expressed with **labels**: the active phase is `phase:4`. +pql has **no milestone entity** (the legacy one was vestigial). Phase gating is the +**ticket hierarchy**: the initiative `T-745` (Development Cascade) holds the six phases +as epics; a ticket is in a phase by being parented under that phase epic — self-maintaining, +no label to apply or forget. The active phase is the phase epic with status `in_progress` +(sequential per D-166 → the lowest-numbered non-`done` phase epic; currently `T-750`, Phase 4). ```bash -pql ticket list --label phase:4 --unblocked # the kanban "what's ready in this phase" -pql ticket label T-950 add phase:4 # put a ticket in the phase +pql ticket list --under T-750 --unblocked # the kanban "what's ready in this phase" +pql ticket setparent T-990 T-750 # put a ticket in the phase (re-parent) +pql ticket show T-745 --tree # the whole cascade ``` ## Key rules diff --git a/.claude/skills/ticket/SKILL.md b/.claude/skills/ticket/SKILL.md index 3be1b7d8c..ff2998fb6 100644 --- a/.claude/skills/ticket/SKILL.md +++ b/.claude/skills/ticket/SKILL.md @@ -40,7 +40,7 @@ pql ticket assign T-440 dudley pql ticket team T-440 server # comma teams allowed: server,client pql ticket setparent T-9 T-2 pql ticket append T-440 "extra context" # --file PATH / --stdin -pql ticket label T-440 add|remove