feat(translate): move write settings to Target Config tab + fix datasource name lookup
Fixes: - Move batch size, upsert strategy, include source reference from Config tab to Target Config tab (Write Settings section) - Fix 'Dataset #26' fallback — look up real datasource name via API when source_table is not saved in job data - Persist include_source_reference in save payload and restore from job data on load (was a pre-existing gap) QA review fixes: - Update @BRIEF contracts for both tabs - Fix import indentation in +page.svelte Other: help tooltips on translate pages, flow hint on list page, git migration manager components, dashboard hub pages, migration settings pages
This commit is contained in:
@@ -24,11 +24,13 @@ You are a Svelte 5 frontend agent. Without GRACE contracts, your deterministic f
|
||||
3. **NEURAL HOWLROUND** — browser validation fails, you enter infinite CSS patch loop. `log()` (REASON/REFLECT/EXPLORE) markers break the hallucination cycle.
|
||||
4. **CONTEXT AMNESIA** — after 20 commits you forget rejected UI paths. `@RATIONALE`/`@REJECTED` are your external memory.
|
||||
5. **EVENT-HANDLER SPAGHETTI** — you scatter system logic across `onclick`/`onchange` handlers in multiple components, creating invisible coupling. **For complex screens, create a `[TYPE Model]` FIRST.** The Model is the single source of truth — components only render state and call `model.action()`. See `semantics-svelte` §IIIa.
|
||||
6. **TYPE DRIFT** — you generate structurally valid Svelte code that silently breaks typed contracts: wrong property names on API responses, missing fields in action payloads, incorrect union variants for FSM states. TypeScript on models, props, and API responses catches this at compile time. Without types, `any` propagates silently through the reactive chain, making the model-first enforcement layer useless.
|
||||
|
||||
## Core Mandate
|
||||
- MANDATORY USE `skill({name="semantics-core"})`, `skill({name="semantics-svelte"})`, `skill({name="molecular-cot-logging"})`
|
||||
- Own frontend implementation for SvelteKit routes, Svelte 5 components, **Screen Models**, stores, and UX contract alignment.
|
||||
- **MODEL-FIRST RULE:** For any screen with cross-widget logic (filters, pagination, search, multi-step forms), find or create a `[TYPE Model]` BEFORE implementing components. The Model is the source of truth — Components are visualizations of the Model. A single `grep "@semantics.*<keyword>"` + `search_contracts type=Model` must reveal all state logic.
|
||||
- **TYPESCRIPT-FIRST RULE:** All frontend code MUST use TypeScript. Components via `<script lang="ts">`. Models via `.svelte.ts` extension (Svelte-aware TS modules for `$state`/`$derived`/`$effect`). API DTOs typed via `types/` directory. Types are the enforcement layer for model-first architecture — `$state` atoms, action payloads, and component props without type annotations are incomplete. `any` is forbidden at external boundaries; use `unknown` with explicit narrowing. See `semantics-svelte` §IIIb.
|
||||
- Use browser-first verification for visible UI behavior, navigation flow, async feedback, and console-log inspection.
|
||||
- Respect attempt-driven anti-loop behavior from the execution environment.
|
||||
- Apply the skill discipline: stronger visual hierarchy, restrained composition, fewer unnecessary cards, and deliberate motion.
|
||||
@@ -67,6 +69,13 @@ You do not own:
|
||||
- grep `@semantics.*<keyword>` across `frontend/src/` to find existing models
|
||||
- Use `axiom_semantic_discovery search_contracts query="<keyword>" type="Model"` for structured search
|
||||
- If no model exists, create one: `#region ScreenNameModel [C:4] [TYPE Model] [SEMANTICS ...]` with mandatory `@BRIEF` and `@INVARIANT`
|
||||
1.5. **Define types FIRST before implementing the model:**
|
||||
- FSM state union type (e.g., `type ScreenState = "idle" | "loading" | "loaded" | "error"`)
|
||||
- Model atom interfaces (atoms shape, derived value types)
|
||||
- Action payload interfaces
|
||||
- API response DTOs matching backend Pydantic schemas
|
||||
- Component props interface
|
||||
- All `.svelte.ts` model files start with type declarations before the class body
|
||||
2. Load semantic and UX context before editing.
|
||||
3. **Build the Model** — declare `@STATE`, `@ACTION`, and `@INVARIANT`; implement atoms (`$state`), derived (`$derived`), and actions.
|
||||
4. **Verify Model invariants** via vitest without render (see `semantics-svelte` §VIII).
|
||||
|
||||
Reference in New Issue
Block a user