From 060a3e543465928f4326b9c88622fbb5c6cd6e7d Mon Sep 17 00:00:00 2001 From: kongenpei Date: Wed, 1 Apr 2026 15:44:29 +0800 Subject: [PATCH 1/3] docs: add concise AGENTS development guide --- AGENTS.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..9f25bcd10 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,32 @@ +# AGENTS.md +Concise maintainer/developer guide for building, testing, and opening high-quality PRs in this repo. + +## Goal (pick one per PR) +- Make CLI better: improve UX, error messages, help text, flags, and output clarity. +- Improve reliability: fix bugs, edge cases, and regressions with tests. +- Improve developer velocity: simplify code paths, reduce complexity, keep behavior explicit. +- Improve quality gates: strengthen tests/lint/checks without adding heavy process. + +## Fast Dev Loop +1. `make build` (runs `python3 scripts/fetch_meta.py` first) +2. `make unit-test` (required before PR) +3. Run changed command(s) manually via `./lark-cli ...` + +## Pre-PR Checks (match CI gates) +1. `make unit-test` +2. `go mod tidy` (must not change `go.mod`/`go.sum`) +3. `go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main` +4. Optional full local suite: `make test` (vet + unit + integration) + +## Test/Check Commands +- Unit: `make unit-test` +- Integration: `make integration-test` +- Full: `make test` +- Vet only: `make vet` +- Coverage (local): `go test -race -coverprofile=coverage.txt -covermode=atomic ./...` + +## Commit/PR Rules +- Use Conventional Commits in English: `feat: ...`, `fix: ...`, `docs: ...`, `ci: ...`, `test: ...`, `chore: ...`, `refactor: ...` +- Keep PR title in the same Conventional Commit format (squash merge keeps it). +- Before opening a real PR, draft/fill description from `.github/pull_request_template.md` and ensure Summary/Changes/Test Plan are complete. +- Never commit secrets/tokens/internal sensitive data. From 5da8133ed6cf99b6311f042bbbb0f1562d988dfc Mon Sep 17 00:00:00 2001 From: kongenpei Date: Wed, 1 Apr 2026 15:50:25 +0800 Subject: [PATCH 2/3] docs: align AGENTS with toolchain and CI license checks --- AGENTS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 9f25bcd10..e1807de29 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,9 @@ Concise maintainer/developer guide for building, testing, and opening high-quali - Improve developer velocity: simplify code paths, reduce complexity, keep behavior explicit. - Improve quality gates: strengthen tests/lint/checks without adding heavy process. +## Toolchain Prerequisite +- Use one consistent Go toolchain (recommend Go `1.25.8` via `mise`); source of truth is `go.mod` (`go` directive) plus CI workflows. + ## Fast Dev Loop 1. `make build` (runs `python3 scripts/fetch_meta.py` first) 2. `make unit-test` (required before PR) @@ -16,7 +19,8 @@ Concise maintainer/developer guide for building, testing, and opening high-quali 1. `make unit-test` 2. `go mod tidy` (must not change `go.mod`/`go.sum`) 3. `go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main` -4. Optional full local suite: `make test` (vet + unit + integration) +4. If dependencies changed: `go run github.com/google/go-licenses/v2@v2.0.1 check ./... --disallowed_types=forbidden,restricted,reciprocal,unknown` +5. Optional full local suite: `make test` (vet + unit + integration) ## Test/Check Commands - Unit: `make unit-test` From f7537e6028a0eb21800c47719ab55037071cfe68 Mon Sep 17 00:00:00 2001 From: kongenpei Date: Wed, 1 Apr 2026 15:51:27 +0800 Subject: [PATCH 3/3] docs: remove toolchain prerequisite section --- AGENTS.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e1807de29..e594a81c4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,9 +7,6 @@ Concise maintainer/developer guide for building, testing, and opening high-quali - Improve developer velocity: simplify code paths, reduce complexity, keep behavior explicit. - Improve quality gates: strengthen tests/lint/checks without adding heavy process. -## Toolchain Prerequisite -- Use one consistent Go toolchain (recommend Go `1.25.8` via `mise`); source of truth is `go.mod` (`go` directive) plus CI workflows. - ## Fast Dev Loop 1. `make build` (runs `python3 scripts/fetch_meta.py` first) 2. `make unit-test` (required before PR)