Skip to content

Commit 2c0d4b3

Browse files
garrytanclaude
andauthored
docs: v0.9.8.0 — deploy pipeline docs + pre-merge readiness gate (garrytan#306)
* docs: v0.9.8.0 — deploy pipeline + E2E performance + pre-merge gate CHANGELOG: added v0.9.8.0 entry covering /land-and-deploy, /canary, /benchmark, /setup-deploy, /review perf pass, E2E model pinning, and 3 test fixes. README: added 4 new skills to tables and install instructions, updated specialist/tool counts (18+7), added deploy pipeline to "What's new" section. /land-and-deploy: added Step 3.5 pre-merge readiness gate that checks review dashboard, E2E results, free tests, and doc-release status before merging. Uses AskUserQuestion for explicit confirmation. VERSION: 0.9.7.0 → 0.9.8.0 TODOS: updated deploy pipeline to Completed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * feat: comprehensive pre-merge readiness gate in /land-and-deploy Step 3.5 now checks 5 dimensions before allowing merge: 1. Review staleness — compares review commit hash against HEAD, flags if significant code changes happened after last review 2. Tests — runs free tests inline, checks today's E2E and LLM eval results from ~/.gstack-dev/evals/ 3. PR body accuracy — compares PR description against actual commits, flags missing features or stale descriptions 4. Document-release — checks if CHANGELOG/VERSION were updated when new features are present in the diff 5. Full readiness report — ASCII dashboard with warnings/blockers, explicit AskUserQuestion confirmation required before merge Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 00bc482 commit 2c0d4b3

8 files changed

Lines changed: 577 additions & 24 deletions

File tree

‎.agents/skills/gstack-land-and-deploy/SKILL.md‎

Lines changed: 177 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,14 @@ When the user types `/land-and-deploy`, run this skill.
286286
- `/land-and-deploy #123` — specific PR number
287287
- `/land-and-deploy #123 <url>` — specific PR + verification URL
288288

289-
## Non-interactive philosophy (like /ship)
289+
## Non-interactive philosophy (like /ship) — with one critical gate
290290

291-
This is a **non-interactive, fully automated** workflow. Do NOT ask for confirmation at any step except the ones listed below. The user said `/land-and-deploy` which means DO IT.
291+
This is a **mostly automated** workflow. Do NOT ask for confirmation at any step except
292+
the ones listed below. The user said `/land-and-deploy` which means DO IT — but verify
293+
readiness first.
292294

293-
**Only stop for:**
295+
**Always stop for:**
296+
- **Pre-merge readiness gate (Step 3.5)** — this is the ONE confirmation before merge
294297
- GitHub CLI not authenticated
295298
- No PR found for this branch
296299
- CI failures or merge conflicts
@@ -300,7 +303,6 @@ This is a **non-interactive, fully automated** workflow. Do NOT ask for confirma
300303

301304
**Never stop for:**
302305
- Choosing merge method (auto-detect from repo settings)
303-
- Confirming the merge
304306
- Timeout warnings (warn and continue gracefully)
305307

306308
---
@@ -365,6 +367,177 @@ If timeout (15 min): **STOP.** "CI has been running for 15 minutes. Investigate
365367

366368
---
367369

370+
## Step 3.5: Pre-merge readiness gate
371+
372+
**This is the critical safety check before an irreversible merge.** The merge cannot
373+
be undone without a revert commit. Gather ALL evidence, build a readiness report,
374+
and get explicit user confirmation before proceeding.
375+
376+
Collect evidence for each check below. Track warnings (yellow) and blockers (red).
377+
378+
### 3.5a: Review staleness check
379+
380+
```bash
381+
~/.codex/skills/gstack/bin/gstack-review-read 2>/dev/null
382+
```
383+
384+
Parse the output. For each review skill (plan-eng-review, plan-ceo-review,
385+
plan-design-review, design-review-lite, codex-review):
386+
387+
1. Find the most recent entry within the last 7 days.
388+
2. Extract its `commit` field.
389+
3. Compare against current HEAD: `git rev-list --count STORED_COMMIT..HEAD`
390+
391+
**Staleness rules:**
392+
- 0 commits since review → CURRENT
393+
- 1-3 commits since review → RECENT (yellow if those commits touch code, not just docs)
394+
- 4+ commits since review → STALE (red — review may not reflect current code)
395+
- No review found → NOT RUN
396+
397+
**Critical check:** Look at what changed AFTER the last review. Run:
398+
```bash
399+
git log --oneline STORED_COMMIT..HEAD
400+
```
401+
If any commits after the review contain words like "fix", "refactor", "rewrite",
402+
"overhaul", or touch more than 5 files — flag as **STALE (significant changes
403+
since review)**. The review was done on different code than what's about to merge.
404+
405+
### 3.5b: Test results
406+
407+
**Free tests — run them now:**
408+
409+
Read CLAUDE.md to find the project's test command. If not specified, use `bun test`.
410+
Run the test command and capture the exit code and output.
411+
412+
```bash
413+
bun test 2>&1 | tail -10
414+
```
415+
416+
If tests fail: **BLOCKER.** Cannot merge with failing tests.
417+
418+
**E2E tests — check recent results:**
419+
420+
```bash
421+
ls -t ~/.gstack-dev/evals/*-e2e-*-$(date +%Y-%m-%d)*.json 2>/dev/null | head -20
422+
```
423+
424+
For each eval file from today, parse pass/fail counts. Show:
425+
- Total tests, pass count, fail count
426+
- How long ago the run finished (from file timestamp)
427+
- Total cost
428+
- Names of any failing tests
429+
430+
If no E2E results from today: **WARNING — no E2E tests run today.**
431+
If E2E results exist but have failures: **WARNING — N tests failed.** List them.
432+
433+
**LLM judge evals — check recent results:**
434+
435+
```bash
436+
ls -t ~/.gstack-dev/evals/*-llm-judge-*-$(date +%Y-%m-%d)*.json 2>/dev/null | head -5
437+
```
438+
439+
If found, parse and show pass/fail. If not found, note "No LLM evals run today."
440+
441+
### 3.5c: PR body accuracy check
442+
443+
Read the current PR body:
444+
```bash
445+
gh pr view --json body -q .body
446+
```
447+
448+
Read the current diff summary:
449+
```bash
450+
git log --oneline $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)..HEAD | head -20
451+
```
452+
453+
Compare the PR body against the actual commits. Check for:
454+
1. **Missing features** — commits that add significant functionality not mentioned in the PR
455+
2. **Stale descriptions** — PR body mentions things that were later changed or reverted
456+
3. **Wrong version** — PR title or body references a version that doesn't match VERSION file
457+
458+
If the PR body looks stale or incomplete: **WARNING — PR body may not reflect current
459+
changes.** List what's missing or stale.
460+
461+
### 3.5d: Document-release check
462+
463+
Check if documentation was updated on this branch:
464+
465+
```bash
466+
git log --oneline --all-match --grep="docs:" $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)..HEAD | head -5
467+
```
468+
469+
Also check if key doc files were modified:
470+
```bash
471+
git diff --name-only $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)...HEAD -- README.md CHANGELOG.md ARCHITECTURE.md CONTRIBUTING.md CLAUDE.md VERSION
472+
```
473+
474+
If CHANGELOG.md and VERSION were NOT modified on this branch and the diff includes
475+
new features (new files, new commands, new skills): **WARNING — /document-release
476+
likely not run. CHANGELOG and VERSION not updated despite new features.**
477+
478+
If only docs changed (no code): skip this check.
479+
480+
### 3.5e: Readiness report and confirmation
481+
482+
Build the full readiness report:
483+
484+
```
485+
╔══════════════════════════════════════════════════════════╗
486+
║ PRE-MERGE READINESS REPORT ║
487+
╠══════════════════════════════════════════════════════════╣
488+
║ ║
489+
║ PR: #NNN — title ║
490+
║ Branch: feature → main ║
491+
║ ║
492+
║ REVIEWS ║
493+
║ ├─ Eng Review: CURRENT / STALE (N commits) / — ║
494+
║ ├─ CEO Review: CURRENT / — (optional) ║
495+
║ ├─ Design Review: CURRENT / — (optional) ║
496+
║ └─ Codex Review: CURRENT / — (optional) ║
497+
║ ║
498+
║ TESTS ║
499+
║ ├─ Free tests: PASS / FAIL (blocker) ║
500+
║ ├─ E2E tests: 52/52 pass (25 min ago) / NOT RUN ║
501+
║ └─ LLM evals: PASS / NOT RUN ║
502+
║ ║
503+
║ DOCUMENTATION ║
504+
║ ├─ CHANGELOG: Updated / NOT UPDATED (warning) ║
505+
║ ├─ VERSION: 0.9.8.0 / NOT BUMPED (warning) ║
506+
║ └─ Doc release: Run / NOT RUN (warning) ║
507+
║ ║
508+
║ PR BODY ║
509+
║ └─ Accuracy: Current / STALE (warning) ║
510+
║ ║
511+
║ WARNINGS: N | BLOCKERS: N ║
512+
╚══════════════════════════════════════════════════════════╝
513+
```
514+
515+
If there are BLOCKERS (failing free tests): list them and recommend B.
516+
If there are WARNINGS but no blockers: list each warning and recommend A if
517+
warnings are minor, or B if warnings are significant.
518+
If everything is green: recommend A.
519+
520+
Use AskUserQuestion:
521+
522+
- **Re-ground:** "About to merge PR #NNN (title) from branch X to Y. Here's the
523+
readiness report." Show the report above.
524+
- List each warning and blocker explicitly.
525+
- **RECOMMENDATION:** Choose A if green. Choose B if there are significant warnings.
526+
Choose C only if the user understands the risks.
527+
- A) Merge — readiness checks passed (Completeness: 10/10)
528+
- B) Don't merge yet — address the warnings first (Completeness: 10/10)
529+
- C) Merge anyway — I understand the risks (Completeness: 3/10)
530+
531+
If the user chooses B: **STOP.** List exactly what needs to be done:
532+
- If reviews are stale: "Re-run /plan-eng-review (or /review) to review current code."
533+
- If E2E not run: "Run `bun run test:e2e` to verify."
534+
- If docs not updated: "Run /document-release to update documentation."
535+
- If PR body stale: "Update the PR body to reflect current changes."
536+
537+
If the user chooses A or C: continue to Step 4.
538+
539+
---
540+
368541
## Step 4: Merge the PR
369542

370543
Record the start timestamp for timing data.

‎CHANGELOG.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Changelog
22

3+
## [0.9.8.0] - 2026-03-21 — Deploy Pipeline + E2E Performance
4+
5+
### Added
6+
7+
- **`/land-and-deploy` — merge, deploy, and verify in one command.** Takes over where `/ship` left off. Merges the PR, waits for CI and deploy workflows, then runs canary verification on your production URL. Auto-detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions). Offers revert at every failure point. One command from "PR approved" to "verified in production."
8+
- **`/canary` — post-deploy monitoring loop.** Watches your live app for console errors, performance regressions, and page failures using the browse daemon. Takes periodic screenshots, compares against pre-deploy baselines, and alerts on anomalies. Run `/canary https://myapp.com --duration 10m` after any deploy.
9+
- **`/benchmark` — performance regression detection.** Establishes baselines for page load times, Core Web Vitals, and resource sizes. Compares before/after on every PR. Tracks performance trends over time. Catches the bundle size regressions that code review misses.
10+
- **`/setup-deploy` — one-time deploy configuration.** Detects your deploy platform, production URL, health check endpoints, and deploy status commands. Writes the config to CLAUDE.md so all future `/land-and-deploy` runs are fully automatic.
11+
- **`/review` now includes Performance & Bundle Impact analysis.** The informational review pass checks for heavy dependencies, missing lazy loading, synchronous script tags, and bundle size regressions. Catches moment.js-instead-of-date-fns before it ships.
12+
13+
### Changed
14+
15+
- **E2E tests now run 3-5x faster.** Structure tests default to Sonnet (5x faster, 5x cheaper). Quality tests (planted-bug detection, design quality, strategic review) stay on Opus. Full suite dropped from 50-80 minutes to ~15-25 minutes.
16+
- **`--retry 2` on all E2E tests.** Flaky tests get a second chance without masking real failures.
17+
- **`test:e2e:fast` tier.** Excludes the 8 slowest Opus quality tests for quick feedback (~5-7 minutes). Run `bun run test:e2e:fast` for rapid iteration.
18+
- **E2E timing telemetry.** Every test now records `first_response_ms`, `max_inter_turn_ms`, and `model` used. Wall-clock timing shows whether parallelism is actually working.
19+
20+
### Fixed
21+
22+
- **`plan-design-review-plan-mode` no longer races.** Each test gets its own isolated tmpdir — no more concurrent tests polluting each other's working directory.
23+
- **`ship-local-workflow` no longer wastes 6 of 15 turns.** Ship workflow steps are inlined in the test prompt instead of having the agent read the 700+ line SKILL.md at runtime.
24+
- **`design-consultation-core` no longer fails on synonym sections.** "Colors" matches "Color", "Type System" matches "Typography" — fuzzy synonym-based matching with all 7 sections still required.
25+
326
## [0.9.7.0] - 2026-03-21 — Plan File Review Report
427

528
### Added

0 commit comments

Comments
 (0)