agents: keep agent script tests co-located with agent code (#4498)

Agent script tests under `.agents/` belong alongside the scripts they
exercise rather than under `tests/`, which tests `rules_python` itself.

Move `cleanup_test.py` and its Bazel `py_test` target back to
`.agents/skills/conversation-done/scripts/`, remove `tests/agents/`, and
document co-locating `.agents/` tests in `AGENTS.md` and `testing.md`.
diff --git a/.agents/rules/testing.md b/.agents/rules/testing.md
index df023fc..8a56157 100644
--- a/.agents/rules/testing.md
+++ b/.agents/rules/testing.md
@@ -48,7 +48,10 @@
 ## Test Organization
 * **Domain Placement**: Place tests by the feature tested (e.g.,
   `tests/bootstrap_impls/`), not by the fixture helper used (e.g.,
-  `py_extension`).
+  `py_extension`). Keep tests and `BUILD.bazel` targets for `.agents/` scripts
+  co-located with the agent code (not under `tests/`), and run them via
+  `bazel test --config=fast-tests //.agents/...` since `//tests/...` does not
+  cover `.agents/`.
 * **Platform Constraints**: Restrict OS-specific targets with
   `target_compatible_with` (e.g., `["@platforms//os:windows"]`) to skip on
   incompatible platforms.
diff --git a/.agents/skills/conversation-done/scripts/BUILD.bazel b/.agents/skills/conversation-done/scripts/BUILD.bazel
index 1992045..e06e8e6 100644
--- a/.agents/skills/conversation-done/scripts/BUILD.bazel
+++ b/.agents/skills/conversation-done/scripts/BUILD.bazel
@@ -1,6 +1,21 @@
-package(default_visibility = ["//tests:__subpackages__"])
+load("//python:py_library.bzl", "py_library")
+load("//python:py_test.bzl", "py_test")
+load("//tests/support:support.bzl", "NOT_WINDOWS")
 
-exports_files(
-    ["cleanup.py"],
-    visibility = ["//tests:__subpackages__"],
+package(default_visibility = ["//visibility:private"])
+
+py_library(
+    name = "cleanup",
+    testonly = True,
+    srcs = ["cleanup.py"],
+    imports = ["."],
+    target_compatible_with = NOT_WINDOWS,
+)
+
+py_test(
+    name = "cleanup_test",
+    size = "small",
+    srcs = ["cleanup_test.py"],
+    target_compatible_with = NOT_WINDOWS,
+    deps = [":cleanup"],
 )
diff --git a/tests/agents/cleanup_test.py b/.agents/skills/conversation-done/scripts/cleanup_test.py
similarity index 100%
rename from tests/agents/cleanup_test.py
rename to .agents/skills/conversation-done/scripts/cleanup_test.py
diff --git a/AGENTS.md b/AGENTS.md
index 07768b1..c762122 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -176,7 +176,9 @@
 
 ## Building and testing
 
-Tests are under the `tests/` directory.
+Tests are under the `tests/` directory, except tests for agent scripts under
+`.agents/`, which stay co-located with the agent code (run with
+`bazel test --config=fast-tests //.agents/...`).
 
 When testing, add `--config=fast-tests`.
 
diff --git a/tests/agents/BUILD.bazel b/tests/agents/BUILD.bazel
deleted file mode 100644
index 2b24178..0000000
--- a/tests/agents/BUILD.bazel
+++ /dev/null
@@ -1,19 +0,0 @@
-load("//python:py_library.bzl", "py_library")
-load("//python:py_test.bzl", "py_test")
-load("//tests/support:support.bzl", "NOT_WINDOWS")
-
-py_library(
-    name = "cleanup_lib",
-    testonly = True,
-    srcs = ["//.agents/skills/conversation-done/scripts:cleanup.py"],
-    imports = ["../../.agents/skills/conversation-done/scripts"],
-    target_compatible_with = NOT_WINDOWS,
-)
-
-py_test(
-    name = "cleanup_test",
-    size = "small",
-    srcs = ["cleanup_test.py"],
-    target_compatible_with = NOT_WINDOWS,
-    deps = [":cleanup_lib"],
-)