verify-between-waves
Checkpoint-between-waves cadence for multi-file refactors. After each logical batch (wave) of edits, run typecheck + tests; commit only on green; roll back the wave (not the whole branch) on red. Use for any refactor touching more than three files or three distinct concerns.
What this skill does
# Verify Between Waves
A named cadence for multi-file refactors. This codifies what happens in practice on successful
large refactors — and what's missing on the ones that go sideways.
## Why this exists
Refactors fail when edits compound before any get verified. Classic failure mode: wave 1 edits
look fine; wave 2 breaks something subtle in wave 1; by wave 4 the tsc errors are so tangled the
repro takes longer than redoing the work.
## Session evidence
Applied to the `scrapin-aint-easy` Tier-A refactor pass (one real session, n=1):
- **7 waves**, 24 upgrades, 9 commits
- **tsc + tests after every wave** before committing
- **Regressions caught inside the wave they were introduced**:
- `this._initialized` rename broke two write sites (caught by tsc immediately after rename wave)
- `now` unused after the dead-comparator removal wave (caught on the same tsc pass)
- **9 of 9 commits landed green** — no mid-branch rollback ever needed
- **Every wave's gate**: `npx tsc --noEmit && pnpm test` — no exceptions
## When to use this
Any edit set that:
- Touches >3 files, **or**
- Touches >3 distinct concerns (security, perf, DX, cleanup, …), **or**
- Runs longer than 20 minutes of human time, **or**
- Mixes mechanical cleanup with new-code additions
Skip for single-file fixes, one-line edits, and documentation-only commits.
## The cadence
```
Wave = a logically coherent group of edits that can be reasoned about as one change.
Per wave:
1. Read the target files (batched, parallel Reads).
2. Make the edits (batched, parallel Edits). Keep edits narrow and related.
3. Gate: run typecheck (`tsc --noEmit`) and tests (`pnpm test` or equivalent).
4. If RED:
a. Do NOT add more edits.
b. Fix the regression inside the current wave.
c. Re-run the gate until GREEN.
d. If the fix grows the wave beyond "one coherent change", split into two waves
with a commit boundary between them.
5. If GREEN:
a. Commit with a scoped message naming the wave.
b. Move to the next wave.
After N waves: push.
```
## Wave-sizing heuristics
| Signal | Wave size |
|---|---|
| Mechanical replace_all (e.g., `errMsg` helper replacing 11 ternaries) | One wave by itself |
| Related fixes in one file | One wave |
| Same pattern applied across 2-3 files | One wave |
| Cross-cutting change (interface extraction, rename of a widely-used symbol) | One wave, then verify, then cleanup wave |
| New feature + tests | One wave for feature, one for tests |
Anti-pattern: stuffing "security fixes + cleanup + new tests + doc update" into one wave.
## The gate: what counts as "green"
Minimum:
- Typecheck: no errors
- Tests: all pre-existing tests pass; new tests added in the wave also pass
Better (if available):
- Lint: clean
- Coverage: above the configured threshold
- Smoke: a handful of explicit manual checks where unit tests can't reach (e.g., MCP stdio transport round-trip)
## Example: commit messages
```
wave 1 — security hardening
wave 2 — tools.ts cleanup + schema visibility
wave 3 — pino redact + telemetry race + HNSW init
wave 4 — Puppeteer page pool
wave 5 — safePaginate helper, vector dirty flag
```
Each message states the wave's coherent theme; body documents what changed and what was left out.
## Interaction with other patterns
- **Refactor Pipeline** (`cc-orchestrate.md` Template 5): verify-between-waves is the "Verifier"
role formalized as a repeating cadence instead of a single final step.
- **Checkpointing** (`skills/checkpointing/SKILL.md`): checkpointing saves orchestrator state
periodically; verify-between-waves saves code state (commits) periodically. Complementary.
- **Context Budget** (`skills/context-budgeting/SKILL.md`): waves are natural `/compact`
boundaries — after each green commit, the surrounding context is a good candidate to summarize.
## Rollback recipe (if a wave went bad)
```
git reset --mixed HEAD~1 # undo the wave commit but keep files
git checkout -- <files> # drop the bad edits
# or: git stash # keep them for inspection
```
Then either redo the wave in smaller steps, or abandon that particular change and move on.
## Red flags that you're NOT running this cadence
- You haven't run tsc in 10+ edits.
- You're hoping the tests pass "at the end".
- You have >5 uncommitted files changed.
- You're about to commit 200+ line diff without having run typecheck since the first edit.
Any of these → stop editing, run the gate, commit what's green, re-plan the rest as new waves.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.