Choose names that clearly convey purpose and intent rather than generic or ambiguous terms. Names should be specific enough to understand functionality without requiring additional context.
Choose names that clearly convey purpose and intent rather than generic or ambiguous terms. Names should be specific enough to understand functionality without requiring additional context.
Avoid generic names:
utils, helpers, or base when more specific alternatives existclass Executor, use class ConcurrentExecutor or class SequentialExecutorutils.py with specific names like validation.py or formatting.pyUse semantically meaningful names:
serialize_state() and deserialize_state() instead of ambiguous alternativesnext_nodes_to_execute (plural) instead of next_node_to_execute when referring to multiple itemstimeout instead of timeout_seconds when accepting a timedelta objectChoose appropriate specificity:
get_agent_card() instead of the vague _discover_agent_card()name_override instead of the verbose agent_facing_tool_nameoutput_type instead of structured_output_type when the context makes “structured” redundantExample:
# Avoid generic names
class Executor: # Too generic
pass
# Use descriptive names
class ConcurrentToolExecutor: # Clear purpose and scope
def serialize_state(self) -> dict: # Clear action
pass
def get_next_nodes(self) -> list[str]: # Clear return type
pass
This approach improves code readability and reduces the need for additional documentation to understand component purposes.
Enter the URL of a public GitHub repository