agents(rules): document linking external objects in TypedDict docstrings (#4022) 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.
diff --git a/.agents/rules/python.md b/.agents/rules/python.md index 22221fe..200295e 100644 --- a/.agents/rules/python.md +++ b/.agents/rules/python.md
@@ -9,3 +9,7 @@ * Use direct attribute access (e.g. `args.foo`) on `argparse.Namespace` with well-defined shapes. Avoid defensive `getattr()`. +## TypedDict +* **External Objects**: When defining a `TypedDict` for an external object, + link to its definition in the docstring. +