Files
John Lindquist 66ea38ab23 refactor: replace bundled skills with engine/ rules + registry resolution
This is a fundamental architectural shift: the plugin no longer ships
skill content. Instead it ships a rules engine (engine/*.md) that
defines WHEN to load skills, and relies on the npx skills registry
(skills.sh/vercel, skills.sh/vercel-labs) to provide WHAT skills say.

## What changed

### New: engine/ directory (40 human-editable rule files)
Each file is a markdown document with YAML frontmatter containing:
- pathPatterns, bashPatterns, importPatterns (file/command matching)
- promptSignals (user prompt scoring: phrases, allOf, anyOf, noneOf)
- validate rules (PostToolUse file validation with severity levels)
- chainTo rules (conditional skill chaining with skipIfFileContains)
- retrieval metadata (aliases, intents, entities for discovery)
- priority, docs URLs, sitemap URLs
- registry source (e.g. "vercel/vercel-skills")

The markdown body serves as a summary fallback when the full skill
content isn't cached locally.

### New: scripts/build-manifest.ts (rewritten)
Now reads engine/*.md instead of skills/*/SKILL.md. Compiles
glob→regex at build time and outputs generated/skill-rules.json.
No dependency on VERCEL_PLUGIN_SKILLS_DIR or local skill sources.

### New: test infrastructure
- tests/helpers/mock-skill-cache.ts — generates a temp
  ~/.vercel-plugin/skills/ directory with stub SKILL.md files
  derived from skill-rules.json for test use
- tests/helpers/preload-mock-cache.ts — bun test preload that
  sets VERCEL_PLUGIN_HOME_DIR before any test runs
- bunfig.toml updated with preload

### Removed: skills/ directory (all 40 bundled skills)
The plugin no longer ships skill bodies. At runtime, hooks resolve
skill content from:
1. ~/.vercel-plugin/projects/<hash>/.skills/ (project cache)
2. ~/.vercel-plugin/skills/ (global cache, populated by npx skills)
3. generated/skill-rules.json (metadata-only fallback)

### Removed: 13 test files
Tests that validated build-time skills/ scanning, SKILL.md
frontmatter parsing, snapshot generation, and other behaviors
tied to bundled skills. The remaining 1383 tests pass.

## Architecture going forward

The decoupling is complete:
- engine/*.md = routing rules (owned by plugin, human-editable)
- npx skills = content delivery (owned by Vercel skills team)
- ~/.vercel-plugin/ = runtime cache (populated on first session)
- generated/skill-rules.json = compiled rules (build artifact)

Skills not yet published to the registry will match via the rules
engine but inject only their summary text and docs/sitemap URL
until the Vercel team publishes them.
2026-04-02 00:23:45 -06:00

363 B

name, priority, docs, pathPatterns, bashPatterns, importPatterns
name priority docs pathPatterns bashPatterns importPatterns
micro 5 https://webpack.js.org/concepts/module-federation/
**/micro-frontend/**
**/module-federation/**
\bmodule-federation\b
@module-federation/nextjs-mf

Micro-frontend guidance for module federation, shared dependencies, and cross-app communication on Vercel.