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.

.senren/agent-rules.md + adapters #

Inside your app, the install generator creates a single source-of-truth file plus marker-managed adapter files for Codex (AGENTS.md), Claude (CLAUDE.md), Copilot (.github/copilot-instructions.md), and Cursor (.cursor/rules/senren.mdc). Run bin/rails senren:agents:sync to regenerate.

.senren/agent-rules.md
# Senren Agent Rules

Generated by senren-ui. Do not edit by hand.
Run `bin/rails senren:agents:sync` to regenerate.

## Hard Rules

- Use Senren components before writing custom HTML.
- Use ViewComponent for reusable UI.
- Use Turbo for server state.
- Use Stimulus only for local behavior.
- Do not introduce React, Vue, Alpine, or external state frameworks.
- Use semantic Tailwind tokens; do not hard-code color families.

## Important Files

- `.senren/skill.md`                 - centralized component guidance
- `.senren/conventions.md`           - project conventions
- `.senren/registry.yml`             - component registry mirror
- `.senren/installed_components.yml` - local install ledger

llms.txt + llms-full.txt #

This documentation site serves llms.txt and llms-full.txt for AI agent discovery. Point your agent at the URL to give it a full overview of Senren before it starts working.

senren-ui.dev/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