<aside>
🧭
Current architecture (updated 2026-11-01). The sections below are the original client-only plan, kept for history; where they conflict, this callout and the repo ADRs win. The canonical decision log is the Architecture Decision Records page, mirroring docs/adr/ in the repo.
- Three-tier app (ADR-0006): Next.js + Material UI static on Vercel's CDN; a tier-2 decode route holds the OpenRouter key and owns the Hat Check logic; Supabase holds the framework only. The browser never touches the database. This supersedes the client-only ADR-001/ADR-003 below.
- Data model (ADR-0022, revising ADR-0008): the framework is versioned JSONB in Supabase (spf_release + spf_record, keyed by (release, entity, slug)); a build step emits a title index + per-function snapshot slices to the CDN as the read model (CQRS). Nothing queries Supabase at request time.
- Matching (ADR-0007, 0010, 0014): a line-scoped keyword matcher with exact / alias / similar tiers, unioned with a grounded, validated LLM recognizer. The framework is the source of truth; the LLM recognizes wording only and decides nothing; every match is validated (item in the framework, quote in the posting). This supersedes the on-device embedding plan in ADR-003 below.
- Translator table (ADR-0020): a reviewed term-to-SPF table built from a 934-posting corpus (Greenhouse, Lever, Ashby) plus domain knowledge supplies the matcher's aliases; it lives in eval/translator-table.csv. Distinct leaf items matched across the corpus rose from 88 to 141 of 221; a real test posting went from 7 to 15 matches.
- Roll-up (ADR-0021): a posting that names an activity or deliverable means the poster is Responsible for it, so it rolls up to the Responsible duty only (not Accountable/Consulted/Informed). Non-standard hats on the real posting dropped from 8 to 3.
- State (ADR-0011): session-only (HTML5 sessionStorage); no accounts, no device save, no saved history. This supersedes the local-save sections below.
- Accuracy (ADR-0019): a dependency-free eval harness (eval/ in the repo) measures precision and recall against labeled postings and picks the model; a coverage audit accounts for every posting line (100% line-accountability, distinct from matching accuracy).
- Matching scope and AI quotes (ADR-0025): the matcher compares a posting against every framework item, so non-standard hats can appear; an AI match needs a verbatim quote and counts as similar. v1 audit: see the page v1 Audit: Requirements vs Prototype (2026-11-01).
- Evidence (ADR-0023): every hat shows all of its relevant quotes, not one example.
- Resume and application prep (ADR-0024): skills, activities and deliverables with outcome templates, ATS keywords, cover letter points, and interview points, built from the hats with no AI-written text. Added to MVP 1 on 2026-11-01 (T16).
- Scoring (ADR-0039, 2026-11-04): a hat is scored by the share of its work the posting names (matched activities + deliverables ÷ the hat's total activities + deliverables); its match level is full (25% or more), partial (above 0, under 25%), or none. Tools do not confer a hat and the "everyone" duty is excluded. The overall title-fit uses Formula D over the title's standard hats: (full × 1 + partial × 0.5) ÷ all standard hats, with the verdict thresholds unchanged. This supersedes the one-item "covered" rule; code is owed and nothing is built yet.
</aside>
<aside>
🔒
MVP 1 scope, LOCKED (decided by Morgan, 2026-10-31)
MVP 1 decodes ONE pasted job posting and explains THE JOB. It never asks the person anything about themselves and gives no candidate-specific advice. This section governs: where any requirement or priority below conflicts with it, this wins. The matching record is ADR-0005 in the repo.
In MVP 1 (about the job): resolve the title to a job function, handling ambiguous and not-covered honestly; the three hat sets; match score and title-honesty verdict; over-scope and under-scope flags; plain-language meaning per hat; role-generic resume highlights, hidden hats first, then matched, then non-standard (ADR-0024); all relevant evidence quotes for every claim (the complete breakdown per hat, not just one example); resume and application prep including role-generic interview points (ADR-0024); no account, session-only state (ADR-0011).
Not in MVP 1 (deferred, not dropped): anything about the candidate (personal fit, go / stretch / no-go for the person, gaps to close first, compare to the seeker's level, "which skills I already have") since MVP 1 collects no experience; a true seniority read (needs a seniority model); a shortlist or comparison of several postings (one at a time in MVP 1); interview practice, feedback, and generated question lists (FR-11 and the interview item in build Phase 3 below). Role-generic interview points and cover letter points moved into MVP 1 on 2026-11-01 (ADR-0024).
Note on NFR-1 below: MVP 1 now sends the pasted posting to our server and to an AI service (OpenRouter). The earlier "nothing leaves the device" wording is superseded; this is a three-tier app, and the matching approach and hosting will be recorded in their own ADRs that supersede ADR-0001 and ADR-0004.
</aside>
Product: Hat Check · Prepared for: engineering / coding agent + ADR authoring · Date: October 2026 · Scope: MVP #1, client-only web app, job-seeker audience, roles the Skills & Practices Framework currently covers.
<aside>
⚠️
Decision (October 31, 2026): interview prep is Phase 2, not MVP #1. FR-11 and the interview-prep item in build Phase 3 below are kept as written in the source, but are out of MVP #1 scope. Amended 2026-11-01: role-generic interview points and cover letter points are now in MVP 1 (ADR-0024, T16); practice, feedback, and generated question lists stay Phase 2.
</aside>
1. Context & scope
Hat Check decodes a single job description against a standard baseline for the role, drawn from Tech Fleet's Skills & Practices Framework. The engine ("Hat Check") maps the posting's duties ("hats") to the framework, compares them to what the title should require, and returns: a match percentage, the written / unwritten / out-of-scope hats, evidence quoted from the posting, and resume + interview guidance.
In scope (MVP #1): one JD + title at a time; the framework's current role coverage (digital-product/tech roles, ~11 Job Functions, ~18 Duties); client-only execution; no accounts; local persistence.
Out of scope (MVP #1): accounts/auth, server-side user data, mock-interview practice with feedback, salary benchmarking, multi-JD comparison dashboards, roles the framework does not yet cover, seniority scoring.
The Hat Check pipeline
- Input: user provides JD text and the job title.
- Parse: extract the posting's stated responsibilities, activities, skills, tools.
- Title resolution: map the user's title to a framework Job Function (synonym translation across companies).
- Vocabulary normalization: translate the JD's terms and jargon to the framework's vocabulary (skills, activities, duties).
- Hat matching: match the JD's activities/tasks to framework tasks → their parent Duties (hats).
- Hat classification: produce three sets:
- Written & expected: hats in the JD that are standard for the title.
- Written & not expected: hats in the JD that are not standard for the title (out of scope / "two jobs in one").
- Unwritten but expected: hats standard for the title that are absent from the JD (the hidden expectations).
- Match score: how closely the JD matches the title's standard baseline.
- Evidence: quote all the relevant JD lines that justify each hat (the complete breakdown, not a single example), and name what's implied or left unsaid.
- Outputs: breakdown view + resume highlights (skills/tools/tasks/deliverables per hat) + interview questions + prep strategy.
2. Architecture overview