AGENTS.md
Guidance for coding agents working on AlexandrAI Tools CSS Text Shadow Generator in the alexandrai-tools project.
Project overview
This guide covers src/tools/css-text-shadow-generator. buildTextShadow formats horizontal offset, vertical offset, blur radius, and color into a CSS text-shadow value. textShadowCss wraps that value as a full text-shadow declaration. Body.astro uses the helper for preview and copy output.
Primary source files
- src/tools/css-text-shadow-generator/index.ts defines meta, TextShadowParams, buildTextShadow, and textShadowCss.
- src/tools/css-text-shadow-generator/index.test.ts covers basic shadow output, negative offsets, zero blur, zero offsets, and declaration wrapping.
- src/tools/css-text-shadow-generator/Body.astro owns offset controls, blur control, color input, preview update, CSS output, and copy behavior.
- src/tools/css-text-shadow-generator/i18n.ts owns localized labels.
- src/lib/tools.ts registers the tool metadata.
Setup commands
npm install npm test npm run typecheck npm run build npm run dev
Change rules
- Emit x offset in px.
- Emit y offset in px.
- Emit blur radius in px.
- Preserve the provided CSS color string.
- Allow negative offsets.
- Allow zero blur and zero offsets.
- Use the same helper for preview and copied CSS.
Testing
Test positive offsets, negative offsets, zero offsets, zero blur, color formats, declaration wrapping, preview style synchronization, copy behavior, and UI input bounds.
PR checklist
- npm test passes for css-text-shadow-generator.
- Pure helper behavior and browser UI behavior are aligned.
- Generated CSS, Markdown, JSON, or image output remains browser-local.
- Invalid input, copy behavior, and privacy expectations are covered.