agentleFS
compnew2006compnew2006/browser-controller/AGENTS.md

browser-controller

AGENTS.md9 starsChanged 12 days agoMITView on GitHub

MCP clients connect to a local daemon that validates calls and routes them over authenticated WebSockets to the paired extension. Keep schemas under mcp-server/src/tools/, registration in mcp-server/src/tools/registry.ts, and browser behavior in matching handlers. Preserve timeouts and tab ownership. Pairing grants trusted clients powerful, unsandboxed browser control. Never commit secrets/private configuration; report vulnerabilities through SECURITY.md. Vault fill never clicks Submit, though site handlers may submit on input. Use ES modules, two spaces, semicolons, and nearby naming. Keep tools and handlers focused;…

  • Deletes or force-pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use scoped Conventional Commits, e.g.

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Repository Guidelines

Project Structure

  • mcp-server/src/ holds the TypeScript MCP server, daemon/bridge, tools, and credential vault.
  • extension/ is Chrome MV3: background modules wire events; dispatch/ routes calls, lib/ holds shared state, handlers implement browser behavior.
  • tests/ has Vitest suites and Chrome mocks; scripts/ has daemon, pairing, and smoke utilities; scripts/pages/ has fixtures.
  • agent-config/, specs/, docs/, and deploy/ contain editor setup, feature designs, project/audit docs, and supervisor examples.

Architecture and Security

MCP clients connect to a local daemon that validates calls and routes them over authenticated WebSockets to the paired extension. Keep schemas under mcp-server/src/tools/, registration in mcp-server/src/tools/registry.ts, and browser behavior in matching handlers. Preserve timeouts and tab ownership. Pairing grants trusted clients powerful, unsandboxed browser control. Never commit secrets/private configuration; report vulnerabilities through SECURITY.md. Vault fill never clicks Submit, though site handlers may submit on input.

Build, Test, and Development

  • npm ci installs locked dependencies (Node.js 22.18+, 24.11+, or 26+); npm run dev watches TypeScript; npm run build compiles to mcp-server/dist/.
  • npm test runs Vitest; focus one with npm test -- tests/v3-mock.test.ts.
  • CI runs npm run lint, npm run typecheck, npm run build, npm run test:coverage, npm run security:audit, npm run context:lint, npm run context:measure, and npm run arch:check on the declared minimum and latest Node 22, 24, and 26 releases. Run the same set before calling a change done.
  • npm run smoke:real-chrome requires a built server and enrolled extension; it restarts the daemon and uses the normal Chrome profile.
  • Code-graph indexes are machine-local output: .codebase-memory/ and graphify-out/ stay uncommitted, and a clone that still tracks the former clears it once with rm -rf .codebase-memory before pulling past 8777e78. The tool rebuilds the index on the next run.
  • A release is an annotated tag vX.Y.Z on the commit that sets that version, with notes read from the tagged tree's CHANGELOG.md section, never from the working tree.

Style and Testing

Use ES modules, two spaces, semicolons, and nearby naming. Keep tools and handlers focused; Vitest files end in *.test.ts. Add regressions for protocol, tab ownership, timeouts, and credential redaction; prefer isolated tests. Use real-Chrome smoke checks when needed. docs/lessons.md holds the four engineering laws this codebase learned from shipped defects — read it before adding a parallel config table, an alias, or a comment that claims behavior the code does not have.

Spec Kit, Evidence, and Agent Workflow

Spec Kit is configured under .specify/; Codex skills are under .agents/skills/. Use $speckit-specify, $speckit-plan, $speckit-tasks, and $speckit-implement; the workflow pauses for spec and plan review. Root constitution.md is proposed pending gates A–D and token tests; .specify/memory/constitution.md mirrors that proposal and is not adopted policy. Check the mirror's source fingerprint against the root file before relying on it. Requirements define intended behavior; source shows current implementation; tests/runtime cover exercised paths. Treat Graphify and codebase-memory as maps; verify claims against source, configuration, and tests. Scope delegated work; findings are evidence, not approval; independently review behavior/security changes.

Commits and Pull Requests

Use scoped Conventional Commits, e.g. refactor(vault): ... or docs(audit): .... PRs describe behavior, scope, and checks; note protocol/security changes, include UI screenshots, and link issues. Open an issue before larger changes, as README.md requests.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.