agentleFS
jtsang4jtsang4/lanesh/AGENTS.md

lanesh

AGENTS.md1 starsChanged 9 days agoMITView on GitHub

Lanesh lets an AI agent discover and use global skills and shells across multiple machines through one self-hosted MCP endpoint. It consists of a server, a per-machine daemon, and a management web UI, all shipped as one Go binary.

  • 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 32,671 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 repository2 other files it gives its agents.

The file

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

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

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    If an implementation needs to diverge from the design, update docs/design.md in the same change.

    line 8
  2. Very specific:

    When piping a command into tail/grep, its exit code is lost.

    line 34
  3. Distinctive:

    Prefer the standard library.

    line 40
  4. Very specific:

    Use log/slog, pass context.Context through blocking calls, and wrap errors with %w.

    line 42
  5. Distinctive:

    Write table-driven tests next to the code.

    line 43
  6. Very specific:

    Use the project skills svelte-code-writer and svelte-core-bestpractices when writing Svelte code.

    line 49
  7. Distinctive:

    Keep dependencies on their latest versions within compatibility limits.

    line 57
  8. Common:

    Do not hardcode paths, hostnames or credentials from a developer's machine.

    line 67
  9. Very specific:

    Use Conventional Commits (feat:, fix:, docs:, refactor:, test:, ci:, chore:).

    line 68

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

Agent Guidelines for Lanesh

Lanesh lets an AI agent discover and use global skills and shells across multiple machines through one self-hosted MCP endpoint. It consists of a server, a per-machine daemon, and a management web UI, all shipped as one Go binary.

Source of truth

  • docs/design.md defines the architecture, protocol, MCP tools, deployment and release process. Read the relevant section before changing behaviour.
  • If an implementation needs to diverge from the design, update docs/design.md in the same change. Do not let code and design drift apart.
  • docs/releasing.md describes the release process.

Layout

  • cmd/lanesh: the only entry point; subcommands select server, daemon or CLI behaviour (internal/cli).
  • internal/: all application code. Package boundaries follow the design document (§14).
  • web/: SvelteKit SPA. web/embed.go embeds web/build/app; web/build/.gitkeep must stay so Go compiles without a UI build.
  • build/package/Dockerfile: image built by GoReleaser from prebuilt binaries.
  • build/npm: the lanesh npm launcher. It contains no binary; it downloads release assets named lanesh_<version>_<os>_<arch>[.exe], which must stay in sync with .goreleaser.yaml.

Commands

make web          # build the UI
make build        # build ./bin/lanesh
make test         # go test, svelte-check, npm launcher tests
make lint         # golangci-lint and web lint
make check        # lint + test, as CI runs them
make hooks        # pre-commit hooks for staged files (lefthook)
scripts/dev.sh    # local server + three demo machines on :8080 (admin token lsa_dev_token)
scripts/service-test.sh ./bin/lanesh   # background service lifecycle (installs a real per-user service)
  • internal/server/e2e_test.go runs a real server and daemons in-process and drives them with the official MCP SDK client. Extend it when changing MCP tools or the control protocol.
  • Lint for every OS when touching OS-specific code: GOOS=windows golangci-lint run ./... (and linux, darwin).
  • When piping a command into tail/grep, its exit code is lost; check lint and test results explicitly before committing.

Conventions

Go

  • Prefer the standard library. Add a dependency only when it clearly pays for itself, and use its latest release.
  • Lanesh must work on macOS, Linux and Windows. Use path/filepath for OS paths, put OS-specific code in _unix.go / _windows.go files with build constraints, and never assume a POSIX shell on Windows.
  • Use log/slog, pass context.Context through blocking calls, and wrap errors with %w.
  • Write table-driven tests next to the code. CI runs tests on all three platforms.
  • Code must pass golangci-lint with the repository config.

Web UI

  • Svelte 5 runes and SvelteKit with adapter-static; the UI is a client-rendered SPA served by the Go server.
  • Use the project skills svelte-code-writer and svelte-core-bestpractices when writing Svelte code.
  • Tooling comes from the Vite/VoidZero ecosystem: oxlint for linting and oxfmt for formatting (pnpm run lint, pnpm run format); svelte-check covers Svelte compiler diagnostics and types.
  • Visual direction: minimal and flat, refined through typography, spacing and detail. Avoid oversized buttons and poster-style hero sections.
  • Quality bar: work at the level of Awwwards, Webby or FWA winners. After each iteration, screenshot the UI in a browser, review it against the checklist in docs/design.md §10.4, and keep improving until it meets that bar.
  • English is the default UI language; Simplified Chinese is provided through i18n.

Dependencies

  • Keep dependencies on their latest versions within compatibility limits. TypeScript stays on 6.x until SvelteKit and svelte-check support 7.x.
  • Dependabot opens weekly update PRs for Go modules, web packages, GitHub Actions and the Docker base image.

Skills

  • Project skills live in .agents/skills/; .claude/skills/ contains relative symlinks to them.
  • Third-party skills are managed with npx skills and recorded in skills-lock.json.

General

  • Do not hardcode paths, hostnames or credentials from a developer's machine.
  • Use Conventional Commits (feat:, fix:, docs:, refactor:, test:, ci:, chore:).

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.