Skip to content

Add agent instructions for managing worktrees#404

Merged
markmur merged 1 commit into
mainfrom
document/worktrees
Jul 6, 2026
Merged

Add agent instructions for managing worktrees#404
markmur merged 1 commit into
mainfrom
document/worktrees

Conversation

@markmur

@markmur markmur commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Makes a fresh git worktree usable without manual setup by auto-seeding it from the main checkout during dev up.

A fresh worktree is a clean checkout without the gitignored root .env, so sample-app setup can't regenerate its nested config. This wires that copy into dev up so it just happens.

  • scripts/copy_worktree_env + dev copy-env — copies the repo-root .env (and any other root-level machine-local config) from the main checkout into the current worktree, so dev up's setup_storefront_env can regenerate all nested sample config (Android .env, Swift Storefront.xcconfig, RN sample .env) from it. It locates the main checkout via git rev-parse --git-common-dir, so it works regardless of where the worktree lives — sibling, nested, ~/.ae/worktrees, etc. No-ops from the main checkout, and prints paths/status only — never config values.
  • dev.ymldev up now auto-detects a worktree and runs the copy before workspace setup, via a met?/meet step. copy_worktree_env --check reports whether a copy is needed without performing it; the copy itself is idempotent, so it only does work on a fresh worktree.

How to test

dev up from a fresh worktree now seeds .env automatically — no separate step, wherever the worktree lives:

git worktree add ../ck-feature -b area/topic   # sibling, ~/.ae/worktrees, anywhere
cd ../ck-feature
dev up   # detects the worktree, copies root .env, then regenerates nested sample config

The copy is also available standalone and is a friendly no-op from the main checkout:

dev copy-env
# from main checkout => Already in the main checkout (...); nothing to copy.

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 3, 2026
@markmur markmur marked this pull request as ready for review July 3, 2026 10:47
@markmur markmur requested a review from a team as a code owner July 3, 2026 10:47
Comment thread AGENTS.md Outdated
@markmur markmur force-pushed the document/worktrees branch from 7aa99ac to 7c1c71b Compare July 6, 2026 15:17
@markmur markmur merged commit 57e30af into main Jul 6, 2026
25 checks passed
@markmur markmur deleted the document/worktrees branch July 6, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants