chore: enforce top-level imports with ruff PLC0415
enable the import-outside-top-level lint rule to catch deferred imports.
existing legitimate uses (circular imports, optional deps) are marked with
# noqa: PLC0415.
this creates an "electric fence" - new deferred imports will fail the lint
unless explicitly marked, while documenting all existing exceptions.
fix deferred imports in test, add guidance to AGENTS.md
- move signal and TerminationSignal imports to top of test file
- add explicit guidance to avoid deferred imports unless necessary