|
| 1 | +--- |
| 2 | +description: Sync scaffold files in this project against a source repo, creating or updating files with details adapted to this project |
| 3 | +argument-hint: source repo URL or owner/repo, e.g. https://github.com/<owner>/<repo> |
| 4 | +--- |
| 5 | + |
| 6 | +You are doing a scaffold sync. For each file in the manifest below, fetch the source version, compare it to the local version, and **create or update the local file** — substituting any source-specific details with this project's equivalent. The goal is to carry the source's structure and generic content forward while keeping this project's identity intact. |
| 7 | + |
| 8 | +## Setup |
| 9 | + |
| 10 | +The source repo is: **${input:source_repo}** |
| 11 | + |
| 12 | +Before doing anything else: |
| 13 | +1. Read this project's `package.json` (or equivalent manifest) to learn: project name, description, repo URL, license, author(s), and language/runtime. |
| 14 | +2. Read the source repo's `package.json` too — you'll need to know which details to substitute. |
| 15 | +3. Convert the source repo URL to a raw content base URL: |
| 16 | + - `https://github.com/owner/repo` → `https://raw.githubusercontent.com/owner/repo/main` |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Scaffold file manifest |
| 21 | + |
| 22 | +Process each file below. For every file: fetch the source, read the local version (if it exists), then apply the specific instructions listed. |
| 23 | + |
| 24 | +- `.github/prompts/commit.prompt.md` — generic workflow; substitute any repo-specific examples or URLs |
| 25 | +- `.github/prompts/reflect.prompt.md` — generic; substitute any repo-specific layer references (file names, tools, etc.) |
| 26 | +- `.github/prompts/release.prompt.md` — adapt the workflow to this project's release process (don't just string-replace tool names — rethink the steps if the workflow is fundamentally different); substitute repo URL and tooling references |
| 27 | +- `.github/prompts/suggest.prompt.md` — generic; substitute any repo-specific examples or file paths |
| 28 | +- `.github/prompts/sync.prompt.md` — generic; the argument-hint uses a placeholder URL and should not need substitution |
| 29 | +- `.gitattributes` — adapt file-type entries to match this project's actual file types (e.g. add `*.sh` if the project has shell scripts, drop `*.ts` if it doesn't use TypeScript); if local file exists, add missing entries without removing local-only ones |
| 30 | +- `.gitignore` — merge: add entries from source that are absent locally; do not remove local-only entries |
| 31 | +- `AGENTS.md` — the general guidelines section is portable; substitute project-specific references (scratchpad notes, file paths, tool names) with this project's equivalents; preserve any local sections that have no counterpart in the source |
| 32 | +- `CONTRIBUTING.md` — adapt to this project's tooling and runtime (don't just string-replace tool names — rethink setup steps and commands if the build workflow differs); keep the source's structural sections |
| 33 | +- `LICENSE.md` — if the local license type matches this project's `package.json`, it's correct — skip regardless of what the source uses; only flag if the local file contradicts this project's own `package.json` |
| 34 | +- `README.md` — preserve this project's actual description, icon list, and any unique content; adopt structural sections (badge layout, contributing footer, license block) from the source if they are absent locally; do not overwrite meaningful local content with source content |
| 35 | +- `RELEASE.md` — substitute this project's repo URL, branch names, and tooling references |
| 36 | +- `bunfig.toml` — skip entirely if this project does not use Bun; otherwise apply source content with any registry or test configuration substituted for this project's equivalents |
| 37 | +- `tsconfig.json` — apply structural changes and new compiler options from the source; flag any option that differs in value and ask before overwriting, since local values may be intentional |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## Steps |
| 42 | + |
| 43 | +For each file in the manifest: |
| 44 | + |
| 45 | +1. Fetch the raw source content from `{raw_base_url}/{file_path}` (skip gracefully if the source repo doesn't have it) |
| 46 | +2. Check whether the file exists locally |
| 47 | +3. Identify all source-specific values: repo name, org, URLs, package names, author names, version numbers, tool names — anything that belongs to the source project rather than the template structure |
| 48 | +4. Replace each source-specific value with the corresponding value from this project (from `package.json` or existing local files) |
| 49 | +5. Create or update the local file with the adapted content |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## How to report |
| 54 | + |
| 55 | +After processing all files, produce a summary table: |
| 56 | + |
| 57 | +| File | Status | Notes | |
| 58 | +|------|--------|-------| |
| 59 | +| `.github/prompts/commit.prompt.md` | ✅ In sync / 🔄 Updated / ✨ Created / ⏭️ Skipped | … | |
| 60 | +| … | … | … | |
| 61 | + |
| 62 | +For each **🔄 Updated** or **✨ Created** file: briefly describe what was substituted or what structural changes were adopted. |
| 63 | + |
| 64 | +For **⏭️ Skipped** files: one line explaining why (e.g. "source repo doesn't have this file" or "Bun not used in this project"). |
| 65 | + |
| 66 | +For files that were **✅ In sync**: one line is enough. |
| 67 | + |
0 commit comments