feat(backend): add v2 LLM validation fields to health service
- DashboardHealthItem schema: add run_id, policy_id, execution_path, issues_count, timings, token_usage, screenshot_paths, chunk_count, dashboard_name fields for v2 LLM validation reporting. - HealthService: populate v2 fields from validation run records. - ValidationService: update to support v2 validation run fields. - validation_tasks route: minor fix for v2 field handling. - tailwind.config.js: refactor design tokens — add success/warning/info palettes, surface/border/text hierarchy, semantic action colors. - Agent configs: update svelte-coder and semantics-svelte for .svelte.ts runes and Screen Model patterns.
This commit is contained in:
@@ -48,13 +48,14 @@ See `semantics-core` §VI for the canonical tool reference. For Svelte frontend
|
||||
## ss-tools Frontend Scope
|
||||
You own:
|
||||
- SvelteKit routes (`frontend/src/routes/`)
|
||||
- Svelte 5 components (`frontend/src/lib/components/`)
|
||||
- Svelte 5 components (`frontend/src/lib/components/` — **only directory for NEW domain components**)
|
||||
- **UI atoms** (`frontend/src/lib/ui/` — Button, Card, Input, Select, PageHeader, Icon, HelpTooltip, LanguageSwitcher)
|
||||
- **Screen Models** (`frontend/src/lib/models/` — `[TYPE Model]` contracts for screen-level state)
|
||||
- Svelte stores (`frontend/src/lib/stores/`)
|
||||
- API client layer (`frontend/src/lib/api/`)
|
||||
- i18n localization (`frontend/src/i18n/`)
|
||||
- Pages, layouts, and services
|
||||
- Tailwind-first UI implementation
|
||||
- Tailwind-first UI implementation (semantic tokens ONLY — no raw blue-600, gray-*, indigo-*)
|
||||
- UX state repair and route-level behavior
|
||||
- Browser-driven acceptance for frontend scenarios
|
||||
- Screenshot and console-driven debugging
|
||||
@@ -64,6 +65,9 @@ You do not own:
|
||||
- Backend-only implementation unless explicitly scoped
|
||||
- Semantic repair outside the frontend boundary unless required by the UI change
|
||||
|
||||
### Frozen zones (LEGACY — migrate away, do NOT add)
|
||||
- `frontend/src/components/` — legacy component directory. **Do not create new files here.** All new domain components go in `lib/components/<domain>/`.
|
||||
|
||||
## Required Workflow
|
||||
1. **Discover or create the Model first.** For any screen with cross-widget state:
|
||||
- grep `@semantics.*<keyword>` across `frontend/src/` to find existing models
|
||||
@@ -107,13 +111,25 @@ For frontend design and implementation tasks, default to these rules unless the
|
||||
- Prefer whitespace, alignment, scale, and contrast before adding chrome.
|
||||
- Default to cardless layouts; use cards only when a card is the actual interaction container for a specific resource (Dashboard, Dataset, Task).
|
||||
|
||||
### Visual system (ss-tools design tokens)
|
||||
- Primary: `blue-600` / `blue-700` (buttons, links, accents)
|
||||
- Success: `green-500` / `green-600`
|
||||
- Error: `red-500` / `red-600`
|
||||
- Warning: `amber-400` / `amber-500`
|
||||
- Background: `gray-50` (page), `white` (cards/surfaces)
|
||||
- Text: `gray-900` (primary), `gray-500` (muted)
|
||||
### Visual system (ss-tools design tokens — source: `tailwind.config.js`)
|
||||
**Raw Tailwind colors (`blue-600`, `green-500`, `red-600`, `gray-*`, `indigo-*`) are DEPRECATED in page and component code.** Use ONLY these semantic tokens:
|
||||
|
||||
- Primary action: `bg-primary text-white hover:bg-primary-hover` (maps to blue-600/700)
|
||||
- Destructive action / error: `bg-destructive text-white`, `bg-destructive-light text-destructive border-destructive-ring`
|
||||
- Page background: `bg-surface-page`
|
||||
- Card surface: `bg-surface-card`
|
||||
- Muted surface: `bg-surface-muted`
|
||||
- Default border: `border-border`; strong border (inputs): `border-border-strong`
|
||||
- Primary text: `text-text`; muted text: `text-text-muted`; subtle text (placeholders): `text-text-subtle`
|
||||
- Success: `text-success bg-success-light border-success-*`
|
||||
- Warning: `text-warning bg-warning-light border-warning-*`
|
||||
- Info: `text-info bg-info-light border-info-*`
|
||||
|
||||
### UI component reuse (MANDATORY)
|
||||
- **Page-level UI MUST use `$lib/ui` atoms:** `<Button>`, `<Card>`, `<Input>`, `<Select>`, `<PageHeader>`. Raw `<button>` and manual `<div class="bg-white rounded...">` in page files is a violation unless there is a documented exception.
|
||||
- **`src/components/` is LEGACY FROZEN.** Do not create new files there. Do not extend it. New domain components go in `src/lib/components/<domain>/`.
|
||||
- **`migration/+page.svelte`** is the state architecture reference (model-first with thin component) but NOT the visual reference — it still has legacy raw colors and manual buttons. Use the canonical template in `semantics-svelte` §VI for visual patterns.
|
||||
- **Button variant naming:** Use `"destructive"` (canonical). `"danger"` is a deprecated alias — prefer `"destructive"`.
|
||||
|
||||
### ss-tools specific pages
|
||||
- **Dashboard Hub** — Git-tracked dashboards with status badges
|
||||
|
||||
Reference in New Issue
Block a user