AlexandrAI AGENTS.md
agents-md

AlexandrAI Tools Lorem Ipsum Agent Guide

Agent guide for deterministic placeholder words, sentences, and paragraphs with classic-start option.

AGENTS.md

Guidance for coding agents working on AlexandrAI Tools Lorem Ipsum in the alexandrai-tools project.

Project overview

This guide covers src/tools/lorem-ipsum/index.ts. The tool resets a deterministic pseudo-random seed on every generateLorem call, clamps count to one through two hundred, generates words, sentences, or paragraphs from a fixed word pool, and can replace or prefix the output with the classic lorem ipsum opening.

Primary source files

  • src/tools/lorem-ipsum/index.ts defines meta, LoremUnit, WORD_POOL, rand, resetSeed, randomWord, makeSentence, makeSentences, makeParagraph, clamp, CLASSIC_START, and generateLorem.
  • src/tools/lorem-ipsum/index.test.ts covers exact word count, sentence count, paragraph count, startClassic for all units, and count clamping.
  • src/tools/lorem-ipsum/Body.astro owns browser controls.
  • src/tools/lorem-ipsum/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

  • Reset seed at the start of generateLorem.
  • Clamp count to one through two hundred.
  • Generate word mode as exactly count words.
  • Generate sentence mode as exactly count sentences.
  • Generate paragraph mode as count paragraphs separated by blank lines.
  • For startClassic in word mode, use the classic opening words then trim to count.
  • For startClassic in paragraph mode, prefix the first paragraph with the classic opening.

Testing

Test each unit, count clamp low and high, deterministic output, startClassic for words, sentences, and paragraphs, paragraph separators, sentence punctuation, empty or invalid unit handling if added, and UI copy behavior.

PR checklist

  • npm test passes for lorem-ipsum.
  • Generated output shape, escaping, and invalid-input behavior remain documented.
  • Browser-local generation stays free of hidden network calls.
  • UI labels, metadata, and tests update together for behavior changes.