Repository navigation
fix: every skill reaches the CV, and a graduate CV fits on one page - #19
Merged
Merged
Conversation
Skills: groups past the sixth were dropped (and rows past 14 items cut), so a profile with ten overlapping groups lost Git, AWS and CI/CD. The tailored-CV prompt now asks the model to sort every skill into at most six categories; its grouping is used only if it holds exactly the profile's skills, none dropped, added or repeated. Otherwise, and for any CV not written by the model, extra groups fold into one "Other" row. No skill is cut any more. Page fit: the renderer measures a CV in WeasyPrint and, when it runs past its target (one page for a graduate, two otherwise), tries in order: tighter spacing, 10pt type, then dropping project technology lists, each role's 4th bullet, and project descriptions after their first sentence. The first step that fits is used for both the preview and the PDF; the preview endpoint now renders in a worker thread. Without WeasyPrint it renders as written. The two strict xfails from the rendering tests now pass.
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the two CV problems the rendering tests in #18 recorded as strict xfails.
Every skill reaches the CV
Before, skill groups past the sixth were dropped and rows were cut at 14 items. A profile with ten overlapping groups (left by a CV re-import) lost Git, AWS and CI/CD.
agent._regrouped_skillsaccepts that grouping only if it holds exactly the profile's skills: none dropped, added or repeated, and no unnamed group. Skills keep the profile's spelling.doc_render._skill_rowsfolds any groups past the fifth into one "Other" row. An existing "Other"-like group absorbs them and moves last.A graduate CV fits on one page
doc_render._fitted_cv_htmlmeasures the CV in WeasyPrint. When it runs past its target (one page for a graduate, two otherwise), it tries these steps in order and uses the first that fits:The steps are listed in
_FIT_STEPS. The layout steps are CSS classes on the body element (base.css), and the trims are applied to the data. The preview and the PDF use the same result. The preview endpoint now renders in a worker thread, since it lays the CV out. Where WeasyPrint can't load, the CV renders as written.Testing