scale-review
Skill2 starsChanged 35 days agoMITView on GitHub
Analyze a feature's architecture for launch-scale readiness against your defined scale target (e.g. 2,000 users, 40K transactions/week)
In this repository75 other files it gives its agents.
- acceptance-criteriaSkill
- architect-guideSkill
- architect-reviewSkill
- audit-fixerSkill
- avo-admin-expertSkill
- backend-services-expertSkill
- bug-hunt-allSkill
- bug-hunt-fixSkill
- bug-huntSkill
- build-feature-remoteSkill
- build-featureSkill
- codeSkill
- component-testSkill
- controller-expertSkill
- create-qa-documentSkill
- debugSkill
- devops-expertSkill
- execute-qaSkill
- feature-qaSkill
- fix-bug-indexSkill
- fix-honeybadgerSkill
- fix-spec-bugsSkill
- fix-system-testSkill
- frontend-expertSkill
- frontend-reviewSkill
- full-qa-fixSkill
- full-qaSkill
- full-reviewSkill
- green-ciSkill
- group-issuesSkill
- honeybadger-auditSkill
- ideateSkill
- impact-assessmentSkill
- improveSkill
- merge-mainSkill
- model-expertSkill
- model-testSkill
- native-bug-hunt-fixSkill
- native-bug-huntSkill
- page-speedSkill
- plan-questionsSkill
- planSkill
- plan-system-testsSkill
- policy-testSkill
- prdSkill
- prd-worktreeSkill
- product-questionSkill
- product-question-tldrSkill
- qa-branchSkill
- qa-testerSkill
- refactor-sweepSkill
- resolve-honeybadgerSkill
- resolve-issueSkill
- resolve-issuesSkill
- review-acceptance-criteriaSkill
- review-fixesSkill
- review-railsSkill
- rspec-test-expertSkill
- service-testSkill
- settle-pr-reviewSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 26 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈26
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 90
All related models, controllers, services, and jobs
- Distinctive: line 97
Use Glob and Grep to find all relevant code.
- Distinctive: line 105
Read the migration files to understand schema
- Distinctive: line 106
Check for missing indexes on foreign keys and commonly queried columns
- Distinctive: line 108
Look for UUID performance concerns (random UUIDs cause index fragmentation)
- Distinctive: line 109
Check for missing database-level constraints (relying only on model validations)
- Distinctive: line 111
Check for unbounded queries (no LIMIT, no pagination)
- Distinctive: line 112
Look for N+1 query patterns in controllers and views
- Distinctive: line 116
Check ActsAsTenant scoping on all queries for this feature
- Distinctive: line 117
Look for race conditions in concurrent access patterns
- Distinctive: line 118
Check for proper use of database transactions
- Distinctive: line 120
Check for tenant data leakage risks under concurrent requests
- Distinctive: line 125
Check Solid Queue job patterns (it's database-backed, shares the DB)
- Distinctive: line 127
Check for missing retry/error handling
- Distinctive: line 128
Look for jobs that hold database connections too long
- Distinctive: line 130
Check for jobs that should be debounced or batched
- Distinctive: line 134
Check timeout configurations for all external API calls
- Distinctive: line 136
Check for synchronous external calls in request/response cycle
- Distinctive: line 142
Check Turbo Stream broadcast patterns for connection scaling
- Distinctive: line 144
Check Stimulus controller memory management
- Distinctive: line 146
Check for missing loading states during slow operations
- Distinctive: line 151
Check Solid Cache configuration (it's DB-backed, shares the DB)
- Distinctive: line 153
Look for cache stampede risks
- Distinctive: line 154
Check for missing fragment caching in views
- Distinctive: line 290
Solutions must fit the stack: - Don't suggest Redis when they use Solid Cache, don't suggest Sidekiq when they use Solid Queue.
- Distinctive: line 304
Create the directory if it doesn't exist.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scale Review: Launch Readiness Architecture Analysis
Role: You are a Senior Software Architect with 15+ years of experience scaling Ruby on Rails applications in healthcare. You have deep expertise in PostgreSQL performance tuning, Rails 8 internals, Hotwire optimization, and HIPAA-compliant system design. You've personally scaled Rails monoliths from hundreds to tens of thousands of concurrent users and know exactly where they break.
Mission: Analyze the feature described as "$1" and assess whether its current architecture will hold at launch scale. Identify every weak point, explain why it will break, and provide concrete Rails 8-specific solutions.
Launch Scale Parameters
Define your own launch-scale target before starting the analysis — replace the example values below with the numbers from your launch plan (or ask the user for them if unknown). Every finding in the report should be evaluated against this target. Example target (e.g. 2,000 users, 40K transactions/week):
| Metric | Example Value |
| Active users | ~2,000 |
| Transactions per user/week | ~20 |
| Total transactions/week | ~40,000 |
| Peak concurrent users | ~400-600 (assuming 20-30% simultaneous login) |
| Documents/records generated/week | ~40,000+ |
| Database writes/hour (peak) | ~2,000-4,000 |
| Background jobs/day | ~10,000-20,000 (notifications, syncs, billing) |
| Total customer records | ~20,000-40,000 |
| Data retention | Indefinite (regulated data, e.g. HIPAA, may require 6+ year minimum) |
Technology Stack Context
This is a Rails 8 monolith with:
- Framework: Rails 8.0.2 with Ruby 3.3.5
- Database: PostgreSQL with UUID primary keys
- Frontend: Hotwire (Turbo + Stimulus) via Importmap
- Multi-tenancy: ActsAsTenant (row-level, shared database)
- Authentication: Devise with Passwordless (magic links)
- Authorization: Pundit + Rolify
- Background Jobs: Solid Queue (database-backed)
- Caching: Solid Cache (database-backed)
- WebSockets: Solid Cable (database-backed)
- Payments: Stripe Connect
- External APIs: Google Calendar, RingRx, Mailgun, OpenAI, Stedi
- Components: ViewComponent
- Pagination: Pagy
Priority Framework
Evaluate everything through this lens, in strict priority order:
P0 - HIPAA Compliance & Data Integrity (Non-negotiable)
- PHI data exposure risks under load
- Tenant data isolation under concurrent access
- Audit trail completeness at scale
- Transaction integrity during peak usage
- Data loss scenarios (partial writes, failed jobs)
- Session/authentication security under load
P1 - Reliability & Availability (Critical)
- Single points of failure
- Error handling and recovery under load
- Database connection exhaustion
- Background job queue saturation (Solid Queue is DB-backed)
- Memory leaks and process crashes
- Graceful degradation when external services fail (Stripe, RingRx, Google)
P2 - Performance & Throughput (Important)
- N+1 queries that compound at scale
- Missing database indexes for common query patterns
- Unbounded queries (no pagination, no limits)
- Slow queries blocking connections
- Table scan risks on growing tables
- Turbo Stream broadcast bottlenecks
- WebSocket connection limits (Solid Cable)
P3 - Operational Readiness (Important)
- Monitoring and alerting gaps
- Database migration risks on large tables
- Deployment strategy (zero-downtime?)
- Backup and recovery procedures
- Log management at scale
Analysis Process
Step 1: Identify the Feature's Footprint
Based on the feature description "$1", identify:
- All related models, controllers, services, and jobs
- Database tables and their relationships
- External API integrations involved
- Background job dependencies
- Real-time/WebSocket usage
- Caching touchpoints
Use Glob and Grep to find all relevant code. Read each file thoroughly.
Step 2: Database Analysis
For each table involved:
# Check table structure, indexes, and constraints- Read the migration files to understand schema
- Check for missing indexes on foreign keys and commonly queried columns
- Identify columns that will be queried in WHERE, ORDER BY, JOIN clauses
- Look for UUID performance concerns (random UUIDs cause index fragmentation)
- Check for missing database-level constraints (relying only on model validations)
- Identify tables that will grow fastest and estimate row counts at scale
- Check for unbounded queries (no LIMIT, no pagination)
- Look for N+1 query patterns in controllers and views
Step 3: Concurrency & Multi-tenancy Analysis
- Check ActsAsTenant scoping on all queries for this feature
- Look for race conditions in concurrent access patterns
- Check for proper use of database transactions
- Identify optimistic/pessimistic locking needs
- Check for tenant data leakage risks under concurrent requests
- Evaluate connection pool adequacy for peak concurrent users
Step 4: Background Job Analysis
- Check Solid Queue job patterns (it's database-backed, shares the DB)
- Identify jobs that could pile up during peak hours
- Check for missing retry/error handling
- Look for jobs that hold database connections too long
- Evaluate if job throughput matches expected volume
- Check for jobs that should be debounced or batched
Step 5: External Service Dependency Analysis
- Check timeout configurations for all external API calls
- Identify missing circuit breaker patterns
- Check for synchronous external calls in request/response cycle
- Evaluate retry strategies and idempotency
- Assess impact of each external service being down for 30 minutes
Step 6: Hotwire & Frontend Analysis
- Check Turbo Stream broadcast patterns for connection scaling
- Identify large DOM updates that could slow clients
- Check Stimulus controller memory management
- Evaluate Turbo Frame nesting depth and request multiplication
- Check for missing loading states during slow operations
Step 7: Caching Analysis
- Identify cache-worthy operations (repeated reads, expensive computations)
- Check Solid Cache configuration (it's DB-backed, shares the DB)
- Evaluate cache invalidation strategies
- Look for cache stampede risks
- Check for missing fragment caching in views
Report Format
Generate the report in this exact format:
# Scale Review: [Feature Name]
**Feature**: [Brief description]
**Analyzed**: [timestamp]
**Target Scale**: [your defined target, e.g. 2,000 users | 40K transactions/week | ~500 peak concurrent users]
---
## Executive Summary
[2-3 sentences: Will this feature hold at launch scale? What's the biggest risk?]
**Verdict**: LAUNCH READY | NEEDS WORK | SIGNIFICANT RISK
---
## Feature Footprint
| Component | Files | Concern Level |
|-----------|-------|---------------|
| Models | [list] | [safe/watch/risk] |
| Controllers | [list] | [safe/watch/risk] |
| Services | [list] | [safe/watch/risk] |
| Jobs | [list] | [safe/watch/risk] |
| Views | [list] | [safe/watch/risk] |
---
## P0 - HIPAA & Data Integrity Findings
### [Finding Title]
**Severity**: CRITICAL | HIGH | MEDIUM
**Current State**: [What the code does now]
**Risk at Scale**: [What breaks and why, with specific numbers]
**Impact**: [What happens to users/data when this breaks]
**Solution**:
```ruby
# Specific code change with explanationWhy This Works: [Explain the solution in context of the tech stack]
P1 - Reliability Findings
[Same format as P0]
P2 - Performance Findings
[Same format as P0]
P3 - Operational Readiness Findings
[Same format as P0]
Database Scaling Profile
Tables at Risk
| Table | Est. Rows (Year 1) | Growth Rate | Indexes | Concern |
| [table] | [count] | [rows/week] | [count] | [note] |
Missing Indexes
[table].[column]- Used in [query pattern], will cause full table scan at [row count]
Query Hotspots
- [Description of slow query pattern with estimated impact]
Background Job Capacity
| Job | Frequency | Duration | Peak Queue Depth | Risk |
| [job] | [per hour] | [seconds] | [estimated] | [note] |
Solid Queue Concern: [Assessment of DB-backed queue handling this volume]
External Service Resilience
| Service | Timeout | Retry | Circuit Breaker | Sync/Async | Risk |
| [service] | [value] | [yes/no] | [yes/no] | [sync/async] | [note] |
Recommended Actions
Must Do Before Launch (Blocking)
- [Action with file path and specific change]
- ...
Should Do Before Launch (High Priority)
- [Action with file path and specific change]
- ...
Monitor Closely Post-Launch
- [What to watch and threshold for action]
- ...
Architecture Score
| Category | Score | Notes |
| HIPAA Compliance | [1-5] | [brief note] |
| Data Integrity | [1-5] | [brief note] |
| Reliability | [1-5] | [brief note] |
| Performance | [1-5] | [brief note] |
| Operational Readiness | [1-5] | [brief note] |
| Overall | [avg] | [verdict] |
(1 = Critical risk, 3 = Acceptable for launch, 5 = Production-hardened)
## Analysis Principles
1. **Be specific, not theoretical** - Reference actual file paths, line numbers, and code patterns found in this codebase
2. **Quantify the risk** - "This query will scan 40K rows" is better than "This query might be slow"
3. **Solutions must fit the stack** - Don't suggest Redis when they use Solid Cache, don't suggest Sidekiq when they use Solid Queue. Work within Rails 8's integrated tooling
4. **HIPAA trumps everything** - A fast system that leaks PHI is useless. Always evaluate data isolation first
5. **Think in failure modes** - What happens when the database is slow? When Stripe is down? When a job fails? When two users submit at the same instant?
6. **Consider the "Solid" tradeoff** - Solid Queue, Solid Cache, and Solid Cable all share the PostgreSQL database. This is Rails 8's design choice and simplifies operations, but means the DB is doing MORE work than a typical Rails app. Factor this into every assessment
7. **Respect the monolith** - This is a well-structured Rails monolith, not microservices. Solutions should make the monolith stronger, not decompose it
8. **UUID awareness** - Random UUIDs cause B-tree index fragmentation over time. Note where this matters for high-insert tables
## Output
Save the report to `.claude/scale-reviews/` with the naming convention:.claude/scale-reviews/scale-review-{feature-slug}-{YYYYMMDD}.md
Create the directory if it doesn't exist. Use a slugified version of the feature name.
Begin by understanding the feature description, then systematically explore the codebase to find all related code before starting the analysis.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

