agentleFS
celsiusmcelsiusm/jarvis-workspace/frontend/AGENTS.md

jarvis-workspace / frontend

AGENTS.md35 starsChanged 3 months agoMITView on GitHub

Vanilla frontend (HTML/CSS/JS, no frameworks, no build). Organized by section: everything of a section lives in its folder, with its .js and .css together. shared/fondo.js (engine, loaded in the body start like glass.js) + shared/fondo.css (loaded after liquid-glass.css). - Everything hangs off :root[data-glass="on"][data-fondo="on"]; the engine sets data-fondo and the --gw-* vars (--gw-blur/-dim/-sat/-term/-panel/-img) synchronously on boot. - The blur lives on the static #jw-fondo layer, not in backdrop-filter on panels (a live xterm canvas next to a backdrop-filter repaints every frame).…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All of frontend/ is mounted at /static.

    line 28
  2. Very specific:

    Colors: ALWAYS var(--ob-*) (oklch).

    line 44
  3. Very specific:

    ONLY italic ≥20px) editorial moments · --font-mono (JetBrains Mono) data.

    line 53
  4. Very specific:

    Accent/backgrounds: ONLY via var(--ob-*) in tokens.css, including theme overrides under [data-theme=<name>].

    line 75
  5. Distinctive:

    Every new visible text needs its entry — with English on, nothing may stay in Spanish.

    line 82
  6. Distinctive:

    No frameworks, npm or node as runtime dependency.

    line 97

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

frontend/ — map for agents

Vanilla frontend (HTML/CSS/JS, no frameworks, no build). Organized by section: everything of a section lives in its folder, with its .js and .css together.

frontend/
├── index.html          # home, served on GET /
├── shell/              # workspace shell (NOT a section)
│   ├── workspace.html  # served on GET /workspace
│   └── workspace.js    # "glue": boots everything, WebSockets, navigation, TTS
├── shared/
│   ├── tokens.css      # ★ CANONICAL DESIGN SYSTEM (--ob-*) + utilities — see below
│   ├── ui.js           # ★ global icon() / toast() / confirmar() / pedirTexto() / cliLogo()
│   ├── themes.js       # ★ theme system (html[data-theme], localStorage jarvis.theme)
│   ├── icons/          # vendored CLI logos (lobehub 1.91.0): claude, codex, gemini…
│   ├── base.css        # reset, base layout + shell/terminal styles
│   └── __tests__/themes.test.js  # Node suite for pure theme logic
└── sections/
    ├── home/           # landing (home.js + home.css)
    ├── terminals/      # terminal grid (terminal.js, terminal-layout.js)
    ├── orchestrator/   # orchestrator panel (orchestrator.js + .css)
    ├── editor/         # file editor Monaco (editor.js + .css)
    └── mobile-preview/ # Expo preview in a phone frame

Serving (important)

All of frontend/ is mounted at /static. A section is served under /static/sections/<name>/<file>. When you change JS or CSS, bump the ?v=N of its <link>/<script> in shell/workspace.html (or index.html for home).

Custom background (Glass mode)

shared/fondo.js (engine, loaded in the body start like glass.js) + shared/fondo.css (loaded after liquid-glass.css).

  • Everything hangs off :root[data-glass="on"][data-fondo="on"]; the engine sets data-fondo and the --gw-* vars (--gw-blur/-dim/-sat/-term/-panel/-img) synchronously on boot.
  • The blur lives on the static #jw-fondo layer, not in backdrop-filter on panels (a live xterm canvas next to a backdrop-filter repaints every frame). Surfaces are a veil whose opacity (--gw-p/--gw-t) also blends neutral → theme color (weight = opacity²: glass = neutral, 100% = the theme's solid colors; light themes use a milky veil, terminals stay graphite): use --gw-s-void/-0/-1/-term for a NEW structural surface, and add its selector to fondo.css. Small controls and floats keep their fill (they must read on any image).
  • xterm: allowTransparency only while a background is active (terminal.js _aplicarTransparencia recreates the CanvasAddon on fondo-changed). Monaco and the remote-browser pages stay opaque on purpose.
  • The settings block is sections/settings/fondo-ui.js (pure html() + montar()); tests in shared/__tests__/fondo.test.js and sections/settings/__tests__/fondo-ui.test.js.

"Obsidian Glass" design system (MANDATORY)

shared/tokens.css is the ONLY source of truth for tokens. Hard rules:

  • Colors: ALWAYS var(--ob-*) (oklch). Never hex/oklch literals in chrome. Legacy names (--bg-app, --sb-*, --hc-*, --violet…) are compatibility aliases — don't use them in new code.
  • Color is SIGNAL, not decoration: violet = life/accent (agent thinking, focus, CTA); green/amber/red = ONLY states; cyan = info/voice; magenta = the Home aurora. Glow comes from a 1px border or text, never from filled blocks.
  • Text: floor --ob-fg-2 for normal text (AA). --ob-fg-3 only icons and big labels; --ob-fg-4 only disabled/placeholder.
  • Typography: --font-ui (Inter) UI · --font-display (Instrument Serif, ONLY italic ≥20px) editorial moments · --font-mono (JetBrains Mono) data; technical labels in mono UPPERCASE + --ls-caps. Sizes ONLY from the --text-* scale.
  • Performance (live xterm.js): backdrop-filter ONLY on plane-2 (modals, floating menus, header), max 2 visible; FORBIDDEN in terminal containers. Infinite animations ONLY transform/opacity/box-shadow. Never animate panel width/height.
  • Forbidden: emojis as icons (use icon() from shared/ui.js), native alert()/ confirm()/prompt() (use toast()/confirmar()/pedirTexto()), sci-fi fonts, scanlines, clip-path on scrolling containers.
  • Utilities: .ob-glass (plane-2 glass), .ob-edge (plane-1 gradient border), .ob-pip[data-state] (breathing state), .skeleton, .ob-spinner, .ob-label; motion via --dur-1/2/3 + --ease-out/snap.

Themes and logos

  • shared/themes.js exposes window.JarvisThemes with aplicar(nombre), actual(), init(), TEMAS (array), normalizarTema. DEFAULT_TEMA = 'violeta'. The theme is written to html[data-theme=<name>]; the violet default sets no attribute. Tested in shared/__tests__/themes.test.js.
  • shared/icons/ — CLI SVGs (lobehub 1.91.0): claude-color.svg, codex-color.svg, gemini-color.svg, opencode.svg, qwen-color.svg, etc. Add new CLIs here.
  • window.cliLogo(tipo, size) in shared/ui.js — helper returning <img> of the logo (or text fallback if missing). Use anywhere a CLI type is shown (cards, launcher, quick picker).
  • Accent/backgrounds: ONLY via var(--ob-*) in tokens.css, including theme overrides under [data-theme=<name>]. Never hardcode hex in new sections.

Language (i18n ES⇆EN)

The UI is authored in Spanish; shared/i18n.js translates the DOM at runtime against shared/i18n-dict.js (+ JarvisI18n.agregar({...}) tables a module registers itself). Every new visible text needs its entry — with English on, nothing may stay in Spanish.

  • Text nodes and title/placeholder/aria-label are matched whole (whitespace collapsed). Dynamic texts use templates: "hace {t}": "{t} ago" matches "hace 5 min". Same markers on both sides (shared/__tests__/i18n-dict.test.js checks it). A template with <6 fixed chars only matches when every captured value has a digit (so "hace {t}" never rewrites user text like "hace falta…").
  • The engine never sees: xterm content (term.write), .monaco-editor, textarea content, canvas, [data-i18n-skip], document.title, OS notifications, TTS, text sent to the backend. There, call JarvisI18n.t('frase {x}').replace('{x}', v).
  • Text born on the SERVER and shown as-is (chat notices, orchestrator reply) is localized there with plotspace.core.idioma_ui.L(es, en); the frontend reports the UI language via presence and each chat request. Plain error details just need a dict entry.

Rules

  • No frameworks, npm or node as runtime dependency.
  • Each section exposes one global and consumes only the public surface of the others (see the AGENTS.md of each folder). Don't touch another section's internals.
  • workspace.js (shell) wires sections together; it's the only one that knows all of them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.