Built for AI Coding Agents

Give your agent a map before it touches the UI.

Driving a live browser on every turn is slow and burns tokens. BrokenApp installs a concise 64-line skill into your repo so Claude Code, Codex, Antigravity, and Cursor read .brokenapp/map/ in <0.2s, edit the exact source file, and verify with brokenapp map --changed.

One command installs agent instructions

brokenapp init drops a tight 64-line skill into .claude/skills/brokenapp/SKILL.md by default, or writes an idempotent marker-delimited section into AGENTS.md. Inside sandboxed agent runners where ~/.brokenapp is unwritable, set BROKENAPP_HOME=/tmp/brokenapp-home.

Install skill & map your app
# Claude Code skill (default)
brokenapp init

# AGENTS.md snippet (Codex, Cursor, Antigravity, multi-agent repos)
brokenapp init --agent agents-md

# Install both SKILL.md and AGENTS.md
brokenapp init --agent all
What agents run before & after editing
# 1. Sub-200ms offline lookup (no browser)
brokenapp ui --route /settings --exact-route --compact
brokenapp dead --role all
brokenapp journey "POST /api/orders" --role member

# 2. Incremental verify after code edits
brokenapp map --changed --json
brokenapp changes --role all --fail-on dead,broken,access-gained

# 3. Optional: let your agent file redacted CLI bug/UX feedback (opt-in only)
brokenapp feedback --opt-in
brokenapp feedback "Form login blocked NextAuth POST" --category auth --agent claude-code --include-stats --send

Example agent loop

agent session
  1. 1 orient0.04s, no browser

    $ brokenapp ui --route /checkout --exact-route --compact

    [dead] button "Pay now": no handler attached (app/checkout/page.tsx:142)

  2. 2 trace0.05s, no browser

    $ brokenapp journey "POST /api/orders" --role member

    4 steps (1 route, 3 in-page), chain breaks at "Pay now"

  3. 3 patchexact file:line from the map

    Rewires onClick={submitOrder} in app/checkout/page.tsx:142. No guessed selectors, no 20 Playwright turns.

  4. 4 verifyincremental crawl and diff gate

    $ brokenapp map --changed --json && brokenapp changes --role all --fail-on dead,broken,access-gained

    FIXED /checkout button "Pay now" -> calls POST /api/orders [write blocked]

    Coverage: 42/44 exercisable (95%), 0 role drift, exit 0

Complementary layers

BrokenApp is ctags for your live UI.

Browser drivers (Playwright / MCP)

Great for scripted end-to-end replay once you already know which page, selector, and user role to test. Expensive when an agent uses them blindly to discover what exists across 50 routes and 3 roles.

BrokenApp (.brokenapp/map/)

Pre-indexes every reachable control, endpoint, source file:line, role boundary, and multi-step journey once — then refreshes only the routes affected by your diff via map --changed.

Epistemic discipline

Honest statuses so agents never hallucinate green.

ok

Exercised with observable effect (DOM change, navigation, dialog/tab open, or network call). Confirm it is the intended effect.

dead

Exercised with no observable effect and no event handler found. High-confidence dead control.

broken

Triggered HTTP >= 400, console/page error, broken link, or repeated timeout.

no_effect

Event handler exists, but clicking produced no observable UI or network change — inspect the handler before assuming a bug.

not_exercised

Skipped (e.g., dangerous label, view cap, or obscured — obscured gaps list the top covering selectors). Never treated as evidence that the control works.