learning_ai_clock/.github/copilot-instructions.md
2026-03-05 14:37:31 -08:00

1.6 KiB

GitHub Copilot Instructions — ChronoMind

For full agent instructions, read AGENTS.md at the repo root.

Project Context

ChronoMind — AI-Powered Contextual Clock & Timer. Stack: Next.js 16 (web) + SwiftUI (iOS/Watch/Mac) + Jetpack Compose (Android) + Fastify 5 (backend)

Code Generation Rules

Always

  • Web engine logic in web/src/lib/ — pure TS, no React imports
  • Components in web/src/components/ — React UI only
  • iOS shared logic in ios/ChronoMind/Shared/ — consumed by all Apple targets
  • Android engine in android/.../engine/ — pure Kotlin, no Android framework deps
  • Web build: must use --webpack flag (Serwist incompatible with Turbopack)
  • Every Cosmos doc: productId: "chronomind"
  • Theme: --cm-* CSS custom properties (web), ChronoMindTheme (native)
  • Include productId: "chronomind" in every Cosmos DB document
  • Use type(scope): description commit message format
  • Fix source code, not tests (unless the test itself is wrong)

Never

  • console.log or print() in production code
  • Hardcoded secrets, API keys, colors, or URLs
  • Delete existing comments or documentation unless explicitly asked
  • Add emojis unless asked

Key Paths

  • web/src/lib/ — Pure TS engine modules (timer, cascade, urgency, nl-parser, etc.)
  • web/src/components/ — React UI components
  • ios/ChronoMind/Shared/ — Shared Swift code (iOS + Watch + Mac + Widgets)
  • android/app/.../engine/ — Pure Kotlin engine
  • backend/ — Fastify 5 + TypeScript backend (port 4011)

Build Verification

cd web && npm test && npm run typecheck && npm run build