Skip to content

Commit 3f25ffe

Browse files
authored
docs: fix broken links and align site build with main (2026-01-11) (#229)
* docs: fix markdown lint issues * docs: fix broken link anchors and paths * docs: native schema generation for release docs - Fixed broken anchor links across 'checkout', 'embedded-checkout', 'fulfillment', and 'order' documentation for the 'release/2026-01-11' branch by adding explicit dictionary tables for missing schema types, allowing them to render natively within the pages rather than depending on the deprecated reference override logic. - Added explicit HTML anchor tags to headings to ensure downstream schema references resolve correctly.
1 parent 7dc5c9c commit 3f25ffe

118 files changed

Lines changed: 7092 additions & 7732 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.

.github/workflows/docs.yml

Lines changed: 57 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ on:
3030
- "requirements-docs.txt"
3131
- "mkdocs.yml"
3232
- "main.py"
33+
- "hooks.py"
3334
- "docs/**"
34-
- "spec/**"
35+
- "source/**"
3536

3637
jobs:
3738
build_and_deploy:
@@ -53,58 +54,36 @@ jobs:
5354
git config --global user.name github-actions[bot]
5455
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
5556
56-
- name: Fetch hooks.py and main.py from main
57-
run: |
58-
git fetch origin main
59-
git checkout origin/main -- hooks.py main.py
60-
61-
- name: Install ucp-schema for runtime resolution
62-
run: |
63-
cargo install ucp-schema
64-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
65-
6657
- name: Install system dependencies
6758
run: |
6859
sudo apt-get update
6960
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
7061
71-
- name: Setup Python
72-
uses: actions/setup-python@v6
73-
with:
74-
python-version: 3.13
75-
76-
- name: Restore pip cache
77-
uses: actions/cache@v4
78-
with:
79-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}
80-
path: ~/.cache/pip
81-
restore-keys: |
82-
${{ runner.os }}-pip-
62+
- name: Install the latest version of uv
63+
uses: astral-sh/setup-uv@v7
8364

8465
- name: Install documentation dependencies
85-
run: pip install -r requirements-docs.txt
66+
run: uv sync
8667

8768
- name: Lint YAML files
88-
run: yamllint -c .github/linters/.yamllint.yml .
89-
90-
- name: Install uv
91-
run: |
92-
curl -LsSf https://astral.sh/uv/install.sh | sh
93-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
69+
run: uv run yamllint -c .github/linters/.yamllint.yml .
9470

95-
- name: Check for changed files in spec
96-
id: spec_files_changed
71+
- name: Check for changed files in source
72+
id: source_files_changed
9773
uses: tj-actions/changed-files@v46
9874
with:
99-
files: spec/**
75+
files: source/**
10076

101-
- name: Check Python SDK Models Consistency
102-
if: steps.spec_files_changed.outputs.any_changed == 'true'
77+
- name: Install ucp-schema for runtime resolution
10378
run: |
104-
chmod +x scripts/ci_check_models.sh
105-
scripts/ci_check_models.sh
79+
cargo install ucp-schema
80+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
10681
107-
- name: Create specs folders for JSON publishing
82+
- name: Lint source schemas
83+
if: steps.source_files_changed.outputs.any_changed == 'true'
84+
run: ucp-schema lint source/
85+
86+
- name: Create folders for JSON publishing
10887
run: |
10988
mkdir -p site/schemas
11089
mkdir -p site/services
@@ -117,52 +96,68 @@ jobs:
11796
run: |
11897
# Fetch the Pages URL. Fails safely if not enabled.
11998
PAGES_URL=$(gh api "repos/${{ github.repository }}/pages" --jq '.html_url' 2>/dev/null || true)
120-
99+
121100
if [ -z "$PAGES_URL" ]; then
122101
echo "Pages URL not detected. Falling back to default structure."
123102
PAGES_URL="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
124103
fi
125-
104+
126105
# Ensure trailing slash
127106
if [[ "$PAGES_URL" != */ ]]; then
128107
PAGES_URL="${PAGES_URL}/"
129108
fi
130-
109+
131110
echo "Set SITE_URL to $PAGES_URL"
132111
echo "SITE_URL=$PAGES_URL" >> $GITHUB_ENV
133112
134-
- name: Build Documentation (PR Check)
135-
if: github.event_name == 'pull_request'
136-
run: mkdocs build --strict
113+
- name: Build and Verify Documentation Site (Main/PR)
114+
if: github.ref == 'refs/heads/main' || github.event.pull_request.base.ref == 'main'
115+
run: |
116+
# Create a full local preview (including mike logic) for validation
117+
bash scripts/build_local.sh --main-only
118+
uv run python scripts/check_links.py local_preview
119+
120+
- name: Build and Verify Specification Docs (Release Branches)
121+
if: startsWith(github.ref, 'refs/heads/release/') || startsWith(github.event.pull_request.base.ref, 'release/')
122+
run: |
123+
export DOCS_MODE=spec
124+
uv run mkdocs build --strict
125+
uv run python scripts/check_links.py site
137126
138127
- name: Deploy development version from main branch
139128
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
140129
run: |
141-
mike deploy --push draft
130+
# 1. Deploy Specification Site using mike (DOCS_MODE=spec)
131+
export DOCS_MODE=spec
132+
uv run mike deploy --push draft
133+
134+
# 2. Build Root Site (DOCS_MODE=root)
135+
export DOCS_MODE=root
136+
uv run mkdocs build --strict
137+
138+
# 3. Deploy Root Site to gh-pages root
139+
# Fetch and checkout gh-pages
140+
git fetch origin gh-pages
141+
git checkout gh-pages
142+
143+
# Copy build artifacts to root
144+
cp -r site/* .
145+
rm -rf site
146+
147+
# Commit and push
148+
git add .
149+
git commit -m "Deploy root site from main" --allow-empty
150+
git push origin gh-pages
142151
143152
- name: Deploy release version
144153
if: startsWith(github.ref, 'refs/heads/release/')
145154
run: |
146-
# Extract the date (e.g., release/2026-01-11 -> 2026-01-11)
147155
export DOCS_MODE=spec
156+
# Extract the date (e.g., release/2026-01-11 -> 2026-01-11)
148157
VERSION_NAME=${GITHUB_REF#refs/heads/release/}
149158
150-
# Fetch all release branches to determine if this is the latest
151-
git fetch origin "+refs/heads/release/*:refs/remotes/origin/release/*"
152-
153-
# Find the highest version number among all release branches
154-
LATEST_VERSION=$(git branch -r --list "origin/release/*" | sed 's|origin/release/||' | sort -V | tail -n 1 | tr -d ' ')
155-
156-
echo "Deploying version: $VERSION_NAME"
157-
echo "Latest detected version: $LATEST_VERSION"
158-
159-
if [ "$VERSION_NAME" = "$LATEST_VERSION" ]; then
160-
echo "This is the latest version. Updating 'latest' alias."
161-
mike deploy --push --update-aliases "$VERSION_NAME" latest
162-
else
163-
echo "This is NOT the latest version. Deploying without updating 'latest' alias."
164-
mike deploy --push "$VERSION_NAME"
165-
fi
159+
# Deploy this version, tag it as 'latest', and set it as the default site root
160+
uv run mike deploy --push --update-aliases $VERSION_NAME latest
166161
167162
- name: Create GitHub Release and Tag
168163
if: startsWith(github.ref, 'refs/heads/release/')

.linkignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore ucp.dev dummy links
2+
https://ucp\.dev/specification/reference\?v=2026-01-11

docs/documentation/core-concepts.md

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@
1919
The Universal Commerce Protocol (UCP) is an open standard designed to facilitate
2020
communication and interoperability between diverse commerce entities. In a
2121
fragmented landscape where consumer surfaces/platforms, businesses, payment
22-
providers, and identity providers operate on different systems, UCP provides
23-
a standardized common language and functional primitives.
22+
providers, and identity providers operate on different systems, UCP provides a
23+
standardized common language and functional primitives.
2424

25-
This document provides the detailed technical specification for UCP.
26-
For a complete definition of all data models and schemas, see the
25+
This document provides the detailed technical specification for UCP. For a
26+
complete definition of all data models and schemas, see the
2727
[Schema Reference](../specification/reference.md).
2828

2929
Its primary goal is to enable:
3030

31-
* **Consumer Surfaces/Platforms:** To discover business capabilities and
32-
facilitate purchases.
33-
* **Businesses:** To expose their inventory and retail logic in a standard
34-
way without building custom integrations for every platform.
35-
* **Payment & Credential Providers:** To securely exchange tokens and
36-
credentials to facilitate transactions.
31+
- **Consumer Surfaces/Platforms:** To discover business capabilities and
32+
facilitate purchases.
33+
- **Businesses:** To expose their inventory and retail logic in a standard way
34+
without building custom integrations for every platform.
35+
- **Payment & Credential Providers:** To securely exchange tokens and
36+
credentials to facilitate transactions.
3737

3838
## High level architecture
3939

@@ -46,15 +46,15 @@ Its primary goal is to enable:
4646

4747
## Key Goals of UCP
4848

49-
* **Interoperability:** Bridge the gap between consumer surfaces, businesses,
50-
and payment ecosystems.
51-
* **Discovery:** Allow consumer surfaces to dynamically discover what
52-
businesses support (e.g., "Do they support guest checkout?", "Do they have
53-
loyalty programs?").
54-
* **Security:** Facilitate secure, standards-based (OAuth 2.0, PCI-DSS
55-
compliant patterns) exchanges of sensitive user and payment data.
56-
* **Agentic Commerce:** Enable AI agents to act on behalf of users to complete
57-
complex tasks like "Find a headset under $100 and buy it."
49+
- **Interoperability:** Bridge the gap between consumer surfaces, businesses,
50+
and payment ecosystems.
51+
- **Discovery:** Allow consumer surfaces to dynamically discover what businesses
52+
support (e.g., "Do they support guest checkout?", "Do they have loyalty
53+
programs?").
54+
- **Security:** Facilitate secure, standards-based (OAuth 2.0, PCI-DSS compliant
55+
patterns) exchanges of sensitive user and payment data.
56+
- **Agentic Commerce:** Enable AI agents to act on behalf of users to complete
57+
complex tasks like "Find a headset under $100 and buy it."
5858

5959
## Roles & Participants
6060

@@ -67,58 +67,55 @@ The platform is the consumer-facing surface (such as an AI agent, mobile app, or
6767
social media site) acting on behalf of the User. It orchestrates the commerce
6868
journey by discovering businesses and facilitating user intent.
6969

70-
* **Responsibilities:** Discovering businesses capabilities via profiles,
71-
initiating checkout sessions, and presenting the UI or conversational
72-
interface to the user.
73-
* **Examples:** AI Shopping Assistants, Super Apps, Search Engines.
70+
- **Responsibilities:** Discovering businesses capabilities via profiles,
71+
initiating checkout sessions, and presenting the UI or conversational
72+
interface to the user.
73+
- **Examples:** AI Shopping Assistants, Super Apps, Search Engines.
7474

7575
### Business
7676

7777
The entity selling goods or services. In the UCP model, businesses act as the
7878
**Merchant of Record (MoR)**, retaining financial liability and ownership of the
7979
order.
8080

81-
* **Responsibilities:** Exposing commerce capabilities (inventory, pricing,
82-
tax calculation), fulfilling orders, and processing payments via their
83-
chosen PSP.
84-
* **Examples:** Retailers, Airlines, Hotel Chains, Service Providers.
81+
- **Responsibilities:** Exposing commerce capabilities (inventory, pricing, tax
82+
calculation), fulfilling orders, and processing payments via their chosen PSP.
83+
- **Examples:** Retailers, Airlines, Hotel Chains, Service Providers.
8584

8685
### Credential Provider (CP)
8786

8887
A trusted entity responsible for securely managing and sharing sensitive user
8988
data, particularly payment instruments and shipping addresses.
9089

91-
* **Responsibilities:** Authenticating the user, issuing payment tokens (to
92-
keep raw card data off the platform), and holding PII securely to minimize
93-
compliance scope for other parties.
94-
* **Examples:** Digital Wallets (e.g., Google Wallet, Apple Pay), Identity
95-
Providers.
90+
- **Responsibilities:** Authenticating the user, issuing payment tokens (to keep
91+
raw card data off the platform), and holding PII securely to minimize
92+
compliance scope for other parties.
93+
- **Examples:** Digital Wallets (e.g., Google Wallet, Apple Pay), Identity
94+
Providers.
9695

9796
### Payment Service Provider (PSP)
9897

9998
The financial infrastructure provider that processes payments on behalf of
10099
businesses.
101100

102-
* **Responsibilities:** Authorizing and capturing transactions, handling
103-
settlements, and communicating with card networks. The PSP often interacts
104-
directly with tokens provided by the Credential Provider.
105-
* **Examples:** Stripe, Adyen, PayPal, Braintree, Chase Paymentech.
101+
- **Responsibilities:** Authorizing and capturing transactions, handling
102+
settlements, and communicating with card networks. The PSP often interacts
103+
directly with tokens provided by the Credential Provider.
104+
- **Examples:** Stripe, Adyen, PayPal, Braintree, Chase Paymentech.
106105

107106
## Core Concepts Summary
108107

109108
UCP revolves around three fundamental constructs that define how entities
110109
interact.
111110

112-
* **Capabilities:** Standalone core features that a business supports. These
113-
are the "verbs" of the protocol.
114-
* *Examples:* Checkout, Identity Linking, Order.
115-
* **Extensions:** Optional capabilities that augment another capability
116-
via the `extends` field. Extensions appear in `ucp.capabilities[]`
117-
alongside core capabilities.
118-
* *Examples:* Discounts (extends Checkout), AP2 Mandates (extends
119-
Checkout).
120-
* **Services:** The lower-level communication layers used to exchange data.
121-
UCP is transport-agnostic but defines specific bindings for
122-
interoperability.
123-
* *Examples:* REST API (primary), MCP (Model Context Protocol), A2A
124-
(Agent2Agent).
111+
- **Capabilities:** Standalone core features that a business supports. These are
112+
the "verbs" of the protocol.
113+
- _Examples:_ Checkout, Identity Linking, Order.
114+
- **Extensions:** Optional capabilities that augment another capability via the
115+
`extends` field. Extensions appear in `ucp.capabilities[]` alongside core
116+
capabilities.
117+
- _Examples:_ Discounts (extends Checkout), AP2 Mandates (extends Checkout).
118+
- **Services:** The lower-level communication layers used to exchange data. UCP
119+
is transport-agnostic but defines specific bindings for interoperability.
120+
- _Examples:_ REST API (primary), MCP (Model Context Protocol), A2A
121+
(Agent2Agent).

docs/documentation/roadmap.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ tackle key user journeys such as multi-item checkout, loyalty, and lifecycle
3636
management, while ensuring the business's brand and logic remain central to all
3737
shopping experiences. Key upcoming initiatives include:
3838

39-
* **Product discovery and post-order management:** By facilitating the entire
40-
journey, we help businesses maximize lifetime and average order value rather
41-
than just processing a single item for checkout.
42-
* **Cart and basket building:** Support for multi-item checkout from a
43-
business, complex basket rules (e.g., promotions, tax, shipping), and varied
44-
fulfillment logic that reflects how people actually shop.
45-
* **Loyalty & Member benefits:** Capabilities to enable loyalty and member
46-
benefits to help users find the best value and businesses achieve a deeper
47-
connection with their consumers through account linking.
48-
* **Native cross-sell and upsell modules:** Capabilities for businesses to
49-
provide personalized recommendations and upsells based on user context.
39+
- **Product discovery and post-order management:** By facilitating the entire
40+
journey, we help businesses maximize lifetime and average order value rather
41+
than just processing a single item for checkout.
42+
- **Cart and basket building:** Support for multi-item checkout from a business,
43+
complex basket rules (e.g., promotions, tax, shipping), and varied fulfillment
44+
logic that reflects how people actually shop.
45+
- **Loyalty & Member benefits:** Capabilities to enable loyalty and member
46+
benefits to help users find the best value and businesses achieve a deeper
47+
connection with their consumers through account linking.
48+
- **Native cross-sell and upsell modules:** Capabilities for businesses to
49+
provide personalized recommendations and upsells based on user context.
5050

5151
### Support for global markets
5252

@@ -63,4 +63,5 @@ developers, and payment providers to join us in refining these specifications.
6363
Your feedback on our early builds helps us shape the standards that will power
6464
the next generation of global commerce.
6565

66-
[Become a UCP contributor](https://github.com/Universal-Commerce-Protocol/ucp?tab=contributing-ov-file){ target="_blank" }
66+
[Become a UCP contributor](https://github.com/Universal-Commerce-Protocol/ucp?tab=contributing-ov-file){
67+
target="\_blank" }

0 commit comments

Comments
 (0)