Imported from eshu-hq/eshu (
go/internal/parser/gradle/selector/AGENTS.md). Install upstream withnpx skills add eshu-hq/eshu --skill selector. Copyright stays with the author.
AGENTS.md - internal/parser/gradle/selector guidance
Read first
README.md- why the rule exists and who shares it.doc.go- godoc contract.exact.go-Exact, the single exact-version rule.testdata/versions.txt- the table every Gradle reader must agree with.
Invariants this package enforces
Exactfails closed. Unknown or odd text is not exact; a reader then marks the row unresolved. Never widen it to accept a selector to "recover" a version.- Imports only the Go standard library. No telemetry, no allocation
(
TestExactAllocatesNothing). - Every Gradle reader that marks a version resolved calls
Exactand tests itself againsttestdata/versions.txt. Do not fork a second rule.
Common changes and how to scope them
- A new Gradle selector form: add a
not-exactrow totestdata/versions.txtfirst (cite the Gradle doc in the commit), watch the reader tests fail, then changeexact.go. - Table text must hold no whitespace or quote, so reader tests can embed it in any notation.
- Keep
go/internal/reducer/payloadcore.ExactManifestDependencyVersionin step: it is the reducer-side backstop and must reject the same selector families, without rejecting other ecosystems' exact forms (an interior+is semver build metadata there).
