Start Tailoring Session
create_tailoring_sessionStarts a job-specific resume tailoring workflow by scoring a base resume and listing gaps in fix-cost order, so you can resolve them before tailoring.
Instructions
Start the gap-analysis tailoring workflow for a job + base resume.
Calling again for the same job+base SUPERSEDES the open session (saved
resolutions become unreachable); list_tailoring_sessions shows existing
sessions. A failing fatal health gate on the base is a 409.
Scores the base (deterministic ATS engine, persisted as the 'before' score) and
returns a session whose gaps_json.categories list every gap in fix-cost order:
missing skills, wording mismatches, placement upgrades, stale evidence, adjacent
skills, title/structure. The intended flow is: gather the user's answer for each
gap, save them with resolve_gaps, then tailor_session. Each gap carries its
allowed actions. A missing skill MAY use add_keyword ONLY to add the keyword to
a skills category (placement_target.section="skills"): that inserts an
unverified skills-list item, never a fabricated bullet. The evidence-backed
alternatives are a user_input resolution (the user's answer to
enrichment.elicitation_question), attach_project, or skip.
use_presets=True also fills every gap the user's Quick tailor presets decide
(get_tailoring_options explains them), with no AI; undecided gaps are saved
as skip. When that fill fails, the error names the session it started.
enrich=True has Maestro's AI add display-only explanations to each gap (one
fast-model call with the user's key; no score, gap or career-history match
changes). Refused (409) when the user's writer setting (get_setup_status) says
the agent app writes: run it without enrich, the default, which calls no model.
Response is the session (filled, with use_presets) plus a `next` hint (null
when hints are off or unavailable). `base_anchors` are the base's emphasis
hints (countries, role, company, focus), not evidence; the anchor company is
the resume's own target, not necessarily this job's employer.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enrich | No | ||
| job_id | Yes | ||
| base_resume | Yes | ||
| use_presets | No | True: once the session is created, fill it from the user's Quick tailor presets (get_tailoring_options explains them) through resolve_gaps' honesty-gated save path, deterministically and with no AI. The presets plan only mechanical, evidence-respecting moves; the fill does not write resume text. The returned resolutions_json may already resolve every gap, including system-planned entries (payload.provenance); a gap the presets do not decide is saved as skip. A session whose answers are all skip is not an error: the presets allowed nothing for it, and resolve_gaps still saves answers on it. An unverified or absent skill enters only a skills category (add_skill_item), never as an experience or project bullet; the server does not gate edit ops the caller writes against fabricated skills, experience, metrics or dates. A stale or no-longer-open session blocks the fill (409). The `next` hint then carries the presets' standing instruction as tailor_session's user_prompt when the session has no note of its own. |