agentleFS
mathomhausmathomhaus/guild/AGENTS.md

guild

AGENTS.md301 starsChanged 7 months agoApache-2.0View on GitHub

This is the source repo for the guild binary. The MCP server's INSTRUCTIONS string (loaded when an MCP client connects to guild) carries the full operating contract — tool discipline, kind taxonomy, autonomy rules, narration. This file only adds repo-specific context for contributors. Surfaces the last briefing + oath + top bounty for work on this repo. Every subsequent guild MCP tool inherits project="guild" automatically. - Module: github.com/mathomhaus/guild - Language: Go 1.26.9+ - Main libs: spf13/cobra, log/slog, modernc.org/sqlite (pure-Go), github.com/modelcontextprotocol/go-sdk…

  • 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Every subsequent guild MCP tool inherits project="guild" automatically.

    line 16
  2. Very specific:

    Test gate: make check (fmt + vet + lint + sqlcheck + test-race)

    line 25
  3. Very specific:

    Use guild MCP tools (mcp__guild__*) for all guild operations

    line 31
  4. Very specific:

    Never bypass the tool to write raw SQL against ~/.guild/*.db

    line 34
  5. Very specific:

    If guild_session_start is not visible in your tool list, run your host's tool-search for guild first — some hosts lazy-load MCP tools.

    line 53
  6. Distinctive:

    Do NOT fall back to CLI; the MCP server is available.

    line 55

≈ “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

guild — agent bootstrap

This is the source repo for the guild binary. The MCP server's INSTRUCTIONS string (loaded when an MCP client connects to guild) carries the full operating contract — tool discipline, kind taxonomy, autonomy rules, narration. This file only adds repo-specific context for contributors.

First action — bootstrap guild MCP

mcp__guild__guild_session_start(project="guild")

Surfaces the last briefing + oath + top bounty for work on this repo. Every subsequent guild MCP tool inherits project="guild" automatically.

Repo facts

  • Module: github.com/mathomhaus/guild
  • Language: Go 1.26.9+
  • Main libs: spf13/cobra, log/slog, modernc.org/sqlite (pure-Go), github.com/modelcontextprotocol/go-sdk (version: see go.mod)
  • Entry points: cmd/guild/main.go, cmd/sqlcheck/main.go
  • Test gate: make check (fmt + vet + lint + sqlcheck + test-race)
  • CI reproducer: make ci
  • Release: goreleaser via make release-snapshot locally or v*.. tag push

Tool discipline

  • Use guild MCP tools (mcp__guild__*) for all guild operations
  • Bash CLI (guild lore ..., guild quest ...) only as last resort if MCP is unrecoverable
  • Never bypass the tool to write raw SQL against ~/.guild/*.db

When onboarding

Contributors new to the repo should also skim:

  • README.md — install + setup from an end-user perspective
  • Makefile — the canonical developer commands (make help for the list)
  • internal/mcp/instructions.go — the constant string every MCP client reads on connect

guild workflow

guild coordinates tasks (quest) and persistent knowledge (lore) across sessions and agents.

BEFORE ANY OTHER ACTION — before reading files, editing code, or responding to the user — call the MCP tool guild_session_start(project="guild"). It returns the full agent contract, active principles (oath), and the current top bounty. Follow what it returns.

If guild_session_start is not visible in your tool list, run your host's tool-search for guild first — some hosts lazy-load MCP tools. Do NOT fall back to CLI; the MCP server is available.

Core rules (full contract is returned by session_start)

  • Never use built-in task tools (TaskCreate / TaskUpdate / TaskList) — they're session-scoped. Use quest_post / quest_accept / quest_list instead.
  • Accept before working on a quest — quest_accept(quest_id=...) prevents parallel-agent collisions.
  • Appraise before researching — lore_appraise(query=..., all_projects=true) first. If current entries exist, use them.
  • Brief before session end — when wrapping up or compaction is near, call quest_brief("what was done, what's next, gotchas") without being asked.

MCP namespace: mcp__guild__*. CLI fallback: guild --help (last resort only).

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.