-
-Here’s the landing screen of **Sarthi**, your supportive productivity coach. Because Sarthi understands your preferred contexts, it automatically highlights the current focus (Work or Personal) and lines up the most relevant hero task, quick actions, and praise nudges pulled from `/dashboard`, `/tasks`, and `/journey`. You can immediately jump into a Brain Dump, draft plans, interventions, or personalization without hunting for menus.
-
-### Personalizing Your Flow
-
-
-
-This screen is basically a coffee chat with Sarthi about your ideal day. I tell it when I’m “on the clock,” which days feel like work mode, and where I prefer to slot fitness, hobbies, or chores. Those choices flow straight into availability profiles, so every Rolling Wave plan or Focus Mode timer feels like it was written for me—not for some generic productivity robot. Later, when I sync tasks to my calendar, they land inside the windows I just described.
-
-### Rolling Wave Plan Review
-
-
-
+## Prerequisites
-Plan Review turns vague resolutions like “Learn piano” into a 4–12 week path, but only week one becomes concrete so you’re not overwhelmed by a wall of future tasks. You set the timeline, Sarthi decomposes it using your personalized context, and you can edit any Week 1 task before activating. Approving calls `/resolutions/{id}/approve`, materializing just those near-term tasks, logging the action, and allowing you to sync dated items to your device calendar so reminders fire at the right moment.
-
-### Weekly Focus Snapshot
-
-
-
-
-Rolling Wave is intentional: only Week 1 becomes actionable so you’re never staring at 12 weeks of impossible homework. Each Sunday Sarthi looks at what you actually completed, how many tasks spilled, and the preferences you set earlier, then stitches together the next micro-resolution plus the handful of tasks worth activating. If last week’s completion rate dipped, it lightens or reschedules; if you crushed it, it nudges you forward. `/weekly-plan/latest` surfaces that new focus, the “why this matters,” and completion stats per resolution. The dashboard “Weekly Overview” mirrors those numbers at a glance and bubbles up resolutions that need a nudge.
-
-### Intervention Coach
-
-
-
-Every Thursday, Sarthi runs an intervention check. If your week looks overloaded, `/interventions/latest` returns a card explaining the risk and three choices that keep agency with you: **Reschedule** automatically moves remaining tasks into your next free slots, **Reduce Load** trims scope for the week while logging a note, and **Short Break** parks the plan temporarily so you can recover guilt-free. Each button routes through `respondToIntervention` and records the outcome in `agent_actions_log`.
-
-### Focus Mode + Calendar Sync
-
-
-
-When it’s go-time, Focus Mode silences notifications, puts one task front-and-center, and lets you log distracting thoughts via a mini Brain Dump so Opik’s evaluation engine can learn what derailed you. Completing the session marks the task done through `/tasks` and automatically loads the next item in your queue. Paired with the calendar sync step in Plan Review, Focus Mode keeps you anchored to the schedule you designed while still adapting if life happens.
-
-### Brain Dump Signal Extraction
-
-
-
-When those Focus Mode notes swell into bigger feelings—or you just need to unload before starting—this screen is your pressure-release valve. You pour in raw text, and Sarthi’s `BrainDumpExtractor` detects **emotions**, **blockers**, and **intent shifts**, then reflects empathetic acknowledgement plus optional next steps (never surprise tasks). Accept an option and the backend routes it through `/tasks` or `/interventions/respond`; pass on it and Sarthi simply remembers the signal for future planning.
-
----
-
-## Core APIs & Flows
-
-| Flow | Endpoints | Notes |
-| --- | --- | --- |
-| Brain dump | `POST /brain-dump` | Stores `BrainDump` row, emits signals + agent log entry. |
-| Resolutions | `POST /resolutions`, `POST /resolutions/{id}/decompose`, `POST /resolutions/{id}/approve`, `GET /resolutions` | Decomposer generates `plan_v1` + draft tasks; approval activates tasks + logs actions. |
-| Weekly plan | `GET /weekly-plan/preview`, `POST /weekly-plan/run`, `GET /weekly-plan/latest`, history endpoints | Rolling Wave planner stores snapshots in `AgentActionLog` (`weekly_plan_generated`). Notifications fire via hooks when enabled. |
-| Interventions | `GET /interventions/preview`, `POST /interventions/run`, `GET /interventions/latest`, history endpoints, `POST /interventions/respond` | Thursday slippage cards plus follow-up option execution. Responses log `intervention_executed`. |
-| Tasks | `GET/POST/PATCH /tasks` | Supports completion toggles, edits, notes, metadata for draft vs active tasks. |
-| Preferences | `GET /preferences`, `PATCH /preferences` | Autonomy controls reflected in scheduler + notifications. |
-| Agent Log | `GET /agent-log`, `GET /agent-log/{id}` | Cursor-paginated transparency feed with summaries and undo flags. |
-| Jobs (ops) | `GET /jobs`, `POST /jobs/run-now` (when `DEBUG=true`) | Inspect scheduler config or trigger runs manually. |
-
----
-
-## Scheduler & Background Jobs
-
-- **Weekly plan job**: regenerates Rolling Wave plans for active users each week (`app/services/job_runner.py`). Skips paused users via `UserPreferences`.
-- **Intervention job**: runs Thursday 7 PM (configurable) to detect slippage and store snapshots.
-- **Task reminder job**: optional Expo push reminders for tasks within a configurable lookahead (`app/services/task_reminder.py`).
-- **Notifications**: Hooks (`app/services/notifications/hooks.py`) ensure weekly-plan/intervention snapshots enqueue notifications or log skips with reasons.
-
-All jobs emit metrics (`jobs.*`) and traces when Opik is enabled.
+- **Node.js** (LTS) and **npm** — for Expo / React Native.
+- **Python 3.11+** — for the FastAPI backend when added.
+- **PostgreSQL** — for production-like local development once the backend exists.
---
-## Transparency, Preferences & Safety
-
-- Every autonomous action writes to `agent_actions_log` (weekly plans, interventions, notifications, task edits, preference updates).
-- `AgentLog` APIs power the mobile transparency screens; entries note `undo_available` when relevant.
-- Preferences (`coaching_paused`, `weekly_plans_enabled`, `interventions_enabled`) propagate through schedulers, notification hooks, and the task reminder service.
-- `/jobs/run-now` respects these flags to avoid surprising users during manual testing.
-
----
-
-## Additional Docs
-
-- `docs/SRS_v2.5.pdf`: original system requirements + UX spec.
-- `docs/project_structure.md`: tree view of the repo.
-- `docs/backend_reference.md`: deep dive into backend modules and schema.
-- `docs/decisions.md`: guiding architecture principles.
-
-Dependency source of truth:
-
-- Backend dependencies are defined in `backend/pyproject.toml`.
-- `backend/requirements.txt` is a compatibility shim that installs from `pyproject.toml` to prevent version drift.
+## License
-Use these references alongside this README to onboard quickly or extend Sarthi AI with new agents, notification providers, or analytics.
+[MIT License](LICENSE)
diff --git a/backend/.env.example b/backend/.env.example
index dbb148d..0a97d8d 100644
--- a/backend/.env.example
+++ b/backend/.env.example
@@ -1,40 +1,2 @@
-APP_NAME=Sarthi Backend
-LOG_LEVEL=INFO
-DEBUG=False
-DATABASE_URL=postgresql+psycopg2://postgres:postgres@localhost:5432/Sarthi
-OPIK_ENABLED=true
-OPIK_API_KEY=
-OPIK_PROJECT=Sarthi
-SCHEDULER_ENABLED=true
-SCHEDULER_TIMEZONE=UTC
-WEEKLY_JOB_DAY=6
-WEEKLY_JOB_HOUR=9
-WEEKLY_JOB_MINUTE=0
-INTERVENTION_JOB_DAY=3
-INTERVENTION_JOB_HOUR=19
-INTERVENTION_JOB_MINUTE=0
-JOBS_RUN_ON_STARTUP=false
-NOTIFICATIONS_ENABLED=false
-NOTIFICATIONS_PROVIDER=noop
-TASK_REMINDER_INTERVAL_MINUTES=5
-TASK_REMINDER_LOOKAHEAD_MINUTES=30
-EXPO_PUSH_URL=https://exp.host/--/api/v2/push/send
-# Optional: Expo push API (server → Expo). Some code paths also read OPENAI_API_KEY from the environment directly.
-EXPO_ACCESS_TOKEN=
-
-# OpenAI (required for brain dump, interventions, weekly planner, task reminders when those features call the API)
-OPENAI_API_KEY=
-
-# Auth (set JWT_SECRET to a long random string in production; matches app.core.config.Settings)
-AUTH_ENABLED=true
-JWT_SECRET=dev-insecure-change-me-use-32bytes-min!!
-JWT_ALGORITHM=HS256
-ACCESS_TOKEN_EXPIRE_MINUTES=15
-REFRESH_TOKEN_EXPIRE_DAYS=30
-AUTH_LEGACY_ALLOW_UNAUTHENTICATED=true
-
-# CORS (defaults in code are permissive "*"; for Expo web e.g. CORS_ALLOW_ORIGINS=http://localhost:8081)
-CORS_ALLOW_ORIGINS=*
-CORS_ALLOW_METHODS=*
-CORS_ALLOW_HEADERS=*
-CORS_ALLOW_CREDENTIALS=false
+# Local Postgres from docker-compose (see docker-compose.yaml)
+DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:5432/Sarthi
diff --git a/backend/.pgdata/PG_VERSION b/backend/.pgdata/PG_VERSION
deleted file mode 100644
index 8351c19..0000000
--- a/backend/.pgdata/PG_VERSION
+++ /dev/null
@@ -1 +0,0 @@
-14
diff --git a/backend/.pgdata/base/1/112 b/backend/.pgdata/base/1/112
deleted file mode 100644
index 21db51471357ec5399b1dd589a66fe5834611abc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 8192
zcmeIuu?>JQ5CcFX1&IZyLrKdP%)z3plo3c4NJn?yyd@WwE=kTkOMki3YOCcK`MK7V
x5vJGPX{{tcfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7eizvK!UyVW1snhX
diff --git a/backend/.pgdata/base/1/113 b/backend/.pgdata/base/1/113
deleted file mode 100644
index 3f06e2f0cd6acb01609647fd1742f78e3ac157d8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 8192
zcmeIuu?>JQ5CcFX1t|m2hZWd@IarjHG6Km0>FDm8x8%aoB}qN9jh8#U^;XWApKDK<
wVR`*s)=B~d2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkL{cY!(TfxDc|&x<^4c?4~TEg|GyXcuD6F<;~2CsK0P*=zk`Q-
zf8XFc{!1&j=KricR1CZ4dp_O|PLlTndZF)K0L1=1BK^CC{>|I;#lB=Qx#*iidK6)u_#Fw&O|Y{a3j)|7Y!j*s1Fr
z&p2K((~IT!eYW`4{QoJ`rSB-oaO=@$aZILo3;BN9@mqW=x90z>T@X9vdzItm^P(4v
z@3X|W=KqhQZtptYWP4(y-I$ufxcJE&gBL=+pK$yZ-^#7|KWoExG=0K|o$~#d V@Y)|Ia)*>V@Y)|8L`ymY+5C!t*;;|
z-SqnJqSw>=3-6=X)BAJZNw24O`t$DjhX45X;w8n_rQN%C-)Ud++uKF4x-(yv)6qSD
zM%zC;O5bpo-nNT}%(wE_{I)fo7xwoHg?wdy>f4%m7Ui%U-z?jHbMwCo&x6rCZ*At8
zovh|3tL9(V`u_^g1JOKhY33PE^*Dv_>_qdtxtV9MSPbs82I3yy@Dlp}xxZ`|H==po
z)XY;(%Hw
^k8;0{aJ{E}J^pI#{{JpM^nj`v-OfVy1VI_U!+KBa`2A{u
z{@?Lz$lp@K(c5}H(YoLIYR&&Uo(=i!*!jfO+WG%Vd}6!J`up`h`D*R_Kl9|Q@96)3
zk^FYf`i}med2-fwy#GJ*