M CHANGELOG.md => CHANGELOG.md +10 -3
@@ 1,11 1,18 @@
# Changelog
-## 0.5.0.1 — 2026-03-17
-
-### Fixed
+## 0.5.1 — 2026-03-17
+- **Know where you stand before you ship.** Every `/plan-ceo-review`, `/plan-eng-review`, and `/plan-design-review` now logs its result to a review tracker. At the end of each review, you see a **Review Readiness Dashboard** showing which reviews are done, when they ran, and whether they're clean — with a clear CLEARED TO SHIP or NOT READY verdict.
+- **`/ship` checks your reviews before creating the PR.** Pre-flight now reads the dashboard and asks if you want to continue when reviews are missing. Informational only — it won't block you, but you'll know what you skipped.
+- **One less thing to copy-paste.** The SLUG computation (that opaque sed pipeline for computing `owner-repo` from git remote) is now a shared `bin/gstack-slug` helper. All 14 inline copies across templates replaced with `eval $(gstack-slug)`. If the format ever changes, fix it once.
- **Screenshots are now visible during QA and browse sessions.** When gstack takes screenshots, they now show up as clickable image elements in your output — no more invisible `/tmp/browse-screenshot.png` paths you can't see. Works in `/qa`, `/qa-only`, `/plan-design-review`, `/qa-design-review`, `/browse`, and `/gstack`.
+### For contributors
+
+- Added `{{REVIEW_DASHBOARD}}` resolver to `gen-skill-docs.ts` — shared dashboard reader injected into 4 templates (3 review skills + ship).
+- Added `bin/gstack-slug` helper (5-line bash) with unit tests. Outputs `SLUG=` and `BRANCH=` lines, sanitizes `/` to `-`.
+- New TODOs: smart review relevance detection (P3), `/merge` skill for review-gated PR merge (P2).
+
## 0.5.0 — 2026-03-16
- **Your site just got a design review.** `/plan-design-review` opens your site and reviews it like a senior product designer — typography, spacing, hierarchy, color, responsive, interactions, and AI slop detection. Get letter grades (A-F) per category, a dual headline "Design Score" + "AI Slop Score", and a structured first impression that doesn't pull punches.
M TODOS.md => TODOS.md +26 -0
@@ 408,6 408,32 @@ Shipped as `/design-consultation` on garrytan/design branch. Renamed from `/setu
**Priority:** P2
**Depends on:** None
+## Ship Confidence Dashboard
+
+### Smart review relevance detection
+
+**What:** Auto-detect which of the 4 reviews are relevant based on branch changes (skip Design Review if no CSS/view changes, skip Code Review if plan-only).
+
+**Why:** Currently dashboard always shows 4 rows. On docs-only changes, "Design Review: NOT YET RUN" is noise.
+
+**Context:** /plan-design-review and /qa already do file-type detection in diff-aware mode. Could reuse that heuristic. Would require a `gstack-diff-scope` helper or enriching `gstack-slug` to also output change categories.
+
+**Effort:** M
+**Priority:** P3
+**Depends on:** Ship Confidence Dashboard (shipped)
+
+### /merge skill — review-gated PR merge
+
+**What:** Create a `/merge` skill that merges an approved PR, but first checks the Review Readiness Dashboard and runs `/review` (Fix-First) if code review hasn't been done. Separates "ship" (create PR) from "merge" (land it).
+
+**Why:** Currently `/review` runs inside `/ship` Step 3.5 but isn't tracked as a gate. A `/merge` skill ensures code review always happens before landing, and enables workflows where someone else reviews the PR first.
+
+**Context:** `/ship` creates the PR. `/merge` would: check dashboard → run `/review` if needed → `gh pr merge`. This is where code review tracking belongs — at merge time, not at plan time.
+
+**Effort:** M
+**Priority:** P2
+**Depends on:** Ship Confidence Dashboard (shipped)
+
## Completed
### Phase 1: Foundations (v0.2.0)
M VERSION => VERSION +1 -1
@@ 1,1 1,1 @@
-0.5.0.1
+0.5.1
A bin/gstack-slug => bin/gstack-slug +9 -0
@@ 0,0 1,9 @@
+#!/usr/bin/env bash
+# gstack-slug — output project slug and sanitized branch name
+# Usage: eval $(gstack-slug) → sets SLUG and BRANCH variables
+# Or: gstack-slug → prints SLUG=... and BRANCH=... lines
+set -euo pipefail
+SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-')
+echo "SLUG=$SLUG"
+echo "BRANCH=$BRANCH"
M design-consultation/SKILL.md => design-consultation/SKILL.md +1 -1
@@ 114,7 114,7 @@ ls src/ app/ pages/ components/ 2>/dev/null | head -30
Look for brainstorm output:
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
ls ~/.gstack/projects/$SLUG/*brainstorm* 2>/dev/null | head -5
ls .context/*brainstorm* .context/attachments/*brainstorm* 2>/dev/null | head -5
```
M design-consultation/SKILL.md.tmpl => design-consultation/SKILL.md.tmpl +1 -1
@@ 49,7 49,7 @@ ls src/ app/ pages/ components/ 2>/dev/null | head -30
Look for brainstorm output:
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
ls ~/.gstack/projects/$SLUG/*brainstorm* 2>/dev/null | head -5
ls .context/*brainstorm* .context/attachments/*brainstorm* 2>/dev/null | head -5
```
M plan-ceo-review/SKILL.md => plan-ceo-review/SKILL.md +47 -0
@@ 534,6 534,53 @@ List every ASCII diagram in files this plan touches. Still accurate?
### Unresolved Decisions
If any AskUserQuestion goes unanswered, note it here. Never silently default.
+## Review Log
+
+After producing the Completion Summary above, persist the review result:
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+mkdir -p ~/.gstack/projects/$SLUG
+echo '{"skill":"plan-ceo-review","timestamp":"TIMESTAMP","status":"STATUS","unresolved":N,"critical_gaps":N,"mode":"MODE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
+```
+
+Before running this command, substitute the placeholder values from the Completion Summary you just produced:
+- **TIMESTAMP**: current ISO 8601 datetime (e.g., 2026-03-16T14:30:00)
+- **STATUS**: "clean" if 0 unresolved decisions AND 0 critical gaps; otherwise "issues_open"
+- **unresolved**: number from "Unresolved decisions" in the summary
+- **critical_gaps**: number from "Failure modes: ___ CRITICAL GAPS" in the summary
+- **MODE**: the mode the user selected (SCOPE_EXPANSION / HOLD_SCOPE / SCOPE_REDUCTION)
+
+## Review Readiness Dashboard
+
+After completing the review, read the review log to display the dashboard.
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+cat ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_REVIEWS"
+```
+
+Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, plan-design-review). Ignore entries with timestamps older than 7 days. Display:
+
+```
++====================================================================+
+| REVIEW READINESS DASHBOARD |
++====================================================================+
+| Review | Runs | Last Run | Status |
+|-----------------|------|---------------------|----------------------|
+| CEO Review | 1 | 2026-03-16 14:30 | CLEAR |
+| Eng Review | 1 | 2026-03-16 15:00 | CLEAR |
+| Design Review | 0 | — | NOT YET RUN |
++--------------------------------------------------------------------+
+| VERDICT: 2/3 CLEAR — Design Review not yet run |
++====================================================================+
+```
+
+**Verdict logic:**
+- **CLEARED TO SHIP (3/3)**: All three have >= 1 entry within 7 days AND most recent status is "clean"
+- **N/3 CLEAR**: Show count and list which are missing, have open issues, or are stale (>7 days)
+- Informational only — does NOT block.
+
## Formatting Rules
* NUMBER issues (1, 2, 3...) and LETTERS for options (A, B, C...).
* Label with NUMBER + LETTER (e.g., "3A", "3B").
M plan-ceo-review/SKILL.md.tmpl => plan-ceo-review/SKILL.md.tmpl +19 -0
@@ 452,6 452,25 @@ List every ASCII diagram in files this plan touches. Still accurate?
### Unresolved Decisions
If any AskUserQuestion goes unanswered, note it here. Never silently default.
+## Review Log
+
+After producing the Completion Summary above, persist the review result:
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+mkdir -p ~/.gstack/projects/$SLUG
+echo '{"skill":"plan-ceo-review","timestamp":"TIMESTAMP","status":"STATUS","unresolved":N,"critical_gaps":N,"mode":"MODE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
+```
+
+Before running this command, substitute the placeholder values from the Completion Summary you just produced:
+- **TIMESTAMP**: current ISO 8601 datetime (e.g., 2026-03-16T14:30:00)
+- **STATUS**: "clean" if 0 unresolved decisions AND 0 critical gaps; otherwise "issues_open"
+- **unresolved**: number from "Unresolved decisions" in the summary
+- **critical_gaps**: number from "Failure modes: ___ CRITICAL GAPS" in the summary
+- **MODE**: the mode the user selected (SCOPE_EXPANSION / HOLD_SCOPE / SCOPE_REDUCTION)
+
+{{REVIEW_DASHBOARD}}
+
## Formatting Rules
* NUMBER issues (1, 2, 3...) and LETTERS for options (A, B, C...).
* Label with NUMBER + LETTER (e.g., "3A", "3B").
M plan-design-review/SKILL.md => plan-design-review/SKILL.md +47 -1
@@ 384,7 384,7 @@ Compare screenshots and observations across pages for:
**Project-scoped:**
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to: `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
@@ 557,3 557,49 @@ Project type: {web app / dashboard / marketing site / etc.}
11. **Never fix anything.** Find and document only. Do not read source code, edit files, or suggest code fixes. Your job is to report what could be better and suggest design improvements. Use `/qa-design-review` for the fix loop.
12. **The exception:** You MAY write a DESIGN.md file if the user accepts the offer. This is the only file you create.
+
+## Review Log
+
+After compiling the report, persist the review result:
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+mkdir -p ~/.gstack/projects/$SLUG
+echo '{"skill":"plan-design-review","timestamp":"TIMESTAMP","status":"STATUS","design_score":"GRADE","ai_slop_score":"GRADE","mode":"MODE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
+```
+
+Substitute values from the report:
+- **TIMESTAMP**: current ISO 8601 datetime
+- **STATUS**: "clean" if Design Score is A or B; "issues_open" if C, D, or F
+- **GRADE**: the letter grade from the report (Design Score and AI Slop Score respectively)
+- **MODE**: Full / Quick / Deep / Diff-aware / Regression
+
+## Review Readiness Dashboard
+
+After completing the review, read the review log to display the dashboard.
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+cat ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_REVIEWS"
+```
+
+Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, plan-design-review). Ignore entries with timestamps older than 7 days. Display:
+
+```
++====================================================================+
+| REVIEW READINESS DASHBOARD |
++====================================================================+
+| Review | Runs | Last Run | Status |
+|-----------------|------|---------------------|----------------------|
+| CEO Review | 1 | 2026-03-16 14:30 | CLEAR |
+| Eng Review | 1 | 2026-03-16 15:00 | CLEAR |
+| Design Review | 0 | — | NOT YET RUN |
++--------------------------------------------------------------------+
+| VERDICT: 2/3 CLEAR — Design Review not yet run |
++====================================================================+
+```
+
+**Verdict logic:**
+- **CLEARED TO SHIP (3/3)**: All three have >= 1 entry within 7 days AND most recent status is "clean"
+- **N/3 CLEAR**: Show count and list which are missing, have open issues, or are stale (>7 days)
+- Informational only — does NOT block.
M plan-design-review/SKILL.md.tmpl => plan-design-review/SKILL.md.tmpl +18 -0
@@ 145,3 145,21 @@ Project type: {web app / dashboard / marketing site / etc.}
11. **Never fix anything.** Find and document only. Do not read source code, edit files, or suggest code fixes. Your job is to report what could be better and suggest design improvements. Use `/qa-design-review` for the fix loop.
12. **The exception:** You MAY write a DESIGN.md file if the user accepts the offer. This is the only file you create.
+
+## Review Log
+
+After compiling the report, persist the review result:
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+mkdir -p ~/.gstack/projects/$SLUG
+echo '{"skill":"plan-design-review","timestamp":"TIMESTAMP","status":"STATUS","design_score":"GRADE","ai_slop_score":"GRADE","mode":"MODE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
+```
+
+Substitute values from the report:
+- **TIMESTAMP**: current ISO 8601 datetime
+- **STATUS**: "clean" if Design Score is A or B; "issues_open" if C, D, or F
+- **GRADE**: the letter grade from the report (Design Score and AI Slop Score respectively)
+- **MODE**: Full / Quick / Deep / Diff-aware / Regression
+
+{{REVIEW_DASHBOARD}}
M plan-eng-review/SKILL.md => plan-eng-review/SKILL.md +48 -2
@@ 154,8 154,7 @@ For LLM/prompt changes: check the "Prompt/LLM changes" file patterns listed in C
After producing the test diagram, write a test plan artifact to the project directory so `/qa` and `/qa-only` can consume it as primary test input (replacing the lossy git-diff heuristic):
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
-BRANCH=$(git rev-parse --abbrev-ref HEAD)
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S)
mkdir -p ~/.gstack/projects/$SLUG
@@ 259,5 258,52 @@ Check the git log for this branch. If there are prior commits suggesting a previ
* One sentence max per option. Pick in under 5 seconds.
* After each review section, pause and ask for feedback before moving on.
+## Review Log
+
+After producing the Completion Summary above, persist the review result:
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+mkdir -p ~/.gstack/projects/$SLUG
+echo '{"skill":"plan-eng-review","timestamp":"TIMESTAMP","status":"STATUS","unresolved":N,"critical_gaps":N,"mode":"MODE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
+```
+
+Substitute values from the Completion Summary:
+- **TIMESTAMP**: current ISO 8601 datetime
+- **STATUS**: "clean" if 0 unresolved decisions AND 0 critical gaps; otherwise "issues_open"
+- **unresolved**: number from "Unresolved decisions" count
+- **critical_gaps**: number from "Failure modes: ___ critical gaps flagged"
+- **MODE**: SCOPE_REDUCTION / BIG_CHANGE / SMALL_CHANGE
+
+## Review Readiness Dashboard
+
+After completing the review, read the review log to display the dashboard.
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+cat ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_REVIEWS"
+```
+
+Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, plan-design-review). Ignore entries with timestamps older than 7 days. Display:
+
+```
++====================================================================+
+| REVIEW READINESS DASHBOARD |
++====================================================================+
+| Review | Runs | Last Run | Status |
+|-----------------|------|---------------------|----------------------|
+| CEO Review | 1 | 2026-03-16 14:30 | CLEAR |
+| Eng Review | 1 | 2026-03-16 15:00 | CLEAR |
+| Design Review | 0 | — | NOT YET RUN |
++--------------------------------------------------------------------+
+| VERDICT: 2/3 CLEAR — Design Review not yet run |
++====================================================================+
+```
+
+**Verdict logic:**
+- **CLEARED TO SHIP (3/3)**: All three have >= 1 entry within 7 days AND most recent status is "clean"
+- **N/3 CLEAR**: Show count and list which are missing, have open issues, or are stale (>7 days)
+- Informational only — does NOT block.
+
## Unresolved decisions
If the user does not respond to an AskUserQuestion or interrupts to move on, note which decisions were left unresolved. At the end of the review, list these as "Unresolved decisions that may bite you later" — never silently default to an option.
M plan-eng-review/SKILL.md.tmpl => plan-eng-review/SKILL.md.tmpl +20 -2
@@ 89,8 89,7 @@ For LLM/prompt changes: check the "Prompt/LLM changes" file patterns listed in C
After producing the test diagram, write a test plan artifact to the project directory so `/qa` and `/qa-only` can consume it as primary test input (replacing the lossy git-diff heuristic):
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
-BRANCH=$(git rev-parse --abbrev-ref HEAD)
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S)
mkdir -p ~/.gstack/projects/$SLUG
@@ 194,5 193,24 @@ Check the git log for this branch. If there are prior commits suggesting a previ
* One sentence max per option. Pick in under 5 seconds.
* After each review section, pause and ask for feedback before moving on.
+## Review Log
+
+After producing the Completion Summary above, persist the review result:
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+mkdir -p ~/.gstack/projects/$SLUG
+echo '{"skill":"plan-eng-review","timestamp":"TIMESTAMP","status":"STATUS","unresolved":N,"critical_gaps":N,"mode":"MODE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
+```
+
+Substitute values from the Completion Summary:
+- **TIMESTAMP**: current ISO 8601 datetime
+- **STATUS**: "clean" if 0 unresolved decisions AND 0 critical gaps; otherwise "issues_open"
+- **unresolved**: number from "Unresolved decisions" count
+- **critical_gaps**: number from "Failure modes: ___ critical gaps flagged"
+- **MODE**: SCOPE_REDUCTION / BIG_CHANGE / SMALL_CHANGE
+
+{{REVIEW_DASHBOARD}}
+
## Unresolved decisions
If the user does not respond to an AskUserQuestion or interrupts to move on, note which decisions were left unresolved. At the end of the review, list these as "Unresolved decisions that may bite you later" — never silently default to an option.
M qa-design-review/SKILL.md => qa-design-review/SKILL.md +2 -2
@@ 396,7 396,7 @@ Compare screenshots and observations across pages for:
**Project-scoped:**
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to: `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
@@ 603,7 603,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:**
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
M qa-design-review/SKILL.md.tmpl => qa-design-review/SKILL.md.tmpl +1 -1
@@ 191,7 191,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:**
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
M qa-only/SKILL.md => qa-only/SKILL.md +2 -2
@@ 134,7 134,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash
- SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+ eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ 427,7 427,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context:
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
M qa-only/SKILL.md.tmpl => qa-only/SKILL.md.tmpl +2 -2
@@ 52,7 52,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash
- SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+ eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ 72,7 72,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context:
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
M qa/SKILL.md => qa/SKILL.md +2 -2
@@ 171,7 171,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash
- SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+ eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ 579,7 579,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context:
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
M qa/SKILL.md.tmpl => qa/SKILL.md.tmpl +2 -2
@@ 72,7 72,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash
- SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+ eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ 207,7 207,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context:
```bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|;s|.*[:/]\([^/]*/[^/]*\)$|\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
M scripts/gen-skill-docs.ts => scripts/gen-skill-docs.ts +34 -1
@@ 730,7 730,7 @@ Compare screenshots and observations across pages for:
**Project-scoped:**
\`\`\`bash
-SLUG=$(git remote get-url origin 2>/dev/null | sed 's|.*[:/]\\([^/]*/[^/]*\\)\\.git$|\\1|;s|.*[:/]\\([^/]*/[^/]*\\)$|\\1|' | tr '/' '-')
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
mkdir -p ~/.gstack/projects/$SLUG
\`\`\`
Write to: \`~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md\`
@@ 814,6 814,38 @@ Tie everything to user goals and product objectives. Always suggest specific imp
11. **Show screenshots to the user.** After every \`$B screenshot\`, \`$B snapshot -a -o\`, or \`$B responsive\` command, use the Read tool on the output file(s) so the user can see them inline. For \`responsive\` (3 files), Read all three. This is critical — without it, screenshots are invisible to the user.`;
}
+function generateReviewDashboard(): string {
+ return `## Review Readiness Dashboard
+
+After completing the review, read the review log to display the dashboard.
+
+\`\`\`bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+cat ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_REVIEWS"
+\`\`\`
+
+Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, plan-design-review). Ignore entries with timestamps older than 7 days. Display:
+
+\`\`\`
++====================================================================+
+| REVIEW READINESS DASHBOARD |
++====================================================================+
+| Review | Runs | Last Run | Status |
+|-----------------|------|---------------------|----------------------|
+| CEO Review | 1 | 2026-03-16 14:30 | CLEAR |
+| Eng Review | 1 | 2026-03-16 15:00 | CLEAR |
+| Design Review | 0 | — | NOT YET RUN |
++--------------------------------------------------------------------+
+| VERDICT: 2/3 CLEAR — Design Review not yet run |
++====================================================================+
+\`\`\`
+
+**Verdict logic:**
+- **CLEARED TO SHIP (3/3)**: All three have >= 1 entry within 7 days AND most recent status is "clean"
+- **N/3 CLEAR**: Show count and list which are missing, have open issues, or are stale (>7 days)
+- Informational only — does NOT block.`;
+}
+
const RESOLVERS: Record<string, () => string> = {
COMMAND_REFERENCE: generateCommandReference,
SNAPSHOT_FLAGS: generateSnapshotFlags,
@@ 822,6 854,7 @@ const RESOLVERS: Record<string, () => string> = {
BASE_BRANCH_DETECT: generateBaseBranchDetect,
QA_METHODOLOGY: generateQAMethodology,
DESIGN_METHODOLOGY: generateDesignMethodology,
+ REVIEW_DASHBOARD: generateReviewDashboard,
};
// ─── Template Processing ────────────────────────────────────
M ship/SKILL.md => ship/SKILL.md +37 -0
@@ 132,6 132,43 @@ You are running the `/ship` workflow. This is a **non-interactive, fully automat
3. Run `git diff <base>...HEAD --stat` and `git log <base>..HEAD --oneline` to understand what's being shipped.
+4. Check review readiness:
+
+## Review Readiness Dashboard
+
+After completing the review, read the review log to display the dashboard.
+
+```bash
+eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
+cat ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_REVIEWS"
+```
+
+Parse the output. Find the most recent entry for each skill (plan-ceo-review, plan-eng-review, plan-design-review). Ignore entries with timestamps older than 7 days. Display:
+
+```
++====================================================================+
+| REVIEW READINESS DASHBOARD |
++====================================================================+
+| Review | Runs | Last Run | Status |
+|-----------------|------|---------------------|----------------------|
+| CEO Review | 1 | 2026-03-16 14:30 | CLEAR |
+| Eng Review | 1 | 2026-03-16 15:00 | CLEAR |
+| Design Review | 0 | — | NOT YET RUN |
++--------------------------------------------------------------------+
+| VERDICT: 2/3 CLEAR — Design Review not yet run |
++====================================================================+
+```
+
+**Verdict logic:**
+- **CLEARED TO SHIP (3/3)**: All three have >= 1 entry within 7 days AND most recent status is "clean"
+- **N/3 CLEAR**: Show count and list which are missing, have open issues, or are stale (>7 days)
+- Informational only — does NOT block.
+
+If the verdict is NOT "CLEARED TO SHIP (3/3)", use AskUserQuestion:
+- Show which reviews are missing or have open issues
+- RECOMMENDATION: Choose B (run missing reviews first) unless the change is trivial
+- Options: A) Ship anyway B) Abort — run missing review(s) first C) Reviews not relevant for this change
+
---
## Step 2: Merge the base branch (BEFORE tests)
M ship/SKILL.md.tmpl => ship/SKILL.md.tmpl +9 -0
@@ 50,6 50,15 @@ You are running the `/ship` workflow. This is a **non-interactive, fully automat
3. Run `git diff <base>...HEAD --stat` and `git log <base>..HEAD --oneline` to understand what's being shipped.
+4. Check review readiness:
+
+{{REVIEW_DASHBOARD}}
+
+If the verdict is NOT "CLEARED TO SHIP (3/3)", use AskUserQuestion:
+- Show which reviews are missing or have open issues
+- RECOMMENDATION: Choose B (run missing reviews first) unless the change is trivial
+- Options: A) Ship anyway B) Abort — run missing review(s) first C) Reviews not relevant for this change
+
---
## Step 2: Merge the base branch (BEFORE tests)
M test/gen-skill-docs.test.ts => test/gen-skill-docs.test.ts +27 -0
@@ 322,3 322,30 @@ describe('description quality evals', () => {
expect(tipsSection).not.toContain('->');
});
});
+
+describe('REVIEW_DASHBOARD resolver', () => {
+ const REVIEW_SKILLS = ['plan-ceo-review', 'plan-eng-review', 'plan-design-review'];
+
+ for (const skill of REVIEW_SKILLS) {
+ test(`review dashboard appears in ${skill} generated file`, () => {
+ const content = fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8');
+ expect(content).toContain('reviews.jsonl');
+ expect(content).toContain('REVIEW READINESS DASHBOARD');
+ });
+ }
+
+ test('review dashboard appears in ship generated file', () => {
+ const content = fs.readFileSync(path.join(ROOT, 'ship', 'SKILL.md'), 'utf-8');
+ expect(content).toContain('reviews.jsonl');
+ expect(content).toContain('REVIEW READINESS DASHBOARD');
+ });
+
+ test('resolver output contains key dashboard elements', () => {
+ const content = fs.readFileSync(path.join(ROOT, 'plan-ceo-review', 'SKILL.md'), 'utf-8');
+ expect(content).toContain('VERDICT');
+ expect(content).toContain('CLEARED TO SHIP');
+ expect(content).toContain('NOT YET RUN');
+ expect(content).toContain('7 days');
+ expect(content).toContain('Design Review');
+ });
+});
M test/skill-validation.test.ts => test/skill-validation.test.ts +42 -0
@@ 665,3 665,45 @@ describe('Planted-bug fixture validation', () => {
expect(content).toContain('update_column');
});
});
+
+// --- gstack-slug helper ---
+
+describe('gstack-slug', () => {
+ const SLUG_BIN = path.join(ROOT, 'bin', 'gstack-slug');
+
+ test('binary exists and is executable', () => {
+ expect(fs.existsSync(SLUG_BIN)).toBe(true);
+ const stat = fs.statSync(SLUG_BIN);
+ expect(stat.mode & 0o111).toBeGreaterThan(0);
+ });
+
+ test('outputs SLUG and BRANCH lines in a git repo', () => {
+ const result = Bun.spawnSync([SLUG_BIN], { cwd: ROOT, stdout: 'pipe', stderr: 'pipe' });
+ expect(result.exitCode).toBe(0);
+ const output = result.stdout.toString();
+ expect(output).toContain('SLUG=');
+ expect(output).toContain('BRANCH=');
+ });
+
+ test('SLUG does not contain forward slashes', () => {
+ const result = Bun.spawnSync([SLUG_BIN], { cwd: ROOT, stdout: 'pipe', stderr: 'pipe' });
+ const slug = result.stdout.toString().match(/SLUG=(.*)/)?.[1] ?? '';
+ expect(slug).not.toContain('/');
+ expect(slug.length).toBeGreaterThan(0);
+ });
+
+ test('BRANCH does not contain forward slashes', () => {
+ const result = Bun.spawnSync([SLUG_BIN], { cwd: ROOT, stdout: 'pipe', stderr: 'pipe' });
+ const branch = result.stdout.toString().match(/BRANCH=(.*)/)?.[1] ?? '';
+ expect(branch).not.toContain('/');
+ expect(branch.length).toBeGreaterThan(0);
+ });
+
+ test('output is eval-compatible (KEY=VALUE format)', () => {
+ const result = Bun.spawnSync([SLUG_BIN], { cwd: ROOT, stdout: 'pipe', stderr: 'pipe' });
+ const lines = result.stdout.toString().trim().split('\n');
+ expect(lines.length).toBe(2);
+ expect(lines[0]).toMatch(/^SLUG=.+/);
+ expect(lines[1]).toMatch(/^BRANCH=.+/);
+ });
+});