# ChatGPT Feedback Response Plan **Purpose:** Action plan to address feedback from ChatGPT code review **Owner:** Development Team **Last Updated:** 2025-12-23 **Status:** active --- ## Priority 1: Quick Wins (High ROI, Low Risk) ### 1.1 Repo Hygiene ✅ COMPLETE - [x] Check what build artifacts are tracked in git - [x] Remove tracked build artifacts from git (`.gradle/` files) - [x] Strengthen `.gitignore` (add `*.tar.gz`, `build/reports/`, `.gradle/nb-cache/`, `packages/*/dist/`) - [x] Verify `package.json` `files` field excludes build artifacts - [x] Clean up any nested archives ### 1.2 Version Unification ✅ COMPLETE - [x] Update `README.md` version from 2.2.0 → 1.0.11 - [x] Update `src/definitions.ts` version from 2.0.0 → 1.0.11 - [x] Add CI check script to verify version consistency (`scripts/check-version-consistency.sh`) - [x] Integrate version check into `scripts/verify.sh` - [x] Document version policy: `package.json` is source of truth --- ## Priority 2: Structural Improvements (Medium ROI, Medium Risk) ### 2.1 Native Plugin Refactoring - [ ] Analyze `DailyNotificationPlugin.kt` (~2,782 lines) - extract services - [ ] Analyze `DailyNotificationPlugin.swift` (~2,047 lines) - extract services - [ ] Create service extraction plan: - `SchedulerService` - `PermissionService` - `Power/ExactAlarmService` - `ReactivationService` - `RollingWindowService` - `Storage/StateRepository` - `FetcherBridge` - [ ] Implement refactoring in small, mergeable batches ### 2.2 TODO Classification ✅ COMPLETE - [x] Audit all TODOs/FIXMEs/HACKs (found 34 instances) - [x] Classify into: - **Must ship**: 7 items (rolling window logic, TTL validation, database operations) - **Nice-to-have**: 2 items (performance metrics/statistics) - **Future (Phase 2/3)**: 19 items (explicitly deferred features) - **TypeScript Stubs**: 3 items (iOS-specific stubs) - [x] Create comprehensive classification document (`docs/TODO-CLASSIFICATION.md`) - [ ] Create issues for "must ship" items (7 issues needed) - [ ] Move "Phase 2" items behind feature flags or to planning docs --- ## Priority 3: CI/CD Infrastructure (High ROI, Low Risk) ### 3.1 CI Workflows ✅ COMPLETE - [x] Create `.github/workflows/ci.yml`: - Node/TS: lint, typecheck, build, local CI, `npm pack` check - Android: `./gradlew test` + `lint` (with graceful fallbacks) - iOS: `xcodebuild test` (macOS runner, with graceful fallbacks) - [x] Add graceful fallbacks for standalone plugin context - [ ] Add merge gates on CI passing (requires GitHub repo settings) - [x] Document CI setup in `ci/README.md` (already documented) ### 3.2 Test Coverage - [ ] Identify critical paths needing tests: - Backoff policy correctness - Idempotency key behavior - Watermark monotonicity - TTL-at-fire logic - Rolling window / rate-limit counters - Permission flows (Android 13+, exact alarm, battery optimization) --- ## Priority 4: Packaging & Workspace (Medium ROI, Low Risk) ### 4.1 Workspace Package Dist ✅ COMPLETE - [x] Check if `packages/polling-contracts/dist/` is committed (not tracked in git) - [x] Add `packages/*/dist/` to `.gitignore` to prevent future commits - [x] Verify `package.json` `files` field controls publishing (already correct) - [ ] Add `prepack` script to build subpackage before publish (optional enhancement) --- ## Priority 5: Documentation (Low ROI, Low Risk) ### 5.1 Documentation Consolidation ✅ COMPLETE - [x] Update `README.md` with clear entry points: - Quick Start section with links to getting started guide, examples, troubleshooting - Install instructions (already in Getting Started guide) - Minimal usage example (linked to Quick Start guide) - Platform setup (linked to Getting Started guide) - Troubleshooting link - Architecture link (via Documentation Index) - [x] Add Compatibility Matrix: - Capacitor versions supported (table with status) - Android minSdk/targetSdk (23/35, with permission notes) - iOS min version (13.0) - Electron requirements (20+) - Platform support summary table - [x] Add Behavioral Contracts section: - Guaranteed behaviors (monotonic watermark, idempotency, TTL, persistence, recovery) - Best-effort behaviors (delivery in Doze, background fetch timing, battery optimization) --- ## Execution Order 1. **Week 1**: Quick wins (Repo hygiene, Version unification) 2. **Week 2**: CI/CD infrastructure 3. **Week 3-4**: Native plugin refactoring (in batches) 4. **Week 5**: TODO classification and cleanup 5. **Week 6**: Documentation improvements --- **See also:** - [ChatGPT Feedback Package](./progress/05-CHATGPT-FEEDBACK-PACKAGE.md) — Original feedback - [System Invariants](../SYSTEM_INVARIANTS.md) — Enforced invariants