UCP 2026-04-08 + cart, dual Codex/Claude Code plugin, contract fixes, CI, understanding doc - #1
Merged
Merged
Conversation
Capture the mental model of the UCP onboarding pipeline: what problem it solves, the self-consistent generate->validate loop, the data-contract invariants, and how that model guides future changes. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
Record the authoritative reference sources (UCP official JSON schemas, spec releases, OpenAI ACP docs) and the project's own references/ folders as a stable anchor, plus the known schema-validation gap. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
- ucp-profile: fix order capability spec URL (/specs/ -> /specification/) so generated profile URLs match the style of every other capability and pass the validator's URL-reachability check. - ucp-catalog: add shared strip_html() and use it for both product and variant descriptions (variant descriptions previously kept raw HTML), and move 'import re' to module top. - run_pipeline: declare the catalog capability whenever a catalog will be produced (csv/json with a file, not just shopify), so the profile's declared capabilities match the generated deliverables. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
No script imports jsonschema or jinja2, and neither generate_profile nor map_catalog performs real JSON Schema validation. Align declaration with implementation: - Drop the unused jsonschema and jinja2 from requirements.txt and the README quick-start install lines. - Soften the generate_profile / map_catalog docstrings to describe the basic structural checks they actually do, pointing to the official ucp-schema CLI for full validation. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
- Add .github/workflows/ci.yml running 'unittest discover -s tests' on push and PR, so the contract-guarding tests run automatically. - ucp-audit: fetch each product page only once and reuse its HTML for both structured-data extraction and payment detection (was fetching twice). - ucp-audit: score HTTPS honestly from the URL scheme instead of always awarding the points, and reflect it in the report row. - ucp-audit: drop the duplicated platform argument passed to generate_report (the unused platform_conf parameter). https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
Grounded in the official v2026-04-08 schemas: - Bump UCP_VERSION 2026-01-23 -> 2026-04-08 (single source in generate_profile.py; capability spec/schema URLs follow it). - Add the new 'cart' capability (dev.ucp.shopping.cart), which extends checkout and converts to a checkout session via cart_id. - run_pipeline now declares cart alongside catalog when a catalog is produced; --caps help and capabilities.md list cart. - Update tests and docs (AGENTS.md, capabilities.md) to the new version and capability. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
- Add .claude-plugin/plugin.json so the repo installs as a Claude Code plugin; skills/ is auto-discovered (each SKILL.md already has the required name+description frontmatter). - Add .claude-plugin/marketplace.json (source '.') so the repo can be added directly as a marketplace and installed from git. - Bump .codex-plugin/plugin.json to 0.3.0 and note UCP 2026-04-08 + cart so both plugin surfaces stay in sync. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
So skill instructions resolve their helper scripts correctly when installed as a Claude Code plugin (cached outside the repo), not only when run from the repo root. Also list the new 'cart' capability in the ucp-profile SKILL. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
Note the dual Codex/Claude Code plugin nature, add a 'install as a Claude Code plugin' section (marketplace add + plugin install), and list the new .claude-plugin manifests in the project structure (EN + CN). https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
Fills the gap noted in the understanding doc: ucp-validate now validates the profile against the official UCP schema (no network at validation time). - Vendor the official v2026-04-08 profile schema tree (8 files, fetched transitively via $ref) into refs/ucp-schema/2026-04-08/, and un-ignore that subtree in .gitignore (the rest of refs/ stays ignored). - validate_ucp.py: load the vendored schemas into a referencing Registry keyed by file path (stripping $id, since upstream $refs resolve by path, not $id) and validate the profile with jsonschema. Graceful SKIP when jsonschema or the schemas are unavailable; schema failures are ERROR-level (CONDITIONAL PASS), not CRITICAL. - Re-add jsonschema to requirements.txt (now genuinely used). - Add a unit test (our generated/fixture profiles conform; a broken profile is rejected). Update SKILL.md, check-matrix.md, README, and the understanding doc to reflect the closed gap. https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V
ViryaZheng
marked this pull request as ready for review
June 5, 2026 04:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Driven by a written mental model of the project (added as
docs/UNDERSTANDING.md):the repo is a protocol-adapter pipeline translating storefronts into
agent-callable contracts. Guiding principle: keep the contract consistent across
both ends of the pipeline, between declaration and implementation, and with the
upstream spec.
All 10 unit tests pass; CI runs them automatically. Schema-related changes are
grounded in the official UCP
v2026-04-08JSON schemas (fetched from upstream).Highlights
Understanding doc + reference anchor
docs/UNDERSTANDING.md: the pipeline's self-consistent generate→validateloop, the data-contract invariants, and an internal/external reference map.
Contract-consistency fixes
ucp-profile: fixordercapability spec URL (/specs/→/specification/).ucp-catalog: sharedstrip_html()for product and variant descriptions.run_pipeline: declarecatalog/cartwhenever a catalog is produced, notjust for shopify — declared capabilities now match deliverables.
Honesty, then real implementation (declaration = implementation)
jsonschema/jinja2deps and the false "validatesagainst official schema" docstrings…
Spec upgrade → UCP 2026-04-08 (+ cart)
UCP_VERSION2026-01-23 → 2026-04-08 (single source).dev.ucp.shopping.cart, extends checkout,converts via
cart_id). Wired through run_pipeline, tests, and docs.required checkout fields (
ucp, id, status, line_items, currency, totals, links).Offline official schema validation (the previously-deferred item — now done)
v2026-04-08profile schema tree (8 files, fetchedtransitively via
$ref) intorefs/ucp-schema/2026-04-08/.ucp-validateloads them into areferencingregistry keyed by file path(stripping
$id, since upstream$refs resolve by path) and validates theprofile with
jsonschema. Graceful SKIP when deps/schemas are absent; schemafailures are ERROR-level (CONDITIONAL PASS), not CRITICAL.
Dual plugin (Codex + Claude Code)
.claude-plugin/plugin.json(skills auto-discovered fromskills/; eachSKILL.md already has
name+descriptionfrontmatter)..claude-plugin/marketplace.json(source: ".") so the repo installsfrom git:
claude plugin marketplace add recomby-ai/ucp-onboard..codex-plugin/plugin.jsonto 0.3.0 so both surfaces stay in sync.${CLAUDE_SKILL_DIR}so they resolve when theplugin is installed (cached outside the repo), not only from the repo root.
CI + cleanup
.github/workflows/ci.ymlrunsunittest discover -s testson push/PR.ucp-audit: fetch each product page once (was twice), score HTTPS from theURL scheme, drop the duplicated
platformarg.https://claude.ai/code/session_01BWhuWLihyaYzRx8pk7GA7V