com um clique
update-a2a-spec
// Update the A2A TCK when the A2A protocol specification changes. Use when the user mentions updating the spec, syncing with upstream A2A, or when a new version of the A2A protocol is released.
// Update the A2A TCK when the A2A protocol specification changes. Use when the user mentions updating the spec, syncing with upstream A2A, or when a new version of the A2A protocol is released.
Work with the a2a-java SUT (System Under Test). Use when the user wants to regenerate the Java SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
Work with the a2a-jakarta SUT (System Under Test). Use when the user wants to regenerate the Jakarta SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
Work with the a2a-python SUT (System Under Test). Use when the user wants to regenerate the Python SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
Diagnose a TCK requirement failure and draft a GitHub issue with the requirement context, failure details, and a curl reproducer. Use when the user wants to report a failing requirement, understand why it failed, or create a bug report for an SUT implementor.
Help an SDK implementor run the A2A TCK against their System Under Test (SUT). Use when the user wants to validate their A2A agent implementation, debug TCK failures, or understand conformance results.
Interact with remote AI agents using the A2A (Agent-to-Agent) protocol as a client. Use this skill whenever the user wants to communicate with an A2A agent, send tasks to a remote agent, discover agent capabilities, check task status, or get results from an A2A-compatible service. Trigger on mentions of A2A, agent-to-agent, remote agents, agent cards, or when the user provides a URL to an A2A agent endpoint.
| name | update-a2a-spec |
| description | Update the A2A TCK when the A2A protocol specification changes. Use when the user mentions updating the spec, syncing with upstream A2A, or when a new version of the A2A protocol is released. |
| compatibility | Requires curl, git, buf, and uv |
| allowed-tools | Bash(make:*) Bash(git:*) Bash(curl:*) Read Edit Write Glob Grep |
Follow these steps to update the TCK after an A2A protocol specification change.
Before updating, record what we have now so we can diff later.
specification/version.json to note the current commit hash.specification/specification.mdspecification/a2a.protoAsk the user if they want to update from the main branch or pass a tag or a commit cheksum
Run:
make spec
This executes scripts/update_spec.sh, which downloads the latest spec files from the upstream a2aproject/A2A GitHub repository and updates specification/version.json.
If updating from a fork or a different branch, pass arguments:
./scripts/update_spec.sh --org <org> --branch <branch>
Skip this step if specification/a2a.proto did not change (diff shows no proto changes).
Run:
make proto
This executes scripts/generate_grpc_stubs.sh, which uses buf to regenerate specification/generated/a2a_pb2.py and specification/generated/a2a_pb2_grpc.py from the updated a2a.proto.
If buf is not installed, first run ./scripts/install_buf.sh.
After regenerating, check the protobuf version in the generated stubs (head -5 specification/generated/a2a_pb2.py) and verify it is compatible with the protobuf runtime version installed in the project (see pyproject.toml). If the gencode version is newer than the runtime allows, pin the plugin versions in specification/buf.gen.yaml to a compatible release (e.g., buf.build/protocolbuffers/python:v30.2).
Ask the user for the path to their local googleapis checkout, then run:
PATH="$HOME/go/bin:$PATH" GOOGLEAPIS_DIR=<path-to-googleapis> make jsonschema
This regenerates specification/a2a.json from the updated a2a.proto. It requires:
protoc-gen-jsonschema, installed via go install github.com/bufbuild/protoschema-plugins/cmd/protoc-gen-jsonschema@latestGOOGLEAPIS_DIR set to the user's local googleapis checkoutIMPORTANT: Never edit specification/a2a.json manually — always regenerate it from the proto.
Compare the old and new versions of the specification to identify changes:
Diff specification/specification.md to find:
Diff specification/a2a.proto to find:
Summarize the changes for the user before proceeding.
Based on the spec diff, update the relevant files in tck/requirements/:
base.py - Core enums (OperationType, HTTP methods, error codes) and base classescore_operations.py - Core operation requirements (CORE-OPS-*)binding_grpc.py - gRPC-specific requirements (GRPC-*)binding_jsonrpc.py - JSON-RPC-specific requirements (JSONRPC-*)binding_http_json.py - HTTP+JSON-specific requirements (HTTP_JSON-*)data_model.py - Data model requirementsstreaming.py - Streaming requirementspush_notifications.py - Push notification requirementsagent_card.py - Agent card requirementsauth.py - Authentication requirementsversioning.py - Versioning requirementsinterop.py - Interoperability requirementsFor each spec change:
Summarize the changes for the user before proceeding.
If the spec changes affect transport-level behavior:
tck/transport/tck/validators/
tck/validators/error_info.py — shared ErrorInfo validation for JSON-RPC and HTTP+JSON (ProtoJSON @type format)tck/validators/grpc/error_validator.py — gRPC ErrorInfo extraction (binary protobuf)tck/validators/http_json/error_validator.py — AIP-193 error format parsingtck/validators/jsonrpc/error_validator.py — JSON-RPC error code validationtck/validators/error_binding.py — cross-transport expected-error validationTests are in tests/compatibility/:
core_operations/ - Cross-transport parametrized testsgrpc/ - gRPC-specific testsjsonrpc/ - JSON-RPC-specific testshttp_json/ - HTTP+JSON-specific testsagent_card/ - Agent card tests (discovery, caching, signing)Each test class uses markers from tests/compatibility/markers.py (@grpc, @jsonrpc, @http_json, @core, @must, @should, @may).
Tests use helpers from tests/compatibility/_test_helpers.py:
get_client() — get transport client with skip-on-missing handlingrecord() — record result to compatibility collectorfail_msg() — format assertion message with requirement contextTests record results with:
compatibility_collector.record(requirement_id, transport, level, passed, errors)
When writing tests, prefer using transport clients (client.get_task(), client.cancel_task(), etc.) over raw HTTP calls. Only use raw httpx calls when the test needs custom headers (e.g., A2A-Version), invalid methods, malformed payloads, or wrong Content-Type.
Run the linter and unit tests:
make lint
make unit-test
Fix any issues before proceeding. Common failures after a spec update:
a2a.v1 to lf.a2a.v1) can break unit tests that assert on fully-qualified proto type names. Search for hardcoded package names in tests/unit/.$ref values in the regenerated JSON schema (e.g., a2a.v1.Task.jsonschema.json → lf.a2a.v1.Task.jsonschema.json). The $ref mapping in tck/validators/json_schema.py must support the new prefix, otherwise nested schema validation silently passes (refs resolve to permissive fallbacks).Before committing, audit all requirement files to verify:
section field matches the correct section in the updated specification.spec_url anchor resolves to the right heading.To verify anchors programmatically, note that GitHub strips dots and special characters from heading text when generating anchors. For example, heading #### 3.1.1. Send Message produces anchor #311-send-message (not #3.1.1.-send-message). The SPEC_BASE constant in base.py is specification/specification.md#, and the _spec_url_to_href() function in html_formatter.py converts these to absolute GitHub URLs using the commit hash from version.json.
Highlight any new, modified, or removed requirements for the user.
Present the user with a summary of:
specification/version.json)