diff --git a/.agents/skills/wefa-vue-cookbook/SKILL.md b/.agents/skills/wefa-vue-cookbook/SKILL.md new file mode 100644 index 00000000..8412e9c8 --- /dev/null +++ b/.agents/skills/wefa-vue-cookbook/SKILL.md @@ -0,0 +1,78 @@ +--- +name: wefa-vue-cookbook +description: Shared cookbook of conventions for writing Vue code with the WeFa ecosystem. Use it first in product apps that consume `@nside/wefa`, and also use it inside the WeFa `vue/` package for the shared rules that apply there too. It covers architecture and layout conventions, WeFa versus PrimeVue reuse decisions, i18n expectations, validation planning, and TanStack Query Vue v5 usage including wrapper choice, query keys, invalidation, optimistic updates, and v5 migration pitfalls. +--- + +# WeFa Vue Cookbook + +This is the shared Vue skill for WeFa. + +Use it in two situations: + +1. In consuming Vue projects that use `@nside/wefa`. +2. Inside the WeFa `vue/` package for the shared conventions that also apply to the library itself. + +When the task is inside the WeFa `vue/` package, pair this skill with `wefa-vue-frontend`, which is the maintainer skill for repo-specific export, docs, demo, generated-artifact, and quality-gate work. + +Use this skill in two layers: + +1. Keep this `SKILL.md` loaded for the always-on rules. +2. Load only the matching reference file when the task needs deeper checks. + +## Always-Loaded Rules + +1. Treat `@nside/wefa` as a PrimeVue superset styled through Tailwind 4 with `tailwindcss-primeui`. +2. Follow the reuse hierarchy strictly: **WeFa component/container -> PrimeVue composition -> native HTML fallback**. +3. Start by mirroring the nearest existing local pattern before inventing a new abstraction, prop API, fetch flow, or styling approach. +4. Before adding helpers or infrastructure, check whether the current app, WeFa, or PrimeVue already provides the needed building block. +5. Keep user-facing text translated through i18n keys, including labels, placeholders, validation copy, `aria-label`, and `title`. +6. Prefer Tailwind utilities for routine styling. Use flex by default for layout, reach for grid when it clearly fits better, and do not add new CSS imports or routine `