Skip to content

Commit f440b1b

Browse files
authored
Merge branch 'main' into fix/issue-3575
2 parents f2f00c0 + 991431f commit f440b1b

139 files changed

Lines changed: 7067 additions & 1504 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/adk-review/SKILL.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,30 @@ This skill guides AI assistants in performing a comprehensive, rigorous review o
2424
- **Boundary and Null Conditions**: Ensure robust handling for boundary conditions and null values (e.g., `None`, empty collections, zero, or empty strings) using validation or fallback defaults.
2525
- **Preconditions & Invariants**: Validate that preconditions and state invariants are checked before performing core logic.
2626

27-
### 2. Style and Convention Compliance
27+
### 2. Code Quality & Design
28+
- **Complexity & Readability**: Identify overly complex functions or classes. Suggest refactoring (e.g., splitting functions, extracting helper classes) to improve readability and maintainability. Ensure code is self-documenting.
29+
- **Design Patterns**: Check if appropriate design patterns are used. Avoid anti-patterns. Ensure high cohesion and low coupling.
30+
- **Performance & Efficiency**: Look for performance bottlenecks, such as unnecessary database queries, redundant computations, inefficient loops, or excessive memory allocation.
31+
- **Security & Privacy**: Verify that inputs are validated, sensitive data is handled securely, and there are no potential security vulnerabilities (like injection, resource exhaustion, or exposure of internal state).
32+
33+
### 3. Style and Convention Compliance
2834
- **ADK Style Guide**: Cross-reference all code changes with the guidelines in the `adk-style` skill (including Pydantic v2 patterns, lazy logging evaluation, and file structure).
2935
- **Pre-commit Hooks**: Ensure changed files are formatted and linted. Remind the user to run `pre-commit run --files <files>` if hooks like `isort`, `pyink`, `addlicense`, or `mdformat` are not configured automatically.
3036

31-
### 3. Architectural Integrity & Unintended Outcomes
37+
### 4. Architectural Integrity & Unintended Outcomes
3238
- **Public API Stability**: Verify whether changes modify, remove, or restrict public-facing interfaces, classes, methods, argument lists, or CLI structures (e.g., in the public package namespaces under `src/google/adk/`). Breaking changes are unacceptable without a formal deprecation cycle under Semantic Versioning.
3339
- **Execution & Resumption**: If changing workflows, nodes, or state management, ensure compatibility with the ADK 2.0 event execution lifecycle and session resumption (HITL/checkpoints).
3440
- **Concurrency & Safety**: Check for race conditions or resource leaks. Ensure long-running or shared resources (like plugins, exporters, and connections) are closed/disposed of safely.
3541

36-
### 4. Documentation Impact (`docs/design` and `docs/guides`)
42+
### 5. Documentation Impact (`docs/design` and `docs/guides`)
3743
- **Design & Architecture**: Determine if the change updates a core design contract. If so, check if design docs under `docs/design/` require updates or new documents need to be written.
3844
- **Guides**: If the changes introduce a new feature or change a public API/workflow pattern, check if the guides under `docs/guides/` need updates.
3945

40-
### 5. Sample Compatibility & Updates
46+
### 6. Sample Compatibility & Updates
4147
- **Sample Integrity**: Verify if existing samples under `contributing/samples/` are affected by the change.
4248
- **New Samples**: If the changes introduce a key new capability, assess whether a new sample should be added to demonstrate the feature (following `adk-sample-creator` conventions).
4349

44-
### 6. Test Coverage & Quality
50+
### 7. Test Coverage & Quality
4551
- **Coverage**: Ensure that all modified or new code paths have corresponding unit or integration tests under `tests/`.
4652
- **ADK Test Rules**: Ensure test implementations adhere to the 9 rules in the `adk-style` testing reference (e.g., using deterministic IDs, event normalization, and clean up utilities).
4753

@@ -55,12 +61,13 @@ When the `adk-review` skill is triggered, you MUST execute the following steps:
5561
Run `git status` and `git diff` to identify exactly which files have been modified, added, or deleted.
5662

5763
### Step 2: Perform the Multi-Dimensional Review
58-
Analyze the retrieved diffs file-by-file against the six dimensions in the Checklist. Identify any errors, deviations, or missing files (such as docs, tests, or samples).
64+
Analyze the retrieved diffs file-by-file against the seven dimensions in the Checklist. Identify any errors, deviations, or missing files (such as docs, tests, or samples).
5965

6066
### Step 3: Generate and Present a Review Report
6167
Generate a clear, beautifully formatted Markdown report categorized by priority:
62-
- 🔴 **Critical Errors / Bugs**: Syntax, type safety violations, race conditions, or resource leaks.
63-
- 🟡 **Style & Conventions**: Lints, formatting issues, non-lazy logging, or typing mismatches.
68+
- 🔴 **Critical Errors, Bugs, & Security**: Syntax, type safety violations, race conditions, resource leaks, or security vulnerabilities.
69+
- 🟠 **Code Quality & Design**: High complexity, poor readability, performance bottlenecks, or architectural misalignment.
70+
- 🟡 **Style & Conventions**: Lints, formatting issues, non-lazy logging, or minor typing mismatches.
6471
- 🔵 **Documentation, Tests, & Samples**: Missing or stale test coverage, design docs, or user guides.
6572

6673
Include the specific filename and line number/context for each finding.

.agents/skills/adk-sample-creator/SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Each sample should have a `README.md` with the following structure:
9191
- **Sample Inputs**: Examples of inputs to test with. Each prompt must be wrapped in backticks. If a prompt has an explanation, always add a blank line between the prompt and the explanation, and indent the explanation by two spaces.
9292
- **Graph**: Visualization of the graph flow (Mermaid recommended for workflows).
9393
- **How To**: Explanation of key techniques used (e.g., `ctx.run_node`).
94+
- **Related Guides**: Links to relevant developer guides in `docs/guides/` that explain the concepts or classes used.
9495

9596
#### README Example Template:
9697

@@ -116,12 +117,13 @@ graph TD
116117
START --> MyNode
117118
```
118119

119-
````
120-
121120
## How To
122121

123122
Explain the details.
124123

124+
## Related Guides
125+
126+
- [Guide Title](../../docs/guides/path/to/guide.md) - Brief description of what the guide covers.
125127
````
126128

127129
## Examples

.agents/skills/adk-setup/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Set up the local development environment for ADK Python.
1010

1111
Check the following before proceeding:
1212

13-
1. **Python 3.11+**
13+
1. **Python 3.10+**
1414

1515
```bash
1616
python3 --version

.agents/skills/adk-unit-guide/SKILL.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This skill creates a detailed developer guide for new or updated code file or di
2828
- Look for an existing guide in the `/docs/guides/***` directory of this repository.
2929
- If a guide already exists, update the existing guide incrementally and prioritize preserving the previous content as much as possible.
3030
- If no guide exists, create a guide file for the new code unit in the `/docs/guides/***` directory of this repository, using the relative path of the code unit. For example, if the code unit is called `/topic/function/class.ext`, create a guide in the location `/docs/guides/topic/function/class/index.md`.
31+
- **Update the Index**: Whenever a new guide is created, or an existing guide's title/summary changes, update the index file `/docs/guides/README.md`. Ensure the guide is listed under the correct category with a link and a brief summary.
3132

3233
### Guide structure and content
3334

@@ -50,6 +51,8 @@ Use the following structure and instructions to create the guide for the code un
5051
- Present a single, minimum implementation of the code unit to demonstrate its use.
5152
- Show enough of the containing classes to make it clear where the code could be used.
5253
- Use unit test code as a starting point for the code example, if available.
54+
- When writing a sample agent, do not set the `model` attribute.
55+
- For workflow node samples, prefer using a simple Python function rather than extending `BaseNode` to demonstrate the node's logic, unless class extension is explicitly required for the use case.
5356
5457
## How it works
5558
@@ -60,7 +63,8 @@ Use the following structure and instructions to create the guide for the code un
6063
6164
## Configuration options
6265
63-
- If the code unit has configuration options, document them in a table detailing parameters, types, default values, and descriptions.
66+
- If the code unit has configuration options (e.g., settings, configuration objects), document them in a table detailing parameters, types, default values, and descriptions.
67+
- **Do NOT** list references of all attributes or methods of the classes. Exhaustive API references belong in auto-generated reference documentation, not in guides. Guides should focus on how to use the code unit.
6468
6569
## Advanced applications
6670
@@ -73,4 +77,8 @@ Use the following structure and instructions to create the guide for the code un
7377
7478
- Mention any limitations of the code unit, if known.
7579
76-
```
80+
## Related samples
81+
82+
- Link to relevant samples in the `contributing/` directory that demonstrate the use of this code unit.
83+
84+
```

.github/workflows/analyze-releases-for-adk-docs-updates.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ jobs:
5252
uses: actions/cache/restore@v4
5353
with:
5454
path: contributing/samples/adk_team/adk_documentation/adk_release_analyzer/sessions.db
55-
key: analyzer-session-db
55+
key: analyzer-session-db-${{ github.run_id }}-${{ github.run_attempt }}
56+
restore-keys: |
57+
analyzer-session-db-
5658
5759
- name: Run Analyzing Script
5860
env:
@@ -88,4 +90,4 @@ jobs:
8890
uses: actions/cache/save@v4
8991
with:
9092
path: contributing/samples/adk_team/adk_documentation/adk_release_analyzer/sessions.db
91-
key: analyzer-session-db
93+
key: analyzer-session-db-${{ github.run_id }}-${{ github.run_attempt }}

.github/workflows/copybara-pr-handler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717

1818
jobs:
1919
close-imported-pr:
20+
if: github.repository == 'google/adk-python'
2021
runs-on: ubuntu-latest
2122
permissions:
2223
pull-requests: write

.github/workflows/issue-monitor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030

3131
jobs:
3232
sweep-spam:
33+
if: github.repository == 'google/adk-python'
3334
runs-on: ubuntu-latest
3435
timeout-minutes: 120
3536
permissions:

.github/workflows/python-unit-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ jobs:
3939
run: |
4040
source .venv/bin/activate
4141
pytest tests/unittests \
42+
-n auto \
4243
--ignore=tests/unittests/artifacts/test_artifact_service.py \
4344
--ignore=tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ repos:
1111
rev: v2.24.0
1212
hooks:
1313
- id: pyproject-fmt
14+
- repo: https://github.com/astral-sh/ruff-pre-commit
15+
rev: v0.15.17
16+
hooks:
17+
- id: ruff
18+
args: [--fix]
19+
files: ^src/
1420
- repo: https://github.com/PyCQA/isort
1521
rev: 8.0.1
1622
hooks:

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ For detailed architecture patterns, component descriptions, and core interfaces,
5151

5252
## Development Setup
5353

54-
The project uses `uv` for package management and Python 3.11+. Please refer to the **`adk-setup`** skill at `.agents/skills/adk-setup/SKILL.md` for detailed instructions.
54+
The project uses `uv` for package management and Python 3.10+. Please refer to the **`adk-setup`** skill at `.agents/skills/adk-setup/SKILL.md` for detailed instructions.

0 commit comments

Comments
 (0)