widget-migrate
End-to-end legacy widget migration pipeline. Accepts a widget ID as argument (e.g., v9.widgets.model-selector.responsive.v1, ws-hours) — auto-resolves source location, extracts business logic, generates preference catalog, maps to Iris design system, and produces BMAD-compatible specs and stories for React Router 7 + Iris + TypeScript. Run from your target repo — no need to navigate to the widget source.
What this skill does
# Widget Migration Pipeline
Migrate legacy widgets to React Router 7 + Iris design system + TypeScript.
**Estimated Time:** 15-40 minutes (depending on mode and widget complexity)
**Target Stack:** React Router 7 + Iris Design System + TypeScript (hard-coded, no questions)
**Output:** Widget specs in `docs/specs/widgets/{widget-name}/` + BMAD-compatible stories
---
## When This Skill Activates
Activate when:
- A legacy widget (V9 Velocity, V9 Viewmodel, or Osiris) needs migration to React Router 7 + Iris
- The user requests the full pipeline: resolve -> detect -> extract -> map -> generate specs + stories
- The user wants preference-complete and component-complete migration artifacts
- Output should feed directly into BMAD's `/create-story` and `/dev-story` workflows
**Trigger Phrases:**
- "Migrate this widget"
- "Widget migration"
- "Convert this widget to React"
- "Migrate to Iris"
- `/stackshift.widget-migrate v9.widgets.model-selector.responsive.v1`
- `/stackshift.widget-migrate ws-hours`
**Not supported:** GVM widgets. If the user requests GVM migration, respond: "GVM widget migration is not yet supported. Only V9 Velocity, V9 Viewmodel, and Osiris widgets are supported."
---
## Invocation
### Option A: Widget ID as Argument (Recommended)
Run from the **target platform repo** (e.g., `dealer-platform/`):
```
/stackshift.widget-migrate v9.widgets.model-selector.responsive.v1
/stackshift.widget-migrate ws-hours
/stackshift.widget-migrate v9.viewmodel.map.dynamic
```
The pipeline auto-resolves the widget source location, extracts everything, and writes output to `docs/specs/widgets/`.
### Option B: From Widget Directory (Legacy)
Navigate to the widget source directory and run:
```
cd ~/git/cms-web/htdocs/v9/widgets/model-selector/responsive/v1/
/stackshift.widget-migrate
```
Output goes to `_widget-migrate/` in the widget directory.
---
## Pipeline Overview
Step 0: Resolve + Detect -> Step 1: Extract -> Step 2: Preference Catalog -> Step 3: Iris Mapping -> Step 4: Portable Specs -> Step 5: Targeted Epics -> Step 6: Migration Report -> Step 7: Write Output
Target stack is hard-coded: React Router 7 + Iris + TypeScript. No questions about target.
---
## Three Modes
### Mode 1: YOLO (Fully Automatic)
**Time:** ~15-20 minutes
**User input:** None after initial mode selection
- Run full extraction and generation without pausing
- Resolve ambiguities with best-effort inference
- Mark uncertain items with `[AUTO - review recommended]`
**Best for:** Batch processing, quick assessment.
### Mode 2: Guided (Recommended)
**Time:** ~25-30 minutes
**User input:** 3-8 targeted questions
- Auto-extract high-confidence items
- Pause to ask targeted questions for ambiguous items only:
- "This preference has no obvious React equivalent. Best mapping?"
- "This component has no direct Iris match. Custom component or closest equivalent?"
- "These 3 business rules interact. Confirm priority order?"
**Best for:** Most widget migrations. Good balance of speed and quality.
### Mode 3: Interactive
**Time:** ~30-40 minutes
**User input:** Full conversation at each step
- Present preference catalog for approval before continuing to Step 3
- Present Iris mapping for approval before continuing to Step 4
- Review each epic before finalizing Step 5
**Best for:** Complex widgets, critical business logic, maximum precision.
---
## Process
### Step 0: Resolve + Detect Widget
**If a widget ID argument is provided**, follow `operations/resolve-widget-source.md`:
1. Parse widget ID to determine type (`v9.widgets.*`, `v9.viewmodel.*`, `ws-*`)
2. Resolve filesystem path to source code
3. Validate source exists (offer to clone repo if missing)
4. Extract widget identity metadata
**If no argument** (running from widget directory), follow `operations/detect-widget-type.md`:
1. Check current directory against detection patterns
2. Classify as: `v9-velocity`, `v9-viewmodel`, or `osiris`
3. Extract widget identity (category, name, version for V9; workspace name for Osiris)
4. Validate repository access (cms-web, cms for V9)
5. If unknown: error with guidance on expected directory structure
**Error handling:** If resolution or detection fails (repo not found, path invalid, unknown format), stop the pipeline. Do not proceed to Step 1 without a confirmed widget type and source path.
**Progress signal:** Log "Step 0 complete: Detected {widget_type} at {source_path}". Update `.stackshift-state.json` `steps_completed` array with `"resolve"` and `"detect"`.
**Detection state saved:**
```json
{
"detection_type": "v9-velocity",
"implementation_framework": "widget-migrate",
"resolved_from": "argument",
"widget_identity": {
"category": "model-selector",
"name": "responsive",
"version": "v1",
"widget_id": "v9.widgets.model-selector.responsive.v1"
},
"source": {
"path": "~/git/cms-web/htdocs/v9/widgets/model-selector/responsive/v1/",
"repo": "~/git/cms-web"
}
}
```
### Step 1: Extract Business Logic
**Note:** The `cms-web-widget-analyzer` agent uses "Phase" for its internal stages. These are not the same as widget-migrate "Steps".
**Delegate extraction based on widget type:**
#### For V9 Velocity and V9 Viewmodel Widgets
Invoke the `cms-web-widget-analyzer` agent (defined in `agents/cms-web-widget-analyzer/AGENT.md`).
The agent performs deep analysis across 7 phases:
1. Widget Discovery & Classification
2. Widget Configuration Extraction
3. Component Dependency Tree Analysis (recursive #parse tracing)
4. Helper Object Analysis (business logic in $helper calls)
5. Conditional Logic Extraction (business rules from #if blocks)
6. Portlet Configuration Analysis (all preferences from XML)
7. Java Backend Analysis (portlet class business logic)
**Output used by subsequent steps:**
- `component-dependency-tree.md` -> feeds Step 3 (Iris mapping)
- `portlet-configuration.md` -> feeds Step 2 (preference catalog)
- `business-rules.md` -> feeds Step 4 (portable specs)
- `helper-object-usage.md` -> feeds Step 4 (portable specs)
- `java-backend-logic.md` -> feeds Step 4 (portable specs)
- `component-catalog.md` -> feeds Step 3 (Iris mapping)
- `data-flow.md` -> feeds Step 4 (portable specs)
#### For Osiris Widgets
Invoke the `stackshift:stackshift-code-analyzer:AGENT` agent with the standard StackShift reverse-engineering process.
The agent performs:
1. React/Angular component analysis
2. State management extraction
3. API integration mapping
4. Business logic identification
5. Configuration extraction (preferences from `config/prefs.json`)
**Output files (11 reverse-engineering docs in `docs/reverse-engineering/`):**
- `overview.md` -> feeds Step 6 (migration report)
- `component-catalog.md` -> feeds Step 3 (Iris mapping)
- `data-flow.md` -> feeds Step 4 (portable specs)
- `state-management.md` -> feeds Step 4 (portable specs)
- `api-integration.md` -> feeds Step 4 (portable specs)
- `business-logic.md` -> feeds Step 4 (portable specs)
- `configuration.md` -> feeds Step 2 (preference catalog)
- `error-handling.md` -> feeds Step 4 (portable specs)
- `routing.md` -> feeds Step 5 (targeted epics)
- `testing.md` -> feeds Step 6 (migration report)
- `dependencies.md` -> feeds Step 3 (Iris mapping)
**ws-scripts exclusion:** Osiris widgets depend on `ws-scripts` for build tooling, web server, testing framework, and development utilities. These are platform concerns that React Router 7 replaces. Exclude ws-scripts functionality from extraction.
**Error handling:** If the extraction agent fails or produces incomplete output (missing key files like component-catalog or business-logic), stop the pipeline. Report which output files are missing and suggest re-running extraction.
**Progress signal:** Log "Step 1 complete: Extracted {N} files from {widget_type} widget". Update `steps_completed` with `"extract"`.
### Step 2: Generate Preference Catalog
Follow the process in `operations/generate-preference-catalog.md`:
1. Extract Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.