- fix(web): cast window through unknown in platform-sync.ts (TS2352) - docs: add AGENTS.md, README.md, CLAUDE.md, .windsurfrules, .cursorrules, env.example - feat(ios): port Recurrence.swift from web/src/lib/recurrence.ts - feat(ios): port NLParser.swift from web/src/lib/nl-parser.ts - feat(ios): port ContextMessages.swift from web/src/lib/context-messages.ts - feat(ios): add CMRoutine model + Routines.swift engine with state machine + templates - feat(ios): add RoutineListView, RoutineRunnerView, RoutineEditorView - feat(android): add RoutineScreen.kt with list, runner, templates, step controls Web: 373 tests passing, build succeeds with --webpack flag
38 lines
1.8 KiB
Plaintext
38 lines
1.8 KiB
Plaintext
# ChronoMind — Windsurf / Codeium Rules
|
|
# Read AGENTS.md for full context. These are the critical rules.
|
|
|
|
Project: ChronoMind — AI-Powered Contextual Clock & Timer
|
|
Stack: Next.js 16 (web) + SwiftUI (iOS/Watch/Mac) + Jetpack Compose (Android) + Platform-service (Fastify 5)
|
|
|
|
## Architecture Rules
|
|
- 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/app/.../engine/ — pure Kotlin, no Android framework deps
|
|
- Backend: platform-service in sibling repo learning_ai_common_plat (port 4003)
|
|
- Product ID: chronomind — every Cosmos document MUST include productId field
|
|
|
|
## Key Paths
|
|
- Web: web/src/ (Next.js 16, App Router)
|
|
- iOS: ios/ChronoMind/ (SwiftUI, iOS 17+)
|
|
- Watch: ios/ChronoMindWatch/ (watchOS 10+)
|
|
- Mac: ios/ChronoMindMac/ (macOS 14+)
|
|
- Widgets: ios/ChronoMindWidgets/ (WidgetKit)
|
|
- Android: android/app/src/main/java/com/chronomind/app/
|
|
- Wear OS: android/wear/
|
|
- Docs: docs/ (PRD.md, roadmap.md, INDUSTRY_RESEARCH.md)
|
|
- Backend modules: ../learning_ai_common_plat/services/platform-service/src/modules/{timers,routines,households,shared-timers}/
|
|
|
|
## Conventions
|
|
- Theme tokens: --cm-* CSS custom properties (web), ChronoMindTheme (native)
|
|
- Commits: feat(scope): description / fix(scope): description
|
|
- Web build: must use --webpack flag (Serwist incompatible with Turbopack)
|
|
- Never use console.log — use analytics.ts stub or req.log in Fastify
|
|
- Never hardcode colors — use theme tokens
|
|
- Never hardcode API URLs — use env vars
|
|
|
|
## Build Verification
|
|
- Web: cd web && npm test && npm run typecheck && npm run build
|
|
- iOS: Open ChronoMind.xcodeproj, Cmd+B
|
|
- Android: cd android && ./gradlew :app:compileDebugKotlin
|