Skip to content

Commit b6f0772

Browse files
authored
Update AGENTS.md
1 parent 22c3c0c commit b6f0772

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

AGENTS.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
## Agent Instructions
44

5-
> **Note for the AI agent:** Before running the startup script, check for a `vendor` directory. If it exists, skip fetching modules; otherwise proceed. This vendor-check logic is for the agent’s decision-making and is not part of the user-facing script.
5+
> **Note for the AI agent:** Before running the startup script, verify that all dependencies and CLI tools are already available. If a `vendor/` directory exists **or** `go list -m -mod=readonly all` succeeds (indicating modules are cached), you may skip the entire startup script—including all `go mod` commands and `go install` steps. Otherwise run the script as listed below.
66
77
---
88

9-
## Startup script
9+
## Startup script (reference only – do not run)
1010

1111
- Fetch dependencies:
1212

1313
```bash
14-
go get ./...
14+
go mod tidy && go mod download && go mod vendor
1515
```
1616

1717
- Install CLI tools referenced in Makefile:
@@ -25,3 +25,20 @@
2525
go install github.com/dkorunic/betteralign/cmd/betteralign@latest # struct alignment
2626
go mod tidy # clean up go.mod & go.sum
2727
```
28+
29+
## Makefile commands
30+
31+
Use `make help` to list all available commands. Common targets include:
32+
33+
- **audit**: run `go mod verify`, `go vet`, and `govulncheck` for quality checks.
34+
- **benchmark**: run benchmarks with `go test`.
35+
- **coverage**: generate a coverage report.
36+
- **format**: apply formatting using `gofumpt`.
37+
- **lint**: execute `golangci-lint`.
38+
- **test**: run the test suite with `gotestsum`.
39+
- **longtest**: run the test suite 15 times with shuffling enabled.
40+
- **tidy**: clean and tidy dependencies.
41+
- **betteralign**: optimize struct field alignment.
42+
- **generate**: run `go generate` after installing msgp and ifacemaker.
43+
44+
These targets can be invoked via `make <target>` as needed during development and testing.

0 commit comments

Comments
 (0)