Bug 2048977 - Add initial review-context.toml rules. r=Gijs,smaug
Loads the desktop front-end and WebIDL implementation skills as review context for patches touching the matching files. Differential Revision: https://phabricator.services.mozilla.com/D307835
This commit is contained in:
committed by
padenot@mozilla.com
parent
2b87996cbb
commit
c865590a0e
@@ -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")
|
||||
|
||||
|
||||
@@ -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" },
|
||||
]
|
||||
Reference in New Issue
Block a user