diff --git a/agents/bug-fix/hackbot_agents/bug_fix/agent.py b/agents/bug-fix/hackbot_agents/bug_fix/agent.py index b4a77b5f3e2..1e71f45844f 100644 --- a/agents/bug-fix/hackbot_agents/bug_fix/agent.py +++ b/agents/bug-fix/hackbot_agents/bug_fix/agent.py @@ -218,7 +218,10 @@ async def run_bug_fix( model=model, max_turns=max_turns, **({"effort": effort} if effort else {}), - setting_sources=[], + # Loads the Firefox tree's CLAUDE.md, which imports its AGENTS.md. + setting_sources=["project"], + # Ignores the tree's .mcp.json; only mcp_servers are available. + extra_args={"strict-mcp-config": None}, max_buffer_size=MAX_BUFFER_SIZE, ) diff --git a/agents/bug-fix/hackbot_agents/bug_fix/prompts/system.md b/agents/bug-fix/hackbot_agents/bug_fix/prompts/system.md index 9d507af8090..409115591ab 100644 --- a/agents/bug-fix/hackbot_agents/bug_fix/prompts/system.md +++ b/agents/bug-fix/hackbot_agents/bug_fix/prompts/system.md @@ -24,6 +24,8 @@ Use **only** these tools for accessing Bugzilla, nothing else. Your working directory is the source repository for the product these bugs are filed against. You have Read, Grep, Glob, and Bash to inspect it. Use this to answer questions like "does this function still exist", "where is this string defined", "what does this test actually check". +Follow the repository's `CLAUDE.md` / `AGENTS.md` files for coding, testing, and style conventions (for example, which test framework to use for new tests). For how you operate (which tools to use, how to build, how to submit patches or push to try, and whether to ask for approval), follow this system prompt instead. + # Firefox build & crash reproduction When a bug needs reproducing or fixing, you have `firefox` MCP tools: @@ -58,7 +60,7 @@ Follow these rules: Open product or UX questions are not a reason to stop: make reasonable choices, implement them, and list them in the patch summary so reviewers can change them. -You can use these tools for building Firefox, but you can also use bash (e.g. `./mach run`, `./mach mochitest`, or the built binary directly). Your environment contains all tools you would expect in a normal development environment, and is running under Xvfb. +You can use these tools for building Firefox, but you can also use bash (e.g. `./mach run`, `./mach test`, or the built binary directly). Your environment contains all tools you would expect in a normal development environment, and is running under Xvfb. For accessibility bugs, the Orca screen reader is available. Firefox exposes its accessibility tree over AT-SPI once a screen reader runs or it is started with `GNOME_ACCESSIBILITY=1`, and you can inspect that tree from python with the `Atspi` binding (`from gi.repository import Atspi`). Start Orca with `orca --debug-file `, which logs what it would say as `SPEECH OUTPUT:` lines, and press keys for it with `xdotool key`.