Skip to main content

Self-Improvement Workflow

The self-improvement workflow is the core feature of the recapt MCP server. It creates a closed loop from detecting UX issues to verifying that your fixes actually worked, and it can run completely autonomously.

Fully Automated Self-Improvement

With the self-improvement skill installed, your AI assistant can run the entire workflow from start to finish without manual intervention. The AI will:

  1. Detect all UX issues across your site
  2. Diagnose root causes using session data
  3. Triage issues (skipping false positives and intended behaviors)
  4. Write the fixes directly in your codebase
  5. Track the deployment and capture baseline metrics
  6. Evaluate whether the fixes improved user experience
  7. Learn from successful patterns for future issues

Getting Started

Install the self-improvement skill:

npx @recapt/cli skill install self-improvement

Then just ask:

Improve my site

The AI takes it from there, finding issues, writing code fixes, and tracking results. You can review and approve changes, or let it run autonomously.

Example: Fully Automated Session

You: Improve my site

AI: Running full diagnostic...

Found 3 issues:
1. [CRITICAL] Rage clicks on checkout button - JS error prevents submission
2. [HIGH] Dead clicks on pricing toggle - element not interactive
3. [MEDIUM] Form abandonment on contact page - confusing field labels

Investigating and fixing all issues...

--- Issue 1: Checkout button rage clicks ---
Root cause: Button is clickable before form loads, causing null reference error.

[Writes fix to src/components/CheckoutForm.tsx]
- Added isLoading state
- Disabled button until form ready
- Added null check before submit

--- Issue 2: Pricing toggle dead clicks ---
Root cause: Toggle styled as interactive but missing click handler.

[Writes fix to src/components/PricingToggle.tsx]
- Added onClick handler
- Added cursor: pointer style
- Connected to pricing state

--- Issue 3: Contact form abandonment ---
Root cause: Field labels don't indicate required fields, users abandon mid-form.

[Writes fix to src/components/ContactForm.tsx]
- Added required indicators to labels
- Added inline validation messages
- Improved error states

All 3 issues fixed. Let me know when you deploy and I'll track the results.

You: Deployed

AI: Tracking all 3 fixes. Check back in 24-48 hours for evaluation.

You: [Next day] How did the fixes do?

AI: Evaluation results:

1. Checkout button rage clicks
- Frustration: 0.72 → 0.28 (↓61%)
- Occurrences: 47 → 4 (↓91%)
- Status: RESOLVED

2. Pricing toggle dead clicks
- Frustration: 0.58 → 0.15 (↓74%)
- Occurrences: 23 → 1 (↓96%)
- Status: RESOLVED

3. Contact form abandonment
- Frustration: 0.41 → 0.22 (↓46%)
- Completion rate: 34% → 67% (↑97%)
- Status: RESOLVED

All fixes successful. Patterns stored for future reference.
No human coding required

When connected to an AI coding assistant, the self-improvement workflow can write fixes directly to your codebase. You can review changes before committing, or let the AI handle everything autonomously.

What Gets Detected

Self-improvement isn't just for code bugs. It detects all types of UX issues:

Issue TypeWhat it meansExample fix
Rage clicksUsers clicking repeatedly in frustrationAdd loading states, fix unresponsive elements
Dead clicksClicks on non-interactive elementsAdd click handlers, improve visual affordances
Form frictionAbandoned or error-prone formsImprove labels, add validation, simplify fields
Confusing flowsUsers getting lost or backtrackingImprove navigation, add breadcrumbs, clarify CTAs
Console errorsJavaScript errors affecting usersFix bugs, add error boundaries
Drop-offsUsers leaving at specific pointsImprove page content, reduce friction
Behavioral anomaliesUnusual patterns indicating problemsInvestigate and address root cause

Manual Control (Optional)

If you prefer more control, you can run each phase yourself instead of using the automated skill.

Phase 1: Detect

What UX issues do we have?

Returns a prioritized list of issues with severity, affected page, occurrence count, and frustration score.

Phase 2: Diagnose

Investigate the checkout button issue

Returns root cause analysis with affected sessions, element friction, console errors, and suggested fixes.

Phase 3: Triage

Not every issue needs fixing. Some are false positives or intended behavior. The AI automatically triages issues using site knowledge, but you can also manually dismiss or mark issues:

Dismiss this as a false positive - users intentionally click the copy button multiple times
Mark this as intended behavior - the button is disabled until required fields are filled
Automatic triage

In the automated workflow, the AI checks site knowledge and skips known false positives and intended behaviors without prompting you. It only asks for input on ambiguous cases.

Phase 4: Fix

After implementing your fix:

I fixed the checkout button issue by adding a loading state

The AI logs the remediation and captures baseline metrics.

Phase 5: Track

After deploying:

I deployed the fix

Starts the measurement period.

Phase 6: Evaluate

After 24-48 hours:

Did the fix work?

Compares post-deployment metrics to baseline and reports success/failure.

Evaluation Outcomes

OutcomeWhat it meansNext steps
SuccessMetrics improved significantlyIssue resolved, pattern stored
PartialSome improvement, but not enoughConsider additional fixes
FailedNo improvement or got worseInvestigate further, try different approach
Insufficient dataNot enough sessions yetWait longer, check back later

Building Site Knowledge

As the AI works through issues, it builds knowledge about your site:

  • False positives: Patterns that look like issues but aren't
  • Intended behaviors: Behaviors that are by design
  • Fix patterns: What worked for similar issues
  • Context: Important information about your site's architecture

This knowledge makes future self-improvement smarter. The AI won't flag the same false positives and will suggest fixes based on what worked before.

Tips

  • Let it run: The automated workflow handles most cases without intervention
  • Review before committing: Check the AI's code changes if you want oversight
  • Wait for data: Evaluating too early may give unreliable results
  • One fix at a time: Makes it easier to attribute improvements (the AI handles this automatically)
  • Trust the data: If metrics don't improve, the fix may not have addressed the root cause