Skip to content

docs: canonicalize AGENTS.md as the agent guide and freshen against code#17

Draft
jack-arturo wants to merge 3 commits into
mainfrom
docs/agents-md-canonical
Draft

docs: canonicalize AGENTS.md as the agent guide and freshen against code#17
jack-arturo wants to merge 3 commits into
mainfrom
docs/agents-md-canonical

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

What & why

Adopts the fleet house standard for agent-direction files: AGENTS.md is the single source of truth, and CLAUDE.md is reduced to a one-line @AGENTS.md import. Claude Code resolves the import at launch; every other agent (Cursor, Codex, …) reads AGENTS.md's bytes directly. Token-neutral, and it kills the silent drift between near-identical copies.

This repo had no prior AGENTS.md, so there was no duplication to remove — this is adopting the standard (consistency + future-proofing across the fleet) plus a freshness pass against the current code. Reviewers should not hunt for a divergence that never existed.

Two commits

  1. docs: adopt house standard — purely mechanical: CLAUDE.md@AGENTS.md, establish canonical AGENTS.md, generalize the intro line to "coding agents (Claude Code, Cursor, Codex, …)".
  2. docs: freshen AGENTS.md against current code — every factual claim re-verified against source, with path:line citations.

Freshness changes

  • Tool count corrected 2 → 5: mysql_query, mysql_schema, mysql_current_site, mysql_list_sites, plus the write-gated mysql_write (only registered when MYSQL_ALLOW_WRITES=true).
  • Added the missing env vars: MYSQL_ALLOW_WRITES, SITE_ID, SITE_NAME, LOCAL_RUN_DIR, LOCAL_SITES_JSON.
  • Documented the real 5-level selectSite() priority order.
  • Citations verified against src/index.ts:18/134, src/mysql-client.ts:46/76, src/local-detector.ts:315/413.

Caveats (noted for awareness — out of scope for this docs PR)

  • README Security section still describes the server as read-only-only, which is no longer true once MYSQL_ALLOW_WRITES=true enables mysql_write.

Review note

Automated verification caught mechanical drift only — every tool/path/env-var named now exists in code, the tool count matches, CLAUDE.md is exactly @AGENTS.md. It does not judge whether the advice is still good or well-emphasized. Please read the diff for judgment. No auto-merge.

🤖 Generated with Claude Code

jack-arturo and others added 2 commits June 6, 2026 16:21
Promote CLAUDE.md's content to AGENTS.md (canonical, read by all agents)
and reduce CLAUDE.md to the bare `@AGENTS.md` import. Mechanical only;
the freshness pass follows in the next commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Correct tool inventory: 2 documented tools -> 4 default tools (mysql_query, mysql_schema, mysql_current_site, mysql_list_sites) plus conditional mysql_write gated by MYSQL_ALLOW_WRITES
- Document 5-level site-selection priority (SITE_ID/SITE_NAME/CWD/process/filesystem) and add missing env vars (MYSQL_ALLOW_WRITES, SITE_ID, SITE_NAME, LOCAL_RUN_DIR, LOCAL_SITES_JSON)
- Update security model for the gated write path; generalize intro to coding agents and fix stale CLAUDE.md H1

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes agent guidance documentation by making AGENTS.md the canonical “coding agents” guide and reducing CLAUDE.md to an import pointer, while refreshing the guidance to match the current MCP server implementation.

Changes:

  • Replace the prior multi-section CLAUDE.md with an @AGENTS.md import pointer.
  • Add a new canonical AGENTS.md containing build/dev commands and an updated architecture/tools/env-var reference aligned to the current codebase.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
CLAUDE.md Reduced to an import pointer to AGENTS.md to eliminate drift and centralize guidance.
AGENTS.md New canonical agent guide documenting commands, MCP tools, Local site selection, and environment variables.
Comments suppressed due to low confidence (1)

CLAUDE.md:2

  • CLAUDE.md currently contains the @AGENTS.md import plus an extra blank line. If the intent is a strict one-line import (and to avoid any parser that expects the file to contain exactly that token), remove the trailing empty line so the file is a single line.
@AGENTS.md


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
…wed read tokens

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants