mcpField
A
adk-unit-design

adk-unit-design

github.com/googleDevelopment22.0k69 installsUpdated today
Repository

About adk-unit-design

adk-unit-design is a skill for documenting code units as implemented, aimed at developers assessing the impact of changes. It grounds design documents in source, tests, interfaces, and usage examples.

Key features

  1. 01Analyzes purpose, flow, and dependencies
  2. 02Identifies extension points and constraints
  3. 03Places documents under docs/design/
  4. 04Updates existing documents in place
  5. 05Links references to GitHub source

Use cases

  1. 01Assess risks before changing a class or method
  2. 02Document a unit using its tests and source
  3. 03Keep design documentation aligned with code

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/google/adk-python --skill adk-unit-design

After installing, type/adk-unit-designin Claude Code to confirm it loaded.

Bundled filesreferences/design-template.md

Details

From the project README

ADK code unit design

A unit design documents a code unit as implemented, the way a unit test exercises it as implemented. Nothing proposed or aspirational belongs in one. The reader is deciding what they may safely change, so answer "what breaks if I touch this?" — not "how do I call this?".

Inputs

Require the source file, or a class or method named inside it. Also read, when they exist: the base classes and interfaces the unit implements, its unit tests (the best evidence of intended behaviour), and example usage.

Analyse before writing

Answer each of these from the source. Anything the code does not show stays out of the document — do not infer a design intent from a name.

  • Purpose and intended use of the unit.
  • Execution flow, and the data that flows in and out.
  • Upstream dependencies, and which classes depend on this unit.
  • Extension surfaces: abstract methods, hooks, callbacks, configurable fields.
  • Constraints — what a subclass or caller must not change, and why.
  • Operational limitations.

Where the document goes

Mirror the source path under docs/design/, one directory per unit, document named index.md. Drop the leading underscore of a private module:

SourceDesign document
src/google/adk/workflow/_function_node.pydocs/design/workflow/function_node/index.md
src/google/adk/events/event.pydocs/design/events/event/index.md

If a document already exists at that path, update it in place and keep the existing wording wherever the code has not changed, so the diff shows only what the change actually altered.

docs/design/ does not exist in this repository yet — the first design document creates it. docs/guides/ is the established sibling tree; match its directory shape.

Link to GitHub, not to local paths

These documents render on GitHub, where a local filesystem path is dead. Rewrite {repo_root}/src/google/adk/{topic}/{unit}.py#L93 as https://github.com/google/adk-python/blob/main/src/google/adk/{topic}/{unit}.py#L93.

Structure

Follow references/design-template.md section by section.

Comments

Markdown supported