@fewangsit/wangsvue-gsts 2.0.0-alpha.3 → 2.0.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/assets/scanner.worker-DQsz7oT_.js.map +1 -0
  2. package/badge/Badge.fm.md +32 -0
  3. package/basetree/index.d.ts +31 -0
  4. package/breadcrumb/Breadcrumb.fm.md +23 -0
  5. package/button/Button.fm.md +53 -0
  6. package/buttonbulkaction/ButtonBulkAction-MenuItem.fm.md +18 -0
  7. package/buttonbulkaction/ButtonBulkAction.fm.md +25 -0
  8. package/buttondownload/ButtonDownload.fm.md +22 -0
  9. package/buttonfilter/ButtonFilter.fm.md +19 -0
  10. package/buttonscan/index.d.ts +6 -0
  11. package/buttonsearch/ButtonSearch.fm.md +19 -0
  12. package/buttonsearchbyscan/ButtonSearchByScan.fm.md +25 -0
  13. package/buttonselecttree/ButtonSelectTree.fm.md +40 -0
  14. package/buttonselecttree/index.d.ts +18 -0
  15. package/calendar/Calendar.fm.md +34 -0
  16. package/calendar/index.d.ts +41 -0
  17. package/changelogpage/index.d.ts +1 -1
  18. package/components.fm.md +56 -0
  19. package/customcolumn/index.d.ts +5 -5
  20. package/datatable/DataTable-MenuItem.fm.md +22 -0
  21. package/datatable/DataTable-TableColumn.fm.md +52 -0
  22. package/datatable/DataTable.fm.md +40 -0
  23. package/datatable/index.d.ts +10 -2
  24. package/dialog/index.d.ts +5 -0
  25. package/dialogconfirm/DialogConfirm.fm.md +29 -0
  26. package/dialogconfirm/index.d.ts +1 -0
  27. package/dialogform/DialogForm.fm.md +57 -0
  28. package/dialogform/index.d.ts +1 -1
  29. package/dialogselecttree/DialogSelectTree.fm.md +42 -0
  30. package/dialogselecttree/index.d.ts +25 -1
  31. package/dropdown/Dropdown.fm.md +34 -0
  32. package/fieldwrapper/index.d.ts +5 -0
  33. package/fileupload/FileUpload.fm.md +31 -0
  34. package/fileupload/index.d.ts +7 -1
  35. package/icon/index.d.ts +80 -67
  36. package/imagecompressor/ImageCompressor.fm.md +44 -0
  37. package/imagecompressor/index.d.ts +1 -1
  38. package/inputbadge/InputBadge.fm.md +34 -0
  39. package/inputbadge/index.d.ts +4 -0
  40. package/inputcurrency/index.d.ts +14 -0
  41. package/inputnumber/InputNumber.fm.md +39 -0
  42. package/inputpassword/InputPassword.fm.md +28 -0
  43. package/inputpassword/index.d.ts +4 -0
  44. package/inputphonenumber/InputPhoneNumber.fm.md +34 -0
  45. package/inputrangenumber/InputRangeNumber.fm.md +31 -0
  46. package/inputtext/InputText.fm.md +34 -0
  47. package/mcp/components.json +44 -35
  48. package/mcp/components.summary.txt +7 -4
  49. package/mcp/main.js +1276 -1152
  50. package/mcp/package.json +6 -6
  51. package/mcp/skills/api-service-generator/SKILL.md +93 -93
  52. package/mcp/skills/committing-changes/SKILL.md +38 -38
  53. package/mcp/skills/figma-datatable-generator/SKILL.md +93 -93
  54. package/mcp/skills/figma-to-code/SKILL.md +118 -117
  55. package/mcp/skills/import-validator/SKILL.md +54 -54
  56. package/mcp/skills/wangsvue-code-review/SKILL.md +72 -70
  57. package/mcp/skills/wangsvue-workflow/SKILL.md +92 -91
  58. package/menu/index.d.ts +4 -0
  59. package/multiselect/MultiSelect.fm.md +34 -0
  60. package/overlaypanel/index.d.ts +4 -0
  61. package/package.json +1 -1
  62. package/plugins/WangsVue.d.ts +4 -1
  63. package/stats.html +1 -1
  64. package/style.css +2 -2
  65. package/tabmenu/TabMenu.fm.md +28 -0
  66. package/tagtype/index.d.ts +1 -1
  67. package/textarea/TextArea.fm.md +34 -0
  68. package/toast/index.d.ts +13 -0
  69. package/tree/index.d.ts +34 -0
  70. package/utils/baseToast.util.d.ts +1 -24
  71. package/utils/toast.util.d.ts +1 -3
  72. package/wangsvue-gsts.es.js +21496 -21174
  73. package/wangsvue-gsts.es.js.map +1 -1
  74. package/wangsvue-gsts.system.js +62 -62
  75. package/wangsvue-gsts.system.js.map +1 -1
  76. package/assets/scanner.worker-CqQNqzoU.js.map +0 -1
@@ -1,117 +1,118 @@
1
- ---
2
- name: 'figma-to-code'
3
- description: 'Converts Figma designs to Wangsvue code following strict mapping rules and color system. Invoke when user provides Figma section link or node ID'
4
- ---
5
-
6
- # Figma to Code Logic
7
-
8
- This skill provides strict guidelines for converting Figma designs or React/JSX code into Wangsvue Vue 3 components.
9
-
10
- ## 0. Figma Discovery Protocol (Link/Node ID)
11
-
12
- **Invoke this protocol when a Figma URL or Node ID is provided:**
13
-
14
- 1. **Extract Node ID:** If a URL is provided (e.g., `...node-id=1-2`), extract the ID (e.g., `1:2`).
15
- 2. **Call `mcp_figma-dev_get_design_context`:** Use the `nodeId` to get the design metadata and code.
16
- 3. **Analyze Variables:** Call `mcp_figma-dev_get_variable_defs` for the node to map any design tokens to the Wangsvue color system.
17
-
18
- ## 1. Core Conversion Logic
19
-
20
- When converting from Figma or React:
21
-
22
- 1. **Strict Conversion:** Convert all React hooks/JSX into Vue 3 Composition API.
23
- 2. **Component Mapping:** You MUST identify and use the correct **Wangsvue Component** from the MCP. Do not use generic HTML if a Wangsvue component exists.
24
- 3. **Style Abstraction:** **DO NOT** convert Figma color variables or design system tokens manually. Trust the Wangsvue components to provide and handle the design system.
25
- 4. **Layout Focus:** Concentrate exclusively on:
26
- - **Layout Structure:** Component hierarchy and nesting.
27
- - **Layout Style:** Flex/Grid positioning, spacing, alignment, and sizing.
28
- - **Custom Style:** Apply only to non-Wangsvue elements where layout-specific CSS is required.
29
- - You MUST use tailwind css class instead of css in `<style>` block.
30
- 5. **Architecture:** You MUST break flat code into the appropriate folder defined in the **Project Structure**. Logic in `components/modules/`, NOT in views.
31
-
32
- ## 2. Component Discovery Protocol
33
-
34
- **ALWAYS ASK BEFORE USING GENERIC COMPONENTS OR MANUAL STYLING:**
35
-
36
- 1. **Search First:** If you need functionality (Filter, Download, Bulk action, Search, Upload, Copy), search the component list first.
37
- 2. **Structural Components:** If you need a container, card, form, modal, panel, or loading state, check if Wangsvue has a specialized component (e.g., `Card`, `Dialog`, `Form`, `Loading`).
38
- 3. **Mental Shift:**
39
- - ❌ OLD: `<div class="bg-white p-4">` → ✅ NEW: `<Card>`
40
- - ❌ OLD: `<Button>` for download → ✅ NEW: `<ButtonDownload>`
41
-
42
- ## 3. Figma Conversion Rules
43
-
44
- ### Component Replacement Logic
45
-
46
- - **`data-name="ComponentName"`** = Replace this entire element with `<ComponentName>`
47
- - **NOT** wrap `<ComponentName>` inside this element.
48
- - **Example:** `<div data-name="Breadcrumb">...</div>` → `<Breadcrumb />`
49
- - **Exception:** If `data-name` is NOT in Wangsvue component list, it may be a custom layout name - keep as div with appropriate classes.
50
-
51
- ### No Double Wrapping
52
-
53
- - ❌ **WRONG:** `<div><Breadcrumb /></div>` (when div only contains 1 component)
54
- - ✅ **CORRECT:** `<Breadcrumb />` (every Vue component has root element)
55
- - **Rule:** If container has only 1 component, remove the container.
56
-
57
- ### Trust Component Styling
58
-
59
- - ❌ **NEVER:** Add styling to Wangsvue components.
60
- - ✅ **ALWAYS:** Trust component's built-in design system.
61
- - **Exception:** Layout positioning only (margin, positioning).
62
- - **Example:** `<Breadcrumb class="mb-4" />` (spacing OK), `<Breadcrumb class="flex gap-2" />` (styling NOT OK).
63
-
64
- ### Figma Data-Name Decision Tree
65
-
66
- ```
67
- Figma element has data-name="SomeName"
68
-
69
- Check: Is "SomeName" in Wangsvue component list?
70
-
71
- YES → Replace: <div data-name="Button"> → <Button />
72
-
73
- NO → Keep as layout: <div data-name="HeaderSection"> → <div class="...">
74
- ```
75
-
76
- ### Exact Value Preservation
77
-
78
- - ❌ **WRONG:** `h-[21px]` → `h-5` (20px ≠ 21px)
79
- - ✅ **CORRECT:** Keep exact values `h-[21px]`
80
- - **Rule:** 1px difference matters for pixel-perfect design.
81
-
82
- ## 4. Color System Protocol
83
-
84
- **WANGSVUE COLOR SYSTEM RULES:**
85
-
86
- - ❌ **NEVER use CSS variables**: `bg-[var(--general/content,#ebeaf0)]`
87
- - ✅ **ALWAYS use Tailwind color tokens**: `bg-general-50`
88
- - ❌ **NEVER use hex colors directly**: `bg-[#ebeaf0]`
89
- - ✅ **ALWAYS map hex to color palette**: `#ebeaf0` → `general-50`
90
-
91
- ### Color Palette Mapping Process
92
-
93
- 1. **Find hex color** in Figma code or design.
94
- 2. **Check `tailwind.config.js`** for the color config path.
95
- 3. **Match hex to color token** in the referenced JSON config (e.g., `general-50`, `grayscale-50`, `primary-500`).
96
-
97
- ## 5. Synthesis & Structure
98
-
99
- - **Vue SFC Structure:** Script → Template → Style.
100
- - **Script Organization:** Imports → Props/Emits → Lifecycle → Variables → Methods.
101
- - **Views Architecture:** Views are lightweight, only import and compose from modules.
102
- - **Logic Placement:** Business logic, data, columns, and handlers belong in modules, NOT in view components.
103
- - **Testing Attributes:** Always include `data-wv-name` and `data-wv-section`.
104
-
105
- ## 6. Critical Failure Indicators (STOP IF ANY OCCUR)
106
-
107
- - Using generic Button when specialized component exists.
108
- - Using manual CSS when structural component exists.
109
- - Using CSS variables or hex colors instead of Tailwind color tokens.
110
- - Writing `<div class="bg-white p-4">` instead of `<Card>`.
111
- - Writing component usage without checking examples.
112
- - Guessing icon names or enum values.
113
- - Creating custom solutions when documented patterns exist.
114
- - Double wrapping components.
115
- - Adding styling to Wangsvue components.
116
- - Converting exact pixel values incorrectly (e.g., 21px → 20px).
117
- - Putting business logic in view components.
1
+ ---
2
+ name: 'figma-to-code'
3
+ description: 'Converts Figma designs to Wangsvue code following strict mapping rules and color system. Invoke when user provides Figma section link or node ID'
4
+ ---
5
+
6
+ # Figma to Code Logic
7
+
8
+ This skill provides strict guidelines for converting Figma designs or React/JSX code into Wangsvue Vue 3 components.
9
+
10
+ ## 0. Figma Discovery Protocol (Link/Node ID)
11
+
12
+ **Invoke this protocol when a Figma URL or Node ID is provided:**
13
+
14
+ 1. **Extract Node ID:** If a URL is provided (e.g., `...node-id=1-2`), extract the ID (e.g., `1:2`).
15
+ 2. **Call `mcp_figma-dev_get_design_context`:** Use the `nodeId` to get the design metadata and code.
16
+ 3. **Analyze Variables:** Call `mcp_figma-dev_get_variable_defs` for the node to map any design tokens to the Wangsvue color system.
17
+
18
+ ## 1. Core Conversion Logic
19
+
20
+ When converting from Figma or React:
21
+
22
+ 1. **Strict Conversion:** Convert all React hooks/JSX into Vue 3 Composition API.
23
+ 2. **Component Mapping:** You MUST identify and use the correct **Wangsvue Component** from the MCP. Do not use generic HTML if a Wangsvue component exists.
24
+ 3. **Style Abstraction:** **DO NOT** convert Figma color variables or design system tokens manually. Trust the Wangsvue components to provide and handle the design system.
25
+ 4. **Layout Focus:** Concentrate exclusively on:
26
+ - **Layout Structure:** Component hierarchy and nesting.
27
+ - **Layout Style:** Flex/Grid positioning, spacing, alignment, and sizing.
28
+ - **Custom Style:** Apply only to non-Wangsvue elements where layout-specific CSS is required.
29
+ - You MUST use tailwind css class instead of css in `<style>` block.
30
+ 5. **Architecture:** You MUST break flat code into the appropriate folder defined in the **Project Structure**. Logic in `components/modules/`, NOT in views.
31
+
32
+ ## 2. Component Discovery Protocol
33
+
34
+ **ALWAYS ASK BEFORE USING GENERIC COMPONENTS OR MANUAL STYLING:**
35
+
36
+ 1. **Search First:** If you need functionality (Filter, Download, Bulk action, Search, Upload, Copy), search the component list first.
37
+ 2. **Structural Components:** If you need a container, card, form, modal, panel, or loading state, check if Wangsvue has a specialized component (e.g., `Card`, `Dialog`, `Form`, `Loading`).
38
+ 3. **Mental Shift:**
39
+ - ❌ OLD: `<div class="bg-white p-4">` → ✅ NEW: `<Card>`
40
+ - ❌ OLD: `<Button>` for download → ✅ NEW: `<ButtonDownload>`
41
+
42
+ ## 3. Figma Conversion Rules
43
+
44
+ ### Component Replacement Logic
45
+
46
+ - **`data-name="ComponentName"`** = Replace this entire element with `<ComponentName>`
47
+ - **NOT** wrap `<ComponentName>` inside this element.
48
+ - **Example:** `<div data-name="Breadcrumb">...</div>` → `<Breadcrumb />`
49
+ - **Exception:** If `data-name` is NOT in Wangsvue component list, it may be a custom layout name - keep as div with appropriate classes.
50
+
51
+ ### No Double Wrapping
52
+
53
+ - ❌ **WRONG:** `<div><Breadcrumb /></div>` (when div only contains 1 component)
54
+ - ✅ **CORRECT:** `<Breadcrumb />` (every Vue component has root element)
55
+ - **Rule:** If container has only 1 component, remove the container.
56
+
57
+ ### Trust Component Styling
58
+
59
+ - ❌ **NEVER:** Add styling to Wangsvue components.
60
+ - ✅ **ALWAYS:** Trust component's built-in design system.
61
+ - **Exception:** Layout positioning only (margin, positioning).
62
+ - **Example:** `<Breadcrumb class="mb-4" />` (spacing OK), `<Breadcrumb class="flex gap-2" />` (styling NOT OK).
63
+
64
+ ### Figma Data-Name Decision Tree
65
+
66
+ ```
67
+ Figma element has data-name="SomeName"
68
+
69
+ Check: Is "SomeName" in Wangsvue component list?
70
+
71
+ YES → Replace: <div data-name="Button"> → <Button />
72
+
73
+ NO → Keep as layout: <div data-name="HeaderSection"> → <div class="...">
74
+ ```
75
+
76
+ ### Exact Value Preservation
77
+
78
+ - ❌ **WRONG:** `h-[21px]` → `h-5` (20px ≠ 21px)
79
+ - ✅ **CORRECT:** Keep exact values `h-[21px]`
80
+ - **Rule:** 1px difference matters for pixel-perfect design.
81
+
82
+ ## 4. Color System Protocol
83
+
84
+ **WANGSVUE COLOR SYSTEM RULES:**
85
+
86
+ - ❌ **NEVER use CSS variables**: `bg-[var(--general/content,#ebeaf0)]`
87
+ - ✅ **ALWAYS use Tailwind color tokens**: `bg-general-50`
88
+ - ❌ **NEVER use hex colors directly**: `bg-[#ebeaf0]`
89
+ - ✅ **ALWAYS map hex to color palette**: `#ebeaf0` → `general-50`
90
+
91
+ ### Color Palette Mapping Process
92
+
93
+ 1. **Find hex color** in Figma code or design.
94
+ 2. **Check `tailwind.config.js`** for the color config path.
95
+ 3. **Match hex to color token** in the referenced JSON config (e.g., `general-50`, `grayscale-50`, `primary-500`).
96
+
97
+ ## 5. Synthesis & Structure
98
+
99
+ - **Vue SFC Structure:** Script → Template → Style.
100
+ - **Script Organization:** Imports → Props/Emits → Lifecycle → Variables → Methods.
101
+ - **Views Architecture:** Views are lightweight, only import and compose from modules.
102
+ - **Logic Placement:** Business logic, data, columns, and handlers belong in modules, NOT in view components.
103
+ - **Testing Attributes:** Always include `data-wv-name` and `data-wv-section`.
104
+ - **Accessibility:** Interactive elements must have `aria-label`, `aria-labelledby`, or `aria-describedby`.
105
+
106
+ ## 6. Critical Failure Indicators (STOP IF ANY OCCUR)
107
+
108
+ - Using generic Button when specialized component exists.
109
+ - Using manual CSS when structural component exists.
110
+ - Using CSS variables or hex colors instead of Tailwind color tokens.
111
+ - Writing `<div class="bg-white p-4">` instead of `<Card>`.
112
+ - Writing component usage without checking examples.
113
+ - Guessing icon names or enum values.
114
+ - Creating custom solutions when documented patterns exist.
115
+ - Double wrapping components.
116
+ - Adding styling to Wangsvue components.
117
+ - Converting exact pixel values incorrectly (e.g., 21px → 20px).
118
+ - Putting business logic in view components.
@@ -1,54 +1,54 @@
1
- ---
2
- name: 'import-validator'
3
- description: 'Enforces strict import protocols for Wangsvue components and types. Invoke when writing imports or fixing import errors.'
4
- ---
5
-
6
- # Import Protocol Validator
7
-
8
- This skill ensures that all imports follow the strict Wangsvue Import Protocol.
9
-
10
- ## The Golden Rules
11
-
12
- 1. **NEVER Guess:** Always use `mcp_wangsvue_mcp_analyze_component` and `mcp_wangsvue_mcp_resolve_type_definition` to get the correct paths.
13
- 2. **Exact Paths:** Do not modify the import paths returned by MCP tools.
14
- 3. **Type Keyword:** Always add `type` keyword for type imports.
15
-
16
- ## Common Mistakes & Corrections
17
-
18
- ### 1. Component Imports
19
-
20
- **❌ WRONG:** `import { Button } from '@fewangsit/wangsvue/button';`
21
- **✅ RIGHT:** `import { Button } from '@fewangsit/wangsvue';`
22
- _Rule: Components usually come from the main package._
23
-
24
- ### 2. Type Imports
25
-
26
- **❌ WRONG:** `import { MenuItem } from '@fewangsit/wangsvue/menuitem';`
27
- **✅ RIGHT:** `import type { MenuItem } from '@fewangsit/wangsvue/menuitem';`
28
- _Rule: Types usually come from specific modules and MUST use `import type`._
29
-
30
- ### 3. Mixing Imports
31
-
32
- **❌ WRONG:** `import { Button, ButtonProps } from '@fewangsit/wangsvue';`
33
- **✅ RIGHT:** Separate them.
34
-
35
- ```typescript
36
- import { Button } from '@fewangsit/wangsvue';
37
- import type { ButtonProps } from '@fewangsit/wangsvue/button'; // Verify path with MCP!
38
- ```
39
-
40
- ## Verification Process
41
-
42
- Before writing any import:
43
-
44
- 1. **Call MCP Tools:** `analyze_component` for components, `resolve_type_definition` for types.
45
- 2. **Copy Exact Paths:** Use the path provided in the MCP result.
46
- 3. **Add 'type':** If it is a type definition, ensure `type` keyword is used.
47
- 4. **Group Properly:** Keep components and types separate.
48
-
49
- ## Checklist
50
-
51
- - [ ] Did I get this path from MCP tools?
52
- - [ ] Is this a component? (Use main package path)
53
- - [ ] Is this a type? (Use specific module path + `type`)
54
- - [ ] Did I copy the exact path?
1
+ ---
2
+ name: 'import-validator'
3
+ description: 'Enforces strict import protocols for Wangsvue components and types. Invoke when writing imports or fixing import errors.'
4
+ ---
5
+
6
+ # Import Protocol Validator
7
+
8
+ This skill ensures that all imports follow the strict Wangsvue Import Protocol.
9
+
10
+ ## The Golden Rules
11
+
12
+ 1. **NEVER Guess:** Always use `mcp_wangsvue_mcp_analyze_component` and `mcp_wangsvue_mcp_resolve_type_definition` to get the correct paths.
13
+ 2. **Exact Paths:** Do not modify the import paths returned by MCP tools.
14
+ 3. **Type Keyword:** Always add `type` keyword for type imports.
15
+
16
+ ## Common Mistakes & Corrections
17
+
18
+ ### 1. Component Imports
19
+
20
+ **❌ WRONG:** `import { Button } from '@fewangsit/wangsvue/button';`
21
+ **✅ RIGHT:** `import { Button } from '@fewangsit/wangsvue';`
22
+ _Rule: Components usually come from the main package._
23
+
24
+ ### 2. Type Imports
25
+
26
+ **❌ WRONG:** `import { MenuItem } from '@fewangsit/wangsvue/menuitem';`
27
+ **✅ RIGHT:** `import type { MenuItem } from '@fewangsit/wangsvue/menuitem';`
28
+ _Rule: Types usually come from specific modules and MUST use `import type`._
29
+
30
+ ### 3. Mixing Imports
31
+
32
+ **❌ WRONG:** `import { Button, ButtonProps } from '@fewangsit/wangsvue';`
33
+ **✅ RIGHT:** Separate them.
34
+
35
+ ```typescript
36
+ import { Button } from '@fewangsit/wangsvue';
37
+ import type { ButtonProps } from '@fewangsit/wangsvue/button'; // Verify path with MCP!
38
+ ```
39
+
40
+ ## Verification Process
41
+
42
+ Before writing any import:
43
+
44
+ 1. **Call MCP Tools:** `analyze_component` for components, `resolve_type_definition` for types.
45
+ 2. **Copy Exact Paths:** Use the path provided in the MCP result.
46
+ 3. **Add 'type':** If it is a type definition, ensure `type` keyword is used.
47
+ 4. **Group Properly:** Keep components and types separate.
48
+
49
+ ## Checklist
50
+
51
+ - [ ] Did I get this path from MCP tools?
52
+ - [ ] Is this a component? (Use main package path)
53
+ - [ ] Is this a type? (Use specific module path + `type`)
54
+ - [ ] Did I copy the exact path?
@@ -1,70 +1,72 @@
1
- ---
2
- name: 'wangsvue-code-review'
3
- description: 'Reviews generated Wangsvue code against mandatory architectural principles and enforcement checklists. Invoke after generating code or before completion.'
4
- ---
5
-
6
- # Wangsvue Code Review Protocol
7
-
8
- This skill enforces the strict quality standards for Wangsvue code. Use this checklist to review any generated code before considering the task complete.
9
-
10
- ## 🚨 Mandatory Architectural Principles
11
-
12
- ### 1. Total Wangsvue Exclusivity
13
-
14
- - [ ] **Strict Prohibition:** NO usage of PrimeVue, Element Plus, Vuetify, or other libraries.
15
- - [ ] **Compliance:** ONLY use props, slots, events, and patterns defined in Wangsvue MCP or Knowledge Base.
16
-
17
- ### 2. Zero Assumption Policy
18
-
19
- - [ ] **Verification:** Are all prop names, slot names, icon names, and enum values verified via MCP?
20
- - [ ] **No Guessing:** If it's not in the MCP result, it doesn't exist.
21
-
22
- ### 3. MCP-First Verification
23
-
24
- - [ ] **Component Discovery:** Was `list_all_components()` called to find specialized components?
25
- - [ ] **Type Resolution:** Were all literal values (icons, severity, sizes) verified with `resolve_type_definition`?
26
- - [ ] **Example Check:** Did you check `get_example` for intended usage patterns?
27
-
28
- ## ✅ Final Enforcement Checklist (Every File Must Pass)
29
-
30
- ### 1. SFC Structure & Organization
31
-
32
- - [ ] **Structure:** `<script setup>` → `<template>` → `<style>` (only if needed).
33
- - [ ] **Script Order:** Imports → Props/Emits → Lifecycle → Variables → Methods (follows Vue Code Structure MD).
34
- - [ ] **Project Structure:** Business logic is in `components/modules/`, NOT in views.
35
- - [ ] **App.vue:** Only contains `<router-view />`, no business logic.
36
-
37
- ### 2. Import Protocol
38
-
39
- - [ ] **Exact Paths:** ALL imports match MCP results EXACTLY (no modifications).
40
- - [ ] **Type Imports:** `type` keyword used for all type imports (from `resolve_type_definition`).
41
- - [ ] **Separation:** Component imports (main package) separated from Type imports (specific modules).
42
-
43
- ### 3. Testing & Attributes
44
-
45
- - [ ] **Data Attributes:** `data-wv-name` on root element, `data-wv-section` on significant sections.
46
-
47
- ### 4. Code Quality
48
-
49
- - [ ] **Linter:** `pnpm lint` must pass with exit code 0. After fixing ESLint errors, check editor `#problems_and_diagnostics` and fix any remaining issues.
50
- - [ ] **No Generic HTML:** specialized components used instead of `<div>` (e.g., `Card` instead of `div.bg-white`).
51
- - [ ] **No Manual CSS:** No styling on Wangsvue components (trust the design system).
52
- - [ ] **Exact Pixel Values:** 21px remains 21px, do not round to 20px (h-5).
53
-
54
- ## Automatic Failure Indicators (IMMEDIATE STOP)
55
-
56
- If ANY of these are found, the code is rejected:
57
-
58
- - **Guessing:** Guessing icon names (`edit-line` vs `edit`) or enum values.
59
- - **Manual Styles:** Writing `<div class="bg-white p-4">` instead of `<Card>`.
60
- - **CSS Vars:** Using `bg-[var(--color)]` instead of Tailwind tokens (`bg-general-50`).
61
- - **Wrong Imports:** Mixing component and type paths, or forgetting `type` keyword.
62
- - **Double Wrapping:** `<div><Breadcrumb /></div>` (remove the div).
63
- - **Fat Views:** Putting data, columns, or handlers in view components instead of modules.
64
- - **Custom Patterns:** Implementing custom solutions when documentation provides a standard approach.
65
- - **Optimization:** "Optimizing" documented patterns instead of following them exactly.
66
-
67
- ## Review Decision
68
-
69
- - **PASS:** All checklists checked, no failure indicators.
70
- - **FAIL:** Any unchecked item or presence of failure indicator. **Fix immediately.**
1
+ ---
2
+ name: 'wangsvue-code-review'
3
+ description: 'Reviews generated Wangsvue code against mandatory architectural principles and enforcement checklists. Invoke after generating code or before completion.'
4
+ ---
5
+
6
+ # Wangsvue Code Review Protocol
7
+
8
+ This skill enforces the strict quality standards for Wangsvue code. Use this checklist to review any generated code before considering the task complete.
9
+
10
+ ## 🚨 Mandatory Architectural Principles
11
+
12
+ ### 1. Total Wangsvue Exclusivity
13
+
14
+ - [ ] **Strict Prohibition:** NO usage of PrimeVue, Element Plus, Vuetify, or other libraries.
15
+ - [ ] **Compliance:** ONLY use props, slots, events, and patterns defined in Wangsvue MCP or Knowledge Base.
16
+
17
+ ### 2. Zero Assumption Policy
18
+
19
+ - [ ] **Verification:** Are all prop names, slot names, icon names, and enum values verified via MCP?
20
+ - [ ] **No Guessing:** If it's not in the MCP result, it doesn't exist.
21
+
22
+ ### 3. MCP-First Verification
23
+
24
+ - [ ] **Component Discovery:** Was `list_all_components()` called to find specialized components?
25
+ - [ ] **Type Resolution:** Were all literal values (icons, severity, sizes) verified with `resolve_type_definition`?
26
+ - [ ] **Example Check:** Did you check `get_example` for intended usage patterns?
27
+
28
+ ## ✅ Final Enforcement Checklist (Every File Must Pass)
29
+
30
+ ### 1. SFC Structure & Organization
31
+
32
+ - [ ] **Structure:** `<script setup>` → `<template>` → `<style>` (only if needed).
33
+ - [ ] **Script Order:** Imports → Props/Emits → Lifecycle → Variables → Methods (follows Vue Code Structure MD).
34
+ - [ ] **Project Structure:** Business logic is in `components/modules/`, NOT in views.
35
+ - [ ] **App.vue:** Only contains `<router-view />`, no business logic.
36
+
37
+ ### 2. Import Protocol
38
+
39
+ - [ ] **Exact Paths:** ALL imports match MCP results EXACTLY (no modifications).
40
+ - [ ] **Type Imports:** `type` keyword used for all type imports (from `resolve_type_definition`).
41
+ - [ ] **Separation:** Component imports (main package) separated from Type imports (specific modules).
42
+
43
+ ### 3. Testing & Attributes
44
+
45
+ - [ ] **Data Attributes:** `data-wv-name` on root element, `data-wv-section` on significant sections.
46
+ - [ ] **Accessibility:** Every interactive element (button, input, select, toggle, link) MUST have `aria-label`, `aria-labelledby`, or `aria-describedby`.
47
+ - [ ] **PrimeVue Passthrough:** For components wrapping PrimeVue primitives, attributes on inner PrimeVue elements MUST go through `:pt`, not directly on the wrapper tag.
48
+
49
+ ### 4. Code Quality
50
+
51
+ - [ ] **Linter:** `pnpm lint` must pass with exit code 0. After fixing ESLint errors, check editor `#problems_and_diagnostics` and fix any remaining issues.
52
+ - [ ] **No Generic HTML:** specialized components used instead of `<div>` (e.g., `Card` instead of `div.bg-white`).
53
+ - [ ] **No Manual CSS:** No styling on Wangsvue components (trust the design system).
54
+ - [ ] **Exact Pixel Values:** 21px remains 21px, do not round to 20px (h-5).
55
+
56
+ ## Automatic Failure Indicators (IMMEDIATE STOP)
57
+
58
+ If ANY of these are found, the code is rejected:
59
+
60
+ - **Guessing:** Guessing icon names (`edit-line` vs `edit`) or enum values.
61
+ - **Manual Styles:** Writing `<div class="bg-white p-4">` instead of `<Card>`.
62
+ - **CSS Vars:** Using `bg-[var(--color)]` instead of Tailwind tokens (`bg-general-50`).
63
+ - **Wrong Imports:** Mixing component and type paths, or forgetting `type` keyword.
64
+ - **Double Wrapping:** `<div><Breadcrumb /></div>` (remove the div).
65
+ - **Fat Views:** Putting data, columns, or handlers in view components instead of modules.
66
+ - **Custom Patterns:** Implementing custom solutions when documentation provides a standard approach.
67
+ - **Optimization:** "Optimizing" documented patterns instead of following them exactly.
68
+
69
+ ## Review Decision
70
+
71
+ - **PASS:** All checklists checked, no failure indicators.
72
+ - **FAIL:** Any unchecked item or presence of failure indicator. **Fix immediately.**