Fix stack discovery in packaged skill assets#340
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR makes stack guideline discovery data-driven (from data/stacks/*.csv) across both the source skill and CLI assets, updates documentation/templates to reflect multi-stack support, and adds regression tests to ensure stack coverage in both distributions.
Changes:
- Auto-discover stack configs from
data/stacks/*.csvinstead of maintaining a hard-coded stack list. - Update skill documentation and CLI help text to reflect stack discovery and expanded stack support.
- Add tests to verify both
srcandcli/assetsbuilds register all packaged stacks and can search the React stack.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_stack_discovery.py | Adds regression tests validating stack CSVs are registered in both source and CLI assets. |
| src/ui-ux-pro-max/templates/base/skill-content.md | Updates skill instructions/examples to be stack-agnostic and list supported stacks. |
| src/ui-ux-pro-max/scripts/search.py | Updates CLI help text to reflect stack discovery and prints available stack choices. |
| src/ui-ux-pro-max/scripts/core.py | Replaces hard-coded stack config with filesystem-based discovery of stack CSVs. |
| cli/assets/templates/platforms/windsurf.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/warp.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/trae.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/roocode.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/qoder.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/opencode.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/kiro.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/kilocode.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/gemini.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/droid.json | Updates template descriptions to reflect “16 stacks” and adjusts copy. |
| cli/assets/templates/platforms/cursor.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/copilot.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/continue.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/codex.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/codebuddy.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/claude.json | Updates template descriptions to reflect “16 stacks” and expands the named stack list. |
| cli/assets/templates/platforms/augment.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/platforms/agent.json | Updates template descriptions to reflect “16 technology stacks”. |
| cli/assets/templates/base/skill-content.md | Mirrors source skill-content updates for the CLI asset template. |
| cli/assets/scripts/search.py | Updates CLI help text to reflect stack discovery and prints available stack choices. |
| cli/assets/scripts/core.py | Replaces hard-coded stack config with filesystem-based discovery of stack CSVs (CLI assets copy). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "angular": {"file": "stacks/angular.csv"}, | ||
| "laravel": {"file": "stacks/laravel.csv"}, | ||
| } | ||
| def _discover_stack_config() -> Dict[str, Dict[str, str]]: |
| return { | ||
| stack_file.stem: {"file": f"stacks/{stack_file.name}"} | ||
| for stack_file in sorted((DATA_DIR / "stacks").glob("*.csv")) | ||
| } | ||
|
|
||
|
|
||
| STACK_CONFIG = _discover_stack_config() |
| STACK_CONFIG = { | ||
| "react-native": {"file": "stacks/react-native.csv"}, | ||
| } | ||
| def _discover_stack_config() -> Dict[str, Dict[str, str]]: |
| return { | ||
| stack_file.stem: {"file": f"stacks/{stack_file.name}"} | ||
| for stack_file in sorted((DATA_DIR / "stacks").glob("*.csv")) | ||
| } | ||
|
|
||
|
|
||
| STACK_CONFIG = _discover_stack_config() |
| parser.add_argument("query", help="Search query") | ||
| parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain") | ||
| parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help=f"Stack-specific search. Available: {', '.join(AVAILABLE_STACKS)}") | ||
| parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help=f"Stack-specific search ({', '.join(AVAILABLE_STACKS)})") |
| - **Target audience**: C-end consumer users; consider age group, usage context (commute, leisure, work) | ||
| - **Style keywords**: playful, vibrant, minimal, dark mode, content-first, immersive, etc. | ||
| - **Stack**: React Native (this project's only tech stack) | ||
| - **Stack**: Detect from the current project. If unclear, generate the design system first, then query the closest installed stack guidelines. |
| - **Target audience**: C-end consumer users; consider age group, usage context (commute, leisure, work) | ||
| - **Style keywords**: playful, vibrant, minimal, dark mode, content-first, immersive, etc. | ||
| - **Stack**: React Native (this project's only tech stack) | ||
| - **Stack**: Detect from the current project. If unclear, generate the design system first, then query the closest installed stack guidelines. |
| }, | ||
| "title": "ui-ux-pro-max", | ||
| "description": "Comprehensive design guide for web and mobile applications. Contains 67 styles, 161 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 15 technology stacks. Searchable database with priority-based recommendations.", | ||
| "description": "Comprehensive design guide for web and mobile applications. Contains 67 styles, 161 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 16 technology stacks. Searchable database with priority-based recommendations.", |
| "frontmatter": { | ||
| "name": "ui-ux-pro-max", | ||
| "description": "UI/UX design intelligence. 67 styles, 161 palettes, 57 font pairings, 25 charts, 15 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient." | ||
| "description": "UI/UX design intelligence. 67 styles, 161 palettes, 57 font pairings, 25 charts, 16 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient." |
| expected_stacks = { | ||
| stack_file.stem | ||
| for stack_file in (package_root / "data" / "stacks").glob("*.csv") | ||
| } | ||
| core_module = load_core_module(core_path, module_name) | ||
|
|
||
| self.assertGreater(len(expected_stacks), 1) | ||
| self.assertEqual(expected_stacks, set(core_module.AVAILABLE_STACKS)) |
|
Addressed the Copilot review feedback in
Verification rerun:
|
|
Summary: I’m deferring full maintainer review for this run because the PR is too large for the cron review budget and touches packaged/generated asset paths.nnRisk level: MediumnnMandatory gates:n- Duplicate/prior implementation: needs reconciliation with existing asset-sync / packaging PRs such as #330, #336, #346, #355, and #368n- Project standards: not fully checked in this bounded passn- Strategic necessity: likely valuable because packaged stack discovery is a real user-facing gap, but the implementation path must preserve source-of-truth sync rulesn- CI/checks: not sufficient for merge decision in this passnnFindings:n- Important: This changes 44 files across stack-discovery/package asset surfaces. That exceeds the cron deep-review limit and needs a focused review against the source-of-truth data under |
mrgoonie
left a comment
There was a problem hiding this comment.
Summary: This PR is the right direction: dynamic stack discovery fixes the packaged CLI asset gap so installed skills can search every bundled data/stacks/*.csv instead of a hand-maintained subset. I verified the new stack discovery tests and React stack smoke checks locally.
Risk level: Medium — the runtime code is small, but it changes stack discovery at import time for both source and packaged skill scripts.
Mandatory gates:
- Duplicate / prior implementation: clear. GitHub search found only this PR for dynamic stack discovery; no issue duplicate; git history only has this PR branch's two commits for
stack discovery. - Project standards: docs found.
CLAUDE.mdsayssrc/ui-ux-pro-max/is source of truth andcli/assets/must mirror source data/scripts/templates before publishing; this PR updates both sides consistently. - Strategic necessity: clear value. The current installed-skill failure mode is real: missing stack registration makes packaged skills unable to search bundled stack CSVs.
Findings:
Important — PR is currently not mergeable
GitHub reports mergeable: CONFLICTING / mergeStateStatus: DIRTY for this PR. Please update the branch against main and resolve conflicts before merge. I cannot approve or merge it while GitHub says it conflicts with the base branch.
Local verification performed:
python3 -m py_compile src/ui-ux-pro-max/scripts/core.py src/ui-ux-pro-max/scripts/search.py src/ui-ux-pro-max/scripts/design_system.py cli/assets/scripts/core.py cli/assets/scripts/search.py cli/assets/scripts/design_system.py tests/test_stack_discovery.pypython3 -m unittest tests/test_stack_discovery.py— 6 tests passedpython3 cli/assets/scripts/search.py --list-stacks— includesreactandthreejspython3 cli/assets/scripts/search.py "memo rerender bundle" --stack react --max-results 1— returnsstacks/react.csvpython3 src/ui-ux-pro-max/scripts/search.py "memo rerender bundle" --stack react --max-results 1— returnsstacks/react.csv
Verdict: Request changes — resolve the merge conflicts, then this should be rechecked for approval/merge.
Posted by /github-maintain at 2026-06-25T13:05:00Z
Summary
data/stacks/*.csvinstead of maintaining a hand-written listVerification
python3 -m py_compile src/ui-ux-pro-max/scripts/core.py src/ui-ux-pro-max/scripts/search.py src/ui-ux-pro-max/scripts/design_system.py cli/assets/scripts/core.py cli/assets/scripts/search.py cli/assets/scripts/design_system.py tests/test_stack_discovery.pypython3 -m unittest tests/test_stack_discovery.pypython3 cli/assets/scripts/search.py "memo rerender bundle" --stack reactdiff -qr src/ui-ux-pro-max/templates/platforms cli/assets/templates/platformsnpm run buildfromcli/node cli/dist/index.js init --ai codexinstall smoke test, followed by generated skill--stack reactsearch