AGENTS.md is read on every task, so it keeps routing, the hard stops, the install and keyword gates and the completion report, and drops to 514 words; all rule files together drop from 7546 to 5783 words. Rules state the result to reach, and keep a prohibition only where a mistake is hard to undo or a reviewer has caught it before. Lessons from reviewed PRs: PATCHES carried over a bump, Go -ldflags without -s or -w, RUST_MIN_VER from the highest rust-version, cargo QA_FLAGS_IGNORED, ISA gating through cpu_flags, Python Requires-Dist, draft PRs for eclass provider slots missing from ::gentoo, skel.ebuild variable order, DependencyMissingKeywords, and the Go vendor layout. The PR template asks for the reason, a Tested: line and two checks, and names the merge-base scan range so it is not read as a bare --commits. Signed-off-by: Zakk <zakk@gentoozh.org>
1.7 KiB
1.7 KiB
Eclass Discovery
Read with: AGENTS.md § Ebuild Policy for how to find precedent; version-bumps.md when an EAPI bump rides on a version bump.
- Prefer the local main tree when available; resolve it with
portageq get_repo_path / gentoo. - Search current eclass/construct usage and gentoo.git pickaxe (
-S) history for adoption or removal; the skill supplies runnable searches. - Before inheriting, read supported EAPIs, deprecation status, pre-inherit/call-time variables, exports, phases, and defaults.
- On EAPI bumps, audit the whole ebuild, including disabled USE branches, generated dependencies, dead helpers, and changed eclass defaults.
- Compose overlapping exported phases explicitly. Overrides call the eclass implementation where its behavior must remain;
defaultinvokes the EAPI implementation. - Prefer clear phase code over inheriting an eclass for one helper when current precedent agrees. Leave eclass-owned assignments to the eclass:
git-r3appendsPROPERTIES="live";cargoownsCARGO_HOME;go-moduleownsGOCACHE,GOMODCACHE, andGOPROXY. cargo.eclassGIT_CRATESwrites[patch.'<git url>'], which cannot override upstream[patch.crates-io] name = { git = … }. KeepGIT_CRATESforSRC_URI; rewrite that upstream entry topath = "${WORKDIR}/<repo>-<commit>"insrc_prepare. MatchCargo.lock's URL exactly, including renamed organizations andRedirectedUrlfindings: Cargo keys offline sources by that string.metadata/install-qa-check.d/60go-module-eclasstakes the highestgodirective across all${WORKDIR}modules. Remove an unused sub-module insrc_prepareonly when no build, test, or install path uses it; otherwise raise the floor.