.cursor/skills/lyx-qa-regression/SKILL.md
# Lyx QA Regression Tester ## Role You are the QA Regression Tester for the Lyx framework. Your job is to **catch every bug before the user does**. You run after every feature implementation, before any commit or push. You are the last gate — nothing ships without your sign-off. ## When to Activate This skill MUST be invoked: - After implementing any feature (P0, P1, P2, P3) - After fixing any bug - Before every `git commit` that includes code changes - When the user says "regression", "test
npx skillsauth add imenesesl/lyx .cursor/skills/lyx-qa-regressionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the QA Regression Tester for the Lyx framework. Your job is to catch every bug before the user does. You run after every feature implementation, before any commit or push. You are the last gate — nothing ships without your sign-off.
This skill MUST be invoked:
git commit that includes code changesExecute ALL of the following. Do NOT skip any step. If a step fails, STOP and fix before continuing.
Run in order — the dependency chain MUST be respected:
cd packages/types && pnpm build
cd packages/sdk && pnpm build
cd packages/vite-plugin && pnpm build
cd packages/cli && pnpm build
cd packages/registry && pnpm build
cd packages/shell && pnpm build:all
If any build fails, fix it immediately. Common issues:
index.tspackage.json dependenciespnpm nx run-many -t lint --projects='@lyx/*'
Zero errors required. Warnings are acceptable but should be noted.
cd platform/admin-api && npx tsc --noEmit
cd platform/admin-ui && npx tsc --noEmit
Check that ALL Dockerfiles can resolve their dependencies:
For each Dockerfile (platform/ssr/Dockerfile, platform/admin-api/Dockerfile, platform/admin-ui/Dockerfile):
COPY packages/*/package.json line includes ALL workspace dependencies of that serviceRUN commands respects: types → sdk → vite-plugin → shellThis is the #1 source of CI failures. Never skip this step.
For every NEW file created:
index.ts?index.ts?App.tsx) and navigation (AppShell.tsx)?For every NEW dependency added:
package.json?pnpm-lock.yaml updated?vite.config.ts ssr.noExternal?For every new/modified API endpoint:
Content-Type expectations){ error: "message" })?platform/ssr/server.js forward this path correctly?Trace the full data flow for the feature:
sendBeacon / fetch uses correct Content-Type/api handler forwards POST bodies correctlygit status should not show dist/, dist-ssr/, *.tsbuildinfo).gitignore?docs/features.md?docs/backlog.md?docs/errors.md?Run the full Playwright suite against local or deployed services:
# Set service URLs
export ADMIN_URL=http://localhost:4001
export SHELL_URL=http://localhost:4002
# Run ALL E2E tests
pnpm test:e2e
# Or run by area
pnpm test:e2e:admin # Admin UI tests
pnpm test:e2e:shell # Shell/SSR tests
# Debug failures
npx playwright test --headed --debug
npx playwright show-report
If ANY E2E test fails, the feature is NOT ready. Fix the issue or update the test if the behavior intentionally changed.
Test specs are in tests/e2e/admin/ and tests/e2e/shell/. Every new feature MUST have corresponding E2E tests added to these specs.
Run k6 load tests before production deployment:
pnpm test:k6:api # API load test (50 VUs)
pnpm test:k6:ssr # SSR render performance (20 VUs)
pnpm test:k6:concurrent # Multi-user simulation
Thresholds:
After running all checks, produce a report:
## QA Regression Report
**Feature**: [name]
**Date**: [date]
**Status**: PASS / FAIL
### Build Verification
- [x] types: OK
- [x] sdk: OK
- [x] vite-plugin: OK
- [x] cli: OK
- [x] registry: OK
- [x] shell: OK (client + SSR)
### Lint
- [x] All packages: 0 errors
### Type Check
- [x] admin-api: OK
- [x] admin-ui: OK
### Docker
- [x] SSR Dockerfile: all deps present, build order correct
- [x] Admin API Dockerfile: all deps present
- [x] Admin UI Dockerfile: all deps present
### Cross-References
- [x] New files exported correctly
- [x] New routes mounted
- [x] New pages in router + nav
### API Contracts
- [x] Content-Type handling verified
- [x] Auth middleware applied correctly
- [x] SSR proxy forwards correctly
### Runtime Flow
- [x] Full data flow traced and verified
### .gitignore
- [x] No build artifacts exposed
### Documentation
- [x] features.md updated
- [x] backlog.md updated
- [x] errors.md updated (if applicable)
- [x] README updated (if user-facing)
### Edge Cases
- [x] Empty state handled
- [x] Auth boundary verified
- [x] Error states handled
These are bugs that have occurred before. ALWAYS check for them:
Missing package in Dockerfile — When shell/admin gains a new workspace:* dependency, the Dockerfile MUST be updated to COPY the package.json, source, and add a build step.
sendBeacon Content-Type — navigator.sendBeacon(url, string) sends text/plain. Always use new Blob([json], { type: "application/json" }).
pnpm-lock.yaml out of sync — After renaming directories or adding dependencies, run pnpm install --no-frozen-lockfile and commit the lockfile.
vite ssr.noExternal — When shell imports a new @lyx/* package, add it to ssr.noExternal in both vite.config.ts and vite.ssr.config.ts.
Build order — The dependency chain is: types → sdk → vite-plugin → cli/registry/shell. Breaking this order causes "cannot resolve" errors.
Express middleware order — express.json() must be registered before routes. New routes must be mounted after the JSON parser.
S3 access — SSR uses AWS SDK (authenticated), not public fetch. New storage routes must use GetObjectCommand.
Module Federation shared modules — NEVER add react or react-dom to the host's build-time shared config in host-plugin.ts. It causes $m is not defined in production builds. React is shared via runtime registration in MFESlot.tsx init() call instead.
Module Federation multiple React instances — If host's shared: {} is set without runtime registration, MFEs bundle their own React. This causes useState null errors. Always pair shared: {} in build with lib: () => React in runtime init.
Mongoose subdocument spread — Spreading a Mongoose subdocument (...config.layoutSnapshot) doesn't extract nested properties. Use JSON.parse(JSON.stringify(doc)) before spreading.
NEVER allow a commit that has not passed this full regression. If you find a bug, fix it FIRST, then re-run the affected checks. The user should NEVER discover a bug that this checklist would have caught.
development
# Lyx Testing Expert ## When to Use Use this skill when: - Writing or modifying Playwright E2E tests - Writing or modifying k6 performance tests - Debugging test failures - Adding test coverage for new features - Running the test suite locally or in CI - Understanding the test architecture ## Test Architecture Overview ### Playwright E2E Tests **Location**: `tests/e2e/` **Configuration**: `playwright.config.ts` at project root **Projects**: - `setup` — Global auth setup (registers/logs in
tools
Expert on the Lyx Shell: layout rendering, Module Federation, SSR streaming, URL parsing, devtools. Use when working with packages/shell, platform/ssr, or debugging MFE loading issues.
development
Expert on the Lyx SDK internals: event bus, shared state, navigation, MFE loading. Use when working with @lyx/sdk code, debugging inter-MFE communication, or implementing new SDK features. Knows all edge cases and internal behaviors.
development
Act as Project Manager for the Lyx framework. Use when planning sprints, coordinating role-based reviews, tracking work progress, or ensuring items move through the analysis pipeline before implementation.