/useful-loops:gap-analysis REFERENCE_REPO_URLfrom useful-loops
This command should be used when the user asks to 'run a gap analysis', 'compare against a reference app', 'find gaps versus a reference', or 'close feature gaps'. Runs one iteration: compares this app against a reference app, fixes gaps, validates, PRs, runs CI, and merges.
Ships in useful-loops. Installing the plugin adds it to Claude Code.
You are performing one complete gap analysis iteration. Report progress at each phase.
Reference repo: $ARGUMENTS
If no reference repo URL was provided above, check docs/plans/gap-tracking.md for the reference repo URL from prior iterations. If still not found, ask the user.
Ensure you are on main with the latest code:
git checkout main && git pull origin main
Read docs/plans/gap-tracking.md to find the last iteration number. Your iteration is N+1. If no iterations exist yet, you are iteration 1. If the tracking file does not exist, create it:
# Gap Analysis Tracking
Automated tracking of gaps found between this app and the reference app.
**Reference:** <reference repo URL>
---
## Iteration Log
Create an iteration branch:
git checkout -b gap-analysis/iteration-<N>
Clone or update the reference app:
git clone <REFERENCE_REPO_URL> /tmp/reference-app 2>/dev/null || git -C /tmp/reference-app pull origin main
Review which dimensions and files were already covered in prior iterations. Focus effort on uncovered ground.
Compare these six dimensions. For each, read the relevant source files in both repos. Use explorer agents in parallel to cover more ground.
Tell explorer agents about these exclusions upfront so they don't waste time reporting them. Flag these in the tracking file as "intentionally skipped" rather than fixing:
Constraints: Follow this project's conventions (check CLAUDE.md if it exists). Do not modify database schema or migrations. Do not break existing tests — when you change content/copy, proactively update any unit tests AND E2E tests that assert on the old text.
Follow the Validate phase in references/common-lifecycle.md. Also search E2E test files for old text that was replaced and update stale assertions.
Append a new entry to docs/plans/gap-tracking.md:
### Iteration N (YYYY-MM-DD)
**Findings:** X
**Fixed:** Y
**Deferred:** Z
**Dimensions Covered:** [list which dimensions had gaps]
#### Fixed
- [x] Description (dimension: X, severity: HIGH/MEDIUM)
#### Deferred
- [ ] Description (reason)
#### Intentionally Skipped
- Description (reason)
If gaps were found and fixed: follow the Ship phase in references/common-lifecycle.md with:
gap-analysis/iteration-<N>fix: close gaps from gap analysis iteration NGap Analysis: Iteration NAutomated gap analysis. See docs/plans/gap-tracking.md for details.If NO gaps were found across all six dimensions: skip to Phase 8.
Follow the CI & Merge phase in references/common-lifecycle.md.
If gaps were found and fixed: exit normally. If running in a Ralph Loop, the loop will re-invoke for the next iteration.
If NO gaps were found across all six dimensions: output exactly:
<promise>NO_GAPS_FOUND</promise>
Only output this promise if you genuinely compared all six dimensions and found nothing actionable. If coverage was incomplete, exit normally and let the next iteration continue.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub neonwatty/useful-loops --plugin useful-loops24 commands in this plugin
/beta-auditThis command should be used when the user asks to 'run a beta audit', 'check beta readiness', 'is the app ready for beta', or 'find beta-readiness gaps'. Runs one iteration: explores the app holistically for beta-readiness gaps, fixes code issues, collects manual to-dos, validates, PRs, runs CI, and merges./beta-audit-loopThis command should be used when the user asks to 'loop beta audit', 'keep auditing for beta readiness', or 'fix all beta issues'. Loops beta audit iterations until no HIGH/MEDIUM code findings remain. Requires ralph-loop plugin./ci-auditThis command should be used when the user asks to 'optimize CI', 'audit CI pipeline', 'speed up GitHub Actions', 'reduce CI time', 'make CI faster', or 'harden CI permissions'. Runs one iteration: analyzes 1-2 CI dimensions across multiple measurement axes (timing, billable minutes, hygiene, flakiness), applies fixes, re-measures, and merges./ci-loopThis command should be used when the user asks to 'loop CI audit', 'fully optimize CI', 'audit all CI dimensions', or 'do a full CI optimization sweep'. Loops CI audit iterations until all 9 dimensions are covered and no issues remain. Requires ralph-loop plugin./doc-refineThis command should be used when the user asks to 'refine a document', 'improve this doc', 'polish documentation', or 'apply a prompt to a document'. Runs one iteration: applies a prompt-driven analysis to a document, identifies improvements, and applies them./doc-refine-loopThis command should be used when the user asks to 'loop doc refine', 'keep refining a document', or 'iteratively improve documentation'. Loops doc-refine iterations until no further improvements are found. Requires ralph-loop plugin.Other plugins' commands for the same job