# AGENTS.md

An open source, self-hosted implementation of the Tailscale control server

## Setup

```
go mod download
```

## Commands

```
make check-deps
make build          # produce a build
make test           # run the test suite, must pass before any commit
make fmt
make fmt-go
make fmt-mdformat
```

## Layout

- `hscontrol/`   303 source files
- `integration/` 50 source files
- `cmd/`         35 source files
- `gen/`         2 source files
- `tools/`       1 source file

## Conventions

- Tests live alongside the code they cover, following `.github/workflows/docs-test.yml`.
- CI defines what passing means. See `.github/workflows/build.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `integration/route_test.go` is 164KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
