Định tuyến thông minh tới chiến lược fix đúng

Bắt Đầu Nhanh

/fix TypeScript compilation errors in campaign module

Điều gì sẽ xảy ra:

  1. Phân tích loại vấn đề (type errors detected)
  2. Định tuyến tới /fix
  3. Agent chuyên dụng sửa vấn đề
  4. Xác minh với type checker

Cú Pháp

/fix [issues]

Decision Tree

Lệnh /fix định tuyến thông minh tới các biến thể chuyên dụng:

Loại Vấn ĐềTừ KhóaĐịnh Tuyến TớiAgent
Type Errorstype, typescript, tsc/fixtype-fixer
UI/UXui, ux, design, layout, style/fixui-ux-designer
CI/CDgithub actions, pipeline, workflow/fixdevops-specialist
Teststest, spec, jest, vitest/fixtester
Logslogs, error logs, stack trace/fixdebugger
Multiple2+ unrelated issues/fix --parallelmultiple agents
Complexarchitecture, refactor, system-wide/fixarchitect
Simplesingle file, small bug/fix --quickgeneralist

Ví Dụ

Ví Dụ 1: Type Errors

Đầu vào:

/fix TypeScript compilation errors

Định Tuyến Tới: /fix

Kết Quả:

✓ Analyzed: 14 type errors in 6 files
✓ Fixed: All 14 errors resolved
✓ Verified: tsc passes with 0 errors

Fixed files:
- lib/campaign/manager.ts (3 errors)
- lib/email/sender.ts (5 errors)
- components/CampaignCard.tsx (4 errors)
- types/campaign.ts (2 errors)

Total time: 47 seconds

Ví Dụ 2: UI Issues

Đầu vào:

/fix Button not responsive on mobile devices

Định Tuyến Tới: /fix

Kết Quả:

✓ ui-ux-designer: Issue analyzed
✓ Fixed: Mobile responsiveness added
✓ Verified: Tested on viewport 375px-768px

Changes:
- Added responsive classes to Button component
- Fixed padding on mobile (<640px)
- Adjusted font size for small screens
- Tested touch targets (min 44x44px)

Files modified: components/Button.tsx

Ví Dụ 3: CI/CD Failures

Đầu vào:

/fix GitHub Actions deployment pipeline failing

Định Tuyến Tới: /fix

Kết Quả:

✓ Pipeline analyzed: Build stage failing
✓ Root cause: Node version mismatch
✓ Fixed: Updated workflow to Node 20
✓ Verified: Build passes

Changes:
- Updated .github/workflows/deploy.yml (Node 18 → 20)
- Removed deprecated npm commands
- Added caching for node_modules

Re-run pipeline: Build now passes ✓

Ví Dụ 4: Multiple Issues

Đầu vào:

/fix Type errors in auth module + UI bugs in dashboard + test failures

Định Tuyến Tới: /fix --parallel

Kết Quả:

✓ Spawned 3 agents in parallel:
   - Agent 1: Type errors (fix:types)
   - Agent 2: UI bugs (fix:ui)
   - Agent 3: Test failures (fix:test)

Results (parallel execution, 2min 15sec):
✓ Agent 1: 8 type errors fixed
✓ Agent 2: 3 UI bugs resolved
✓ Agent 3: 5 tests now passing

Total time: 2m 15s (vs 6m 45s sequential)
Time saved: 67%

Biến Thể

/fix —quick

Quick fixes for simple issues:

/fix --quick Missing semicolon in utils.ts

/fix (complex)

Deep architectural fixes:

/fix Refactor campaign architecture for scalability

/fix —parallel

Multiple unrelated issues:

/fix --parallel Fix types + UI bugs + test failures

/fix (auto-detects types)

TypeScript type errors only:

/fix TypeScript compilation errors

/fix (auto-detects UI)

UI/UX issues:

/fix Button not responsive on mobile

/fix (auto-detects CI)

CI/CD pipeline failures:

/fix GitHub Actions deployment pipeline failing

/fix (auto-detects tests)

Test failures:

/fix Test failures in authentication module

/fix (auto-detects logs)

Analyze error logs:

/fix API returning 500 errors according to logs

Tích Hợp Quy Trình Làm Việc

# After /cook if issues arise
/cook plans/feature.md
# Tests fail or types error
/fix TypeScript errors + failing tests

# After /analyze identifies issues
/analyze campaigns
/fix Campaign analytics not tracking conversions

# Quick iteration
/cook add feature
# Minor issues
/fix --quick Issues from last commit

Lệnh Liên Quan

  • /cook - Implementation (includes testing)
  • /test - Run tests only
  • /review - Code quality check
  • /debug - Deep root cause analysis

Fix smart. Not hard. Định tuyến thông minh tới chiến lược giải pháp đúng.