Résumé generation flows

The generator has evolved from one model writing an entire résumé to a structured pipeline in which models still make the judgment calls, but code owns identity, attribution, ordering, and document assembly. This page maps the generation flows currently implemented in resume-lambda, with special attention to where deterministic processing replaces prompt compliance.

This is deliberately a generation-architecture view. It leaves out deployment, job execution, batching, and caching.

Model judgment or prose generation Code deterministic transformation or validation Model + code model output checked against canonical data

The progression at a glance

Family Core idea Principal trade-off
V1 One model reads the raw inputs and writes the finished résumé. Simple, but the prompt is responsible for strategy, evidence, facts, prose, and formatting at once.
V2 alpha / gamma A strategist produces a brief and evidence plan; a composer writes from it. Better separation of planning and writing, but the composer still emits the whole document.
V2 beta experiments Add critics, revision loops, or parallel specialist passes around composition. More chances to catch weak work, with more model-mediated state and reconciliation.
V3 classic Decompose the job, mine evidence per requirement, select globally, then compose. Much better evidence coverage, but the final Markdown still belongs to a model.
V3 structured Build canonical source and evidence records, ask for cited prose only, then render in code. The strongest provenance and formatting guarantees, at the cost of a stricter data contract.

Direct and prose-first flows

V1: single-pass generation

  1. ModelGenerate résuméCandidate history + job description + full format prompt
  2. CodeSanitize outputStrip fences, tool scaffolding, and leading chatter
  3. CodeLintRecord structural and candidate-history defects

V1 is the baseline. One request chooses the content, writes the prose, and emits Power Markdown. Code trims provider scaffolding and checks the result, but it does not constrain the model through an intermediate evidence representation.

V2 alpha and gamma: plan, then compose

  1. ModelStrategy + evidenceAnalyze the role and decide what candidate evidence matters
  2. ModelComposeWrite the résumé from the intermediate artifacts
  3. CodeNormalize + lintRepair mechanics and check blocking structure

Alpha established the two-stage split. Gamma keeps that topology but restores stronger writing rules: write rather than transcribe the evidence notes, vary which facet of recurring flagship work leads, avoid worn canonical phrases, and keep titles defensible. The gated gamma flow then runs the same deterministic format checks used elsewhere.

The V2 beta family explores alternate control structures around prose-first composition:

These flows can improve a model-authored draft, but critics and revisers still operate on prose or prose-like artifacts. They do not create a hard provenance boundary.

Decomposed V3 flows

V3 changes the unit of planning. Instead of asking one strategist to solve the whole job description, it decomposes the role into independently searchable desired attributes and runs an evidence miner for each.

  1. ModelDecompose JDRole-level picture plus desired attributes
  2. ModelMine per attributeOne evidence branch for each requirement
  3. ModelWinnowDeduplicate and select a global evidence plan
  4. ModelCompose MarkdownWrite the complete Power-Markdown document
  5. CodeFormat gate + lintNormalize mechanics and detect blocking defects

The standard V3 graph uses all four model stages. The fused variant combines winnowing and composition into one final call. The veracity-checked variant inserts a claim audit after composition and before the format guardrails. That audit is observational—it records whether the draft's claims are supported, but it is itself a model judgment rather than a deterministic proof.

Structured V3: models write, code assembles

The structured graphs keep V3's job decomposition and per-attribute search, but replace free-form evidence and document generation with canonical records and validated JSON.

  1. CodeNormalize sourcesStable source references and canonical identity
  2. ModelDecompose JDRanked requirements and narrative strategy
  3. Model + codeExtract passagesExact quotes, then source-span validation
  4. Model + codeSelect evidenceChoose IDs, then materialize immutable records
  5. CodeAssemble planCanonical role containers and ordering
  6. ModelRewriteCited summary, context, bullets, skills, and functional titles
  7. CodeValidate + renderCanonical metadata and Power Markdown
  8. CodeNormalize + lintFinal deterministic guardrails

There are three structured variants:

What the deterministic path actually does

“Structured” does not mean the model has no discretion. It means model discretion is confined to typed, cited fields that code can reject or safely render.

1. Build a canonical source catalog

Candidate YAML is parsed into records with stable references such as experience[0], projects[2], and education[1]. Code preserves the original ordinal and canonical display identity—actual title, employer, dates, location, project name, or credential. Roles at the same company remain separate records.

2. Validate exact evidence

An evidence miner names a source field and returns one to three exact excerpts. Code resolves each excerpt back to the canonical source text, tolerating whitespace-only formatting differences but rejecting paraphrases, unknown references, wrong source types, invalid project-to-role destinations, and conflicting parent assignments.

Accepted evidence receives a stable ID derived from its source, destination, field offsets, and text. If multiple miners find the same passage, code deduplicates it and merges the attributes it supports.

3. Materialize selection by ID

In the budgeted flow, the selector can choose evidence IDs, coverage, and a recommended level of detail. It cannot rewrite the evidence. Code looks up every selected ID in the canonical catalog, rejects unknown or duplicate IDs, and carries forward the immutable source spans and destination role.

The retain-all flow makes this decision deterministically: every validated, placeable record is kept, direct and adjacent evidence are bucketed by strength, and unplaced evidence is omitted.

4. Assemble canonical role containers

Code groups retained evidence under its validated destination role. The included role set therefore follows selected evidence, not a model-generated roster. Each container receives canonical metadata from the source catalog, and the role list is sorted by the source ordinal. Education candidates are built the same way.

Before the writing call, the full source catalog is reduced to a writer plan containing only the selected evidence, role identities, role-specific directives, job strategy, and length target. Unselected narrative is not available for opportunistic mining.

5. Constrain and validate the rewrite

The writer returns JSON containing:

Validation rejects missing, duplicated, or invented roles; unknown evidence; evidence moved between jobs; uncited titles or context; evidence reused across bullets; unsupported skills; and invalid or omitted required education. The validator then restores canonical role and education order regardless of the order returned by the model.

6. Render canonical metadata in code

The renderer writes the header, sections, experience containers, skill markup, and education markup. Actual titles, employers, dates, locations, contact data, and section structure come from the canonical plan. Only validated prose and the cited parenthetical title come from the model. Authored text is flattened to plain text and HTML-escaped before insertion.

7. Normalize and lint the result

The normalizer performs mechanical repairs: removing code fences and preambles, reconstructing a missing header from canonical candidate data, standardizing headings and bullet markers, fixing common Power-Markdown punctuation, balancing indentation, and closing a final missing div when safe.

The format gate checks defects that mechanical rewriting cannot safely infer, including an empty document, unbalanced containers, unresolved placeholders, missing employment history, missing role titles or dates, a missing header or contact block, and missing required sections. Model-authored flows may receive one narrowly scoped format-repair pass. Structured flows do not: once code renders the document, a failed gate proceeds to lint as a visible defect rather than handing canonical markup back to a model.

Decision ownership

Models decide Code decides
Which job requirements matter most Stable source references and source identity
Which validated evidence best supports the target role Whether evidence is verbatim and correctly attributed
Narrative angle and emphasis Which role each evidence record is allowed to support
Summary, context, bullet, and skill wording Actual titles, employers, dates, locations, and contact data
Evidence-backed parenthetical functional titles Role containers derived from retained evidence, and canonical ordering
In non-structured graphs, the complete document In structured graphs, final Power-Markdown markup

Registered generation versions

Graph reference Flow
main/1 V1 single pass + deterministic lint
main/2, main/7 V2 alpha two-stage; main/7 adds terminal lint
main/3, main/8 V2 beta single-stage; main/8 adds lint
main/4, main/9 V2 beta generator–critic; main/9 adds lint
main/5, main/10 V2 beta cyclic strategy/evidence/resume critics; main/10 adds lint
main/6, main/11 V2 beta parallel evidence and revision; main/11 adds lint
main/12 V3 decomposition, miners, winnow, compose, and format guardrails
main/13 V3 with fused winnow and compose
main/14 V3 with a post-compose claim audit
main/15 Structured budgeted V3
main/16 Structured retain-all V3
main/17, main/18 V2 gamma serial; main/18 adds the format gate and lint
main/19 V3 beta: structured budgeted flow with gamma-guided prose

Back to the Résumé Generator overview