frosty/AGENTS.md

28 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2026-01-11 16:59:33 -08:00
# AGENTS.md
2026-02-07 01:02:47 -08:00
## Workflow
2026-01-11 16:59:33 -08:00
2026-02-07 01:02:47 -08:00
- In plan mode, interview thoroughly — ask about UI/UX, tradeoffs, and edge cases before coding
- When new code supersedes existing functionality, find and remove everything it makes redundant
- Favor parallel tool calls and subagents when tasks are independent
2026-01-11 16:59:33 -08:00
2026-02-07 01:02:47 -08:00
## Architecture (non-obvious bits)
2026-01-11 16:59:33 -08:00
2026-02-07 01:02:47 -08:00
- Screens live in `lib/screens/{feature}/` with co-located `stores/` subdirectories — don't create top-level store files
- All API services extend `BaseApiClient` (`lib/apis/base_api_client.dart`) — don't create standalone API classes
- MobX stores use a generated mixin pattern — see `lib/screens/settings/stores/auth_store.dart` for the canonical example
2026-02-07 00:46:01 -08:00
2026-02-07 01:02:47 -08:00
## Gotchas
2026-02-07 00:46:01 -08:00
2026-02-07 01:02:47 -08:00
- Run requires Twitch credentials: `flutter run --dart-define=clientId=YOUR_ID --dart-define=secret=YOUR_SECRET`
- After changing MobX stores or `@JsonSerializable` models, run `dart run build_runner build`. Never edit `.g.dart` files directly. Use `--delete-conflicting-outputs` if the build fails on stale generated files. Commit `.g.dart` files to source control.
- The secure storage cleanup in `main.dart` looks unnecessary but handles an Android/iOS edge case where secure storage persists after uninstall. Don't remove it.
- Use package imports (`import 'package:frosty/...'`), not relative imports
- Always include trailing commas
- Use single quotes
- Run `flutter analyze` after making changes. Run `flutter test` if changes touch testable logic.
2026-01-11 16:59:33 -08:00
2026-02-07 01:02:47 -08:00
## Commits
2026-01-11 16:59:33 -08:00
2026-02-07 01:02:47 -08:00
Lowercase, no prefixes (e.g., `fix landscape bottom padding in chat bottom bar`). Keep commits tightly scoped.