guild
AGENTS.md302 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.25+ - 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 checking a change actually works.
Of the AGENTS.md files we read, the 11,736 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.
- CLAUDE.mdCLAUDE.md
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
- Very specific: line 16
Every subsequent guild MCP tool inherits project="guild" automatically.
- Very specific: line 25
Test gate: make check (fmt + vet + lint + sqlcheck + test-race)
- Very specific: line 31
Use guild MCP tools (mcp__guild__*) for all guild operations
- Very specific: line 34
Never bypass the tool to write raw SQL against ~/.guild/*.db
- Very specific: line 53
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.
- Distinctive: line 55
Do NOT fall back to CLI; the MCP server is available.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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.
Files
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.25+
- Main libs:
spf13/cobra,log/slog,modernc.org/sqlite(pure-Go),github.com/modelcontextprotocol/go-sdkv1.5.0 - 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-snapshotlocally 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 perspectiveMakefile— the canonical developer commands (make helpfor 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_listinstead. - 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).
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
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.

