mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
chore: update agents.md to include versioning strategy
Adds a description for docstring and comments in the AGENTS.md and adds a section for Versioning that describes how ADK follows Semantic Versioning 2.0.0 PiperOrigin-RevId: 778667398
This commit is contained in:
committed by
Copybara-Service
parent
b04a5cebb8
commit
6a39c854e0
@@ -112,3 +112,88 @@ Run below command:
|
||||
```bash
|
||||
$ pytest tests/unittests
|
||||
```
|
||||
|
||||
## Docstring and comments
|
||||
|
||||
### Comments - Explaining the Why, Not the What
|
||||
Philosophy: Well-written code should be largely self-documenting. Comments
|
||||
serve a different purpose: they should explain the complex algorithms,
|
||||
non-obvious business logic, or the rationale behind a particular implementation
|
||||
choice—the things the code cannot express on its own. Avoid comments that
|
||||
merely restate what the code does (e.g., # increment i above i += 1).
|
||||
|
||||
Style: Comments should be written as complete sentences. Block comments must
|
||||
begin with a # followed by a single space.
|
||||
|
||||
## Versioning
|
||||
ADK adherence to Semantic Versioning 2.0.0
|
||||
|
||||
Core Principle: The adk-python project strictly adheres to the Semantic
|
||||
Versioning 2.0.0 specification. All release versions will follow the
|
||||
MAJOR.MINOR.PATCH format.
|
||||
|
||||
### Breaking Change
|
||||
|
||||
A breaking change is any modification that introduces backward-incompatible
|
||||
changes to the public API. In the context of the ADK, this means a change that
|
||||
could force a developer using the framework to alter their existing code to
|
||||
upgrade to the new version. The public API is not limited to just the Python
|
||||
function and class signatures; it also encompasses data schemas for stored
|
||||
information (like evaluation datasets), the command-line interface (CLI),
|
||||
and the data format used for server communications.
|
||||
|
||||
### Public API Surface Definition
|
||||
|
||||
The "public API" of ADK is a broad contract that extends beyond its Python
|
||||
function signatures. A breaking change in any of the following areas can
|
||||
disrupt user workflows and the wider ecosystem of agents and tools built with
|
||||
ADK. The analysis of the breaking changes introduced in v1.0.0 demonstrates the
|
||||
expansive nature of this contract. For the purposes of versioning, the ADK
|
||||
Public API Surface is defined as:
|
||||
|
||||
- All public classes, methods, and functions in the google.adk namespace.
|
||||
|
||||
- The names, required parameters, and expected behavior of all built-in Tools
|
||||
(e.g., google_search, BuiltInCodeExecutor).
|
||||
|
||||
- The structure and schema of persisted data, including Session data, Memory,
|
||||
and Evaluation datasets.
|
||||
|
||||
- The JSON request/response format of the ADK API server(FastAPI server)
|
||||
used by adk web, including field casing conventions.
|
||||
|
||||
- The command-line interface (CLI) commands, arguments, and flags (e.g., adk deploy).
|
||||
|
||||
- The expected file structure for agent definitions that are loaded by the
|
||||
framework (e.g., the agent.py convention).
|
||||
|
||||
#### Checklist for Breaking Changes:
|
||||
|
||||
The following changes are considered breaking and necessitate a MAJOR version
|
||||
bump.
|
||||
|
||||
- API Signature Change: Renaming, removing, or altering the required parameters
|
||||
of any public class, method, or function (e.g., the removal of the list_events
|
||||
method from BaseSessionService).
|
||||
|
||||
- Architectural Shift: A fundamental change to a core component's behavior
|
||||
(e.g., making all service methods async, which requires consumers to use await).
|
||||
|
||||
- Data Schema Change: A non-additive change to a persisted data schema that
|
||||
renders old data unreadable or invalid (e.g., the redesign of the
|
||||
MemoryService and evaluation dataset schemas).
|
||||
|
||||
- Tool Interface Change: Renaming a built-in tool, changing its required
|
||||
parameters, or altering its fundamental purpose (e.g., replacing
|
||||
BuiltInCodeExecutionTool with BuiltInCodeExecutor and moving it from the tools
|
||||
parameter to the code_executor parameter of an Agent).
|
||||
|
||||
- Configuration Change: Altering the required structure of configuration files
|
||||
or agent definition files that the framework loads (e.g., the simplification
|
||||
of the agent.py structure for MCPToolset).
|
||||
|
||||
- Wire Format Change: Modifying the data format for API server interactions
|
||||
(e.g., the switch from snake_case to camelCase for all JSON payloads).
|
||||
|
||||
- Dependency Removal: Removing support for a previously integrated third-party
|
||||
library or tool type.
|
||||
Reference in New Issue
Block a user