docs(agents): reserve agent-browser for its committed lanes

The instruction files told every coding agent to reach for agent-browser
whenever a change needed browser-level evidence: copilot-instructions
listed "E2E or agent-browser smoke" as the remedy for cross-boundary
flows, and both contributing guides repeated it. That wording outlived
the tool. With the agent-browser skill uninstalled, agents still parsed
those lines as a recommendation and went looking for the binary instead
of using the browser skill that is actually installed.

Deleting the references would have made the docs wrong. agent-browser is
still a real dependency: check:desktop-ui-smoke spawns it on Linux CI,
and seven maintainer-run e2e scripts under desktop/scripts drive it
directly. It cannot be swapped for ego-browser either — ego lite is a
macOS-only GUI app with no headless mode and a one-time interactive
onboarding, so it cannot run on ubuntu-latest at all.

So the lanes keep the binary and the prose loses the recommendation.
agent-browser is now described as an implementation detail of those two
call sites, and ad-hoc browser work — manual verification, screenshots,
exploratory UI checks — is pointed at the ego-browser skill.

The quality contract asserted the old string, so it would have failed
closed on the reworded line. It now pins the replacement plus the new
routing rule; flipping either sentence turns the test red.
This commit is contained in:
程序员阿江(Relakkes)
2026-08-09 19:03:50 +08:00
parent 0f3a517085
commit ffa2b59105
5 changed files with 11 additions and 4 deletions
+2 -1
View File
@@ -198,7 +198,8 @@ describe('feature quality contract', () => {
expect(instructions).toContain('Add same-area tests with the production change')
expect(instructions).toContain('Preserve or improve the coverage ratchet')
expect(instructions).toContain('changed-line coverage threshold')
expect(instructions).toContain('E2E or agent-browser smoke')
expect(instructions).toContain('E2E or desktop UI smoke')
expect(instructions).toContain('Ad-hoc browser automation')
expect(instructions).toContain('Provider/auth/runtime-env/model-window/proxy changes require offline `bun run check:provider-contract`')
expect(instructions).toContain('Live smoke is trusted-maintainer evidence only and requires explicit authorization')
expect(instructions).toContain('include changed files, tests added, commands actually run with pass/fail counts')