diff --git a/moz.build b/moz.build index bb698fff62bf..4f2d7d656b1c 100644 --- a/moz.build +++ b/moz.build @@ -137,6 +137,9 @@ with Files("AGENTS.md"): with Files("CLAUDE.md"): BUG_COMPONENT = ("Developer Infrastructure", "AI for Development") +with Files("review-context.toml"): + BUG_COMPONENT = ("Developer Infrastructure", "AI for Development") + with Files("nsprpub/**"): BUG_COMPONENT = ("NSPR", "NSPR") diff --git a/review-context.toml b/review-context.toml new file mode 100644 index 000000000000..40942fae0074 --- /dev/null +++ b/review-context.toml @@ -0,0 +1,52 @@ +# Code review context rules for the Firefox repository. +# +# Authoring guide: +# https://firefox-source-docs.mozilla.org/ai-agent-tools/code-review-context.html +# +# Validate locally before landing changes: +# ./mach lint review-context.toml + +version = 1 + +# Front-end conventions: HTML, JS, CSS, SVG for desktop browser chrome, +# toolkit UI, and devtools. Loaded whenever a patch touches desktop front-end +# source, excluding test-only changes. +[[rules]] +name = "Firefox desktop frontend" +description = "Front-end conventions for browser chrome, toolkit UI, and devtools (HTML, JS, CSS, SVG)." +when = { any_file = { include = [ + "browser/**", + "toolkit/**", + "devtools/**", +], exclude = [ + "**/test/**", + "**/tests/**", +], ext = [ + ".js", + ".mjs", + ".html", + ".xhtml", + ".css", + ".svg", +] } } +load = [ + { type = "file", path = ".claude/skills/firefox-desktop-frontend/SKILL.md" }, +] + +# Web-standard implementation: native code behind WebIDL interfaces. Triggered +# when a patch touches both a .webidl file and at least one native (.h/.cpp) file. +[[rules]] +name = "Gecko WebIDL / web standard implementation" +description = "Guidance for implementing WebIDL interfaces and their native (C++/C/Rust) backing code." +when = { all = [ + { any_file = { ext = [ + ".webidl", + ] } }, + { any_file = { ext = [ + ".h", + ".cpp", + ] } }, +] } +load = [ + { type = "file", path = ".claude/skills/gecko-web-standard-implementation/SKILL.md" }, +]