-
Notifications
You must be signed in to change notification settings - Fork 0
feat: complete GeneralUpdate Skill CodeGen v2 β 7 skills, BM25 search, 336 codegen combos, CLI #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: complete GeneralUpdate Skill CodeGen v2 β 7 skills, BM25 search, 336 codegen combos, CLI #15
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "name": "generalupdate-skill-codegen", | ||
| "id": "generalupdate-skill-codegen", | ||
| "owner": { | ||
| "name": "JusterZhu" | ||
| }, | ||
| "metadata": { | ||
| "description": ".NET auto-update skill suite β 7 skills for GeneralUpdate: scaffolding, UI, strategy, advanced, troubleshooting (50+ issues), migration, and security audit", | ||
| "version": "0.0.1-bate.1" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "generalupdate-skill", | ||
| "source": "./", | ||
| "description": "Complete GeneralUpdate (.NET auto-update) integration skill suite. Generates dual-project scaffolding, full-state update UI (6 frameworks), 6 update strategies decision tree (Client-Server/OSS/Silent/Differential/CVP/Push), advanced extension points (Bowl crash daemon, IPC replacement, AOT), BM25-powered troubleshooting search (50+ known issues), v9.xβv10 migration guide, and 14-point security audit matrix. All templates target NuGet v10.4.6 stable API.", | ||
| "version": "0.0.1-bate.1", | ||
|
|
||
| "author": { | ||
| "name": "JusterZhu" | ||
| }, | ||
| "keywords": [ | ||
| "generalupdate", | ||
| "auto-update", | ||
| "dotnet", | ||
| ".net", | ||
| "wpf", | ||
| "avalonia", | ||
| "maui", | ||
| "update", | ||
| "upgrade", | ||
| "bootstrap", | ||
| "bowl", | ||
| "differential", | ||
| "nuget" | ||
| ], | ||
| "category": "code-generation", | ||
| "strict": false | ||
| } | ||
| ] | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "generalupdate-skill", | ||
| "description": "Complete .NET auto-update skill suite for GeneralUpdate. 7 skills covering: Bootstrap scaffolding, update UI (6 frameworks), 6 strategies (Client-Server/OSS/Silent/Differential/CVP/Push), advanced extension points (Bowl, IPC, AOT), 50+ known issues diagnosis with BM25 search engine, version migration, and security audit. All templates target NuGet v10.4.6 stable.", | ||
| "version": "0.0.1-bate.1", | ||
|
|
||
| "author": { | ||
| "name": "JusterZhu" | ||
| }, | ||
| "license": "Apache-2.0", | ||
| "keywords": [ | ||
| "generalupdate", | ||
| "auto-update", | ||
| "dotnet", | ||
| ".net", | ||
| "wpf", | ||
| "avalonia", | ||
| "maui", | ||
| "winforms", | ||
| "bootstrap", | ||
| "bowl", | ||
| "differential", | ||
| "nuget" | ||
| ], | ||
| "skills": [ | ||
| ".claude/skills/generalupdate-init", | ||
| ".claude/skills/generalupdate-ui", | ||
| ".claude/skills/generalupdate-strategy", | ||
| ".claude/skills/generalupdate-advanced", | ||
| ".claude/skills/generalupdate-troubleshoot", | ||
| ".claude/skills/generalupdate-migration", | ||
| ".claude/skills/generalupdate-security-audit" | ||
| ] | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| #!/usr/bin/env python3 | ||
| # -*- coding: utf-8 -*- | ||
| """ | ||
| Sync all source artifacts from .claude/ to cli/assets/ before release. | ||
| This is the single entry point for ensuring CLI bundles are up-to-date. | ||
|
|
||
| Usage: | ||
| python3 .claude/scripts/_sync_all.py # Dry run (verbose) | ||
| python3 .claude/scripts/_sync_all.py --apply # Actually copy files | ||
| python3 .claude/scripts/_sync_all.py --verify # Only check for differences | ||
| """ | ||
| import argparse | ||
| import filecmp | ||
| import os | ||
| import shutil | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| REPO_ROOT = Path(__file__).resolve().parent.parent.parent # .claude/scripts/ -> repo root | ||
| CLAUDE_DIR = REPO_ROOT / ".claude" | ||
| CLI_ASSETS_DIR = REPO_ROOT / "cli" / "assets" | ||
| SKILL_DIR = CLAUDE_DIR / "skills" | ||
|
|
||
| # Sync mappings: (source_relative, dest_relative, description) | ||
| SYNC_MAP = [ | ||
| # All 7 skills (to cli/assets/skills/) | ||
| ("skills", "skills", "All 7 skill directories"), | ||
| # Troubleshoot scripts + data (to cli/assets/scripts/ + cli/assets/data/) | ||
| ("skills/generalupdate-troubleshoot/scripts", "scripts", "BM25 search engine"), | ||
| ("skills/generalupdate-troubleshoot/data", "data", "Issues + strategies CSV"), | ||
| # Code generator | ||
| ("scripts/generate.py", "scripts/generate.py", "Parameterized code generator"), | ||
| ("scripts/generate", "scripts/generate", "Generator templates"), | ||
| ] | ||
|
|
||
|
|
||
| def sync_file(src: Path, dst: Path, apply: bool, dry_run: bool) -> str: | ||
| """Sync one file or directory. Returns status string.""" | ||
| if not src.exists(): | ||
| return f"β οΈ SOURCE MISSING: {src.relative_to(REPO_ROOT)}" | ||
|
|
||
| if dst.exists() and filecmp.cmp(src, dst) if src.is_file() else _dirs_equal(src, dst): | ||
|
|
||
| return f"β UP TO DATE: {src.relative_to(REPO_ROOT)}" | ||
|
|
||
| if dry_run or not apply: | ||
| return f"β NEEDS SYNC: {src.relative_to(REPO_ROOT)} β {dst.relative_to(REPO_ROOT)}" | ||
|
|
||
| # Apply the sync | ||
| dst.parent.mkdir(parents=True, exist_ok=True) | ||
| if src.is_file(): | ||
| shutil.copy2(src, dst) | ||
| else: | ||
| if dst.exists(): | ||
| shutil.rmtree(dst) | ||
| shutil.copytree(src, dst) | ||
| return f"β SYNCED: {src.relative_to(REPO_ROOT)}" | ||
|
|
||
|
|
||
| def _dirs_equal(a: Path, b: Path) -> bool: | ||
| """Check if all files in source exist and match in destination (b may have extras).""" | ||
| if not b.exists(): | ||
| return False | ||
|
|
||
| def _files(p: Path): | ||
| return sorted( | ||
| (f for f in p.rglob("*") if f.is_file() and "__pycache__" not in str(f)), | ||
| key=lambda x: str(x).lower(), | ||
| ) | ||
|
|
||
| afiles = _files(a) | ||
|
|
||
| for fa in afiles: | ||
| rel = fa.relative_to(a) | ||
| fb = b / rel | ||
| if not fb.exists(): | ||
| return False | ||
| if not filecmp.cmp(fa, fb, shallow=False): | ||
| return False | ||
|
|
||
| return True | ||
|
|
||
|
|
||
| def main(): | ||
| parser = argparse.ArgumentParser(description="Sync .claude/ source to cli/assets/") | ||
| parser.add_argument("--apply", action="store_true", help="Actually copy files (default: dry-run)") | ||
| parser.add_argument("--verify", action="store_true", help="Only check, exit 1 if out of sync") | ||
| args = parser.parse_args() | ||
|
|
||
| dry_run = not args.apply | ||
| if dry_run and not args.verify: | ||
| print("βββ DRY RUN βββ Use --apply to actually copy\n") | ||
|
|
||
| statuses = [] | ||
| all_ok = True | ||
|
|
||
| for src_rel, dst_rel, desc in SYNC_MAP: | ||
| src = CLAUDE_DIR / src_rel | ||
| dst = CLI_ASSETS_DIR / dst_rel | ||
| status = sync_file(src, dst, args.apply, dry_run) | ||
| statuses.append((desc, status)) | ||
| if status.startswith("β οΈ"): | ||
| all_ok = False | ||
|
|
||
|
Comment on lines
+104
to
+108
|
||
| print(f"\nβββ Summary ({'DRY RUN' if dry_run else 'APPLIED'}) βββ\n") | ||
| for desc, status in statuses: | ||
| print(f" {status}") | ||
|
|
||
| if args.verify and not all_ok: | ||
| print("\nβ Verify FAILED: some sources are missing") | ||
| sys.exit(1) | ||
|
|
||
| if args.verify: | ||
| print("\nβ Verify PASSED: all sources are in sync") | ||
| sys.exit(0) | ||
|
|
||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.