Skip to content

P5: /react-rules — rule-file read + drift detection #8

Description

@tkowalczyk

Parent PRD

#1

What to build

A new skill, /react-rules, that audits the UI-rules surface of a single template repo. The skill reads every rule source it can find in the audited repo and the source code under conventional UI directories, then classifies each rule statement into one of five categories:

  • Gaps — canonical rules from the card library that are missing from the template's rule files
  • Conflicts — template rules that contradict the canonical card library
  • Outdated — rules referencing deprecated patterns
  • Vague — rules that don't give an agent an actionable check
  • Drift — rules whose prose disagrees with the actual code

Drift detection uses LLM-judge against a sampled subset of the source code. Issues are opened in the audited template repo, not in brainstormer.

See PRD #1 "Implementation Decisions" → "Scanning strategies" and PRD #1 user story 6 for the rule sources to read. Issue grouping and lifecycle behaviors from earlier phases apply.

Acceptance criteria

  • skills/react-rules/SKILL.md exists with manual-trigger metadata
  • Skill reads every rule source listed in PRD PRD: React/UI audit skill suite (audit / review / rules / sync) #1 user story 6 (.cursor/rules/*.mdc, CLAUDE.md and nested variants, AGENTS.md, .github/copilot-instructions.md, .windsurfrules, .clinerules, README UI sections) and reports which sources were found
  • Skill samples source code under src/components/, src/app/, app/, src/routes/, src/pages/ for drift detection
  • On a fixture template seeded with one of each finding category, all five categories surface in the output
  • Drift detection LLM-judge calls are cached per (file_hash, rule_id) within a run
  • Issues are opened in the audited template repo, not in brainstormer
  • Issue grouping and lifecycle behaviors from P3 apply
  • No card content from the canonical library is mutated by /react-rules; the skill only reads cards

Blocked by

User stories addressed

  • User story 5
  • User story 6
  • User story 7
  • User story 21
  • User story 27

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions