Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 2.76 KB

File metadata and controls

63 lines (42 loc) · 2.76 KB

AGENTS.md

Cursor Cloud specific instructions

Overview

Prism is a Flutter mobile wallpaper app (Android/iOS). The main development loop uses FVM + Makefile targets. See README.md for full docs.

Environment prerequisites (already installed in snapshot)

  • Dart SDK at /usr/lib/dart-sdk (FVM requires a host Dart)
  • FVM installed via dart pub global activate fvm; Flutter 3.41.4 pinned in .fvmrc
  • Android SDK at ~/android-sdk with platform 36, build-tools 36.0.0, NDK
  • Java 17 at /usr/lib/jvm/java-17-openjdk-amd64
  • Shell PATH and env vars configured in ~/.bashrc

Stub lib/firebase_options.dart

This file is .gitignored and normally generated by flutterfire configure. Without a real Firebase project, the update script creates a stub so that analysis, tests, and debug builds succeed. Do not commit this file.

Key Makefile targets

Command What it does
make format-check Dart format lint (no Doppler needed)
make test Run all Flutter unit/widget tests
make analyze Static analysis (exits non-zero on infos unless --no-fatal-infos)
make env-guard Guard: String.fromEnvironment only in lib/env/env.dart
make secrets-guard Guard: Makefile is wired to Doppler
make analytics-check Regenerate analytics schema and verify no uncommitted diff
make build Build release APK (requires Doppler secrets)

Running analysis

make analyze uses fvm flutter analyze and exits non-zero on info-level findings (pre-existing in the repo). To get a clean exit use:

fvm flutter analyze --no-pub --no-fatal-infos

Or with CI=true make analyze (which adds --no-fatal-infos automatically, but requires flutter on PATH directly — not via FVM).

Building without Doppler

For debug builds without Doppler access, bypass the Doppler check:

fvm flutter build apk --debug --dart-define=SKIP_FIREBASE_INIT=true

The first Gradle build downloads NDK, CMake, and additional Android platforms automatically (~20 min on a cold cache).

Running the app

This is a mobile app — it cannot be tested in a desktop browser. The app requires either an Android emulator or physical device. In the cloud VM, the practical scope is:

  • make format-check — lint
  • make test — unit/widget tests
  • fvm flutter analyze --no-pub --no-fatal-infos — static analysis
  • fvm flutter build apk --debug --dart-define=SKIP_FIREBASE_INIT=true — build verification

Secrets

Secrets are managed via Doppler (not .env files). See docs/development/doppler.md. Without Doppler access, targets like make run and make build will fail at the doppler-check step. Use the direct fvm flutter commands with --dart-define=SKIP_FIREBASE_INIT=true to bypass.