AGENTS.md
Guidance for coding agents working on AlexandrAI Tools Caesar Cipher in the alexandrai-tools project.
Project overview
This guide covers src/tools/caesar-cipher/index.ts. The tool normalizes any shift into the zero through twenty-five range, shifts uppercase and lowercase ASCII letters independently, leaves non-letters unchanged, and exposes rot13 as Caesar shift thirteen.
Primary source files
- src/tools/caesar-cipher/index.ts defines meta, caesar, and rot13.
- src/tools/caesar-cipher/index.test.ts covers positive shifts, wrapping, ROT13, decode by inverse shift, non-letter passthrough, identity shifts, mixed case, negative shifts, and ROT13 round trips.
- src/tools/caesar-cipher/Body.astro owns browser controls.
- src/tools/caesar-cipher/i18n.ts owns localized copy.
- src/lib/tools.ts registers metadata.
Setup commands
npm install npm test npm run typecheck npm run build npm run dev
Change rules
- Normalize shifts with modulo twenty-six.
- Keep uppercase letters in uppercase output.
- Keep lowercase letters in lowercase output.
- Leave non-letters unchanged.
- Keep rot13 as caesar(text, 13).
- Do not present Caesar or ROT13 as secure encryption.
- If non-ASCII alphabets are added, keep current ASCII behavior tested.
Testing
Test wrapping, negative shifts, large shifts, shift zero, shift twenty-six, mixed case, punctuation, digits, spaces, ROT13 self-inverse behavior, and decode by inverse shift.
PR checklist
- npm test passes for caesar-cipher.
- Encoding, decoding, and failure behavior remain documented.
- Browser-local processing and security limits stay clear in UI copy.
- UI labels, metadata, and tests update together for behavior changes.