Blade ui

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

Blade ui is an AI agent skill from the GitHub repository event4u-app/agent-config. Use when the project's frontend stack is Blade — dispatched by `directives/ui/{apply,review,polish}.ts`. Covers views, components, partials, layouts, and view logic.

How to use this skill

Skill file

blade-ui

Grounded stack guidance: pull idiomatic Do/Don't + docs URLs from the

adopted stack corpus before improvising — `node

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

<skills-root>/design-intelligence/data/manifest.json --stack laravel "<topic>"`

(the laravel stack file is Blade/UI-scoped, not general Laravel). See

CODE0.

Positioning — dispatched, not standalone

blade-ui is the apply-step executor for the Blade 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 |

| Review + polish loop | CODE0 + CODE1 |

When to use

Cite this skill when:

Do NOT use when:

Procedure: Create Blade view or component

Step 0: Inspect

  1. Confirm Blade is used — check resources/views, components, layouts.
  2. Inspect existing UI patterns — layouts, partials, component naming, CSS conventions.
  3. Check form handling style — old input, validation errors, session flashes, reusable field partials.
  4. Inspect neighboring templates — match indentation, directives, slot usage, classes.
  5. Determine data flow — what belongs in controller/view model vs. template.

Step 1: Create the template

  1. Use the project's existing layout system.
  2. Keep template presentation-focused — no business logic, no DB queries.
  3. Extract repeated sections into partials or components.

Step 2: Handle forms (if applicable)

  1. Follow project's form style for labels, inputs, validation messages.
  2. Use CSRF protection correctly.
  3. Render validation errors consistently.
  4. Preserve user input with old() or project conventions.
  5. Reuse existing field components — don't duplicate.
  6. 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.

Step 3: Validate

  1. Check escaping — {{ }} by default, {!! !!} only when explicitly safe.
  2. Check styling — Tailwind utility classes, not inline styles.
  3. Check accessibility — labels for form fields, semantic HTML.

Conventions

→ See guideline php/blade-ui.md for full conventions.

Output format

  1. Blade view or component file(s) following project conventions
  2. Component class (if applicable) with typed props

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?, skip_reason?}`. **Render evidence is

required, not optional** on a review/polish pass: you MUST drive the

headless browser (Playwright + axe-core) against the rendered output and

write render_ok. Omitting it now triggers the preview_render_required

halt — a render-capable stack can no longer claim success without

rendering. 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. The

only no-render path is an explicit, reasoned skip: set skipped: true

plus a skip_reason (e.g. no Playwright runner in this env). 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

Anti-slop

Before shipping a Blade view, pull

CODE0

and scan Visual / Typography / Layout — the Blade markup is where side-stripe

accents (V1), icon-tile feature cards (T3), and the centered-hero + 3-column

template (L1/L2) concretely land. Stack-specific Tailwind class/hex bans live in

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.