docs(browser): add custom browser engine and extension support#240
docs(browser): add custom browser engine and extension support#240marcusquinn merged 4 commits intomainfrom
Conversation
…nsion (uBlock Origin) support Document how to use Brave, Edge, and Chrome as custom browser engines across Playwright, Stagehand, Crawl4AI, dev-browser, and Playwriter. Add uBlock Origin extension loading guidance and Brave Shields as an alternative. Include executable paths for macOS, Linux, and Windows. Update feature matrix with custom browser engine row and add new comparison tables for browser engine and extension support per tool.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the documentation for browser automation tools by providing comprehensive guides on integrating custom Chromium-based browsers like Brave, Edge, and Chrome. It also details how to effectively load and manage browser extensions, particularly uBlock Origin, and offers Brave Shields as a built-in ad-blocking alternative. These additions aim to give users greater flexibility and control over their automation environments, improving efficiency and the quality of web interactions by reducing unwanted content. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughAdds Custom Browser Engine support (Brave, Edge, Chrome) across six browser tool docs, adding executablePath/browser_channel options, platform-specific executable paths, extension and ad‑block guidance (uBlock/Brave Shields), examples for persistent contexts, and a first‑run preference example file. Changes
Sequence Diagram(s)(omitted — changes are documentation additions and examples, no new multi-component runtime control flow introduced) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Jan 27 02:56:23 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request significantly improves the documentation by adding comprehensive guides on using custom browser engines and extensions with various automation tools. The new sections are well-structured, detailed, and provide valuable examples. I've identified a few areas for improvement to enhance accuracy and consistency, including correcting a command, clarifying a comment about headless mode, and ensuring code examples are valid standalone snippets. Overall, this is a great addition to the documentation.
|
|
||
| ```bash | ||
| # Clone the uBlock Origin repo | ||
| git clone https://github.com/nicedoc/nicedoc.io ~/.aidevops/extensions/ublock-origin |
There was a problem hiding this comment.
The git clone command for uBlock Origin points to an incorrect repository. nicedoc/nicedoc.io is a documentation generator, not uBlock Origin. This command will download the wrong source code. The correct repository is https://github.com/gorhill/uBlock. Additionally, cloning the repository requires a build step, which might be complex for users. Consider pointing to the releases page where users can download a pre-built, unpacked version.
| git clone https://github.com/nicedoc/nicedoc.io ~/.aidevops/extensions/ublock-origin | |
| git clone https://github.com/gorhill/uBlock.git ~/.aidevops/extensions/ublock-origin |
| const context = await chromium.launchPersistentContext( | ||
| '/tmp/browser-profile', | ||
| { | ||
| headless: false, // Extensions require headed mode in Chromium |
There was a problem hiding this comment.
The comment // Extensions require headed mode in Chromium is not entirely accurate. Modern versions of Chromium support extensions in the new headless mode (--headless=new), which is the default for Playwright. This comment might mislead users into thinking headed mode is always necessary, which can be less convenient for server-side automation.
| headless: false, // Extensions require headed mode in Chromium | |
| headless: false, // Extensions are supported in both headed and headless mode. |
| ```javascript | ||
| import { chromium } from 'playwright'; | ||
|
|
||
| // Brave - built-in ad/tracker blocking via Shields | ||
| const browser = await chromium.launch({ | ||
| executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser', | ||
| headless: true, | ||
| }); | ||
|
|
||
| // Microsoft Edge - enterprise SSO, Azure AD | ||
| const browser = await chromium.launch({ | ||
| executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', | ||
| headless: true, | ||
| }); | ||
|
|
||
| // Google Chrome - widest extension compatibility | ||
| const browser = await chromium.launch({ | ||
| executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', | ||
| headless: true, | ||
| }); | ||
| ``` | ||
|
|
||
| ### Custom Browser with Persistent Context + Extensions | ||
|
|
||
| Combine a custom browser engine with extensions (e.g., uBlock Origin): | ||
|
|
||
| ```javascript | ||
| import { chromium } from 'playwright'; | ||
|
|
||
| // Brave + uBlock Origin (Brave Shields may make uBlock redundant) | ||
| const context = await chromium.launchPersistentContext( | ||
| '/tmp/brave-profile', | ||
| { | ||
| executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser', | ||
| headless: false, // Extensions require headed mode in Chromium | ||
| args: [ | ||
| '--load-extension=/path/to/ublock-origin-unpacked', | ||
| '--disable-extensions-except=/path/to/ublock-origin-unpacked', | ||
| ], | ||
| } | ||
| ); | ||
|
|
||
| // Edge + uBlock Origin | ||
| const context = await chromium.launchPersistentContext( | ||
| '/tmp/edge-profile', | ||
| { | ||
| executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', | ||
| headless: false, | ||
| args: [ | ||
| '--load-extension=/path/to/ublock-origin-unpacked', | ||
| '--disable-extensions-except=/path/to/ublock-origin-unpacked', | ||
| ], | ||
| } | ||
| ); | ||
| ``` |
There was a problem hiding this comment.
The code examples in this section redeclare const variables (browser on lines 103, 109, 115, and context on lines 129, 142). This makes the code blocks invalid if copied and pasted directly, as it would cause a SyntaxError. To improve the user experience, please ensure each example is a valid, standalone snippet. You could achieve this by using different variable names for each example or by separating them into distinct code blocks.
.agent/tools/browser/playwright.md
Outdated
| '/tmp/brave-profile', | ||
| { | ||
| executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser', | ||
| headless: false, // Extensions require headed mode in Chromium |
There was a problem hiding this comment.
The comment // Extensions require headed mode in Chromium is not always true. Modern versions of Chromium support extensions in the new headless mode (--headless=new), which Playwright uses by default. This could cause users to avoid headless mode when it would actually work fine for their use case.
| headless: false, // Extensions require headed mode in Chromium | |
| headless: false, // Extensions are supported in both headed and headless mode. |
.agent/tools/browser/stagehand.md
Outdated
| }); | ||
| ``` | ||
|
|
||
| ### **Custom Browser Engine (Brave, Edge, Chrome)** |
There was a problem hiding this comment.
The heading ### **Custom Browser Engine (Brave, Edge, Chrome)** uses extra bolding (**...**) which is inconsistent with the other documentation files in this PR (e.g., playwright.md, dev-browser.md). For consistency across the documentation, it's best to remove the bold markdown.
| ### **Custom Browser Engine (Brave, Edge, Chrome)** | |
| ### Custom Browser Engine (Brave, Edge, Chrome) |
| ```javascript | ||
| // Brave - built-in ad/tracker blocking via Shields | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", | ||
| headless: false, | ||
| browserOptions: { | ||
| executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser', | ||
| }, | ||
| modelName: "gpt-4o", | ||
| modelClientOptions: { apiKey: process.env.OPENAI_API_KEY } | ||
| }); | ||
|
|
||
| // Edge - enterprise SSO, Azure AD integration | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", | ||
| headless: false, | ||
| browserOptions: { | ||
| executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', | ||
| }, | ||
| modelName: "gpt-4o", | ||
| modelClientOptions: { apiKey: process.env.OPENAI_API_KEY } | ||
| }); | ||
| ``` | ||
|
|
||
| **With uBlock Origin extension**: | ||
|
|
||
| ```javascript | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", | ||
| headless: false, | ||
| browserOptions: { | ||
| executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', | ||
| args: [ | ||
| '--load-extension=/path/to/ublock-origin-unpacked', | ||
| '--disable-extensions-except=/path/to/ublock-origin-unpacked', | ||
| ], | ||
| }, | ||
| modelName: "gpt-4o", | ||
| modelClientOptions: { apiKey: process.env.OPENAI_API_KEY } | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
The code examples in this section redeclare the const stagehand variable multiple times (lines 266, 277, 291). This would cause a SyntaxError if the entire code block is copied and run. To make the documentation more robust and user-friendly, please structure these so that each example is a valid, standalone snippet, for example by using unique variable names or separating them into different code blocks.
🤖 Augment PR SummarySummary: Expands browser automation docs to cover using non-bundled Chromium browsers and optional ad-blocking setups.
🤖 Was this summary useful? React with 👍 or 👎 |
| ```bash | ||
| # Clone the uBlock Origin repo | ||
| git clone https://github.com/nicedoc/nicedoc.io ~/.aidevops/extensions/ublock-origin | ||
| # Or download from Chrome Web Store and extract the .crx |
|
|
||
| // Microsoft Edge - enterprise SSO, Azure AD | ||
| const browser = await chromium.launch({ | ||
| executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', |
.agent/tools/browser/stagehand.md
Outdated
|
|
||
| // Edge - enterprise SSO, Azure AD integration | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", |
| | **Chrome** | [Chrome Web Store](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) | Install uBlock Origin separately | | ||
| | **Brave** | [Chrome Web Store](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) | Built-in Shields (no extension needed) | | ||
| | **Edge** | [Chrome Web Store](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) | Install uBlock Origin separately | | ||
|
|
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In @.agent/tools/browser/browser-automation.md:
- Around line 302-305: In the Playwright table row (the "Playwright
(persistent)" tool entry) update the wording in the "Notes" cell to read
"Requires an unpacked extension + persistent context" instead of "Requires
unpacked extension + persistent context" so it clearly says "an unpacked
extension" and matches the suggested phrasing; locate the cell that currently
contains "Requires unpacked extension + persistent context" and replace that
fragment accordingly.
- Around line 315-321: Replace the incorrect clone URL in the "Getting uBlock
Origin unpacked" instructions: update the git clone target referenced in the
snippet (the line that currently clones "nicedoc/nicedoc.io") to point at the
official uBlock Origin repository ("gorhill/uBlock") so users download the
authentic extension source; modify only the URL in that git clone command and
verify the rest of the paragraph (comments about .crx extraction and using
--load-extension) remains unchanged.
In @.agent/tools/browser/playwright.md:
- Around line 155-163: Update the "Browser Executable Paths" section to clarify
that the listed paths are common default install locations and may vary by
distribution, package manager, or custom install; add a concise note directly
above or below the table (near the "Browser Executable Paths" heading) such as:
"Default paths shown — actual executable locations can vary by OS distribution,
package manager, and custom installs; use your system's package manager or
which/where commands to verify." Reference the table entries (e.g., the
**Brave**, **Edge**, **Chrome**, and **Chromium** rows) so readers know the note
applies to those paths.
In @.agent/tools/browser/playwriter.md:
- Around line 63-72: Update the Edge row in the Playwriter install table (the
Edge table cell) to add a brief footnote or inline note that Edge users must
enable "Allow extensions from other stores" in Edge settings before installing
from the Chrome Web Store; add a short footnote marker (e.g., †) next to the
Edge entry and a one-line footnote below the table explaining the setting and
where to enable it to prevent installation friction.
- Around line 39-42: Update the "Browser compatibility" and "Extensions" text in
.agent/tools/browser/playwriter.md to avoid overstating Edge installs and
password-manager behavior: clarify under the "Browser compatibility" heading
that Edge requires the user to enable "Allow extensions from other stores" in
Edge extension settings to install Playwriter from the Chrome Web Store (it is
not automatic), and under the "Extensions" heading note that password manager
unlock behavior varies by browser and OS (some auto-unlock via OS credentials
while others require explicit device authentication), rather than saying
password managers are already unlocked universally; keep references to
Playwriter and uBlock Origin intact.
🧹 Nitpick comments (6)
.agent/tools/browser/crawl4ai.md (1)
537-580: Replace inline example with authoritative file:line reference.
This inline code block is long and not tied to a canonical implementation. For agent docs, prefer progressive disclosure and a file:line pointer to an authoritative example (or move the example into a dedicated example file, then reference it here). As per coding guidelines, please replace the inline block with a file:line reference to the canonical example..agent/tools/browser/dev-browser.md (2)
43-46: Avoid duplicated “Custom browser” guidance.
The quick-reference note and the dedicated section repeat the same guidance. Recommend keeping one and linking to the other for progressive disclosure. As per coding guidelines, please consolidate.
291-323: Swap inline command block for authoritative file:line references.
This is agent documentation; inline shell blocks should be replaced with a pointer to the canonical launch/config implementation (file:line), then a short summary here. As per coding guidelines..agent/tools/browser/playwright.md (1)
93-184: Use canonical file:line references instead of inline code blocks.
These examples are extensive and not tied to authoritative source files. For agent docs, prefer progressive disclosure and file:line references to canonical examples (or move these snippets into a dedicated example file and reference them here). As per coding guidelines..agent/tools/browser/browser-automation.md (1)
234-296: Move first-run prefs JSON to canonical config + file:line ref.
Inline JSON should point to an authoritative config template (file:line) and keep this section summary-only. As per coding guidelines..agent/tools/browser/stagehand.md (1)
260-307: Verify extension support + avoid inline code in agent docs.
Playwright extensions usually requirelaunchPersistentContext. Please verify Stagehand actually supports persistent contexts or forwardsbrowserOptions.argsin a way that enables extensions; otherwise this should be marked as experimental or removed. Also replace inline code blocks with file:line references to authoritative examples. As per coding guidelines.
…ment - Fix headless mode comments: note new headless supports extensions - Fix const redeclarations: split into separate code blocks (playwright, stagehand) - Fix uBlock Origin clone URL: use gorhill/uBlock with build instructions - Fix heading consistency: remove extra bold in stagehand.md - Add Edge extension store prerequisite footnote (playwriter) - Add default paths disclaimer note (playwright)
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Jan 27 13:40:05 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.agent/tools/browser/browser-automation.md:
- Line 333: Add the same clarifying inline comment to each headless example in
stagehand.md where the option 'headless: false' appears (the examples around the
headless settings at the occurrences corresponding to lines ~246, ~269, ~283,
~297 in the diff); update each 'headless: false' line to include the comment "
// Extensions may require headed mode in older Chromium; new headless
(--headless=new) supports extensions" so the stagehand examples match the
comments used in browser-automation.md and playwright.md.
🧹 Nitpick comments (1)
.agent/tools/browser/playwright.md (1)
176-181: Browser paths table duplicated across files.The Browser Executable Paths table appears in both playwright.md (lines 176-181) and browser-automation.md (lines 249-271). Consider centralizing this reference in browser-automation.md and pointing to it from tool-specific docs to maintain single-source-of-truth.
Suggested consolidation
In playwright.md, replace the table with:
### Browser Executable Paths See [browser-automation.md#custom-browser-engine-support](browser-automation.md#custom-browser-engine-support) for platform-specific browser executable paths.
| const context = await chromium.launchPersistentContext( | ||
| '/tmp/browser-profile', | ||
| { | ||
| headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the specific line in browser-automation.md
echo "=== Checking browser-automation.md at line 333 ==="
sed -n '330,336p' .agent/tools/browser/browser-automation.md
echo -e "\n=== Searching for headless/extension references ==="
rg -n "headless.*extension|extension.*headless" .agent/tools/browser/*.md -C2
echo -e "\n=== Searching for headed mode references ==="
rg -n "headed mode|headed.*extension" .agent/tools/browser/*.md -C2
echo -e "\n=== Checking if playwright.md and stagehand.md exist ==="
ls -la .agent/tools/browser/*.mdRepository: marcusquinn/aidevops
Length of output: 10162
🏁 Script executed:
#!/bin/bash
# Check if stagehand.md discusses extensions or headless modes
echo "=== Searching stagehand.md for extension content ==="
rg -n "extension" .agent/tools/browser/stagehand.md
echo -e "\n=== Searching stagehand.md for headless references ==="
rg -n "headless" .agent/tools/browser/stagehand.md
echo -e "\n=== Checking stagehand.md for browser launch/context sections ==="
rg -n "launch|context|headless.*false" .agent/tools/browser/stagehand.md -C1Repository: marcusquinn/aidevops
Length of output: 1982
Add clarifying comment to stagehand.md headless examples for consistency.
The comment about headless extension support is already consistent between browser-automation.md and playwright.md (both have identical inline notes). However, stagehand.md's headless examples (lines 246, 269, 283, 297) lack this clarification despite stagehand using Playwright underneath. Add the same comment to stagehand.md's code examples to prevent user confusion: headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions
🤖 Prompt for AI Agents
In @.agent/tools/browser/browser-automation.md at line 333, Add the same
clarifying inline comment to each headless example in stagehand.md where the
option 'headless: false' appears (the examples around the headless settings at
the occurrences corresponding to lines ~246, ~269, ~283, ~297 in the diff);
update each 'headless: false' line to include the comment " // Extensions may
require headed mode in older Chromium; new headless (--headless=new) supports
extensions" so the stagehand examples match the comments used in
browser-automation.md and playwright.md.
…mples Address CodeRabbit feedback: add consistent inline comment about headless extension support to all custom browser examples in stagehand.md, matching browser-automation.md and playwright.md.
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Jan 27 13:50:58 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.agent/tools/browser/stagehand.md:
- Around line 260-311: Remove the three inline custom browser engine examples
from .agent/tools/browser/stagehand.md and replace them with a single
authoritative cross-reference to
browser-automation.md#custom-browser-engine-support; specifically, delete the
Brave/Edge/Chrome blocks that demonstrate Stagehand({ ..., browserOptions: {
executablePath: ... } }) and instead add a short sentence like "See
browser-automation.md#custom-browser-engine-support for Stagehand-specific
browserOptions (executablePath, args, extensions, enterprise SSO)". Also
consolidate the repeated headless-mode comment (the lines referencing headed vs
new headless support) into one brief note placed before the reference or remove
it if that info exists in the referenced section; ensure references mention
Stagehand, browserOptions, and executablePath so readers can locate the exact
config example in the authoritative doc.
| ### Custom Browser Engine (Brave, Edge, Chrome) | ||
|
|
||
| Stagehand uses Playwright underneath, so you can pass `executablePath` via `browserOptions` to use a custom browser: | ||
|
|
||
| **Brave** - built-in ad/tracker blocking via Shields: | ||
|
|
||
| ```javascript | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", | ||
| headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions | ||
| browserOptions: { | ||
| executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser', | ||
| }, | ||
| modelName: "gpt-4o", | ||
| modelClientOptions: { apiKey: process.env.OPENAI_API_KEY } | ||
| }); | ||
| ``` | ||
|
|
||
| **Edge** - enterprise SSO, Azure AD integration: | ||
|
|
||
| ```javascript | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", | ||
| headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions | ||
| browserOptions: { | ||
| executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', | ||
| }, | ||
| modelName: "gpt-4o", | ||
| modelClientOptions: { apiKey: process.env.OPENAI_API_KEY } | ||
| }); | ||
| ``` | ||
|
|
||
| **With uBlock Origin extension**: | ||
|
|
||
| ```javascript | ||
| const stagehand = new Stagehand({ | ||
| env: "LOCAL", | ||
| headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions | ||
| browserOptions: { | ||
| executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', | ||
| args: [ | ||
| '--load-extension=/path/to/ublock-origin-unpacked', | ||
| '--disable-extensions-except=/path/to/ublock-origin-unpacked', | ||
| ], | ||
| }, | ||
| modelName: "gpt-4o", | ||
| modelClientOptions: { apiKey: process.env.OPENAI_API_KEY } | ||
| }); | ||
| ``` | ||
|
|
||
| **Browser paths**: See `browser-automation.md` for full path reference (macOS, Linux, Windows). | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Search for Stagehand example files or implementation files
fd -E node_modules -E dist "stagehand" -t f | head -20Repository: marcusquinn/aidevops
Length of output: 603
🏁 Script executed:
# Search for files containing executablePath configuration examples
rg -l "executablePath" --type md --type js --type tsRepository: marcusquinn/aidevops
Length of output: 211
🏁 Script executed:
# Check browser-automation.md to see what it references
fd "browser-automation.md" -t f | xargs catRepository: marcusquinn/aidevops
Length of output: 30476
🏁 Script executed:
# Look for any example or demo files in the agent directories
find .agent -name "*example*" -o -name "*demo*" -o -name "*sample*" 2>/dev/nullRepository: marcusquinn/aidevops
Length of output: 142
🏁 Script executed:
# Check the full structure of .agent/tools/browser directory
ls -la .agent/tools/browser/ 2>/dev/null || echo "Directory not found"Repository: marcusquinn/aidevops
Length of output: 1921
🏁 Script executed:
cat -n .agent/tools/browser/stagehand-examples.md | head -100Repository: marcusquinn/aidevops
Length of output: 3770
🏁 Script executed:
# Search for executablePath or custom browser examples in stagehand-examples.md
rg "executablePath|Brave|Edge|Chrome" .agent/tools/browser/stagehand-examples.md -A 3 -B 1Repository: marcusquinn/aidevops
Length of output: 387
🏁 Script executed:
# Check if browser-automation.md contains similar custom browser engine examples
rg "executablePath|Custom Browser Engine|Brave|Edge" .agent/tools/browser/browser-automation.md -A 5 -B 2 | head -80Repository: marcusquinn/aidevops
Length of output: 4394
Move custom browser engine examples to .agent/tools/browser/browser-automation.md and reference from stagehand.md instead.
The coding guidelines require inline code examples to be "authoritative" or use file:line references. These three examples (Brave, Edge, Chrome with executablePath) are illustrative configurations already documented in browser-automation.md:355-430 under "Custom Browser Engine Support."
Instead of duplicating ~45 lines inline, stagehand.md should reference the authoritative section: "See browser-automation.md#custom-browser-engine-support for Stagehand-specific browserOptions configuration with browser paths and enterprise integration patterns."
Additionally, the identical headless mode comments (lines 269, 283, 297) should be consolidated into a single note before the examples, or removed entirely if referencing the external section.
This follows the progressive disclosure pattern and keeps configuration patterns synchronized across documentation.
🤖 Prompt for AI Agents
In @.agent/tools/browser/stagehand.md around lines 260 - 311, Remove the three
inline custom browser engine examples from .agent/tools/browser/stagehand.md and
replace them with a single authoritative cross-reference to
browser-automation.md#custom-browser-engine-support; specifically, delete the
Brave/Edge/Chrome blocks that demonstrate Stagehand({ ..., browserOptions: {
executablePath: ... } }) and instead add a short sentence like "See
browser-automation.md#custom-browser-engine-support for Stagehand-specific
browserOptions (executablePath, args, extensions, enterprise SSO)". Also
consolidate the repeated headless-mode comment (the lines referencing headed vs
new headless support) into one brief note placed before the reference or remove
it if that info exists in the referenced section; ensure references mention
Stagehand, browserOptions, and executablePath so readers can locate the exact
config example in the authoritative doc.
Replace three separate Brave/Edge/Chrome examples with one consolidated example and cross-reference to browser-automation.md for full paths and additional browsers. Follows progressive disclosure pattern.
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Jan 27 13:57:46 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
Changes
browser-automation.md (central guide)
browser-prefs.json) for AI agents to ask usersplaywright.md
dev-browser.md
BROWSER_EXECUTABLEenv varstagehand.md
browserOptions.executablePath--load-extensioninbrowserOptions.argsplaywriter.md
crawl4ai.md
BrowserConfigexampleschrome_channelvalues:chrome,msedge,brave,chromiumbrowser_pathfor explicit executable pathSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.