MANDATORY Figma AI source enforcement for ALL UI work. Auto-activates when creating, modifying, or planning ANY compliance-ui component, page, or modal. Forces Figma source read BEFORE any code changes. Prevents layout invention.
This skill is MANDATORY for ALL UI work. No exceptions.
compliance-ui/Figma AI source root:
~/workdir/[admin-directory]/[YOUR-PROJECT]/compliance-os-goldmaster-prds/02-design-system/figma-ai-source/src/components/
Map the production component to its Figma equivalent:
| Production Feature Directory | Figma Source Directory |
|---|---|
features/activities/ | activityRuns/ |
features/audit-portal/ | auditPortal/ |
features/audits/ | audits/ |
features/controls/ | controls/ |
features/dashboard/ | dashboard/ |
features/documents/ | documents/ |
features/evidence/ | evidence/ |
features/frameworks/ | frameworks/ |
features/risks/ | risks/ |
features/settings/ | settings/ |
features/vendors/ | vendors/ |
features/contracts/ | contracts/ |
components/layout/ | layout/ |
components/ui/ | ui/ |
If unsure of the mapping, run:
ls ~/workdir/[admin-directory]/[YOUR-PROJECT]/compliance-os-goldmaster-prds/02-design-system/figma-ai-source/src/components/
Also check for Figma types:
~/workdir/[admin-directory]/[YOUR-PROJECT]/compliance-os-goldmaster-prds/02-design-system/figma-ai-source/src/lib/types/
And Figma utilities:
~/workdir/[admin-directory]/[YOUR-PROJECT]/compliance-os-goldmaster-prds/02-design-system/figma-ai-source/src/lib/utils/
You MUST read the Figma source file BEFORE writing or modifying any production code.
Read the FULL file. Do not skim. Do not skip. Extract:
Now read the production equivalent. Compare against Step 2.
Before touching any code, produce a gap list in this format:
## Figma vs Production Gaps: [ComponentName]
### Layout
- [ ] GAP: [description] (Figma line X vs Production line Y)
### Fields/Props
- [ ] GAP: [description]
### Visual
- [ ] GAP: [description]
### Interactions
- [ ] GAP: [description]
### Data Types
- [ ] GAP: [description]
Now — and ONLY now — modify the production code to close each gap.
Rules:
When researching a phase that includes UI work:
When planning UI tasks:
When executing UI tasks:
FIGMA_ROOT="~/workdir/[admin-directory]/[YOUR-PROJECT]/compliance-os-goldmaster-prds/02-design-system/figma-ai-source"
# Components
$FIGMA_ROOT/src/components/activityRuns/
$FIGMA_ROOT/src/components/auditPortal/
$FIGMA_ROOT/src/components/audits/
$FIGMA_ROOT/src/components/contracts/
$FIGMA_ROOT/src/components/controls/
$FIGMA_ROOT/src/components/dashboard/
$FIGMA_ROOT/src/components/documents/
$FIGMA_ROOT/src/components/evidence/
$FIGMA_ROOT/src/components/frameworks/
$FIGMA_ROOT/src/components/risks/
$FIGMA_ROOT/src/components/settings/
$FIGMA_ROOT/src/components/vendors/
# Types
$FIGMA_ROOT/src/lib/types/
# Utilities
$FIGMA_ROOT/src/lib/utils/
After any UI work session, verify:
# Check: did I read the Figma source?
# Check: does production layout match Figma sections top-to-bottom?
# Check: are all Figma fields present in production (or flagged as backend gaps)?
# Check: do gradients, colors, icons match Figma?
If ANY check fails, the work is NOT complete.
The user has repeatedly had to provide screenshots and say "this doesn't match Figma" because agents:
This is the fix. Follow the protocol. No shortcuts.