AlexandrAI AGENTS.md
agents-md

AlexandrAI Tools Meeting Planner Agent Guide

Agent guide for computing working-hour overlap across multiple IANA time zones.

AGENTS.md

Guidance for coding agents working on AlexandrAI Tools Meeting Planner in the alexandrai-tools project.

Project overview

This guide covers src/tools/meeting-planner/index.ts. The tool defines default zones, computes local hours for an epoch in each zone with Intl.DateTimeFormat, marks hours as working when localHour is at least nine and less than seventeen, and scans UTC hours zero through twenty-three for a date where every zone is working.

Primary source files

  • src/tools/meeting-planner/index.ts defines meta, DEFAULT_ZONES, ZoneHour, getZoneHours, and overlapHours.
  • src/tools/meeting-planner/index.test.ts covers New York, London, Tokyo, multiple-zone order, lower and upper working-hour boundaries, UTC overlap, New York and London overlap, impossible overlaps, invalid dates, and zoneHours length.
  • src/tools/meeting-planner/Body.astro owns browser controls.
  • src/tools/meeting-planner/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

  • Use Intl.DateTimeFormat for local-hour extraction.
  • Preserve input zone order in getZoneHours.
  • Treat working hours as localHour >= 9 and localHour < 17.
  • Scan each UTC hour from 0 through 23 for overlapHours.
  • Return an empty array for invalid date strings.
  • Require every zone to be working for a candidate hour.
  • If custom work hours are added, keep current 9 to 17 default behavior stable.

Testing

Test individual local hours, working-hour boundaries, multiple-zone ordering, UTC-only overlap, two-zone overlap, no-overlap cases, invalid dates, DST dates, empty zone lists, custom work hours if added, and UI display of candidate UTC hours.

PR checklist

  • npm test passes for meeting-planner.
  • Timezone, date, and cycle assumptions remain documented.
  • Invalid-input behavior is covered by tests.
  • UI labels, metadata, and pure logic stay in sync.