From d322036ac8a02d526d7cd889b6d4f00d807ac857 Mon Sep 17 00:00:00 2001 From: Prasad lockated Date: Sat, 21 Feb 2026 13:20:26 +0530 Subject: [PATCH] updated teh agent for the flutter cross platfrom --- .DS_Store | Bin 0 -> 6148 bytes .agent/.DS_Store | Bin 0 -> 6148 bytes .agent/agents/flutter-expert.md | 86 ++++++++++++++++++ .../flutter-workspace-patterns/SKILL.md | 49 ++++++++++ .agent/skills/intelligent-routing/SKILL.md | 4 +- 5 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 .DS_Store create mode 100644 .agent/.DS_Store create mode 100644 .agent/agents/flutter-expert.md create mode 100644 .agent/skills/flutter-workspace-patterns/SKILL.md diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1ad6bfdb0f8146be9b3a1aa6cbd6c5aa452119f9 GIT binary patch literal 6148 zcmeHKy-veG4ED7V3Zg@V7&@U_7+8?{2B8XTm%ad$qJY$r4j?+_9gq+k5|6-3@GQIq zpU+mBpCUFu$d-KH#rDOyFW0yxA~(LDkBAZ?ilL0XT?|`<{j447sbv6k;U2eix5!7+ z%VN3eM4RC+GQjU{hfe5%a=N1S`x{Q4+x}&dWwS*wgFQZ4A3PqvzMpnu=HJGwu50Jy zFdUZ%&ymwj>kK6y{0x<^o_{^5^4I*E+}r$(y!#<xmmp3aa}J@uR~Z&l99 zyUEz~Hu5F*vjD3m#(**K`wXCFv&4IXHW~xQfH6=pz~2WCWlR-I!SLz85Ly6W1alC~ z6P^IQVyajQ!UJ)#6evrbwir&9!|pXMRV)Q%IXP`UoMv{~p}3G8_xB;3Tqdu<di30b`8z}=fH1sfZyFBm1#sB+9Tur9So(^;`3ROF$in5Mn7yIQ+i*0 zy}P)5+D>D&zQG!Hc(u^8l^!t+6`-VzmE@3)X{1&YozHD_X7i>N&zpQ|vBnsLQzcm( zOGi%Xn1>%@>O+aGg36~*VPs7W4{Naoi!oJ@&amdEElhytGNL9lbZMAyf;#6(hN}#f_k6u{cUkU8l9Hk|Nu67PM2b=@31H3-?D2#!| zNTFOhP{|_zFpp*#xaPA2_wh9b8Y6|sAcX1)R9%HWVhGh8?Y`y(8Y6|OI|+UG5PD{z zPbfmpj`4j-ClM%gwR6BZU^_6UZav=rce2m_b|-h|9B>Z&D+ffrR _isLoading;`). +- **Error State**: Maintain `_errorMessage` properties (e.g., `String? _errorMessage; String? get errorMessage => _errorMessage;`). +- **Data Access**: Cross-provider data access is common (e.g., passing a `RunwalMyAccountProvider` into a child provider to read `.bookingDetail`). +- **Repository Injection**: Instantiate the specific repository interface at the top of the provider (e.g., `final IFeatureRepository _repository = FeatureRepository();`). + +## 2. Repository Layer (API Calls) +The `repository` layer is strictly separated from the `provider` layer. + +### Repository Rules: +- **Interfaces**: Always define an interface `IFeatureRepository` and implement it in `FeatureRepository`. +- **API Endpoints**: Kept in static string classes like `RunwalEndpoints` or `EndPoints` (e.g., `RunwalEndpoints.downloadPdfReceipt`). +- **Tokens**: Bearer tokens are fetched asynchronously right before the call (e.g., `final token = await RunwalPrefs.getSfdcToken();`). Check for null/empty token before making requests. +- **HTTP Client**: Use the standard `http` package (`import 'package:http/http.dart' as http;`). +- **JSON Decoding**: `jsonDecode(response.body)` is standard. +- **Errors**: Return `null` or throw caught exceptions on failure. Log errors using `logError` rather than printing. + +## 3. Custom UI Widgets & Helpers +The workspace heavily leverages the `flutter_pkg_panchshil_widgets` package for unified UI and utilities. + +### UI Helper Rules: +- **Logging**: Do NOT use `print()`. Use `logInfo(msg: "...")` and `logError(msg: "...")` from `package:flutter_pkg_panchshil_widgets/utils/custom_logger.dart`. +- **Toasts**: Use `toastDialog(msg: '...', toastGravity: ToastGravity.BOTTOM);` from `package:flutter_pkg_panchshil_widgets/utils/toast_dialog.dart`. +- **Loading Dialogs (nDialog)**: Use `CustomProgressDialog pd = loadingPleaseWaitDialog(context: context); pd.show();` and `pd.dismiss();` from `package:flutter_pkg_panchshil_widgets/widgets/common/loading_dialog.dart`. +- **PDF Viewer**: Use `Base64PdfViewerScreen` from `package:flutter_pkg_panchshil_widgets/widgets/common/base_64_pdf_view_screen.dart`. + +## 4. Multi-Package Architecture +- When building features, check which package they belong to (e.g., `flutter_pkg_panchshil_my_account`, `resident_post_sales_referral_pkg`, etc.). +- Do NOT import code from `flutter_resident` into a package. Packages should be independent or only rely on `flutter_pkg_panchshil_widgets` for shared utilities. + +## Checklist for Agents +- [ ] Are logs using `logInfo` and `logError`? +- [ ] Are API endpoints pulled from `EndPoints`/`RunwalEndpoints`? +- [ ] Is State Management using `ChangeNotifier` and properly handling `isLoading`? +- [ ] Is the code correctly avoiding circular dependencies between the packages? diff --git a/.agent/skills/intelligent-routing/SKILL.md b/.agent/skills/intelligent-routing/SKILL.md index 5c8814b00..e44354671 100644 --- a/.agent/skills/intelligent-routing/SKILL.md +++ b/.agent/skills/intelligent-routing/SKILL.md @@ -42,6 +42,7 @@ graph TD | **Mobile UI** | "screen", "navigation", "touch", "gesture" | `mobile-developer` | ✅ YES | | **API Endpoint** | "endpoint", "route", "API", "POST", "GET" | `backend-specialist` | ✅ YES | | **Database** | "schema", "migration", "query", "table" | `database-architect` + `backend-specialist` | ✅ YES | +| **Flutter Dev** | "flutter", "dart", "RAG app" | `flutter-expert` | ✅ YES | | **Bug Fix** | "error", "bug", "not working", "broken" | `debugger` | ✅ YES | | **Test** | "test", "coverage", "unit", "e2e" | `test-engineer` | ✅ YES | | **Deployment** | "deploy", "production", "CI/CD", "docker" | `devops-engineer` | ✅ YES | @@ -105,7 +106,8 @@ function analyzeRequest(userMessage) { | **Security** | auth, login, jwt, password, hash, token | `security-auditor` | | **Frontend** | component, react, vue, css, html, tailwind | `frontend-specialist` | | **Backend** | api, server, express, fastapi, node | `backend-specialist` | -| **Mobile** | react native, flutter, ios, android, expo | `mobile-developer` | +| **Mobile** | react native, ios, android, expo | `mobile-developer` | +| **Flutter** | flutter, dart, cross-platform, RAG app | `flutter-expert` | | **Database** | prisma, sql, mongodb, schema, migration | `database-architect` | | **Testing** | test, jest, vitest, playwright, cypress | `test-engineer` | | **DevOps** | docker, kubernetes, ci/cd, pm2, nginx | `devops-engineer` |