Create or refactor Vue 3 composables (use* functions) in src/composables/. Use when building shared reactive logic, migrating legacy manual-fetch composables to TanStack Query, deciding between a composable and a Pinia store, or structuring type exports. Covers the modern useQuery pattern and how to recognise the old pattern that must not be replicated.
Write new API calls, server-state queries, or mutations in this project. Use when adding useQuery, useMutation, ubusCall, or migrating manual loading/error refs to TanStack Query. Covers query keys, typed responses, invalidation, pagination with keepPreviousData, and the legacy patterns to recognise and replace.
Build forms, validate user input, handle submit actions, or display field errors. Use when writing valibot schemas, wiring up MessageBag, handling ValidationError from ubusCall, or building a form submit flow with useMutation. Covers all project validation helpers (IP, hostname, MAC, CIDR, etc.) and the correct pattern for resetting state.
Write or review Vitest unit tests in this project. Use when adding tests for lib utilities, valibot schemas, composables, or validation helpers. Covers TDD approach, meaningful test design (edge cases, pitfalls), what not to test, mocking ubusCall, and test file location conventions.
Write TypeScript in this project correctly. Use when defining types for API responses, avoiding any, typing props/emits/refs, using generics with ubusCall, or fixing ESLint TypeScript warnings. Covers clean ESLint-compliant patterns without suppression comments.
Write, edit, or review Vue 3 components and views in this project. Use for creating new components, fixing template issues, applying Ne* component library, handling props/emits, i18n strings, loading/error state, and icon usage. Covers script setup patterns, typed props, Ne component substitutions, and anti-patterns to avoid.