From super-ralph
Domain detection and routing for repair work — maps fix type to skills, review agents, test suites, and fix patterns across frontend, backend, devops, cloud infra, and security domains
How this skill is triggered — by the user, by Claude, or both
Slash command
/super-ralph:repair-domainsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect the domain of a repair task and route to the correct skills, review agents, test commands, and fix patterns. A repair can span multiple domains — always identify primary and secondary.
Detect the domain of a repair task and route to the correct skills, review agents, test commands, and fix patterns. A repair can span multiple domains — always identify primary and secondary.
Run detection in this order. The first match sets the primary domain; subsequent matches become secondary domains.
If the repair originates from a GitHub issue (#N), read labels:
| Label | Domain |
|---|---|
area/frontend | frontend |
area/backend | backend |
area/fullstack | frontend + backend |
security | security |
devops, ci, infra | devops |
priority/critical, priority/urgent | (flag for --hotfix auto-detection, not a domain) |
Search the codebase for files related to the problem statement. Classify by path:
| Path pattern | Domain |
|---|---|
work-web/src/components/**, work-web/src/app/** | frontend |
work-web/src/styles/**, *.css, *.scss, tailwind.* | frontend |
work-web/src/hooks/**, work-web/src/contexts/** | frontend |
work-agents/src/routes/**, work-agents/src/services/** | backend |
work-agents/src/db/**, **/schema.ts, **/migrations/** | backend |
work-agents/src/middleware/** | backend (or security if auth-related) |
.github/workflows/**, Dockerfile*, docker-compose* | devops |
vercel.json, vercel.ts, next.config.* | devops |
**/terraform/**, **/pulumi/**, **/cdk/** | cloud-infra |
**/auth/**, **/session/**, **/cors.*, **/csp.* | security |
work-web/src/lib/api-client.* | frontend (API client layer) |
work-agents/src/index.ts | backend (route registration) |
If file paths are ambiguous, read the problem statement and relevant files for domain signals:
| Content signal | Domain |
|---|---|
CSS classes, Tailwind utilities, JSX/TSX markup, className | frontend |
useState, useEffect, useRouter, component props | frontend |
SQL queries, Drizzle ORM, db.select(), db.insert() | backend |
API route handlers, Hono, c.json(), c.req.param() | backend |
CORS, helmet, csrf, XSS, sanitize, escape | security |
JWT, session tokens, bcrypt, argon2, crypto | security |
| CI pipeline, GitHub Actions YAML, deploy scripts | devops |
| Cloud provider SDKs, IAM, S3, CloudFront | cloud-infra |
If no signals detected: backend (most common repair domain in this codebase).
After detection, use this table to configure the repair:
| Domain | Skills to load | Review agents | Test command | Fix patterns |
|---|---|---|---|---|
| frontend | frontend-design:frontend-design | code-reviewer, type-design-analyzer, code-simplifier | cd work-web && bun test | See domain-patterns.md |
| backend | (none extra) | code-reviewer, silent-failure-hunter, pr-test-analyzer | cd work-agents && bun test | See domain-patterns.md |
| security | (none extra) | code-reviewer, silent-failure-hunter, pr-test-analyzer | Both test suites + security-specific tests | See domain-patterns.md |
| devops | vercel:vercel-functions (if Vercel) | code-reviewer | Validate configs + CI lint | See domain-patterns.md |
| cloud-infra | (none extra) | code-reviewer | terraform validate / pulumi preview | See domain-patterns.md |
| fullstack | frontend-design:frontend-design | ALL review agents | Both test suites | Combine frontend + backend patterns |
When dispatching review agents during the review-fix phase, select based on domain:
- code-reviewer: focus on component logic, prop handling, state management
- type-design-analyzer: only if new types or interfaces are added/modified
- code-simplifier: always — frontend code benefits most from simplification
- code-reviewer: focus on API correctness, data integrity, query efficiency
- silent-failure-hunter: ALWAYS — backend error handling is critical
- pr-test-analyzer: ALWAYS — backend needs high test coverage
- code-reviewer: focus on auth/authz logic, input validation, output encoding
- silent-failure-hunter: CRITICAL — silenced auth errors are vulnerabilities
- pr-test-analyzer: verify auth edge cases are tested (expired tokens, missing roles, injection)
- code-reviewer: focus on config correctness, no hardcoded secrets, proper env var usage
- code-reviewer: focus on resource sizing, IAM least-privilege, network rules
A repair should automatically suggest --hotfix mode when:
priority/critical or priority/urgentsecurity with severity indicatorsmain branch but NOT on staging (rare but possible after a direct main fix)--url points to a production domain (app.forthai.work, forthai.work, work.forth.ai)When auto-detected, report: "Auto-detected hotfix: [reason]. Branching from main."
The repair command should:
"Domain: frontend (primary), security (secondary)"npx claudepluginhub junhua/claude-plugins --plugin super-ralphGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.