feat: complete GeneralUpdate Skill CodeGen v2 — 123 files, 32/32 checklist, 4 bug fixes#13
Closed
JusterZhu wants to merge 3 commits into
Closed
feat: complete GeneralUpdate Skill CodeGen v2 — 123 files, 32/32 checklist, 4 bug fixes#13JusterZhu wants to merge 3 commits into
JusterZhu wants to merge 3 commits into
Conversation
This PR delivers a comprehensive upgrade transforming the skill suite from
a documentation-driven reference into an automated development toolkit.
## 🚀 New Automation Tools
- Parameterized code generator (336 combinations: 6 strategies x 7 frameworks x 2 Bowl x 4 scenes)
- BM25 search engine with 51 known issues database (8C + 11H + 20M + 12L)
- CLI skeleton: gskill init/uninstall/generate/versions/update (5 commands)
- Multi-platform support: 10 AI platform configs (Claude, Cursor, Windsurf, etc.)
- Single-command sync: _sync_all.py with --apply/--verify modes
## 📚 Documentation & Guidance
- Root SKILL.md: developer roadmap, 5-question decision tree, anti-patterns
- All 5 sub-skill SKILL.md: narrative workflows, pre-delivery checklists, anti-pattern tables
- CLAUDE.md: AI agent development guide
- Architecture docs: src -> CLI sync rules
## 🔍 User Experience
- Step-by-step narrative workflows (Step 1 -> Step 2 -> Step 3)
- User requirements extraction templates in every SKILL.md
- Pre-Delivery Checklists + Anti-Pattern lists for every sub-skill
- Structured output format (decision reasons + warnings + checklist)
## 🔬 Extension Skills
- generalupdate-migration: v9.x -> v10 / dev-branch -> stable migration path
- generalupdate-security-audit: 14-point security audit matrix
## 🧪 CI/CD
- CI workflow: Python search test, codegen validation, .NET build, TypeScript check
- Release workflow: full validate -> changelog -> GitHub Release
## 🐛 Bugs Fixed During Audit
- Fixed Dispatcher ambiguity in MVVM listener templates
- Fixed WinForms 'this' scope in event listeners
- Fixed MAUI missing using declarations
- Fixed CLI init only installed 1 skill (now installs all 7)
- Fixed CLI uninstall targeted scope
- Fixed project-scaffold {{PLACEHOLDER}} leakage
Co-Authored-By: Claude <noreply@anthropic.com>
18 tasks
There was a problem hiding this comment.
Pull request overview
This PR turns the GeneralUpdate Skill CodeGen repo into a distributable, multi-platform skill suite + CLI, bundling synced skill assets, a Python code generator, and a BM25 troubleshooting search engine targeting GeneralUpdate NuGet v10.4.6 stable.
Changes:
- Added a Node/TypeScript CLI (
gskill) for installing/uninstalling skills and delegating code generation to Python. - Added/expanded skill content, templates, and data assets (UI templates, strategy examples, troubleshooting database + BM25 search scripts).
- Added CI/release workflows to validate Python/TS/.NET generation/build and publish releases.
Reviewed changes
Copilot reviewed 120 out of 121 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
| SKILL.md | Root entry-point skill content and routing/roadmap. |
| skill.json | Skill package metadata (name, platforms, install command, version). |
| RULES.md | Stable API rules + generator/search usage guidance. |
| docs/architecture-data-flow.md | Describes source-of-truth vs synced asset locations and sync workflow. |
| cli/tsconfig.json | TypeScript compiler configuration for CLI build output. |
| cli/src/utils/template.ts | Installs/syncs skill assets into target AI platform directories. |
| cli/src/utils/logger.ts | Minimal chalk-based logging helpers for CLI output. |
| cli/src/utils/github.ts | GitHub releases fetch/download helpers with rate-limit handling. |
| cli/src/utils/extract.ts | Zip extraction + folder copying utilities for installs/updates. |
| cli/src/utils/detect.ts | Detects installed AI tool folders and suggests install target(s). |
| cli/src/types/index.ts | CLI shared types (AIType, PlatformConfig, Release, folder mappings). |
| cli/src/index.ts | CLI entrypoint wiring commands with commander. |
| cli/src/commands/versions.ts | Lists available versions from GitHub releases. |
| cli/src/commands/update.ts | Re-installs latest version by delegating to init with force. |
| cli/src/commands/uninstall.ts | Removes installed skill directories safely per-platform. |
| cli/src/commands/init.ts | Interactive installer for one platform or all platforms. |
| cli/src/commands/generate.ts | Runs Python generator (generate.py) from installed assets. |
| cli/package.json | CLI package metadata, bin entry, and dependencies. |
| cli/assets/templates/platforms/windsurf.json | Windsurf install path/frontmatter config. |
| cli/assets/templates/platforms/roocode.json | RooCode install path/frontmatter config. |
| cli/assets/templates/platforms/kiro.json | Kiro install path/frontmatter config (steering). |
| cli/assets/templates/platforms/gemini.json | Gemini CLI install path/frontmatter config. |
| cli/assets/templates/platforms/cursor.json | Cursor install path/frontmatter config. |
| cli/assets/templates/platforms/copilot.json | GitHub Copilot install path config (prompts). |
| cli/assets/templates/platforms/continue.json | Continue install path/frontmatter config. |
| cli/assets/templates/platforms/codex.json | Codex install path/frontmatter config. |
| cli/assets/templates/platforms/claude.json | Claude Code install path/frontmatter config. |
| cli/assets/templates/platforms/agent.json | Generic agent (antigravity) install path/frontmatter config. |
| cli/assets/templates/base/skill-content.md | Base template for legacy single-skill install content. |
| cli/assets/skills/generalupdate-ui/templates/WpfDevelopersViewModel.cs | WPFDevelopers UI ViewModel template for update progress. |
| cli/assets/skills/generalupdate-ui/templates/WPFDevelopersStyle.xaml | WPFDevelopers themed update window template. |
| cli/assets/skills/generalupdate-ui/templates/SemiUrsaUpgradeView.axaml | Avalonia SemiUrsa upgrade-process waiting window template. |
| cli/assets/skills/generalupdate-ui/templates/SemiUrsaClientView.axaml | Avalonia SemiUrsa full-state client update window template. |
| cli/assets/skills/generalupdate-ui/templates/RealDownloadService.cs | Bridge template mapping GeneralUpdate events to UI model/service. |
| cli/assets/skills/generalupdate-ui/templates/MauiUpdatePage.xaml.cs | MAUI update ViewModel template using v10.4.6 API style. |
| cli/assets/skills/generalupdate-ui/templates/MauiUpdatePage.xaml | MAUI update page XAML template. |
| cli/assets/skills/generalupdate-ui/templates/LayUIStyle.xaml | LayUI.Wpf themed update window template. |
| cli/assets/skills/generalupdate-ui/templates/DownloadViewModels.cs | Cross-framework enhanced MVVM download ViewModel template. |
| cli/assets/skills/generalupdate-ui/templates/AntdUIStyle.cs | WinForms/AntdUI template for update UI integration. |
| cli/assets/skills/generalupdate-ui/SKILL.md | UI skill workflow, requirement extraction, and verification checklist. |
| cli/assets/skills/generalupdate-troubleshoot/SKILL.md | Troubleshooting skill workflow + symptom extraction + search usage. |
| cli/assets/skills/generalupdate-troubleshoot/scripts/tests/test_search.py | BM25 unit tests for search correctness and regressions. |
| cli/assets/skills/generalupdate-troubleshoot/scripts/search.py | CLI-friendly BM25 search script wrapper. |
| cli/assets/skills/generalupdate-troubleshoot/scripts/core.py | BM25 core implementation + CSV loading/search logic. |
| cli/assets/skills/generalupdate-troubleshoot/reference.md | Known-issues reference with severities and fixes. |
| cli/assets/skills/generalupdate-troubleshoot/data/strategies.csv | Strategy data source for BM25/lookup. |
| cli/assets/skills/generalupdate-troubleshoot/data/issues.csv | Issues data source for BM25/lookup. |
| cli/assets/skills/generalupdate-strategy/SKILL.md | Strategy decision tree + requirement extraction + validation checklist. |
| cli/assets/skills/generalupdate-strategy/examples/SilentStrategy.cs | Silent strategy example for v10.4.6 API. |
| cli/assets/skills/generalupdate-strategy/examples/PushStrategy.cs | SignalR push strategy example and caveats. |
| cli/assets/skills/generalupdate-strategy/examples/OssStrategy.cs | OSS strategy example for versions.json-based updates. |
| cli/assets/skills/generalupdate-strategy/examples/DifferentialStrategy.cs | Differential strategy example and constraints. |
| cli/assets/skills/generalupdate-strategy/examples/CrossVersionStrategy.cs | CVP example and constraints. |
| cli/assets/skills/generalupdate-strategy/examples/ClientServerStrategy.cs | Client-server strategy example for standard backend. |
| cli/assets/skills/generalupdate-security-audit/SKILL.md | Security audit skill and severity-rated matrix. |
| cli/assets/skills/generalupdate-migration/SKILL.md | Migration guide skill (v9→v10 and dev-branch→stable). |
| cli/assets/skills/generalupdate-init/templates/MinimalIntegration.cs | Minimal integration template using placeholders. |
| cli/assets/skills/generalupdate-init/templates/generalupdate.manifest.json | Manifest template with placeholders. |
| cli/assets/skills/generalupdate-init/templates/FullIntegration.cs | Full integration template with event listeners. |
| cli/assets/skills/generalupdate-init/SKILL.md | Init/scaffold workflow + requirement extraction + checklists. |
| cli/assets/skills/generalupdate-init/reference.md | Stable API reference for Configinfo/events/server contract. |
| cli/assets/skills/generalupdate-init/project-scaffold/UpgradeProgram.cs | Upgrade project entry scaffold. |
| cli/assets/skills/generalupdate-init/project-scaffold/UpgradeApp.csproj | Upgrade scaffold project definition (NuGet refs). |
| cli/assets/skills/generalupdate-init/project-scaffold/ClientProgram.cs | Client project entry scaffold. |
| cli/assets/skills/generalupdate-init/project-scaffold/ClientApp.csproj | Client scaffold project definition (NuGet refs). |
| cli/assets/skills/generalupdate-advanced/templates/NamedPipeIPC.cs | IPC replacement reference template (dev-branch note). |
| cli/assets/skills/generalupdate-advanced/templates/CustomStrategy.cs | Custom strategy reference template (dev-branch note). |
| cli/assets/skills/generalupdate-advanced/templates/CustomHooks.cs | Custom hooks reference template (dev-branch note). |
| cli/assets/skills/generalupdate-advanced/templates/BowlIntegration.cs | Bowl integration reference template (stable limitations). |
| cli/assets/skills/generalupdate-advanced/SKILL.md | Advanced skill workflow + validation checklist + anti-patterns. |
| cli/assets/skills/generalupdate-advanced/reference.md | Advanced stable API reference (pipeline, events, AOT, etc.). |
| cli/assets/scripts/tests/test_search.py | Synced BM25 tests for CLI asset bundle. |
| cli/assets/scripts/search.py | Synced BM25 search wrapper for CLI asset bundle. |
| cli/assets/scripts/generate/templates/UpgradeProgram.cs.template | Generator template for upgrade entry. |
| cli/assets/scripts/generate/templates/manifest.json.template | Generator template for manifest output. |
| cli/assets/scripts/generate/templates/listeners_winforms.cs.template | Generator listeners template (WinForms). |
| cli/assets/scripts/generate/templates/listeners_mvvm.cs.template | Generator listeners template (MVVM). |
| cli/assets/scripts/generate/templates/listeners_maui.cs.template | Generator listeners template (MAUI). |
| cli/assets/scripts/generate/templates/listeners_console.cs.template | Generator listeners template (console). |
| cli/assets/scripts/generate/templates/IssuesWarning.md.template | Generator output template for known-issue warnings. |
| cli/assets/scripts/generate/templates/DeploymentChecklist.md.template | Generator output template for deployment checklist. |
| cli/assets/scripts/generate/templates/bowl_notice.cs.template | Generator snippet template for Bowl notice/config. |
| cli/assets/scripts/generate/templates/Bootstrap.cs.template | Generator template for bootstrap integration code. |
| cli/assets/scripts/generate.py | Synced Python generator entry script for CLI bundle. |
| cli/assets/scripts/core.py | Synced BM25 core for CLI bundle. |
| cli/assets/data/strategies.csv | Synced strategies DB for CLI bundle. |
| cli/assets/data/issues.csv | Synced issues DB for CLI bundle. |
| CLAUDE.md | Repo guidance for AI agents + source-of-truth + sync commands. |
| .gitignore | Ignore Python __pycache__. |
| .github/workflows/release.yml | Release workflow for validation + CLI build + GitHub Release publish. |
| .github/workflows/ci.yml | CI workflow for Python tests, generator checks, .NET build, TS check. |
| .claude/skills/generalupdate-ui/SKILL.md | Source-of-truth UI skill workflow updates. |
| .claude/skills/generalupdate-troubleshoot/SKILL.md | Source-of-truth troubleshooting skill workflow updates. |
| .claude/skills/generalupdate-troubleshoot/scripts/tests/test_search.py | Source-of-truth BM25 tests. |
| .claude/skills/generalupdate-troubleshoot/scripts/search.py | Source-of-truth BM25 wrapper. |
| .claude/skills/generalupdate-troubleshoot/scripts/core.py | Source-of-truth BM25 core. |
| .claude/skills/generalupdate-troubleshoot/data/strategies.csv | Source-of-truth strategies DB. |
| .claude/skills/generalupdate-troubleshoot/data/issues.csv | Source-of-truth issues DB. |
| .claude/skills/generalupdate-strategy/SKILL.md | Source-of-truth strategy skill workflow updates. |
| .claude/skills/generalupdate-security-audit/SKILL.md | Source-of-truth security-audit skill. |
| .claude/skills/generalupdate-migration/SKILL.md | Source-of-truth migration skill. |
| .claude/skills/generalupdate-init/templates/MinimalIntegration.cs | Source-of-truth minimal template placeholderization. |
| .claude/skills/generalupdate-init/templates/generalupdate.manifest.json | Source-of-truth manifest placeholderization. |
| .claude/skills/generalupdate-init/templates/FullIntegration.cs | Source-of-truth full template placeholderization. |
| .claude/skills/generalupdate-init/SKILL.md | Source-of-truth init workflow updates. |
| .claude/skills/generalupdate-init/project-scaffold/ClientProgram.cs | Source-of-truth scaffold client entry update. |
| .claude/skills/generalupdate-advanced/SKILL.md | Source-of-truth advanced workflow updates. |
| .claude/scripts/generate/templates/UpgradeProgram.cs.template | Source-of-truth generator upgrade template. |
| .claude/scripts/generate/templates/manifest.json.template | Source-of-truth generator manifest template. |
| .claude/scripts/generate/templates/listeners_winforms.cs.template | Source-of-truth generator WinForms listeners template. |
| .claude/scripts/generate/templates/listeners_mvvm.cs.template | Source-of-truth generator MVVM listeners template. |
| .claude/scripts/generate/templates/listeners_maui.cs.template | Source-of-truth generator MAUI listeners template. |
| .claude/scripts/generate/templates/listeners_console.cs.template | Source-of-truth generator console listeners template. |
| .claude/scripts/generate/templates/IssuesWarning.md.template | Source-of-truth generator warnings template. |
| .claude/scripts/generate/templates/DeploymentChecklist.md.template | Source-of-truth generator checklist template. |
| .claude/scripts/generate/templates/bowl_notice.cs.template | Source-of-truth generator Bowl notice template. |
| .claude/scripts/generate/templates/Bootstrap.cs.template | Source-of-truth generator bootstrap template. |
| .claude/scripts/generate.py | Source-of-truth generator script. |
| .claude/scripts/_sync_all.py | Source-of-truth sync tool to copy .claude/ artifacts into CLI assets. |
| .claude-plugin/plugin.json | Claude plugin manifest metadata. |
| .claude-plugin/marketplace.json | Marketplace metadata for plugin distribution. |
| @@ -0,0 +1,159 @@ | |||
| import { mkdir, writeFile, cp, access, readdir, stat } from 'node:fs/promises'; | |||
| import type { PlatformConfig } from '../types/index.js'; | ||
|
|
||
| const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
| const ASSETS_DIR = join(__dirname, '..', 'assets'); |
Comment on lines
+6
to
+9
| import type { AIType } from '../types/index.js'; | ||
| import { AI_TYPES } from '../types/index.js'; | ||
| import { generatePlatformFiles } from '../utils/template.js'; | ||
| import { detectAIType, getAITypeDescription } from '../utils/detect.js'; |
|
|
||
| try { | ||
| const effectiveDir = isGlobal ? homedir() : cwd; | ||
| const copiedFolders = await generatePlatformFiles(effectiveDir, aiType, isGlobal); |
| }); | ||
|
|
||
| console.log(); | ||
| logger.dim('Use: gskill init --version <tag> to install a specific version'); |
Comment on lines
+151
to
+157
| <!-- ═══ 已是最新版 ═══ --> | ||
| <StackPanel IsVisible="{Binding IsCompleted}" | ||
| HorizontalAlignment="Center" Spacing="8"> | ||
| <TextBlock Text="已是最新版本 ✓" FontSize="16" | ||
| Foreground="{DynamicResource SemiColorSuccessPrimary}" | ||
| HorizontalAlignment="Center" /> | ||
| </StackPanel> |
| info: (msg: string) => console.log(chalk.blue('info'), msg), | ||
| success: (msg: string) => console.log(chalk.green('success'), msg), | ||
| warn: (msg: string) => console.log(chalk.yellow('warn'), msg), | ||
| error: (msg: string) => console.log(chalk.red('error'), msg), |
Comment on lines
+63
to
+69
| const effectiveDir = isGlobal ? homedir() : targetDir; | ||
| const rootDir = AI_ROOT_DIRS[aiType]; | ||
| if (!rootDir) throw new Error(`Unknown AI type: ${aiType}`); | ||
|
|
||
| const targetSkillsDir = join(effectiveDir, rootDir, 'skills'); | ||
| const sourceSkillsDir = join(ASSETS_DIR, 'skills'); | ||
|
|
Comment on lines
+84
to
+86
| await cp(src, dst, { recursive: true, force: true }); | ||
| createdFolders.push(`${rootDir}/skills/${skillName}`); | ||
| copiedAny = true; |
Comment on lines
+93
to
+99
| if (process.platform === 'win32') { | ||
| await execAsync(`xcopy "${src}" "${dst}" /E /I /Y`); | ||
| } else { | ||
| await execAsync(`cp -r "${src}/." "${dst}"`); | ||
| } | ||
| createdFolders.push(`${rootDir}/skills/${skillName}`); | ||
| copiedAny = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades the GeneralUpdate Skill CodeGen from a documentation-driven reference into an automated development toolkit. 78 new files added, 4 critical bugs fixed, 32/32 readiness checks passed.
What's Included
🚀 Automation Tools
python3 .claude/scripts/generate.py --framework wpf --strategy oss --bowlpython3 scripts/search.py "升级后启动不了"→ pinpoints C1 (score 24.79). 15/15 tests passgskill init/uninstall/generate/versions/updatewith multi-platform support (10 AI platforms)_sync_all.py --applyensures CLI bundle is up-to-date📚 Developer Experience
🔬 Extension Skills
generalupdate-migration: v9.x → v10 / dev-branch → stable migration pathgeneralupdate-security-audit: 14-point security audit matrix with severity ratings🧪 CI/CD
🐛 Bug Fixes (from comprehensive audit)
thisscope in event listenersusingdeclarations{{PLACEHOLDER}}in output📊 Stats
Validation
Next Steps After Merge
gh release create v0.0.1-bate.1— tag and create GitHub Releasecd cli && npm publish— publish CLI to npm/plugin install generalupdate-skill— verify installationCo-Authored-By: Claude noreply@anthropic.com