Codexpiator Frontend
Single-purpose reference files for frontend engineering decisions.
Read the specific file below for the concern at hand rather than
trying to hold all of it in one place.
| File |
Read this when... |
component-architecture.md |
Structuring components, deciding what to extract, naming, folder layout |
state-management.md |
Choosing where state lives, local vs global, server vs client state |
styling-and-css.md |
Choosing a styling approach, design tokens, theming, responsive strategy |
forms-and-validation.md |
Building forms, validation timing, accessible error handling |
routing-and-navigation.md |
Route structure, code-splitting by route, auth-gated routes |
responsive-and-mobile.md |
Breakpoints, touch targets, mobile web specifics |
frontend-performance.md |
Bundle size, lazy loading, images, layout shift |
frontend-testing.md |
What to unit/integration/E2E test on the frontend |
accessibility.md |
Semantic HTML, ARIA, keyboard nav, contrast, focus management |
seo-and-launch-checklist.md |
Pre-launch pass: metadata, SEO tags, legal pages, conversion essentials |
seo-strategy-and-ai-visibility.md |
Deep SEO strategy + GEO: ranking in Google/Bing/DuckDuckGo and being cited by AI answer engines |
external-skills-map.md |
Whether a specialized design skill should lead instead |
Before any visually-led answer
If the task is primarily about visual design quality, motion, a broad
polish pass, or auditing an existing UI, check external-skills-map.md
first — a specialized external skill may be a better fit than this
skill's own guidance, and that file (plus
shared/external-skills-registry.md) has the procedure for checking.
This is not optional for design-heavy work: attempt to consult the
relevant external design skill(s) before finalizing an answer, not
only as a fallback when you happen to remember to check.
Verify visually with Playwright
For any non-trivial frontend change, actually look at the rendered
result before calling it done — use Playwright (via its MCP tools when
available) to navigate to the page, interact with it, and take a
screenshot/snapshot rather than reasoning about the DOM only from
source code. If Playwright isn't available in the environment,
strongly recommend the user install it rather than skipping visual
verification silently.
Never commit anything Playwright creates — screenshots, traces,
test-results/, playwright-report/, blob-report/, or any ad-hoc
screenshot file taken during manual verification. These are
throwaway verification artifacts, not project deliverables; confirm
they're gitignored (see
codexpiator-dx-git/repo-hygiene-and-onboarding.md) and never git add one even if it isn't.
Reference material: awesome-design-md
For design-heavy frontend work, pull relevant reference docs from
https://github.com/voltagent/awesome-design-md — a curated collection
of design-principle documents — rather than guessing from memory when
an authoritative written reference is one fetch away.
Gather the user's actual preferences before selecting anything.
Which docs are worth fetching depends entirely on taste and context
that isn't in the repo or a one-line prompt — don't infer it silently.
Before dispatching the selection subagent, call AskUserQuestion to
cover (skip only what's already been stated explicitly or is genuinely
fixed by an existing design system in the repo):
- Visual style/aesthetic — e.g. minimalist, editorial, brutalist,
glassmorphism, playful, corporate/professional, dark-tech — offer a
real spread of distinct directions, not just light/dark.
- Language/locale — the UI's primary language(s), and whether
i18n/RTL support is needed.
- Formatting & typography conventions — type scale approach,
heading hierarchy style, content density (spacious vs. compact).
- Animations & motion — none/minimal, subtle micro-interactions,
or expressive/bold motion (bridges to
external-skills-map.md's
design-motion-principles entry for the deeper implementation).
- Colors — a specific palette/brand colors if they have one, or a
direction (warm/cool/neutral, monochrome vs. saturated) if not.
- Layout patterns — e.g. classic marketing sections, dashboard/
data-dense, asymmetric/editorial grid, card-heavy vs. content-first.
- Fonts — a specific typeface if they have one, or a style
direction (geometric sans, humanist sans, serif-forward) if not.
For each, offer a genuinely wide range of concrete options rather than
two extremes, and mark one or two as recommended defaults so the user
can pick quickly without having to have a fully-formed opinion on
every axis. Only after this is settled should the docs to fetch be
decided — the preferences gathered here are what the selection
subagent should match against.
Don't bulk-download the whole collection. Use the Task/Agent tool to
launch a subagent that browses the repo's index and picks the docs
that actually match the current project's scope and the preferences
just gathered (stack, kind of UI, and the stated style/motion/color/
layout/font direction); save only those selected docs to
.codexpiator/design-refs/ (see
shared/long-task-memory-and-superpowers.md for the shared
.codexpiator/ directory convention — gitignore it immediately if
it's the first thing written there). Read from that local cache on
later reference within the same project instead of re-fetching.
Mandatory pre-completion gate for any frontend change
Before considering frontend work done:
- Consult every relevant file in this skill (
component- architecture.md, state-management.md, styling-and-css.md,
etc. — whichever apply to the change) plus any applicable external
design skill from external-skills-map.md, not just the first one
that seems relevant.
- Run Prettier (or the project's configured formatter) and a type
check and resolve everything they flag. Never report frontend
work complete with unformatted code or type errors outstanding.
- Confirm new components/pages follow the folder-per-component
colocation convention in
component-architecture.md.
- Visually verify with Playwright per the section above when the
change is non-trivial — don't rely on reading code alone for
something meant to be seen and used.
- Write and run real tests for whatever was created or changed —
not just the happy path, cover edge cases too (empty/loading/error
states, boundary inputs, keyboard-only interaction where relevant)
— and run the full test suite before calling the work done, not
just the new test file in isolation. See
frontend-testing.md and
codexpiator-testing-qa/tdd-workflow.md.
- Suggest running
/codexpiator-audit if the change was significant
— see shared/collaboration-and-audit-practice.md.
- If the project is still using a placeholder/default favicon or
brand images (per
seo-and-launch-checklist.md), remind the user
at the end of the work to provide their own custom favicon/images —
don't ship or silently leave a generic default in place without
flagging it.
Also see that same shared file for when to ask a clarifying question
(AskUserQuestion when available) instead of guessing.
1---2name: codexpiator-frontend3description: Frontend engineering guidance - component architecture, state management, CSS/styling architecture, forms and validation, routing, responsive/mobile design, frontend performance, SEO/AI-visibility, and accessibility. Use for any UI/component/frontend-structure question, including what to test on the frontend (see codexpiator-testing-qa for general testing strategy/TDD discipline instead).4---56# Codexpiator Frontend78Single-purpose reference files for frontend engineering decisions.9Read the specific file below for the concern at hand rather than10trying to hold all of it in one place.1112| File | Read this when... |13|---|---|14| `component-architecture.md` | Structuring components, deciding what to extract, naming, folder layout |15| `state-management.md` | Choosing where state lives, local vs global, server vs client state |16| `styling-and-css.md` | Choosing a styling approach, design tokens, theming, responsive strategy |17| `forms-and-validation.md` | Building forms, validation timing, accessible error handling |18| `routing-and-navigation.md` | Route structure, code-splitting by route, auth-gated routes |19| `responsive-and-mobile.md` | Breakpoints, touch targets, mobile web specifics |20| `frontend-performance.md` | Bundle size, lazy loading, images, layout shift |21| `frontend-testing.md` | What to unit/integration/E2E test on the frontend |22| `accessibility.md` | Semantic HTML, ARIA, keyboard nav, contrast, focus management |23| `seo-and-launch-checklist.md` | Pre-launch pass: metadata, SEO tags, legal pages, conversion essentials |24| `seo-strategy-and-ai-visibility.md` | Deep SEO strategy + GEO: ranking in Google/Bing/DuckDuckGo and being cited by AI answer engines |25| `external-skills-map.md` | Whether a specialized design skill should lead instead |2627## Before any visually-led answer2829If the task is primarily about visual design quality, motion, a broad30polish pass, or auditing an existing UI, check `external-skills-map.md`31first — a specialized external skill may be a better fit than this32skill's own guidance, and that file (plus33`shared/external-skills-registry.md`) has the procedure for checking.34This is not optional for design-heavy work: attempt to consult the35relevant external design skill(s) before finalizing an answer, not36only as a fallback when you happen to remember to check.3738## Verify visually with Playwright3940For any non-trivial frontend change, actually look at the rendered41result before calling it done — use Playwright (via its MCP tools when42available) to navigate to the page, interact with it, and take a43screenshot/snapshot rather than reasoning about the DOM only from44source code. If Playwright isn't available in the environment,45strongly recommend the user install it rather than skipping visual46verification silently.4748**Never commit anything Playwright creates** — screenshots, traces,49`test-results/`, `playwright-report/`, `blob-report/`, or any ad-hoc50screenshot file taken during manual verification. These are51throwaway verification artifacts, not project deliverables; confirm52they're gitignored (see53`codexpiator-dx-git/repo-hygiene-and-onboarding.md`) and never `git54add` one even if it isn't.5556## Reference material: awesome-design-md5758For design-heavy frontend work, pull relevant reference docs from59https://github.com/voltagent/awesome-design-md — a curated collection60of design-principle documents — rather than guessing from memory when61an authoritative written reference is one fetch away.6263**Gather the user's actual preferences before selecting anything.**64Which docs are worth fetching depends entirely on taste and context65that isn't in the repo or a one-line prompt — don't infer it silently.66Before dispatching the selection subagent, call `AskUserQuestion` to67cover (skip only what's already been stated explicitly or is genuinely68fixed by an existing design system in the repo):6970- **Visual style/aesthetic** — e.g. minimalist, editorial, brutalist,71 glassmorphism, playful, corporate/professional, dark-tech — offer a72 real spread of distinct directions, not just light/dark.73- **Language/locale** — the UI's primary language(s), and whether74 i18n/RTL support is needed.75- **Formatting & typography conventions** — type scale approach,76 heading hierarchy style, content density (spacious vs. compact).77- **Animations & motion** — none/minimal, subtle micro-interactions,78 or expressive/bold motion (bridges to `external-skills-map.md`'s79 `design-motion-principles` entry for the deeper implementation).80- **Colors** — a specific palette/brand colors if they have one, or a81 direction (warm/cool/neutral, monochrome vs. saturated) if not.82- **Layout patterns** — e.g. classic marketing sections, dashboard/83 data-dense, asymmetric/editorial grid, card-heavy vs. content-first.84- **Fonts** — a specific typeface if they have one, or a style85 direction (geometric sans, humanist sans, serif-forward) if not.8687For each, offer a genuinely wide range of concrete options rather than88two extremes, and mark one or two as recommended defaults so the user89can pick quickly without having to have a fully-formed opinion on90every axis. Only after this is settled should the docs to fetch be91decided — the preferences gathered here are what the selection92subagent should match against.9394Don't bulk-download the whole collection. Use the Task/Agent tool to95launch a subagent that browses the repo's index and picks the docs96that actually match the current project's scope *and* the preferences97just gathered (stack, kind of UI, and the stated style/motion/color/98layout/font direction); save only those selected docs to99`.codexpiator/design-refs/` (see100`shared/long-task-memory-and-superpowers.md` for the shared101`.codexpiator/` directory convention — gitignore it immediately if102it's the first thing written there). Read from that local cache on103later reference within the same project instead of re-fetching.104105## Mandatory pre-completion gate for any frontend change106107Before considering frontend work done:1081. **Consult every relevant file in this skill** (`component-109 architecture.md`, `state-management.md`, `styling-and-css.md`,110 etc. — whichever apply to the change) plus any applicable external111 design skill from `external-skills-map.md`, not just the first one112 that seems relevant.1132. **Run Prettier (or the project's configured formatter) and a type114 check** and resolve everything they flag. Never report frontend115 work complete with unformatted code or type errors outstanding.1163. Confirm new components/pages follow the folder-per-component117 colocation convention in `component-architecture.md`.1184. **Visually verify with Playwright** per the section above when the119 change is non-trivial — don't rely on reading code alone for120 something meant to be seen and used.1215. **Write and run real tests for whatever was created or changed** —122 not just the happy path, cover edge cases too (empty/loading/error123 states, boundary inputs, keyboard-only interaction where relevant)124 — and run the full test suite before calling the work done, not125 just the new test file in isolation. See `frontend-testing.md` and126 `codexpiator-testing-qa/tdd-workflow.md`.1276. Suggest running `/codexpiator-audit` if the change was significant128 — see `shared/collaboration-and-audit-practice.md`.1297. If the project is still using a placeholder/default favicon or130 brand images (per `seo-and-launch-checklist.md`), remind the user131 at the end of the work to provide their own custom favicon/images —132 don't ship or silently leave a generic default in place without133 flagging it.134135Also see that same shared file for when to ask a clarifying question136(`AskUserQuestion` when available) instead of guessing.