Skip to content

Commit 28b1235

Browse files
authored
Merge branch 'main' into adk-api-server
2 parents db928b2 + 0287d46 commit 28b1235

220 files changed

Lines changed: 19610 additions & 7872 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-git/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Self-check before committing: read your subject line and ask "does this tell me
7373
4. **50 char limit** on subject line when possible, max 72.
7474
5. **Use body for context** - Add a blank line then explain _why_,
7575
not _how_, when the subject alone isn't enough.
76+
6. **Reference GitHub issues** - If the commit fixes a GitHub issue, include "Fixes #<issue-number>" or "Closes #<issue-number>" (or the full issue URL if cross-repository) in the commit message body.
7677

7778
### Examples
7879

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
name: adk-issue-analyze
3+
description: Analyze and triage a GitHub issue for the adk-python repository. Use this skill to retrieve issue details, inspect the codebase, evaluate legitimacy, check for existing PRs, and produce a structured analysis report.
4+
---
5+
6+
# ADK Issue Triage & Analysis (Read-Only)
7+
8+
This skill provides a structured workflow for analyzing, verifying, and triaging GitHub issues from the `google/adk-python` repository. When instructed to analyze/triage an issue, follow this read-only workflow.
9+
10+
> [!IMPORTANT]
11+
> This skill is strictly **read-only**: Do NOT modify any code, create new branches, or write any implementation during this phase.
12+
13+
## Step 1: Retrieve and Parse the Issue
14+
1. **Extract the issue number**: Parse the number from the link or prompt (e.g., `https://github.com/google/adk-python/issues/5882` -> `5882`).
15+
2. **Fetch issue details**: Use the `gh` CLI tool to fetch issue details in JSON format:
16+
```bash
17+
gh issue view <issue_number> --repo google/adk-python --json number,title,body,state,labels,comments,assignees,createdAt,closedAt
18+
```
19+
*If the `gh` CLI is not available or errors out, use `read_url_content` to fetch the public GitHub issue page:*
20+
```
21+
https://github.com/google/adk-python/issues/<issue_number>
22+
```
23+
24+
---
25+
26+
## Step 2: Deep Investigation & Analysis
27+
Address the following four critical questions and present your findings in a structured, premium report.
28+
29+
### 1. What is broken?
30+
Explain the root cause of the issue or failure:
31+
- **Trace the execution flow**: Identify which components, classes, or functions are malfunctioning.
32+
- **Pinpoint the bug**: Detail why the system is behaving incorrectly and where the failure originates (e.g. incorrect logic, missing configuration, unhandled states).
33+
34+
### 2. Is the issue legitimate?
35+
Inspect the codebase to confirm if the issue represents a real problem:
36+
- **Examine the description**: Identify the component, class, function, or file referenced.
37+
- **Search the codebase**: Use `grep_search` to locate the relevant files/functions in the local workspace.
38+
- **Inspect the code**: Open the files using `view_file` to analyze the code's current logic.
39+
- **Verify the bug**:
40+
- Is the reported problem actually present in the code?
41+
- Does it produce the reported error or behavior under the current version (ADK 2.0)?
42+
- Is it a documentation typo, setup discrepancy, or a genuine code/logic bug?
43+
- **Document your code evidence**: Reference specific file paths and line ranges (using clickable markdown file links, e.g., `[skill_toolset.py](file:///path/to/file#L123)`) in your report.
44+
45+
### 3. Should we fix it?
46+
Formulate a recommendation on whether the issue should be addressed:
47+
- **Assess the impact**:
48+
- Does it break core functionality?
49+
- Does it affect standard developer workflows or introduce brittle workarounds?
50+
- Is it a high-priority bug or a low-impact cosmetic/feature request?
51+
- **Check alignment**:
52+
- Does the suggested solution align with `adk-architecture` and `adk-style`?
53+
- Is it consistent with Python idioms and Pydantic validation rules?
54+
- **Evaluate workarounds**: Is there a clean workaround, or is a core fix necessary?
55+
- **Final Recommendation**: Clearly declare whether we should fix it, along with the reasoning and estimated complexity/scope of the fix.
56+
57+
### 4. Is there a linked PR that fixes this issue?
58+
Search for any existing pull requests that attempt to resolve the issue:
59+
- **Search PRs**: Run `gh pr list --repo google/adk-python --search "<issue_number>"` to list pull requests mentioning the issue number in the branch name, title, or body.
60+
- **Verify the PR details**: If PRs are found, fetch their details:
61+
```bash
62+
gh pr view <pr_number> --repo google/adk-python --json number,title,state,url,body,author
63+
```
64+
- **Analyze progress**: Check if the PR is open, merged, or closed, and if it successfully fixes the issue according to the repository's testing patterns.
65+
- **Present the structured report**: Format and present your findings structured as a premium report following the **Report Template** below.
66+
67+
---
68+
69+
## Report Template
70+
71+
Present your final analysis as a high-quality markdown response using the following structure:
72+
73+
```markdown
74+
# GitHub Issue #<issue_number> Analysis: <Issue Title>
75+
76+
## Detailed Analysis
77+
78+
### 1. Root Cause Analysis ("What is broken?")
79+
- Explanation of the failure or bug (what is failing and why).
80+
- Pinpoint the exact file, function, or design component that is malfunctioning.
81+
82+
### 2. Legitimacy Analysis
83+
- **Status**: [Legitimate Bug / Feature Request / Duplicate / Invalid / Not Reproducible]
84+
- **Evidence**:
85+
- Code references: [filename.py](file:///absolute/path/to/file#L100-L120)
86+
- Analysis of code behavior and why the issue occurs.
87+
88+
### 3. Fix Recommendation
89+
- **Recommendation**: [Should Fix (High Priority) / Should Fix (Medium/Low Priority) / Won't Fix / Needs Discussion]
90+
- **Rationale**:
91+
- Impact on user experience, workflows, or architecture.
92+
- Implementation complexity and risk of side effects.
93+
94+
### 4. Existing Pull Requests
95+
- **Linked PR**: [None / Pull Request #<pr_number> - <PR Title> (<state>)]
96+
- **PR URL**: <PR URL>
97+
- **Analysis**: Brief summary of the PR's approach and status (e.g., "Fixes the bug by implementing X in Y, currently awaiting review").
98+
99+
---
100+
101+
## Executive Summary
102+
1. **What is broken?** [Brief explanation of the root cause or error]
103+
2. **Is the issue legitimate?** [Yes / No - brief explanation]
104+
3. **Should we fix it?** [Yes / No / Needs Discussion - priority & brief reasoning]
105+
4. **Is there a linked PR that fixes this issue?** [None / Yes, PR #<pr_number> - <state>]
106+
```
107+
108+
---
109+
110+
## Tips & Best Practices
111+
> [!TIP]
112+
> Always use explicit repository qualifiers (`--repo google/adk-python`) when running `gh` commands to avoid failures due to custom internal or local git remotes.
113+
114+
> [!IMPORTANT]
115+
> When presenting code files and lines, always use markdown file links that point directly to the files in the workspace. Make sure the link is clickable and formatted as `[filename.py](file:///absolute/path/to/file#L100-L120)` without surrounding backticks around the brackets.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: adk-issue-fix
3+
description: Implement a bug fix or feature for a GitHub issue in the adk-python repository. Use this skill after the triage/analysis is complete and approved. It creates a new branch, implements code changes, adds tests, and updates relevant documentation/samples.
4+
---
5+
6+
# ADK Issue Fix Implementation
7+
8+
This skill provides a structured workflow for implementing bug fixes or new features for GitHub issues in the `google/adk-python` repository. Only invoke/use this skill once the user has approved the fix.
9+
10+
## Implementation Steps
11+
12+
### 1. Base the Branch on Remote HEAD & Create Branch
13+
- **Do NOT commit the changes**: Leave them uncommitted in the workspace so the user can review and iterate on them.
14+
- **Base the branch on remote HEAD**: When creating the new branch, ensure it is based on the remote tracking branch HEAD (`origin/main`), not the current local branch. For example:
15+
```bash
16+
git checkout -b fix/<issue_number>-<desc> origin/main
17+
```
18+
19+
### 2. Implement the Fix
20+
- Modify the necessary source files implementing clean, robust logic following `adk-style` and `adk-architecture`.
21+
22+
### 3. Add or Update Unittests
23+
- Write comprehensive unit tests to verify the behavior and prevent regressions. Refer to the testing patterns in the testing guides.
24+
25+
### 4. Update Documentation & Samples
26+
- Update `/docs/design` and `/docs/guides` if applicable to the changes.
27+
- Update `/contributing/samples` if applicable to demonstrate the new capability or updated behavior.

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: adk-issue
3+
description: Orchestrate analyzing and triaging GitHub issues for the adk-python repository. Use this skill when a user provides a GitHub issue number or link. It coordinates triage analysis via `adk-issue-analyze` and implementation via `adk-issue-fix`. Triggers on "analyze issue", "issue #", "github issue", "github.com/google/adk-python/issues/".
4+
---
5+
6+
# ADK Issue Resolution Orchestrator
7+
8+
This skill orchestrates the analysis, triage, and resolution of GitHub issues for the `google/adk-python` repository. When a user provides a GitHub issue number or link, follow this two-phase workflow by delegating/calling the specific sub-skills:
9+
10+
## Phase 1: Triage and Analysis (Read-Only)
11+
1. **Delegate to `adk-issue-analyze`**: Follow the instructions in the `adk-issue-analyze` skill (located at `.agents/skills/adk-issue-analyze/SKILL.md`) to fetch the issue, inspect the codebase, evaluate legitimacy, search for existing PRs, and present a structured analysis report.
12+
2. **CRITICAL**: Do NOT modify any code, create new branches, or write any implementation yet.
13+
3. **Ask for Approval**: Present the report and explicitly ask the user:
14+
> "Would you like me to create and implement a fix for this issue in the workspace? (Note: The changes and tests will be created in a new branch but NOT committed, so you can review and iterate on them.)"
15+
4. **Wait for Approval**: Do not proceed to Phase 2 until the user explicitly approves.
16+
17+
## Phase 2: Implementation (After User Approval)
18+
1. **Delegate to `adk-issue-fix`**: Once the user approves, follow the instructions in the `adk-issue-fix` skill (located at `.agents/skills/adk-issue-fix/SKILL.md`) to create the branch, implement the fix, add/update tests, update docs, and update samples.

0 commit comments

Comments
 (0)