Specification and documentation for the Universal Commerce Protocol (UCP)
This report presents the forensic synthetic code analysis of Universal-Commerce-Protocol/ucp, a Python project with 3,259 GitHub stars. SynthScan v2.0 examined 44,664 lines of code across 194 source files, recording 144 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 5.5 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 144 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | main.py | 1484 | # ------------------------------------------ | COMMENT |
| MEDIUM | scripts/validate_examples.py | 119 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 121 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 139 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 141 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 177 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 179 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 282 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 284 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 419 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 421 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 492 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 494 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 517 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 519 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 626 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 628 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 671 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 673 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 778 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 780 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 809 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 811 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 1070 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 1072 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 39 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 41 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 166 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 168 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 67 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 69 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 212 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 214 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 270 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 272 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 357 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 359 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 574 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 576 | # ----------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | source/schemas/shopping/types/card_credential.json | 49 | "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 43 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 63 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 81 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 191 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 204 | "name": "Jane Doe" | CODE |
| LOW | docs/specification/checkout-mcp.md | 193 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-mcp.md | 282 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-mcp.md | 540 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/overview.md | 1892 | "street_address": "123 Main Street", | CODE |
| LOW | docs/specification/ap2-mandates.md | 380 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/order-mcp.md | 172 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-a2a.md | 388 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/playground.md | 573 | "street_address": "123 Main Street", | CODE |
| LOW | docs/specification/playground.md | 974 | req.fulfillment.methods = [{ type: 'shipping', destinations: [{ id: "addr_1", street: "123 Main St", city: " | CODE |
| LOW | docs/specification/playground.md | 1001 | destinations: [{ id: "addr_1", street: "123 Main St", city: "Tech City", country: "US", postal_code: "94103" | CODE |
| LOW | docs/specification/checkout-rest.md | 408 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 517 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 614 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 716 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 806 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 917 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 1076 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/checkout-rest.md | 1233 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/order-rest.md | 145 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/fulfillment.md | 130 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/fulfillment.md | 656 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/fulfillment.md | 727 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/order.md | 223 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/order.md | 237 | "street_address": "123 Main St", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 45 | CODE | |
| LOW | hooks.py | 143 | CODE | |
| LOW | hooks.py | 332 | CODE | |
| LOW | hooks.py | 172 | CODE | |
| LOW | main.py | 67 | CODE | |
| LOW | main.py | 122 | CODE | |
| LOW | main.py | 213 | CODE | |
| LOW | main.py | 249 | CODE | |
| LOW | main.py | 340 | CODE | |
| LOW | main.py | 611 | CODE | |
| LOW | main.py | 683 | CODE | |
| LOW | main.py | 945 | CODE | |
| LOW | main.py | 1212 | CODE | |
| LOW | main.py | 1326 | CODE | |
| LOW | main.py | 1384 | CODE | |
| LOW | main.py | 1577 | CODE | |
| LOW | scripts/validate_examples.py | 182 | CODE | |
| LOW | scripts/validate_examples.py | 311 | CODE | |
| LOW | scripts/validate_examples.py | 383 | CODE | |
| LOW | scripts/validate_examples.py | 561 | CODE | |
| LOW | scripts/validate_examples.py | 1075 | CODE | |
| LOW | scripts/check_links.py | 72 | CODE | |
| LOW | scripts/super_linter_local.py | 29 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | hooks.py | 430 | # Step 1: Resolve relative $ref to absolute URLs | COMMENT |
| LOW⚡ | hooks.py | 433 | # Step 2: Inject version field for named entities | COMMENT |
| LOW⚡ | hooks.py | 437 | # Step 3: Rewrite URLs to include version | COMMENT |
| LOW | docs/specification/payment-handler-template.md | 245 | #### Step 1: Discover Handler | COMMENT |
| LOW | docs/specification/ap2-mandates.md | 269 | ### Step 1: Checkout Creation & Signing | COMMENT |
| LOW | docs/specification/ap2-mandates.md | 332 | ### Step 2: User Consent & Mandate Generation | COMMENT |
| LOW | docs/specification/ap2-mandates.md | 359 | ### Step 3: Submission (`complete_checkout`) | COMMENT |
| LOW | …cation/examples/processor-tokenizer-payment-handler.md | 193 | #### Step 1: Discover Handler | COMMENT |
| LOW | …cation/examples/processor-tokenizer-payment-handler.md | 221 | #### Step 2: Collect Sensitive Data | COMMENT |
| LOW | …cation/examples/processor-tokenizer-payment-handler.md | 227 | #### Step 3: Tokenize Data | COMMENT |
| LOW | …cation/examples/processor-tokenizer-payment-handler.md | 243 | ### Step 4: Complete Checkout | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/specification/ap2-mandates.md | 152 | > [AP2 #268](https://github.com/google-agentic-commerce/AP2/issues/268) | CODE |
| MEDIUM | docs/specification/ap2-mandates.md | 152 | > [AP2 #268](https://github.com/google-agentic-commerce/AP2/issues/268) | CODE |
| MEDIUM | scripts/validate_examples.py | 995 | # 8. Load scaffold and merge | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 416 | # E2E: a fully-elided get_product response validates via the scaffold | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 507 | # Complete examples validate without a scaffold. Scaffolds are only required | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 524 | # normal target/scaffold validation. | COMMENT |
| MEDIUM | scripts/scaffolds/shopping_order_response.json | 8 | "permalink_url": "https://example.com/orders/scaffold", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 309 | def _root_pages_asset_link_rewrite(markdown, base_path): | CODE |
| LOW | main.py | 67 | def _validate_common_namespace_exclusivity() -> None: | CODE |
| LOW | main.py | 683 | def _render_table_from_schema( | CODE |
| LOW | main.py | 1212 | def auto_generate_schema_reference( | CODE |
| LOW | scripts/validate_examples.py | 353 | def lower_ellipsis_to_sentinels(content: str) -> str: | CODE |
| LOW | scripts/validate_examples.py | 725 | def validate_payload_with_schema( | CODE |
| LOW⚡ | scripts/test_validate_examples.py | 171 | def test_parse_example_keeps_sentinels() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 185 | def test_strip_ellipsis_records_paths() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 201 | def test_string_ellipsis_in_array() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 442 | def test_process_block_integration() -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 324 | # types directory, so we just pass the filename | COMMENT |
| LOW | main.py | 1644 | # If ref not resolved, just use name | COMMENT |
| LOW | main.py | 442 | else: # Internal ref like #/$defs/context: just use fragment | CODE |
| MEDIUM⚡ | scripts/test_validate_examples.py | 40 | # Test harness (minimal, no deps) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 1 | # Copyright 2026 UCP Authors | COMMENT |
| LOW | mkdocs.yml | 1 | --- | COMMENT |
| LOW | main.py | 1 | # Copyright 2026 UCP Authors | COMMENT |
| LOW | .github/workflows/release-setup.yml | 1 | --- | COMMENT |
| LOW | .github/workflows/linter.yaml | 1 | # Copyright 2026 Google LLC | COMMENT |
| LOW | .github/workflows/docs.yml | 1 | --- | COMMENT |
| LOW | .github/workflows/conventional-commits.yml | 1 | # Copyright 2026 Google LLC | COMMENT |
| LOW | .github/workflows/spellcheck.yaml | 1 | # Copyright 2026 Google LLC | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_links.py | 92 | except Exception as e: | CODE |
| LOW | scripts/check_links.py | 115 | except Exception: | CODE |
| LOW | scripts/check_links.py | 132 | except Exception: | CODE |
| LOW | scripts/check_links.py | 137 | except Exception as e: | CODE |
| MEDIUM | scripts/super_linter_local.py | 55 | print(f"Error: {workflow_path} not found.") | CODE |
| MEDIUM | scripts/super_linter_local.py | 73 | print("Error: Could not find 'Lint Code Base' step in workflow.") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | hooks.py | 430 | # Step 1: Resolve relative $ref to absolute URLs | COMMENT |
| LOW⚡ | hooks.py | 433 | # Step 2: Inject version field for named entities | COMMENT |
| LOW⚡ | hooks.py | 437 | # Step 3: Rewrite URLs to include version | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 330 | # Check if any property has ucp_request annotation | COMMENT |
| LOW | main.py | 395 | # Check if this reference comes from the core UCP schema | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 321 | CODE |