Flux

From event4u-app/agent-config · View interactive version

Flux is an AI agent skill from the GitHub repository event4u-app/agent-config. Use when the project uses `livewire/flux` — dispatched by `directives/ui/{apply,review,polish}.ts`. Covers Flux components, slots, variants, and form primitives.

How to use this skill

Skill file

flux

Grounded stack guidance: Tailwind-layer Do/Don't + docs URLs via

`node <skills-root>/corpus-grounding/scripts/ground.mjs search

--manifest <skills-root>/design-intelligence/data/manifest.json

--stack html-tailwind "<topic>"`. See

CODE0.

Positioning — dispatched, not standalone

flux is the primitive-library executor for projects on the

Livewire + Flux stack. It is invoked by

CODE0

once the design brief is locked, and revisited by review.ts /

polish.ts during the design-review loop. It does not own the

flow, does not drive the audit, and does not lock the design.

| Concern | Owner |

|---|---|

| Audit + token inventory (mandatory pre-step) | CODE0 |

| Design brief (layout / states / microcopy) | CODE0 |

| Universal design heuristics | CODE0 |

| Component logic / state / actions | CODE0 |

| Static Blade partials | CODE0 |

When to use

Cite this skill when:

Do NOT use when:

Procedure: Create a Flux view

Step 0: Inspect

  1. Confirm Flux is installed — check composer.json for livewire/flux.
  2. Check existing views — match Flux component usage patterns.
  3. Check Flux docs — https://fluxui.dev/docs for latest API.

Step 1: Build the view

  1. Use <flux:*> components instead of raw HTML.
  2. Use variant prop for styling (not custom Tailwind for standard styles).
  3. Use wire:model for Livewire binding.
  4. Use label prop on form fields (accessibility).

Step 2: Validate

  1. No raw HTML form elements where Flux equivalents exist.
  2. No manual error rendering (Flux has built-in validation display).
  3. No conflicting Tailwind classes overriding Flux styles.

Conventions

→ See guideline php/flux.md for component reference, variants, forms, icons.

Output format

  1. Blade view using Flux components with correct props and slots
  2. Livewire component class if interactive behavior is needed

Review pass — a11y findings + preview envelope

When this skill is dispatched by directives/ui/review.ts (test slot)

or directives/ui/polish.ts (verify slot) — i.e. a review/polish run,

not the initial apply — it also emits:

severity_floor?, accepted_violations?}. Use the same (rule, selector)`

shape as state.ui_audit.a11y_baseline so the engine's de-dup matches

pre-existing entries on replay. Omit the envelope on apply passes; the

engine's _apply_a11y_gate only fires when a baseline is present.

dom_dump_path?, error?, skipped?}. render_ok: false with error`

populated triggers the preview_render_failed halt; render_ok: true

with screenshot_path threads the screenshot into the delivery

report's artifacts list. Browser tooling (Playwright/Cypress/…) is

a consumer-project dependency — this package does not ship one.

Polish dispatch: when the dispatcher skips review because a previous

review pass already returned SUCCESS, this skill MUST itself

synthesise the updated state.ui_review.findings (including any

remaining a11y_violation entries) so the engine's gate sees the

current state on the next polish round.

Gotcha

Taste Dials

When DESIGN.md declares ## Taste Dials, honour them: Variance → layout-family spread + asymmetry tolerance; Motion → animation budget + reduced-motion posture; Density → spacing scale + information-per-viewport. Absent → follow the design brief's inferred dials.

Do NOT

Control roles. For every control you add, look up its role in the control_roles of agent-config ui:audit (re-run it when the artifact is older than your last UI edit): use the canonical implementation and the siblings' box metrics. Role missing or tied → ask before inventing a control kind; a native control beside an existing primitive needs a stated native_control_reason.

Anti-slop

Flux primitives carry sane defaults, but composition still drifts into slop —

pull CODE0

and check Layout (L1/L2 hero-metric + identical-card grids) and Color

(C1 gradient defaults) before shipping. Tailwind-level bans:

CODE0.

Auto-trigger keywords

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.