Cheshi / desktop
AGENTS.md19 starsChanged 47 days agoMITView on GitHub
These instructions apply to desktop/ and its descendants, together with the repository root instructions. Text buttons use the following two styles. - Use a total height of 32px with box-sizing: border-box. - Use no border. - Use var(--font-size-label) (11px) for the font size. - Use var(--text) (#D3E2DE) for the text color. - Preserve the height, border, font size, and text color in the default, hover, and pressed states. - Enabled buttons use cursor: pointer. - Default background: var(--control-surface) (rgba(41, 52,…
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,040 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 repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- desktop-buildSkill
- desktop-ui-checkSkill
- desktop-ui-verificationSkill
- easy-explainSkill
- homie-createSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
62 rules. About 0 are common, 14 are distinctive, and 48 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
48
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use a total height of 32px with box-sizing: border-box.
- Very specific: line 14
Use var(--font-size-label) (11px) for the font size.
- Very specific: line 15
Use var(--text) (#D3E2DE) for the text color.
- Distinctive: line 29
Use the Ghost style for secondary actions that do not need a prominent background.
- Very specific: line 46
Use var(--icon-button-size) (22px) for both width and height, with box-sizing: border-box.
- Very specific: line 49
Use a 50% border radius.
- Distinctive: line 50
Use zero inner padding.
- Very specific: line 51
Use var(--icon-button-icon-size) (11px) for both icon dimensions and var(--icon-button-stroke-width) (1.7) for the stroke width.
- Very specific: line 53
Use var(--text) (#D3E2DE) for the icon color.
- Distinctive: line 57
Do not translate or scale the button when it is clicked.
- Distinctive: line 58
Do not show a focus outline.
- Distinctive: line 82
Do not apply hover or pressed effects to disabled buttons.
- Distinctive: line 102
Keep two layers: a rear decorative background and the foreground popup panel.
- Very specific: line 107
Use the implemented surface properties: --popup-rear-background defaults to transparent and --popup-surface-background defaults to …
- Very specific: line 111
Do not restore the removed rgba(41, 52, 61, 0.2) tint or obsolete black 0.01 fills.
- Very specific: line 113
Use LiquidGlassPanel for the foreground panel.
- Very specific: line 121
Keep text and icons sharp.
- Distinctive: line 122
Keep the overlay in the existing HTML portal.
- Very specific: line 148
Keep both panel layers free of tint.
- Very specific: line 167
Use Modal, exported from frontend/src/shared/ui, for application modal dialogs.
- Very specific: line 187
Keep modal content, text, and buttons sharp.
- Very specific: line 191
Keep the separate native ::backdrop dimming color at rgba(0, 0, 0, 0.16).
- Very specific: line 201
Use left-aligned body text and the shared description typography.
- Distinctive: line 214
Follow the repository's authorization rules for rendered development-app review.
- Distinctive: line 219
Use a dropdown menu for actions such as File actions.
- Very specific: line 241
Use the section-title style for the menu title.
- Very specific: line 242
Use 32px item heights, var(--font-size-label) (11px) text, and var(--text) for item text and icons.
- Very specific: line 244
Use var(--control-surface-ghost) for item backgrounds and var(--control-surface-interactive) for enabled hover, pressed, and keyboard focus …
- Very specific: line 265
Use section-title for setting groups and section titles.
- Very specific: line 268
Use description for descriptions below titles, help text, and status guidance.
- Very specific: line 270
Use setting-label for the names of settings such as switches and sliders.
- Very specific: line 272
Use var(--font-ui), sans-serif as the shared UI font.
- Very specific: line 273
Keep letter spacing at normal.
- Distinctive: line 274
Use the specified tokens instead of fixed hexadecimal values for colors.
- Very specific: line 278
Keep settings detail pages on the shared spacing rhythm used by the Appearance and Agents views in frontend/src/features/settings/.
- Very specific: line 284
Use a flex title row with a 32px minimum height, centered items, justify-content: space-between, and a var(--space-default) gap.
- Very specific: line 288
Use a 36px minimum height for setting and input rows and center their labels and controls vertically.
- Very specific: line 290
When a description, loading message, or status belongs to one logical block, stack those messages vertically with a var(--space-default) …
- Distinctive: line 307
Use zero border radius.
- Very specific: line 308
Use var(--icon-button-icon-size) (11px) for both icon dimensions.
- Very specific: line 309
Use var(--font-size-label) (11px) for the font size, with a weight of 400.
- Very specific: line 311
Use var(--text) for both text and icon colors.
- Very specific: line 332
Keep the thickness fixed at 6px through --auto-hide-scrollbar-size: width for vertical scrollbars and height for horizontal scrollbars.
- Very specific: line 336
After 700ms without scrolling, fade the thumb to transparent over 240ms with ease-out.
- Distinctive: line 349
Avoid separate feature-specific timers or fade implementations.
- Very specific: line 357
Use toggle-switch for on/off settings.
- Very specific: line 361
Use a 36px × 20px size.
- Very specific: line 364
Use a circular 20px × 20px thumb in var(--control-thumb-color) (#FFFFFF).
- Very specific: line 366
Use var(--control-track-color) (#A6A6A6) for the off-state background.
- Very specific: line 367
Use var(--toggle-track-on-color) (#18A9CF) for the on-state background.
- Very specific: line 384
Use slider for settings that adjust a continuous numeric value.
- Very specific: line 388
Use a 200px width and 20px height for the control.
- Distinctive: line 390
Use a transparent control background.
- Very specific: line 392
Use a 4px track height with a 2px border radius.
- Very specific: line 393
Use var(--control-track-color) (#A6A6A6) for the default track.
- Very specific: line 394
Use var(--control-track-hover-color) (#B8B8B8) for the hovered track.
- Distinctive: line 398
Use one color across the full track.
- Very specific: line 404
Use a native input[type="range"] to preserve keyboard interaction.
- Very specific: line 425
Use a pill shape with border-radius: 999px.
- Very specific: line 426
Use var(--font-ui), sans-serif as the font.
- Very specific: line 430
Use the same color for placeholder text with opacity: 0.4.
- Very specific: line 431
Use the text cursor in the editable input area.
≈ “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
Desktop Instructions
These instructions apply to desktop/ and its descendants, together with the
repository root instructions.
Button styles
Text buttons use the following two styles.
Shared specifications
- Use a total height of
32pxwithbox-sizing: border-box. - Use no border.
- Use
var(--font-size-label)(11px) for the font size. - Use
var(--text)(#D3E2DE) for the text color. - Preserve the height, border, font size, and text color in the default, hover, and pressed states.
- Enabled buttons use
cursor: pointer.
Standard button
- Default background:
var(--control-surface)(rgba(41, 52, 61, 0.4)). - Hover and pressed background:
var(--control-surface-interactive)(rgba(41, 52, 61, 0.8)).
Ghost button
Use the Ghost style for secondary actions that do not need a prominent background.
- Default background:
var(--control-surface-ghost)(rgba(41, 52, 61, 0.05)). - Hover and pressed background:
var(--control-surface-interactive)(rgba(41, 52, 61, 0.8)).
Provide both styles through shared button components and reuse those components. Icon-only buttons and switches follow their separately defined specifications.
Circle button styles
Classify circular action buttons that display only an icon as circle-button.
Shared specifications
- Use
var(--icon-button-size)(22px) for both width and height, withbox-sizing: border-box. - Use no border.
- Use a
50%border radius. - Use zero inner padding.
- Use
var(--icon-button-icon-size)(11px) for both icon dimensions andvar(--icon-button-stroke-width)(1.7) for the stroke width. - Use
var(--text)(#D3E2DE) for the icon color. - Center the icon horizontally and vertically.
- Preserve the size, shape, and icon color in the default, hover, and pressed states.
- Do not translate or scale the button when it is clicked.
- Do not show a focus outline.
- Enabled buttons use
cursor: pointer.
Standard circle button
- Default background:
var(--control-surface)(rgba(41, 52, 61, 0.4)). - Hover and pressed background:
var(--control-surface-interactive)(rgba(41, 52, 61, 0.8)).
Ghost circle button
Use the Ghost style for secondary actions that do not need a prominent background.
- Default background:
var(--control-surface-ghost)(rgba(41, 52, 61, 0.05)). - Hover and pressed background:
var(--control-surface-interactive)(rgba(41, 52, 61, 0.8)).
Disabled state and accessibility
- Disabled buttons use
disabled,opacity: 0.5, andcursor: not-allowed. - Do not apply hover or pressed effects to disabled buttons.
- Use Lucide icons.
- Provide an
aria-labeland a tooltip that describe the action. - Apply
aria-hidden="true"to decorative icons. - Preserve native button keyboard interaction.
Provide the Standard and Ghost styles through shared circle-button components and reuse those components. Controls with separate specifications, including switches and tab-close buttons, follow their own standards.
Shared popup backgrounds
Reuse PopupSurface styles and LiquidGlassPanel for layered popup surfaces. Item hover, selection, and pressed backgrounds follow their control-specific rules independently. Modal dialogs use the separate shared modal rules below.
Layered background
- Keep two layers: a rear decorative background and the foreground popup panel.
- Compose
PopupSurface.module.css'sanchoron the positioning wrapper andsurfaceon the panel, directly or throughToolbarMenu.module.css. The anchor owns::beforewithinset: 0,z-index: -1, andpointer-events: none; consumers own placement, dimensions, and stacking. - Use the implemented surface properties:
--popup-rear-backgrounddefaults totransparentand--popup-surface-backgrounddefaults tovar(--overlay-surface)(transparent). Keep both layers transparent. The composer, modal, shared menus, and default select popup use the same token. Do not restore the removedrgba(41, 52, 61, 0.2)tint or obsolete black0.01fills. - Use
LiquidGlassPanelfor the foreground panel. Itsrole="menu",role="listbox", ordata-liquid-glass-backdrop="true"enables participation in the shared blur system. Preserve the correct accessibility role; use the data attribute for a surface that needs blur without menu/listbox semantics. Retain the shared1px solid var(--divider)border. - Match both layers' radius with
var(--liquid-glass-radius, var(--panel-radius)). - Apply translucency to background colors, not the entire popup's
opacity. Keep text and icons sharp; do not applyfilter: blur()to popup contents. - Keep the overlay in the existing HTML portal. Do not introduce a separate native window for this effect.
Transparent SVG blur in chat
- Follow ChatConfigurationMenu styles
for the model, reasoning, and service-tier menu and its submenus. Set
--popup-rear-background: transparentand--popup-surface-background: var(--overlay-surface)on the anchor. Submenu anchors inherit these properties. The temporary-chat configuration menu shares these styles. Keep item hover/selection backgrounds independent of panel transparency. - ChatViewSurface supplies
RegionalBlur with the timeline's
sourceRef. React context crosses portals, so the composer and floating menus use the same source. Keep foreground panels outside that source's DOM subtree and inside the provider's React tree. RegionalBlurapplies SVGfeGaussianBlurwithstdDeviation="16"to the source only within the registered panels' rounded footprints. Its masked arithmetic composition replaces scene pixels rather than drawing a second translucent copy. Reuse this implementation instead of copying the scene or adding a separate blur filter per menu.- regionalBlurController
manages registration, geometry updates, and restoration. It owns
data-regional-blur-surface="true"; do not set this attribute manually. LiquidGlassPanel styles disable native backdrop filtering on both layers of registered panels. Keep both panel layers free of tint. Do not reintroduce nativebackdrop-filteror saturation: native backdrop filtering previously darkened the transparent Electron window. - SVG blur covers only the supplied source, not arbitrary content behind the
window. Outside a connected
RegionalBlurprovider, existing popup styles retain their native backdrop fallback (the shared anchor defaults to16pxplus the saturation token). Transparent CSS alone does not establish SVG blur. Extending this treatment to another scene requires connecting its background source and verifying the overlay; do not assume all app menus are migrated.
CodeMirror popups retain their existing DOM and positioning. Reuse the shared
panel CSS through the foreground surface installed by
workspaceEditorTooltips.
Preserve its border-aligned inset: -1px layers and rear/foreground z-indexes
of -2/-1, defined in
workspaceEditorTheme.
Shared modal
Use Modal, exported from
frontend/src/shared/ui, for application modal dialogs. Keep feature-specific
content, actions, and sizing in the consumer. Reuse the common module instead of
creating another dialog shell, dimming overlay, or blur implementation.
Background and blur
Modalrenders a native<dialog>through a portal todocument.body. Its foreground is aLiquidGlassPanelwithvar(--overlay-surface)(transparent); the dialog shell and decorative rear layer remain transparent. Retain the shared border and rounded corners from Modal styles.- modalBlur manages the background sources
and modal stack. modalBlurFilter
applies an SVG blur of
16pxto the scene behind the active modal, then an additional16pxonly within the modal's rounded footprint. The region mask follows the modal and source dimensions. - The regional result replaces the corresponding scene pixels. Do not layer another blurred copy over them: duplicate background composition previously caused unwanted darkening in the transparent Electron window.
- Keep modal content, text, and buttons sharp. Do not add
backdrop-filter, saturation filters, opaque fills, ordata-liquid-glass-backdrop="true"to the modal panel or its decorative rear layer. Do not apply the popup background recipe above to modals. - Keep the separate native
::backdropdimming color atrgba(0, 0, 0, 0.16). Only the active modal owns this dimming layer; lower modal backdrops are transparent. Let the shared controller handle nesting, source restoration, and filter cleanup.
Content and controls
- For new confirmation dialogs, explicitly pass
headerVariant="section"andcloseButtonVariant="ghost". This uses the shared section title and ghost circle X button; the component's existing defaults do not imply a ghost button. - Use left-aligned body text and the shared description typography. In the
delete-chat confirmation, place the deletion description and
This cannot be undone.on separate lines; allow further wrapping in narrow windows. Keep the action buttons right-aligned. - Follow ChatDeleteSessionDialog
and its styles for this
confirmation layout. Use the existing
--modal-width,--modal-header-height,--modal-header-padding, and--modal-content-paddingproperties for layout. - Preserve native modal focus containment, Escape/outside-click dismissal, and
focus restoration. Pass
closeDisabledwhile dismissal is blocked, and keep feature actions guarded during pending operations. - Validate shared modal changes with modal blur tests and the affected dialog tests. Follow the repository's authorization rules for rendered development-app review; check foreground sharpness, background color, resizing, nesting, and restoration.
Dropdown menu styles
Use a dropdown menu for actions such as File actions. A Select chooses a value; keep its selection semantics separate from action menus.
Shared modules
| Purpose | Module and usage |
| Action menu | ToolbarMenu: pass label and items (id, label, icon, onSelect, optional disabled, shortcut, separatorBefore). Import directly from its module. It owns the trigger, portal, placement, dismissal, keyboard navigation, and focus restoration. |
| Value dropdown | LiquidGlassSelect, exported from shared/ui: pass ariaLabel, value, options, and onChange. Use menuAppearance="toolbar" for shared toolbar menu styling; choose triggerAppearance, menuPlacement, and menuWidth through its existing props. Preserve its menuitemradio / aria-checked selection semantics. |
| Dropdown trigger only | PillDropdownButton, exported from shared/ui: a pill button with a chevron. It does not provide a popup, positioning, or menu interactions. |
| Specialized nested chat menu | ChatConfigurationMenu and TemporaryChatConfigurationMenu: feature-owned contents and state using the shared panel and menu styles. Preserve root menuitem and submenu listbox / option semantics. |
Reuse these components rather than building another dropdown shell. For specialized
menus, compose ToolbarMenu styles
and use LiquidGlassPanel; keep feature-specific layout and state in the consumer.
LiquidGlassSelect retains its existing default appearance unless
menuAppearance="toolbar" is selected. Its portal stays inside the nearest native
dialog when present; preserve that behavior so modal selects remain interactive.
Apply the shared popup backgrounds above.
Menu contents
- Use the
section-titlestyle for the menu title. - Use
32pxitem heights,var(--font-size-label)(11px) text, andvar(--text)for item text and icons. Keep these consistent across states. - Use
var(--control-surface-ghost)for item backgrounds andvar(--control-surface-interactive)for enabled hover, pressed, and keyboard focus states. Preserve shared disabled behavior. - Retain shared menu keyboard navigation, Escape/outside-click dismissal, and focus restoration to the trigger.
- For behavior changes, run the affected toolbar menu or select tests. For SVG blur integration, include regional blur and affected feature tests. Rendered review follows the repository's UI authorization rules; check open menus and submenus, background transparency, sharp text, placement, and cleanup.
Text styles
Text uses one of the following three styles according to its role.
| Style | Size | Weight | Color |
section-title | var(--font-size-section-title) (10px) | 600 | var(--sidebar-section-label-color) |
description | var(--font-size-small) (10px) | 400 | var(--sidebar-section-label-color) |
setting-label | var(--font-size-label) (11px) | 400 | var(--text) |
- Use
section-titlefor setting groups and section titles. Reuse--font-size-section-titlefor their size; keep--font-size-labelat11pxfor controls and setting labels. - Use
descriptionfor descriptions below titles, help text, and status guidance. - Use
setting-labelfor the names of settings such as switches and sliders. A current value displayed with a setting uses the same style. - Use
var(--font-ui), sans-serifas the shared UI font. - Keep letter spacing at
normal. - Use the specified tokens instead of fixed hexadecimal values for colors.
Settings detail layout
Keep settings detail pages on the shared spacing rhythm used by the Appearance
and Agents views in frontend/src/features/settings/.
- Apply
var(--space-default)as the detail scroll area's inner padding and as the gap between direct form sections. Do not replace this rhythm with feature-specific margins. - Use a flex title row with a
32pxminimum height, centered items,justify-content: space-between, and avar(--space-default)gap. Wrap asection-titlein this row even when it has no trailing action so its text aligns with titles that include a button. - Use a
36pxminimum height for setting and input rows and center their labels and controls vertically. - When a description, loading message, or status belongs to one logical block,
stack those messages vertically with a
var(--space-default)gap instead of letting consecutive text lines collapse together. - Reuse the
section-title,description, andsetting-labelstyles defined above for all text in these rows.
Sidebar navigation items
Classify items that switch views, such as settings categories, as
sidebar-nav-item. Reuse the shared button style with the following
specifications.
Shared specifications
- Use
100%width. - Use a total height of
42pxwithbox-sizing: border-box. - Use no border.
- Use zero border radius.
- Use
var(--icon-button-icon-size)(11px) for both icon dimensions. - Use
var(--font-size-label)(11px) for the font size, with a weight of400. - Use
var(--text)for both text and icon colors. - Preserve the dimensions and text and icon colors in every state.
- Clickable items use
cursor: pointer.
State backgrounds
- Default:
var(--control-surface-ghost)(rgba(41, 52, 61, 0.05)). - Selected:
var(--control-surface)(rgba(41, 52, 61, 0.4)). - Hover and pressed:
var(--control-surface-interactive)(rgba(41, 52, 61, 0.8)).
Mark the currently selected item with aria-current="page". Distinguish the
selected state from the momentary :active pressed state. The hover and
pressed backgrounds take precedence on selected items; restore the selected
background when the interaction ends.
Scrollbars
Apply the same rules to both horizontal and vertical scrollbars in sidebars and editors, including read-only editor views.
- Keep the thickness fixed at
6pxthrough--auto-hide-scrollbar-size: width for vertical scrollbars and height for horizontal scrollbars. - Show the scrollbar immediately on scroll. Each new scroll restarts the
700msidle delay and cancels any fade in progress. - After
700mswithout scrolling, fade the thumb to transparent over240mswithease-out. Keep the track transparent. - Control visibility and fading in the application instead of relying on Chromium or macOS automatic scrollbar behavior.
- Preserve scrollbar dimensions and content spacing while hiding. Do not remove the scrollbar or change its thickness to hide it.
- Under
prefers-reduced-motion: reduce, keep the idle delay and immediate redisplay, but disable the fade animation. - Reuse the shared scrollbar styles
and the activity lifecycle.
React panels use
useAutoHideScrollbars; editor views useinstallAutoHideScrollbarsthrough the CodeMirror extension. Avoid separate feature-specific timers or fade implementations. - Fixed-size scroll containers set
--scrollbar-size: var(--auto-hide-scrollbar-size),scrollbar-width: auto, andscrollbar-color: autoso native styling does not override the shared thickness and thumb colors.
Toggle switches
Use toggle-switch for on/off settings.
Appearance
- Use a
36px × 20pxsize. - Use no border.
- Use a
10pxborder radius. - Use a circular
20px × 20pxthumb invar(--control-thumb-color)(#FFFFFF). - Use
var(--control-track-color)(#A6A6A6) for the off-state background. - Use
var(--toggle-track-on-color)(#18A9CF) for the on-state background. - Preserve the current shape and colors on hover.
- Do not show a focus outline.
Behavior
- Position the thumb on the left in the off state.
- Move the thumb
16pxto the right in the on state. - Animate thumb movement with
transform 160ms ease. - Disable the animation under
prefers-reduced-motion: reduce. - Expose the state with
role="switch"andaria-checked. - Support an associated label and native keyboard interaction.
- Disabled switches use
opacity: 0.5andcursor: not-allowed. - Enabled switches use
cursor: pointer.
Sliders
Use slider for settings that adjust a continuous numeric value.
Appearance
- Use a
200pxwidth and20pxheight for the control. - Apply
max-width: 100%in narrow layouts. - Use a transparent control background.
- Use no border.
- Use a
4pxtrack height with a2pxborder radius. - Use
var(--control-track-color)(#A6A6A6) for the default track. - Use
var(--control-track-hover-color)(#B8B8B8) for the hovered track. - Use a circular
20px × 20pxthumb invar(--control-thumb-color)(#FFFFFF). - Center the thumb vertically on the track.
- Use one color across the full track. Do not add a separate filled color for the completed portion.
- Do not show a focus outline.
Behavior
- Use a native
input[type="range"]to preserve keyboard interaction. - Define the minimum, maximum, and unit for each setting.
- During dragging, move the thumb immediately with the input position and do not add a movement animation.
- Display the current value with the associated setting label.
- Disabled sliders use
opacity: 0.5andcursor: not-allowed. - Enabled sliders use
cursor: pointer.
Labels for toggle switches and sliders follow the setting-label
specification. All dimensions use CSS pixels rather than physical pixels from a
screenshot.
Input field styles
Reuse the shared input component for single-line input fields and apply the following specifications.
Shared specifications
- Use a total height of
32pxwithbox-sizing: border-box. - Use no border.
- Use a pill shape with
border-radius: 999px. - Use
var(--font-ui), sans-serifas the font. - Use
var(--font-size-label)(11px) for the font size, with a weight of400. - Use
var(--text)(#D3E2DE) for the text color. - Use the same color for placeholder text with
opacity: 0.4. - Use the
textcursor in the editable input area. - Do not show a focus outline.
State backgrounds
- Default:
var(--control-surface)(rgba(41, 52, 61, 0.4)). - Hover, focus, and pressed:
var(--control-surface-interactive)(rgba(41, 52, 61, 0.8)).
Preserve the height, border, corner shape, font size, and text color in every state. Do not translate or scale an input when it is clicked. Apply transparency only to the background; do not reduce the opacity of the entire input. Preserve the shared component's disabled treatment and do not apply interaction effects while disabled. Multiline inputs use separate height and corner specifications.
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.

