# Import alias guardrail

`scripts/check-import-aliases.py` audits explicit aliases on local Go imports under
`github.com/tidbcloud/AgentTeam/...`, including the MeshX domain packages.

An alias is allowed only when removing it would create a same-file name conflict:

- another import already uses the imported package's default name;
- or the current file's own `package` name equals the imported package's default name.

The guardrail ignores generated files, `vendor/`, `.worktrees/`, `.claude/`, `.data/`, `node_modules/`, and all `x/` external-sync trees. `baseline.txt` records existing non-conflicting aliases so `make check-import-aliases` blocks new debt while follow-up PRs remove the baseline entries in batches.
