Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA
TypeScript
fix: /retro midnight-aligned dates + local timezone (v0.7.2) (#199)
Garry Tan2a206920edff
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex f1790adde..cc88928b3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,12 @@# Changelog+## [0.7.2] - 2026-03-18++### Fixed++- `/retro` date ranges now align to midnight instead of the current time. Running `/retro` at 9pm no longer silently drops the morning of the start date — you get full calendar days.+- `/retro` timestamps now use your local timezone instead of hardcoded Pacific time. Users outside the US-West coast get correct local hours in histograms, session detection, and streak tracking.+## [0.7.1] - 2026-03-19### Addeddiff --git a/VERSION b/VERSIONindex 39e898a4f..7486fdbc5 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.7.1+0.7.2diff --git a/retro/SKILL.md b/retro/SKILL.mdindex 90fb547e5..a4458c22d 100644--- a/retro/SKILL.md+++ b/retro/SKILL.md@@ -178,7 +178,9 @@ When the user types `/retro`, run this skill.## Instructions-Parse the argument to determine the time window. Default to 7 days if no argument given. Use `--since="N days ago"`, `--since="N hours ago"`, or `--since="N weeks ago"` (for `w` units) for git log queries. All times should be reported in **Pacific time** (use `TZ=America/Los_Angeles` when converting timestamps).+Parse the argument to determine the time window. Default to 7 days if no argument given. All times should be reported in the user's **local timezone** (use the system default — do NOT set `TZ`).++**Midnight-aligned windows:** For day (`d`) and week (`w`) units, compute an absolute start date at local midnight, not a relative string. For example, if today is 2026-03-18 and the window is 7 days: the start date is 2026-03-11. Use `--since="2026-03-11"` for git log queries — git interprets a bare date as midnight in the local timezone, so this captures full calendar days regardless of what time the retro runs. For week units, multiply by 7 to get days (e.g., `2w` = 14 days back). For hour (`h`) units, use `--since="N hours ago"` since midnight alignment does not apply to sub-day windows.**Argument validation:** If the argument doesn't match a number followed by `d`, `h`, or `w`, the word `compare`, or `compare` followed by a number and `d`/`h`/`w`, show this usage and stop:```@@ -215,8 +217,7 @@ git log origin/<default> --since="<window>" --format="%H|%aN|%ae|%ai|%s" --shortgit log origin/<default> --since="<window>" --format="COMMIT:%H|%aN" --numstat# 3. Commit timestamps for session detection and hourly distribution (with author)-# Use TZ=America/Los_Angeles for Pacific time conversion-TZ=America/Los_Angeles git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n+git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n# 4. Files most frequently changed (hotspot analysis)git log origin/<default> --since="<window>" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn@@ -296,7 +297,7 @@ If TODOS.md doesn't exist, skip the Backlog Health row.### Step 3: Commit Time Distribution-Show hourly histogram in Pacific time using bar chart:+Show hourly histogram in local time using bar chart:```Hour Commits ████████████████@@ -400,11 +401,11 @@ If the time window is 14 days or more, split into weekly buckets and show trendsCount consecutive days with at least 1 commit to origin/<default>, going back from today. Track both team streak and personal streak:```bash-# Team streak: all unique commit dates (Pacific time) — no hard cutoff-TZ=America/Los_Angeles git log origin/<default> --format="%ad" --date=format:"%Y-%m-%d" | sort -u+# Team streak: all unique commit dates (local time) — no hard cutoff+git log origin/<default> --format="%ad" --date=format:"%Y-%m-%d" | sort -u# Personal streak: only the current user's commits-TZ=America/Los_Angeles git log origin/<default> --author="<user_name>" --format="%ad" --date=format:"%Y-%m-%d" | sort -u+git log origin/<default> --author="<user_name>" --format="%ad" --date=format:"%Y-%m-%d" | sort -u```Count backward from today — how many consecutive days have at least one commit? This queries the full history so streaks of any length are reported accurately. Display both:@@ -443,7 +444,7 @@ mkdir -p .context/retrosDetermine the next sequence number for today (substitute the actual date for `$(date +%Y-%m-%d)`):```bash# Count existing retros for today to get next sequence number-today=$(TZ=America/Los_Angeles date +%Y-%m-%d)+today=$(date +%Y-%m-%d)existing=$(ls .context/retros/${today}-*.json 2>/dev/null | wc -l | tr -d ' ')next=$((existing + 1))# Save as .context/retros/${today}-${next}.json@@ -617,8 +618,8 @@ Small, practical, realistic. Each must be something that takes <5 minutes to adoWhen the user runs `/retro compare` (or `/retro compare 14d`):-1. Compute metrics for the current window (default 7d) using `--since="7 days ago"`-2. Compute metrics for the immediately prior same-length window using both `--since` and `--until` to avoid overlap (e.g., `--since="14 days ago" --until="7 days ago"` for a 7d window)+1. Compute metrics for the current window (default 7d) using the midnight-aligned start date (same logic as the main retro — e.g., if today is 2026-03-18 and window is 7d, use `--since="2026-03-11"`)+2. Compute metrics for the immediately prior same-length window using both `--since` and `--until` with midnight-aligned dates to avoid overlap (e.g., for a 7d window starting 2026-03-11: prior window is `--since="2026-03-04" --until="2026-03-11"`)3. Show a side-by-side comparison table with deltas and arrows4. Write a brief narrative highlighting the biggest improvements and regressions5. Save only the current-window snapshot to `.context/retros/` (same as a normal retro run); do **not** persist the prior-window metrics.@@ -640,7 +641,7 @@ When the user runs `/retro compare` (or `/retro compare 14d`):- ALL narrative output goes directly to the user in the conversation. The ONLY file written is the `.context/retros/` JSON snapshot.- Use `origin/<default>` for all git queries (not local main which may be stale)-- Convert all timestamps to Pacific time for display (use `TZ=America/Los_Angeles`)+- Display all timestamps in the user's local timezone (do not override `TZ`)- If the window has zero commits, say so and suggest a different window- Round LOC/hour to nearest 50- Treat merge commits as PR boundariesdiff --git a/retro/SKILL.md.tmpl b/retro/SKILL.md.tmplindex 41a48e7fd..95ee706e0 100644--- a/retro/SKILL.md.tmpl+++ b/retro/SKILL.md.tmpl@@ -44,7 +44,9 @@ When the user types `/retro`, run this skill.## Instructions-Parse the argument to determine the time window. Default to 7 days if no argument given. Use `--since="N days ago"`, `--since="N hours ago"`, or `--since="N weeks ago"` (for `w` units) for git log queries. All times should be reported in **Pacific time** (use `TZ=America/Los_Angeles` when converting timestamps).+Parse the argument to determine the time window. Default to 7 days if no argument given. All times should be reported in the user's **local timezone** (use the system default — do NOT set `TZ`).++**Midnight-aligned windows:** For day (`d`) and week (`w`) units, compute an absolute start date at local midnight, not a relative string. For example, if today is 2026-03-18 and the window is 7 days: the start date is 2026-03-11. Use `--since="2026-03-11"` for git log queries — git interprets a bare date as midnight in the local timezone, so this captures full calendar days regardless of what time the retro runs. For week units, multiply by 7 to get days (e.g., `2w` = 14 days back). For hour (`h`) units, use `--since="N hours ago"` since midnight alignment does not apply to sub-day windows.**Argument validation:** If the argument doesn't match a number followed by `d`, `h`, or `w`, the word `compare`, or `compare` followed by a number and `d`/`h`/`w`, show this usage and stop:```@@ -81,8 +83,7 @@ git log origin/<default> --since="<window>" --format="%H|%aN|%ae|%ai|%s" --shortgit log origin/<default> --since="<window>" --format="COMMIT:%H|%aN" --numstat# 3. Commit timestamps for session detection and hourly distribution (with author)-# Use TZ=America/Los_Angeles for Pacific time conversion-TZ=America/Los_Angeles git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n+git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n# 4. Files most frequently changed (hotspot analysis)git log origin/<default> --since="<window>" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn@@ -162,7 +163,7 @@ If TODOS.md doesn't exist, skip the Backlog Health row.### Step 3: Commit Time Distribution-Show hourly histogram in Pacific time using bar chart:+Show hourly histogram in local time using bar chart:```Hour Commits ████████████████@@ -266,11 +267,11 @@ If the time window is 14 days or more, split into weekly buckets and show trendsCount consecutive days with at least 1 commit to origin/<default>, going back from today. Track both team streak and personal streak:```bash-# Team streak: all unique commit dates (Pacific time) — no hard cutoff-TZ=America/Los_Angeles git log origin/<default> --format="%ad" --date=format:"%Y-%m-%d" | sort -u+# Team streak: all unique commit dates (local time) — no hard cutoff+git log origin/<default> --format="%ad" --date=format:"%Y-%m-%d" | sort -u# Personal streak: only the current user's commits-TZ=America/Los_Angeles git log origin/<default> --author="<user_name>" --format="%ad" --date=format:"%Y-%m-%d" | sort -u+git log origin/<default> --author="<user_name>" --format="%ad" --date=format:"%Y-%m-%d" | sort -u```Count backward from today — how many consecutive days have at least one commit? This queries the full history so streaks of any length are reported accurately. Display both:@@ -309,7 +310,7 @@ mkdir -p .context/retrosDetermine the next sequence number for today (substitute the actual date for `$(date +%Y-%m-%d)`):```bash# Count existing retros for today to get next sequence number-today=$(TZ=America/Los_Angeles date +%Y-%m-%d)+today=$(date +%Y-%m-%d)existing=$(ls .context/retros/${today}-*.json 2>/dev/null | wc -l | tr -d ' ')next=$((existing + 1))# Save as .context/retros/${today}-${next}.json@@ -483,8 +484,8 @@ Small, practical, realistic. Each must be something that takes <5 minutes to adoWhen the user runs `/retro compare` (or `/retro compare 14d`):-1. Compute metrics for the current window (default 7d) using `--since="7 days ago"`-2. Compute metrics for the immediately prior same-length window using both `--since` and `--until` to avoid overlap (e.g., `--since="14 days ago" --until="7 days ago"` for a 7d window)+1. Compute metrics for the current window (default 7d) using the midnight-aligned start date (same logic as the main retro — e.g., if today is 2026-03-18 and window is 7d, use `--since="2026-03-11"`)+2. Compute metrics for the immediately prior same-length window using both `--since` and `--until` with midnight-aligned dates to avoid overlap (e.g., for a 7d window starting 2026-03-11: prior window is `--since="2026-03-04" --until="2026-03-11"`)3. Show a side-by-side comparison table with deltas and arrows4. Write a brief narrative highlighting the biggest improvements and regressions5. Save only the current-window snapshot to `.context/retros/` (same as a normal retro run); do **not** persist the prior-window metrics.@@ -506,7 +507,7 @@ When the user runs `/retro compare` (or `/retro compare 14d`):- ALL narrative output goes directly to the user in the conversation. The ONLY file written is the `.context/retros/` JSON snapshot.- Use `origin/<default>` for all git queries (not local main which may be stale)-- Convert all timestamps to Pacific time for display (use `TZ=America/Los_Angeles`)+- Display all timestamps in the user's local timezone (do not override `TZ`)- If the window has zero commits, say so and suggest a different window- Round LOC/hour to nearest 50- Treat merge commits as PR boundaries