Skip to content

Fix stack discovery in packaged skill assets#340

Open
mmletgo wants to merge 2 commits into
nextlevelbuilder:mainfrom
mmletgo:fix/dynamic-stack-discovery
Open

Fix stack discovery in packaged skill assets#340
mmletgo wants to merge 2 commits into
nextlevelbuilder:mainfrom
mmletgo:fix/dynamic-stack-discovery

Conversation

@mmletgo

@mmletgo mmletgo commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • Discover stack search configs from data/stacks/*.csv instead of maintaining a hand-written list
  • Fix CLI packaged assets so installed Codex skills can search React, Next.js, Vue, Three.js, and other bundled stack CSVs
  • Update generated skill guidance and CLI platform metadata from 15 to 16 stacks
  • Add regression coverage for source and CLI packaged stack discovery

Verification

  • 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.py
  • python3 -m unittest tests/test_stack_discovery.py
  • python3 cli/assets/scripts/search.py "memo rerender bundle" --stack react
  • diff -qr src/ui-ux-pro-max/templates/platforms cli/assets/templates/platforms
  • npm run build from cli/
  • Temporary node cli/dist/index.js init --ai codex install smoke test, followed by generated skill --stack react search

Copilot AI review requested due to automatic review settings June 8, 2026 04:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/*.csv instead 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 src and cli/assets builds 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]]:
Comment on lines +84 to +90
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]]:
Comment on lines +84 to +90
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()
Comment thread src/ui-ux-pro-max/scripts/search.py Outdated
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."
Comment on lines +46 to +53
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))
@mmletgo

mmletgo commented Jun 8, 2026

Copy link
Copy Markdown
Author

Addressed the Copilot review feedback in 3326ae7:

  • Added fail-fast errors when data/stacks is missing or contains no CSV files.
  • Added --list-stacks and made --help concise with --stack STACK.
  • Updated skill wording from automatic stack detection to choosing the stack for the current project.
  • Removed hard-coded exact stack counts from generated platform descriptions.
  • Added clearer test assertions for missing stack data and new CLI behavior.

Verification rerun:

  • python3 -m py_compile ...
  • python3 -m unittest tests/test_stack_discovery.py
  • python3 cli/assets/scripts/search.py --help
  • python3 cli/assets/scripts/search.py --list-stacks
  • python3 cli/assets/scripts/search.py "memo rerender bundle" --stack react
  • npm run build
  • temporary Codex install smoke test with generated --list-stacks and --stack react search

@mrgoonie

Copy link
Copy Markdown
Contributor

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 src/ui-ux-pro-max/, generated cli/assets/, and the existing release/package synchronization work.nnVerdict: DEFERREDnnNext step: please narrow the PR if possible, or add a short implementation note explaining which files are source of truth, which files are generated/copied assets, the exact sync command used, and how this differs from the other open asset-sync/package PRs. That will make the next maintainer review much safer.

@ia-abatista

Copy link
Copy Markdown
Contributor

Recommend closing, @mrgoonie. Packaged-asset stack discovery is covered by merged #355 (sync) plus the seven-skill bundling in #387.

@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 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.md says src/ui-ux-pro-max/ is source of truth and cli/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.py
  • python3 -m unittest tests/test_stack_discovery.py — 6 tests passed
  • python3 cli/assets/scripts/search.py --list-stacks — includes react and threejs
  • python3 cli/assets/scripts/search.py "memo rerender bundle" --stack react --max-results 1 — returns stacks/react.csv
  • python3 src/ui-ux-pro-max/scripts/search.py "memo rerender bundle" --stack react --max-results 1 — returns stacks/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

@mrgoonie mrgoonie added pr:reviewed PR reviewed by maintain workflow pr:changes-requested Maintain review requested changes labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation maintain:deferred Deferred by maintain workflow pr:changes-requested Maintain review requested changes pr:oversized Too large for cron-safe review budget pr:reviewed PR reviewed by maintain workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants