docs: add frontend-review skill for pre-PR FE rule audits - #27408
Conversation
0f8489b to
96d9ed2
Compare
c03efdd to
722f15b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f8489b3ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
96d9ed2 to
a166ce3
Compare
722f15b to
2f60b6c
Compare
96d9ed2 to
a166ce3
Compare
Adds .claude/docs/FRONTEND_PATTERNS.md, a canonical rule contract for site/src changes with stable rule IDs, derived from recurring review findings on frontend PRs over the past 18 months. Adds a compact non-negotiables index to site/AGENTS.md and links the contract from the root AGENTS.md frontend routing line.
a166ce3 to
759a612
Compare
2f60b6c to
c4bbbd4
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 759a6125e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Adds .claude/skills/frontend-review, a diff-scoped self-review gate that audits site/src changes against the FE1-FE10 rule contract before a PR is created or updated. Wires it into the site/AGENTS.md Pre-PR Checklist and references the FE rule IDs from the code-review skill and the deep-review frontend-reviewer role.
759a612 to
0e80cef
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
## What
Adds `.claude/docs/FRONTEND_PATTERNS.md`, a canonical frontend rule
contract for `site/src/` with ten stable rule IDs (FE1 to FE10), each
with short incorrect/correct examples using real repo idioms. Adds a
compact non-negotiables index at the top of `site/AGENTS.md` and links
the contract from the root `AGENTS.md` frontend routing line.
## Why
Frontend PRs keep drawing the same review findings. Mining the last 18
months of `site/` PR review data (330 closed/merged PRs, 1,105 inline
comments, 358 actionable pattern findings across 57 PRs) shows the
recurring themes, in order of frequency: missing Storybook interaction
coverage, loose TypeScript, component duplication and PR scope,
redundant comments, unhandled UI states, accessibility, react-query
misuse, and effect misuse. The guidance largely existed in
`site/AGENTS.md` already, but as unprioritized prose with no shared
vocabulary.
Stable rule IDs give reviewers, agents, and tooling one shared language
("FE7: re-typed query key"), and the rules are ordered by how often
reviewers actually flagged them.
This is the first PR of a stack of two:
1. This PR: the rule contract.
2. A `frontend-review` skill that audits diffs against these rules
pre-PR (#27408).
A third PR with a deterministic ratchet script (#27409) was closed; the
machine-checkable subset will be enforced through proper linting
instead.
## Notes for reviewers
The rule content is derived from your own review comments (for example,
the re-typed query key example in FE7 mirrors feedback on #27385). If a
rule does not match how you want the frontend built, the contract file
is the place to change it.
> This PR was written by Mux, an AI coding agent, on behalf of Mike.
What
Adds
.claude/skills/frontend-review, a diff-scoped self-review skill that audits changes undersite/src/against the FE1 to FE10 rule contract before a PR is created or updated. Each rule has a concrete "what to look for in a diff" checklist, and the output format is a terse per-rule PASS/FAIL table withfile:linefindings.Wiring:
site/AGENTS.mdPre-PR Checklist gains step 6: run the audit when the diff touchessite/src/..claude/skills/code-reviewnow cites FE rule IDs for frontend findings.frontend-reviewerrole audits against the same contract.Why
Most frontend review findings are semantic (missing interaction coverage, clobbered form state, near-duplicate components) and cannot be linted. Today they are caught post-hoc by reviewers and the review bot, which is exactly the "PRs get complaints" experience. Running the same rubric before the PR exists converts review rounds into pre-push fixes.
Stacked on #27407 (the rule contract). The deterministic-checks follow-up (#27409) was closed; that subset will be enforced through proper linting instead.