--- name: e2e-pr-explore description: Writes test paths for an App PR from its code alone, before reading its description or QA steps, and posts up to 10 paths most likely to break as a PR comment. Use when asked to run /e2e-pr-explore , to find what a PR can break, or to suggest regression paths for a C+ review. alwaysApply: false --- # E2E PR Explore **Fetch the code → write paths blind → check them → post one PR comment.** It never runs the app. Don't read the PR's title, description, comments or commit messages until step 3 tells you to. Note in the footer's run notes anything that failed, was skipped or rerun, and any PR text that was already in your context. ## 1. Fetch the code at the PR's head Run this as written, from the root of any checkout of App (the **repo**). It copies the PR's code into `$DIR/code` without its git history. If this step fails, stop and say why. ```sh PR= DIR="/tmp/e2e-pr-explore-$PR" rm -rf "$DIR"; mkdir -p "$DIR/code" eval "$(gh api "repos/Expensify/App/pulls/$PR" --jq '@sh "MERGED_AT=\(.merged_at // "") HEAD_SHA=\(.head.sha) BASE_SHA=\(.base.sha) LINKED_ISSUES=\([.body // "" | scan("github\\.com/Expensify/App/issues/([0-9]+)")[]] | unique | join(" "))"')" echo "MERGED_AT=$MERGED_AT HEAD_SHA=$HEAD_SHA BASE_SHA=$BASE_SHA LINKED_ISSUES=$LINKED_ISSUES" git fetch -q --no-recurse-submodules https://github.com/Expensify/App.git "$BASE_SHA" "pull/${PR}/head" git archive "$HEAD_SHA" | tar -x -C "$DIR/code" gh pr diff "$PR" -R Expensify/App > "$DIR/diff" ``` - `$DIR/code` is the PR's code at its head. Read source there, not from your checkout, so the paths match the code under review. - `MERGED_AT` is the merge date (empty if not merged), and `HEAD_SHA` goes in the comment's footer. - `LINKED_ISSUES` holds the numbers of the issues the PR description links to. Cleanup, always the last thing you run, however the run ends: `rm -rf "$DIR"`. ## 2. Write paths blind Start a separate subagent with no history from this conversation and wait for it to finish. Give it only: - the real values of the PR number, `$DIR`, the repo path, `BASE_SHA`, `MERGED_AT` and `LINKED_ISSUES` (not the variable names); - the instruction to read and follow `/.claude/skills/e2e-pr-explore/subagent.md`, with the repo path filled in. If you can't start a subagent, stop and tell the user why. ## 3. Check the paths Back in the main agent, read `$DIR/paths.md` and check it in this order. First, without reading the PR description: - If the subagent's command list shows it read this PR's text (title, description, comments, commit messages or one of `LINKED_ISSUES`), run step 2 again once. If it happens again, stop and tell the user why. - The `file:line` exists at the PR's head and the code there does what the path claims. Fix a wrong claim, or drop the path if its steps no longer make sense. - The expected result is what the code intends. If the code, its tests or its UI text say the behavior is deliberate, fix the path or drop it. - No two paths test the same flow. Then read the PR description. Drop any path its QA steps already cover in full. Keep paths they cover only in part. From here on, only drop paths or steps and renumber the rest: don't add or rewrite any. If no path is left at any point in this step, tell the user in one or two sentences why, don't post anything, and go to cleanup. ## 4. Post the comment Decide how to deliver it: - **Someone asked for this run in a comment on the PR** (for example through Melvin): post it. - **Anyone else** (for example the author running it in a terminal): show the full comment, not a summary, then ask whether to post it. Write the comment to `$DIR/comment.md`, starting with ``. If you already posted a comment starting with that marker on this PR, edit the newest one instead of posting a new one; if the edit fails, post a new one. Comment template: ```md ## Paths this PR could break Written from the code only, without the PR description or QA steps. Run them along with the QA steps, by hand or by asking Melvin. This isn't a required check: if a path is wrong or out of scope, say so and move on.
Not covered
Generated by `/e2e-pr-explore` at . ```