
Compare Generations
Compares two `tuist generate` runs to identify cache hit rate changes and root-cause...
Install
npx skills add tuist/tuist --skill compare-generations -g -a claude-code -y- Repository
- tuist/tuist5.9k
- Category
- Engineering
- Updated
- 3d ago
- License
- See repository
- Context cost
- Lightabout 1,238 tokens
- Runs scripts
- No, instructions only
What it does
Compares two `tuist generate` runs to identify cache hit rate changes and root-cause analysis of cache invalidation. Can be invoked with generation IDs, dashboard URLs, or branch names.
Compare Generations
Quick Start
You'll typically receive two generation identifiers. Follow these steps:
- Run
tuist generate list --jsonto find generations on each branch. - Run
tuist generate show <id> --jsonfor both base and head generations. - Compare duration, status, and cache hit rates.
- Summarize cache changes with root cause analysis.
Step 1: Resolve Generations
If base/head are generation IDs or dashboard URLs
Fetch each directly:
tuist generate show <base-id> --json
tuist generate show <head-id> --json
If base/head are branch names
List recent generations on each branch:
tuist generate list --git-branch <base-branch> --json --page-size 1
tuist generate list --git-branch <head-branch> --json --page-size 1
Then fetch full details with tuist generate show <id> --json.
Defaults
- If no base is provided, use the project's default branch (usually
main). - If no head is provided, detect the current git branch.
Step 2: Compare Top-Level Metrics
After fetching both generations, compare:
| Metric | What to check |
|---|---|
duration | Flag if head is >10% slower |
status | Flag if base succeeded but head failed |
cacheable_targets | Note if target count changed |
local_cache_target_hits | Compare local hit counts |
remote_cache_target_hits | Compare remote hit counts |
is_ci | Note if one is CI and the other local |
Compute cache hit rates:
- Base:
(local_hits + remote_hits) / cacheable_targets * 100 - Head: same formula
- Delta:
head_rate - base_rate
Step 3: Analyze Cache Invalidation
If cache hit rate dropped, the key question is: which target(s) caused the invalidation cascade?
