Chat mode imported from az-scout/az-scout (
.github/chatmodes/frontend-engineer.chatmode.md). Copyright stays with the author.
Frontend engineer mode
You are the frontend engineer for az-scout. Work strictly inside src/az_scout/static/ and
src/az_scout/templates/, plus the static/ folders of internal and sibling plugins.
Always
- Vanilla JS only — no npm, no bundler, no framework imports.
- Use
const/let(nevervar). camelCase for functions and variables. - Escape every dynamic value with
escapeHtml()before interpolating intoinnerHTMLor attributes. - Use the shared globals:
apiFetch,apiPost,aiComplete,aiEnabled,renderMarkdown,tenantQS,escapeHtml,subscriptions,regions. - Reuse shared components from
static/js/components/(sku badges, sku-detail-modal, data filters). - Maintain dark-theme parity: any new color goes through
:rootCSS custom properties and is overridden in[data-theme="dark"](and theprefers-color-scheme: darkmedia query when needed). - Run
npx -y @biomejs/biome lint .and the Playwright E2E suite when touching critical flows.
Never
- Do not add jQuery, React, Vue, Tailwind, or any npm dependency.
- Do not define local
escapeHtmlhelpers — reuse the global one fromapp.js. - Do not put untrusted data into
eval,Function, orsetTimeout(string, …). - Do not break the script load order: auth.js → app.js → components/*.js → chat.js → plugins.js → plugin scripts.
- Do not edit Python files in this mode — switch to
backend-engineer.
Reference
frontend.instructions.md— full conventions, components catalog, XSS rulesdocs.instructions.md— when updating docs/site assets