agentleFS
JoouisJoouis/agent-maestro/AGENTS.md

agent-maestro

AGENTS.md211 starsChanged 3 months agoMITView on GitHub

Guidance for AI coding agents working in this repository. Human contributors should read README.md first. Agent Maestro is a VS Code extension that: Primary language: TypeScript (ESM). Runtime and package-manager requirements are defined in package.json (engines and packageManager). Run via pnpm. Do not use npm or yarn.

  • Commits and 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 35,337 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 repositoryOne other file it gives its agents.

The file

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

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run via pnpm. Do not use npm or yarn.

    line 37
  2. Distinctive:

    Default validation checklist before opening a PR:

    line 52
  3. Distinctive:

    Avoid emojis in source, logs, and commit messages unless the user requests them.

    line 66
  4. Distinctive:

    Prefer editing existing files over creating new ones.

    line 70
  5. Distinctive:

    Don't add comments that restate the code.

    line 72
  6. Distinctive:

    Don't add backwards-compatibility shims, dead exports, or "// removed" markers when deleting code — just remove it.

    line 73
  7. Distinctive:

    Don't introduce new abstractions or refactors outside the scope of the requested task.

    line 74
  8. Distinctive:

    Add tests for new request-conversion logic, new route behavior, and any bug fix with a reproducible case.

    line 80
  9. Very specific:

    Commit message style follows Conventional Commits (fix(scope): …, feat(scope): …, refactor: …).

    line 85
  10. Distinctive:

    Never force-push, never push directly to main, and confirm before pushing any branch.

    line 88
  11. Distinctive:

    Ask before doing any of these, even if a prior similar action was approved:

    line 92
  12. Distinctive:

    Keep PRs scoped to one logical change.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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

AGENTS.md

Guidance for AI coding agents working in this repository. Human contributors should read README.md first.

Project overview

Agent Maestro is a VS Code extension that:

  • Orchestrates third-party AI coding extensions (Cline, Roo Code, Kilo Code, etc.) via internal adapters.
  • Exposes a local proxy server (default port 23333) presenting OpenAI-, Anthropic-, and Gemini-compatible APIs backed by the VS Code Language Model API (GitHub Copilot models), used by clients such as Claude Code, Codex, and Gemini.
  • Runs an MCP server (default port 23334) for Model Context Protocol clients.

Primary language: TypeScript (ESM). Runtime and package-manager requirements are defined in package.json (engines and packageManager).

Repository layout

  • src/extension.ts — extension entry point.
  • src/commands/ — VS Code command handlers registered in package.json.
  • src/core/ — adapters for third-party extensions (ClineAdapter, RooCodeAdapter, etc.) and the central controller.
  • src/server/ — proxy + MCP servers.
    • routes/anthropicRoutes.ts, routes/openai/ — API-compatible endpoints.
    • schemas/ — Zod request/response schemas (also drive OpenAPI).
    • utils/ — request conversion helpers between Anthropic/OpenAI and the VS Code LM API.
  • src/utils/ — shared utilities (logger, config, chat-model resolution, Claude Code helpers).
  • src/test/ — Mocha tests run via @vscode/test-electron.
  • docs/README.md — index of current guides, runbooks, and historical designs; website/ contains the landing page.
  • .changeset/ — pending release notes (Changesets).

Known upstream (VS Code) issues

  • Image MIME re-encode — the VS Code LM API re-encodes images to PNG when both dimensions exceed 768px without updating their declared MIME type, which breaks providers that sniff bytes (e.g. Anthropic vision). Worked around in src/server/utils/imageMime.ts. Re-check this whenever bumping engines.vscode — if upstream starts preserving the source format, the workaround must be removed or it will cause a new mismatch. See docs/vscode-image-mime-defect.md.
  • Copilot strips tool_search tools — Copilot's Responses API path (GPT models) drops any LM tool named tool_search, which it reserves for its own agent. Client Responses tool_search is therefore registered as agent_maestro_tool_search in src/server/utils/openaiResponses.ts and mapped back to native items. Re-check when bumping engines.vscode if Copilot changes this behavior.
  • Tool-result images are never resized — VS Code's _chat.resizeImage command (chatImageUtils.ts) returns a bare Uint8Array instead of a VSBuffer, so it reaches Copilot Chat as a plain object; Copilot's VSCodeImageServiceImpl.resizeImage then fails its instanceof Uint8Array check and sends the original bytes. Top-level user images go through $sendChatRequest, which wraps the result and resizes correctly. Effects on Copilot's /chat/completions path: tool-result images above about 1.1 MiB fail with 400 invalid_request_body or 413, and Gemini ignores smaller ones. Copilot's own /responses path (GPT) already moves tool-result images into a user message. toolHistoryToVSCode in src/server/utils/toolResultPairing.ts therefore promotes tool-result media into a following user message. Re-check when bumping engines.vscode: once _chat.resizeImage returns a VSBuffer, large images no longer need promotion (Gemini may still ignore tool-result images).

Commands

Run via pnpm. Do not use npm or yarn.

TaskCommand
Install depspnpm install
Type-checkpnpm check-types
Lintpnpm lint
Build (dev)pnpm build
Build (prod)pnpm build:prod
Run testspnpm test
Watch (build + tsc)pnpm watch
Add a changesetpnpm changeset

pnpm test boots a VS Code test host and is slow; prefer pnpm check-types + pnpm lint for fast feedback during edits, and only run the full test suite when behavior changes.

Default validation checklist before opening a PR:

  • pnpm check-types
  • pnpm lint
  • pnpm test (when behavior changes)

Pre-commit runs ESLint and Prettier via Husky + lint-staged. Do not bypass with --no-verify.

Code style

  • Prettier (.prettierrc) and ESLint (eslint.config.mjs) are authoritative — let them format. Imports are sorted by @trivago/prettier-plugin-sort-imports.
  • TypeScript strict mode. Prefer explicit types on exported APIs; let inference handle locals.
  • ESM only ("type": "module"). Use import/export, never require in source.
  • Logging goes through src/utils/logger.ts (logger.info / logger.warn / logger.debug / logger.error). Do not use console.* in src/.
  • Avoid emojis in source, logs, and commit messages unless the user requests them.

Editing conventions

  • Prefer editing existing files over creating new ones.
  • For behavior changes, review and update existing user-facing docs first (especially README.md) instead of creating new docs unless clearly needed.
  • Don't add comments that restate the code. Reserve comments for non-obvious why (constraint, workaround, surprising invariant).
  • Don't add backwards-compatibility shims, dead exports, or "// removed" markers when deleting code — just remove it.
  • Don't introduce new abstractions or refactors outside the scope of the requested task.
  • Validate at system boundaries (request handlers, external APIs). Trust internal calls.

Tests

  • Tests live under src/test/ and use Mocha + Node assert. Match the existing suite / test style.
  • Add tests for new request-conversion logic, new route behavior, and any bug fix with a reproducible case.
  • UI/extension-host behavior cannot be covered by unit tests alone — if the change affects VS Code commands or UI, say so explicitly rather than claiming verification.

Commits, changesets, and releases

  • Commit message style follows Conventional Commits (fix(scope): …, feat(scope): …, refactor: …). See git log for examples.
  • Every user-visible change needs a changeset. User-visible includes anything users can see or feel (UI text/behavior, API behavior, bug fixes, performance improvements). Developer-only internal changes (e.g., tests-only updates or refactors/tooling changes with no user-facing effect) generally do not need a changeset. Run pnpm changeset, pick patch / minor / major, and commit the generated file in .changeset/.
  • Release flow: a maintainer runs pnpm changeset:version (bumps package.json, regenerates CHANGELOG.md, deletes consumed changesets) and opens a release PR. Agents should not bump versions or edit CHANGELOG.md directly unless explicitly asked to cut a release.
  • Never force-push, never push directly to main, and confirm before pushing any branch.

Risky actions — confirm first

Ask before doing any of these, even if a prior similar action was approved:

  • git push, force-push, branch deletion, tag creation.
  • Editing CI workflows in .github/.
  • Publishing to VS Code Marketplace / Open VSX (publish:vs-marketplace, publish:open-vsx).
  • Deleting or rewriting .changeset/ entries, CHANGELOG.md, or version fields.
  • Adding, removing, or bumping dependencies, or changing package/runtime versions.

Pull requests

  • Keep PRs scoped to one logical change. Split release-prep commits from feature/fix commits.
  • PR title mirrors the primary commit (fix(anthropic): …).
  • PR body: short summary + test plan checklist. Reference the changeset.

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.