propagate-template

Propagate template main changes into forked store repos via content-level file reconciliation.

5.5k|669|Updated Aug 5, 2024
One-click install
npx skills add https://github.com/yournextstore/yournextstore --skill propagate-template
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: propagate-template
Source: https://github.com/yournextstore/yournextstore/tree/main/.agents/skills/propagate-template
Command: npx skills add https://github.com/yournextstore/yournextstore --skill propagate-template

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Forked store repositories share no git history with the template they were provisioned from, so standard git rebase or merge cannot keep them updated. This Skill reconciles template changes into every forked store repo file by file, updating only files the store never customized.

Core Features & Use Cases

  • Content-level reconciliation: Compares store file blob hashes against the template's full main-branch history to decide whether each file can be safely updated, deleted, or must be skipped as customized.
  • Managed path enforcement: Unconditionally overwrites platform-managed files (proxy.ts, lib/track.tsx, instrumentation-client.ts) and reconciles package.json dependencies with jq while regenerating bun.lock.
  • Safe verification and rollout: Runs bun install, typegen, tsc, and lint before committing, pushes plain (never force) commits to main, and reports per-store results including a manual follow-up list.
  • Use Case: After landing a template change that existing tenant storefronts must pick up, run this Skill across all yns-store-* repos in the tenants org to update uncustomized files and get a table of updated, deleted, and skipped files per store.

Quick Start

Ask the agent to propagate the latest template main into all builder store repos in the staging org and report which files were updated or skipped per store.

Frequently Asked Questions about propagate-template

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync template changes into forked repos with no shared git history?

Compare each store file's blob hash against all historical blobs of that path on the template's main branch. If the store blob matches any historical version, replace it with the current template version; otherwise leave it and record it as customized.

How do I propagate updates to tenant storefront repos on GitHub?

Clone each yns-store-<subdomain> repo from the tenants org with gh, reconcile files against the template using blob-hash comparison, verify with bun install, typegen, and tsc, then push a single plain commit to main which triggers the tenant redeploy.

Can I use git rebase or merge to update store repos from the template?

No. Store repos are provisioned by copying template files into a fresh repo without upstream parents, so they share no git history with the template. Reconciliation must happen at the content level, file by file.

What happens to files a store has customized during template propagation?

Customized files are left untouched and recorded as skipped. If a skipped file actually needs the propagated change, it goes into a manual follow-up list; semantic merges are only attempted when the invoker explicitly describes the targeted edit.

Why should pushes to store repos not be forced or batched all at once?

Every push to a store repo's main triggers a production redeploy of that tenant storefront. Force pushes are forbidden, and fleets should be processed a handful at a time to avoid pushing dozens of redeploys simultaneously.