mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-13 20:08:05 +08:00
1.7 KiB
1.7 KiB
AGENTS.md
Guidance for coding agents working in this repository.
Read CLAUDE.md — it is the single source of truth (commands, layout, and the rules that bite if ignored). It is not Claude-specific; this file used to be a hand-kept copy of it and drifted.
Deep dives live in .dev/docs/:
- build.md — build output map, terser options, dev-server env, Vite plugins, releases
- css.md —
@applyconventions, import order, tokens, dark mode, icons - patches.md — on-demand per-page patches (CSS + JS)
- router.md — the client-side router; read before touching navigation
- sidebar.md — sidebar/menu rendering and the anti-flash cache
- mock-pages.md — styling third-party pages without a device
Key Agent Constraints
When fixing UI or adding styles:
- Core LuCI vs. Patches: Official LuCI pages (such as
admin/status,admin/network,admin/system) and shared LuCI markup structures (like.cbi-section,.ifacebox) are core LuCI, not third-party packages. Never create a page patch (src/media/patches/) for them. Locate the corresponding component undersrc/media/components/(e.g._card.css,_table.css) and fix it in core CSS. - Unified Breakpoints: Do not write ad-hoc raw
@mediaqueries with arbitrary pixel values (e.g.@media (max-width: 900px)). Use TailwindCSS standard responsive variants (max-md:,md:) to keep mobile and desktop breakpoints unified across the theme. - CSS Authoring: Always use TailwindCSS v4
@applyand CSS nesting insrc/media/components/. Plain CSS is strictly restricted tosrc/media/patches/.