agentleFS
PostHogKnown publisherPostHog/housekeeper/AGENTS.md

housekeeper

AGENTS.md2 starsChanged 51 days agoMITView on GitHub

  • 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,542 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

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

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    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. Very specific:

    Run MCP server (default): go run .

    line 12
  2. Very specific:

    Run with config: go run . --config configs/config.yml.

    line 13
  3. Very specific:

    Run tests: go test ./... (add -v -race when relevant).

    line 25
  4. Very specific:

    Do not commit secrets. Copy configs/config.yml.sample to configs/config.yml and keep it local (gitignored).

    line 34
  5. Common:

    Prefer least-privileged DB credentials.

    line 36

≈ “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 & Module Organization

  • Root Go module; entrypoint: main.go (MCP server by default; --analyze runs the legacy Gemini mode).
  • MCP server: sdk_mcp.go (server, transport, middleware), clickhouse_mcp.go (validation + query execution), prometheus_mcp.go (PromQL tools), diagnose_mcp.go + bedrock.go (optional in-account diagnose agent).
  • Legacy analysis mode: agent.go (Gemini), clickhouse.go (error queries), slack.go (webhook).
  • Configs in configs/ (config.yml.sample template; user config.yml gitignored).
  • Local infra: docker-compose.yml (ClickHouse).

Build, Test, and Development Commands

  • Build: go build -o housekeeper.
  • Run MCP server (default): go run . — serves streamable HTTP MCP on http.addr (default :8080), health at /health.
  • Run with config: go run . --config configs/config.yml.
  • Legacy analysis: go run . --analyze (errors) / --analyze --performance (slow queries); requires gemini_key.
  • Local ClickHouse: docker-compose up -d / docker-compose down.

Coding Style & Naming Conventions

  • Go 1.23+ module; format with gofmt -s -w . and vet with go vet ./....
  • Naming: exported identifiers use CamelCase; unexported use lowerCamel.
  • Files group by responsibility (MCP tools, data access, config, integrations). Keep functions small and composable.
  • Configuration keys mirror configs/config.yml.sample (e.g., clickhouse.host, bedrock.model_id, mcp.extra_tool_description). Env vars use the HOUSEKEEPER_ prefix with dots as underscores.

Testing Guidelines

  • Table-driven tests live alongside source: clickhouse_mcp_test.go (SQL validator — extend this for ANY validator change), clickhouse_test.go, prometheus_mcp_test.go, clickhouse_auth_test.go (token-file password fallback).
  • Run tests: go test ./... (add -v -race when relevant).
  • The free-form SQL validator is security-relevant defense-in-depth; add a test for every accepted/rejected shape you change. Server-side grants/REVOKEs remain the real boundary.

Commit & Pull Request Guidelines

  • Commits: imperative, concise, present tense (e.g., "add performance agent hints"). Group logical changes; avoid noise.
  • PRs include: clear description, rationale, test plan/steps, config changes, and any screenshots/log snippets of output.
  • Link related issues; call out backward-incompatible changes and ops impacts (tool descriptions in the charts repo are operator-facing surface).

Security & Configuration Tips

  • Do not commit secrets. Copy configs/config.yml.sample to configs/config.yml and keep it local (gitignored).
  • MCP mode needs clickhouse.* (+ prometheus.*); the diagnose tool additionally needs bedrock.region, bedrock.model_id, and ideally a dedicated analyst_clickhouse.* user. gemini_key/slack.webhook_url are only for the legacy --analyze mode.
  • Prefer least-privileged DB credentials; raw query text and customer tables belong only on the analyst connection.

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.