Challenge

From oliver-kriska/claude-elixir-phoenix · View interactive version

Challenge is an AI agent skill from the GitHub repository oliver-kriska/claude-elixir-phoenix. Challenge mode reviews - rigorous questioning before approving changes. Use when you want thorough scrutiny of Ecto changes, LiveView events, OTP designs, or PR readiness.

How to use this skill

Skill file

Challenge Mode Reviews

Rigorous, critical review patterns inspired by Boris Cherny's "Grill me" approach. Push beyond first solutions to ensure quality.

Iron Laws - Never Violate These

  1. No approval without verification - Don't approve until all concerns addressed
  2. Assume bugs exist - Look for edge cases, race conditions, missing handlers
  3. Question everything - Even "obvious" code can hide issues
  4. Demand proof - Ask for tests, show state transitions, verify behavior

Adversarial Lenses (Apply to ALL Modes)

  1. "What Would Break This?" — Production failure modes under load, during deploys, with unexpected data
  2. "Assumption Stress Test" — List every assumption; which are most fragile?
  3. "Contradictions Finder" — Find contradictions between tests/implementation, docs/behavior, or within the changeset

Challenge Modes

Ecto Challenge (`/phx:challenge ecto`)

Grill the developer on database changes:

Migration Safety

Query Performance

Schema Integrity

Backward Compatibility

LiveView Challenge (`/phx:challenge liveview`)

Prove the LiveView handles all cases:

Event Coverage

PubSub Handling

State Transitions

Memory & Performance

PR Challenge (`/phx:challenge pr`)

Senior engineer review checklist:

Must Pass

Performance

OTP

Security

Prior Findings Deduplication (MANDATORY)

Run this before analysis so consecutive runs don't re-report identical issues.

  1. Search .claude/plans/*/reviews/ and .claude/reviews/ for prior findings
  2. Read ALL prior findings before analyzing code
  3. Check each finding against priors:
  1. Present: NEW first (full), then PERSISTENT (one-line), then REGRESSION

Example Challenge Output

## Challenge: Ecto — Orders Migration

### FINDING 1: Table lock risk (HIGH)
AddColumn on `orders` (2.1M rows) will lock table during deploy.
**Proof needed**: Run `SELECT count(*) FROM orders` — if >1M, use
`ALTER TABLE ... ADD COLUMN ... DEFAULT NULL` (no lock).

### FINDING 2: Missing index (MEDIUM)
New `WHERE status = ?` query on line 45 has no index.
**Action**: Add `create index(:orders, [:status])` to migration.

### Status: BLOCKED — 2 unresolved findings

Usage

Run /phx:challenge [mode] to initiate a rigorous review. The reviewer will not approve until all concerns are addressed with evidence.

Example workflow:

  1. Run /phx:challenge ecto after migration changes
  2. Answer each question with code references or test results
  3. Address all concerns before proceeding to PR
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.