OpenRisk Frontend Charter
SkillDev toolsOpenRisk frontend engineering charter — feature structure, Zustand patterns, the three UI states, modal layout, switch defaults, i18n, accessibility gates and the frontend definition of done. Load before implementing or reviewing React/TypeScript code.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the OpenRisk Frontend Charter skill
What this skill tells your AI
The instructions your AI receives, as published by opendefender/openrisk in .claude/skills/openrisk-frontend-charter/SKILL.md and read by ahel’s review.
Structure
/src/features/[module]/ pages, components, hooks, stores for that feature
/src/shared/ design system, global hooks, utils, primitives
/src/services/ typed API client generated from OpenAPI
/src/locales/ fr.json, en.json — both always
The crash patterns this codebase has already shipped — never repeat them
- Switch without
defaulton a union.RiskBadgeandStatusDotcrashed the app to a white page on an unexpected casing. Every switch on a string union has adefaultand normalizes its input first. - Store-wide dependency inside a loader. A loader depending on the whole store while calling a setter inside it = infinite render loop. Use stable selectors, always.
- Unstable callbacks in a connect effect. Inline callbacks in the deps of
an SSE/WebSocket
connectrecreate it every render. Put them in refs. - Modal centred without
max-h. The submit button falls below the fold. Every modal:max-h-[90vh], flex column, fixed header, scrollable body, pinned footer. Verify at 600px viewport height. - Toast storms on a missing endpoint. A failing stream logs in dev; it never raises a user-facing toast per retry.
Shared primitives — reuse, do not recreate
useSoftDelete<T> (hide locally, 5s undo toast, API call fires after the
window) · DangerConfirm (impact readout + safer alternative, for vital
irreversible actions) · InfoHint (progressive disclosure tooltip) ·
EmptyState (icon + title + sub + actionable CTA, never a dead end) ·
GlobalShortcuts · CommandPalette · the single <DataTable>.
Routine content deletion → soft delete + undo.
Vital irreversible action → DangerConfirm with an impact breakdown.
Never a bare window.confirm in new code.
Mandatory per view
Loading (skeleton, never a full-page spinner) · error (actionable copy) · empty (CTA). Optimistic updates on critical mutations. Zod on every form.
Accessibility gates — merge blockers
Keyboard-operable end to end · focus always visible · focus never trapped · Escape closes every overlay and returns focus to its trigger · severity never encoded by color alone · contrast 4.5:1 text and 3:1 UI · no keystroke hijacking when an input, textarea, select or contenteditable has focus.
Definition of Done — frontend
npx tsc -bcleannpx vite buildcleannpx eslint . --max-warnings=0- FR + EN keys present in
/src/locales - Three UI states implemented
- axe-core pass on the touched screens, zero serious/critical
- Verified at 414px and at 600px viewport height
Signals
- GitHub stars
- 33
- Forks
- 3
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
openrisk-frontend-charter- Source
- github.com/opendefender/openrisk