Repository navigation
chore: Add agent coding-convention instructions - #5047
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5047 +/- ##
=======================================
Coverage 97.69% 97.69%
=======================================
Files 966 966
Lines 31575 31575
Branches 11669 11669
=======================================
Hits 30846 30846
Misses 722 722
Partials 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Some instructions exclude relevant implementation files or inaccurately describe established architectural and styling patterns.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Adds coding-convention guidance for AI assistants and contributors.
Changes:
- Defines repository-wide engineering conventions.
- Adds scoped guidance for components, tests, styles, dev pages, and test utilities.
- Updates
AGENTS.mdreferences and PR-title guidance.
| File | Description |
|---|---|
AGENTS.md |
Links convention files and clarifies title checks. |
.github/copilot-instructions.md |
Defines repository-wide conventions. |
.github/instructions/component-structure.instructions.md |
Documents component architecture and API conventions. |
.github/instructions/tests.instructions.md |
Defines testing conventions. |
.github/instructions/test-utils.instructions.md |
Defines test-utils contract conventions. |
.github/instructions/styles.instructions.md |
Defines SCSS conventions. |
.github/instructions/dev-pages.instructions.md |
Defines demo-page conventions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…d internal-interfaces.ts in scope' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…or necessary SCSS selectors' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… component guidance and examples' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| invent a divergence. | ||
|
|
||
| ## Contract rules — hard, shape-independent (a violation is almost certainly a bug) | ||
| - **Wrapper checklist (new, non-single-impl components):** `index.tsx` starts with `'use client';` as its |
There was a problem hiding this comment.
nit: After the copyright/liscense header?
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>


AI coding assistants are great at producing working code, but in this repo they tend to drift from our undocumented team conventions: how components are structured, how props flow through
index/internal/interfaces, the voice of our API docs, not breaking the public API. This risks coming up in review again and again. It can be mitigated to some extent by AGENTS.md, but this can often end up getting ignored.This PR makes an attempt to crystallize some of those rules, and give them as additional context to copilot as a more reliable way of ensuring the rules are followed.
What's here
.github/copilot-instructions.md— the repo-wide stuff: comment discipline, reuse and preferring one shared implementation over parallel ones, types over runtime checks, naming, i18n, keeping PRs focused, and treating the public API as a contract we don't break lightly..github/instructions/*.instructions.md— the per-area detail, applied automatically by tools that understand these files:component-structure— theindex/internal/interfacessplit and the public↔internal contract (forwardRef⇔Ref,getBaseProps,__internalRootRef,__-prefixed internals), public-API compatibility, interface typing, and doc voice & tone.tests,styles,dev-pages, andtest-utils.AGENTS.mdtweak — it now points at these files, and I corrected the title note to say “PR titles only” (we don't actually check individual commit messages, since they're squashed away).How do we know it helps?