Senren UI

AI agents

Built for machines, too.

Senren ships a centralized, structured component map that AI coding agents can read before writing UI. No guesswork. No hallucinated APIs.

.senren/skill.md #

Every install creates a single Markdown file that documents every installed component. AI agents are instructed to read this file before proposing UI changes.

.senren/skill.md
## Component: Dialog

Category: Overlay

Depends on:
  - Button
  - senren--dialog Stimulus controller

Use for:
  - confirmation modal
  - short create/edit form modal

Avoid:
  - long multi-step workflows
  - full-page replacement

Agent rules:
  - Always include a visible title.
  - Preserve Escape key close behavior.
  - Use Stimulus only for open/close/focus.
  - Do not introduce React, Vue, Alpine, or
    external modal libraries.

llms.txt + llms-full.txt #

Senren follows the emerging llms.txt convention. `llms.txt` is short and points agents to the centralized skill file. `llms-full.txt` contains the complete component map plus conventions.

public/llms.txt
# Senren UI

Senren UI is the local Rails UI system for this application.

Use `.senren/skill.md` as the primary AI Agent guide.

## Rules

- Use Senren components before writing custom HTML.
- Use ViewComponent for reusable UI.
- Use Turbo for server state.
- Use Stimulus for local behavior.
- Do not introduce React, Vue, Alpine, or frontend
  state frameworks.

## Important Files

- `.senren/skill.md`
- `.senren/registry.yml`
- `.senren/installed_components.yml`
- `.senren/conventions.md`

What agents should and shouldn't do #

Should

  • · Use Senren components before writing custom HTML
  • · Read .senren/skill.md before composing pages
  • · Pass class_name: for custom Tailwind classes
  • · Preserve accessibility attributes in component templates
  • · Keep Stimulus scoped to the component that owns it

Should not

  • · Add React, Vue, Alpine, or any frontend state framework
  • · Hard-code gray-*, slate-*, zinc-* in components
  • · Replace Senren CSS tokens with raw colors
  • · Use render Foo.new(...) { "..." } — the block binds to .new, not render
  • · Modify the generated region of .senren/skill.md