agentleFS
cenconq25cenconq25/claude-code-app-studio/.claude/skills/consistency-check/SKILL.md

consistency-check

Skill40 starsChanged 7 months agoMITView on GitHub

Read-only audit that scans all PRDs against the entity registry and detects cross-doc inconsistencies — same entity with different values, same configurable value with different defaults, same formula with different variables. Use when multiple PRDs are in flight to catch drift before /review-all-prds runs.

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before /review-all-prds (which is more expensive)

    line 21
  2. Very specific:

    Read design/registry/entities.yaml.

    line 39
  3. Distinctive:

    If the registry does not exist, stop:

    line 46
  4. Distinctive:

    If the registry has fewer than 5 entries, warn that meaningful checks need ≥5 entries — the skill will run but findings will be sparse.

    line 49
  5. Distinctive:

    Use grep judiciously — read each PRD once, scan for known entry names from the registry, capture surrounding context.

    line 71
  6. Very specific:

    If zero HIGH findings, the verdict is CLEAN.

    line 139
  7. Distinctive:

    Do not run any of these — the user decides.

    line 159
  8. Distinctive:

    Registry is empty: stop. The skill needs at least one entry to check anything.

    line 165
  9. Distinctive:

    Whitespace or punctuation differences: do not flag. Compare semantic values, not string equality.

    line 168
  10. Distinctive:

    Every HIGH finding includes: registry path, conflicting PRD paths, resolution suggestions.

    line 174
  11. Distinctive:

    No false positives on cosmetic differences (units, capitalization in prose).

    line 176
  12. Distinctive:

    Read-only — no file writes ever.

    line 177
  13. Distinctive:

    Does not evaluate design quality — only value-level drift

    line 198

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Consistency Check

Compares what each PRD claims about shared entities, values, and formulas against the registry. Pure read — never writes a file. Produces a structured findings list the user can resolve with /design-system retrofit ... or /propagate-design-change.


Purpose / When to Run

Run when:

  • Three or more PRDs exist
  • A PRD has just been authored that overlaps with prior PRDs
  • Before /review-all-prds (which is more expensive)

Distinct from /review-all-prds: this skill checks values for drift; the holistic review checks design intent for contradictions. Run consistency-check first — it is much cheaper.

Inputs

  • design/registry/entities.yaml
  • All design/prd/*.md
  • Optional: design/systems-index.md

Outputs

  • Printed findings. No file writes.

Phase 1: Load the Registry

Read design/registry/entities.yaml. The registry is the source of truth for cross-PRD facts. Each entry has:

  • name
  • type (entity / configurable / formula / constant / event / endpoint)
  • value or attributes
  • source (the PRD that owns the canonical definition)
  • referenced_by (other PRDs that reference it)

If the registry does not exist, stop:

"No design/registry/entities.yaml found. The registry is built incrementally as /design-system runs. Cannot consistency-check without it. Either author more PRDs or run /design-system retrofit ... to populate the registry from existing PRDs."

If the registry has fewer than 5 entries, warn that meaningful checks need ≥5 entries — the skill will run but findings will be sparse.


Phase 2: Index Every PRD

For each design/prd/*.md:

  1. Read the file.
  2. Identify which registry entries it references — grep for each entry's name in the file body.
  3. For each referenced entry, extract the value the PRD claims (from sections 3 Detailed Requirements, 6 Configurable Values, and any inline tables).

Build a per-entry table:

entry: rate_limit_login_attempts
  registry value: 5 (per minute)
  source: design/prd/auth.md
  referenced in:
    design/prd/auth.md → 5 per minute ✓
    design/prd/account-recovery.md → 3 per minute ✗ MISMATCH
    design/prd/security.md → "5 attempts" ✓

Use grep judiciously — read each PRD once, scan for known entry names from the registry, capture surrounding context.


Phase 3: Classify Findings

For each entry referenced in 2+ PRDs:

  • MATCH — all PRDs agree with the registry. No finding.
  • MINOR DRIFT — same value but different units or notation (e.g., "5 per minute" vs. "5/min"). Cosmetic. Reportable.
  • VALUE MISMATCH — PRDs claim different values. HIGH finding.
  • REGISTRY DRIFT — registry value differs from the source PRD's current text. The PRD changed without registry update. HIGH finding.
  • ORPHAN REFERENCE — a PRD references something that looks like a registry entry name but is not registered. MEDIUM finding (may be a typo, may need registration).

Also detect cross-PRD-only patterns (registry-independent):

  • NAME COLLISION — two PRDs define different things with the same name. HIGH finding.
  • INTERFACE DISAGREEMENT — PRD A says it emits event foo, PRD B says it emits event Foo (case mismatch) or with different payload shape. HIGH finding.
  • TIMING DISAGREEMENT — PRD A says "show paywall after 3 sessions", PRD B says "after 5". HIGH if neither references the registry.

Phase 4: Print the Findings

Output format:

# Consistency Check

PRDs scanned: <N>
Registry entries: <N>
Findings: <count by severity>

## HIGH

### 1. VALUE MISMATCH — `rate_limit_login_attempts`
- Registry says: `5 per minute` (source: design/prd/auth.md)
- design/prd/auth.md: `5 per minute` ✓
- design/prd/account-recovery.md: `3 per minute` ✗

Resolution suggestions:
- If 5 is correct → update `design/prd/account-recovery.md` Section 3
- If 3 is correct → update registry source PRD and run `/propagate-design-change`

### 2. INTERFACE DISAGREEMENT — analytics event `paywall_shown`
- design/prd/paywall.md: emits with `{ trigger: string, user_segment: string }`
- design/prd/analytics.md: expects `{ trigger: string, segment: string, ts: number }`

Field name mismatch (`user_segment` vs `segment`) and missing `ts`.

## MEDIUM

### 3. ORPHAN REFERENCE — `feature_flag_paywall_v2`
- Referenced in: design/prd/paywall.md, design/prd/onboarding.md
- Not registered.

Either register it (run `/design-system retrofit design/prd/paywall.md` to push to registry) or rename to a registered flag.

## MINOR

### 4. UNIT DRIFT — `cache_ttl_user_profile`
- design/prd/profile.md: `300 seconds`
- design/prd/auth.md: `5 minutes`
- Same value, different notation. Standardize.

## Verdict
[CLEAN | DRIFT FOUND] — <count> HIGH, <count> MEDIUM, <count> MINOR.

If zero HIGH findings, the verdict is CLEAN. Otherwise DRIFT FOUND.


Phase 5: Recommend Resolution Path

Below the findings list, print a short next-action block:

## Recommended next actions

For each HIGH finding:
- Decide on the canonical value
- Update the non-canonical PRD using `/design-system retrofit <path>` or manual Edit
- Run `/propagate-design-change <changed-prd>` to surface downstream impact
- Re-run `/consistency-check` to verify resolution

After all HIGH are resolved, run `/review-all-prds` for the holistic design check.

Do not run any of these — the user decides.


Edge Cases

  • Registry is empty: stop. The skill needs at least one entry to check anything.
  • Two registry entries with the same name: that is itself a HIGH finding — the registry is corrupt. Surface it.
  • PRD references a registry entry inside a code block or example: still count as a reference but lower confidence. Flag as MINOR if the only reference.
  • Whitespace or punctuation differences: do not flag. Compare semantic values, not string equality.

Quality Gates

  • Every HIGH finding includes: registry path, conflicting PRD paths, resolution suggestions.
  • The verdict is unambiguously CLEAN or DRIFT FOUND.
  • No false positives on cosmetic differences (units, capitalization in prose).
  • Read-only — no file writes ever.

Examples

5 PRDs, registry has 23 entries.

  • Output: 1 HIGH (rate-limit mismatch), 2 MEDIUM (orphan references), 3 MINOR (unit drift). Verdict: DRIFT FOUND.

12 PRDs, registry has 60 entries.

  • Output: 0 findings. Verdict: CLEAN.

3 PRDs, all reference an unregistered analytics event:

  • Output: 3 MEDIUM (each PRD with the orphan reference). Recommend running /design-system retrofit design/prd/analytics.md to register the event.

Constraints

  • Read-only — never writes
  • Cross-document only — does not check intra-document consistency (that is /prd-review's job)
  • Does not evaluate design quality — only value-level drift

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.