feat(job-hunter): support PDF resume input via file path (#6740)#6857
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIntake now accepts either pasted resume text or a PDF file path. The intake node and graph metadata were updated to include the Changes
Sequence Diagram(s)sequenceDiagram
participant User as Client/User
participant Intake as Intake Node
participant Tool as pdf_read Tool
participant Agent as Downstream Analysis
User->>Intake: Submit resume (pasted text OR PDF file path)
alt PDF file path provided
Intake->>Tool: pdf_read(file_path)
Tool-->>Intake: extracted_text
Intake->>Agent: resume_text (extracted_text)
else Pasted text provided
Intake->>Agent: resume_text (pasted)
end
Agent-->>User: analysis / next steps
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
examples/templates/job_hunter/nodes/__init__.py (1)
11-14:⚠️ Potential issue | 🟠 MajorFix contradiction:
client_facing=Falseconflicts with system prompt that instructs user interaction.The intake node has
client_facing=Falseandinput_keys=["resume_text"], but the system prompt instructs "The user can provide their resume in two ways." This is contradictory: ifclient_facing=False, the node cannot receive direct user input, so the prompt should not ask users to provide content.Meanwhile,
agent.jsondefines the same node differently withclient_facing: trueandinput_keys: [], along with a prompt that explicitly asks: "Ask the user to provide their resume."The Python definition (which is used at runtime via
agent.pyimports) needs alignment: either setclient_facing=Trueto allow user interaction, or remove user-facing instructions and expect resume_text to be supplied from the graph input.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/templates/job_hunter/nodes/__init__.py` around lines 11 - 14, The intake node definition is inconsistent with the system prompt: update the Python node config so its runtime behavior matches agent.json and the prompt — either set client_facing=True and remove resume_text from input_keys (so the node will prompt the user for their resume), or keep client_facing=False and remove/replace any user-facing instructions in the node prompt and accept resume_text via graph inputs; adjust the symbols node_type="event_loop", client_facing, and input_keys in the __init__.py intake node to match the chosen behavior (and ensure agent.json and the node prompt are synchronized with that choice).
🧹 Nitpick comments (1)
examples/templates/job_hunter/nodes/__init__.py (1)
20-41: System prompt content diverges fromagent.json.The system prompt here differs significantly from the one in
agent.json:
- Python file: Non-interactive analysis prompt ("Do NOT wait for user confirmation")
- JSON file: Interactive multi-step prompt with user greeting, confirmation steps
Both files now include PDF handling instructions, which is good, but ensure the intended behavior is consistent. If
agent.jsonis the source of truth for deployed agents, this Python definition may be stale or used only for development/testing.Consider either:
- Keeping only one source of truth (JSON or Python) and generating/deriving the other
- Adding a comment clarifying which file is authoritative
- Synchronizing the prompts if both are used
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/templates/job_hunter/nodes/__init__.py` around lines 20 - 41, The system_prompt string and tools list in examples/templates/job_hunter/nodes/__init__.py diverge from agent.json (behavior differs: non-interactive vs interactive); choose a single source of truth (either agent.json or the Python module) and synchronize the prompts and PDF handling accordingly: update the system_prompt literal in __init__.py to exactly match the authoritative prompt in agent.json (or update agent.json to match if JSON is authoritative), ensure tools=["pdf_read"] is consistent, and add a short inline comment in __init__.py stating which file (agent.json or this Python module) is authoritative to avoid future drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@examples/templates/job_hunter/nodes/__init__.py`:
- Around line 11-14: The intake node definition is inconsistent with the system
prompt: update the Python node config so its runtime behavior matches agent.json
and the prompt — either set client_facing=True and remove resume_text from
input_keys (so the node will prompt the user for their resume), or keep
client_facing=False and remove/replace any user-facing instructions in the node
prompt and accept resume_text via graph inputs; adjust the symbols
node_type="event_loop", client_facing, and input_keys in the __init__.py intake
node to match the chosen behavior (and ensure agent.json and the node prompt are
synchronized with that choice).
---
Nitpick comments:
In `@examples/templates/job_hunter/nodes/__init__.py`:
- Around line 20-41: The system_prompt string and tools list in
examples/templates/job_hunter/nodes/__init__.py diverge from agent.json
(behavior differs: non-interactive vs interactive); choose a single source of
truth (either agent.json or the Python module) and synchronize the prompts and
PDF handling accordingly: update the system_prompt literal in __init__.py to
exactly match the authoritative prompt in agent.json (or update agent.json to
match if JSON is authoritative), ensure tools=["pdf_read"] is consistent, and
add a short inline comment in __init__.py stating which file (agent.json or this
Python module) is authoritative to avoid future drift.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7c81c1ac-bb4f-4524-8cab-cc8d5c63bd7e
📒 Files selected for processing (2)
examples/templates/job_hunter/agent.jsonexamples/templates/job_hunter/nodes/__init__.py
Description
The Job Hunter agent only accepts resumes as pasted text. This adds support
for users to provide a file path to a PDF resume, which the agent reads
using the existing
pdf_readtool.Type of Change
Related Issues
Fixes #6740
Changes Made
examples/templates/job_hunter/nodes/__init__.py— addpdf_readtointake node tools, update prompt to offer paste text or PDF file path
examples/templates/job_hunter/agent.json— same changes in theserialized spec, add
pdf_readtorequired_toolsexports/job_hunter/nodes/__init__.py— sync local copy with templateTesting
ruff check+ruff format --check)Checklist
Summary by CodeRabbit