Skip to content

Conversation

@juanpprieto
Copy link
Contributor

@juanpprieto juanpprieto commented Oct 2, 2025

WHY are these changes introduced?

Reduce manual work when updating Hydrogen API reference documentation on shopify.dev after new releases.

WHAT is this pull request doing?

Adds a Claude Code slash command /update-dev-docs that automates the documentation update process.

The command handles:

  • Version detection from packages/hydrogen/src/version.ts
  • Doc generation via npm run docs:build
  • Copying JSON files to shopify-dev repo
  • Branch creation and validation
  • PR creation with proper formatting
Process Flow
1. Detect version (e.g., 2025.7.0 → 2025-07)
2. Generate docs in hydrogen repo
3. Navigate to shopify-dev repo
4. Create version directories if needed
5. Copy generated JSON files
6. Run lint:mdx validation
7. Commit and push changes
8. Create PR with template

Example PR

https://github.com/Shopify/shopify-dev/pull/63408

HOW to test your changes?

Testing the Command

  1. Checkout this branch
  2. Make a minor change to trigger doc regeneration
  3. Run /update-dev-docs in Claude Code
  4. Verify the command:
    • Detects the correct version
    • Generates documentation
    • Creates proper branch structure
    • Runs validation
    • Creates a well-formed PR

Post-merge steps

None required.

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 noteworthy changes (N/A - tooling only)
  • I've added tests to cover my changes (N/A - automation script)
  • I've added or updated the documentation (command is self-documenting)

@juanpprieto juanpprieto requested a review from a team as a code owner October 2, 2025 02:27
@juanpprieto juanpprieto changed the title Add Claude command for updating dev docs Add Claude command for updating dev docs /update-dev-docs Oct 2, 2025
@juanpprieto juanpprieto changed the title Add Claude command for updating dev docs /update-dev-docs Add Claude command for updating reference dev docs /update-dev-docs Oct 2, 2025
@shopify
Copy link
Contributor

shopify bot commented Oct 2, 2025

Oxygen deployed a preview of your add-update-dev-docs-command branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment October 2, 2025 2:29 AM

Learn more about Hydrogen's GitHub integration.

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.

1 participant