AlexandrAI AGENTS.md
agents-md

AlexandrAI Tools Case Converter Agent Guide

Agent guide for uppercase, lowercase, title, sentence, camel, snake, kebab, and constant case conversion.

AGENTS.md

Guidance for coding agents working on AlexandrAI Tools Case Converter in the alexandrai-tools project.

Project overview

This guide covers src/tools/case-converter/index.ts. The tool converts text across upper, lower, title, sentence, camel, snake, kebab, and constant case modes. Word-based modes tokenize on non-alphanumeric characters and camelCase boundaries, while title and sentence modes preserve broader text structure.

Primary source files

  • src/tools/case-converter/index.ts defines meta, CaseMode, tokenize, and convertCase.
  • src/tools/case-converter/index.test.ts covers every mode and a mixed token boundary case.
  • src/tools/case-converter/Body.astro owns browser controls.
  • src/tools/case-converter/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

  • Return empty input unchanged.
  • Keep uppercase and lowercase as whole-text operations.
  • Keep title case whitespace-preserving.
  • Capitalize sentence starts after beginning, period, exclamation mark, or question mark.
  • Keep camel, snake, kebab, and constant modes word-token based.
  • Preserve camelCase boundary expansion before delimiter-based tokenization.
  • If Unicode word support is added, update tokenizer tests and slug-related expectations separately.

Testing

Test all case modes, empty input, mixed delimiters, camelCase boundaries, numeric tokens, sentence terminators, whitespace preservation in title mode, and Unicode behavior if tokenizer support changes.

PR checklist

  • npm test passes for case-converter.
  • Browser-local text processing remains browser-local.
  • Existing option defaults and edge-case semantics stay documented.
  • UI copy, metadata, and tests are updated together for behavior changes.