You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Creates or updates code unit design documents for source code documentation.
4
+
---
5
+
6
+
# ADK Code Unit Design
7
+
8
+
This skill creates or updates a detailed software engineering design document for new or updated code file or specified code unit. The design document it generates is meant to explain the code to a developer who wants to modify or extend the code unit as part of the ADK development framework. Similar to a *unit test*, a *unit design* provides a generated software engineering design based on the *actual, implemented code* rather than any proposed code design or proposed software architecture.
9
+
10
+
## Input
11
+
12
+
- Code files containing new functionality
13
+
- Names of new methods and classes (optional)
14
+
- Code files for base classes or interfaces that the new functionality depends on (optional)
15
+
- Code unit tests (optional)
16
+
- Example code files (optional)
17
+
18
+
## Analysis
19
+
20
+
- Review specified code files for changes and named methods to determine:
21
+
- Purpose and intended use of the new or updated code units
22
+
- Any data flows handled by the new or updated code units
23
+
- Dependencies required by the new or updated code units
24
+
- Approaches for extending or customizing the code unit to add new capabilities
25
+
- Classes that depend on the new or updated code units
26
+
- Operational limitations of the new or updated code units
27
+
28
+
## Output
29
+
30
+
- Look for an existing design document in the `/docs/design/***` directory of this repository.
31
+
- If a design already exists, update the existing design incrementally and prioritize preserving the previous content as much as possible.
32
+
- If no design document exists, create a design file for the new code unit in the `/docs/design/***` 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 design document in the location `/docs/design/topic/function/class/index.md`.
33
+
- Any links to local code files should be translated to URL links to the `google/adk-python` repository on GitHub. For example, if the local code unit path is `***/adk-python/topic/function/class.ext#L93`, the URL to the code file should be `https://github.com/google/adk-python/blob/main/topic/function/class.ext#L93`.
34
+
35
+
### Design document structure and content
36
+
37
+
Use the following structure and instructions to create the design document for the code unit:
38
+
39
+
```
40
+
# (name of code unit or code file) - Code Unit Design
41
+
42
+
- 2-sentence summary of the code unit
43
+
44
+
## Introduction
45
+
46
+
- Paragraph(s) explaining:
47
+
- The purpose and application of the code unit, including intended use cases
48
+
- Developer problems solved by this code unit
49
+
- Agent capabilities enabled by this code unit
50
+
51
+
## High-level architecture
52
+
53
+
- Describe the software architecture of this code unit and how it fits into the larger ADK framework
54
+
- Explain general execution flow of this code unit
55
+
- Describe any data flows handled by the code unit including inputs and outputs
56
+
- Explain any cross-class dependencies of the code unit, including upstream dependencies and downstream dependencies
57
+
58
+
### Extension points
59
+
60
+
- Describe how the code unit could be extended or customized to add new features or capabilities
61
+
- Note specific parts of the code unit that are designed to be extended or customized, including:
62
+
- Abstract classes
63
+
- Interfaces
64
+
- Hooks
65
+
- Callbacks
66
+
- Configurable parameters
67
+
- Plugin architecture
68
+
- Other extension points
69
+
70
+
### Extension constraints
71
+
72
+
- Describe what parts of the code unit should not be modified, based on:
73
+
- architectural constraints
74
+
- implementation limitations
75
+
- cross-class dependencies
76
+
- other constraints
77
+
78
+
## Limitations
79
+
80
+
- Mention any limitations of the code unit, if known, such as:
0 commit comments