Files
jobtrackingapp/.gsd/milestones/M001/M001-ROADMAP.md
T

127 lines
7.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# M001: Gmail and draft quality loop
**Vision:** Turn the existing job tracker into a daily-use personal job-search workspace where Gmail import and AI drafting are strong enough to trust, while preserving manual control over all real-world sending and applying.
## Success Criteria
- User can import a job found elsewhere, generate a tailored CV and cover-letter package that feels specific enough to start from, and save/edit that package inside the job workspace.
- User can connect Gmail, import the right message or full thread into a job with less cleanup than before, and see the imported correspondence reflected in that jobs timeline/workspace.
- After a thread is linked to a job, later inbound messages and user-sent Gmail replies appear on that job automatically without requiring the user to re-import the thread manually.
- User can generate a follow-up or reply draft grounded in the imported correspondence and saved job/application context.
- The daily loop of job table → follow-up/dashboard → individual job workspace feels coherent and actionable for an individual user.
- No part of the milestone auto-sends email or auto-applies to jobs.
## Key Risks / Unknowns
- Gmail import may still feel unreliable if matching, whole-thread import, and linked-thread refresh clarity do not improve enough to reduce manual cleanup.
- AI draft quality may still feel generic even though the draft surfaces already exist.
- The workflow may remain fragmented if table/dashboard/job-detail changes do not land as one coherent loop.
- Real value may depend on live Gmail + AI + persisted job context wiring, not isolated endpoint improvements.
- Automatic Gmail thread refresh may be harder than one-time import if Gmail history/state handling is brittle or expensive.
## Proof Strategy
- Gmail import reliability and trust → retire in S01 by proving a user can connect Gmail, review likely messages or threads for a job, import the right correspondence into that job, and keep a linked thread current as new replies arrive.
- AI draft quality and usefulness → retire in S02 by proving imported job context plus profile/CV context produce tailored drafts the user can edit and save as actual working material.
- Reply/follow-up assistance grounded in real context → retire in S03 by proving imported correspondence and saved draft state feed a useful reply/follow-up drafting flow.
- Workflow coherence across daily surfaces → retire in S04 and S05 by proving the table/dashboard/job workspace work as one control loop and by re-checking the whole loop end-to-end.
## Verification Classes
- Contract verification: backend/frontend tests, artifact checks for new endpoints and UI flows, persisted state checks, import/draft wiring verification
- Integration verification: real Gmail OAuth/import plus live AI-service-backed draft generation exercised through the app
- Operational verification: repeated use of the workflow across auth/config/service boundaries without dangerous outbound automation
- UAT / human verification: whether Gmail import feels trustworthy, whether linked threads stay current automatically enough for real use, and whether drafts feel strong enough to start from
## Milestone Definition of Done
This milestone is complete only when all are true:
- all slice deliverables are complete
- Gmail import, linked-thread continuity, correspondence state, and draft-generation surfaces are actually wired together
- the real browser entrypoint exists and is exercised through the table/dashboard/job loop
- success criteria are re-checked against live behavior, not just artifact presence
- final integrated acceptance scenarios pass
## Requirement Coverage
- Covers: R001, R002, R003, R004, R005, R006, R007, R008, R010
- Partially covers: R009
- Leaves for later: R011, R012, R013
- Orphan risks: none
## Slices
- [x] **S01: Smarter Gmail import and matching** `risk:high` `depends:[]`
> After this: User can connect Gmail, review likely messages or threads for a job, import a message or full thread, and trust linked Gmail threads to stay current on that job without manual re-import.
- [ ] **S02: Stronger AI application package drafting** `risk:high` `depends:[S01]`
> After this: From an imported job plus profile/CV context, the app generates materially better tailored CV and cover-letter drafts that feel specific and usable.
- [ ] **S03: Reply and follow-up drafting from real thread context** `risk:medium` `depends:[S01,S02]`
> After this: Inside a job, the user can generate follow-up and reply drafts grounded in imported and automatically refreshed correspondence plus saved application context, then edit them before sending manually.
- [ ] **S04: Daily control loop surfaces** `risk:medium` `depends:[S01,S03]`
> After this: The job table works as the primary overview and the follow-up/dashboard surfaces clearly show what needs attention next for an individual user.
- [ ] **S05: End-to-end trust and workflow polish** `risk:low` `depends:[S01,S02,S03,S04]`
> After this: The full loop works cleanly in a real environment: import job → generate package → apply externally → import/update correspondence automatically from linked Gmail threads → draft follow-up/reply → track progress confidently.
## Boundary Map
### S01 → S02
Produces:
- improved Gmail import workflow in `job-tracker-ui/src/components/Correspondence.tsx` that yields job-linked imported correspondence with clearer message/thread selection behavior
- stronger backend correspondence import surface in `JobTrackerApi/Controllers/GmailController.cs` and related persistence so imported messages reliably attach to `JobApplication` records
- linked-thread metadata and refresh behavior stable enough that later draft-generation flows can consume correspondence as trusted context rather than a stale snapshot
Consumes:
- nothing (first slice)
### S01 → S03
Produces:
- imported correspondence records tied to a specific job and available through the existing per-job correspondence/timeline surfaces
- message/thread metadata good enough for later reply/follow-up draft context assembly
- a verified Gmail connection/import path that downstream slices can rely on, including ongoing thread refresh after first import
Consumes:
- nothing (first slice)
### S02 → S03
Produces:
- improved application package generation via `JobTrackerApi/Controllers/JobApplicationsController.cs` returning stronger tailored CV and cover-letter outputs tied to a job
- persisted draft state in the job workspace so later follow-up/reply flows can reuse saved application context
- clearer frontend editing/saving behavior in `job-tracker-ui/src/components/JobDetailsDialog.tsx`
Consumes from S01:
- imported and auto-refreshed correspondence plus job-linked message context
### S03 → S04
Produces:
- reply/follow-up draft flow grounded in job + correspondence + saved application package context
- explicit manual-send boundary in the job workspace UI and backend behavior
- job-level indicators that a follow-up/reply is ready, missing context, or needs action
Consumes from S01:
- Gmail-imported and automatically refreshed correspondence context
Consumes from S02:
- saved tailored CV / cover-letter / application package context
### S04 → S05
Produces:
- table/dashboard surfaces that summarize readiness, follow-up urgency, and next actions for individual users
- clearer navigation hierarchy across table, follow-up/dashboard, and individual job workspace
- stable daily-use control loop to validate in final integration
Consumes from S01:
- correspondence state, Gmail import outcomes, and linked-thread refresh outcomes
Consumes from S03:
- follow-up/reply drafting signals and job-level action state