From 312bb8c846e35d34cf6c245841972ae3b66d3921 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sun, 9 Aug 2026 02:29:57 +0000 Subject: [PATCH] agents(rules): document linking external objects in TypedDict docstrings When defining TypedDict structures that represent external objects or schemas, agents and developers need clear provenance and context for the fields and their semantics. Update the agent Python rules to establish a convention requiring TypedDict docstrings to include a link to the external object's original definition. --- .agents/rules/python.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.agents/rules/python.md b/.agents/rules/python.md index 523cc923cd..2db6e70a45 100644 --- a/.agents/rules/python.md +++ b/.agents/rules/python.md @@ -3,6 +3,10 @@ ## pytest * **Fixture Registration via `pytest_plugins`**: When registering pytest helper modules in test files, use `pytest_plugins = [""]`. -* **Fixture Naming Conventions**: Name fixture functions with a `fixture_` prefix - (e.g. `def fixture_foo():`), and pass the public fixture name using the `name` - parameter in `@pytest.fixture(name="foo")`. +* **Fixture Naming Conventions**: Name fixture functions with a `fixture_` + prefix (e.g. `def fixture_foo():`), and pass the public fixture name using the + `name` parameter in `@pytest.fixture(name="foo")`. + +## TypedDict +* **External Objects**: When defining a `TypedDict` for an external object, + link to its definition in the docstring.