# Story → Screen Parity Check

## Context

App: {{APP_NAME}}
Story docs: {{STORY_DOCS}}
Screen docs: {{SCREEN_DOCS}}

## Instructions

1. Read ALL story docs at the paths above
2. Read ALL screen docs at the paths above
3. For each story, extract referenced screens
4. Run every parity check below against each story
5. Return results as JSON per the Output Format section

## Extraction: Story Docs

From each story doc, extract:

- Story name (from filename or heading)
- All screen references (format: `../../../screen/<screen>.md`)
- UI interactions described that imply screen usage

## Extraction: Screen Docs

From each screen doc, extract:

- Screen name (from filename or heading)
- Screen type and UI components described

## Parity Checks

For each story's screen references:

| Check ID         | Question                                            |
| ---------------- | --------------------------------------------------- |
| screen_existence | Do all screens referenced in the story exist?       |
| link_validity    | Do screen links in the story resolve to real files? |

### How to Check

1. List all screen references from each story doc
2. Verify a corresponding screen doc exists for each reference
3. Validate that all `../../../screen/<screen>.md` links resolve to actual files in SCREEN_DOCS

## Link Format Reference

| From  | To     | Format                        |
| ----- | ------ | ----------------------------- |
| Story | Screen | `../../../screen/<screen>.md` |

## Common Gap Patterns

- **Missing screen docs**: Story references a screen that has no doc
- **Broken screen links**: Story links to a screen file that does not exist
- **Implicit screens**: Story describes UI interaction but has no explicit screen link

## Output Format

Return a JSON object:

```json
{
  "check_type": "story-screen-parity",
  "app": "{{APP_NAME}}",
  "gaps": [...],
  "inconsistencies": [...],
  "summary": { "total_checks": N, "passed": N, "failed": N, "skipped": N }
}
```

See [parity-report-format.md](parity-report-format.md) for field definitions.
