An AI-agent skill that discovers user journeys in any codebase, visualizes test coverage with interactive Mermaid diagrams, and generates framework-correct UI tests to close the gaps.
Works with: Claude Code (plugin) Β· Codex Β· Gemini CLI Β· Cursor
Installation Β· How It Works Β· Supported Frameworks Β· Commands
You have tests. But can you answer: "Which user journeys are actually covered?"
Line coverage says 78%. But can a user sign up, upload a file, and view the result end-to-end? Nobody knows. There's no map.
Pathfinder fixes this. It crawls your codebase, discovers every user journey, and produces a living coverage map β so you can see exactly where the gaps are and fill them systematically.
Pathfinder_Journey_Coverage.mp4
Pathfinder runs in four phases, each named after trail exploration:
|
Discover the terrain Deep dives into routes, screens, components, and API calls. Groups them into user journeys. Checks which steps already have tests. |
Mark the trail Generates Mermaid flowcharts with β tested and β untested markers. Produces a coverage summary table. |
Explore the gaps Generates framework-correct test skeletons for every β step. Appends to existing files or creates new ones matching your patterns. |
Reach the peak Runs all tests, reconciles results, updates the diagrams, and computes a coverage score. β β β |
flowchart LR
MAP["**/map**\nDiscover journeys"]
BLAZE["**/blaze**\nVisualize coverage"]
SCOUT["**/scout**\nWrite tests"]
SUMMIT["**/ summit**\nRun & verify"]
J[("journeys.json\n\nSource of truth")]
MAP ==> BLAZE ==> SCOUT ==> SUMMIT
SUMMIT -.->|"Repeat"| MAP
MAP --- J
BLAZE --- J
SCOUT --- J
SUMMIT --- J
style MAP fill:#1f6feb,stroke:#1158c7,color:#fff,stroke-width:2px
style BLAZE fill:#e3b341,stroke:#b8860b,color:#000,stroke-width:2px
style SCOUT fill:#2ea043,stroke:#1a7f37,color:#fff,stroke-width:2px
style SUMMIT fill:#8957e5,stroke:#6e40c9,color:#fff,stroke-width:2px
style J fill:#161b22,stroke:#30363d,color:#c9d1d9,stroke-width:2px
linkStyle 4 stroke:#1f6feb,stroke-width:1px,stroke-dasharray:4
linkStyle 5 stroke:#e3b341,stroke-width:1px,stroke-dasharray:4
linkStyle 6 stroke:#2ea043,stroke-width:1px,stroke-dasharray:4
linkStyle 7 stroke:#8957e5,stroke-width:1px,stroke-dasharray:4
The cycle repeats. New code β /map β new β steps β /scout β /summit. The diagram always reflects reality.
Every user journey becomes a visual flowchart β green = tested, red = gap:
flowchart TD
subgraph /login
AUTH_01(β
Open login page)
AUTH_02(β
Enter credentials)
AUTH_03[β See error on wrong password]
end
subgraph /dashboard
AUTH_04(β
See dashboard after login)
AUTH_05[β Logout]
end
AUTH_01 --> AUTH_02
AUTH_02 --> AUTH_03
AUTH_03 -.-> AUTH_04
AUTH_04 --> AUTH_05
style AUTH_01 fill:#2ea043,stroke:#1a7f37,color:#fff
style AUTH_02 fill:#2ea043,stroke:#1a7f37,color:#fff
style AUTH_03 fill:#f85149,stroke:#da3633,color:#fff
style AUTH_04 fill:#2ea043,stroke:#1a7f37,color:#fff
style AUTH_05 fill:#f85149,stroke:#da3633,color:#fff
| Journey | Steps | Tested | Coverage |
|--------------------|-------|--------|-------------|
| π Authentication | 5 | 3 | π‘ 60.0% |
| π€ File Upload | 8 | 0 | π΄ 0.0% |
| π Reports | 12 | 7 | π‘ 58.3% |
| π¬ Chat | 6 | 6 | π’ 100.0% |
| **Total** | **31**| **16** | **51.6%** |
| Score | Status | Meaning |
|---|---|---|
| π’ 80%+ | Excellent | Ship it |
| π‘ 50β79% | Acceptable | Document the gaps |
| π΄ <50% | Insufficient | Keep scouting |
Here's Pathfinder on a food delivery app's checkout module β 5 journeys, 28 steps, taken from 52% to 100% coverage in one session.
flowchart TD
ENTRY{{"π Cart type?"}}
STANDARD("β
Standard delivery items")
PICKUP["β Pickup order - no address needed"]
ENTRY -->|"Delivery"| STANDARD
ENTRY -->|"Pickup"| PICKUP
CHECKOUT("β
User sees order summary")
STANDARD --> CHECKOUT
PICKUP --> CHECKOUT
CHECKOUT_decision{{"π User action?"}}
CHECKOUT --> CHECKOUT_decision
PAY("β
User taps Pay Now")
CHECKOUT_decision -->|"Pay"| PAY
PAY_LOADING[/"β οΈ Payment processing"/]
PAY --> PAY_LOADING
PAY_OK("β
Order confirmed screen")
PAY_LOADING -.-> PAY_OK
PAY_OK_decision{{"π Tip enabled?"}}
PAY_OK --> PAY_OK_decision
TRACK["β Tap Track My Order"]
PAY_OK_decision -->|"Always"| TRACK
TIP["β Tap Add Tip"]
PAY_OK_decision -->|"Flag on"| TIP
EDIT("β
User taps Edit Order")
CHECKOUT_decision -->|"Edit"| EDIT
PROMO("β
User applies promo code")
EDIT --> PROMO
PROMO_OK("β
Discount applied")
PROMO --> PROMO_OK
PROMO_FAIL["β Invalid promo alert"]
PROMO -.->|"β‘ Invalid"| PROMO_FAIL
ERR_PAY["β Payment fails - card declined"]
PAY_LOADING -.->|"β‘ Error"| ERR_PAY
ERR_ALERT["β Error alert with Retry"]
ERR_PAY --> ERR_ALERT
ERR_RETRY["β User taps Retry"]
ERR_ALERT --> ERR_RETRY
style ENTRY fill:#1f6feb,stroke:#1158c7,color:#fff
style STANDARD fill:#2ea043,stroke:#1a7f37,color:#fff
style PICKUP fill:#f85149,stroke:#da3633,color:#fff
style CHECKOUT fill:#2ea043,stroke:#1a7f37,color:#fff
style CHECKOUT_decision fill:#1f6feb,stroke:#1158c7,color:#fff
style PAY fill:#2ea043,stroke:#1a7f37,color:#fff
style PAY_LOADING fill:#d29922,stroke:#b87d14,color:#fff
style PAY_OK fill:#2ea043,stroke:#1a7f37,color:#fff
style PAY_OK_decision fill:#1f6feb,stroke:#1158c7,color:#fff
style TRACK fill:#f85149,stroke:#da3633,color:#fff
style TIP fill:#f85149,stroke:#da3633,color:#fff
style EDIT fill:#2ea043,stroke:#1a7f37,color:#fff
style PROMO fill:#2ea043,stroke:#1a7f37,color:#fff
style PROMO_OK fill:#2ea043,stroke:#1a7f37,color:#fff
style PROMO_FAIL fill:#f85149,stroke:#da3633,color:#fff
style ERR_PAY fill:#f85149,stroke:#da3633,color:#fff
style ERR_ALERT fill:#f85149,stroke:#da3633,color:#fff
style ERR_RETRY fill:#f85149,stroke:#da3633,color:#fff
flowchart TD
ENTRY{{"π Cart type?"}}
STANDARD("β
Standard delivery items")
PICKUP("β
Pickup order - no address needed")
ENTRY -->|"Delivery"| STANDARD
ENTRY -->|"Pickup"| PICKUP
CHECKOUT("β
User sees order summary")
STANDARD --> CHECKOUT
PICKUP --> CHECKOUT
CHECKOUT_decision{{"π User action?"}}
CHECKOUT --> CHECKOUT_decision
PAY("β
User taps Pay Now")
CHECKOUT_decision -->|"Pay"| PAY
PAY_LOADING("β
Payment processing")
PAY --> PAY_LOADING
PAY_OK("β
Order confirmed screen")
PAY_LOADING -.-> PAY_OK
PAY_OK_decision{{"π Tip enabled?"}}
PAY_OK --> PAY_OK_decision
TRACK("β
Tap Track My Order")
PAY_OK_decision -->|"Always"| TRACK
TIP("β
Tap Add Tip")
PAY_OK_decision -->|"Flag on"| TIP
EDIT("β
User taps Edit Order")
CHECKOUT_decision -->|"Edit"| EDIT
PROMO("β
User applies promo code")
EDIT --> PROMO
PROMO_OK("β
Discount applied")
PROMO --> PROMO_OK
PROMO_FAIL("β
Invalid promo alert")
PROMO -.->|"β‘ Invalid"| PROMO_FAIL
ERR_PAY("β
Payment fails - card declined")
PAY_LOADING -.->|"β‘ Error"| ERR_PAY
ERR_ALERT("β
Error alert with Retry")
ERR_PAY --> ERR_ALERT
ERR_RETRY("β
User taps Retry")
ERR_ALERT --> ERR_RETRY
style ENTRY fill:#1f6feb,stroke:#1158c7,color:#fff
style STANDARD fill:#2ea043,stroke:#1a7f37,color:#fff
style PICKUP fill:#2ea043,stroke:#1a7f37,color:#fff
style CHECKOUT fill:#2ea043,stroke:#1a7f37,color:#fff
style CHECKOUT_decision fill:#1f6feb,stroke:#1158c7,color:#fff
style PAY fill:#2ea043,stroke:#1a7f37,color:#fff
style PAY_LOADING fill:#2ea043,stroke:#1a7f37,color:#fff
style PAY_OK fill:#2ea043,stroke:#1a7f37,color:#fff
style PAY_OK_decision fill:#1f6feb,stroke:#1158c7,color:#fff
style TRACK fill:#2ea043,stroke:#1a7f37,color:#fff
style TIP fill:#2ea043,stroke:#1a7f37,color:#fff
style EDIT fill:#2ea043,stroke:#1a7f37,color:#fff
style PROMO fill:#2ea043,stroke:#1a7f37,color:#fff
style PROMO_OK fill:#2ea043,stroke:#1a7f37,color:#fff
style PROMO_FAIL fill:#2ea043,stroke:#1a7f37,color:#fff
style ERR_PAY fill:#2ea043,stroke:#1a7f37,color:#fff
style ERR_ALERT fill:#2ea043,stroke:#1a7f37,color:#fff
style ERR_RETRY fill:#2ea043,stroke:#1a7f37,color:#fff
| Journey | Before | After | Delta |
|---|---|---|---|
| π Checkout (Pay) | 50% | 100% | +3 steps |
| βοΈ Edit Order (Promo) | 75% | 100% | +1 step |
| π Pickup variant | 0% | 100% | +1 step |
| π³ Payment errors | 0% | 100% | +3 steps |
| π° Tip feature flag | 0% | 100% | +1 step |
| Total | 52% | β 100% | +9 steps, 22 tests |
All generated in one
/mapβ/blazeβ/scoutβ/summitsession.
Pathfinder auto-detects your UI test framework and generates tests with the correct selectors, waits, and patterns:
| Framework | Platform | Selectors | Auto-detected from |
|---|---|---|---|
| Playwright | Web | getByRole, getByTestId |
playwright.config.ts |
| Cypress | Web | cy.get('[data-cy=]') |
cypress.config.ts |
| Maestro | Mobile | id:, text: |
Expo app.json |
| Detox | React Native | by.id(), by.label() |
.detoxrc.js |
| XCUITest | iOS | app.buttons[""] |
.xcodeproj |
| Espresso | Android | withId(), withText() |
build.gradle |
| Flutter | Flutter | find.byKey() |
integration_test/ |
Each framework has a dedicated reference guide with selector strategies, wait patterns, and test templates β loaded only when needed.
The test generator adapts to your project's existing patterns:
# Auto-detect: appends to existing auth.spec.ts or creates new file
python3 ~/.agents/skills/pathfinder/scripts/generate-ui-test.py \
AUTH-05 "Logout redirects to login" playwright --route /dashboard --auto| Feature | How it works |
|---|---|
| Auto-append | Finds existing journey file β inserts inside test.describe() block |
| Auto-create | No existing file β creates with proper imports, describe wrapper, auth setup |
| Test directory | Reads from playwright.config.ts / cypress.config.ts β no hardcoded paths |
| Auth detection | Detects storageState pattern and includes authenticated setup |
| Selectors | Accessibility-first: getByRole > getByTestId > getByText > CSS (last resort) |
| Waits | Condition-based only: waitForLoadState, waitForExistence β never sleep() |
| Visual regression | Screenshot baseline capture + pixel-level diff comparison |
bash <(curl -fsSL https://raw.githubusercontent.com/srpadrono/Pathfinder/main/install/install.sh)One command β installs the repo, symlinks skills, and registers the Claude Code plugin. Supports update, uninstall, and --version flags. See docs/installation.md for details.
| Command | What happens |
|---|---|
/map |
Discover all user journeys in the codebase |
/blaze |
Generate Mermaid flowcharts |
/scout |
Write UI tests for untested steps |
/summit |
Run tests, update diagrams, compute score |
~/.agents/pathfinder/ (repo clone)
| Path | Purpose |
|---|---|
.claude-plugin/ |
Plugin + marketplace manifest (plugin.json, marketplace.json) |
skills/pathfinder/ |
Main skill β auto-triggers on coverage questions |
skills/pathfinder/SKILL.md |
Entry point |
skills/pathfinder/references/ |
8 framework + testing reference docs |
skills/pathfinder/scripts/ |
10 Python CLI tools |
skills/pathfinder/assets/ |
Starter templates |
skills/map/, blaze/, scout/, summit/ |
/map, /blaze, /scout, /summit command skills |
install/ |
Installer |
tests/ |
55 self-tests |
.githooks/ |
pre-commit, post-commit, pre-push |
~/.agents/skills/ (symlinks)
| Symlink | Target |
|---|---|
pathfinder |
~/.agents/pathfinder/skills/pathfinder |
map |
~/.agents/pathfinder/skills/map |
blaze |
~/.agents/pathfinder/skills/blaze |
scout |
~/.agents/pathfinder/skills/scout |
summit |
~/.agents/pathfinder/skills/summit |
Enable with: git config core.hooksPath ~/.agents/pathfinder/.githooks
| Hook | What it does |
|---|---|
| pre-commit | Validates journeys.json is valid JSON |
| post-commit | Auto-regenerates diagrams when journeys.json changes |
| pre-push | Blocks direct push to main / master |
| Requirement | Purpose |
|---|---|
| Python 3 | Runs all scripts |
| Git | Version control for journey maps |
| UI test framework | Auto-detected, or specify in config |
| Pillow (optional) | Pixel-level visual regression |
MIT License β see LICENSE for details.
Copyright (c) 2026 Sergio Padron and Pathfinder contributors.
Map the terrain. Blaze the markers. Scout the gaps. Reach the summit.
πΊοΈ β π₯ β π β β°οΈ