Dev Tracking Data Compilersqlite

Saved queries

The six questions this database is built to answer. Each runs unchanged on SQLite and Postgres.

1. Acceptance criteria with no linked commits or no linked tests2. Commits not tied to any task3. Cycle time4. Requirements changed after the code for one of their criteria merged5. Review turnaround by reviewer6. Full trace for one requirement

3. Cycle time: from story start to the merge of the last PR carrying its work.

SQL
-- 3. Cycle time: from story start to the merge of the last PR carrying its work.
-- ((julianday(b) - julianday(a)) * 24.0) is expanded per dialect by queries/saved.py.
WITH story_merges AS (
    SELECT t.story_id,
           MAX(pr.merged_at) AS last_merge,
           COUNT(DISTINCT pr.id) AS prs
    FROM tasks t
    JOIN commit_tasks ct ON ct.task_id = t.id
    JOIN pull_request_commits prc ON prc.commit_id = ct.commit_id
    JOIN pull_requests pr ON pr.id = prc.pull_request_id
    WHERE pr.merged_at IS NOT NULL
    GROUP BY t.story_id
)
SELECT f.key AS feature,
       s.key AS story,
       s.title,
       s.status,
       s.started_at,
       sm.last_merge,
       sm.prs,
       ROUND(CAST(((julianday(sm.last_merge) - julianday(s.started_at)) * 24.0) AS NUMERIC), 1) AS cycle_hours,
       ROUND(CAST(((julianday(sm.last_merge) - julianday(s.started_at)) * 24.0) / 24.0 AS NUMERIC), 1) AS cycle_days
FROM stories s
JOIN features f ON f.id = s.feature_id
JOIN story_merges sm ON sm.story_id = s.id
WHERE s.started_at IS NOT NULL
ORDER BY cycle_hours DESC;

17 rows

featurestorytitlestatusstarted_atlast_mergeprscycle_hourscycle_days
FEAT-HTTPX-01ST-HTTPX-101Graceful migration of SSL settingsdone2024-11-01T14:00:00Z2025-09-11T10:59:20Z57533.0313.9
FEAT-HTTPX-01ST-HTTPX-102Proxy support improvementsin_progress2024-10-20T14:00:00Z2025-06-02T19:29:52Z25405.5225.2
FEAT-CLICK-02ST-CLICK-202Help output is complete and reproducibledone2026-05-20T14:00:00Z2026-08-09T17:51:57Z31947.981.2
FEAT-CLICK-02ST-CLICK-204Safer testing utilitiesdone2026-05-01T14:00:00Z2026-07-20T17:43:21Z21923.780.2
FEAT-CLICK-01ST-CLICK-102Styled text renders correctly in prompts, wrapping and strippingdone2026-05-10T15:00:00Z2026-07-10T03:14:25Z41452.260.5
FEAT-REQ-01ST-REQ-102Harden URL and header parsingdone2026-03-20T14:00:00Z2026-05-10T21:41:25Z41231.751.3
FEAT-REQ-02ST-REQ-201Ship inline types with the packagedone2026-04-25T14:00:00Z2026-06-08T17:33:26Z41059.644.1
FEAT-REQ-01ST-REQ-101Accept file-like wrappers that proxy attributesdone2026-05-05T14:00:00Z2026-06-09T15:45:59Z3841.835.1
FEAT-CLICK-02ST-CLICK-201Warn about parameter names Click 9.0 will rejectin_review2026-09-01T14:00:00Z2026-10-04T22:19:53Z2800.333.3
FEAT-CLICK-02ST-CLICK-203Built-in PowerShell completiondone2026-06-15T14:00:00Z2026-07-16T23:56:43Z2753.931.4
FEAT-REQ-02ST-REQ-203Security hygienedone2026-04-10T14:00:00Z2026-05-11T19:24:21Z2749.431.2
FEAT-CLICK-01ST-CLICK-103Editor and progress bar polishdone2026-08-01T14:00:00Z2026-08-20T02:50:19Z3444.818.5
FEAT-HTTPX-02ST-HTTPX-202Retire the _utils.py grab-bag moduledone2024-10-28T14:00:00Z2024-11-15T11:42:52Z4429.717.9
FEAT-CLICK-01ST-CLICK-101Pager respects the user's PAGER and LESS settingsdone2026-08-10T14:00:00Z2026-08-19T15:20:27Z4217.39.1
FEAT-REQ-02ST-REQ-202Header and response types match runtime behaviourdone2026-05-10T14:00:00Z2026-05-14T16:16:25Z498.34.1
FEAT-HTTPX-02ST-HTTPX-203Decoder robustnessin_progress2024-11-18T14:00:00Z2024-11-22T11:42:51Z193.73.9
FEAT-HTTPX-02ST-HTTPX-201WHATWG-aligned percent escapingdone2024-10-25T14:00:00Z2024-10-28T17:38:16Z375.63.2