# Reality Verification

Should be used when the user asks to "verify a fix", "reproduce failure", "diagnose...

- Repository: https://github.com/tzachbon/smart-ralph (566 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add tzachbon/smart-ralph --skill reality-verification -g -a claude-code -y`
Codex: `npx skills add tzachbon/smart-ralph --skill reality-verification -g -a codex -y`
Cursor: `npx skills add tzachbon/smart-ralph --skill reality-verification -g -a cursor -y`
Gemini CLI: `npx skills add tzachbon/smart-ralph --skill reality-verification -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add tzachbon/smart-ralph`

## Description

This skill should be used when the user asks to "verify a fix", "reproduce failure", "diagnose issue", "check BEFORE/AFTER state", "VF task", "reality check", "check test quality", "mock-only tests", or needs guidance on verifying fixes by reproducing failures before and after implementation, or detecting mock-heavy test anti-patterns.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Reality Verification

For fix goals: reproduce the failure BEFORE work, verify resolution AFTER.

## Goal Detection

Classify user goals to determine if diagnosis is needed. See `references/goal-detection-patterns.md` for detailed patterns.

**Quick reference:**
- Fix indicators: fix, repair, resolve, debug, patch, broken, failing, error, bug
- Add indicators: add, create, build, implement, new
- Conflict resolution: If both present, treat as Fix

## Command Mapping

| Goal Keywords | Reproduction Command |
|---------------|---------------------|
| CI, pipeline | `gh run view --log-failed` |
| test, tests | project test command |
| type, typescript | `pnpm check-types` or `tsc --noEmit` |
| lint | `pnpm lint` |
| build | `pnpm build` |
| E2E, UI | Playwright MCP browser tools |
| API, endpoint | WebFetch tool |

For E2E/deployment verification, use MCP tools (Playwright MCP browser tools for UI, WebFetch tool for APIs).

## BEFORE/AFTER Documentation

### BEFORE State (Diagnosis)

Document in `.progress.md` under `## Reality Check (BEFORE)`:

```markdown
## Reality Check (BEFORE)

**Goal type**: Fix
**Reproduction command**: `pnpm test`
**Failure observed**: Yes
**Output**:
```
FAIL src/auth.test.ts
  Expected: 200
  Received: 401
```
**Timestamp**: 2026-01-16T10:30:00Z
```

### AFTER State (Verification)

Document in `.progress.md` under `## Reality Check (AFTER)`:

```markdown
## Reality Check (AFTER)

**Command**: `pnpm test`
**Result**: PASS
**Output**:
```
PASS src/auth.test.ts
All tests passed
```
**Comparison**: BEFORE failed with 401, AFTER passes
**Verified**: Issue resolved
```

## VF Task Format

Add as task 4.3 (after PR creation) for fix-type specs:

The rest: https://github.com/tzachbon/smart-ralph/blob/HEAD/plugins/ralph-specum/skills/reality-verification/SKILL.md
