Skip to content

Commit 3bfef70

Browse files
committed
docs: highlight grounded agent architecture
1 parent 90a8371 commit 3bfef70

2 files changed

Lines changed: 58 additions & 22 deletions

File tree

README.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,71 @@
44
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
55
[![Live App](https://img.shields.io/badge/Live%20App-Vercel-2563eb?logo=vercel&logoColor=white)](https://job-application-copilot.xyz/)
66

7-
AI Job Application Agent is a Vercel-hosted Next.js workspace with a FastAPI backend for resume parsing, JD review, grounded agentic tailoring, and exportable job application documents.
7+
AI Job Application Agent is a grounded resume-tailoring product: a five-stage agent pipeline that turns a source resume and job description into an evidence-backed tailored resume and cover letter.
8+
9+
The core differentiator is grounded review. The pipeline is designed to detect and correct unsupported claims before export, so tailoring can emphasize the candidate's strongest relevant evidence without inventing skills or experience.
10+
11+
![Agentic workflow](docs/screenshots/agentic_workflow.jpg)
812

913
Live landing page: https://job-application-copilot.xyz
1014

1115
Workspace app: https://app.job-application-copilot.xyz
1216

13-
## Product Flow
17+
## Agent Pipeline
18+
19+
The workflow runs through `ApplicationOrchestrator` with progress callbacks, per-stage duration logging, JSON-contracted agent outputs, and deterministic fallback if assisted generation is unavailable.
20+
21+
1. `FitAgent` compares the candidate profile against the job description.
22+
2. `TailoringAgent` rewrites the deterministic baseline into role-specific resume guidance.
23+
3. `ReviewAgent` checks grounding, reports unsupported claims, and returns corrected tailoring when repairs are possible.
24+
4. `ResumeGenerationAgent` builds the final tailored resume artifact from the reviewed output.
25+
5. `CoverLetterAgent` runs only after review approval and creates a role-specific cover letter.
26+
27+
Each agent follows the same operating shape: deterministic baseline first, LLM-assisted refinement second, structured JSON output, and grounded fallback behavior when assisted execution is unavailable.
28+
29+
## Grounding And Fallbacks
30+
31+
- Deterministic services build the candidate profile, JD summary, fit analysis, and first-pass tailored draft before the agent layer runs.
32+
- `ReviewAgent` returns `grounding_issues`, `unresolved_issues`, `revision_requests`, and an optional `corrected_tailoring` payload.
33+
- The orchestrator uses `corrected_tailoring` as the downstream source of truth when review repairs the draft.
34+
- Cover-letter generation is gated on review approval.
35+
- The fallback review path checks whether the output references missing hard skills that are not evidenced in the source profile.
1436

15-
1. Sign in with Google
16-
2. Upload a resume
17-
3. Search jobs, import a supported posting, or paste a JD manually
18-
4. Review the JD summary
19-
5. Run the agentic analysis
37+
## Prompt And Runtime Discipline
38+
39+
- Prompt builders compact large JSON sections through escalating string and list caps before falling back to a section summary.
40+
- Prompt metadata records estimated input size, compacted section count, compacted labels, and budget mode.
41+
- The OpenAI wrapper routes by task, tracks usage, enforces quota checks, records response metadata, and retries incomplete JSON responses with a higher output budget when appropriate.
42+
43+
## Product Surface
44+
45+
1. Sign in with Google through Supabase-backed auth
46+
2. Upload a resume and build a normalized candidate profile
47+
3. Search Greenhouse and Lever boards, import a supported posting, or paste a JD manually
48+
4. Review a structured JD summary
49+
5. Run the grounded agentic workflow
2050
6. Review the tailored resume and cover letter
2151
7. Ask grounded follow-up questions in the workspace assistant
22-
8. Export Markdown or PDF documents
52+
8. Export Markdown or WeasyPrint-backed PDF documents
2353

2454
## Stack
2555

2656
- Next.js frontend in `frontend/`
2757
- FastAPI backend in `backend/`
28-
- Shared Python workflow and builders in `src/`
58+
- Shared Python workflow, agents, builders, and services in `src/`
2959
- Supabase for Google auth, quota tracking, saved workspaces, and saved jobs
60+
- Greenhouse and Lever job-source clients with matching and registry layers
3061
- OpenAI Responses API for assisted generation
3162
- WeasyPrint-backed PDF export pipeline
3263
- Docker Compose + Caddy deployment bundle in `deploy/vps/`
3364

65+
## Engineering Notes
66+
67+
- 37 focused Python test files cover parsing, normalization, fitting, tailoring, orchestration, builders, exports, auth, quotas, persistence, and backend routes.
68+
- 12 ADRs in `docs/adr/` record product and architecture decisions, including the Streamlit-first to Next.js + FastAPI transition.
69+
- Architecture details live in [docs/architecture.md](docs/architecture.md).
70+
- Deployment notes live in [docs/next-fastapi-transition.md](docs/next-fastapi-transition.md).
71+
3472
## Local Development
3573

3674
Run the backend:
@@ -78,5 +116,3 @@ LEVER_SITE_NAMES=dnb,plaid,mistral
78116
- `app.job-application-copilot.xyz` -> Vercel frontend
79117
- `api.job-application-copilot.xyz` -> VPS FastAPI backend
80118
- `deploy/vps/` -> Docker Compose + Caddy bundle for the backend stack
81-
82-
Transition notes and deployment details live in [docs/next-fastapi-transition.md](docs/next-fastapi-transition.md).

docs/adr/ADR-010-single-pass-review-corrections-and-task-tuned-model-budgets.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Accepted
99
The earlier supervised workflow had grown into a more expensive sequence than the product needed:
1010

1111
- `ProfileAgent` and `JobAgent` were generating summaries that mostly restated deterministic candidate and JD structure already available elsewhere in the system
12-
- the orchestrator ran a bounded revision loop that resent tailoring, strategy, and review through another full pass when review rejected the first draft
12+
- the orchestrator ran a bounded revision loop that resent tailoring and review through another full pass when review rejected the first draft
1313
- Review was functioning as both a gate and a revision trigger, but the product goal had shifted toward direct grounded correction rather than repeated full-pipeline iteration
14-
- real runtime logs showed that the second tailoring + strategy + review pass was one of the largest contributors to total latency
14+
- real runtime logs showed that the second tailoring + review pass was one of the largest contributors to total latency
1515
- the final high-trust stages were worth more model budget than the early summarization stages, but the routing defaults had not yet been tightened around that reality
1616

1717
At the same time, the product still needed:
@@ -29,16 +29,16 @@ The accepted workflow is:
2929

3030
1. `fit`
3131
2. `tailoring`
32-
3. `strategy`
33-
4. `review`
34-
5. `resume_generation`
32+
3. `review`
33+
4. `resume_generation`
34+
5. `cover_letter`
3535

3636
Implementation details:
3737

3838
1. remove live `ProfileAgent` and `JobAgent` execution from the active orchestrator path
3939
2. keep deterministic `CandidateProfile`, `JobDescription`, `FitAnalysis`, and `TailoredResumeDraft` as the source-of-truth inputs
40-
3. make Review return direct corrected tailoring and strategy outputs when repairs are straightforward
41-
4. stop rerunning the entire tailoring / strategy / review chain after review feedback
40+
3. make Review return direct corrected tailoring output when repairs are straightforward
41+
4. stop rerunning the entire tailoring / review chain after review feedback
4242
5. define review approval in terms of the final corrected state, not only the cleanliness of the incoming draft
4343
6. route earlier cheaper stages to cheaper reasoning levels than the final grounding stages
4444
7. tune output-token caps by observed usage instead of using one oversized default for every task
@@ -47,27 +47,27 @@ The current routing defaults following this decision are:
4747

4848
- `fit`: `gpt-5-mini-2025-08-07` with `low` reasoning and a 1600-token output cap
4949
- `tailoring`: `gpt-5-mini-2025-08-07` with `medium` reasoning and a 3200-token output cap
50-
- `strategy`: `gpt-5-mini-2025-08-07` with `low` reasoning and a 1500-token output cap
5150
- `review`: `gpt-5.4` with `medium` reasoning and a 4000-token output cap
5251
- `resume_generation`: `gpt-5.4` with `medium` reasoning and a 3000-token output cap
52+
- `cover_letter`: `gpt-5.4` with `medium` reasoning and a 3000-token output cap
5353

5454
## Alternatives Considered
5555

56-
### 1. Keep the full Profile + Job + Fit + Tailoring + Strategy + Review + Resume Generation stack
56+
### 1. Keep the full Profile + Job + Fit + Tailoring + Review + Resume Generation stack
5757

5858
Rejected because Profile and Job were not adding enough unique value relative to the deterministic data they were summarizing, while still costing additional sequential model latency.
5959

6060
### 2. Keep the revision loop but reduce model size only
6161

6262
Rejected because the largest avoidable cost was architectural: repeated full-pipeline passes. Model tuning alone would not remove that structural latency.
6363

64-
### 3. Remove Review entirely and trust Tailoring / Strategy output directly
64+
### 3. Remove Review entirely and trust Tailoring output directly
6565

6666
Rejected because Review is still the main grounding defense against unsupported claims, inferred tenure, and overstated tooling experience.
6767

6868
### 4. Lower every stage to the same cheapest reasoning tier
6969

70-
Rejected because the stages do not have the same risk profile. Review and final resume generation justify more careful reasoning than early fit and strategy summarization.
70+
Rejected because the stages do not have the same risk profile. Review and final resume generation justify more careful reasoning than early fit and tailoring guidance.
7171

7272
## Consequences
7373

0 commit comments

Comments
 (0)