| name | context-protocol |
| description | Slop-prevention middleware. Run before any design or code task to gather sources, then produce a Plan Mode block before touching any file. Eliminates hardcoded colours and generic components caused by agents assuming design decisions. |
| triggers | ["any /new-feature invocation","any /discuss invocation","any task involving UI, components, or code modification"] |
| context | fork |
Context Protocol — Slop Prevention Middleware
Purpose
Force agents to gather evidence before generating. No file is written until a Plan Mode block is shown and the user approves. This prevents AI SLOP: hardcoded colours, generic components, and assumed design decisions.
Step 1: Detect Path
Scan the task description for DESIGN triggers:
logo, icon, UI, component, colour, color, style, animation, layout,
design, theme, typography, font, button, card, modal, landing page,
hero, navbar, sidebar, dashboard
Match case-insensitively.
- Match found → DESIGN PATH
- No match → CODE PATH
DESIGN PATH
1. Read design tokens (ALWAYS FIRST)
Read apps/web/lib/design-tokens.ts. Extract:
- Background colours (BACKGROUNDS object)
- Spectral colours (SPECTRAL object)
- Text opacities (TEXT object)
- Border styles (BORDERS object)