| name | ops-frontend-guidelines |
| description | Guidelines and design system rules for developing frontend components, pages, and UI for the ops-agent project. Trigger this whenever the user asks to create or modify React components, CSS, UI styling, or any frontend features. Make sure to consult this skill before generating any Tailwind code or UI elements to ensure they match the 'Cyber-Ops Precision' design. |
Ops-Agent Frontend Guidelines (Cyber-Ops Precision)
This project uses a highly customized, dark-mode, tech-focused design system named "Cyber-Ops Precision". When writing frontend code (React + Tailwind CSS), you MUST adhere to the following stylistic and structural guidelines.
1. Color Palette (Tailwind Custom Colors)
We do NOT use default Tailwind colors for our core UI. We use the custom ops-* color namespace defined in tailwind.config.js.
2. Typography
- UI Text:
font-sans (mapped to Inter). Used for all standard interface text.
- Code/Terminal:
font-mono (mapped to JetBrains Mono). Used for commands, logs, JSON, and terminal outputs.
- Font Sizes:
text-[10px] or text-[11px] font-bold tracking-[0.1em]: Used for tags, metadata, and system status indicators. Avoid using all-caps for long English labels; use Title Case instead.
text-[13px] or text-[14px]: Standard reading text and chat bubbles.
text-[18px] or text-lg: Primary headers. Use font-black or font-bold for emphasis.
3. Component & Styling Conventions
Glassmorphism & Depth
- Instead of solid opaque headers, use backdrop blur:
bg-ops-panel/70 backdrop-blur-md.
- Use inner shadows for code blocks and deep panels:
shadow-inner.
Hover & Active States (Motion)
- All interactive elements (buttons, inputs) MUST have smooth transitions:
transition-all duration-200.
- Buttons must have a physical press effect:
active:scale-95.
- Active or focused inputs should glow:
focus-within:ring-1 focus-within:ring-ops-cyan/40 focus-within:shadow-glow.
Status Tags / Badges
When displaying a status (e.g., Online, Running, Failed), use this pattern:
<span className="inline-flex items-center gap-1.5 rounded-md border border-ops-cyan/30 bg-ops-cyan/10 px-2 py-1 text-[10px] font-bold tracking-[0.1em] text-ops-cyan">
<span className="h-1.5 w-1.5 rounded-full bg-ops-cyan animate-pulse" />
Running
</span>
Chat Bubbles / Event Cards
- User Message: Aligned right, cyan tint.
border-ops-cyan/20 bg-ops-cyan/10 shadow-[0_4px_16px_rgba(6,182,212,0.05)] backdrop-blur-sm
- Agent Container: Left aligned, dark panel
bg-ops-panel/40 border border-ops-border/30 backdrop-blur-sm.
- Command Blocks: Rendered like a sleek terminal inside the chat flow.
bg-ops-deep border border-ops-border/30 shadow-inner. Code inside should use bg-black/60 font-mono text-[12px].
4. How to Develop Components
- Tech Stack: React 18, Vite, TypeScript, Tailwind CSS.
- No UI Libraries: Do NOT import components from Shadcn UI, MUI, Ant Design, etc. Build components natively using Tailwind CSS utility classes based on the design system.
- Icons: Use inline SVG icons. Keep them minimal with
stroke-width="2.5" or 2.4 and fill="none".
- Layout: Flexbox and CSS Grid are preferred. The main layout is typically a full-screen
h-screen w-screen overflow-hidden with panels dividing the space.
- Scrollbars: Rely on the custom thin scrollbar defined in
index.css. Avoid adding explicit scrollbar hiding unless necessary.
5. Summary Checklist for New Code