Skip to content

Improve Hydrogen setup skills and benchmark harness#3801

Closed
fredericoo wants to merge 4 commits into
previewfrom
fb-port-storefront-kit-skills
Closed

Improve Hydrogen setup skills and benchmark harness#3801
fredericoo wants to merge 4 commits into
previewfrom
fb-port-storefront-kit-skills

Conversation

@fredericoo

@fredericoo fredericoo commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

An older storefront-kit PR had useful skill and benchmark-harness hardening that never landed before the package/repo moved into Hydrogen v3.

This ports the parts that still make sense after the rename and adapts them to the current Hydrogen APIs, request-scoped client shape, and benchmark environment variable model.

WHAT is this pull request doing?

  • Hardens the packaged Hydrogen setup skills around product pages, query validation, server-only env boundaries, cart drawer setup, variant URL sync, and progressive cart line forms.
  • Updates stale kit-owned terminology to Hydrogen-owned terminology and adds a patch changeset for the packaged skill changes.
  • Stabilizes the OpenCode benchmark harness by streaming events, closing child stdin, watching workspace changes, preserving failure summaries, ignoring harness artifact noise, extending the Docker timeout, and seeding Standard Actions runtime assets in the template.
  • Adds .docs/dependencies.md so future skill, analytics, cart, query-validation, and benchmark changes have an update checklist.

HOW to test your changes?

  1. pnpm test:benchmark-harness
  2. pnpm format:check
  3. pnpm lint
  4. pnpm --filter @shopify/hydrogen typecheck
  5. pnpm --dir packages/hydrogen test src/core/cart src/core/analytics
  6. git diff --check

Live Docker/OpenCode benchmark note: Docker image build was verified by the verification agent, but the full OpenCode run was not completed because this shell does not have LLM_API_TOKEN / LLM_API_BASE_URL configured.

Post-merge steps

None.

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or functional changes. Test changes or internal-only config changes do not require a changeset.
  • I've added tests to cover my changes
  • I've added or updated the documentation

Port the useful Storefront Kit skill guidance into the renamed Hydrogen v3 skills, including product page setup, query validation, server-only env boundaries, provider-owned variant URL sync, and progressive cart line forms.

Stream OpenCode benchmark output incrementally, ignore harness artifacts in workspace change logs, preserve failure summaries, seed Standard Actions runtime assets in the template, and add a documentation dependency map so related docs stay coordinated.
Use the Shopify CDN for Standard Actions in the benchmark template instead of copying vendored runtime files into public.

Keep only template-owned public assets and assert the removed Standard Actions, Standard Events, consent, banner, and tools files are not seeded.
Keep the harness test focused on the template contract it still owns: seeding the favicon and loading Standard Actions from the CDN.

Avoid asserting that obsolete vendored public files are absent, since the implementation detail is covered by the actual deleted files in the diff.
@fredericoo fredericoo marked this pull request as ready for review June 12, 2026 15:32
@fredericoo fredericoo requested a review from a team as a code owner June 12, 2026 15:32
* feat: add Hydrogen storefront agent skills

Add packaged skills and references for building Hydrogen storefronts with agents, including analytics, collection browsing, money formatting, request handlers, Shop Pay, smoke testing, Nuxt wiring, and framework-specific product variant guidance.

Update the setup orchestrator and related references so agents can assemble storefront flows from the Hydrogen APIs and examples while keeping environment, cart, analytics, and request-handler responsibilities separated.

Co-authored-by: OpenAI Codex <codex@openai.com>

* docs: refine Hydrogen storefront skill guidance

Tighten the packaged Hydrogen skills so agents follow the source and examples more closely: document storefront route defaults, require gql.tada setup and checks for gql() documents, clarify buyer IP ownership, and use requestContext.applyResponseHeaders directly.

Correct Shop Pay guidance for Hydrogen channel, cart checkout mode, and checkoutUrl sourcing; expand money helper output notes; and remove the stale request-handler setup reference now that the standalone skill owns that guidance.

Co-authored-by: OpenAI Codex <codex@openai.com>

* docs: incorporate RR7 storefront skill feedback

Refine the Hydrogen storefront skills based on friction found while creating a React Router 7 storefront with agents.

Tighten cart form examples, switch cart drawer guidance to the direct JavaScript dialog path, clarify analytics shop metadata and cart view payloads, and align collection filters, request middleware, gql.tada, and product provider setup with the source and examples.

Co-authored-by: OpenAI Codex <codex@openai.com>

* docs: incorporate Next storefront skill feedback

Refine the Hydrogen storefront skills based on friction found while creating a Next.js storefront with agents.

Document module-script loading for Standard Actions, Next proxy naming, analytics Suspense boundaries, canonical env names, and consistent Next storefront client helpers.

Tighten collection filter guidance so agents treat Storefront API FilterValue.input as the source of truth and route checkbox params through serializeCollectionParams instead of custom filter mappings. Clarify product add-to-cart and cart mutation form helper boundaries.

Co-authored-by: OpenAI Codex <codex@openai.com>

---------

Co-authored-by: OpenAI Codex <codex@openai.com>
@frandiox frandiox closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants