description: Sync with upstream repo-template updates scripts: sh: scripts/bash/sync-template.sh "$ARGUMENTS"
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). Valid arguments: --check (preview only, no writes), --force (apply without prompting), a specific version string like v1.2.0.
Outline
You are syncing this repository with the upstream cisco-eti/repo-template. Follow these steps exactly.
Step 1 — Read current state
- Read
.specify/upstream.yml.- Extract
source(e.g.,cisco-eti/repo-template),version(current applied version),overrides(list of files to skip).
- Extract
- If
.specify/upstream.ymldoes not exist, halt and tell the user: "This repo has no .specify/upstream.yml. Initialize it first using the template at cisco-eti/repo-template."
Step 2 — Discover latest release
- Use the GitHub API to find the latest release of the upstream repo:
GET https://api.github.com/repos/<source>/releases/latest - Extract
tag_name(e.g.,v1.1.0) andassets(find the ZIP asset andmanifest.jsonasset). - If the user specified a version in
$ARGUMENTS, use that version instead of latest. - Compare
tag_nameto currentversion:- If equal: report "Already at latest version . Nothing to do." and stop (unless
--forcewas passed).
- If equal: report "Already at latest version . Nothing to do." and stop (unless
Step 3 — Read the manifest
- Download
manifest.jsonfrom the release assets. - Parse:
semver_bump:"major","minor", or"patch"changed_files: list of files changed in this releasebreaking_files: list of files with breaking changeschangelog_url: link to view details
Step 4 — Determine what to apply
- Start with
changed_filesfrom the manifest. - Remove any file listed in
.specify/upstream.ymloverrides— these are skipped. - Remaining files = apply set.
- Intersect
apply setwithbreaking_files→ breaking set (files in apply set that are also breaking).
Step 5 — Preview (always show before writing)
Print a summary table:
Upstream version: v1.0.0 → v1.1.0 (MINOR bump)
Files to apply:
docs/plan/SKILLS.md [updated]
.claude/skills/speckit.new-skill/SKILL.md [added]
Files skipped (overrides):
docs/plan/CONSTITUTION.md [override — local version preserved]
Breaking changes: none
If --check was passed, stop here. Do not write any files.
If semver_bump is "major":
- Print: "⚠️ MAJOR version bump — this includes constitutional or breaking changes."
- Print the list of breaking files with a note about each.
- Ask the user: "Do you want to proceed? Constitutional changes require human review. (yes/no)"
- If no: stop.
Step 6 — Apply files
- Download and extract the release ZIP.
- For each file in the apply set: a. If the local file does not exist: write it directly (new addition). b. If the local file exists: show a unified diff, then overwrite it.
- Update
.specify/upstream.yml:- Set
versionto the new version tag (strip thevprefix:1.1.0) - Set
pinned_atto today's date (ISO 8601) - Leave
overridesunchanged.
- Set
- Report: "Sync complete. Applied files. Version updated to ."
Step 7 — Post-sync guidance
After a successful sync:
- If any
docs/plan/files were updated: "Tip: Review the updated docs/plan/ files. If the ARCHITECTURE.md or CONSTITUTION.md was updated, compare with your project-specific overrides." - If any
.claude/skills/or.agents/skills/were updated: "New or updated skills are available. Run/speckit.specify --helpor check .claude/skills/ for changes." - If the bump was MAJOR: "MAJOR sync applied. Verify your override files are still consistent with the new template base."