# agent-web-interface - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for agent-web-interface. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `skills/agent-web-interface/SKILL.md` Claim: `clm_0005` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `skills/agent-web-interface/SKILL.md` Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution** (Verify after install): The project contains plugin or marketplace configuration, indicating it targets install and distribution across one or more AI hosts. Evidence: `.claude-plugin/plugin.json` Claim: `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `CLAUDE.md`, `README.md` Claim: `clm_0003` supported 0.86

## How to Start

- `npx agent-web-interface install` Evidence: `README.md` Claim: `clm_0006` supported 0.86, `clm_0007` supported 0.86, `clm_0008` supported 0.86, `clm_0009` supported 0.86 et al.
- `npx agent-web-interface install --harness claude-code` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `npx agent-web-interface install --harness cursor` Evidence: `README.md` Claim: `clm_0008` supported 0.86, `clm_0011` supported 0.86
- `npx agent-web-interface install --harness vscode` Evidence: `README.md` Claim: `clm_0009` supported 0.86
- `npx agent-web-interface install --harness claude-desktop` Evidence: `README.md` Claim: `clm_0010` supported 0.86
- `npx agent-web-interface install --harness cursor,vscode` Evidence: `README.md` Claim: `clm_0011` supported 0.86
- `npx agent-web-interface install --harness all` Evidence: `README.md` Claim: `clm_0012` supported 0.86
- `npx agent-web-interface doctor` Evidence: `README.md` Claim: `clm_0013` supported 0.86
- `npx skills add lespaceman/agent-web-interface` Evidence: `README.md` Claim: `clm_0014` supported 0.86
- `npx agent-web-interface` Evidence: `README.md` Claim: `clm_0006` supported 0.86, `clm_0007` supported 0.86, `clm_0008` supported 0.86, `clm_0009` supported 0.86 et al.

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox-trial permissions first
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox-trial permissions first
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `skills/agent-web-interface/SKILL.md` Claim: `clm_0005` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `skills/agent-web-interface/SKILL.md` Claim: `clm_0001` supported 0.86
- **Capability exists: Multi-Host Install and Distribution** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.claude-plugin/plugin.json` Claim: `clm_0002` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `CLAUDE.md`, `README.md` Claim: `clm_0003` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0006` supported 0.86, `clm_0007` supported 0.86, `clm_0008` supported 0.86, `clm_0009` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `.claude-plugin/plugin.json`, `AGENTS.md`, `CLAUDE.md`, `skills/agent-web-interface/SKILL.md`
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment. Evidence: `.claude-plugin/plugin.json`
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `CLAUDE.md`, `README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `.claude-plugin/plugin.json`, `AGENTS.md`, `CLAUDE.md`, `skills/agent-web-interface/SKILL.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `.claude-plugin/plugin.json`, `CLAUDE.md`, `README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0020` inferred 0.45
- **Host AI plugin or Skill rule conflicts**: New rules may change how the user's existing host AI behaves. Mitigation: Inspect the plugin manifest and Skill files before installing, and test in isolation if needed. Evidence: `.claude-plugin/plugin.json` Claim: `clm_0021` supported 0.86
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `CLAUDE.md`, `README.md` Claim: `clm_0022` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `skills/agent-web-interface/SKILL.md` Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `.claude-plugin/plugin.json` Claim: `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `CLAUDE.md`, `README.md` Claim: `clm_0003` supported 0.86

### Context Scale

- Total files: 215
- Important-file coverage: 40/215
- Evidence index entries: 75
- Role / Skill entries: 1

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for agent-web-interface, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat agent-web-interface as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for agent-web-interface, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 1 role / Skill / project-doc entries.

- **agent-web-interface** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “agent-web-interface”, use it for a pre-install experience first, then decide whether to install. Evidence: `skills/agent-web-interface/SKILL.md`

## Evidence Index

- Indexed 75 evidence entries.

- **Snapshot & Interaction Pipeline — Audit Results** (documentation): Snapshot & Interaction Pipeline — Audit Results Evidence: `AGENTS.md`
- **CLAUDE.md** (documentation): This file provides guidance to Claude Code claude.ai/code when working with code in this repository. Evidence: `CLAUDE.md`
- **Agent Web Interface** (documentation): Agent Web Interface is an MCP server that gives AI agents a compact, semantic interface to the browser. Evidence: `README.md`
- **Trigger eval — agent-web-interface skill description** (documentation): Trigger eval — agent-web-interface skill description Evidence: `skills/agent-web-interface/evals/README.md`
- **Package** (package_manifest): { "name": "agent-web-interface", "version": "4.6.6", "description": "Token-efficient browser automation MCP for AI agents — semantic page snapshots and stable element IDs.", "type": "module", "main": "dist/src/index.js", "bin": { "agent-web-interface": "./dist/src/index.js" }, "scripts": { "build": "tsc --project tsconfig.build.json", "dev": "tsc --watch", "start": "node dist/src/index.js", "mcp:inspect": "npx @modelcontextprotocol/inspector node dist/src/index.js", "prepare": "husky", "type-check": "tsc --noEmit", "lint": "eslint .", "lint:fix": "eslint . --fix", "format": "prettier --write \" / .{ts,js,json,md}\"", "format:check": "prettier --check \" / .{ts,js,json,md}\"", "test": "vites… Evidence: `package.json`
- **Agent Web Interface Guide** (skill_instruction): Use this skill to open live web pages, carry out actions, move through multi-step flows, validate page state, and capture selectors for automation. Evidence: `skills/agent-web-interface/SKILL.md`
- **Plugin** (structured_config): { "name": "agent-web-interface", "version": "0.1.0", "description": "Claude Code plugin for browser automation" } Evidence: `.claude-plugin/plugin.json`
- **License** (source_file): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Evidence: `LICENSE`
- **Apple Cart Journey: Why Agent Web Interface Works for LLM Agents** (documentation): Apple Cart Journey: Why Agent Web Interface Works for LLM Agents Evidence: `docs/apple-cart-journey-mcp-design.md`
- **CAPTCHA Solving with Agent Web Interface** (documentation): CAPTCHA Solving with Agent Web Interface Evidence: `docs/captcha-solving-findings.md`
- **Ephemeral Elements Investigation Report** (documentation): Ephemeral Elements Investigation Report Evidence: `docs/ephemeral-elements-investigation.md`
- **Handle Non-DOM Dialogs** (documentation): JavaScript dialogs block normal DOM interaction. When one is open, the page state exposes synthetic nd-dialog- controls. Use normal click and type calls against those controls. Evidence: `docs/handle-non-dom-dialogs.md`
- **Handle Permission Requests With Click** (documentation): Handle Permission Requests With Click Evidence: `docs/handle-permission-requests-with-click.md`
- **Releasing Guide** (documentation): This document describes how to release new versions of agent-web-interface to npm. Evidence: `docs/releasing.md`
- **Upload Files With Click and Type** (documentation): 1. Click the multi-file upload control: Evidence: `docs/upload-files-with-click-type.md`
- **Uploads assume MCP server and browser are co-located** (documentation): Uploads assume MCP server and browser are co-located Evidence: `docs/adr/0001-co-location-precondition-for-uploads.md`
- **The skill is one portable, tool-gating-free document delivered to every harness** (skill_instruction): The skill is one portable, tool-gating-free document delivered to every harness Evidence: `docs/adr/0002-portable-gating-free-skill.md`
- **Keep npx skills alongside the first-party installer** (documentation): Keep npx skills alongside the first-party installer Evidence: `docs/adr/0003-keep-npx-skills-alongside-installer.md`
- **Domain Docs** (documentation): How the engineering skills should consume this repo's domain documentation when exploring the codebase. Evidence: `docs/agents/domain.md`
- **Issue tracker: GitHub** (documentation): Issues and PRDs for this repo live as GitHub issues. Use the gh CLI for all operations. Evidence: `docs/agents/issue-tracker.md`
- **Triage Labels** (documentation): The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker. Evidence: `docs/agents/triage-labels.md`
- **Cross-Baseline Region Deduplication** (documentation): Cross-Baseline Region Deduplication Evidence: `docs/plans/2026-01-31-cross-baseline-region-dedup-design.md`
- **Implicit Interactivity Detection — Implementation Plan** (documentation): Implicit Interactivity Detection — Implementation Plan Evidence: `docs/plans/2026-03-01-implicit-interactivity-detection-plan.md`
- **Implicit Interactivity Detection** (documentation): Web applications frequently use non-semantic HTML elements , , with JavaScript click handlers for navigation and interaction. The current system only recognizes elements with semantic ARIA roles button, link, textbox, etc. as interactive. Non-semantic clickable elements get unknown- or rd- prefixed IDs that cannot be resolved by the click tool, blocking agents from interacting with table rows, cards, and other custom clickable components. Evidence: `docs/plans/2026-03-01-implicit-interactivity-detection.md`
- **Multi-Tenancy Implementation Plan** (documentation): For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Evidence: `docs/plans/2026-03-01-multi-tenancy.md`
- **Portal/Overlay Content Missing from Snapshots — Fix Plan** (documentation): Portal/Overlay Content Missing from Snapshots — Fix Plan Evidence: `docs/plans/2026-03-02-portal-overlay-snapshot-fix.md`
- **Deepen the Action Transaction: unify non-DOM surface detection** (documentation): Deepen the Action Transaction: unify non-DOM surface detection Evidence: `docs/plans/2026-06-16-deepen-action-transaction-non-dom-detection.md`
- **Non-DOM Tool Surface Consolidation** (documentation): Task 1: Remove upload and handle dialog Evidence: `docs/plans/2026-06-16-non-dom-tool-surface-consolidation.md`
- **Problem Statement** (documentation): As an AI agent driving a browser through this MCP server, I can see certain interactions but I cannot perform them, and worse, attempting them silently wedges the page. Evidence: `docs/plans/prd-non-dom-interaction-channel.md`
- **4.6.6 - 2026-07-04** (documentation): - docs tools : enrich tool + param descriptions for LLM discoverability 99 - docs: add website link near top of README 100 Evidence: `CHANGELOG.md`
- **Agent Web Interface** (documentation): An MCP server for AI-driven browser automation. It produces semantic page snapshots and exposes tools for an AI agent to observe and act on web pages. Evidence: `CONTEXT.md`
- **Generate Apple.com iPhone-to-Cart Tool Use Example** (documentation): Generate Apple.com iPhone-to-Cart Tool Use Example Evidence: `commands/generate-apple-doc.md`
- **.Mcp** (structured_config): { "mcpServers": { "agent-web-interface-dev": { "command": "node", "args": "dist/src/index.js" , "cwd": "/Users/nadeem/athena/agent-web-interface" } } } Evidence: `.mcp.json`
- **.Prettierrc** (structured_config): { "semi": true, "trailingComma": "es5", "singleQuote": true, "printWidth": 100, "tabWidth": 2, "useTabs": false, "arrowParens": "always", "endOfLine": "lf" } Evidence: `.prettierrc.json`
- **Skills Lock** (structured_config): { "version": 1, "skills": { "agent-web-interface": { "source": "lespaceman/agent-web-interface", "sourceType": "github", "skillPath": "skills/agent-web-interface/SKILL.md", "computedHash": "76952e2c466a5942e97f901fc669dce29ff19ef4eb9c2c64e2bbb633a6235e2c" }, "diagnose": { "source": "mattpocock/skills", "sourceType": "github", "skillPath": "skills/engineering/diagnose/SKILL.md", "computedHash": "15939a26f86edec2d4862042b8564e5a062cb81d04e047a0cea6305c8830b5f5" } } } Evidence: `skills-lock.json`
- **Tsconfig.Build** (structured_config): { "extends": "./tsconfig.json", "include": "src/ / .ts", " .ts" , "exclude": "node modules", "dist", "tests" } Evidence: `tsconfig.build.json`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ES2022", "module": "nodenext", "lib": "ES2022" , "moduleResolution": "nodenext", "outDir": "./dist", "rootDir": "./", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "declaration": true, "declarationMap": true, "sourceMap": true, "types": "node" }, "include": "src/ / .ts", "tests/ / .ts", " .ts" , "exclude": "node modules", "dist" } Evidence: `tsconfig.json`
- **Train Queries** (structured_config): { "id": "HP1", "query": "open https://news.ycombinator.com and tell me the top 3 story titles right now", "should trigger": true }, { "id": "HP2", "query": "is the cookie banner still covering the signup CTA on acme.com? we shipped a fix about an hour ago — can you check", "should trigger": true }, { "id": "HP4", "query": "confirm the prod homepage at https://app.acme.io still loads after the deploy and the nav actually renders", "should trigger": true }, { "id": "HP6", "query": "walk the add-to-cart then checkout flow on https://shop.demo.io and tell me where it breaks", "should trigger": true }, { "id": "HP8", "query": "explore the filters on airbnb.com and note how the results change whe… Evidence: `skills/agent-web-interface/evals/train_queries.json`
- **Validation Queries** (structured_config): { "id": "HP3", "query": "double-check that submitting the contact form on https://example.com actually sends — users report nothing happens", "should trigger": true }, { "id": "HP5", "query": "grab me reliable selectors for the email + password fields and the submit button on https://app.acme.io/login for an e2e test", "should trigger": true }, { "id": "HP7", "query": "what does the date picker on https://booking.example.org actually do if you pick a past date? check it on the site", "should trigger": true }, { "id": "HP10", "query": "screenshot the live pricing page at https://stripe.com/pricing and describe how the monthly/annual toggle behaves", "should trigger": true }, { "id": "HN2", "… Evidence: `skills/agent-web-interface/evals/validation_queries.json`
- **Tools** (structured_config): { "name": "browser-automation-toolkit", "version": "1.0.0", "description": "Comprehensive browser automation tools for navigating complex web applications via Qt + CEF", "tools": { "name": "dom get tree", "description": "Returns a pruned, stable JSON representation of DOM nodes including id, tag, attributes, text content, and children. Use this to understand page structure.", "inputSchema": { "type": "object", "properties": { "frameId": { "type": "string", "description": "Optional frame ID to scope the tree extraction" }, "depth": { "type": "number", "description": "Maximum depth to traverse default: unlimited " }, "visibleOnly": { "type": "boolean", "description": "If true, only return vis… Evidence: `src/config/tools.json`
- **Dependencies** (source_file): Dependencies node modules/ npm-debug.log yarn-debug.log yarn-error.log pnpm-debug.log Evidence: `.gitignore`
- **Pre Commit** (source_file): npm run type-check && npx lint-staged && npm test Evidence: `.husky/pre-commit`
- **Build outputs** (source_file): Build outputs dist/ build/ coverage/ Evidence: `.prettierignore`
- **Dockerfile for Glama https://glama.ai/mcp/servers build/inspection.** (source_file): Dockerfile for Glama https://glama.ai/mcp/servers build/inspection. Agent Web Interface is a stdio MCP server. Tools register at startup and Chrome is launched lazily on the first tool call see src/browser/ensure-browser.ts , so tools/list introspection succeeds with no browser present — which is all Glama's check requires. This image is intentionally minimal: it is for Glama's introspection check, not for driving a real browser inside the container. Normal usage is local via npx agent-web-interface , where the server connects to or launches the user's Chrome. To run browser tools inside a container, install google-chrome-stable and set AWI BROWSER MODE=isolated and AWI HEADLESS=true. FROM… Evidence: `Dockerfile`
- **Analyze Baseline Regions** (source_file): async function main ⋮---- // Collect all MCP tool calls and their responses ⋮---- // Collect tool results ⋮---- function countTokens text ⋮---- // Auto-detect baseline responses: those containing tags // These are the large, full-page snapshots worth analyzing function isBaseline xml ⋮---- // Has tag or has 2+ tags full page ⋮---- // Parse XML response into regions function parseRegions xml ⋮---- // Extract all eids from an XML string function extractEids xml ⋮---- // Find baseline responses and assign step numbers ⋮---- // ---- PART 1: Region-wise token breakdown ---- ⋮---- // ---- PART 2: Repeated eids across baselines ---- ⋮---- // Sample repeated eids to show what they are ⋮---- // Find… Evidence: `scripts/analyze-baseline-regions.mjs`
- **Count Tool Tokens** (source_file): async function main ⋮---- // Load Claude tokenizer ⋮---- // Extract MCP tool calls from assistant messages ⋮---- // Extract tool results from user messages with tool result ⋮---- // Content can be string or array of blocks ⋮---- // Count tokens for each call Evidence: `scripts/count-tool-tokens.mjs`
- **Http Entry** (source_file): import http from 'node:http'; import express from 'express'; import { getServerConfig } from './server/server-config.js'; import { SessionRouter } from './gateway/session-router.js'; import { HttpGateway } from './gateway/http-gateway.js'; import { sendJsonRpcError } from './gateway/json-rpc-errors.js'; import { getLogger } from './shared/services/logging.service.js'; import { cleanupTempFiles } from './lib/temp-file.js'; ⋮---- export async function main : Promise ⋮---- const shutdown = async signal: string = Evidence: `src/http-entry.ts`
- **Index** (source_file): import { BrowserAutomationServer } from './server/mcp-server.js'; import { initServerConfig } from './server/server-config.js'; import { cleanupTempFiles } from './lib/temp-file.js'; import { VERSION } from './shared/version.js'; import { SessionRouter } from './gateway/session-router.js'; import { registerAllTools } from './tools/tool-registration.js'; import { dispatch } from './cli/dispatch.js'; ⋮---- function initializeServer : ⋮---- async function main : Promise ⋮---- const shutdown = signal: NodeJS.Signals = Evidence: `src/index.ts`
- **Vitest.Config** (source_file): import { defineConfig } from 'vitest/config'; Evidence: `vitest.config.ts`
- **Vitest.Integration.Config** (source_file): import { defineConfig } from 'vitest/config'; Evidence: `vitest.integration.config.ts`
- **Browser Session Config** (source_file): import { isAbsolute } from 'node:path'; import { mkdirSync } from 'node:fs'; ⋮---- export type BrowserMode = typeof BROWSER MODES number ; ⋮---- export interface BrowserSessionConfig { browserMode?: BrowserMode; headless: boolean; cdpUrl?: string; stealth?: boolean; downloadDir?: string; } ⋮---- export function loadBrowserConfig : BrowserSessionConfig ⋮---- function resolveDownloadDir : string undefined Evidence: `src/browser/browser-session-config.ts`
- **Connection Utils** (source_file): import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; ⋮---- export function extractErrorMessage error: unknown : string ⋮---- export function isValidHttpUrl urlString: string : boolean ⋮---- export function isValidWsUrl urlString: string : boolean ⋮---- export function getDefaultChromeUserDataDir : string ⋮---- export async function readDevToolsActivePort userDataDir: string : Promise Evidence: `src/browser/connection-utils.ts`
- **Ensure Browser** (source_file): import type { SessionManager } from './session-manager.js'; import type { BrowserMode, BrowserSessionConfig } from './browser-session-config.js'; import { extractErrorMessage } from './connection-utils.js'; import { getLogger } from '../shared/services/logging.service.js'; ⋮---- export async function ensureBrowserReady session: SessionManager, config: BrowserSessionConfig : Promise ⋮---- async function attemptMode session: SessionManager, mode: BrowserMode, config: BrowserSessionConfig : Promise Evidence: `src/browser/ensure-browser.ts`
- **Page Network Recorder** (source_file): import type { Page, HTTPRequest } from 'puppeteer-core'; ⋮---- export interface NetworkEntry { id: number; url: string; method: string; resource type: string; is navigation: boolean; request headers: Record ; post data: string null; started at: number; status: number null; status text: string null; response headers: Record null; mime type: string null; duration ms: number null; failed: boolean; failure text: string null; navigation id: number; } ⋮---- export interface NetworkFilter { url pattern?: string; url regex?: boolean; method?: string; resource type?: string; status min?: number; status max?: number; failed only?: boolean; } ⋮---- export interface NetworkQueryResult { entries: Networ… Evidence: `src/browser/page-network-recorder.ts`
- **Page Network Tracker** (source_file): import type { Page, HTTPRequest } from 'puppeteer-core'; ⋮---- export class PageNetworkTracker ⋮---- attach page: Page : void ⋮---- detach : void ⋮---- markNavigation : void ⋮---- async waitForQuiet timeoutMs: number, quietWindowMs: number = DEFAULT QUIET WINDOW MS : Promise ⋮---- getInflightCount : number ⋮---- isAttached : boolean ⋮---- private cancelQuietTimer : void ⋮---- private checkQuiet : void ⋮---- private startQuietTimer : void ⋮---- private createAndAttachHandlers page: Page : void ⋮---- private removeHandlers page: Page : void ⋮---- export function getOrCreateTracker page: Page : PageNetworkTracker ⋮---- export function removeTracker page: Page : void ⋮---- export function hasTr… Evidence: `src/browser/page-network-tracker.ts`
- **Page Registry** (source_file): import type { Page } from 'puppeteer-core'; import type { CdpClient } from '../cdp/cdp-client.interface.js'; import { randomUUID } from 'crypto'; ⋮---- export interface PageHandle { page id: string; page: Page; cdp: CdpClient; created at: Date; url?: string; title?: string; } ⋮---- export class PageRegistry ⋮---- register page: Page, cdp: CdpClient : PageHandle ⋮---- get page id: string : PageHandle undefined ⋮---- remove page id: string : boolean ⋮---- list : PageHandle ⋮---- clear : void ⋮---- size : number ⋮---- has page id: string : boolean ⋮---- replace page id: string, handle: PageHandle : boolean ⋮---- updateMetadata page id: string, metadata: Partial : boolean ⋮---- findByPage page:… Evidence: `src/browser/page-registry.ts`
- **Page Stabilization** (source_file): import type { Page } from 'puppeteer-core'; import { getOrCreateTracker } from './page-network-tracker.js'; ⋮---- export async function waitForNetworkQuiet page: Page, timeoutMs: number, quietWindowMs: number = DEFAULT QUIET WINDOW MS : Promise Evidence: `src/browser/page-stabilization.ts`
- **Session Manager** (source_file): import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import puppeteer, { type Browser, type BrowserContext, type Page, TargetType, } from 'puppeteer-core'; import { PuppeteerCdpClient } from '../cdp/puppeteer-cdp-client.js'; import { applyStealthToPage, buildStealthLaunchOptions } from './stealth.js'; import { PageRegistry, type PageHandle } from './page-registry.js'; import { getLogger } from '../shared/services/logging.service.js'; import { BrowserSessionError } from '../shared/errors/browser-session.error.js'; import type { ConnectionHealth } from '../state/health.types.js'; import { observationAccumulator } from '../observation/index.js'; import { waitForNet… Evidence: `src/browser/session-manager.ts`
- **Session Manager.Types** (source_file): export type ChromeChannel = typeof CHROME CHANNELS number ; ⋮---- export type ConnectionState = 'idle' 'connecting' 'connected' 'disconnecting' 'failed'; ⋮---- export interface ConnectionStateChangeEvent { previousState: ConnectionState; currentState: ConnectionState; timestamp: Date; } ⋮---- export interface StorageState { cookies: { name: string; value: string; domain: string; path: string; expires: number; httpOnly: boolean; secure: boolean; sameSite?: 'Strict' 'Lax' 'None'; } ; origins: { origin: string; localStorage: { name: string; value: string } ; } ; } ⋮---- export interface LaunchOptions { headless?: boolean; viewport?: { width: number; height: number }; channel?: ChromeChannel; e… Evidence: `src/browser/session-manager.types.ts`
- **Stealth** (source_file): import type { CdpClient } from '../cdp/cdp-client.interface.js'; ⋮---- export interface StealthLaunchOptions { args: string ; ignoreDefaultArgs: string ; } ⋮---- export function buildStealthLaunchOptions stealth: boolean : StealthLaunchOptions ⋮---- export function buildStealthEvasionScript opts: ⋮---- export interface ApplyStealthOptions { headless: boolean; } ⋮---- export async function applyStealthToPage cdp: CdpClient, opts: ApplyStealthOptions : Promise Evidence: `src/browser/stealth.ts`
- The remaining 15 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `AGENTS.md`, `CLAUDE.md`, `README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `AGENTS.md`, `CLAUDE.md`, `README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Overview**: importance `high`
  - source_paths: README.md, package.json
- **Lib**: importance `high`
  - source_paths: src/lib/temp-file.ts, src/lib/text-utils.ts
- **Server**: importance `high`
  - source_paths: src/server/index.ts, src/server/mcp-server.ts, src/server/server-config.ts, src/server/tool-registrar.types.ts, src/server/tool-result-handler.ts
- **Cli**: importance `high`
  - source_paths: src/cli/args.ts, src/cli/dispatch.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `cd8eaec0356b0440ac5d4aee3e25892d8fdf273d`
- inspected_files: `Dockerfile`, `README.md`, `package.json`, `docs/adr/0001-co-location-precondition-for-uploads.md`, `docs/adr/0002-portable-gating-free-skill.md`, `docs/adr/0003-keep-npx-skills-alongside-installer.md`, `docs/agents/domain.md`, `docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, `docs/apple-cart-journey-mcp-design.md`, `docs/captcha-solving-findings.md`, `docs/ephemeral-elements-investigation.md`, `docs/handle-non-dom-dialogs.md`, `docs/handle-permission-requests-with-click.md`, `docs/plans/2026-01-31-cross-baseline-region-dedup-design.md`, `docs/plans/2026-03-01-implicit-interactivity-detection-plan.md`, `docs/plans/2026-03-01-implicit-interactivity-detection.md`, `docs/plans/2026-03-01-multi-tenancy.md`, `docs/plans/2026-03-02-portal-overlay-snapshot-fix.md`, `docs/plans/2026-06-16-deepen-action-transaction-non-dom-detection.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: Add end-to-end acceptance suite for non-DOM surfaces
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Add end-to-end acceptance suite for non-DOM surfaces. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may expose sensitive permissions or credentials: Add end-to-end acceptance suite for non-DOM surfaces
- Evidence: failure_mode_cluster:github_issue | https://github.com/lespaceman/agent-web-interface/issues/90
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: PRD: Unify non-DOM surfaces with snapshot action semantics
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: PRD: Unify non-DOM surfaces with snapshot action semantics. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may expose sensitive permissions or credentials: PRD: Unify non-DOM surfaces with snapshot action semantics
- Evidence: failure_mode_cluster:github_issue | https://github.com/lespaceman/agent-web-interface/issues/85
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: Represent permission and download non-DOM surfaces
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Represent permission and download non-DOM surfaces. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may expose sensitive permissions or credentials: Represent permission and download non-DOM surfaces
- Evidence: failure_mode_cluster:github_issue | https://github.com/lespaceman/agent-web-interface/issues/88
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: Update agent-web-interface skill for non-DOM surfaces
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Update agent-web-interface skill for non-DOM surfaces. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may expose sensitive permissions or credentials: Update agent-web-interface skill for non-DOM surfaces
- Evidence: failure_mode_cluster:github_issue | https://github.com/lespaceman/agent-web-interface/issues/89
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Release v4.4.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Release v4.4.0. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: Release v4.4.0
- Evidence: failure_mode_cluster:github_release | https://github.com/lespaceman/agent-web-interface/releases/tag/v4.4.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Release v4.6.2
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Release v4.6.2. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: Release v4.6.2
- Evidence: failure_mode_cluster:github_release | https://github.com/lespaceman/agent-web-interface/releases/tag/v4.6.2
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Release v4.6.3
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Release v4.6.3. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: Release v4.6.3
- Evidence: failure_mode_cluster:github_release | https://github.com/lespaceman/agent-web-interface/releases/tag/v4.6.3
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Release v4.6.4
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Release v4.6.4. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: Release v4.6.4
- Evidence: failure_mode_cluster:github_release | https://github.com/lespaceman/agent-web-interface/releases/tag/v4.6.4
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 9: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Release v4.6.5
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Release v4.6.5. Context: Observed when using node, docker
- Why it matters: Upgrade or migration may change expected behavior: Release v4.6.5
- Evidence: failure_mode_cluster:github_release | https://github.com/lespaceman/agent-web-interface/releases/tag/v4.6.5
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 10: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Remove upload and handle_dialog MCP tools
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Remove upload and handle_dialog MCP tools. Context: Observed during installation or first-run setup.
- Why it matters: Developers may fail before the first successful local run: Remove upload and handle_dialog MCP tools
- Evidence: failure_mode_cluster:github_issue | https://github.com/lespaceman/agent-web-interface/issues/92
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
