AGENT SKILL

多模型网页咨询与评审

web-advice

使用 ChatGPT、Gemini 和 Perplexity Web 进行基于浏览器的多模型咨询与评审。适用于就任意主题(包括 PR、设计、文档、方案和决策)获取独立的外部视角。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 6
Forks
0

01 前言 Front Matter

name
web-advice
description
Browser-based multi-model advice and review using ChatGPT, Gemini, and Perplexity Web. Use for an independent external perspective on any subject, including PRs, designs, docs, plans, and decisions.

02 资源文件 12

03 SKILL.md 正文

/web-advice — Multi-Model Browser Review

/web-advice queries independent web LLMs (ChatGPT, Gemini, and Perplexity when available) through their web UIs in an authorized, task-owned browser context, then synthesizes their advice. It can review or advise on any user-supplied subject: code and PRs, designs, documents, plans, decisions, research questions, UX, and operational proposals. This is different from /advice, which collects two independent reviewer votes (normally the Codex and Opus CLIs, with Dot, Hermes, web-advice and static-reviewer fallbacks), with /research nonvoting.

Skill Mechanism When to use
/advice In-session: Codex + Opus CLI votes (/research nonvoting) Architectural reasoning, ZFC reviews, code-path analysis
/web-advice Browser: ChatGPT + Gemini + Perplexity Web; Aside in background mode on an agent-owned profile for the logged-in vendor sites; isolated headless otherwise Independent external multi-model advice or review; visual/video context; web-search grounding
/er In-session: evidence-standards skill Evidence bundle integrity (4-gate checksum/SHA/real-services)

Real-Browser Transport Contract: Runtime-Specific

Runtime boundary: Follow the portable browser and sharing boundary in hosted/cloud runtimes. The host-specific routes and helper commands below apply only where the current runtime supports them and the task authorizes them; they grant no access. In a supported cloud browser, record the actual browser tool and observed per-seat state rather than requiring an unavailable local helper. Never classify a supported browser as unavailable solely because Aside or a local helper is absent. Preserve the authentication, packet, response, and two-provider quorum gates.

[!IMPORTANT] Zero Aside Inference Invariant (Strict Hard-Fail Rule): /web-advice MUST use browser navigation and DOM automation against the real vendor web-chat sites. In an interactive chat app, prefer that app's owned built-in browser and create a new vendor chat when its browser context is separately task-owned. In a coding CLI or Bash run, use Aside in background mode on an agent-owned profile (aside-browser-default § Background mode) for the logged-in vendor sites; isolated headless Chromium otherwise. Follow the browser-control contract for browser ownership and authentication: never attach to personal/default Chrome or use its profile or cookies. Cookie transfer requires explicit current-task authorization for exactly one named agent-owned source, using the guarded lifecycle in browser-control. If no authorized authenticated route is available, report the affected seat as unavailable instead of switching to a personal browser.

NEVER use Aside inference (aside "..." NL agent, aside --effort ultrabrowse, aside exec, aside exec -m <model>, or Aside's backend AI models). Aside inference consumes Aside's token quota / usage limits and does NOT use the operator's web chat subscriptions. The purpose is to review through the authenticated vendor web-chat accounts and subscriptions available in the authorized task-owned context.

Transport routing:

  • In an interactive app, use its supported browser in a separate task-owned context; aside_mcp or aside_repl is usable in background mode on an agent-owned profile (aside-browser-default § Background mode).
  • In CLI/Bash, prefer isolated headless Chromium through playwright_mcp or chrome_headless_cdp when supported; for logged-in reviewer sites use aside_repl in background mode on an agent-owned profile.
  • Credential-backed fallbacks, including chrome_headless_cookies, require the explicit, named-source authorization and guarded lifecycle in browser-control contract; this skill grants no additional access.

Aside account preflight: only after selecting a verified task-owned Aside context, run aside account list when that runtime exposes the command. The * (active) account can be signed out; this is not evidence of context ownership or of general Aside unavailability. Use a signed-in account only within the verified task-owned context, passing it as --account when that runtime supports account selection.

Each fallback must prove the affected vendor is authenticated, exposes a writable composer, returns the submitted prompt's real response, and supports the normal response/share evidence gates. A basic page render is not enough.

Banned substitutes: Provider APIs, CLI models (agy, codex CLI), Aside inference (aside exec, aside "..." NL agent), in-session subagents, and WebSearch/WebFetch synthesis remain strictly banned. If no approved real-browser seat remains reachable, report every observed transport failure and stop /web-advice; do not launch or relabel an inference substitute.

Before opening tabs and again before labeling output /web-advice, validate the selected route where the local transport validator applies, and record its output. For a browser fallback, use its observed fallback reason, for example: python3 ~/.claude/skills/web-advice/scripts/web_advice_transport.py assert-transport playwright_mcp --fallback-reason aside_unavailable. The validator does not establish browser ownership or cookie authorization; cookie transport remains subject to the explicit named-source rule above. If Aside can browse but cannot visibly attach the packet after one clean-chat retry, use the literal fallback reason aside_upload_unavailable.

For CLI/Bash execution, the direct runner starts a clean Chrome context and uses vendor-specific upload controls. It records authentication, attachment chips, submission, packet echo, and response separately; a response missing the requested head SHA or any requested filename is not a completed seat.

Use /web-advice when an external multi-model perspective will help, especially when you want different model families to challenge a conclusion or when external web standards matter (e.g., D&D 5e SRD, Stately XState, industry patterns). Target three models (ChatGPT, Gemini, Perplexity), but synthesize the models that are available and disclose any coverage gap.


Pre-Flight Checklist (run BEFORE opening any browser)

Step 0a — Identify and ground the subject

# For a PR: identify the live head.
gh pr view <N> --json number,title,headRefName,headRefOid,state,url

# For an evidence bundle or production claim: locate the evidence.
ls -la docs/pr<N>-evidence/ 2>/dev/null
cat docs/pr<N>-evidence/metadata.json 2>/dev/null | python3 -m json.tool

Use the evidence appropriate to the subject: current diff and tests for a PR, the actual document for a document review, or stated assumptions and constraints for a plan or decision. Evidence is not a universal /web-advice gate.

Step 0b — Verify evidence only when it is part of the request

Run the /er 4-gate check only when an evidence bundle or production claim is in scope—for example, when the advice must assess real-service proof or decide whether a bundle supports a production conclusion.

Require an applicable /er verdict, retaining the original tested/reviewed SHAs and a reasoned candidate-delta assessment. Invoke /er <bundle path or PR> only for missing or affected coverage, not solely to restamp a changed SHA. Do not replace /er with a partial checksum, file-existence, or metadata check: those checks do not establish the verifier verdict, claim coverage, or provenance.

If that verification fails, fail closed for the evidence or production claim: do not present it as verified, and regenerate it or run /er before relying on it. The broader code, design, document, or plan review may still proceed if its scope is clearly separated from the unverified claim.

Step 0c — Build the review prompt & context packet (MANDATORY)

For code, patch, and PR reviews, you MUST generate and upload the complete lossless review packet:

  1. Raw Git Diff: Exact unified diff against base branch (git diff origin/main...HEAD > raw_git_diff.patch or build_review_packets.py).
  2. Full Changed Files: Complete source files at HEAD for every touched file (full_changed_files.txt or build_review_packets.py output).
  3. Full Evidence Manifest: Test results, telemetry logs, or evidence bundles when applicable.

[!CAUTION] Private Repository Anti-Guesswork Invariant: Never submit a bare PR URL or a 5-line summary for private repositories. Web models operate in external sandboxes without repository credentials, receive HTTP 404, and will fail or fabricate assumptions. You MUST attach or upload the raw diff patch and full source files so the models perform genuine line-by-line AST and concurrency analysis.

Packet size budget (per seat). Full-file packets for PRs touching very large modules fail on Gemini and Perplexity web uploads. Observed 2026-10-04: a 779 KB full_changed_files.txt (two 236–394 KB modules) got Gemini's generic "I'm having a hard time fulfilling your request" and a Perplexity upload failure, while ChatGPT read it. Keep each Gemini/Perplexity seat at or under ~300 KB total. When the full packet exceeds that, attach to those seats a function-context packet instead of the whole-file dump, and disclose the substitution in the synthesis:

# Whole enclosing function/class for every hunk; keeps line-level review
# possible without uploading untouched parts of huge modules.
git diff -W --no-color origin/main...HEAD -- <production paths> > function_context.patch
git diff --no-color origin/main...HEAD -- <tests/docs paths> > supporting.patch

Still list every changed file with its HEAD sha256 in the prompt so COVERAGE can be checked. If the function-context packet alone still exceeds the budget, split it across two submissions in the same chat (production first) rather than dropping files. ChatGPT may receive the full packet.

Build a concise prompt before opening the browser so you can paste the same request to each model. Include only the sections that apply.

Conversation Titling Invariant: Every /web-advice review prompt and follow-up MUST start with the prefix [web advice] and instruct the model to title the conversation with [web advice] <Subject> so automated review threads in ChatGPT, Gemini, and Perplexity sidebar histories are clearly titled and distinguishable from normal personal conversations.

[web advice] You are an independent expert advising on a [PR | patch | design | document | plan | decision | research question | other]. Title this conversation starting with "[web advice] <Subject>".

**Subject**: [web advice] [subject description]
- Type: [subject type]
- Identifier: [URL | path | concise question]
- Branch / Commit: [<branch> @ <sha>]
- Working directory: <absolute path>

**Attached Files / Context** (upload full files; do not truncate):
- `raw_git_diff.patch`: Exact unified diff of the PR against base branch.
- `full_changed_files.txt`: Complete source text for all changed files at HEAD.
- <relevant tests and evidence manifests>

**Review dimensions** (pick what applies):
1. Architectural soundness (state-machine compliance, ZFC consumer split, layer isolation)
2. Edge case safety (concurrent writes, time freeze, god mode, modal locks)
3. Evidence integrity and production-claim support (only if an evidence bundle or production claim is in scope)
4. Test coverage (structural vs rendered-text, multi-turn vs single-shot)
5. Web standards alignment (cite external sources)

**Required output format** (verbatim):
VERDICT: APPROVED | APPROVED with notes | CHANGES REQUESTED | REJECTED
REASONING: 3-4 sentences quoting specific files and lines from the attachments
RISK: main risk, one sentence
CONFIDENCE: high | medium | low
COVERAGE: exact filenames from the attached packet actually read; write `none` if unavailable
WEB SOURCES: 1-3 URLs with one-line summaries (if you cited any)

The prompt should be materially the same for each model; adapt only for a model's input limits or required UI format.


Browser Execution Protocol

First follow the browser-control route: the logged-in vendor sites use Aside in background mode on an agent-owned profile (aside-browser-default § Background mode); isolated headless Chromium otherwise. Use the examples below only in such a verified Aside context; apply the same selectors and evidence checks to a Playwright Page when the supported isolated fallback is selected.

Step 1 — Open 3 tabs

// In aside-mcp repl (mcp__aside-mcp__repl tool)
await openTab('https://gemini.google.com/app');
await openTab('https://chatgpt.com/');
await openTab('https://www.perplexity.ai/');

const allTabs = await listBrowserTabs();
console.log('opened:', allTabs.length, 'tabs');
for (const t of allTabs) console.log(' -', t.title, '(', t.url, ')');

For a verified task-owned Aside context, expected output is 4 tabs (its current tab plus 3 new vendor tabs). An isolated fallback may use separate pages or contexts, but must report the selected transport and the per-vendor authentication result.

Step 2 — Verify auth state (CRITICAL)

// Attach to each tab and check login state
const tabs = await listBrowserTabs();
const gemTab = tabs.find(t => t.title === 'Google Gemini');
const gemPage = await attachBrowserTab(gemTab.targetId);
const gemSnap = await snapshot(gemPage);
// Inspect positive account identity AND a writable composer in gemSnap.
// Absence of login text alone is not authentication proof.
console.log('Gemini authentication evidence:', gemSnap.tree);

Repeat for ChatGPT and Perplexity. Require positive account identity and a writable composer; an anonymous composer or absence of login text is insufficient. Record signed-out seats as UNAVAILABLE (login). Do not perform an agent-driven sign-in, replay credentials, or bypass consent/MFA. An interactive caller may request human login only when the caller and runtime permit it; cookie transfer follows the explicit named-source rule in browser-control. A non-interactive caller such as /sq records the blocker without pausing for login and continues independent authorized work. Login-state indicators to inspect (not substitutes for positive account evidence):

  • Gemini: Logged in shows "Google Account: <email>" in the sidebar
  • ChatGPT: Logged in shows "Log in" button HIDDEN; prompt textbox visible. Heads up: ChatGPT may show the marketing landing page ("Where should we begin?") with a "Log in" button even when a session cookie exists, depending on cookie state. A visible "Sign up for free" with "Log in" indicates a signed-out page. A missing textbox alone does not prove logout; inspect loading/error state first. Follow the caller-aware login handling above.
  • Perplexity: Verify the signed-in account identity and writable composer. Prior chats support the observation but are not required; an empty history alone does not prove logout.

If the user can't log in to one model, run /web-advice with the others as long as at least two providers remain authenticated (2-of-3 still satisfies the multi-model adversarial requirement when the two models are from different families) and note the gap in the synthesis. If fewer than two providers are authenticated, stop the multi-model review and report the unmet quorum, following the caller-aware login handling above. Do NOT try to log in for them or substitute anonymous reviews, APIs, CLI models, or internal agents.

Step 2b — Create a clean chat and prove packet attachment (MANDATORY)

Create a new or temporary chat for each seat. Inspect the composer before the chooser opens: a stale draft or unrelated attachment invalidates the attempt. For aside repl, keep one interactive REPL process alive through staging, attachment verification, and submission. Start aside repl once, then run console.log(pwd) inside it to discover the active session directory. Copy the complete packet into a subdirectory of that exact path from the local shell while the REPL stays open; run the upload calls in that same REPL. A separate aside repl "..." invocation creates a different session: paths discovered by an earlier invocation cannot be reused. If the process restarts, rediscover pwd and restage the packet. Aside rejects upload paths outside the active session directory. Never replace a failed upload with a bare URL.

Prefer the composer's supported locator.fill(prompt) operation, including contenteditable composers where available. Before sending, read back the complete composer text (inputValue() for input/textarea or innerText() for contenteditable) and compare it with the prepared prompt, including its prefix, final instruction, and total length. Successful keyboard.type() completion does not prove the full prompt arrived. If text is partial or duplicated, clear the composer, re-enter the complete prompt, and verify it again before submission; do not send the partial draft. Capture the verified prompt and every exact rendered attachment filename in the same pre-submit state. A clipped preview or matching prefix alone is insufficient. These checks also apply when using a persistent Aside MCP session.

The only successful upload state is every exact packet filename rendered by the composer. A no-exception set_input_files() result, local file size, a thumbnail, or truncated body text is not proof. The cookie-backed headless runner is a credential-bearing fallback, not a default. Use it only when the current task explicitly authorizes cookie transfer from exactly one named agent-owned source; then follow the guarded decrypt/inject lifecycle in the browser-control contract. If used, create a fresh storage-state file for each run (Google signs a reused Gemini snapshot out after one use):

# Resolve scratch directory via ~/.claude/skills/scratch-space/SKILL.md
SCRATCH_DIR="$(~/.claude/skills/scratch-space/scripts/scratch-dir.sh "web-advice")"
# Or allocate a managed evidence directory: diskm scratch-new <repo-path> web-advice --kind evidence

python3 ~/.claude/skills/web-advice/scripts/playwright_cookie_driver.py \
  --site chatgpt --storage-state "${SCRATCH_DIR}/chatgpt-storage.json" \
  --prompt-file "${SCRATCH_DIR}/review-prompt.md" \
  --attachment "${SCRATCH_DIR}/packets/PR_<N>_FULL_CODE_FILES.txt" \
  --attachment "${SCRATCH_DIR}/packets/PR_<N>_BASE_CODE_FILES_AND_DIFF.txt" \
  --output "${SCRATCH_DIR}/chatgpt-review-report.json"

Require assert_packet_attachments_verified(manifest, report) to pass before sending or recording a verdict. If the UI disables uploads, requests an upgrade, or the rendered-name set is incomplete, retain the literal vendor reason and retry only once in a clean chat.

Step 3 — Attach full-context packets & submit prompt to each model (sequentially, not parallel)

Submit one model at a time. Submitting in parallel can hit rate limits or trigger captchas. Wait for each response before submitting the next. For Gemini, select Gemini 3.8 Flash or later; never select a Gemini Pro model.

Response waits: Gemini 3.8 Flash and ChatGPT/Perplexity reasoning modes routinely take 3–10 minutes on a full packet. Poll until the stop/streaming control disappears, bounded by the default 1800-second (30-minute) per-attempt limit in ~/.claude/skills/pr-lifecycle/SKILL.md § Reviewer timeout and completion (an explicit user-specified limit governs that attempt, whether shorter or longer; otherwise the 30-minute default applies. A later specific user instruction to await a named reviewer overrides this deadline for that requested attempt, even without a numeric duration); on timeout record TIMED_OUT and continue the lifecycle fallback. A single aside repl script that exits after ~60 s loses the answer and the chat URL. Record the conversation URL immediately after submission.

Shared review composition and scheduling follows ~/.claude/skills/pr-lifecycle/SKILL.md: freeze one candidate/base and shared factual scope, run independent review groups concurrently where permitted, and collect findings before batching fixes. The vendor submissions below remain sequential; full-change coverage, upload, authentication, and quorum rules are unchanged.

[!IMPORTANT] Mandatory Code & Evidence Artifact Attachment Pattern (Zero Truncation / Full Grounding): For any PR or code review, you MUST attach:

  1. raw_git_diff.patch: Exact unified diff of the PR against base branch.
  2. full_changed_files.txt: Complete source text for all changed files at HEAD, or the disclosed function-context and supporting packets specified by the per-seat size budget above. Account for every changed file in coverage.
  3. All Evidence Artifacts: Visual screenshot PNGs/GIFs (from test output / unlisted gist URLs per /es), DOM measurement files (readout.json), test execution transcripts, and /es evidence bundles (.hermes-tasks/*-evidence.md). Never substitute an inlined diff summary or omit visual/runtime artifacts when claiming evidence-backed review.

Aside Session Staging Rule: For aside repl / aside-mcp, files MUST be staged inside the active Aside session directory (pwd, e.g. path.join(pwd, 'pr<N>', filename)). Aside strictly rejects paths outside the session directory (escapes the session directory). Copy all packet files and evidence artifacts into path.join(pwd, ...) before calling setInputFiles.

Illustrative Playwright pattern: inspect the current provider's composer and attachment-chip DOM first, configure its provider name, and replace the selector below. This template assumes the existing modelPage and Aside pwd; it is not proof that any provider was exercised. Unsupported selectors or upload APIs must stop the seat, not become an attachment-grounded verdict.

// Run this block in the existing session; local declarations avoid REPL clashes.
{
const path = await import('node:path');
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const provider = 'REPLACE_WITH_INSPECTED_PROVIDER';
if (!['chatgpt', 'gemini', 'perplexity'].includes(provider)) {
  throw new Error('Inspect and configure the provider before upload');
}
const attachmentChipSelector = 'REPLACE_WITH_INSPECTED_COMPOSER_ATTACHMENT_CHIP_SELECTOR';
if (attachmentChipSelector.startsWith('REPLACE_')) {
  throw new Error('Inspect and configure the composer attachment-chip selector before upload');
}
// 1. For each model tab (Gemini, ChatGPT, Perplexity):
// Step 3a: Stage and attach lossless review packets + evidence artifacts via file input
// In Aside: stage inside pwd first from scratch-dir.sh (see ~/.claude/skills/scratch-space/SKILL.md):
// cp "$(~/.claude/skills/scratch-space/scripts/scratch-dir.sh "web-advice")/packets/pr<N>/"* ${pwd}/pr<N>/
const uploadFiles = [
  path.join(pwd, 'pr<N>', 'raw_git_diff.patch'),
  path.join(pwd, 'pr<N>', 'full_changed_files.txt'),
  // Include all evidence artifacts (images, json readouts, test logs, manifests):
  path.join(pwd, 'pr<N>', 'evidence_readout.json'),
  path.join(pwd, 'pr<N>', 'after_desktop_1400.png'),
  path.join(pwd, 'pr<N>', 'after_mobile_390.png'),
];

const fileInput = await modelPage.locator('input[type="file"], #upload-files').first();
await fileInput.setInputFiles(uploadFiles);
const expectedNames = uploadFiles.map((f) => path.basename(f));
const uploadDeadline = Date.now() + 120000;
let attachmentProof = false;
while (Date.now() < uploadDeadline) {
  const chipTexts = await modelPage.locator(attachmentChipSelector).allTextContents();
  const renderedNames = new Set(chipTexts.flatMap((text) => text.split(/\r?\n/).map((line) => line.trim())));
  if (expectedNames.every((name) => renderedNames.has(name)) &&
      !chipTexts.some((text) => /Uploading|Processing|Failed|Error/i.test(text))) {
    attachmentProof = true;
    break;
  }
  await sleep(500);
}
if (!attachmentProof) {
  throw new Error('Incomplete or unfinished attachment packet; do not send');
}

// Step 3b: Replace the complete composer content and verify it before sending.
const reviewPrompt = `[web advice] <your review prompt citing attached code files AND evidence artifacts>`;
const textbox = await modelPage.locator('div[aria-label="Enter a prompt for Gemini"], #prompt-textarea, [role="textbox"]').first();
await textbox.fill(reviewPrompt);
await sleep(1000);
const composerReadback = await textbox.inputValue().catch(() => textbox.innerText());
if (composerReadback !== reviewPrompt) {
  throw new Error('Composer content differs from the complete review prompt; do not send');
}

// Step 3c: Submit (Click Send button for ChatGPT/Gemini, or Press Enter for Perplexity)
const sendBtn = await modelPage.locator('button[aria-label="Send prompt"], button[aria-label="Send message"], button[aria-label="Send"], button[data-testid="send-button"]').last();
if (await sendBtn.isVisible()) {
  if (!await sendBtn.isEnabled()) {
    throw new Error('Send button is disabled; do not submit');
  }
  await sendBtn.click();
} else if (provider === 'perplexity') {
  await modelPage.keyboard.press('Enter');
} else {
  throw new Error('No visible provider send control; do not submit with Enter');
}
}

Gotcha — duplicated text: If a prior prompt was inserted via el.innerText = ..., the textbox may show duplicated content. Always clear with Cmd+A + Backspace BEFORE typing the new prompt:

await textbox.click();
await gemP.keyboard.press('Meta+A');
await gemP.keyboard.press('Backspace');
await new Promise(r => setTimeout(r, 500));

Gotcha — TrustedHTML errors: Don't use el.innerHTML = ...; Gemini's textbox uses Trusted Types. Use the composer’s supported fill() or typing operation, then verify the complete text as required in Step 2b; typing can silently truncate.

Gotcha — ChatGPT send: ChatGPT requires clicking the send button, NOT pressing Enter. Its accessible name has changed over time (Send prompt, Send message, and as of 2026-10 plain Send); locate it with button[aria-label*="Send"], button[data-testid="send-button"] and click the LAST match (the composer's), then confirm the URL changed to chatgpt.com/c/<id> or the message echo appears.

Perplexity (proven working pattern):

// Perplexity textbox is a DIV with role="textbox" — NOT a <textarea>
// Selector that works: [role="textbox"]
const perpPrompt = `[web advice] <your 4-section review prompt>`;
const perpTabs = await listBrowserTabs();
const perpTab = perpTabs.find(t => t.title === 'Perplexity');
const perpPage = await attachBrowserTab(perpTab.targetId);
const textbox = await perpPage.locator('[role="textbox"]').first();
await textbox.click();
await perpPage.keyboard.type(perpPrompt, {delay: 3});
const perpReadback = await textbox.inputValue().catch(() => textbox.innerText());
if (perpReadback !== perpPrompt) {
  throw new Error('Composer content differs from the complete review prompt; do not send');
}
await perpPage.keyboard.press('Enter');  // Enter submits; no separate button click
console.log('sent to Perplexity');

Perplexity upload gate (2026-10-02 failure mode): setInputFiles on the first hidden input[type="file"] can render all composer chips and yet Perplexity's answer may say the attachments are "not available in this chat context" (it ran Search mode over the prompt without reading the files). Treat a verdict that says the attachments were unavailable as no verdict. Before submitting, wait until every chip is present AND no Uploading/Processing text remains, then wait a further ~15 s; after the answer, check that COVERAGE lists the packet filenames. If a fresh tab yields 0 chips twice, record the seat as UNAVAILABLE (upload) and move on; do not count the Search-only answer.

Perplexity quirks:

  • Textbox is a DIV with role="textbox" and no aria-label — use the role selector, not the aria-label pattern
  • After response, the new textbox ref changes (Perplexity regenerates the textbox element); always re-snapshot to get the fresh ref before the next prompt
  • Perplexity answers include a Sources accordion (collapsed by default) and a Pro badge; responses are typically citation-rich — useful for "cite your web sources" requirements
  • Perplexity defaults to "Search" mode (web-grounded); for code-only review, switch to "Reasoning" mode via the model selector button before submitting

Step 4 — Capture responses

// For each model, after the response finishes (look for the "regenerate" / "thumbs up" footer)
const respSnap = await snapshot(modelPage);
const respText = respSnap.tree;
// Parse for VERDICT:, REASONING:, RISK:, CONFIDENCE:, COVERAGE:
const verdictMatch = respText.match(/VERDICT:\s*([^\n]+)/);
const reasoningMatch = respText.match(/REASONING:\s*([^\n]+(?:\n[^\n]+){0,3})/);
const coverageMatch = respText.match(/COVERAGE:\s*([^\n]+)/);
console.log('verdict:', verdictMatch?.[1]);
console.log('reasoning:', reasoningMatch?.[1]);
console.log('coverage:', coverageMatch?.[1]);

Models don't always format in the exact section headers. If the regex misses, look for the verdict line in the visible response:

  • Gemini 3.8 Flash: Structured output, "Copy code" button visible, response in dedicated region
  • ChatGPT: Most conversational, may not return structured output unless explicitly reminded
  • Perplexity: Citation-rich, "Sources" accordion; "Helpful"/"Not helpful" footer; verdict usually at the end

Parser fallback if structured regex fails — re-prompt the model with: "Reply with ONLY this exact format (no other text): VERDICT: <one line> | REASONING: <one line> | RISK: <one line> | CONFIDENCE: high/med/low | COVERAGE: <material actually read, or none>". This is the most reliable cross-model pattern.

Step 4b — Interactive Follow-up & Clarification Loop (MANDATORY)

Web chat LLM review sessions are stateful and interactive, not single-turn scripts:

  • If a model responds with questions, requests additional files, or asks for clarification on an unattached caller or dependency:
    1. Do NOT terminate early or report an inconclusive verdict: The review is still actively in flight.
    2. Locate the requested context: Extract the relevant files, function definitions, or caller paths from the workspace.
    3. Reply in the active chat thread: Type/upload the requested code or explanation only in the selected, verified task-owned browser context.
    4. Wait for re-evaluation: Allow the model to re-analyze the updated context and render its finalized, fully grounded verdict.

Step 5 — Synthesize & Report Share URLs / Snippets (MANDATORY)

[!IMPORTANT] Mandatory Receipt & Verbatim Conversation Snippet Invariant (Strict Hard-Fail Rule): Every /web-advice run MUST output:

  1. File Upload Confirmation: Confirm that full files, diff patches, or real video/image assets were uploaded via file chooser (setInputFiles) into composer chips (zero ungrounded diff-only inlining for code reviews).
  2. Conversation receipts and authorized links: Record the exact observed conversation URL and retain a private local response receipt. Creating public share links requires separate authorization under Step 6 and the portable sharing boundary; otherwise report not published (not authorized) without invalidating a grounded verdict. A private chatgpt.com/c/... conversation URL is not a public share. Never create or test a public share merely to satisfy this receipt gate.
  3. Verbatim Conversation Snippets per PR / Subject: Exact blockquotes of the model's verdict and analysis per reviewed PR or artifact to provide undeniable proof of review execution.
## /web-advice synthesis

| Model | Verdict | Confidence | Conversation receipt / authorized link | Coverage & Upload Confirmation | Key finding |
|---|---|---|---|---|---|
| ChatGPT | <verdict> | high/med/low | <conversation receipt or authorized link> | Files uploaded & confirmed | <one line> |
| Gemini 3.8 Flash | <verdict> | high/med/low | <conversation receipt or authorized link> | Files uploaded & confirmed | <one line> |
| Perplexity | <verdict> | high/med/low | <conversation receipt or authorized link> | Files uploaded & confirmed | <one line> (note: web-grounded) |

### Verbatim Conversation Snippets per PR / Subject:
#### 1. [Subject / PR #N]
- **ChatGPT**: `<verbatim quote of verdict & key findings>`
- **Gemini**: `<verbatim quote of verdict & key findings>`
- **Perplexity**: `<verbatim quote of verdict & key findings>`

**Convergence:** <3-of-3 agree / all 3 agree / 2-1 split / other>
**Recommended action:** <APPROVE / approve with conditions / change requests>
**Open web sources cited:** <list URLs from Perplexity + any model that cited external standards>

Decision rule: 3-of-3 agreement is sufficient (or 2-of-3 if both verdicts strongly converge). 2-of-3 is acceptable when the two models are from different model families. If all 3 diverge, surface the disagreement to the user and ask which axis (speed / safety / cost) matters most. Perplexity's web grounding often breaks ties by surfacing external standards (D&D 5e SRD, RFC, etc.) that the other models lack.

Step 6 — Save the verdict and publish to an authorized destination

Every /web-advice run that produces a synthesis must save a durable, self-contained local record. Publish only when the current user request or repository policy authorizes the destination and disclosure of the reviewed material. An unlisted gist is link-accessible, not private storage. For private code or account details, retain the complete record locally and publish only a reviewed, authorized summary. If publication is not authorized, report the local receipt and the publication limitation; do not upload model snippets or edit a PR. The following publication steps apply only within that authorization.

  • Subject is a PR: publish the authorized synthesis receipt, then update the PR's ## Review Gate Ledger with a self-contained /web-advice round record containing the exact reviewed SHA, phase, verdict, findings, applicability, and sanitized receipt URL. Preserve earlier round records and visual evidence. Place the ledger after the human-readable sections and before the final ## Advice Approval section; never append review metadata after Advice Approval, replace the PR body, or imply an approval that was not issued. Run /ds on the visible human-readable portion before submitting any PR-body edit, and confirm Advice Approval remains the last section.
  • Subject is a bare ref/commit with no open PR: publish the same synthesis as an unlisted gist, then attach it as a GitHub commit comment (gh api repos/<owner>/<repo>/commits/<sha>/comments -f body="...") linking the gist. Never amend the commit message for this — that needs a separate explicit user request.
  • Do this regardless of convergence — a recorded disagreement is exactly the finding a later reader needs without re-running the review.

Failure Recovery

Renderer crash or transport timeout

A blank/loading page, Runtime.addBinding timeout, or renderer crash (for example, Aw, Snap! / error code 9) is not proof of logout. Inspect the visible page and, when permitted, reload once through the supported browser controls, then recheck account identity and composer readiness. If recovery fails, record UNAVAILABLE (renderer/transport) with the exact error and authentication state unknown. Do not loop, change credentials/security settings, or retry an access denial. This recovery does not repair a visibly signed-out account.

Aside daemon disconnects

Symptom: Task failed: fetch failed: other side closed. Aside daemon is not reachable — make sure Aside Browser is running, then retry.

Recovery:

  1. Check that the Aside Browser app is still running (not crashed)
  2. Reopen any lost tabs: await openTab('https://gemini.google.com/app') etc.
  3. Re-snapshot before each fill (refs are NOT stable across attachBrowserTab cycles)
  4. If recovery fails 3 times, probe the approved browser fallbacks. Mark a seat unavailable only after its eligible browser routes fail, and report the exact errors for each attempted route.

Captcha or rate limit

Symptom: a "I'm not a robot" or "You've reached your limit" page.

Recovery:

  1. Stop the affected model — don't retry
  2. Note the rate-limit in the synthesis
  3. Continue with the other 2 models
  4. If 2-of-3 already returned, synthesize and stop; if only one seat returned, report a single-seat result and the coverage gap without substitution

Login required

Symptom: ChatGPT shows "Log in" button; Gemini shows "Sign in to continue"; Perplexity shows "Sign in" page.

Recovery:

  1. Do not perform an agent-driven sign-in or replay credentials.
  2. Follow Step 2 caller-aware login handling: request human login only when permitted; cookie transfer follows the explicit named-source rule in browser-control; /sq records UNAVAILABLE (login) without an interactive pause.
  3. Continue with the other models
  4. If only 1 model is logged in, that's a single-model review, not multi-model — note this in synthesis

Packet upload unavailable

Symptoms: the chooser is disabled, the vendor asks for an upgrade, a file path is rejected, or the composer does not render every exact packet filename.

  1. Check the packet against the size budget in Step 0c first; an oversized packet also causes failed uploads and Gemini's generic "I'm having a hard time fulfilling your request". An upload failure is not a login failure: confirm login by the Step 1 signals before reporting a seat signed out.
  2. Start one clean temporary/new chat and retry once (with the budgeted packet if size was the cause).
  3. For an Aside session-path rejection, stage the files in that session directory.
  4. If still unavailable, do not submit a prompt or accept a verdict from that seat. Record the vendor condition; when switching from Aside to a browser fallback, use aside_upload_unavailable.

Stale evidence (verification FAIL)

Symptom: metadata.json:git_provenance.git_head ≠ PR HEAD headRefOid and the actual delta from the tested SHA touches a claim the evidence backs (per the evidence-standards Staleness Tolerance test; path category alone never decides). A SHA move whose delta leaves every tested claim, assertion, and driver intact is not stale: re-affirm at the new SHA and record both SHAs and the delta.

Recovery:

  1. Mark the evidence or production claim unverified; do not use it to support a recommendation.
  2. Update the bundle's claim/delta index; regenerate the affected proof, retaining artifacts whose validity is established with their original tested SHAs and timestamps. If impact cannot be bounded, keep potentially affected claims unverified and broaden review/testing until coverage is established; do not assume the unexamined remainder is unaffected.
  3. Obtain affected /er review before making the unsupported conclusion; reuse unaffected independent coverage by the canonical reasoned applicability assessment.
  4. Continue or repeat the broader advice only if that is useful after the evidence is fresh.

Scope notes

  • /advice remains useful when the work is best handled with in-session repository analysis.
  • /er remains the authoritative evidence-integrity workflow when a bundle or production claim must be verified.
  • /web-advice is appropriate for any subject when external, independent model input is wanted; it does not require a PR, evidence bundle, or video.

Token Budget

Step Tokens
Pre-flight + prompt build ~2K
Browser session ~5K (state management)
Per-model response ~2-3K
Synthesis ~500
Total ~13K vs ~50-100K for full advisor()

~85-90% fewer tokens than advisor() while still getting 3-model adversarial coverage.


Reference

  • Provenance: artifact ~/roadmap/2026-08-01-web-advice-and-evidence-review-guide.md (Antigravity Genesis Coder, 2026-08-01)
  • 4-gate pre-flight: ~/.claude/skills/evidence-standards/SKILL.md
  • Browser ownership and authentication: browser-control
  • Browser automation examples: references/browser-transports.md (isolated headless by default; Aside in background mode on an agent-owned profile)
  • Companion skill: /advice (in-session multi-reviewer)

04 同仓库更多 Skills

jleechanorg
jleechanorg/jleechan-skills

disk-reclaim-playbook

Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.

★ 6
jleechanorg
jleechanorg/jleechan-skills

claudea-bench

Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.

★ 6
jleechanorg
jleechanorg/jleechan-skills

pr

Alias for the canonical pr-lifecycle PR workflow skill (/pr-workflow, /prw).

★ 6
jleechanorg
jleechanorg/jleechan-skills

whisper

OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.

★ 6
jleechanorg
jleechanorg/jleechan-skills

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 6
jleechanorg
jleechanorg/jleechan-skills

pr-report

This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, /pr-report, or wants per-PR summary with delta files/lines. Generates a structured report for one or more open PRs covering purpose, files changed, +/− line counts, /code-standards + /thermo review findings, /ponytail simplification opportunities, file-overlap combination candidates, and /green status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.

★ 6