[object Object]

← back to Cli Printing Press

docs: add testing guidance to AGENTS.md

b86384b1d6e0370ea0f9b98e8c6eb5ead41b239d · 2026-03-27 14:00:10 -0700 · Trevin Chow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit b86384b1d6e0370ea0f9b98e8c6eb5ead41b239d
Author: Trevin Chow <trevin@trevinchow.com>
Date:   Fri Mar 27 14:00:10 2026 -0700

    docs: add testing guidance to AGENTS.md
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
 AGENTS.md | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index 0ff67fb7..e0290469 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -32,6 +32,14 @@ Catalog entries in `catalog/` must pass `internal/catalog` validation:
 - category must be: auth, payments, email, developer-tools, project-management, communication, crm, example
 - tier must be: official or community
 
+## Testing
+
+**When you change code, check for a `_test.go` file in the same package.** If one exists, read it — your change likely requires a test update. If tests fail after your change, investigate whether it's a bug in your code or a stale test — don't just delete.
+
+Add tests for new non-trivial logic. Match the package's existing style (typically table-driven with `testify/assert`). Skip tests for CLI glue, trivial wrappers, and code only meaningfully tested via integration (`FULL_RUN=1`).
+
+Run `go test ./...` before considering your work done.
+
 ## Quality Gates
 
 Generated CLIs must pass 7 gates: go mod tidy, go vet, go build, binary build, --help, version, doctor.

← 538e65c4 feat(cli): differentiate exit codes by failure type  ·  back to Cli Printing Press  ·  feat(dogfood): add ExampleCheck to validate help example cor c3eacf94 →