Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(agent-guidance): preserve migrated frontend rules (R1-B1)

Josué7abd06f83c99
diff --git a/desktop-app/ui/docs/STYLE_STANDARDIZATION.md b/desktop-app/ui/docs/STYLE_STANDARDIZATION.md
index 3b7d8bcc0..c5f328cd6 100644
--- a/desktop-app/ui/docs/STYLE_STANDARDIZATION.md
+++ b/desktop-app/ui/docs/STYLE_STANDARDIZATION.md
@@ -148,7 +148,8 @@ Never hardcode `700`, `0.06em`, `11px`, or `var(--font-size-xs)` / `var(--text-d
## 4. Common Controls — Use Them
-Imports come from `@components/Common`. The exported set is fixed:
+Imports come from `@components/Common`. The established form and status
+primitives include:
| Primitive | Key API |
| -------------- | ---------------------------------------------------------------- |
@@ -227,6 +228,8 @@ What it catches today (errors block the commit):
- `da-no-hex-in-css` — hex literal in any CSS file outside `tokens.css` and the 3 legacy files.
- `da-no-raw-font-size` — `font-size: 13px` / `1rem` outside `tokens.css`. Use one of `var(--font-size-{2xs|xs|sm|md|lg|xl|2xl|3xl|4xl})`.
- `da-no-new-component-css` — new `.css` files under `src/` other than the 5 allowlisted ones.
+- `da-no-hover-motion` — non-`none` `transform` or `filter` declarations in
+ Desktop `:hover` blocks. Use background, border, text color, or shadow.
Plus two warn-level checks (listed but don't block):
@@ -264,6 +267,9 @@ To extend rules or add coverage to control-ui / profile-ui, edit
and the full rule set is ~200 lines of readable JS — see
`scripts/style-rules/README.md`.
+Keep this document synchronized with the checker. Do not add an enforcement
+rule without documenting its behavior and scope here.
+
## 8. Anti-patterns to avoid
- New CSS files at component level (`.module.css` or sibling `.css` to a `.tsx`). The three legacy ones are the exception, not a precedent.
diff --git a/docs/agents/control-ui-rules.md b/docs/agents/control-ui-rules.md
index 28f483fa3..a01be4db8 100644
--- a/docs/agents/control-ui-rules.md
+++ b/docs/agents/control-ui-rules.md
@@ -12,6 +12,7 @@ These provider-neutral rules apply only to `control-ui/**`. Combine them with
- Use the `cu-` prefix for shared utility classes.
- Reusable components live under `components/` in folders with `index.tsx` and
colocated support such as `types.ts`.
+- Reusable configuration constants live under `app/constants/`.
- Reuse the primitives exported by `components/ui/index.tsx`: `Button`,
`Field`, `TextInput`, `SelectInput`, `TextAreaInput`, `CheckboxField`, and
`FormSection`.
@@ -36,8 +37,9 @@ These provider-neutral rules apply only to `control-ui/**`. Combine them with
Disable header CTAs during initial loading, and let only the content pane
scroll when rows overflow.
- Use `CreatePageHeader` plus `cu-create-panel`, `cu-create-content`, and
- `cu-create-actions` for full-screen create/install pages. Use `<h2>` for the
- create-page heading.
+ `cu-form-grid` for full-screen create/install pages. Put Cancel in a ghost
+ button and Submit in a primary button inside `cu-create-actions`. Use `<h2>`
+ for the create-page heading.
- Wrap auth-gated pages in `<AuthGate>`.
- Reserve `cu-modal-panel` for overlay/dialog contexts. Modal panel headings use
`<h3>`; table panel labels are not headings.
diff --git a/docs/agents/desktop-ui-rules.md b/docs/agents/desktop-ui-rules.md
index c631b69b8..81c21f7a0 100644
--- a/docs/agents/desktop-ui-rules.md
+++ b/docs/agents/desktop-ui-rules.md
@@ -5,11 +5,12 @@ with [`frontend-style-rules.md`](./frontend-style-rules.md) and
[`../../desktop-app/ui/docs/STYLE_STANDARDIZATION.md`](../../desktop-app/ui/docs/STYLE_STANDARDIZATION.md).
They do not apply to `desktop-app/**` outside `ui/**`. Electron main-process,
-preload, IPC, and shared scripts follow the repository-wide TypeScript/Node and
-Desktop security guidance, not renderer styling or page-layout rules.
+preload, IPC, and shared scripts follow the repository-wide guidance and their
+existing local contracts, not renderer styling or page-layout rules.
## Navigation
+- Reusable configuration constants live under `src/constants/`.
- Import top-level and nested in-memory destinations from
`src/constants/navigation.ts`.
- Never inline Desktop route IDs in navigation handlers, comparisons, sidebar
diff --git a/docs/agents/frontend-style-rules.md b/docs/agents/frontend-style-rules.md
index e87608c3a..11e039195 100644
--- a/docs/agents/frontend-style-rules.md
+++ b/docs/agents/frontend-style-rules.md
@@ -40,6 +40,7 @@ being changed:
- Prefer existing tokens for spacing, radii, font sizes, shadows, and motion.
Add a scoped token only when no existing token fits; promote it to the
application's token file only when it is shared.
+- Use the application's spacing scale instead of introducing raw `rem` values.
- Put token declarations and shared CSS classes/layout in the files below.
Token files declare values; shared-style files own reusable selectors.
@@ -53,6 +54,8 @@ being changed:
- Prefer a named CSS class over inline style. Inline style is reserved for
values that are genuinely computed at runtime; an application's narrower
guidance may restrict this further.
+- Use CSS classes for table and column width or alignment when responsive
+ styles need to override those values.
## Components and controls
@@ -61,6 +64,9 @@ being changed:
variant-driven buttons from the target application's established primitives.
- Keep primitive APIs narrow and behavior-oriented. Consolidate cosmetic-only
variants rather than building an oversized component.
+- Express behaviorally distinct button styles through the application's
+ established variants, such as `primary`, `secondary`, `ghost`, or `danger`,
+ rather than duplicating button markup.
- Reusable components and route-section components should use the target
application's established folder convention. Keep related `types.ts`,
`constants.ts`, and other support files beside the component.
@@ -82,10 +88,11 @@ being changed:
warnings, errors, or information that must remain visible while the user
acts.
- Use stable React keys for lists that can reorder or remove items. Never use
- an array index for those lists.
+ an array index for those lists; use a UUID assigned at creation or a natural
+ unique identifier from the data.
- Give every non-input interactive element a token-based `:focus-visible`
- treatment. Use `:focus-visible`, not `:focus`, so mouse clicks do not show a
- keyboard focus ring.
+ treatment with an appropriate offset. Use `:focus-visible`, not `:focus`, so
+ mouse clicks do not show a keyboard focus ring.
- Maintain a meaningful heading hierarchy and avoid multiple `<h1>` elements
on one page. Follow the application's canonical page and modal heading
levels.
diff --git a/docs/agents/profile-ui-rules.md b/docs/agents/profile-ui-rules.md
index 7b85353e1..d8269affc 100644
--- a/docs/agents/profile-ui-rules.md
+++ b/docs/agents/profile-ui-rules.md
@@ -13,6 +13,7 @@ These provider-neutral rules apply only to `profile-ui/**`. Combine them with
- Components and primitives remain colocated under `app/components/` in
folders with `index.tsx` and colocated support such as `types.ts`. Do not
migrate Profile UI to Control UI's `components/ui/` structure.
+- Reusable configuration constants live under `app/constants/`.
- Reuse Profile UI's existing primitives, including `Button`, `TextInput`,
`SelectControl`, `FormField`, and `EditableList`.
@@ -30,8 +31,10 @@ These provider-neutral rules apply only to `profile-ui/**`. Combine them with
## Page patterns
-- Use Profile UI's existing `AuthGate`, `CreatePageHeader`, create-panel,
- form-grid, and action-footer patterns for authenticated create/install flows.
+- Use Profile UI's existing `AuthGate`, `CreateFlowPanel`, `CreatePageHeader`,
+ `CreateStepFlow`, `cu-agent-form-stack`, and `cu-create-actions` patterns for
+ authenticated create/install flows. Put Cancel or Back in a ghost button and
+ the primary continuation or submit action in the default primary button.
- Full-screen create/install headings use `<h2>`. Modal panel headings use
`<h3>`; table or panel labels are not headings.
- Reserve `cu-modal-panel` for overlay/dialog contexts rather than full-screen