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
- Very specific: line 8
If an implementation needs to diverge from the design, update docs/design.md in the same change.
- Very specific: line 34
When piping a command into tail/grep, its exit code is lost.
- Distinctive: line 40
Prefer the standard library.
- Very specific: line 42
Use log/slog, pass context.Context through blocking calls, and wrap errors with %w.
- Distinctive: line 43
Write table-driven tests next to the code.
- Very specific: line 49
Use the project skills svelte-code-writer and svelte-core-bestpractices when writing Svelte code.
- Distinctive: line 57
Keep dependencies on their latest versions within compatibility limits.
- Common: line 67
Do not hardcode paths, hostnames or credentials from a developer's machine.
- Very specific: line 68
Use Conventional Commits (feat:, fix:, docs:, refactor:, test:, ci:, chore:).
≈ “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.
Files
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.mddefines 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.mdin the same change. Do not let code and design drift apart. docs/releasing.mddescribes 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.goembedsweb/build/app;web/build/.gitkeepmust stay so Go compiles without a UI build.build/package/Dockerfile: image built by GoReleaser from prebuilt binaries.build/npm: thelaneshnpm launcher. It contains no binary; it downloads release assets namedlanesh_<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.goruns 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 ./...(andlinux,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/filepathfor OS paths, put OS-specific code in_unix.go/_windows.gofiles with build constraints, and never assume a POSIX shell on Windows. - Use
log/slog, passcontext.Contextthrough 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-lintwith 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-writerandsvelte-core-bestpracticeswhen writing Svelte code. - Tooling comes from the Vite/VoidZero ecosystem:
oxlintfor linting andoxfmtfor formatting (pnpm run lint,pnpm run format);svelte-checkcovers 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 skillsand recorded inskills-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:).
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.

