# Kellogg Format, Export, and QA

Use this for markdown format, DOCX/PDF rendering, page fit, and completion
logging.

## Format contract

Keep the resume compatible with:

```text
jobs-resume-studio/scripts/generate_resume_docx.js
```

## Darsh's canonical one-page format

Use this structure by default for future tailored resumes:

1. `# DARSH SHAH`
2. contact line
3. `## Why <Company>`: a restrained, evidence-led target bridge of no more than
   2 rendered lines. Omit only when there is no target company or the bridge
   adds no value.
4. `## Education`: keep compact; show Kellogg and B.Com. as the default rows.
5. `## Professional Experience`
6. `## Additional`

Within Professional Experience:

- keep the current role first
- place the strongest direct pattern-match role second, even when that breaks
  reverse chronology
- order remaining roles for relevance and career coherence
- use official titles plus truthful functional descriptors

Within Additional, default to one compact side-project block with 2-3
substantive projects when supported:

```markdown
**Side Projects**
- One compact, specific description of a strong relevant project
- A second distinct build when it adds credible evidence
```

Do not end the resume with a generic certification-and-tools inventory. It reads
like keyword coverage rather than mature evidence. Keep work-based AI or data
enablement under the relevant employer. Use Additional for authentic,
substantive builds that give the resume a differentiated closing signal.
Include a compact tools line only when the JD has a real hard-screening need
that the experience bullets do not already demonstrate.

This format is derived from the July 22 Cursor shell and the accepted July 24
hybrid: compact hierarchy, relevance-led experience order, and most page weight
given to professional evidence.

Do not add a Professional Summary unless explicitly requested or clearly useful
for the JD. Do not use tables, nested lists, code blocks, or horizontal rules in
the resume body.

## Experience format

Use:

```markdown
### Dates | COMPANY (descriptor) | Location
**Function | Domain, Product**
- Bullet

**Optional second sub-role | Reframed angle**
- Bullet for a distinct sub-block under the same company
```

Rules:

- Keep `Dates | Entity | Location` ordering.
- Role-title lines start with `**bold**`.
- A second `**bold**` title under one company creates a secondary sub-role.
- Use a pipe `|` separator in role titles, not an em dash.
- Keep company descriptors short enough not to wrap badly.
- Use only flat `- ` bullets.

For non-bold trailing notes on role titles, close the bold marker before the
note:

```markdown
**Product Manager, Live Social Audio** | through role expansion
```

The renderer treats a line starting with `**` as a role title and renders the
post-bold remainder in regular weight.

## Education format

Use the same pipe-delimited row pattern:

```markdown
### Dates | INSTITUTION | Location
**Degree / Program Line**
- Optional bullet
Plain continuation line if needed
```

Non-bulleted continuation lines may remain directly under the education entry.

## Additional format

Use the canonical `Technical Side Project` structure above unless the target
makes a different Additional portfolio materially stronger. Do not expand
Additional unless it strengthens the target narrative. Do not let tools,
certifications, or side projects consume more visual weight than the most
relevant operating experience.

## Contact links

Use labeled markdown links in the contact line so raw URLs do not appear:

```markdown
[GitHub](https://github.com/darshshah981) | [Website](https://darshshah.xyz) | [LinkedIn](https://www.linkedin.com/in/darshshah981)
```

Keep phone and email as visible text. Bare emails auto-link to `mailto:`.

## Render DOCX

From `jobs-resume-studio/`, render with:

```bash
node scripts/generate_resume_docx.js --style=kellogg-template-tight <input.md> "<output.docx>"
```

The script takes `--style=`, optional `--bullet-after=<twips>`, optional
`--first-bullet-before=<twips>`, input path, and output path. The first-bullet
option adds a consistent gap between a role or Additional subheading and its
first bullet. There is no `--pdf` flag.

Preserve the dense July 22 rhythm by using the renderer default, or a low
`--bullet-after` value such as 11-48 twips. Do not use large bullet spacing
merely to fill the page. If the resume is underfull, first restore credible,
narratively useful evidence or side projects. For a small remaining adjustment:

```bash
node scripts/generate_resume_docx.js --style=kellogg-template-tight --bullet-after=48 <input.md> "<output.docx>"
```

## Convert DOCX to PDF

Use LibreOffice headless when available:

```bash
soffice --headless --convert-to pdf --outdir "<absolute output dir>" "<output.docx>"
```

On Windows the binary is usually:

```text
C:/Program Files/LibreOffice/program/soffice.exe
```

Pass `--outdir` as an explicit OS-native absolute path. Avoid POSIX-style
`/c/...` paths on Windows because LibreOffice can write to a bogus `C:\c\...`
tree.

## One-page verification

Always verify final one-page resumes:

- final markdown exists
- DOCX exists
- PDF exists when requested or when final workflow expects it
- PDF page count is 1
- orphan-tail check passes
- page-fill check passes

Page count example:

```bash
.venv/Scripts/python.exe -c "from pypdf import PdfReader; print(len(PdfReader('<file.pdf>').pages))"
```

Use `.venv/bin/python` on POSIX.

## Orphan-tail rule

A bullet that wraps to 3 or more lines must carry more than 5 words on its final
line. If the final line has 5 or fewer words, tighten the bullet to 2 lines when
possible while preserving the metric and core claim.

Run:

```bash
python scripts/check_bullet_wrapping.py <input.md> <rendered.pdf>
```

Exit 1 means violations. Fix every flagged bullet, re-render, and re-run both
layout checks.

## Two-line bullet target

Treat two rendered lines as the normal maximum for resume bullets. Tighten any
three-line bullet by removing low-value setup, jargon, or secondary clauses
before changing layout density. Allow a three-line bullet only when its unique,
high-value evidence cannot be preserved in two lines and the page remains easy
to scan. Record the exception during final QA.

## Page-fill rule

A one-page resume should fill the page. Run:

```bash
python scripts/check_page_fill.py <rendered.pdf>
```

The check flags underfull pages when the last line sits too far above the bottom
edge. Fix by adding spacing, restoring a trimmed bullet, adding a relevant
bullet, or expanding a side project. Use `--bullet-after=<twips>` for spacing
before inventing content.

## Visual QA

When needed, rasterize page 1 to PNG and inspect it:

```bash
soffice --headless --convert-to png --outdir "<dir>" "<file.pdf>"
```

If the markdown is correct but rendering is off, patch
`scripts/generate_resume_docx.js` rather than forcing awkward markdown
workarounds.

## Completion log

After finalizing, add an entry near the top of:

```text
jobs-resume-studio/resumes/resume_completion_log.md
```

Template:

```markdown
## YYYY-MM-DD - Company / Role

- **Path:** `...`
- **Status:** final-rendered
- **Target company:** ...
- **Target role:** ...
- **Source / bench resumes used:** ...
- **Narrative angle:** ...
- **Final exports:** `...docx`, `...pdf`
- **QA:** ...
```

After the log entry and exports exist, run the state finalizer described in
`persistence-and-state.md`. It verifies that the content-approved source hash
has not changed, records export hashes, rebuilds the broad index, and marks the
resume `rendered-final`.

If content changes afterward, run `mark-draft` before editing and do not rely on
the prior exports or completion-log status.
