AGENTS.md
Guidance for coding agents working on the AlexandrAI Tools i18n shell.
Project Overview
The i18n shell separates shared UI labels from tool-specific content. Locale routing keeps English at root paths and prefixes non-default locales. Each converted tool provides its own i18n.ts strings while the shared shell handles category labels, trust messages, footer labels, and related/popular headings.
Project Map
- src/lib/i18n.ts defines LOCALES, DEFAULT_LOCALE, LOCALE_NAMES, localePath(), t(), alternatesFor(), and categoryName().
- src/pages/[lang]/index.astro renders localized hubs.
- src/pages/[lang]/tools/[slug].astro renders localized tool pages.
- src/components/Header.astro, Footer.astro, Hub.astro, and ToolChrome.astro consume shared shell labels.
- src/tools/*/i18n.ts files provide per-tool localized title, description, lede, and about content.
Setup Commands
bashnpm run typecheck
npm run build
Change Rules For Agents
- Keep LOCALES as the source of supported locale ids.
- Keep English as the default root route.
- Use localePath() for all internal localized links.
- Add category translations when introducing a new category.
- Keep tool-specific translations in each tool folder.
- Fall back to English strings when a localized tool string is missing.
- Keep hreflang alternates generated from LOCALES.
- Avoid mixing archive or deployment metadata into user-facing translation strings.
Verification
bashnpm run typecheck
npm run build
Check at least one default-locale path and one non-default locale path after routing changes. Confirm related tool links stay within the selected locale.
Security Notes
Translation strings are public. Do not include private URLs, hidden launch plans, credentials, local paths, or sensitive customer examples in locale dictionaries.
PR Checklist
- Locale ids are valid and consistent.
- Default route has no locale prefix.
- Non-default routes are prefixed.
- Category labels are translated or safely fall back.
- Build succeeds.