Autoresearch Pattern

immigration-optimizer

An AI-powered CLI that autonomously optimizes Canadian immigration pathways. Analyzes your profile, calculates CRS scores, checks eligibility across 19+ programs, and iteratively improves your pathway to Permanent Residency.

19+
Programs
5
Score Dimensions
6
Mutation Types
50
Max Iterations

Pipeline

The optimizer follows the autoresearch pattern: it autonomously researches programs, generates pathway mutations, scores results, and keeps only improvements. Bad mutations are discarded; good ones accumulate.

Profile
Parse applicant YAML
→
Research
Web search + seed DB
→
Mutate
Generate pathway change
→
Score
5-dim + critic eval
→
Keep/Drop
Accept if improved

CRS Calculator

A built-in CRS (Comprehensive Ranking System) calculator computes your Express Entry score based on age, education, language (IELTS/CELPIP/TEF/TCF), work experience, and additional factors. It identifies the highest-ROI improvement strategies for your specific profile.

Eligibility Checker

Every program in the database is checked against your profile: language levels, education, work experience, NOC code, settlement funds, and special requirements. Programs are classified as eligible, close (within 1 CLB level), or ineligible.

Scoring Pipeline

Scoring uses a 5-dimension + reward/penalty system. An adversarial critic applies penalties for concrete flaws and rewards for strengths.

Dimension Weight Distribution Evaluates
Success probability 0.30
CRS competitiveness, eligibility match, approval rates
Timeline efficiency 0.25
Total duration, critical path, parallelization
Cost efficiency 0.15
Total cost, cost-risk ratio
Quality of life 0.15
Destination match, career continuity
Plan robustness 0.15
Backup options, policy sensitivity

Mutation Types

Each optimization iteration proposes a targeted change, then evaluates whether the change improved the overall pathway.

SWAP_PROGRAM
Replace a program with a better-fit alternative from the database
ADD_CREDENTIAL
Add language test, ECA, or certification to boost CRS score
REORDER_STEPS
Fix dependencies, move steps earlier in the timeline
ADD_PARALLEL
Run independent steps concurrently to save time
SWITCH_PROVINCE
Try a different province's Provincial Nominee Program
RESEARCH
Search for new programs via web (triggered after 5+ discards)

Seed Programs (19+)

The optimizer ships with a curated database of Canadian immigration programs including eligibility requirements, processing times, fees, success rates, and historical CRS cutoffs.

Agent Mode

The optimizer runs as a Claude Code agent that autonomously reads your profile, researches programs via web search, and runs the optimization loop — committing each mutation to git so you can review the full history.

SAFE (default)
Claude Code prompts for permission on each action. Full control and transparency.
YOLO
Skips all permission prompts for unattended operation. Use with --yolo flag.
HEADLESS
Non-interactive mode suitable for background runs and CI/CD pipelines.
STANDALONE
Direct API calls without Claude Code. Works with custom OpenAI-compatible models.

Web Search Integration

Configure a search API for real-time program verification. Supports Tavily, Serper, and Brave Search APIs.

immigration-optimizer config set search_api.provider tavily
immigration-optimizer config set search_api.api_key <key>

Quick Start

# Install globally
npm install -g immigration-optimizer

# Initialize a new pathway project
immigration-optimizer init "my-pathway"
cd my-pathway

# Run the optimizer
immigration-optimizer run # agent mode (default)
immigration-optimizer run --standalone # direct API calls
immigration-optimizer run --headless # non-interactive
immigration-optimizer run --headless --yolo --max-iterations 100

# Monitor & export
immigration-optimizer dashboard --watch
immigration-optimizer pdf

Get Started

Supports English and 中文. Bilingual from init to PDF export.

$npx immigration-optimizer