Skip to content

Instantly share code, notes, and snippets.

@floydnoel
Last active June 4, 2026 13:10
Show Gist options
  • Select an option

  • Save floydnoel/d4654a968ef3f92d54be9d90eb5020ef to your computer and use it in GitHub Desktop.

Select an option

Save floydnoel/d4654a968ef3f92d54be9d90eb5020ef to your computer and use it in GitHub Desktop.
Routerino KISS React AGENTS.md

This file provides guidance when working with code in this repo

JavaScript/React

  • Vite with Routerino Forge for SSG
  • Modern JS using standard JS/Node APIs
  • React 19 with JSX
  • Write JSDoc for functions and components
  • Follow "A Philosophy of Software Design", KISS, YAGNI principles
  • Avoid: Observables, Proxies, RxJS, decorators, exotic patterns
  • Use Node.js built-in test runner

Code Structure

  • Functions: single responsibility, no side-effects, descriptive names
  • Use options dictionary as first param for fns w/2+ params
  • Constants in UPPER_SNAKE_CASE at file top, & exported (or in a constants file) when re-usable
  • Prefer composition over inheritance (don't use classes)
  • Create simple APIs with sensible defaults - "it just works" philosophy
  • Error handling: try/catch blocks, graceful error boundaries
  • Self-documenting code, minimal comments

Libraries & Dependencies

  • Never install/import additional libraries without explicit user permission, prefer to KISS
  • Always check package.json first, propose Node.js standard alternatives
  • If approved exception, document in README

Styling

  • PRIMARY: DaisyUI classes (v5)
  • SECONDARY: Tailwind classes (v4) only for layout/animations/complex DaisyUI lacks
  • FORBIDDEN: Custom CSS, CSS-in-JS, extra CSS files/libraries
  • Use DaisyUI theming system (theme values like bg-neutral or bg-accent for backgrounds)

Frontend-Specific Rules

  • Components: Avoid over-componentization; use className prose for text
  • State: Redux Toolkit (RTK) for app-level state and business logic
  • Data: Native fetch + RTK; no data fetching libraries
  • Forms: FormData API + Object.fromEntries; no form libraries
  • Hooks: Custom hooks only for special features (like AOS)
  • Use semantic HTML with a11y best practices

Architecture

  • Vite + React SWC for fast builds
  • Routerino Forge for static site generation
  • Routes & links require trailing slashes
  • Markdown files imported directly, rendered via Markdown component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment