compose-go/AGENTS.md
Nicolas De Loof f8211c45e3 docs: TESTING.md codifies the testing contract
compose-go's tests are the executable counterpart of the Compose
Specification: the document humans read to know what behavior is
locked, and the surface coding agents work against. TESTING.md elevates
the two patterns that emerged in this codebase — attribute conformance
files in loader/tests/, YAML-in/YAML-out expectations in override/ — to
official status, and codifies the rules that so far were implicit:
intent stated on every test, spec section linked per attribute file,
t.Run for named table cases, error assertions on config path + message,
and the stages the load helpers silently skip.

AGENTS.md points agents at it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-09-02 18:41:28 +02:00

1 KiB

compose-go — agent instructions

compose-go is the reference implementation of the Compose Specification, consumed by Docker Compose and other Compose implementations.

Build & Test

  • Test all: make test (or go test ./...)
  • Test one package: go test ./loader/...
  • Lint: golangci-lint run (config in .golangci.yml)

Tests are the contract

Read TESTING.md before writing or modifying any test. In short: tests are the executable counterpart of the spec — one conformance file per attribute in loader/tests/ linking the spec section it locks, YAML-in/YAML-out expectations (assertMergeYaml, loadsAs) whenever the behavior is a document transformation, intent stated as a comment on every test, and t.Run for every named table case. The completeness test in loader/tests/completeness_test.go will fail if a schema attribute is added without a declared test.

Git

  • Every commit must carry a DCO Signed-off-by trailer (git commit -s).