upstream-sync
Skill2k starsChanged 4 months agoMITView on GitHub
Periodically sync new commits from microsoft/terminal into this manually-forked intelligent-terminal repo by cherry-picking commit-by-commit onto a dated sync branch, auto-skipping revert pairs and empty commits, auto-resolving known take-upstream files, and stopping cleanly on genuine conflicts. The agent (you, reading this file) is the orchestrator — the PowerShell scripts are atomic operations you invoke one at a time. Use when the user asks to "sync upstream", "pull from microsoft/terminal", "run upstream sync", "catch up to upstream", or wires this into a scheduler (weekly/daily). Designed to be safe under repeated unattended runs.
- Commits and pushes
3 other projects use a version of this.
Trending
Quiet since September.thin dataabout the whole repository
Most recently taken up by
- acaprino/daodantheir own version, first seen Oct 2, 2026
- chenson42/stackkeeltheir own version, first seen Sep 22, 2026
- dris1153/upstream-synctheir own version, first seen Mar 29, 2026
Who's talking about microsoft/intelligent-terminal
- @awakecoding.com“"Intelligent Terminal is an experimental fork of Windows Terminal with native agent integration." Microsoft …”Bluesky · Sep 16, 2026 · 2 likes
- yeelam-gordon/intelligent-terminal“Historical validation: agent-pane lifetime and cross-window transfers (#898)”GitHub · Sep 21, 2026
- yeelam-gordon/intelligent-terminal“Defer WSL shell integration installation until a new tab opens”GitHub · Sep 10, 2026
- yeelam-gordon/intelligent-terminal“Make session MCP tool schemas safe for strict function-calling providers”GitHub · Aug 27, 2026
- microsoft/terminal“Tamil Language Text Overlaps in Terminal.”GitHub · Aug 27, 2026
The biggest 5 of 10 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 10
Talked about on GitHub and Bluesky (10 times).
On GitHub · 9
- Sep 21, 2026Historical validation: agent-pane lifetime and cross-window transfers (#898) — yeelam-gordon/intelligent-terminal0 reactions
- Sep 10, 2026Defer WSL shell integration installation until a new tab opens — yeelam-gordon/intelligent-terminal0 reactions · 3 comments
- Aug 27, 2026Make session MCP tool schemas safe for strict function-calling providers — yeelam-gordon/intelligent-terminal0 reactions · 3 comments
- Aug 27, 2026Tamil Language Text Overlaps in Terminal. — microsoft/terminal0 reactions · 14 comments
- Jul 15, 2026Mirror of #218 upstream-sync skill (for review loop) — yeelam-gordon/intelligent-terminal0 reactions
4 more on GitHub
- Jul 14, 2026integrate Intelligent Terminal with b00t ACP — bridge to Windows desktop — elasticdotventures/_b00t_0 reactions · 1 comment
- Jul 14, 2026Add release-notes agent skill (mirror of #408 for review loop) — yeelam-gordon/intelligent-terminal0 reactions
- Jun 17, 2026New version: Microsoft.IntelligentTerminal version 0.1.1681.0 — microsoft/winget-pkgs0 reactions · 8 comments
- May 29, 2026jun 2026 — kimtth/azure-openai-llm-notes0 reactions · 1 comment
On Bluesky · 1
- Sep 16, 2026"Intelligent Terminal is an experimental fork of Windows Terminal with native agent integration." Microsoft is forking its own Windows… — @awakecoding.com2 likes and reposts
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- acaprino/daodan★ 9same name
- dris1153/upstream-sync★ 2same name
- chenson42/stackkeel★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- tools/wta/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- add-acp-agent-supportSkill
- copilot-pr-review-loopSkill
- ensure-localizationSkill
- pr-integration-testSkill
- release-notesSkill
- store-listing-localizerSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
originMUST point atmicrosoft/intelligent-terminal: All scripts push to origin and pass -R microsoft/intelligent-terminal explicitly. - Distinctive: line 41
Every persistent fact lives in the source that owns it:
- Very specific: line 113
Never strip the
(cherry picked from commit <sha>)trailer: when hand-resolving a stuck pick. - Very specific: line 115
Never rebase
upstream/mainonto this fork: Use cherry-pick — rebase replays old "Merge upstream" commits and explodes. - Distinctive: line 117
Don't amend substantive review fixes into the sync PR: Only build-blocking fixes (max one extra commit).
- Very specific: line 125
Do not "fix" it to use --head <owner>:<branch> (that points gh at a fork).
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upstream Sync (microsoft/terminal → intelligent-terminal)
Cherry-pick commit-by-commit from https://github.com/microsoft/terminal
into this fork, preserving per-commit attribution, auto-skipping picks
that cancel each other out, and stopping cleanly the moment a
human-judgment conflict appears.
You — the agent reading this file — are the orchestrator. Each step
in the run is a single atomic call into one of the scripts/*.ps1 files.
There is intentionally no PowerShell driver, because every interesting
decision (build-fix vs. open stuck issue, retry vs. bail, finalize vs.
dry-run) wants LLM judgment the operator can audit in your transcript.
When to Use This Skill
- User asks to "sync upstream", "pull from microsoft/terminal", "catch up to upstream", or "run upstream sync".
- A scheduler invokes the agent on a weekly/daily cadence.
- The previous run left an
upstream-sync-stucklabeled issue open and the human has finished resolving the conflict — close the issue (that IS the lock-clear signal) and re-run.
When NOT to Use This Skill
- User wants a one-shot rebase of a single feature branch onto upstream — that's a normal
git rebase, not this skill. - An
upstream-sync-stucklabeled issue is open onmicrosoft/intelligent-terminal— do not re-run; resolve the conflict on the stuck branch first, then close the issue.
Prerequisites
git2.38+ (forcherry-pick --keep-redundant-commits),ghCLI authenticated againstmicrosoft/intelligent-terminal(needs push toupstream-sync/*topic branches + issue/label create), PowerShell 7+ (pwsh) on PATH.originMUST point atmicrosoft/intelligent-terminal. All scripts push tooriginand pass-R microsoft/intelligent-terminalexplicitly. Verify withgit remote -vbefore running.- Full git history on
origin/main(no shallow clone). Watermark discovery walks up to 5000 commits scanning forcherry picked from commit <sha>trailers. In CI, useactions/checkout@v4withfetch-depth: 0. - Windows build host with Visual Studio 2022, Windows SDK,
vswhere, andtools\razzle.cmd/bz. Build is a hard gate before finalize. - No
state.jsonto bootstrap. Watermark = newest(cherry picked from commit <sha>)trailer onorigin/main. If the fork has never usedcherry-pick -x, run the one-time First-time sync.
State Model (no state file)
Every persistent fact lives in the source that owns it:
| Question | Source of truth |
| Last-synced upstream commit? | Newest (cherry picked from commit <sha>) trailer on origin/main whose target is reachable from upstream/main. Derived by 02-compute-pending.ps1. |
| What's pending? | git log --cherry-pick --right-only --no-merges origin/main...upstream/main, drop SHAs at/before the watermark. Patch-id based, so a picked-then-reverted commit correctly re-appears. |
| Is the scheduler locked? | Any open issue with the upstream-sync-stuck label on microsoft/intelligent-terminal. Closing it IS the lock-clear signal. |
| Where do build logs go? | Generated Files/upstream-sync/<YYYY-MM-DD>/ — gitignored by the repo root's **/Generated Files/. Never committed. |
Why cherry-pick (not rebase or merge)
- Rebase upstream/main — ❌ fork history contains old "Merge upstream" commits; rebase replays them and explodes conflicts (verified failure on sister repo).
- Merge upstream/main — ⚠️ works, but collapses the whole sync into one blob commit, killing per-commit review and
git bisect. - Cherry-pick commit-by-commit — ✅ preserves authorship + per-commit content, allows mechanical revert-pair skipping, produces a reviewable PR.
Run a sync
Eight-step orchestration. Full commands, JSON contracts, and
failure-handling for every step are in
references/run-a-sync.md. The flow:
1. Preconditions (clean tree, on main FF, no open stuck issue)
2. Create branch upstream-sync/<UTC-yyyy-MM-dd-HHmmss-rand4>
3. Fetch upstream (verify owner/repo identity of the `upstream` remote)
4. Compute pending ← scripts/02-compute-pending.ps1 (→ JSON)
5. Cherry-pick loop ← scripts/03-cherry-pick-one.ps1 per SHA (→ JSON)
picked / skipped-empty → continue
stuck → 5a (push branch, file upstream-sync-stuck issue, EXIT)
6. (No commits picked? exit clean.)
before build: re-pin build/pgo/Terminal.PGO.props if upstream bumped
its Windows Terminal Major.Minor (else PGO build fails)
7. Build ← scripts/04-try-build.ps1 (→ JSON)
build-ok → step 8
build-failed → ONE focused fix commit, re-build; else 7a
build-inconclusive → 7a
7a. Surface failure to operator, EXIT (no issue filed for build failures)
8. Finalize: push, `gh pr create`, optional `gh pr merge --rebase --auto`Key invariants (the agent MUST hold these — full rationale in the runbook):
- Atomic per-commit. Each pick is one commit on the sync branch carrying the upstream author/date and the
(cherry picked from commit <sha>)trailer. Never amend across picks. - Stuck → exit clean. On a Tier-3 conflict (script returns
status: "stuck"), do NOT continue past it — push the branch, file the labeled issue, exit. The human resolves on the stuck branch, merges (no squash), closes the issue. - One build-fix commit, max. Build-blocking fixes land as exactly one extra commit on the sync branch. Anything bigger → exit; the operator pushes a manual fix or runs a follow-up PR.
- Never squash-merge the sync PR. Squashing destroys per-commit attribution AND the trailer the next sync uses as its watermark. The PR body banner warns reviewers; the recipe arms
--rebase --auto.
Recovery procedures (rare)
Direct-to-main escape hatch, first-time watermark seeding, squash-merge
recovery: references/recovery-procedures.md.
Each requires explicit operator action.
After-PR review handling — fix-in-PR vs. follow-up PR
Once the sync PR is open, reviewers (Copilot + humans) will comment.
Only build-blocking fixes belong on the sync branch as one focused
extra commit. Everything else — code-quality, logic-bug suggestions,
translation corrections, spelling-allowlist migrations, doc nits, design
feedback — goes into a follow-up PR that targets the sync branch
(not main). The cherry-pick PR must stay reviewable as "per-commit,
faithful to upstream + minimum must-merge delta".
Full rubric, worktree mechanics, PR-body template:
references/follow-up-pr.md.
Gotchas
- Never squash-merge the sync PR. Squashing destroys per-commit
attribution AND collapses the trailers the next run uses as its
watermark. The PR body opens with a banner; step 8 arms
gh pr merge --rebase --auto. - Never strip the
(cherry picked from commit <sha>)trailer when hand-resolving a stuck pick. That trailer IS the watermark. - Never rebase
upstream/mainonto this fork. Use cherry-pick — rebase replays old "Merge upstream" commits and explodes. - Don't amend substantive review fixes into the sync PR. Only build-blocking fixes (max one extra commit). Everything else → follow-up PR.
.github/workflows/spelling2.ymlalways conflicts and is always "take upstream wholesale". The Tier-0 list inreferences/03-known-conflicts.mdhandles it — extend the list when you find the next file with this pattern.gh pr createon Windows can fail with "Head sha can't be blank" on freshly-pushed branches. The step-8 recipe wraps it in a 3× retry. Do not "fix" it to use--head <owner>:<branch>(that pointsghat a fork).- Cherry-pick over
git revert-style commits is intentional, not skipped. We only skip revert-pairs where both sides are inside the pending range. A revert of an already-merged commit must land — otherwise the fork diverges silently. - Single-host scheduler. The stuck-lock is a read-then-check gate,
not an atomic lease. Run from ONE host. For multi-host fan-out, layer
atomic locking on top (GitHub Actions
concurrency: upstream-syncis easiest). - CRLF/LF on manifest files. Cherry-picks preserve upstream endings,
but Tier-2 LLM-touched resolutions on
.yml/.xml/.csproj/winget manifests may downgrade to LF. Re-normalize before staging — seereferences/03-conflict-triage.md. - PGO pin follows upstream.
build/pgo/Terminal.PGO.propshard-pins the PGO database to upstream's Windows TerminalMajor.Minor(ourcustom.propsstays0.1, so it can't be derived). When a sync bumps the upstream version, re-pin those two values or the build fails withCould not find matching PGO package. Step 7's pre-build check covers this.
Troubleshooting
| Issue | Solution |
02-compute-pending.ps1 throws "No 'cherry picked from commit' trailer …" | Fork has never used cherry-pick -x yet. Run the one-time First-time sync. |
| Stuck issue prevents new run | Resolve on the stuck branch, open + merge a PR (keep the trailer, don't squash), then close the stuck issue. The next scheduler tick proceeds. |
03-cherry-pick-one.ps1 returns "skipped-empty" | Expected for upstream no-op commits and fork-already-applied patches. The loop skips and continues. |
| Same file conflicts every run | Add it to references/03-known-conflicts.md with the right strategy (take-upstream or take-ours; union is reserved and currently escalates instead of auto-resolving). |
gh pr create returns "Head sha can't be blank" | Step 8 retries 3×. On slow networks, the operator may need a manual second run. |
References
references/run-a-sync.md— full eight-step procedure with commands.references/03-conflict-triage.md— Tier 0/1/2/3 conflict-resolution rubric.references/03-known-conflicts.md— files with fixed Tier-0 resolutions.references/follow-up-pr.md— fix-in-PR vs. follow-up PR rubric and worktree workflow.references/recovery-procedures.md— direct-to-main, first-time seed, squash-merge recovery.scripts/02-compute-pending.ps1— derive watermark + pending list (no state file).scripts/03-cherry-pick-one.ps1— cherry-pick one SHA with author/date pinning + Tier-0/Tier-1.scripts/04-try-build.ps1— runbz no_clean; log toGenerated Files/....
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

