skills/design-compliance/SKILL.md
Audit automatique de conformité au design system Hexagone (PrimeVue 4 + Tailwind CSS 4 + tokens Hexagone). Analyse le code source et l'UI rendue d'une page ou d'un composant, détecte les violations, corrige automatiquement et produit un rapport — le tout sans intervention de l'utilisateur.
npx skillsauth add dedalus-erp-pas/foundation-skills design-complianceInstall 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.
Run a fully autonomous design system compliance audit on a page or component of the Hexagone Web application. The skill discovers source files, recursively analyzes the full component tree, visually inspects the rendered page (light + dark mode), detects all violations against the Hexagone design system rules, auto-fixes every violation in place, and prints a structured report — all without asking the user for confirmation.
Activate when the user:
<script setup lang="ts"> — alwaysdt for scoped token overrides — always (never pt for visual styling)This skill is tailored to the Hexagone Web monorepo stack:
hexagone-preset.js (extends Aura)--p-* (PrimeVue), --hexa-* (shell only), beta-scss (legacy, forbidden)The skill auto-fixes ALL violations — mechanical (import renames, class swaps) AND structural (component replacements, template rewrites). No report-only mode. No asking before editing.
The skill builds its ruleset from these sources, checked in order:
Explicit rules files (override everything if present):
design-system.md or docs/design-system/design-rules.mdCLAUDE.md (root and per-MF).github/copilot-instructions.md or .github/instructions/*.mdFramework configuration:
hexagone-preset.js — PrimeVue preset (tokens, color scheme)shell-tokens.scss — Shell chrome tokens (--hexa-*)tailwind.config.* — Tailwind configurationpackage.json — PrimeVue version, dependenciesCodebase patterns:
The skill accepts three types of input, all converging to the same pipeline:
/design-compliance http://localhost:5173/hexagone-etab/vue/patients
/design-compliance PatientDashboard
**/PatientDashboard.vue, **/patient-dashboard.vue, **/PatientDashboard/**/design-compliance Patients
/patients/design-compliance
Ask the user what to review. Do not assume.
Read explicit rules files (if they exist in the project):
**/CLAUDE.md, **/design-system.md, **/design-rules.md.github/copilot-instructions.md, .github/instructions/*.mdRead framework configuration:
**/hexagone-preset.js or **/theme/*.js)**/shell-tokens.scss)package.json to confirm PrimeVue version and dependenciesBuild the merged ruleset — combine all sources into a single checklist of rules to enforce
Based on the input mode:
Parse the user's input to determine the mode (URL, component name, or page name)
Find the entry-point file(s):
**/router/**/*.{js,ts}, **/router.{js,ts}) for matching route, get the component**/<name>.vue, **/<name-kebab>.vue, **/<Name>/**Recursively resolve the component tree:
.vue fileprimevue/*, vue, vue-router, pinia, node_modules)Report the discovered tree to the user:
Found 12 files in component tree for PatientDashboard:
- frontend/gap-mf/src/views/PatientDashboard.vue (entry)
- frontend/gap-mf/src/components/PatientHeader.vue
- frontend/gap-mf/src/components/PatientTimeline.vue
- ...
For each file in the component tree, check ALL violation categories:
<button>, <input>, <select>, <textarea>, <table> when PrimeVue equivalents exist<btn>, <alert>, <card>, <action>, <spinner> (hexa-compat) — should be PrimeVue native<datepicker>, <data-table>, <modal>, etc.) — should be PrimeVue native#xxx, rgb(...), hsl(...) in <style> or inline stylestext:teal, bg:grey-lightest, flex:6/12, etc. in templates--hexa-* tokens used outside shell components (Header, Sidebar, Navigation)text-[#ff0000], bg-[rgb(...)], p-[17px]var(--p-*) tokens, Tailwind theme classes, or dt() overridespt Misusept prop used for visual styling: border, shadow, padding, margin, background, color, font-size, border-radiusdt prop or <style scoped> with tokensprimevue/InputText → primevue/inputtextDropdown → Select, Calendar → DatePicker, InputSwitch → ToggleSwitch, OverlayPanel → Popover, TabView/TabPanel → Tabs/TabList/Tab/TabPanels/TabPanel, Chips → InputChipsprimevue barrel: import { InputText } from "primevue" → default import:global(.p-dark) nested inside <style scoped> — must use a separate unscoped <style> block<style> block, use tokens that auto-switch/, |, :, -), numbers, CSS class names, prop values that are not user-visiblet('key') (Composition API) or $t('key') (Options API)<button> or PrimeVue Button with only an icon and no aria-label<label> (no for/id pair, no FloatLabel wrapper)@mouseenter/@mouseleave without click alternative)alt on <img> tagsaria-label, wrap in FloatLabel, replace hover with click, add alt textexport default { data(), methods, computed }) instead of <script setup lang="ts">lang="ts" on <script setup>this.$store / mapState / mapGetters / mapActions instead of Pinia useXxxStore()style="...") instead of Tailwind classes or scoped CSS with tokens!important in new code (acceptable only to counter beta-scss legacy conflicts)<script setup lang="ts">, migrate state to Pinia, replace inline stylesPrerequisite: Check if a dev server is running by probing common ports (5173, 5174, 3000, 8080).
If no dev server is detected, skip visual inspection entirely and proceed to Step 5 with code-only results.
If a dev server is running:
Determine the URL:
Open the page in a headless browser (Playwright)
Handle authentication:
/login redirect), authenticate:
apvhnapvhn--p-* token valuesdocument.documentElement.classList.add('p-dark') in the browser--hexa-* tokens not switching correctlyCompile all visual issues with:
For every violation found (code + visual):
Print a structured report to the terminal:
## Design Compliance Report
**Target:** [component/page name or URL]
**Files analyzed:** [count]
**Violations found:** [count]
**Violations fixed:** [count]
**Visual inspection:** [performed (light + dark) / skipped (no dev server)]
### Files in Component Tree
| # | File | Violations |
|---|------|------------|
| 1 | `frontend/gap-mf/src/views/PatientDashboard.vue` | 5 |
| 2 | `frontend/gap-mf/src/components/PatientHeader.vue` | 2 |
| ... | ... | ... |
### Violations Fixed
#### Category 1: Wrong Component ([count])
| File | Line | Before | After |
|------|------|--------|-------|
| `PatientDashboard.vue` | 42 | `<button @click="save">` | `<Button @click="save" label="..." />` |
#### Category 2: Wrong Token Layer ([count])
| File | Line | Before | After |
|------|------|--------|-------|
| `PatientHeader.vue` | 15 | `color: #006875` | `color: var(--p-primary-500)` |
#### Category 3: pt Misuse ([count])
...
#### Category 4: Import Violations ([count])
...
#### Category 5: Dark Mode Violations ([count])
...
#### Category 6: i18n Violations ([count])
...
#### Category 7: Accessibility ([count])
...
#### Category 8: Framework Conventions ([count])
...
### Visual Inspection Results
[If performed]
#### Light Mode
- [Issue 1: description — severity]
- [Issue 2: description — severity]
#### Dark Mode
- [Issue 1: description — severity]
- [Issue 2: description — severity]
### Summary
- **Total violations:** [count]
- **Auto-fixed:** [count]
- **Remaining (manual review needed):** [count, if any]
| v3 (FORBIDDEN) | v4 (CORRECT) | Import Path |
|----------------|--------------|-------------|
| Dropdown | Select | primevue/select |
| Calendar | DatePicker | primevue/datepicker |
| InputSwitch | ToggleSwitch | primevue/toggleswitch |
| OverlayPanel | Popover | primevue/popover |
| TabView / TabPanel | Tabs / TabList / Tab / TabPanels / TabPanel | primevue/tabs, etc. |
| Chips | InputChips | primevue/inputchips |
| Raw HTML | PrimeVue Replacement |
|----------|---------------------|
| <button> | <Button> from primevue/button |
| <input type="text"> | <InputText> from primevue/inputtext |
| <input type="checkbox"> | <Checkbox :binary="true"> from primevue/checkbox |
| <input type="radio"> | <RadioButton> from primevue/radiobutton |
| <select> | <Select> from primevue/select |
| <textarea> | <Textarea> from primevue/textarea |
| <table> | <DataTable> + <Column> from primevue/datatable, primevue/column |
| <dialog> | <Dialog> from primevue/dialog |
| <progress> | <ProgressBar> from primevue/progressbar |
| hexa-compat | PrimeVue Native |
|-------------|----------------|
| <btn severity="..."> | <Button severity="..."> from primevue/button |
| <alert color="red"> | <Message severity="error"> from primevue/message |
| <card> | <Card> from primevue/card |
| <action @click> | <Button link @click> from primevue/button |
| <spinner> | <ProgressSpinner> from primevue/progressspinner |
| <modal> | <Dialog> from primevue/dialog |
| Context | Allowed | Forbidden |
|---------|---------|-----------|
| Business pages (views, components) | var(--p-*), Tailwind classes, dt() | var(--hexa-*), beta-scss classes, hardcoded colors |
| Shell components (Header, Sidebar, Nav) | var(--hexa-*), var(--p-*) | beta-scss classes, hardcoded colors |
| New code (any) | Tailwind CSS 4 classes, var(--p-*) tokens | beta-scss classes, inline styles, !important |
| beta-scss Class | Tailwind / Token Replacement |
|-----------------|------------------------------|
| text:teal | text-primary-500 or var(--p-primary-500) |
| bg:grey-lightest | bg-surface-50 or var(--p-surface-50) |
| bg:teal-dark | var(--hexa-chrome-bg-accent) (shell only) |
| bg:orange | var(--hexa-nav-bg) (shell only) |
| flex:X/12 | Tailwind grid or w-{fraction} |
| p:1, m:1, pt:1 | Tailwind p-4, m-4, pt-4 |
| text:bold | font-bold |
| text:center | text-center |
| border | border |
| rounded:1/2 | rounded-md or var(--p-content-border-radius) |
| w:full | w-full |
If the glob/search finds no matching files:
apvhn/apvhn fails, skip visual inspectionIf the component tree spans multiple micro-frontends (e.g., shared package imports):
If a file has zero violations:
.vue files in place to fix violations. Changes are NOT committed.git diff to verify all changes.patientDashboard.title, patientHeader.saveButton)https://primevue.org/<component>.mdprimevue/*, vue, vue-router, pinia, @vueuse/*, node_modules, @hexagone/shared (treat shared package as a library boundary)--hexa-* tokens — do not flag thesedatabases
Exécute des requêtes SQL en lecture seule sur plusieurs bases de données PostgreSQL. À utiliser pour : (1) interroger des bases PostgreSQL, (2) explorer les schémas/tables, (3) exécuter des requêtes SELECT pour l'analyse de données, (4) vérifier le contenu des bases. Supporte plusieurs connexions avec descriptions pour une sélection automatique intelligente. Bloque toutes les opérations d'écriture (INSERT, UPDATE, DELETE, DROP, etc.) par sécurité.
development
Automatisation complète du navigateur et tests web avec Playwright. Détecte automatiquement les serveurs de développement, gère le cycle de vie des serveurs, écrit des scripts de test propres dans /tmp. Tester des pages, remplir des formulaires, capturer des screenshots, vérifier le responsive design, valider l'UX, tester les flux de connexion, vérifier les liens, déboguer des webapps dynamiques, automatiser toute tâche navigateur. À utiliser quand l'utilisateur veut tester des sites web, automatiser des interactions navigateur, valider des fonctionnalités web ou effectuer tout test basé sur le navigateur.
documentation
Boîte à outils complète pour la manipulation de PDF : extraction de texte et tableaux, création de nouveaux PDF, fusion/découpage de documents et gestion de formulaires. Quand Claude doit remplir un formulaire PDF ou traiter, générer ou analyser des documents PDF de manière programmatique et à grande échelle.
testing
Lance une réunion simulée avec plusieurs personas experts pour analyser un sujet sous des perspectives diverses, prendre une décision et proposer une solution avant implémentation. Peut optionnellement publier l'analyse de la réunion sur une issue GitLab ou GitHub liée.