Skip to content

fix: make browser testing mandatory for Claude Code#62

Open
s62dads4-rgb wants to merge 1 commit intosnarktank:mainfrom
s62dads4-rgb:fix/claude-mandatory-browser-testing
Open

fix: make browser testing mandatory for Claude Code#62
s62dads4-rgb wants to merge 1 commit intosnarktank:mainfrom
s62dads4-rgb:fix/claude-mandatory-browser-testing

Conversation

@s62dads4-rgb
Copy link

Summary

  • CLAUDE.md had weak "if available" browser testing language while prompt.md (Amp) had mandatory language with dev-browser skill
  • This mismatch meant Claude Code iterations would skip browser verification entirely, logging "manual verification needed" instead of actually testing
  • Added step to both files requiring verification of ALL pages/routes (not just the changed page) to catch 404s and broken navigation

What changed

File Before After
CLAUDE.md "If Available" — optional, fallback to manual note "Required for Frontend Stories" — mandatory, uses dev-browser skill
prompt.md Verified only the changed page Also verifies ALL other pages/routes still work

Why this matters

The README already states browser verification is required, but CLAUDE.md contradicted it. Claude takes the path of least resistance — if the prompt says "if available... note manual verification needed", it will always skip browser testing. This led to regressions like broken routes/404s going undetected.

🤖 Generated with Claude Code

…rification

CLAUDE.md had weak "if available" browser testing language while prompt.md
(Amp) had mandatory language. This mismatch meant Claude Code iterations
would skip browser verification entirely, defeating the purpose of the
dev-browser skill for catching UI regressions like broken routes/404s.

Changes:
- CLAUDE.md: match prompt.md mandatory browser testing with dev-browser skill
- Both files: add step to verify ALL pages/routes still work (no 404s)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@greptile-apps
Copy link

greptile-apps bot commented Jan 30, 2026

Greptile Overview

Greptile Summary

This PR strengthens browser testing requirements for frontend stories to prevent regressions from slipping through. The changes align CLAUDE.md with the mandatory language already present in prompt.md (for Amp), ensuring both AI coding tools follow the same verification process.

Key improvements:

  • Changed browser testing from "If Available" (optional) to "Required for Frontend Stories" in CLAUDE.md
  • Made dev-browser skill usage explicit and mandatory for Claude Code
  • Added comprehensive verification requirement: test ALL pages/routes, not just the changed page, to catch 404s and broken navigation
  • Removed the escape hatch that allowed agents to skip browser testing by logging "manual verification needed"

Impact:
The README already stated browser verification was required (line 203), but CLAUDE.md contradicted this with optional language. This PR closes that gap, ensuring Claude Code will actually perform browser testing instead of taking the path of least resistance.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it only strengthens quality requirements
  • Documentation-only changes that improve testing rigor without touching any executable code. The changes are internally consistent, align with existing README requirements, and close a loophole that allowed browser testing to be skipped
  • No files require special attention

Important Files Changed

Filename Overview
CLAUDE.md Changed browser testing from optional to mandatory, added dev-browser skill requirement and full-page verification step
prompt.md Added full-page verification requirement (step 4) to ensure all routes still work after changes

Sequence Diagram

sequenceDiagram
    participant Agent as Ralph Agent (Claude Code/Amp)
    participant FS as File System
    participant Browser as dev-browser skill
    participant UI as Application UI
    
    Agent->>FS: Read prd.json
    FS-->>Agent: Frontend story found (passes: false)
    Agent->>FS: Implement UI changes
    Agent->>Agent: Run quality checks (typecheck, lint)
    
    alt Browser Testing (Required for Frontend Stories)
        Agent->>Browser: Load dev-browser skill
        Browser-->>Agent: Browser session started
        Agent->>Browser: Navigate to changed page
        Browser->>UI: Load page
        UI-->>Browser: Page rendered
        Browser-->>Agent: Screenshot + status
        Agent->>Browser: Verify UI changes work
        Browser-->>Agent: Changes verified ✓
        Agent->>Browser: Navigate to ALL other pages/routes
        loop Each Route
            Browser->>UI: Load route
            UI-->>Browser: Route rendered
            Browser-->>Agent: Route status (200 or 404)
        end
        Agent->>Agent: Confirm no 404s, no broken navigation
        Agent->>FS: Commit changes
        Agent->>FS: Update prd.json (passes: true)
    else Pre-PR Behavior (Optional Testing)
        Agent->>FS: Log "manual verification needed"
        Agent->>FS: Update prd.json (passes: true)
        Note over Agent,UI: ❌ Regressions go undetected
    end
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant