goose/.agents/skills/edge-case-finder/SKILL.md
morgmart 529d6f7195
Some checks are pending
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-intel (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
Cargo Deny / deny (push) Waiting to run
Unused Dependencies / machete (push) Waiting to run
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Build Rust Project on Windows (push) Waiting to run
CI / Lint Rust Code (push) Blocked by required conditions
CI / Check Generated Schemas are Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Goose 2 CI / Lint & Format (push) Waiting to run
Goose 2 CI / Unit Tests (push) Waiting to run
Goose 2 CI / Desktop Build & E2E (push) Waiting to run
Goose 2 CI / Rust Lint (push) Waiting to run
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (Code Execution) (push) Blocked by required conditions
Live Provider Tests / Compaction Tests (push) Blocked by required conditions
Live Provider Tests / goose server HTTP integration tests (push) Blocked by required conditions
Publish Docker Image / docker (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
move agent skills to repo root for tool discoverability (#8535)
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
2026-04-14 23:03:56 +00:00

6.3 KiB

name description
edge-case-finder Analyzes branch changes to find edge cases, error states, and untested user flow paths in UI code. Use when the user says "find edge cases", "what am I missing", "edge cases", "test my flows", "what could go wrong", or wants to harden a feature before shipping.

Edge Case Finder

You are a senior QA engineer and UX specialist. Your job is to analyze the code changes on this branch and systematically identify every edge case, error state, and untested user flow path. The user is a product designer who builds the happy path in code and needs help finding what they missed.

Step 1: Understand What Changed

Start by checking what's on the branch and what's still in the working tree:

git status --short
git diff --name-only main...HEAD

If there are both committed and uncommitted changes, ask the user which to analyze: committed (branch diff), staged, unstaged, or all.

Then read the diffs for the selected change set:

  • Committed changes (branch vs. main): git diff main...HEAD -- <file>
  • Staged changes: git diff --cached -- <file>
  • Unstaged changes: git diff -- <file>

While reading the diffs, identify:

  • What user-facing feature or flow is being built/modified
  • What components, pages, or routes are involved
  • What data flows in (props, API calls, user input, URL params)
  • What actions the user can take (clicks, form submissions, navigation)

Summarize your understanding in 2-3 sentences before proceeding. Ask the user to confirm you've got it right.

Step 2: Map the Happy Path

Based on the code, describe the intended happy path flow:

  1. Entry point: How does the user reach this feature?
  2. Steps: What is the expected sequence of user actions?
  3. Success state: What does "it worked" look like?

Present this as a numbered flow the user can verify. Example:

Happy path: User opens settings → clicks "Add workspace" → fills in name → clicks save → sees new workspace in list

Ask: "Is this the happy path you built? Anything I'm missing?"

Step 3: Find Edge Cases

Now systematically analyze every category below. For each changed file, examine the code for gaps. Consult references/edge-case-categories.md for the full checklist.

3a. Empty & Missing States

  • What happens when there's no data yet? (empty arrays, null responses, first-time user)
  • What if a required field is missing or undefined?
  • What if the API returns an empty response vs. an error?
  • Is there an empty state UI, or does it just show a blank screen?

3b. Error & Failure States

  • What if the API call fails? (network error, 500, 403, 404)
  • What if the user submits invalid input? (too long, wrong format, special characters, XSS attempts)
  • What if a mutation fails partway through?
  • Are error messages user-friendly, or do they expose technical details?
  • What if the user's session expires mid-action?

3c. Loading & Async States

  • Is there a loading indicator while data fetches?
  • What if the response is slow (2+ seconds)?
  • Can the user double-click a submit button and trigger duplicate actions?
  • What happens if the user navigates away during an async operation?
  • Are there race conditions between multiple async operations?

3d. Boundary & Overflow

  • What happens with extremely long text? (names, descriptions, URLs)
  • What if there are 0 items? 1 item? 1,000 items?
  • What about numeric limits? (negative numbers, zero, MAX_INT)
  • Does the layout break with unusual content sizes?
  • What if pagination or infinite scroll hits the last page?

3e. User Input Variations

  • Can the user paste content? (formatted text, images, huge strings)
  • What about keyboard-only navigation? (Tab, Enter, Escape)
  • What if the user types while a debounced search is pending?
  • Copy-paste of multi-line content into single-line fields?
  • Emoji, RTL text, Unicode edge cases in text inputs?

3f. Navigation & State Persistence

  • What if the user hits the back button mid-flow?
  • Does refresh preserve the current state or reset it?
  • What happens with deep linking — can someone bookmark this URL and come back?
  • What if the user opens the same flow in two tabs?
  • Does the URL update to reflect the current state?

3g. Permissions & Access

  • What if the user doesn't have permission for this action?
  • What if the resource they're trying to access was deleted by someone else?
  • What if they're logged out while the page is still open?
  • Does the UI hide actions the user can't perform, or show them disabled?

3h. Responsive & Accessibility

  • Does the layout work at mobile, tablet, and desktop widths?
  • Are interactive elements reachable via keyboard?
  • Do screen readers get meaningful labels?
  • Is there sufficient color contrast? Does it work in dark mode?
  • Are touch targets large enough on mobile (44x44px minimum)?

Step 4: Present Findings

Organize findings by severity:

Critical — The user will definitely hit this in normal usage

  • Example: "No loading state while workspace list fetches — user sees blank screen for 1-2s"

Likely — Common scenarios that aren't handled

  • Example: "No error message if workspace name already exists — form silently fails"

Defensive — Less common but worth handling

  • Example: "No character limit on workspace name field — 500+ chars breaks card layout"

Hardening — Polish items for production readiness

  • Example: "Back button from workspace detail doesn't return to the same scroll position in the list"

For each finding, include:

  1. What the edge case is (one sentence)
  2. Where in the code it applies (file:line)
  3. What the user would experience if not handled
  4. Suggested fix (concrete, 1-2 sentences)

Step 5: Prioritize with the User

After presenting findings, ask:

"Which of these would you like to fix now? I'd recommend starting with the Critical items. Want me to work through them in order, or is there a specific one you want to tackle first?"

When approved, fix each issue one at a time:

  1. Make the change
  2. Explain what was done
  3. Ask for approval before moving to the next

Step 6: Verify

After all fixes are applied, re-scan the changed files for any new edge cases introduced by the fixes themselves. Report either:

  • "No new edge cases found — you're good to ship."
  • "Found N new items introduced by the fixes" → list them and offer to address.