jarvis-workspace / frontend
AGENTS.md33 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 code style.
Of the AGENTS.md files we read, the 35,337 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.
- AGENTS.mdAGENTS.md
- plotspace/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
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
- Very specific: line 28
All of frontend/ is mounted at /static.
- Very specific: line 44
Colors: ALWAYS var(--ob-*) (oklch).
- Very specific: line 53
ONLY italic ≥20px) editorial moments · --font-mono (JetBrains Mono) data.
- Very specific: line 75
Accent/backgrounds: ONLY via var(--ob-*) in tokens.css, including theme overrides under [data-theme=<name>].
- Distinctive: line 82
Every new visible text needs its entry — with English on, nothing may stay in Spanish.
- Distinctive: line 97
No frameworks, npm or node as runtime dependency.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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.
Files
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 frameServing (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 setsdata-fondoand the--gw-*vars (--gw-blur/-dim/-sat/-term/-panel/-img) synchronously on boot. - The blur lives on the static
#jw-fondolayer, not inbackdrop-filteron 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/-termfor a NEW structural surface, and add its selector tofondo.css. Small controls and floats keep their fill (they must read on any image). - xterm:
allowTransparencyonly while a background is active (terminal.js_aplicarTransparenciarecreates the CanvasAddon onfondo-changed). Monaco and the remote-browser pages stay opaque on purpose. - The settings block is
sections/settings/fondo-ui.js(purehtml()+montar()); tests inshared/__tests__/fondo.test.jsandsections/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-2for normal text (AA).--ob-fg-3only icons and big labels;--ob-fg-4only 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-filterONLY 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), nativealert()/confirm()/prompt()(usetoast()/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.jsexposeswindow.JarvisThemeswithaplicar(nombre),actual(),init(),TEMAS(array),normalizarTema.DEFAULT_TEMA = 'violeta'. The theme is written tohtml[data-theme=<name>]; the violet default sets no attribute. Tested inshared/__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)inshared/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-*)intokens.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-labelare 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.jschecks 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, callJarvisI18n.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 errordetails 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.mdof 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.
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
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.

