aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--skills/pi-browser-harness/SKILL.md2
-rw-r--r--src/domains/readpage/read-page.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/skills/pi-browser-harness/SKILL.md b/skills/pi-browser-harness/SKILL.md
index e3bf7dc..a5ca4ca 100644
--- a/skills/pi-browser-harness/SKILL.md
+++ b/skills/pi-browser-harness/SKILL.md
@@ -41,6 +41,8 @@ Pass `@(x,y)` from `browser_snapshot` straight to `browser_click`. No screenshot
`browser_web_search` and `browser_read_page` each run in their own isolated tab and never touch the user's current tab. Pair them for a research question: search for candidate URLs, then read the promising ones.
+`browser_read_page` runs a reader-mode heuristic: JS-rendered pages (X, social SPAs, login walls) can come back as a short nav shell — if the result is tiny or reads like chrome, don't treat it as the page; re-read the `og:title`/`og:description` meta or pull the content with `browser_execute_js` (e.g. `document.querySelector('article')?.innerText`).
+
## Connection Setup
Browser control is **on-demand** — the daemon does NOT start automatically.
diff --git a/src/domains/readpage/read-page.ts b/src/domains/readpage/read-page.ts
index 744a5ce..9291614 100644
--- a/src/domains/readpage/read-page.ts
+++ b/src/domains/readpage/read-page.ts
@@ -158,7 +158,7 @@ export const readPageTool = defineBrowserTool({
promptSnippet: "Read a page's main content as clean text",
promptGuidelines: [
"Returns readable main-article text — use this over browser_snapshot/browser_execute_js when you want an article's content for reading or research.",
- "Boilerplate-heavy or structure-less pages fall back to bounded body text rather than erroring.",
+ "If the result is short or reads like a nav shell (e.g. JS-rendered social pages like X, login-walled pages), extraction likely ran before the app rendered or missed the content — do NOT treat the shell as the page. Re-read via og:title/og:description, or use browser_execute_js with an article/content selector.",
],
parameters: ReadPageArgs,
concurrency: "parallel",