with one click
ce-sync-upstream
[F] 检测上游仓库更新,生成智能分析报告,辅助决策是否整合
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
[F] 检测上游仓库更新,生成智能分析报告,辅助决策是否整合
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Fork Overlay:Task Bundle 持久化 + Failure FSM 集成。在 ce:work 基础上增加 state.md 读写和状态机转换。使用时机:执行 ce:work 时,如果任务有对应的 Task Bundle(docs/tasks/<id>/),加载此 skill 以启用持久化和状态追踪。
Fork Overlay:Codex-first 外部执行器策略。按任务特征路由到 Claude 或 Codex,Codex-first(非品牌路由)。使用时机:需要决定是否将当前任务派发给 Codex 时加载此 skill。
Fork Overlay:经验分层沉淀升级阶梯。检测是否值得将 solution 升级为 pattern 或 skill。使用时机:ce:compound 完成后手动调用,分析 docs/solutions/ 中的重复模式。(不会自动触发,需主动加载此 skill)
Fork Overlay:外部模型调用前置检查门控。调用 Codex/Gemini 之前运行五项检查,防止调用失败浪费时间。使用时机:任何调用外部模型(Codex [C]、Gemini [G])之前自动运行。
Fork Overlay:ce:work 意图分类门控。在执行前识别任务意图(实现/修复/重构/探索),设定对应的执行策略。使用时机:ce:work Phase 0(环境扫描)之后、Phase 1(Quick Start)之前。
Fork Overlay:Codex Patch Approval 咨询版。当 Codex 返回 patch 时,Claude 审批后才写入文件。使用时机:Codex 以 patch/diff 格式返回代码变更时,由 Claude 作为审批层。
| name | ce:sync-upstream |
| description | [F] 检测上游仓库更新,生成智能分析报告,辅助决策是否整合 |
| argument-hint | [F=强制全量扫描] |
一键检测多个上游仓库最近 30 天的更新,通过角色化策略获取数据,过滤噪音,生成带 YAML frontmatter 的结构化报告供用户决策是否整合。
| 参数 | 说明 | 示例 |
|---|---|---|
[F] | 强制全量扫描(v1 无实际差异,保留为未来缓存接口) | /ce:sync-upstream [F] |
检测 [F] 标志:如果包含 [F] 或 [f] → FULL_SCAN = true,从参数中移除。
前置条件验证:
gh CLI: gh auth statusupstream remote: git remote get-url upstream失败不中断整体流程,仅对相关仓库标记 status=failed。
读取 docs/sync-reports/upstream-repos.json。如不存在,使用默认 4 仓库配置创建。
计算 30 天前日期:
powershell -c "(Get-Date).AddDays(-30).ToString('yyyy-MM-ddTHH:mm:ssZ')"
对每个仓库根据 strategy 并行执行:
git-native (parent): git fetch upstream main --no-tags → git log --since="30 days ago" HEAD..upstream/main
github-api (reference): gh api repos/{owner}/{repo}/releases + gh api repos/{owner}/{repo}/commits
releases (runtime): gh api repos/{owner}/{repo}/releases
排除:^chore、^bump、dependabot、^Merge pull request、^Merge branch
对每个变更评估相关性(高/中/低),必须附理由。
写入 docs/sync-reports/YYYY-MM-DD-upstream-sync.md,包含 YAML frontmatter + 摘要表格 + 详细分析 + 整合建议优先级。
使用 AskUserQuestion:
"报告已生成。发现 N 个相关更新。下一步?"
/ce:plangit merge upstream/main --squash