Skip to content

fix(cli): install all 7 skills via uipro init, not just the orchestrator (#362)#387

Merged
mrgoonie merged 5 commits into
nextlevelbuilder:mainfrom
ia-abatista:fix/uipro-init-all-skills
Jun 25, 2026
Merged

fix(cli): install all 7 skills via uipro init, not just the orchestrator (#362)#387
mrgoonie merged 5 commits into
nextlevelbuilder:mainfrom
ia-abatista:fix/uipro-init-all-skills

Conversation

@ia-abatista

Copy link
Copy Markdown
Contributor

What & why

uipro init installs only 1 of 7 skills (#362). The installer renders just the orchestrator (ui-ux-pro-max) from templates and copies data/scripts into it — the 6 sibling skills (banner-design, brand, design, design-system, slides, ui-styling) are never bundled or installed. sync-assets.mjs only mirrored data/scripts/templates, so cli/assets/ had no skills/ at all.

Change (lean bundle)

1. Bundle the 6 sub-skillssync-assets.mjs now mirrors .claude/skills/{6}cli/assets/skills/ (source of truth = .claude/skills/), with sync:assets + check:assets coverage.

  • Text only: excludes ui-styling/canvas-fonts/ (~5.8 MB of TTF) and __pycache__/.pyc/.coverage cruft. A skill registers from its SKILL.md, not its fonts — so the bundle adds ~0.9 MB, not ~6.6 MB. (Font-dependent canvas rendering in ui-styling would fetch fonts separately; out of scope here.)
  • The same exclusion now also guards the main data/scripts/templates sync against stray local .pyc files.

2. Install all 7template.ts installs each bundled sub-skill as a sibling of the orchestrator. The skills parent is derived from the platform's skillPath (dirname), so it's correct per-platform — skills/ for most, prompts/ for copilot, steering/ for kiro — not hardcoded.

3. Uninstalluninstall.ts now removes the sub-skills too.

Verification

  • check:assets in sync, tsc --noEmit passes.
  • Per-platform install harness: claude → .claude/skills/ (7), copilot → .github/prompts/ (7), kiro → .kiro/steering/ (7); brand/SKILL.md present, no fonts in the output.

Notes

Closes #362

`uipro init` rendered only the orchestrator (ui-ux-pro-max) and never
delivered the 6 sibling skills (banner-design, brand, design,
design-system, slides, ui-styling), so users got 1 of 7 skills (nextlevelbuilder#362).

- sync-assets.mjs: bundle the 6 sub-skills into cli/assets/skills/ as
  static copies (source of truth: .claude/skills/), with sync + check
  coverage. Excludes ui-styling/canvas-fonts (~5.8MB of TTF) and
  __pycache__/.pyc cruft — a skill registers from its SKILL.md, not its
  fonts — so the bundle adds ~0.9MB, not ~6.6MB.
- template.ts: after rendering the orchestrator, install each bundled
  sub-skill as a sibling. The skills parent is derived from the
  platform's skillPath (skills/ for most, prompts/ for copilot,
  steering/ for kiro) rather than hardcoded.
- uninstall.ts: remove the sub-skills too.

Verified: check:assets in sync, tsc passes, and a per-platform install
harness delivers all 7 skills to the correct parent dir with no fonts.

Closes nextlevelbuilder#362
@ia-abatista

ia-abatista commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@mrgoonie another one bites the dust. Get these PRs while they're hot. This one is a bit heavier than, but builds on my previous npm fix.

@mrgoonie mrgoonie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking this one for the asset-sync regression.

npm run check:assets fails on this PR:

CLI assets are out of sync with src/ui-ux-pro-max:
  - extra asset file: scripts/__pycache__/core.cpython-312.pyc
  - extra asset file: scripts/__pycache__/design_system.cpython-312.pyc

The new exclusion logic filters sourceFiles, but targetFiles = await listFiles(targetDir) is not filtered in checkAssets(), so existing/generated cli/assets/scripts/__pycache__/*.pyc files are still treated as extra assets. That means the required check:assets gate fails locally even though the PR is supposed to harden against Python build cruft.

Please filter target files with the same isExcludedAssetFile predicate, or remove/avoid those generated files before comparing. After that, rerun at least:

cd cli
npm run check:assets
npm run typecheck

The overall direction is right for #362, but this cannot merge while the asset-sync check fails.

check:assets filtered sourceFiles with isExcludedAssetFile but not
targetFiles, so a stray cli/assets/scripts/__pycache__/*.pyc (generated
by a local Python run) was reported as an "extra asset file" and failed
the gate. Apply the same predicate to targetFiles in both the
dirsToSync and sub-skill loops.

Verified: check:assets now passes with __pycache__/*.pyc present in the
target tree; typecheck passes.
@ia-abatista

ia-abatista commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Good catch -- ;) fixed in 8a97d68.

You're right: checkAssets() filtered sourceFiles with isExcludedAssetFile but left targetFiles = await listFiles(targetDir) unfiltered, so a stray cli/assets/scripts/__pycache__/*.pyc showed up only on the target side and was reported as an extra asset file. Applied the same predicate to targetFiles in both loops (the dirsToSync loop and the new sub-skills loop).

Reproduced your failure (compiled cli/assets/scripts/*.py to regenerate the .pyc), then confirmed the fix with those files still present:

cd cli
npm run check:assets   # CLI assets are in sync.   (exit 0, with __pycache__/*.pyc present)
npm run typecheck      # tsc --noEmit              (exit 0)

Diff is the two targetFiles lines only.

@ia-abatista ia-abatista requested a review from mrgoonie June 25, 2026 08:05

@mrgoonie mrgoonie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: This PR fixes #362 by bundling the six sibling skills into cli/assets/skills/ and installing them next to the generated ui-ux-pro-max orchestrator. The earlier check:assets blocker is fixed at head 8a97d6817100ab56d6e7fab7501f6556ef301d85, and npm run check:assets now passes locally.

Risk level: Medium — packaging/install path change across all supported AI targets, with 100+ bundled asset files.

Mandatory gates:

  • Duplicate / prior implementation: clear — PR #385 fixes Claude plugin registration, not uipro init; issue #362 remains the matching CLI install gap.
  • Project standards: docs/config found — platform install paths come from cli/assets/templates/platforms/*.json; asset sync is enforced by cli/scripts/sync-assets.mjs.
  • Strategic necessity: clear value — uipro init must deliver the advertised seven-skill bundle, otherwise the CLI install channel stays materially broken.

Findings:

Important

  1. uipro uninstall still removes from <folder>/skills/<name> for every AI type, but this PR installs sibling skills using each platform config’s skillPath parent. That means Copilot installs to .github/prompts/* and Kiro installs to .kiro/steering/* via generatePlatformFiles(), but removeSkillDir() only tries .github/skills/* and .kiro/skills/*. The PR description says uninstall removes sub-skills too, but for those platforms the new sibling skills (and the orchestrator, pre-existing) will be left behind. Please make uninstall derive the removal parent from loadPlatformConfig(aiType).folderStructure.skillPath (or equivalent shared helper) instead of the legacy hardcoded skills segment, then verify at least Copilot and Kiro uninstall paths.

Suggestion

  • Local npm run typecheck could not be completed in this cron workspace because tsc is not installed (sh: 1: tsc: not found). This is an environment/dependency limitation here, not a PR finding; npm run check:assets did pass locally and the GitHub asset-sync check is green.

Verdict: Request changes

The core direction is right and the asset-sync regression is fixed. Please patch the uninstall path logic before merge so the CLI does not install seven skills but fail to remove them for non-skills/ platforms.

…ed skills/

removeSkillDir() hardcoded <folder>/skills/<name>, but the installer
places skills under each platform config's skillPath parent — copilot in
.github/prompts/, kiro in .kiro/steering/. So uninstall left those
platforms' skills (orchestrator + sub-skills) behind.

Derive the install parent from loadPlatformConfig(aiType).folderStructure
(same source the installer uses), and keep the legacy <folder>/skills/
cleanup (incl. .shared/) for older installs. Deduped via a Set.

Verified: typecheck passes; an install+uninstall harness removes all 7
skills with zero leftovers for claude (.claude/skills), copilot
(.github/prompts) and kiro (.kiro/steering).
@ia-abatista

ia-abatista commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Noted. Fixed in 9854bcf

removeSkillDir() now derives the removal parent from loadPlatformConfig(aiType).folderStructure.skillPath (the same source generatePlatformFiles() uses to place skills), instead of the hardcoded skills/ segment:

const { folderStructure } = await loadPlatformConfig(aiType);
parents.add(join(folderStructure.root, dirname(folderStructure.skillPath)));
// + legacy <folder>/skills (incl. .shared) for older installs, deduped via Set

So uninstall now targets each platform's real install dir -- .github/prompts/* for Copilot and .kiro/steering/* for Kiro -- and still cleans the legacy <folder>/skills/ layout for older installs.

Verified:

  • npm run typecheck passes.
  • Install+uninstall harness across claude/copilot/kiro: removes all 7 skills (orchestrator + 6 sub-skills) with 0 leftovers at each platform's real parent dir (.claude/skills, .github/prompts, .kiro/steering).

(npm run check:assets remains green from the prior commit; this change is uninstall.ts only.)

…ped ckm- names

nextlevelbuilder#385 merged to main and removed the ckm- prefix from the six
.claude/skills/*/SKILL.md name fields. This branch's bundled copies
under cli/assets/skills/ still carried the old ckm- names, so after the
PR merges with main the source no longer matched the bundle and the
check-asset-sync CI gate failed (stale asset file: skills/*/SKILL.md).

Merge main and regenerate the bundle so cli/assets/skills matches the
current .claude/skills source of truth. check:assets and typecheck pass.
@ia-abatista ia-abatista requested a review from mrgoonie June 25, 2026 10:26

@mrgoonie mrgoonie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed head f7fd4dfdb4f0b0cb1f5b638d5b83376434d6c422. The uninstall blocker from the previous review is fixed: removal now derives the real parent from platform skillPath and still cleans legacy <folder>/skills paths.

Validation run locally:

  • npm --prefix cli run check:assets
  • npm --prefix cli run typecheck
  • Manual compiled-CLI harness: init --ai claude --force installs 7 skills under .claude/skills, and uninstall removes all 7.
  • Manual compiled-CLI harness: init --ai copilot --force installs the orchestrator plus sibling sub-skills under .github/prompts, and uninstall removes all 7 from the real Copilot parent.
  • Manual compiled-CLI harness: init --ai kiro --force installs all 7 under .kiro/steering, and uninstall removes all 7.

Duplicate/prior-work check: PR #385 fixed Claude plugin registration, PR #386 fixed stale pointer dirs, and #355 fixed asset sync; none resolves issue #362's CLI install gap. This PR is the right narrow implementation for #362.

Approved. Merge is still subject to the repository's required checks and branch protection.

@mrgoonie mrgoonie merged commit ef5f5ba into nextlevelbuilder:main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uipro init delivers only 1 of 7 skills

2 participants