AIWG 上游更新同步
customize-upstream-sync
将上游 AIWG 的最新更新拉取到用户的分支(fork)并重建——保留用户的定制内容。
- License 许可
- MIT
- 所属仓库
- jmagly/aiwg
- 最近更新
- 2026-11-14
- Stars
- ★ 229
- Forks
- 36
01 前言 Front Matter
- name
- customize-upstream-sync
- namespace
- aiwg
- platforms
- [ "all" ]
- description
- Pull the latest upstream AIWG updates into the user's fork and rebuild — preserves user customizations
03 SKILL.md 正文
Customize Upstream Sync
You pull the latest upstream AIWG changes into the user's fork, handle conflicts (preserving user customizations), rebuild, and report what changed. This only works in fork mode (where the upstream remote points to jmagly/aiwg).
Triggers
- "sync my AIWG"
- "pull in the latest AIWG updates"
- "update my fork"
- "update my AIWG from upstream"
- "what's new in upstream AIWG?"
- "pull upstream changes"
- "get the latest AIWG"
Trigger Patterns Reference
| Pattern | Example | Action |
|---|---|---|
| Sync request | "sync my AIWG" | Full upstream sync + rebuild |
| Check only | "what's new in upstream?" | Fetch + diff summary, no merge |
| Update request | "update my fork" | Full upstream sync + rebuild |
Behavior
When triggered:
-
Verify fork mode —
upstreamremote must exist:git -C <edgePath> remote get-url upstreamIf no
upstreamremote, explain: "This only works if you forked AIWG. Your clone doesn't have an upstream remote. If you want to track upstream updates, I can add one — or consider setting up a fork." -
Show what's incoming (before merging):
git -C <edgePath> fetch upstream git -C <edgePath> log HEAD..upstream/main --onelineReport: "Here's what upstream has (N commits):" with the log summary.
-
If check-only ("what's new") — stop here. Don't merge unless user confirms.
-
Merge:
git -C <edgePath> merge upstream/main -
Handle conflicts:
- If clean merge: proceed to rebuild
- If conflicts: run
git -C <edgePath> diff --name-only --diff-filter=U - For each conflicted file:
- If it's a user-added file (new file, not in upstream): auto-resolve keeping user's version
- If it's an upstream file the user also modified: pause and show the diff, ask which version to keep
- After all conflicts resolved:
git -C <edgePath> commit --no-edit
-
Rebuild and redeploy:
npm --prefix <edgePath> run build aiwg use all -
Push fork (so GitHub fork stays current):
git -C <edgePath> push origin main -
Report:
Synced to upstream/main (N commits merged). What changed upstream: - New skill: agentic/code/.../new-skill - Updated agent: agentic/code/.../some-agent.md + 3 more changes Your customizations: preserved (2 files unaffected) Deployed and pushed to your fork.
Conflict Strategy
- User-only files (new files the user added): always preserve, never overwrite
- Upstream-modified files the user also touched: pause, show diff, ask
- Pure upstream changes (files user never touched): auto-accept upstream version
When in doubt, keep the user's version and flag it for review.
Examples
Example 1: Clean sync
User: "sync my AIWG"
Action: fetch → log 5 new commits → merge (clean) → build → aiwg use all → push
Response: "Synced — 5 upstream commits merged, 0 conflicts. Your 2 customizations untouched. Rebuilt and pushed to your fork."
Example 2: Check only
User: "what's new in upstream AIWG?"
Action: fetch → git log HEAD..upstream/main --oneline
Response: "Upstream has 3 new commits: [list]. Say 'sync my AIWG' to pull them in."
Example 3: Conflict
User: "sync my AIWG"
Action: fetch → merge → conflict in agentic/code/addons/aiwg-utils/agents/aiwg-steward.md (user modified it too)
Response: "Upstream changed aiwg-steward.md which you've also modified. Here's the diff: [diff]. Keep yours, keep upstream's, or merge manually?"
Clarification Prompts
- "This will merge N upstream commits into your fork. Proceed?"
- "Upstream changed [file] which you also modified. Keep your version, upstream's version, or should I show you the diff?"
References
- @$AIWG_ROOT/src/channel/manager.mjs — edgePath config
- @$AIWG_ROOT/docs/customization/fork-workflow.md — Fork lifecycle docs
04 同仓库更多 Skills
plugin-search
Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything
plugin-search
Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything
host-hardening
Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.
exposure-analysis
Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.
host-hardening
Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.
exposure-analysis
Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.