diff --git a/.claude/skills/intake-profile/SKILL.md b/.claude/skills/intake-profile/SKILL.md new file mode 100644 index 0000000..f61763a --- /dev/null +++ b/.claude/skills/intake-profile/SKILL.md @@ -0,0 +1,38 @@ +--- +name: intake-profile +description: Use when a user has no profile/master.json yet and needs to create one — bootstraps the canonical master profile either by interviewing the user (no existing resume) or by importing an old PDF/CV/LinkedIn export. Triggers on "set up my resume", "I'm starting from scratch", "import my old CV". +--- + +# Intake Profile + +Produce `profile/master.json`: the candidate's full, truthful career history in +JSON Resume shape. This is the source of truth the `tailor-resume` skill draws +from. + +## Choose a path + +Ask the user which they have: +- **Nothing written down** → follow + `.claude/skills/intake-profile/references/interview-guide.md`. +- **An old resume/CV (PDF or DOCX) or a LinkedIn export** → follow + `.claude/skills/intake-profile/references/import-guide.md`. + +## Rules + +- Capture the FULL history (every role, project, skill) — `master.json` is the + superset; tailoring prunes later. Bias toward including more. +- Record only what the user actually did. Do not embellish. If a detail is + unclear (a date, a title), ask rather than guess. +- Match the field shapes in + `.claude/skills/tailor-resume/references/jsonresume-fields.md`. +- The honesty policy in + `.claude/skills/tailor-resume/references/tailoring-rules.md` also applies: + record only real facts, and never use `[VERIFY]` in the master — that marker + is only for tailored resumes. + +## Finish + +1. Write `profile/master.json`. +2. Run `npm run validate`. Fix any schema errors. +3. Tell the user the master is ready and they can now run `tailor-resume` with a + job description. diff --git a/.claude/skills/intake-profile/references/import-guide.md b/.claude/skills/intake-profile/references/import-guide.md new file mode 100644 index 0000000..ddd580e --- /dev/null +++ b/.claude/skills/intake-profile/references/import-guide.md @@ -0,0 +1,26 @@ +# Import Guide (build master.json from an old CV / LinkedIn) + +You can read PDFs and documents directly. Use that to extract a structured +master profile, then confirm with the user. + +## Steps + +1. **Read the source.** Open the user-provided PDF/DOCX resume or LinkedIn + "Export" (PDF or the `Profile.pdf`/CSV). Extract every role, project, skill, + and education entry you can find. +2. **Map to JSON Resume.** Populate `basics`, `work`, `projects`, `skills`, + `education`, `awards`, `volunteer` per + `.claude/skills/tailor-resume/references/jsonresume-fields.md`. Use `company` + and `website` field names to match the repo sample. +3. **Preserve facts exactly.** Copy dates, titles, employers, and metrics + verbatim from the source. Do NOT round, infer, or upgrade titles. +4. **Flag uncertainty.** If the source is ambiguous (e.g. a missing end date, an + unclear month), ask the user instead of guessing. Do not use `[VERIFY]` in + the master — that marker is only for tailored resumes. +5. **Fill gaps by asking.** If sections are thin (few bullets, no summary), + prompt the user to expand, the same way the interview guide does. + +## Finish + +Write `profile/master.json`, run `npm run validate`, and show the user a concise +summary of what you imported so they can correct anything. diff --git a/.claude/skills/intake-profile/references/interview-guide.md b/.claude/skills/intake-profile/references/interview-guide.md new file mode 100644 index 0000000..9f59003 --- /dev/null +++ b/.claude/skills/intake-profile/references/interview-guide.md @@ -0,0 +1,25 @@ +# Interview Guide (build master.json from scratch) + +Ask one topic at a time. Keep it conversational; don't dump every question at +once. Fill `profile/master.json` as you go. + +## Order + +1. **Basics** — full name, professional label/title, email, phone, website, + city + country, any profile links (GitHub, LinkedIn). +2. **Summary** — 2–3 sentences: who they are professionally and their focus. +3. **Work** — for each role (most recent first): company, position, start/end + dates (YYYY-MM), and 2–5 concrete accomplishments. Push for specifics: + numbers, scale, impact, technologies. One role at a time. +4. **Projects** (optional) — name, what it does, their role, tech, links. +5. **Skills** — group into named buckets (e.g. "Backend", "Cloud") with + keywords and an honest level. +6. **Education** — institution, area, study type, dates, notable courses/GPA. +7. **Awards / Volunteer** (optional) — title/org, date, one-line summary. + +## Quality bar + +- Prefer outcome-driven bullets ("cut build time 40%") over duties ("responsible + for builds"). +- Never invent metrics. If they don't know a number, leave it qualitative. +- Capture everything now; relevance is decided later during tailoring. diff --git a/.claude/skills/tailor-resume/SKILL.md b/.claude/skills/tailor-resume/SKILL.md new file mode 100644 index 0000000..4c6f93d --- /dev/null +++ b/.claude/skills/tailor-resume/SKILL.md @@ -0,0 +1,43 @@ +--- +name: tailor-resume +description: Use when tailoring a resume to a specific job description — reads profile/master.json plus a JD and writes a pruned, JD-ranked resumes//resume.json with a suggest-but-mark [VERIFY] honesty policy. Triggers on "tailor my resume", "resume for this job", "apply to ". +--- + +# Tailor Resume + +Turn a job description into a tailored resume that is a faithful, JD-ranked view +of the candidate's master profile. + +## Required reading + +Before producing anything, read these and follow them exactly: +- `.claude/skills/tailor-resume/references/tailoring-rules.md` (canonical behavior) +- `.claude/skills/tailor-resume/references/jsonresume-fields.md` (field shapes) + +## Steps + +1. **Locate the master.** Read `profile/master.json`. If it does not exist, stop + and tell the user to run the `intake-profile` skill first. +2. **Get the JD.** Accept pasted text or a file path. Identify the target + company/role and the key requirements (skills, seniority, domain, keywords). +3. **Pick a target folder.** `resumes//` using a kebab-cased + company-or-role name (e.g. `resumes/google/`). Confirm the name with the user + if ambiguous. +4. **Select & rank.** Choose the master entries (`work`, `projects`, `skills`, + etc.) most relevant to the JD; reorder so the strongest JD-relevant items lead. +5. **Rephrase truthfully.** Rewrite selected bullets toward the JD's language + without changing facts. Apply the suggest-but-mark `[VERIFY]` rule for any + plausible-but-unconfirmed addition. +6. **Write the files.** Create `resumes//resume.json` and + `resumes//config.json` (`{ "visibility": "public" }` by default). +7. **Validate.** Run `npm run validate`. Fix schema errors. If `[VERIFY]` + markers remain, list each to the user and explain they must confirm or delete + before pushing. +8. **Report gaps.** In chat, give a short "Gaps vs this JD" list of JD + requirements absent from the master — never write these into the resume. + +## Done when + +`resumes//resume.json` exists, `npm run validate` passes (or the only +blockers are `[VERIFY]` markers explicitly surfaced to the user), and the gaps +report has been delivered. diff --git a/.claude/skills/tailor-resume/references/jsonresume-fields.md b/.claude/skills/tailor-resume/references/jsonresume-fields.md new file mode 100644 index 0000000..59fca78 --- /dev/null +++ b/.claude/skills/tailor-resume/references/jsonresume-fields.md @@ -0,0 +1,34 @@ +# Resume Fields Reference (engineering theme) + +Resume documents follow the JSON Resume shape, validated by +`schema/resume.schema.json`. This repo's theme (`jsonresume-theme-engineering`) +accepts both legacy and modern field names — prefer the names already used in +`resumes/sample/resume.json` for consistency. + +## Sections the theme renders + +- `basics`: `name` (required), `label`, `email`, `phone`, `website`, `summary`, + `location { address, postalCode, city, countryCode, region }`, `profiles[]`. +- `work[]`: `company` (legacy) or `name` (modern), `position`, `website`/`url`, + `startDate`, `endDate`, `summary`, `highlights[]`. +- `volunteer[]`: `organization`, `position`, `startDate`, `endDate`, `summary`, + `highlights[]`. +- `education[]`: `institution`, `area`, `studyType`, `location`, + `specialization`, `startDate`, `endDate`, `gpa`, `courses[]`. +- `skills[]`: `name`, `level`, `keywords[]`. +- `awards[]`: `title`, `date`, `awarder`, `summary`. +- `projects[]`, `languages[]`, `interests[]` — supported, optional. + +## Dates + +Strings in `YYYY`, `YYYY-MM`, or `YYYY-MM-DD`. Omit `endDate` for current roles. + +## HTML in text fields + +`summary` and `highlights` strings may contain inline HTML — the theme renders +it. The sample uses ``, ``, and ``. Use sparingly for +emphasis and links; never to fabricate structure. + +## Validate before finishing + +Always run `npm run validate` after writing a resume document. diff --git a/.claude/skills/tailor-resume/references/tailoring-rules.md b/.claude/skills/tailor-resume/references/tailoring-rules.md new file mode 100644 index 0000000..cf7f135 --- /dev/null +++ b/.claude/skills/tailor-resume/references/tailoring-rules.md @@ -0,0 +1,63 @@ +# Tailoring Rules (canonical) + +These rules govern how a tailored `resume.json` is produced from a master +profile and a job description (JD). Both the `tailor-resume` and +`intake-profile` skills follow them. They are the single source of behavioral +truth — do not restate or fork them elsewhere. + +## Inputs + +- `profile/master.json` — the candidate's full, truthful career history. +- A job description (pasted text or a file path). +- Target output directory `resumes//` (kebab-cased company/role). + +## What you MAY do + +- Select a subset of `work`, `projects`, `skills`, `volunteer`, `education`, + and `awards` entries from the master that are relevant to the JD. +- Reorder entries and bullet `highlights` so the most JD-relevant items come + first. +- Rephrase existing bullets to use the JD's terminology, provided the meaning + and the underlying fact are unchanged (e.g. "made services faster" → + "reduced p99 latency" ONLY if the master already states a latency result). +- Tighten the `basics.summary` to foreground JD-relevant strengths drawn from + the master. + +## What you MUST NOT do + +- Never invent or alter: employer names, job titles, dates, education, + certifications, or any metric/number not present in the master. +- Never silently add a skill, tool, or achievement the master does not contain. +- Never copy JD requirements into the resume as if they were the candidate's + experience. + +## Suggest-but-mark (the one exception) + +If the JD strongly implies an addition that is *plausibly* true but NOT in the +master, you may include it as a suggestion — but you MUST append the literal +marker ` [VERIFY]` to that string. Example: + + "Led migration of core services to Kubernetes [VERIFY]" + +`scripts/validate.mjs` fails the build if any `[VERIFY]` marker survives, so the +candidate is forced to confirm (remove the marker) or delete the line before it +can deploy. This is the only sanctioned way to introduce content not in the +master. + +## Gaps report (not in the JSON) + +When the JD asks for things the master lacks, do NOT put them in `resume.json`. +Instead, after writing the file, report them to the user in chat as a short +"Gaps vs this JD" list (e.g. "JD wants Kubernetes + Go; your master shows +neither — add them to master.json if you have them"). The resume file must +contain only resume content, never commentary. + +## Output contract + +- Write `resumes//resume.json` — schema-valid per + `schema/resume.schema.json` (see `jsonresume-fields.md`). +- Write `resumes//config.json` as `{ "visibility": "public" }` unless + the user asks for `private`. +- After writing, run `npm run validate` and report the result. If it fails, + fix the file (or surface remaining `[VERIFY]` markers to the user) before + finishing. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 267c356..daedd09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,9 +35,23 @@ jobs: "${{ github.event.after }}" \ "${{ github.event.inputs.file_path }}" >> $GITHUB_OUTPUT + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Install dependencies + run: npm ci + - name: Validate resume documents + run: npm run validate + - name: Run unit tests + run: npm test + build: runs-on: ubuntu-latest - needs: detect-changes + needs: [detect-changes, validate] if: ${{ needs.detect-changes.outputs.build_resumes != '[]' }} strategy: matrix: diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..0f93aaa --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,20 @@ +name: Validate Resumes + +on: + pull_request: + workflow_dispatch: + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Install dependencies + run: npm ci + - name: Validate resume documents + run: npm run validate + - name: Run unit tests + run: npm test diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..c5640f7 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,43 @@ +# CLAUDE.md — resume-as-code conventions + +This repo is a git-driven multi-resume publisher. AI authoring sits on top of it +and must not change the build/deploy pipeline. + +## Source of truth + +- `profile/master.json` is the candidate's full, truthful history. It is the + ONLY place facts originate. +- Each `resumes//resume.json` is a tailored, JD-ranked VIEW of the + master. Tailored resumes are derived, never the source. + +## Skills + +- `intake-profile` — build `profile/master.json` (interview or import a PDF/CV/ + LinkedIn export). +- `tailor-resume` — turn a JD + the master into `resumes//resume.json`. +- Canonical behavior lives in + `.claude/skills/tailor-resume/references/tailoring-rules.md`. Read it before + editing resume content. + +## Honesty policy (enforced) + +- Never fabricate employers, titles, dates, education, or metrics. +- Plausible-but-unconfirmed additions must be tagged ` [VERIFY]`. +- `npm run validate` fails on schema errors and on any surviving `[VERIFY]` + marker, so unverified claims cannot deploy. +- The gate runs on the standard push/PR path (`build` depends on `validate`); it + assumes resumes reach `main` through that flow, not via out-of-band manual job + runs. + +## Layout + +- `schema/resume.schema.json` — validation schema (lenient; accepts legacy + `company`/`website` and modern `name`/`url`). +- `scripts/validate.mjs` + `scripts/lib/` — validator (run `npm run validate`). +- `scripts/build-resume.sh`, `scripts/deploy-resume.sh`, + `scripts/delete-repo.sh`, `.github/workflows/ci.yml` — the publish pipeline. + Do not modify when working on authoring features. + +## Before finishing any resume change + +Run `npm run validate` and `npm test`. diff --git a/README.md b/README.md index 31c6933..d938083 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,31 @@ Check your Actions tab to see if its running correctly. ![resume](assets/resume.gif) +## AI Authoring (Optional) + +Generate a tailored resume from a job description using Claude Code (works great +in Codespaces — no API key needed). + +1. **Build your master profile once.** Run the `intake-profile` skill. It either + interviews you or imports an old PDF/CV/LinkedIn export into + `profile/master.json` — your full, truthful career history. (See + `profile/master.example.json` for the shape.) + +2. **Tailor to a job.** Run the `tailor-resume` skill with the job description. + It writes `resumes//resume.json` as a ranked, JD-focused view of your + master, and reports any gaps between the JD and your experience. + +3. **Honesty gate.** The skills never invent facts. Anything plausible but + unconfirmed is tagged `[VERIFY]`; `npm run validate` (run automatically in CI) + fails until you confirm or remove it — so nothing unverified is ever + published. + +4. **Push as usual.** Pushing `resumes//resume.json` triggers the normal + build and deploy. + +See `examples/` for a full worked example (master profile → JD → tailored +resume). Validate any resume locally with `npm run validate`. + ## Advanced (Optional) Want to preview your resume before pushing? diff --git a/docs/superpowers/plans/2026-06-11-ai-resume-skills.md b/docs/superpowers/plans/2026-06-11-ai-resume-skills.md new file mode 100644 index 0000000..5d2998c --- /dev/null +++ b/docs/superpowers/plans/2026-06-11-ai-resume-skills.md @@ -0,0 +1,1268 @@ +# AI Resume Authoring Skills Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Add a Claude Code skill–based authoring layer that turns a job description into a tailored, schema-valid `resume.json`, plus a machine-enforced honesty gate and a starter scaffold — without touching the existing build/deploy pipeline. + +**Architecture:** A canonical `profile/master.json` (full career history) is the source of truth. The `intake-profile` skill bootstraps it (interview or PDF/CV/LinkedIn import). The `tailor-resume` skill reads it plus a JD and writes `resumes//resume.json` as a pruned, ranked view, marking any inferred addition `[VERIFY]`. A dependency-free-ish `validate.mjs` (uses `ajv`) schema-checks every resume document and fails if any `[VERIFY]` marker survives, so unverified claims cannot deploy. CI gains a validate gate; build/deploy/delete are unchanged. + +**Tech Stack:** Node 22 (ESM `.mjs`), `ajv` + `ajv-formats` (validation), `node:test` (tests), JSON Resume schema, Claude Code Skills (`.claude/skills/`), existing `resumed` + `jsonresume-theme-engineering` + Playwright pipeline. + +**Plan-level refinements from the spec (intentional):** +- No separate `master.schema.json`; `master.json` validates against `resume.schema.json` (it is simply a fuller JSON Resume document). +- `schema/resume.schema.json` is hand-authored and lenient (accepts both legacy `company`/`website` and modern `name`/`url`) so the existing `resumes/sample/resume.json` and the engineering theme keep working. +- The `[VERIFY]` gate applies to every validated document (stricter than "resumes only" — a marker should never survive anywhere). + +--- + +## File Structure + +**Create:** +- `schema/resume.schema.json` — lenient JSON Schema (draft-07) for resume documents. +- `scripts/lib/validate-core.mjs` — pure validation functions (schema compile, document validate, `[VERIFY]` scan). +- `scripts/lib/validate-core.test.mjs` — unit tests for the core. +- `scripts/validate.mjs` — CLI: collects resume documents, validates, prints, sets exit code. +- `.github/workflows/validate.yml` — PR/dispatch validation gate. +- `.claude/skills/tailor-resume/SKILL.md` — JD + master → tailored resume. +- `.claude/skills/tailor-resume/references/tailoring-rules.md` — canonical behavior (shared by both skills). +- `.claude/skills/tailor-resume/references/jsonresume-fields.md` — field reference + theme-allowed HTML. +- `.claude/skills/intake-profile/SKILL.md` — bootstrap `master.json`. +- `.claude/skills/intake-profile/references/interview-guide.md` — Q&A flow. +- `.claude/skills/intake-profile/references/import-guide.md` — PDF/CV/LinkedIn extraction. +- `profile/master.example.json` — worked-example master. +- `examples/jd-google-swe.txt` — sample JD. +- `examples/expected-resume.json` — tailored output (kept out of `resumes/` so CI won't deploy it). +- `examples/README.md` — walks the example end to end. +- `CLAUDE.md` — repo conventions for Claude Code. + +**Modify:** +- `package.json` — add `validate` + `test` scripts and `ajv`/`ajv-formats` devDependencies. +- `.github/workflows/ci.yml` — add a `validate` job; make `build` depend on it. +- `README.md` — add an "AI Authoring" section. + +--- + +## Task 1: Project deps + resume JSON Schema + +**Files:** +- Create: `schema/resume.schema.json` +- Modify: `package.json` + +- [ ] **Step 1: Add scripts and dev dependencies to `package.json`** + +Replace the file contents with (keeps existing scripts; adds `validate`, `test`, and dev deps; does NOT add `"type": "module"` because `export-pdf.js` is CommonJS — our new files use the `.mjs` extension instead): + +```json +{ + "dependencies": { + "jsonresume-theme-engineering": "^0.3.1", + "playwright": "^1.54.1", + "resumed": "^6.0.0" + }, + "devDependencies": { + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1" + }, + "scripts": { + "export-html": "npx resumed render $FILE_PATH/resume.json --output $FILE_PATH/index.html --theme jsonresume-theme-engineering", + "export-pdf": "node export-pdf.js $FILE_PATH", + "validate": "node scripts/validate.mjs", + "test": "node --test" + } +} +``` + +- [ ] **Step 2: Install dependencies** + +Run: `npm install` +Expected: `package-lock.json` updates; `node_modules/ajv` and `node_modules/ajv-formats` present. No errors. + +- [ ] **Step 3: Create `schema/resume.schema.json`** + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://resume-as-code/schema/resume.schema.json", + "title": "Resume (engineering-theme compatible)", + "type": "object", + "required": ["basics"], + "additionalProperties": true, + "definitions": { + "isoDate": { + "type": "string", + "pattern": "^[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?$" + }, + "stringArray": { + "type": "array", + "items": { "type": "string" } + } + }, + "properties": { + "basics": { + "type": "object", + "required": ["name"], + "additionalProperties": true, + "properties": { + "name": { "type": "string", "minLength": 1 }, + "label": { "type": "string" }, + "email": { "type": "string", "format": "email" }, + "phone": { "type": "string" }, + "website": { "type": "string" }, + "url": { "type": "string" }, + "summary": { "type": "string" }, + "location": { + "type": "object", + "additionalProperties": true, + "properties": { + "address": { "type": "string" }, + "postalCode": { "type": "string" }, + "city": { "type": "string" }, + "countryCode": { "type": "string" }, + "region": { "type": "string" } + } + }, + "profiles": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "network": { "type": "string" }, + "username": { "type": "string" }, + "url": { "type": "string" } + } + } + } + } + }, + "work": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "company": { "type": "string" }, + "name": { "type": "string" }, + "position": { "type": "string" }, + "website": { "type": "string" }, + "url": { "type": "string" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" }, + "summary": { "type": "string" }, + "highlights": { "$ref": "#/definitions/stringArray" } + } + } + }, + "volunteer": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "organization": { "type": "string" }, + "position": { "type": "string" }, + "url": { "type": "string" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" }, + "summary": { "type": "string" }, + "highlights": { "$ref": "#/definitions/stringArray" } + } + } + }, + "education": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "institution": { "type": "string" }, + "area": { "type": "string" }, + "studyType": { "type": "string" }, + "location": { "type": "string" }, + "specialization": { "type": "string" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" }, + "gpa": { "type": "string" }, + "score": { "type": "string" }, + "courses": { "$ref": "#/definitions/stringArray" } + } + } + }, + "skills": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { "type": "string" }, + "level": { "type": "string" }, + "keywords": { "$ref": "#/definitions/stringArray" } + } + } + }, + "awards": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "title": { "type": "string" }, + "date": { "$ref": "#/definitions/isoDate" }, + "awarder": { "type": "string" }, + "summary": { "type": "string" } + } + } + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { "type": "string" }, + "description": { "type": "string" }, + "url": { "type": "string" }, + "keywords": { "$ref": "#/definitions/stringArray" }, + "highlights": { "$ref": "#/definitions/stringArray" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" } + } + } + }, + "languages": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "language": { "type": "string" }, + "fluency": { "type": "string" } + } + } + }, + "interests": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { "type": "string" }, + "keywords": { "$ref": "#/definitions/stringArray" } + } + } + } + } +} +``` + +- [ ] **Step 4: Commit** + +```bash +git add package.json package-lock.json schema/resume.schema.json +git commit -m "feat: add resume JSON schema and validation deps" +``` + +--- + +## Task 2: Validation core (TDD) + +**Files:** +- Create: `scripts/lib/validate-core.mjs` +- Test: `scripts/lib/validate-core.test.mjs` + +- [ ] **Step 1: Write the failing tests** + +Create `scripts/lib/validate-core.test.mjs`: + +```js +import { test } from "node:test" +import assert from "node:assert/strict" +import { + createValidator, + validateDocument, + findVerifyMarkers, +} from "./validate-core.mjs" + +const schema = { + type: "object", + required: ["basics"], + additionalProperties: true, + properties: { + basics: { + type: "object", + required: ["name"], + additionalProperties: true, + properties: { name: { type: "string", minLength: 1 } }, + }, + }, +} + +test("validateDocument passes a valid doc", () => { + const validate = createValidator(schema) + const res = validateDocument(validate, { basics: { name: "Ada" } }) + assert.equal(res.valid, true) + assert.deepEqual(res.errors, []) +}) + +test("validateDocument fails when a required field is missing", () => { + const validate = createValidator(schema) + const res = validateDocument(validate, { basics: {} }) + assert.equal(res.valid, false) + assert.ok(res.errors.length > 0) +}) + +test("findVerifyMarkers finds a nested marker with its path", () => { + const doc = { + basics: { name: "Ada" }, + work: [{ highlights: ["Shipped X", "Led K8s migration [VERIFY]"] }], + } + assert.deepEqual(findVerifyMarkers(doc), ["work[0].highlights[1]"]) +}) + +test("findVerifyMarkers returns empty for a clean doc", () => { + assert.deepEqual(findVerifyMarkers({ basics: { name: "Ada" }, work: [] }), []) +}) +``` + +- [ ] **Step 2: Run the tests to verify they fail** + +Run: `node --test scripts/lib/validate-core.test.mjs` +Expected: FAIL — `Cannot find module './validate-core.mjs'` (file does not exist yet). + +- [ ] **Step 3: Write the implementation** + +Create `scripts/lib/validate-core.mjs`: + +```js +import Ajv from "ajv" +import addFormats from "ajv-formats" + +// Compile a JSON schema into a reusable validator function. +export function createValidator(schema) { + const ajv = new Ajv({ allErrors: true, strict: false }) + addFormats(ajv) + return ajv.compile(schema) +} + +// Validate a document; return { valid, errors } with human-readable messages. +export function validateDocument(validate, doc) { + const valid = validate(doc) + if (valid) return { valid: true, errors: [] } + const errors = (validate.errors || []).map((e) => { + const where = e.instancePath || "(root)" + return `${where} ${e.message}` + }) + return { valid: false, errors } +} + +// Recursively collect dotted paths of any string containing the [VERIFY] marker. +export function findVerifyMarkers(value, path = "") { + const hits = [] + if (typeof value === "string") { + if (value.includes("[VERIFY]")) hits.push(path || "(root)") + } else if (Array.isArray(value)) { + value.forEach((item, i) => + hits.push(...findVerifyMarkers(item, `${path}[${i}]`)) + ) + } else if (value && typeof value === "object") { + for (const [k, v] of Object.entries(value)) { + hits.push(...findVerifyMarkers(v, path ? `${path}.${k}` : k)) + } + } + return hits +} +``` + +- [ ] **Step 4: Run the tests to verify they pass** + +Run: `node --test scripts/lib/validate-core.test.mjs` +Expected: PASS — 4 tests pass, 0 fail. + +- [ ] **Step 5: Commit** + +```bash +git add scripts/lib/validate-core.mjs scripts/lib/validate-core.test.mjs +git commit -m "feat: add resume validation core with [VERIFY] scan" +``` + +--- + +## Task 3: Validation CLI + +**Files:** +- Create: `scripts/validate.mjs` + +- [ ] **Step 1: Write the CLI** + +Create `scripts/validate.mjs`: + +```js +#!/usr/bin/env node +import fs from "node:fs" +import path from "node:path" +import { + createValidator, + validateDocument, + findVerifyMarkers, +} from "./lib/validate-core.mjs" + +const ROOT = process.cwd() +const SCHEMA_PATH = path.join(ROOT, "schema", "resume.schema.json") + +function readJson(file) { + return JSON.parse(fs.readFileSync(file, "utf8")) +} + +// Every resume-shaped document we want to keep valid. +function collectFiles() { + const files = [] + const resumesDir = path.join(ROOT, "resumes") + if (fs.existsSync(resumesDir)) { + for (const entry of fs.readdirSync(resumesDir, { withFileTypes: true })) { + if (!entry.isDirectory()) continue + const f = path.join(resumesDir, entry.name, "resume.json") + if (fs.existsSync(f)) files.push(f) + } + } + for (const extra of [ + path.join(ROOT, "profile", "master.json"), + path.join(ROOT, "profile", "master.example.json"), + path.join(ROOT, "examples", "expected-resume.json"), + ]) { + if (fs.existsSync(extra)) files.push(extra) + } + return files +} + +function main() { + const validate = createValidator(readJson(SCHEMA_PATH)) + const files = collectFiles() + + if (files.length === 0) { + console.log("No resume documents found to validate.") + return 0 + } + + let failed = 0 + for (const file of files) { + const rel = path.relative(ROOT, file) + let doc + try { + doc = readJson(file) + } catch (err) { + console.error(`✗ ${rel}: invalid JSON — ${err.message}`) + failed++ + continue + } + + const { valid, errors } = validateDocument(validate, doc) + const markers = findVerifyMarkers(doc) + + if (valid && markers.length === 0) { + console.log(`✓ ${rel}`) + continue + } + + failed++ + for (const e of errors) console.error(`✗ ${rel}: ${e}`) + for (const m of markers) { + console.error( + `✗ ${rel}: unresolved [VERIFY] at ${m} — confirm the claim and remove the marker, or delete the line` + ) + } + } + + if (failed > 0) { + console.error(`\n${failed} document(s) failed validation.`) + return 1 + } + console.log(`\nAll ${files.length} document(s) valid.`) + return 0 +} + +process.exit(main()) +``` + +- [ ] **Step 2: Run validation against the existing sample** + +Run: `npm run validate` +Expected: PASS — prints `✓ resumes/sample/resume.json` then `All 1 document(s) valid.` and exits 0. (Only the sample exists at this point; example files arrive in Task 8.) + +- [ ] **Step 3: Manually confirm the `[VERIFY]` gate fails a bad document** + +Run: +```bash +mkdir -p /tmp/verify-check && printf '%s' '{"basics":{"name":"T"},"work":[{"company":"X","highlights":["did thing [VERIFY]"]}]}' > resumes/_verifytmp/resume.json 2>/dev/null || (mkdir -p resumes/_verifytmp && printf '%s' '{"basics":{"name":"T"},"work":[{"company":"X","highlights":["did thing [VERIFY]"]}]}' > resumes/_verifytmp/resume.json); npm run validate; echo "exit=$?" +``` +Expected: prints `✗ resumes/_verifytmp/resume.json: unresolved [VERIFY] at work[0].highlights[0] ...`, then `exit=1`. + +- [ ] **Step 4: Remove the temporary fixture and reconfirm green** + +Run: `rm -rf resumes/_verifytmp && npm run validate; echo "exit=$?"` +Expected: `✓ resumes/sample/resume.json`, `All 1 document(s) valid.`, `exit=0`. + +- [ ] **Step 5: Commit** + +```bash +git add scripts/validate.mjs +git commit -m "feat: add validate CLI gating schema and [VERIFY] markers" +``` + +--- + +## Task 4: CI validation gate + +**Files:** +- Modify: `.github/workflows/ci.yml` +- Create: `.github/workflows/validate.yml` + +- [ ] **Step 1: Add a `validate` job to `ci.yml` and make `build` depend on it** + +In `.github/workflows/ci.yml`, insert this job immediately after the `detect-changes` job (before `build:`): + +```yaml + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Install dependencies + run: npm ci + - name: Validate resume documents + run: npm run validate + - name: Run unit tests + run: npm test +``` + +Then change the `build` job's dependency line from: + +```yaml + build: + runs-on: ubuntu-latest + needs: detect-changes +``` + +to: + +```yaml + build: + runs-on: ubuntu-latest + needs: [detect-changes, validate] +``` + +Leave the `build` job's `if:` condition, and the `deploy` and `delete` jobs, unchanged. + +- [ ] **Step 2: Create the PR/dispatch gate `validate.yml`** + +`ci.yml` only triggers on pushes that change `resume.json`/`config.json`, so add a standalone workflow that validates on pull requests (and manual dispatch), catching bad `master.json`/schema even when no resume changed. Create `.github/workflows/validate.yml`: + +```yaml +name: Validate Resumes + +on: + pull_request: + workflow_dispatch: + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Install dependencies + run: npm ci + - name: Validate resume documents + run: npm run validate + - name: Run unit tests + run: npm test +``` + +- [ ] **Step 3: Lint the workflow YAML locally** + +Run: `node -e "const f=require('fs');for(const p of ['.github/workflows/ci.yml','.github/workflows/validate.yml']){f.readFileSync(p,'utf8')}; console.log('files readable')"` +Expected: prints `files readable`. (Confirms the files exist and are readable; full YAML parsing is validated by GitHub on push.) + +- [ ] **Step 4: Commit** + +```bash +git add .github/workflows/ci.yml .github/workflows/validate.yml +git commit -m "ci: gate build on resume validation and add PR validate workflow" +``` + +--- + +## Task 5: Canonical tailoring logic + +**Files:** +- Create: `.claude/skills/tailor-resume/references/tailoring-rules.md` +- Create: `.claude/skills/tailor-resume/references/jsonresume-fields.md` + +- [ ] **Step 1: Create `tailoring-rules.md`** + +```markdown +# Tailoring Rules (canonical) + +These rules govern how a tailored `resume.json` is produced from a master +profile and a job description (JD). Both the `tailor-resume` and +`intake-profile` skills follow them. They are the single source of behavioral +truth — do not restate or fork them elsewhere. + +## Inputs + +- `profile/master.json` — the candidate's full, truthful career history. +- A job description (pasted text or a file path). +- Target output directory `resumes//` (kebab-cased company/role). + +## What you MAY do + +- Select a subset of `work`, `projects`, `skills`, `volunteer`, `education`, + and `awards` entries from the master that are relevant to the JD. +- Reorder entries and bullet `highlights` so the most JD-relevant items come + first. +- Rephrase existing bullets to use the JD's terminology, provided the meaning + and the underlying fact are unchanged (e.g. "made services faster" → + "reduced p99 latency" ONLY if the master already states a latency result). +- Tighten the `basics.summary` to foreground JD-relevant strengths drawn from + the master. + +## What you MUST NOT do + +- Never invent or alter: employer names, job titles, dates, education, + certifications, or any metric/number not present in the master. +- Never silently add a skill, tool, or achievement the master does not contain. +- Never copy JD requirements into the resume as if they were the candidate's + experience. + +## Suggest-but-mark (the one exception) + +If the JD strongly implies an addition that is *plausibly* true but NOT in the +master, you may include it as a suggestion — but you MUST append the literal +marker ` [VERIFY]` to that string. Example: + + "Led migration of core services to Kubernetes [VERIFY]" + +`scripts/validate.mjs` fails the build if any `[VERIFY]` marker survives, so the +candidate is forced to confirm (remove the marker) or delete the line before it +can deploy. This is the only sanctioned way to introduce content not in the +master. + +## Gaps report (not in the JSON) + +When the JD asks for things the master lacks, do NOT put them in `resume.json`. +Instead, after writing the file, report them to the user in chat as a short +"Gaps vs this JD" list (e.g. "JD wants Kubernetes + Go; your master shows +neither — add them to master.json if you have them"). The resume file must +contain only resume content, never commentary. + +## Output contract + +- Write `resumes//resume.json` — schema-valid per + `schema/resume.schema.json` (see `jsonresume-fields.md`). +- Write `resumes//config.json` as `{ "visibility": "public" }` unless + the user asks for `private`. +- After writing, run `npm run validate` and report the result. If it fails, + fix the file (or surface remaining `[VERIFY]` markers to the user) before + finishing. +``` + +- [ ] **Step 2: Create `jsonresume-fields.md`** + +```markdown +# Resume Fields Reference (engineering theme) + +Resume documents follow the JSON Resume shape, validated by +`schema/resume.schema.json`. This repo's theme (`jsonresume-theme-engineering`) +accepts both legacy and modern field names — prefer the names already used in +`resumes/sample/resume.json` for consistency. + +## Sections the theme renders + +- `basics`: `name` (required), `label`, `email`, `phone`, `website`, `summary`, + `location { address, postalCode, city, countryCode, region }`, `profiles[]`. +- `work[]`: `company` (legacy) or `name` (modern), `position`, `website`/`url`, + `startDate`, `endDate`, `summary`, `highlights[]`. +- `volunteer[]`: `organization`, `position`, `startDate`, `endDate`, `summary`, + `highlights[]`. +- `education[]`: `institution`, `area`, `studyType`, `location`, + `specialization`, `startDate`, `endDate`, `gpa`, `courses[]`. +- `skills[]`: `name`, `level`, `keywords[]`. +- `awards[]`: `title`, `date`, `awarder`, `summary`. +- `projects[]`, `languages[]`, `interests[]` — supported, optional. + +## Dates + +Strings in `YYYY`, `YYYY-MM`, or `YYYY-MM-DD`. Omit `endDate` for current roles. + +## HTML in text fields + +`summary` and `highlights` strings may contain inline HTML — the theme renders +it. The sample uses ``, ``, and ``. Use sparingly for +emphasis and links; never to fabricate structure. + +## Validate before finishing + +Always run `npm run validate` after writing a resume document. +``` + +- [ ] **Step 3: Commit** + +```bash +git add .claude/skills/tailor-resume/references/tailoring-rules.md .claude/skills/tailor-resume/references/jsonresume-fields.md +git commit -m "docs: add canonical tailoring rules and field reference" +``` + +--- + +## Task 6: `tailor-resume` skill + +**Files:** +- Create: `.claude/skills/tailor-resume/SKILL.md` + +- [ ] **Step 1: Create `SKILL.md`** + +```markdown +--- +name: tailor-resume +description: Use when tailoring a resume to a specific job description — reads profile/master.json plus a JD and writes a pruned, JD-ranked resumes//resume.json with a suggest-but-mark [VERIFY] honesty policy. Triggers on "tailor my resume", "resume for this job", "apply to ". +--- + +# Tailor Resume + +Turn a job description into a tailored resume that is a faithful, JD-ranked view +of the candidate's master profile. + +## Required reading + +Before producing anything, read these and follow them exactly: +- `.claude/skills/tailor-resume/references/tailoring-rules.md` (canonical behavior) +- `.claude/skills/tailor-resume/references/jsonresume-fields.md` (field shapes) + +## Steps + +1. **Locate the master.** Read `profile/master.json`. If it does not exist, stop + and tell the user to run the `intake-profile` skill first. +2. **Get the JD.** Accept pasted text or a file path. Identify the target + company/role and the key requirements (skills, seniority, domain, keywords). +3. **Pick a target folder.** `resumes//` using a kebab-cased + company-or-role name (e.g. `resumes/google/`). Confirm the name with the user + if ambiguous. +4. **Select & rank.** Choose the master entries (`work`, `projects`, `skills`, + etc.) most relevant to the JD; reorder so the strongest JD-relevant items lead. +5. **Rephrase truthfully.** Rewrite selected bullets toward the JD's language + without changing facts. Apply the suggest-but-mark `[VERIFY]` rule for any + plausible-but-unconfirmed addition. +6. **Write the files.** Create `resumes//resume.json` and + `resumes//config.json` (`{ "visibility": "public" }` by default). +7. **Validate.** Run `npm run validate`. Fix schema errors. If `[VERIFY]` + markers remain, list each to the user and explain they must confirm or delete + before pushing. +8. **Report gaps.** In chat, give a short "Gaps vs this JD" list of JD + requirements absent from the master — never write these into the resume. + +## Done when + +`resumes//resume.json` exists, `npm run validate` passes (or the only +blockers are `[VERIFY]` markers explicitly surfaced to the user), and the gaps +report has been delivered. +``` + +- [ ] **Step 2: Verify the skill file parses (frontmatter present)** + +Run: `node -e "const s=require('fs').readFileSync('.claude/skills/tailor-resume/SKILL.md','utf8'); if(!s.startsWith('---')) throw new Error('missing frontmatter'); console.log('ok')"` +Expected: prints `ok`. + +- [ ] **Step 3: Commit** + +```bash +git add .claude/skills/tailor-resume/SKILL.md +git commit -m "feat: add tailor-resume skill" +``` + +--- + +## Task 7: `intake-profile` skill + +**Files:** +- Create: `.claude/skills/intake-profile/SKILL.md` +- Create: `.claude/skills/intake-profile/references/interview-guide.md` +- Create: `.claude/skills/intake-profile/references/import-guide.md` + +- [ ] **Step 1: Create `SKILL.md`** + +```markdown +--- +name: intake-profile +description: Use when a user has no profile/master.json yet and needs to create one — bootstraps the canonical master profile either by interviewing the user (no existing resume) or by importing an old PDF/CV/LinkedIn export. Triggers on "set up my resume", "I'm starting from scratch", "import my old CV". +--- + +# Intake Profile + +Produce `profile/master.json`: the candidate's full, truthful career history in +JSON Resume shape. This is the source of truth the `tailor-resume` skill draws +from. + +## Choose a path + +Ask the user which they have: +- **Nothing written down** → follow + `.claude/skills/intake-profile/references/interview-guide.md`. +- **An old resume/CV (PDF or DOCX) or a LinkedIn export** → follow + `.claude/skills/intake-profile/references/import-guide.md`. + +## Rules + +- Capture the FULL history (every role, project, skill) — `master.json` is the + superset; tailoring prunes later. Bias toward including more. +- Record only what the user actually did. Do not embellish. If a detail is + unclear (a date, a title), ask rather than guess. +- Match the field shapes in + `.claude/skills/tailor-resume/references/jsonresume-fields.md`. + +## Finish + +1. Write `profile/master.json`. +2. Run `npm run validate`. Fix any schema errors. +3. Tell the user the master is ready and they can now run `tailor-resume` with a + job description. +``` + +- [ ] **Step 2: Create `interview-guide.md`** + +```markdown +# Interview Guide (build master.json from scratch) + +Ask one topic at a time. Keep it conversational; don't dump every question at +once. Fill `profile/master.json` as you go. + +## Order + +1. **Basics** — full name, professional label/title, email, phone, website, + city + country, any profile links (GitHub, LinkedIn). +2. **Summary** — 2–3 sentences: who they are professionally and their focus. +3. **Work** — for each role (most recent first): company, position, start/end + dates (YYYY-MM), and 2–5 concrete accomplishments. Push for specifics: + numbers, scale, impact, technologies. One role at a time. +4. **Projects** (optional) — name, what it does, their role, tech, links. +5. **Skills** — group into named buckets (e.g. "Backend", "Cloud") with + keywords and an honest level. +6. **Education** — institution, area, study type, dates, notable courses/GPA. +7. **Awards / Volunteer** (optional) — title/org, date, one-line summary. + +## Quality bar + +- Prefer outcome-driven bullets ("cut build time 40%") over duties ("responsible + for builds"). +- Never invent metrics. If they don't know a number, leave it qualitative. +- Capture everything now; relevance is decided later during tailoring. +``` + +- [ ] **Step 3: Create `import-guide.md`** + +```markdown +# Import Guide (build master.json from an old CV / LinkedIn) + +You can read PDFs and documents directly. Use that to extract a structured +master profile, then confirm with the user. + +## Steps + +1. **Read the source.** Open the user-provided PDF/DOCX resume or LinkedIn + "Export" (PDF or the `Profile.pdf`/CSV). Extract every role, project, skill, + and education entry you can find. +2. **Map to JSON Resume.** Populate `basics`, `work`, `projects`, `skills`, + `education`, `awards`, `volunteer` per + `.claude/skills/tailor-resume/references/jsonresume-fields.md`. Use `company` + and `website` field names to match the repo sample. +3. **Preserve facts exactly.** Copy dates, titles, employers, and metrics + verbatim from the source. Do NOT round, infer, or upgrade titles. +4. **Flag uncertainty.** If the source is ambiguous (e.g. a missing end date, an + unclear month), ask the user instead of guessing. Do not use `[VERIFY]` in + the master — that marker is only for tailored resumes. +5. **Fill gaps by asking.** If sections are thin (few bullets, no summary), + prompt the user to expand, the same way the interview guide does. + +## Finish + +Write `profile/master.json`, run `npm run validate`, and show the user a concise +summary of what you imported so they can correct anything. +``` + +- [ ] **Step 4: Verify the skill file parses** + +Run: `node -e "const s=require('fs').readFileSync('.claude/skills/intake-profile/SKILL.md','utf8'); if(!s.startsWith('---')) throw new Error('missing frontmatter'); console.log('ok')"` +Expected: prints `ok`. + +- [ ] **Step 5: Commit** + +```bash +git add .claude/skills/intake-profile/ +git commit -m "feat: add intake-profile skill with interview and import guides" +``` + +--- + +## Task 8: Worked example + +**Files:** +- Create: `profile/master.example.json` +- Create: `examples/jd-google-swe.txt` +- Create: `examples/expected-resume.json` +- Create: `examples/README.md` + +- [ ] **Step 1: Create `profile/master.example.json` (a fuller history than the sample)** + +```json +{ + "basics": { + "name": "Richard Hendricks", + "label": "Software Engineer", + "email": "richard.hendricks@example.com", + "phone": "(+1) 555-0100", + "website": "https://richardhendricks.example.com", + "summary": "Backend-leaning software engineer with experience in distributed systems, data compression, and high-throughput services.", + "location": { + "city": "Palo Alto", + "countryCode": "US", + "region": "CA" + }, + "profiles": [ + { "network": "GitHub", "username": "rhendricks", "url": "https://github.com/rhendricks" } + ] + }, + "work": [ + { + "company": "Pied Piper", + "position": "Founding Engineer", + "website": "https://piedpiper.example.com", + "startDate": "2014-04", + "summary": "Built a distributed lossless compression platform from zero to production.", + "highlights": [ + "Designed a sharded storage layer in Go handling 50k requests/sec", + "Cut p99 API latency from 800ms to 120ms by redesigning the hot path", + "Built a copyright-detection algorithm used by independent artists" + ] + }, + { + "company": "Hooli", + "position": "Senior Software Engineer", + "website": "https://hooli.example.com", + "startDate": "2013-06", + "endDate": "2014-04", + "highlights": [ + "Optimized backend search indexing, reducing reindex time by 35%", + "Mentored three junior engineers through onboarding" + ] + }, + { + "company": "Hooli", + "position": "Software Engineer", + "startDate": "2012-01", + "endDate": "2013-06", + "highlights": [ + "Shipped bugfixes and features across the Java services platform", + "Wrote the team's first integration test suite" + ] + } + ], + "projects": [ + { + "name": "Middle-Out", + "description": "Open-source compression library", + "url": "https://github.com/rhendricks/middle-out", + "keywords": ["Go", "Compression", "CLI"], + "highlights": ["1.2k GitHub stars", "Used in three production pipelines"] + } + ], + "skills": [ + { "name": "Backend", "level": "Advanced", "keywords": ["Go", "Java", "gRPC", "PostgreSQL"] }, + { "name": "Distributed Systems", "level": "Advanced", "keywords": ["Sharding", "Caching", "Load balancing"] }, + { "name": "Web Development", "level": "Intermediate", "keywords": ["HTML", "CSS", "JavaScript"] }, + { "name": "Compression", "level": "Expert", "keywords": ["Lossless", "MP4", "Adaptive coding"] } + ], + "education": [ + { + "institution": "Stanford University", + "area": "Computer Science", + "studyType": "B.S.", + "location": "Palo Alto, CA", + "specialization": "Machine Learning", + "startDate": "2008-09", + "endDate": "2012-01", + "gpa": "3.9", + "courses": ["CS2011 - Java Introduction", "DB1101 - Basic SQL"] + } + ], + "awards": [ + { + "title": "Digital Compression Pioneer Award", + "date": "2014-11", + "awarder": "TechCrunch", + "summary": "Recognized for advances in lossless compression." + } + ], + "volunteer": [ + { + "organization": "CoderDojo", + "position": "Teacher", + "startDate": "2012-01", + "endDate": "2013-01", + "summary": "Free coding clubs for young people.", + "highlights": ["Awarded 'Teacher of the Month'"] + } + ] +} +``` + +- [ ] **Step 2: Create `examples/jd-google-swe.txt`** + +```text +Software Engineer, Backend — Google + +Minimum qualifications: +- Bachelor's degree in Computer Science or equivalent experience. +- Experience with backend development in Go, Java, or C++. +- Experience building and scaling distributed systems. + +Preferred qualifications: +- Experience optimizing service latency and throughput at scale. +- Familiarity with gRPC, sharded storage, and caching strategies. +- Open-source contributions. + +About the role: +You will design, build, and operate large-scale backend services, focusing on +reliability, latency, and throughput. You will collaborate across teams and +mentor other engineers. +``` + +- [ ] **Step 3: Create `examples/expected-resume.json` (tailored from the master for the JD — schema-valid, no `[VERIFY]`)** + +```json +{ + "basics": { + "name": "Richard Hendricks", + "label": "Backend Software Engineer", + "email": "richard.hendricks@example.com", + "phone": "(+1) 555-0100", + "website": "https://richardhendricks.example.com", + "summary": "Backend software engineer specializing in distributed systems and high-throughput services in Go and Java, with a track record of cutting latency and scaling storage layers.", + "location": { + "city": "Palo Alto", + "countryCode": "US", + "region": "CA" + }, + "profiles": [ + { "network": "GitHub", "username": "rhendricks", "url": "https://github.com/rhendricks" } + ] + }, + "work": [ + { + "company": "Pied Piper", + "position": "Founding Engineer", + "website": "https://piedpiper.example.com", + "startDate": "2014-04", + "summary": "Built a distributed lossless compression platform from zero to production.", + "highlights": [ + "Designed a sharded storage layer in Go handling 50k requests/sec", + "Reduced p99 API latency from 800ms to 120ms by redesigning the hot path", + "Built a copyright-detection algorithm used by independent artists" + ] + }, + { + "company": "Hooli", + "position": "Senior Software Engineer", + "website": "https://hooli.example.com", + "startDate": "2013-06", + "endDate": "2014-04", + "highlights": [ + "Optimized backend search indexing throughput, reducing reindex time by 35%", + "Mentored three junior engineers through onboarding" + ] + } + ], + "projects": [ + { + "name": "Middle-Out", + "description": "Open-source compression library", + "url": "https://github.com/rhendricks/middle-out", + "keywords": ["Go", "Compression", "CLI"], + "highlights": ["1.2k GitHub stars", "Used in three production pipelines"] + } + ], + "skills": [ + { "name": "Backend", "level": "Advanced", "keywords": ["Go", "Java", "gRPC", "PostgreSQL"] }, + { "name": "Distributed Systems", "level": "Advanced", "keywords": ["Sharding", "Caching", "Load balancing"] } + ], + "education": [ + { + "institution": "Stanford University", + "area": "Computer Science", + "studyType": "B.S.", + "location": "Palo Alto, CA", + "startDate": "2008-09", + "endDate": "2012-01" + } + ] +} +``` + +- [ ] **Step 4: Create `examples/README.md`** + +```markdown +# Worked Example + +This folder shows the AI authoring flow end to end with sample data. + +- `../profile/master.example.json` — a candidate's full career history (the + source of truth the `intake-profile` skill produces). +- `jd-google-swe.txt` — a sample job description. +- `expected-resume.json` — the tailored resume the `tailor-resume` skill is + expected to produce from the master for that JD: backend/distributed-systems + work and skills are selected and ranked first, an unrelated volunteer entry + and the "Web Development" skill bucket are dropped, and a latency bullet is + rephrased to match the JD ("reduced p99 latency") — all still backed by the + master. No facts are invented, so there are no `[VERIFY]` markers. + +`expected-resume.json` lives here, not under `resumes/`, so the deploy workflow +(which triggers on `resumes/**/resume.json`) never publishes the example. It is +validated by `npm run validate`. + +## Try it + +In Claude Code: run the `tailor-resume` skill, point it at +`profile/master.example.json` and `examples/jd-google-swe.txt`, and compare its +output to `expected-resume.json`. +``` + +- [ ] **Step 5: Validate the whole example set** + +Run: `npm run validate` +Expected: PASS — prints `✓` for `resumes/sample/resume.json`, +`profile/master.example.json`, and `examples/expected-resume.json`, then +`All 3 document(s) valid.` and exits 0. + +- [ ] **Step 6: Commit** + +```bash +git add profile/master.example.json examples/ +git commit -m "docs: add worked example (master, JD, tailored output)" +``` + +--- + +## Task 9: Repo docs + +**Files:** +- Create: `CLAUDE.md` +- Modify: `README.md` + +- [ ] **Step 1: Create `CLAUDE.md`** + +```markdown +# CLAUDE.md — resume-as-code conventions + +This repo is a git-driven multi-resume publisher. AI authoring sits on top of it +and must not change the build/deploy pipeline. + +## Source of truth + +- `profile/master.json` is the candidate's full, truthful history. It is the + ONLY place facts originate. +- Each `resumes//resume.json` is a tailored, JD-ranked VIEW of the + master. Tailored resumes are derived, never the source. + +## Skills + +- `intake-profile` — build `profile/master.json` (interview or import a PDF/CV/ + LinkedIn export). +- `tailor-resume` — turn a JD + the master into `resumes//resume.json`. +- Canonical behavior lives in + `.claude/skills/tailor-resume/references/tailoring-rules.md`. Read it before + editing resume content. + +## Honesty policy (enforced) + +- Never fabricate employers, titles, dates, education, or metrics. +- Plausible-but-unconfirmed additions must be tagged ` [VERIFY]`. +- `npm run validate` fails on schema errors and on any surviving `[VERIFY]` + marker, so unverified claims cannot deploy. + +## Layout + +- `schema/resume.schema.json` — validation schema (lenient; accepts legacy + `company`/`website` and modern `name`/`url`). +- `scripts/validate.mjs` + `scripts/lib/` — validator (run `npm run validate`). +- `scripts/build-resume.sh`, `scripts/deploy-resume.sh`, + `scripts/delete-repo.sh`, `.github/workflows/ci.yml` — the publish pipeline. + Do not modify when working on authoring features. + +## Before finishing any resume change + +Run `npm run validate` and `npm test`. +``` + +- [ ] **Step 2: Add an "AI Authoring" section to `README.md`** + +Insert the following block immediately before the `## Advanced (Optional)` +heading in `README.md`: + +```markdown +## AI Authoring (Optional) + +Generate a tailored resume from a job description using Claude Code (works great +in Codespaces — no API key needed). + +1. **Build your master profile once.** Run the `intake-profile` skill. It either + interviews you or imports an old PDF/CV/LinkedIn export into + `profile/master.json` — your full, truthful career history. (See + `profile/master.example.json` for the shape.) + +2. **Tailor to a job.** Run the `tailor-resume` skill with the job description. + It writes `resumes//resume.json` as a ranked, JD-focused view of your + master, and reports any gaps between the JD and your experience. + +3. **Honesty gate.** The skills never invent facts. Anything plausible but + unconfirmed is tagged `[VERIFY]`; `npm run validate` (run automatically in CI) + fails until you confirm or remove it — so nothing unverified is ever + published. + +4. **Push as usual.** Pushing `resumes//resume.json` triggers the normal + build and deploy. + +See `examples/` for a full worked example (master profile → JD → tailored +resume). Validate any resume locally with `npm run validate`. +``` + +- [ ] **Step 3: Confirm docs are consistent and validation still passes** + +Run: `npm run validate && npm test` +Expected: validation prints `All 3 document(s) valid.`; tests pass (4 tests, 0 fail). + +- [ ] **Step 4: Commit** + +```bash +git add CLAUDE.md README.md +git commit -m "docs: document AI authoring flow and repo conventions" +``` + +--- + +## Self-Review + +**Spec coverage:** +- Skills-only delivery → Tasks 6, 7 (no CLI/SDK — consistent with the dropped-CLI decision). +- Master-profile source of truth + import/interview bootstrap → Task 7 (`intake-profile` + both guides), Task 8 (`master.example.json`). +- Tailored per-company view → Task 6 (`tailor-resume`), Task 5 (`tailoring-rules.md`). +- Suggest-but-mark `[VERIFY]` policy → Task 5 (rules), Task 2/3 (machine gate), Task 9 (documented). +- JSON Resume schema + validation → Task 1 (schema), Tasks 2–3 (validator), Task 4 (CI gate). +- Worked example (profile + JD + output) → Task 8. +- Docs + repo CLAUDE.md → Task 9. +- Build/deploy/delete untouched → only `ci.yml` gains a gate job + dependency edit (Task 4); scripts unchanged. + +**Placeholder scan:** No TBD/TODO; every code/JSON/markdown step contains full content; every command has expected output. + +**Type/name consistency:** `createValidator`, `validateDocument`, `findVerifyMarkers` are defined in Task 2 and imported with the same names in Tasks 2 (tests) and 3 (CLI). The `[VERIFY]` marker string, `profile/master.json`, `schema/resume.schema.json`, and `resumes//resume.json` paths are used consistently across tasks. `npm run validate` and `npm test` scripts are defined in Task 1 before first use. +``` diff --git a/docs/superpowers/specs/2026-06-11-ai-resume-skills-design.md b/docs/superpowers/specs/2026-06-11-ai-resume-skills-design.md new file mode 100644 index 0000000..6bd9fd1 --- /dev/null +++ b/docs/superpowers/specs/2026-06-11-ai-resume-skills-design.md @@ -0,0 +1,182 @@ +# AI Resume Authoring Skills — Design + +**Date:** 2026-06-11 +**Status:** Approved (design); pending implementation plan +**Repo:** resume-as-code + +## Problem + +`resume-as-code` is a git-driven multi-resume publisher. A user keeps +`resumes//resume.json` (JSON Resume schema) plus `config.json`; on push, +GitHub Actions renders HTML via `resumed` + `jsonresume-theme-engineering`, +exports a PDF with Playwright, and deploys each resume to its own +`-resume` repo on GitHub Pages. + +There is no authoring help. A user must hand-write `resume.json`, and there is +no support for tailoring a resume to a specific job description (JD) or for +newcomers who have nothing written down yet. + +## Goal + +Add an **authoring layer** that generates a tailored, structured `resume.json` +from a job description, plus a starter scaffold for people beginning from +scratch. The existing build/deploy pipeline is **not changed**. + +## Decisions (from brainstorming) + +| Decision | Choice | +|---|---| +| Delivery mechanism | **Claude Code Skills only** (CLI explicitly dropped as YAGNI — no automation use case, and tailoring is human-in-the-loop) | +| Source of truth | **`profile/master.json`** = canonical full career history, bootstrapped by interview **or** import of an old PDF/CV/LinkedIn export | +| Tailored output | Each `resumes//resume.json` is a pruned, JD-ranked **view** of the master | +| Honesty policy | **Suggest-but-mark**: AI may select/reorder/rephrase real content freely; inferred additions must be tagged `[VERIFY]`; dates/employers/titles/education/metrics are never fabricated | +| Logic sharing | One canonical `tailoring-rules.md` referenced by both skills (CLI-ready later, no lock-in) | +| Scaffold | Intake skill, JSON Resume schema + validation, worked example, docs + repo `CLAUDE.md` | + +## Architecture + +Three planes. The publish plane is the existing CI, untouched. + +``` +AUTHOR (new) VALIDATE (new) PUBLISH (existing) +───────────── ────────────── ────────────────── +intake-profile ─┐ push resumes/**/resume.json + (interview OR ├─► profile/master.json ──┐ → detect-changes + PDF/CV import)│ (canonical truth) │ → build (resumed → HTML → PDF) + │ ├─► validate.mjs → deploy to -resume + Pages +tailor-resume ──┘ + a Job Description ───┘ (schema + + (Skill) ──► resumes//resume.json + config.json [VERIFY] gate) +``` + +`master.json` holds the full history (the truth). Each +`resumes//resume.json` is a tailored selection from it. The build and +deploy scripts and workflow are unchanged. + +## File layout (new additions) + +``` +.claude/skills/ + intake-profile/ + SKILL.md # bootstrap profile/master.json + references/interview-guide.md # Q&A flow for beginners + references/import-guide.md # parse old PDF/CV/LinkedIn → master.json + tailor-resume/ + SKILL.md # JD + master → tailored resume.json + references/tailoring-rules.md # ★ canonical behavior (shared by both skills) + references/jsonresume-fields.md # field reference + theme-allowed HTML + +profile/ + master.json # the user's truth (committed in their fork) + master.example.json # worked-example input + +schema/ + resume.schema.json # vendored JSON Resume schema + master.schema.json # superset of resume schema (e.g. extra-bullets pool) + +scripts/ + validate.mjs # validate master + every resumes/*/resume.json + +examples/ + jd-google-swe.txt # sample job description + expected-resume.json # tailored output (kept OUT of resumes/ so CI won't deploy it) + README.md # explains the worked example end to end + +CLAUDE.md # repo conventions for Claude Code +``` + +`package.json` adds a `"validate"` script and dev dependencies `ajv` + +`ajv-formats`. No AI SDK and no API key are required — the skills run inside +Claude Code. + +## Components + +### `tailor-resume` skill (primary surface) +- **Input:** a job description (pasted or a file path) and which master profile to use. +- **Output:** `resumes//resume.json` and `resumes//config.json` + (visibility defaults to `public`). +- **Behavior:** + - Select and rank bullets/skills from `master.json` against the JD. + - Rephrase selected content toward the JD's language and keywords. + - Tag any inferred addition with a trailing `[VERIFY]`. + - Report JD-vs-profile **gaps to the user in chat** — never written into the JSON. +- **What does it do / how used / depends on:** Produces a tailored resume view; + invoked in Claude Code; depends on `master.json`, `tailoring-rules.md`, + `jsonresume-fields.md`, and the schema. + +### `intake-profile` skill (newcomer scaffold) +- Builds `profile/master.json` two ways: + - **Interview:** guided Q&A for someone starting from nothing (`interview-guide.md`). + - **Import:** read an old PDF/CV or LinkedIn export and extract a structured + master (`import-guide.md`). Claude Code reads PDFs natively, so no PDF + parsing library is needed. +- **Depends on:** `master.schema.json`, the reference guides. + +### `tailoring-rules.md` (canonical behavior) +The single source of behavioral truth, referenced by both skills: +- Use only facts present in `master.json`; select / reorder / rephrase freely. +- May **suggest** inferred additions, but must append `[VERIFY]`; never silent invention. +- Never fabricate or alter dates, employers, titles, education, or metrics. +- Missing JD requirements → gaps report to the user, not bullets in the JSON. +- Preserve JSON Resume schema validity; HTML is allowed in `summary`/`highlights` + per the engineering theme (documented in `jsonresume-fields.md`). +- Emit `resumes//config.json` with default `{"visibility":"public"}`. + +### `validate.mjs` (machine guardrail, no AI) +- Schema-validates `profile/master.json` against `master.schema.json` and every + `resumes/*/resume.json` against `resume.schema.json` using `ajv`. +- **Fails if any `[VERIFY]` marker remains** in a `resumes/**/resume.json`. + Unverified claims therefore cannot deploy — the user must confirm (remove the + marker) or delete the line first. +- Run via `npm run validate` and in CI before build. + +## Data flow + +- **Beginner:** `intake-profile` (interview *or* PDF/CV import) → `master.json` + → `npm run validate` → `tailor-resume ` → `resumes//resume.json` → + resolve any `[VERIFY]` → push → existing CI builds and deploys. +- **Returning:** edit `master.json` once → run `tailor-resume` per new JD. + +## Error handling + +- `validate.mjs` exits non-zero with a readable message on schema violations or + leftover `[VERIFY]` markers; CI fails the build before any deploy. +- `tailor-resume` writes JSON that is schema-valid by construction and reports + gaps separately so the resume file never contains commentary. +- `intake-profile` import: if a source field is ambiguous or missing, the skill + asks the user rather than guessing protected fields (dates/titles). + +## Testing + +- **`validate.mjs`:** unit tests with fixtures — valid, schema-invalid, and + contains-`[VERIFY]` — asserting exit codes and messages. +- **Worked example as golden path:** `master.example.json` + + `examples/jd-google-swe.txt` produce `examples/expected-resume.json`, which + must pass `validate.mjs` (schema-valid, no `[VERIFY]` left). +- **Skills:** verified through the committed worked example and a manual + Codespaces run; `SKILL.md` files kept minimal and declarative. +- **CI:** add a `validate` job that runs on pull requests and before `build`. + +## CI changes + +Add a `validate` job to `.github/workflows/ci.yml` that runs `npm ci` then +`npm run validate`, gating the existing `build` job. The `build`, `deploy`, and +`delete` jobs and all scripts under `scripts/` (except the new `validate.mjs`) +are unchanged. + +## Build order (each step shippable) + +1. `schema/` + `validate.mjs` + `npm run validate` + CI validate step *(no AI)*. +2. `tailoring-rules.md` + `jsonresume-fields.md` (canonical logic). +3. `tailor-resume` skill (primary). +4. `intake-profile` skill (interview + PDF/CV/LinkedIn import). +5. Worked example (`profile/master.example.json`, `examples/*`) + README "AI + Authoring" section + `CLAUDE.md`. +6. `[VERIFY]` deploy-gate in `validate.mjs` + tests. + +## Out of scope (YAGNI) + +- A Node/CLI tailoring tool and any Anthropic SDK / API-key handling — dropped; + `tailoring-rules.md` stays standalone so a thin CLI can be added later if a + real automation need appears. +- AI generation inside CI. +- Changing the theme, build, deploy, or delete pipeline. diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..8f0dd12 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,38 @@ +# Worked Example + +This folder shows the AI authoring flow end to end with sample data. + +- `../profile/master.example.json` — a candidate's full career history (the + source of truth the `intake-profile` skill produces). +- `jd-google-swe.txt` — a sample job description. +- `expected-resume.json` — the tailored resume the `tailor-resume` skill is + expected to produce from the master for that JD. The tailoring: + - keeps and ranks the backend/distributed-systems work first, and **drops** + the junior third role (2012–2013 Hooli Software Engineer) that adds little + for a senior backend JD; + - keeps the **Backend** and **Distributed Systems** skill buckets and **drops** + the unrelated **Web Development** and **Compression** buckets; + - drops the **CoderDojo volunteer** and **awards** entries; + - trims less-relevant education detail (GPA, specialization, courses); + - sharpens `basics.label` from "Software Engineer" to "Backend Software + Engineer" — a headline change supported by the master's own + "backend-leaning" summary (note: this is the freeform headline, **not** an + employer-granted job title; `position` fields are copied verbatim and never + altered); + - rephrases one latency bullet's verb ("Cut" → "Reduced") without changing the + numbers; + - applies light inline `` emphasis to JD keywords (e.g. `Go`) in the + summary and a highlight — styling only, no fact change. + + Every fact traces back to the master — nothing is invented — so there are no + `[VERIFY]` markers. + +`expected-resume.json` lives here, not under `resumes/`, so the deploy workflow +(which triggers on `resumes/**/resume.json`) never publishes the example. It is +validated by `npm run validate`. + +## Try it + +In Claude Code: run the `tailor-resume` skill, point it at +`profile/master.example.json` and `examples/jd-google-swe.txt`, and compare its +output to `expected-resume.json`. diff --git a/examples/expected-resume.json b/examples/expected-resume.json new file mode 100644 index 0000000..f283c3a --- /dev/null +++ b/examples/expected-resume.json @@ -0,0 +1,66 @@ +{ + "basics": { + "name": "Richard Hendricks", + "label": "Backend Software Engineer", + "email": "richard.hendricks@example.com", + "phone": "(+1) 555-0100", + "website": "https://richardhendricks.example.com", + "summary": "Backend software engineer specializing in distributed systems and high-throughput services in Go and Java, with a track record of cutting latency and scaling storage layers.", + "location": { + "city": "Palo Alto", + "countryCode": "US", + "region": "CA" + }, + "profiles": [ + { "network": "GitHub", "username": "rhendricks", "url": "https://github.com/rhendricks" } + ] + }, + "work": [ + { + "company": "Pied Piper", + "position": "Founding Engineer", + "website": "https://piedpiper.example.com", + "startDate": "2014-04", + "summary": "Built a distributed lossless compression platform from zero to production.", + "highlights": [ + "Designed a sharded storage layer in Go handling 50k requests/sec", + "Reduced p99 API latency from 800ms to 120ms by redesigning the hot path", + "Built a copyright-detection algorithm used by independent artists" + ] + }, + { + "company": "Hooli", + "position": "Senior Software Engineer", + "website": "https://hooli.example.com", + "startDate": "2013-06", + "endDate": "2014-04", + "highlights": [ + "Optimized backend search indexing, reducing reindex time by 35%", + "Mentored three junior engineers through onboarding" + ] + } + ], + "projects": [ + { + "name": "Middle-Out", + "description": "Open-source compression library", + "url": "https://github.com/rhendricks/middle-out", + "keywords": ["Go", "Compression", "CLI"], + "highlights": ["1.2k GitHub stars", "Used in three production pipelines"] + } + ], + "skills": [ + { "name": "Backend", "level": "Advanced", "keywords": ["Go", "Java", "gRPC", "PostgreSQL"] }, + { "name": "Distributed Systems", "level": "Advanced", "keywords": ["Sharding", "Caching", "Load balancing"] } + ], + "education": [ + { + "institution": "Stanford University", + "area": "Computer Science", + "studyType": "B.S.", + "location": "Palo Alto, CA", + "startDate": "2008-09", + "endDate": "2012-01" + } + ] +} diff --git a/examples/jd-google-swe.txt b/examples/jd-google-swe.txt new file mode 100644 index 0000000..41d2b1c --- /dev/null +++ b/examples/jd-google-swe.txt @@ -0,0 +1,16 @@ +Software Engineer, Backend — Google + +Minimum qualifications: +- Bachelor's degree in Computer Science or equivalent experience. +- Experience with backend development in Go, Java, or C++. +- Experience building and scaling distributed systems. + +Preferred qualifications: +- Experience optimizing service latency and throughput at scale. +- Familiarity with gRPC, sharded storage, and caching strategies. +- Open-source contributions. + +About the role: +You will design, build, and operate large-scale backend services, focusing on +reliability, latency, and throughput. You will collaborate across teams and +mentor other engineers. diff --git a/package-lock.json b/package-lock.json index bcbbc9c..fe7aca8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,10 @@ "jsonresume-theme-engineering": "^0.3.1", "playwright": "^1.54.1", "resumed": "^6.0.0" + }, + "devDependencies": { + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1" } }, "node_modules/@babel/code-frame": { @@ -16,7 +20,6 @@ "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", @@ -32,7 +35,6 @@ "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=6.9.0" } @@ -55,7 +57,6 @@ "integrity": "sha512-pHUn6ZRt39bP3698HFQlu2ZHCkS/lPcpv7fVQcGBSzNNygw171UXAKrCUhy+TEMw4lEttOKDgNpb04hwUAJeiQ==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "debug": "^4.4.1", "extract-zip": "^2.0.1", @@ -77,8 +78,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/@types/node": { "version": "24.1.0", @@ -86,7 +86,6 @@ "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "undici-types": "~7.8.0" } @@ -97,7 +96,6 @@ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@types/node": "*" } @@ -114,18 +112,51 @@ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 14" } }, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=8" } @@ -136,7 +167,6 @@ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -152,8 +182,7 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0", - "optional": true, - "peer": true + "optional": true }, "node_modules/ast-types": { "version": "0.13.4", @@ -161,7 +190,6 @@ "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.0.1" }, @@ -174,16 +202,14 @@ "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", "license": "Apache-2.0", - "optional": true, - "peer": true + "optional": true }, "node_modules/bare-events": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.6.0.tgz", "integrity": "sha512-EKZ5BTXYExaNqi3I3f9RtEsaI/xBSGjE0XZCZilPzFAV/goswFHuPd9jEZlPIZ/iNZJwDSao9qRiScySz7MbQg==", "license": "Apache-2.0", - "optional": true, - "peer": true + "optional": true }, "node_modules/bare-fs": { "version": "4.1.6", @@ -191,7 +217,6 @@ "integrity": "sha512-25RsLF33BqooOEFNdMcEhMpJy8EoR88zSMrnOQOaM3USnOK2VmaJ1uaQEwPA6AQjrv1lXChScosN6CzbwbO9OQ==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", @@ -215,7 +240,6 @@ "integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==", "license": "Apache-2.0", "optional": true, - "peer": true, "engines": { "bare": ">=1.14.0" } @@ -226,7 +250,6 @@ "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "bare-os": "^3.0.1" } @@ -237,7 +260,6 @@ "integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "streamx": "^2.21.0" }, @@ -260,7 +282,6 @@ "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=10.0.0" } @@ -271,7 +292,6 @@ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": "*" } @@ -282,7 +302,6 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=6" } @@ -293,7 +312,6 @@ "integrity": "sha512-L2BKQ0rSLADgbPMIdDh3wnYHs3EiUiMay2Sq0CTolheaADmWIf6Pe+T9LJRcnh5rcMz0U7MVk0cQVvKsGRMa1g==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "mitt": "^3.0.1", "zod": "^3.24.1" @@ -308,7 +326,6 @@ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -324,7 +341,6 @@ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -337,8 +353,7 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/cosmiconfig": { "version": "9.0.0", @@ -346,7 +361,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -374,7 +388,6 @@ "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 14" } @@ -385,7 +398,6 @@ "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "ms": "^2.1.3" }, @@ -404,7 +416,6 @@ "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -414,21 +425,12 @@ "node": ">= 14" } }, - "node_modules/devtools-protocol": { - "version": "0.0.1464554", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1464554.tgz", - "integrity": "sha512-CAoP3lYfwAGQTaAXYvA6JZR0fjGUb7qec1qf4mToyoH2TZgUFeIqYcjh6f9jNuhHfuZiEdH+PONHYrLhRQX6aw==", - "license": "BSD-3-Clause", - "optional": true, - "peer": true - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/end-of-stream": { "version": "1.4.5", @@ -436,7 +438,6 @@ "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "once": "^1.4.0" } @@ -447,7 +448,6 @@ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=6" } @@ -458,7 +458,6 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -469,7 +468,6 @@ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=6" } @@ -480,7 +478,6 @@ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "license": "BSD-2-Clause", "optional": true, - "peer": true, "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -503,7 +500,6 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "license": "BSD-2-Clause", "optional": true, - "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -518,7 +514,6 @@ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "license": "BSD-2-Clause", "optional": true, - "peer": true, "engines": { "node": ">=4.0" } @@ -529,7 +524,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "license": "BSD-2-Clause", "optional": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -540,7 +534,6 @@ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "license": "BSD-2-Clause", "optional": true, - "peer": true, "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -556,13 +549,36 @@ "@types/yauzl": "^2.9.1" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", "license": "MIT", - "optional": true, - "peer": true + "optional": true + }, + "node_modules/fast-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", + "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" }, "node_modules/fd-slicer": { "version": "1.1.0", @@ -570,7 +586,6 @@ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "pend": "~1.2.0" } @@ -595,7 +610,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "license": "ISC", "optional": true, - "peer": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -606,7 +620,6 @@ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "pump": "^3.0.0" }, @@ -623,7 +636,6 @@ "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", @@ -660,7 +672,6 @@ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -675,7 +686,6 @@ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "^7.1.2", "debug": "4" @@ -690,7 +700,6 @@ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -708,7 +717,6 @@ "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -722,8 +730,7 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", @@ -731,7 +738,6 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=8" } @@ -741,8 +747,7 @@ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -750,7 +755,6 @@ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -763,16 +767,21 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "license": "MIT", - "optional": true, - "peer": true + "optional": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" }, "node_modules/jsonresume-theme-engineering": { "version": "0.3.1", @@ -799,8 +808,7 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/lru-cache": { "version": "7.18.3", @@ -808,7 +816,6 @@ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "license": "ISC", "optional": true, - "peer": true, "engines": { "node": ">=12" } @@ -827,8 +834,7 @@ "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/moment": { "version": "2.30.1", @@ -853,8 +859,7 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/neo-async": { "version": "2.6.2", @@ -868,7 +873,6 @@ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 0.4.0" } @@ -879,7 +883,6 @@ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "wrappy": "1" } @@ -890,7 +893,6 @@ "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", @@ -911,7 +913,6 @@ "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" @@ -926,7 +927,6 @@ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "callsites": "^3.0.0" }, @@ -940,7 +940,6 @@ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -959,16 +958,14 @@ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/playwright": { "version": "1.54.1", @@ -1006,7 +1003,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=0.4.0" } @@ -1017,7 +1013,6 @@ "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", @@ -1037,8 +1032,7 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/pump": { "version": "3.0.3", @@ -1046,42 +1040,17 @@ "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, - "node_modules/puppeteer": { - "version": "24.14.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.14.0.tgz", - "integrity": "sha512-GB7suRDkp9pUnxpNGAORICQCtw11KFbg6U2iJXVTflzJLK5D1qzq8xOOmLgN/QnDBpDMdpn96ri52XkuN83Giw==", - "hasInstallScript": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@puppeteer/browsers": "2.10.6", - "chromium-bidi": "7.1.1", - "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1464554", - "puppeteer-core": "24.14.0", - "typed-query-selector": "^2.12.0" - }, - "bin": { - "puppeteer": "lib/cjs/puppeteer/node/cli.js" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/puppeteer-core": { "version": "24.14.0", "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.14.0.tgz", "integrity": "sha512-NO9XpCl+i8oB0zJp81iPhzMo2QK8/JTj4ramSvTpGCo9CPCNo4AZ8qVOGpSgXzlcOfOT3VHOkzTfPo08GOE5jA==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "@puppeteer/browsers": "2.10.6", "chromium-bidi": "7.1.1", @@ -1100,7 +1069,16 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "license": "MIT", "optional": true, - "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1111,7 +1089,6 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=4" } @@ -1159,7 +1136,6 @@ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "license": "ISC", "optional": true, - "peer": true, "bin": { "semver": "bin/semver.js" }, @@ -1173,7 +1149,6 @@ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -1185,7 +1160,6 @@ "integrity": "sha512-pe4Y2yzru68lXCb38aAqRf5gvN8YdjP1lok5o0J7BOHljkyCGKVz7H3vpVIXKD27rj2giOJ7DwVyk/GWrPHDWA==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -1201,7 +1175,6 @@ "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", @@ -1225,8 +1198,7 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "license": "BSD-3-Clause", - "optional": true, - "peer": true + "optional": true }, "node_modules/streamx": { "version": "2.22.1", @@ -1234,7 +1206,6 @@ "integrity": "sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" @@ -1249,7 +1220,6 @@ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -1265,7 +1235,6 @@ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1291,7 +1260,6 @@ "integrity": "sha512-5Mty5y/sOF1YWj1J6GiBodjlDc05CUR8PKXrsnFAiSG0xA+GHeWLovaZPYUDXkH/1iKRf2+M5+OrRgzC7O9b7w==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" @@ -1307,7 +1275,6 @@ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -1320,7 +1287,6 @@ "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", "license": "Apache-2.0", "optional": true, - "peer": true, "dependencies": { "b4a": "^1.6.4" } @@ -1330,16 +1296,14 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD", - "optional": true, - "peer": true + "optional": true }, "node_modules/typed-query-selector": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/uglify-js": { "version": "3.19.3", @@ -1359,8 +1323,7 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/wordwrap": { "version": "1.0.0", @@ -1374,7 +1337,6 @@ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -1392,8 +1354,7 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/ws": { "version": "8.18.3", @@ -1401,7 +1362,6 @@ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=10.0.0" }, @@ -1424,7 +1384,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "license": "ISC", "optional": true, - "peer": true, "engines": { "node": ">=10" } @@ -1435,7 +1394,6 @@ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -1455,7 +1413,6 @@ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "license": "ISC", "optional": true, - "peer": true, "engines": { "node": ">=12" } @@ -1466,7 +1423,6 @@ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -1478,7 +1434,6 @@ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", "optional": true, - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 8836b46..3b9d97b 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,14 @@ "playwright": "^1.54.1", "resumed": "^6.0.0" }, + "devDependencies": { + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1" + }, "scripts": { "export-html": "npx resumed render $FILE_PATH/resume.json --output $FILE_PATH/index.html --theme jsonresume-theme-engineering", - "export-pdf": "node export-pdf.js $FILE_PATH" + "export-pdf": "node export-pdf.js $FILE_PATH", + "validate": "node scripts/validate.mjs", + "test": "node --test" } } diff --git a/profile/master.example.json b/profile/master.example.json new file mode 100644 index 0000000..8fb76ec --- /dev/null +++ b/profile/master.example.json @@ -0,0 +1,99 @@ +{ + "basics": { + "name": "Richard Hendricks", + "label": "Software Engineer", + "email": "richard.hendricks@example.com", + "phone": "(+1) 555-0100", + "website": "https://richardhendricks.example.com", + "summary": "Backend-leaning software engineer with experience in distributed systems, data compression, and high-throughput services.", + "location": { + "city": "Palo Alto", + "countryCode": "US", + "region": "CA" + }, + "profiles": [ + { "network": "GitHub", "username": "rhendricks", "url": "https://github.com/rhendricks" } + ] + }, + "work": [ + { + "company": "Pied Piper", + "position": "Founding Engineer", + "website": "https://piedpiper.example.com", + "startDate": "2014-04", + "summary": "Built a distributed lossless compression platform from zero to production.", + "highlights": [ + "Designed a sharded storage layer in Go handling 50k requests/sec", + "Cut p99 API latency from 800ms to 120ms by redesigning the hot path", + "Built a copyright-detection algorithm used by independent artists" + ] + }, + { + "company": "Hooli", + "position": "Senior Software Engineer", + "website": "https://hooli.example.com", + "startDate": "2013-06", + "endDate": "2014-04", + "highlights": [ + "Optimized backend search indexing, reducing reindex time by 35%", + "Mentored three junior engineers through onboarding" + ] + }, + { + "company": "Hooli", + "position": "Software Engineer", + "startDate": "2012-01", + "endDate": "2013-06", + "highlights": [ + "Shipped bugfixes and features across the Java services platform", + "Wrote the team's first integration test suite" + ] + } + ], + "projects": [ + { + "name": "Middle-Out", + "description": "Open-source compression library", + "url": "https://github.com/rhendricks/middle-out", + "keywords": ["Go", "Compression", "CLI"], + "highlights": ["1.2k GitHub stars", "Used in three production pipelines"] + } + ], + "skills": [ + { "name": "Backend", "level": "Advanced", "keywords": ["Go", "Java", "gRPC", "PostgreSQL"] }, + { "name": "Distributed Systems", "level": "Advanced", "keywords": ["Sharding", "Caching", "Load balancing"] }, + { "name": "Web Development", "level": "Intermediate", "keywords": ["HTML", "CSS", "JavaScript"] }, + { "name": "Compression", "level": "Expert", "keywords": ["Lossless", "MP4", "Adaptive coding"] } + ], + "education": [ + { + "institution": "Stanford University", + "area": "Computer Science", + "studyType": "B.S.", + "location": "Palo Alto, CA", + "specialization": "Machine Learning", + "startDate": "2008-09", + "endDate": "2012-01", + "gpa": "3.9", + "courses": ["CS2011 - Java Introduction", "DB1101 - Basic SQL"] + } + ], + "awards": [ + { + "title": "Digital Compression Pioneer Award", + "date": "2014-11", + "awarder": "TechCrunch", + "summary": "Recognized for advances in lossless compression." + } + ], + "volunteer": [ + { + "organization": "CoderDojo", + "position": "Teacher", + "startDate": "2012-01", + "endDate": "2013-01", + "summary": "Free coding clubs for young people.", + "highlights": ["Awarded 'Teacher of the Month'"] + } + ] +} diff --git a/schema/resume.schema.json b/schema/resume.schema.json new file mode 100644 index 0000000..dbc6cf8 --- /dev/null +++ b/schema/resume.schema.json @@ -0,0 +1,173 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://resume-as-code/schema/resume.schema.json", + "title": "Resume (engineering-theme compatible)", + "type": "object", + "required": ["basics"], + "additionalProperties": true, + "definitions": { + "isoDate": { + "type": "string", + "pattern": "^[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?$" + }, + "stringArray": { + "type": "array", + "items": { "type": "string" } + } + }, + "properties": { + "basics": { + "type": "object", + "required": ["name"], + "additionalProperties": true, + "properties": { + "name": { "type": "string", "minLength": 1 }, + "label": { "type": "string" }, + "email": { "type": "string", "format": "email" }, + "phone": { "type": "string" }, + "website": { "type": "string" }, + "url": { "type": "string" }, + "summary": { "type": "string" }, + "location": { + "type": "object", + "additionalProperties": true, + "properties": { + "address": { "type": "string" }, + "postalCode": { "type": "string" }, + "city": { "type": "string" }, + "countryCode": { "type": "string" }, + "region": { "type": "string" } + } + }, + "profiles": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "network": { "type": "string" }, + "username": { "type": "string" }, + "url": { "type": "string" } + } + } + } + } + }, + "work": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "company": { "type": "string" }, + "name": { "type": "string" }, + "position": { "type": "string" }, + "website": { "type": "string" }, + "url": { "type": "string" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" }, + "summary": { "type": "string" }, + "highlights": { "$ref": "#/definitions/stringArray" } + } + } + }, + "volunteer": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "organization": { "type": "string" }, + "position": { "type": "string" }, + "url": { "type": "string" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" }, + "summary": { "type": "string" }, + "highlights": { "$ref": "#/definitions/stringArray" } + } + } + }, + "education": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "institution": { "type": "string" }, + "area": { "type": "string" }, + "studyType": { "type": "string" }, + "location": { "type": "string" }, + "specialization": { "type": "string" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" }, + "gpa": { "type": "string" }, + "score": { "type": "string" }, + "courses": { "$ref": "#/definitions/stringArray" } + } + } + }, + "skills": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { "type": "string" }, + "level": { "type": "string" }, + "keywords": { "$ref": "#/definitions/stringArray" } + } + } + }, + "awards": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "title": { "type": "string" }, + "date": { "$ref": "#/definitions/isoDate" }, + "awarder": { "type": "string" }, + "summary": { "type": "string" } + } + } + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { "type": "string" }, + "description": { "type": "string" }, + "url": { "type": "string" }, + "keywords": { "$ref": "#/definitions/stringArray" }, + "highlights": { "$ref": "#/definitions/stringArray" }, + "startDate": { "$ref": "#/definitions/isoDate" }, + "endDate": { "$ref": "#/definitions/isoDate" } + } + } + }, + "languages": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "language": { "type": "string" }, + "fluency": { "type": "string" } + } + } + }, + "interests": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { "type": "string" }, + "keywords": { "$ref": "#/definitions/stringArray" } + } + } + } + } +} diff --git a/scripts/lib/validate-core.mjs b/scripts/lib/validate-core.mjs new file mode 100644 index 0000000..9601ef2 --- /dev/null +++ b/scripts/lib/validate-core.mjs @@ -0,0 +1,37 @@ +import Ajv from "ajv" +import addFormats from "ajv-formats" + +// Compile a JSON schema into a reusable validator function. +export function createValidator(schema) { + const ajv = new Ajv({ allErrors: true, strict: false }) + addFormats(ajv) + return ajv.compile(schema) +} + +// Validate a document; return { valid, errors } with human-readable messages. +export function validateDocument(validate, doc) { + const valid = validate(doc) + if (valid) return { valid: true, errors: [] } + const errors = (validate.errors || []).map((e) => { + const where = e.instancePath || "(root)" + return `${where} ${e.message}` + }) + return { valid: false, errors } +} + +// Recursively collect dotted paths of any string containing the [VERIFY] marker. +export function findVerifyMarkers(value, path = "") { + const hits = [] + if (typeof value === "string") { + if (value.includes("[VERIFY]")) hits.push(path || "(root)") + } else if (Array.isArray(value)) { + value.forEach((item, i) => + hits.push(...findVerifyMarkers(item, `${path}[${i}]`)) + ) + } else if (value && typeof value === "object") { + for (const [k, v] of Object.entries(value)) { + hits.push(...findVerifyMarkers(v, path ? `${path}.${k}` : k)) + } + } + return hits +} diff --git a/scripts/lib/validate-core.test.mjs b/scripts/lib/validate-core.test.mjs new file mode 100644 index 0000000..179494d --- /dev/null +++ b/scripts/lib/validate-core.test.mjs @@ -0,0 +1,62 @@ +import { test } from "node:test" +import assert from "node:assert/strict" +import { + createValidator, + validateDocument, + findVerifyMarkers, +} from "./validate-core.mjs" + +const schema = { + type: "object", + required: ["basics"], + additionalProperties: true, + properties: { + basics: { + type: "object", + required: ["name"], + additionalProperties: true, + properties: { name: { type: "string", minLength: 1 } }, + }, + }, +} + +test("validateDocument passes a valid doc", () => { + const validate = createValidator(schema) + const res = validateDocument(validate, { basics: { name: "Ada" } }) + assert.equal(res.valid, true) + assert.deepEqual(res.errors, []) +}) + +test("validateDocument fails when a required field is missing", () => { + const validate = createValidator(schema) + const res = validateDocument(validate, { basics: {} }) + assert.equal(res.valid, false) + assert.ok(res.errors.length > 0) +}) + +test("findVerifyMarkers finds a nested marker with its path", () => { + const doc = { + basics: { name: "Ada" }, + work: [{ highlights: ["Shipped X", "Led K8s migration [VERIFY]"] }], + } + assert.deepEqual(findVerifyMarkers(doc), ["work[0].highlights[1]"]) +}) + +test("findVerifyMarkers returns empty for a clean doc", () => { + assert.deepEqual(findVerifyMarkers({ basics: { name: "Ada" }, work: [] }), []) +}) + +test("findVerifyMarkers returns (root) for a top-level marked string", () => { + assert.deepEqual(findVerifyMarkers("Needs review [VERIFY]"), ["(root)"]) +}) + +test("findVerifyMarkers finds multiple markers across the document", () => { + const doc = { + basics: { name: "Ada", summary: "Backend lead [VERIFY]" }, + work: [{ highlights: ["Shipped X", "Owned K8s [VERIFY]"] }], + } + assert.deepEqual(findVerifyMarkers(doc), [ + "basics.summary", + "work[0].highlights[1]", + ]) +}) diff --git a/scripts/validate.mjs b/scripts/validate.mjs new file mode 100644 index 0000000..2e9e7c9 --- /dev/null +++ b/scripts/validate.mjs @@ -0,0 +1,84 @@ +#!/usr/bin/env node +import fs from "node:fs" +import path from "node:path" +import { + createValidator, + validateDocument, + findVerifyMarkers, +} from "./lib/validate-core.mjs" + +const ROOT = process.cwd() +const SCHEMA_PATH = path.join(ROOT, "schema", "resume.schema.json") + +function readJson(file) { + return JSON.parse(fs.readFileSync(file, "utf8")) +} + +// Every resume-shaped document we want to keep valid. +function collectFiles() { + const files = [] + const resumesDir = path.join(ROOT, "resumes") + if (fs.existsSync(resumesDir)) { + for (const entry of fs.readdirSync(resumesDir, { withFileTypes: true })) { + if (!entry.isDirectory()) continue + const f = path.join(resumesDir, entry.name, "resume.json") + if (fs.existsSync(f)) files.push(f) + } + } + for (const extra of [ + path.join(ROOT, "profile", "master.json"), + path.join(ROOT, "profile", "master.example.json"), + path.join(ROOT, "examples", "expected-resume.json"), + ]) { + if (fs.existsSync(extra)) files.push(extra) + } + return files +} + +function main() { + const validate = createValidator(readJson(SCHEMA_PATH)) + const files = collectFiles() + + if (files.length === 0) { + console.log("No resume documents found to validate.") + return 0 + } + + let failed = 0 + for (const file of files) { + const rel = path.relative(ROOT, file) + let doc + try { + doc = readJson(file) + } catch (err) { + console.error(`✗ ${rel}: invalid JSON — ${err.message}`) + failed++ + continue + } + + const { valid, errors } = validateDocument(validate, doc) + const markers = findVerifyMarkers(doc) + + if (valid && markers.length === 0) { + console.log(`✓ ${rel}`) + continue + } + + failed++ + for (const e of errors) console.error(`✗ ${rel}: ${e}`) + for (const m of markers) { + console.error( + `✗ ${rel}: unresolved [VERIFY] at ${m} — confirm the claim and remove the marker, or delete the line` + ) + } + } + + if (failed > 0) { + console.error(`\n${failed} document(s) failed validation.`) + return 1 + } + console.log(`\nAll ${files.length} document(s) valid.`) + return 0 +} + +process.exit(main())