feat(skills): add Enterprise Update Assistant (fixes #20505)#20570
feat(skills): add Enterprise Update Assistant (fixes #20505)#20570Solventerritory wants to merge 4 commits intogoogle-gemini:mainfrom
Conversation
) Adds two new built-in skills to help enterprise teams customize and maintain Gemini CLI forks sustainably. ## Layer 1: enterprise-fork-advisor Guides organizations toward configuration-based customization to avoid unnecessary forks. Activated when users ask whether to fork, how to configure Gemini CLI for enterprise use, or how to migrate from a fork. - SKILL.md: Decision framework mapping customization needs to the right mechanism (settings.json → extension → MCP → fork as last resort). - references/customization-matrix.md: Full matrix covering auth, tool restrictions, custom tools, context/system prompt, UI, network, multi-team isolation, and policy enforcement. - references/configuration-examples.md: Copy-paste JSON and TOML snippets for the most common enterprise configurations, including a complete gemini-extension.json manifest example. - scripts/assess_fork_need.cjs: Analyzes `git diff upstream/main..HEAD` and categorizes each changed file into AVOIDABLE_VIA_CONFIG, AVOIDABLE_VIA_EXTENSION, AVOIDABLE_VIA_MCP, or REQUIRES_FORK, with per-file rationale and a summary recommendation. ## Layer 2: upstream-sync Helps enterprise teams that do maintain a fork stay current with upstream releases safely. Activated when users ask about syncing their fork, merging upstream changes, or resolving upstream conflicts. - SKILL.md: Pre-flight checklist, step-by-step sync workflow, and a recurring cadence guide. - references/conflict-categories.md: Risk tier definitions (LOW / MEDIUM / HIGH) with file-pattern heuristics and resolution approach for each tier, including special cases (security patches, breaking API changes, upstream reverts). - references/merge-strategies.md: Concrete merge vs cherry-pick guidance, per-file-type resolution recipes (package-lock.json, settings.schema.json, client.ts, loopDetectionService.ts), and a fork health log template. - scripts/analyze_upstream.cjs: Fetches upstream, counts commits behind, and produces a risk-categorized file report (pipeable to generate_merge_plan.cjs). - scripts/generate_merge_plan.cjs: Reads the analysis report and outputs a numbered, risk-ordered merge plan with commands and notes for each step, gated by test runs between risk tiers. No TypeScript changes — built-in skills are auto-discovered from the builtin/ directory by skillManager.ts.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces two new built-in skills, Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces two new skills, enterprise-fork-advisor and upstream-sync, designed to assist enterprise teams in managing forks of Gemini CLI. The changes include markdown documentation and Node.js scripts for these skills. My review found a critical issue in a TOML configuration example that would cause parsing errors, and a high-severity bug in a script that fails to handle file paths with spaces. I've provided suggestions to fix both issues.
packages/core/src/skills/builtin/enterprise-fork-advisor/references/configuration-examples.md
Outdated
Show resolved
Hide resolved
packages/core/src/skills/builtin/enterprise-fork-advisor/scripts/assess_fork_need.cjs
Show resolved
Hide resolved
Adds preflight_check.cjs — run it before any upstream sync attempt to automatically validate 10 preconditions: 1. upstream remote exists 2. upstream remote is reachable 3. working tree is clean (no uncommitted changes) 4. no risky untracked source files 5. not on a protected branch (main/master) 6. backup tag exists 7. commits-behind count (warn >20, fail >100) 8. no merge/rebase/cherry-pick already in progress 9. node_modules present 10. upstream branch exists on remote Exit 0 = all clear; exit 1 = fix failures before proceeding. Pipes naturally into analyze_upstream.cjs | generate_merge_plan.cjs. Also updates SKILL.md to lead with the script instead of a manual checklist, while keeping the manual checklist as a fallback.
ca09da4 to
e969ba4
Compare
Two fixes from gemini-code-assist review on google-gemini#20570: 1. configuration-examples.md: Fix invalid TOML — duplicate [general] table header caused a parse error. Merged defaultApprovalMode and telemetry into a single [general] block. 2. assess_fork_need.cjs: Fix extractChangedFiles() regex to handle file paths containing spaces. git diff quotes such paths with double quotes (e.g. "a/path with spaces/file"); the previous regex failed to match them. Updated to accept both quoted and unquoted paths and strips the surrounding quotes before adding to the Set.
8da9965 to
d813991
Compare
Adds two new built-in skills to help enterprise teams customize and maintain Gemini CLI forks sustainably.
Layer 1: enterprise-fork-advisor
Guides organizations toward configuration-based customization to avoid unnecessary forks. Activated when users ask whether to fork, how to configure Gemini CLI for enterprise use, or how to migrate from a fork.
git diff upstream/main..HEADand categorizes each changed file into AVOIDABLE_VIA_CONFIG, AVOIDABLE_VIA_EXTENSION, AVOIDABLE_VIA_MCP, or REQUIRES_FORK, with per-file rationale and a summary recommendation.Layer 2: upstream-sync
Helps enterprise teams that do maintain a fork stay current with upstream releases safely. Activated when users ask about syncing their fork, merging upstream changes, or resolving upstream conflicts.
No TypeScript changes — built-in skills are auto-discovered from the builtin/ directory by skillManager.ts.
Summary
Details
Related Issues
How to Validate
Pre-Merge Checklist