52 lines
3.2 KiB
Markdown
52 lines
3.2 KiB
Markdown
---
|
|
estimated_steps: 4
|
|
estimated_files: 2
|
|
skills_used:
|
|
- best-practices
|
|
- test
|
|
---
|
|
|
|
# T01: Strengthen application-package context assembly and backend draft tests
|
|
|
|
**Slice:** S02 — Stronger AI application package drafting
|
|
**Milestone:** M001
|
|
|
|
## Description
|
|
|
|
Make the backend application-package generator use the context S01 now provides. The executor should keep the existing package endpoint, but improve how it builds prompts and selects context so the tailored CV, cover letter, recruiter message, and supporting signals reflect imported correspondence, recruiter/job details, profile CV structure, and attachment context more convincingly.
|
|
|
|
## Steps
|
|
|
|
1. Inspect `JobTrackerApi/Controllers/JobApplicationsController.cs` around `generate-application-package` and identify which job, recruiter, correspondence, attachment, and profile-CV signals are already available but underused.
|
|
2. Refine the package-context assembly and prompt shape so imported correspondence and recruiter/job-specific details influence the generated drafts directly without weakening the no-auto-send boundary.
|
|
3. Add a focused backend test file `JobTrackerApi.Tests/JobApplicationsApplicationPackageTests.cs` that exercises the package endpoint contract with real job/correspondence/profile context and asserts the returned artifacts are specific to that context.
|
|
4. Keep the output contract stable unless a change materially improves the workspace; if it changes, make the added fields explicit and limited to what T02 will consume.
|
|
|
|
## Must-Haves
|
|
|
|
- [ ] Imported correspondence from S01 is deliberately consumed in package generation instead of remaining disconnected from the draft flow.
|
|
- [ ] Backend tests prove package output responds to job-specific context rather than generic fallback behavior.
|
|
- [ ] The generator still returns review-only draft material and does not cross the manual-send boundary.
|
|
|
|
## Verification
|
|
|
|
- `dotnet test JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --filter JobApplicationsApplicationPackageTests`
|
|
- Confirm the focused test covers correspondence-aware package context and expected package artifacts.
|
|
|
|
## Observability Impact
|
|
|
|
- Signals added/changed: clearer package-response artifacts and stronger context assembly around job/correspondence/profile inputs.
|
|
- How a future agent inspects this: read `JobTrackerApi/Controllers/JobApplicationsController.cs` and `JobTrackerApi.Tests/JobApplicationsApplicationPackageTests.cs`.
|
|
- Failure state exposed: focused backend verification should show whether weak drafts come from missing context assembly, empty correspondence state, or prompt/output contract drift.
|
|
|
|
## Inputs
|
|
|
|
- `JobTrackerApi/Controllers/JobApplicationsController.cs` — current application-package and related AI draft endpoints.
|
|
- `Models/Correspondence.cs` — persisted Gmail-linked correspondence metadata from S01.
|
|
- `JobTrackerApi/Controllers/ProfileCvController.cs` — profile CV structure/source-of-truth behavior.
|
|
|
|
## Expected Output
|
|
|
|
- `JobTrackerApi/Controllers/JobApplicationsController.cs` — stronger package-generation context and/or response contract.
|
|
- `JobTrackerApi.Tests/JobApplicationsApplicationPackageTests.cs` — focused backend proof for context-aware package generation.
|