Skip to content

chore(claude): migrate testing guidelines to path-scoped rules#20639

Open
nshirley wants to merge 1 commit into
mainfrom
nshirley/claude-test-rules
Open

chore(claude): migrate testing guidelines to path-scoped rules#20639
nshirley wants to merge 1 commit into
mainfrom
nshirley/claude-test-rules

Conversation

@nshirley
Copy link
Copy Markdown
Contributor

Because:

  • Testing guidelines lived in a skill-shared GUIDELINES.md that only loaded when a skill explicitly read it; ad-hoc test edits got no guideline coverage.
  • The same content existed in multiple places (GUIDELINES.md, CLAUDE.md section 8 digest, and several skills' embedded sections), making drift hard to avoid.

This commit:

  • Adds .claude/rules/testing/base.md (general rules; paths: **/.test.ts, **/.spec.ts, **/.test.tsx) and .claude/rules/testing/react.md (React- specific; paths: **/.test.tsx). Rules auto-load whenever Claude reads a matching file, so they apply to ad-hoc edits, not only skill-invoked work.
  • Trims CLAUDE.md section 8 to a short pointer at the rules plus the shift-left guidance, kept as an always-loaded "golden goal" preference.
  • Replaces fxa-check-react/SKILL.md section 5 with a pointer to react.md.
  • Updates fxa-test-draft, fxa-test-repair, fxa-review, and fxa-review-quick to reference the new rule paths instead of GUIDELINES.md.
  • Renames the now-obsolete fxa-testing-shared/GUIDELINES.md to base.md for the rule

Closes: FXA-13773

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

Because:
- Testing guidelines lived in a skill-shared GUIDELINES.md that only loaded
  when a skill explicitly read it; ad-hoc test edits got no guideline coverage.
- The same content existed in multiple places (GUIDELINES.md, CLAUDE.md §8
  digest, and several skills' embedded sections), making drift hard to avoid.

This commit:
- Adds .claude/rules/testing/base.md (general rules; paths: **/*.test.ts,
  **/*.spec.ts, **/*.test.tsx) and .claude/rules/testing/react.md (React-
  specific; paths: **/*.test.tsx). Rules auto-load whenever Claude reads a
  matching file, so they apply to ad-hoc edits, not only skill-invoked work.
- Trims CLAUDE.md §8 to a short pointer at the rules plus the shift-left
  guidance, kept as an always-loaded "golden goal" preference.
- Replaces fxa-check-react/SKILL.md §5 with a pointer to react.md.
- Updates fxa-test-draft, fxa-test-repair, fxa-review, and fxa-review-quick
  to reference the new rule paths instead of GUIDELINES.md.
- Removes the now-obsolete fxa-testing-shared/GUIDELINES.md (git detects the
  move as a rename to base.md).

Closes: FXA-13773
@nshirley nshirley marked this pull request as ready for review May 28, 2026 14:34
@nshirley nshirley requested a review from a team as a code owner May 28, 2026 14:34
Copilot AI review requested due to automatic review settings May 28, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant