Files
CatoandClaude Opus 5.5 303350b1e3 feat(careers): open roles from public job boards, skills and training per bottleneck (#91)
* feat(careers): open roles from public job boards, skills and training paths per bottleneck

- research/job-boards.json: all 138 directory companies' careers pages and ATS,
  each checked on the company's own site; 6 on public Greenhouse/Ashby APIs are
  read daily (ASM, MetOx, Anthropic, OpenAI, xAI, CoreWeave), the rest linked.
- research_jobs (scripts/db/011-jobs.sql) + POST /api/cron/jobs: daily fetch,
  filed under role family, seniority, bottlenecks and skills by published rules.
- /careers: filters (bottleneck, family, company, country, seniority, remote),
  which bottlenecks are hiring most; /careers/[slug] per bottleneck;
  /careers/paths (O*NET 31.0 + ESCO records, posting skill counts, 56 checked
  learning paths); /careers/companies; hiring section on company pages.
- Desk: follow companies/role families for jobs; new postings are a desk source.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* feat(careers): chain roles by default, sidebar hiring board, tighter filing rules

Software and business postings are filed under bottlenecks by title only (AI
labs' boilerplate named foundries and grid interconnection); the board defaults
to roles in the chain with a scope switch; the hiring counts sit beside the
list; learning paths come before the occupational record.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* refactor(desk): relative dates in lib/when.ts, job rows loaded in lib/desk-jobs.ts

Keeps lib/desk.ts and the desk page under the 300-line ceiling with the job
and science sources both on the desk.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 14:47:53 -07:00

53 lines
1.4 KiB
TypeScript

/**
* What the official occupational records say a role family needs, read from
* research/occupations.json (built by scripts/research/occupations.ts from the
* O*NET database and the ESCO API — never edited by hand).
*/
import data from '@/research/occupations.json';
import { FAMILY_BY_ID, type RoleFamilyId } from '@/config/careers-roles';
export interface OnetRecord {
code: string;
title: string;
description: string;
jobZone: { zone: number; name: string; education: string; training: string } | null;
tasks: string[];
skills: string[];
knowledge: string[];
hotTechnology: string[];
url: string;
}
export interface EscoRecord {
uri: string;
title: string;
iscoCode: string | null;
description: string;
essentialSkills: string[];
url: string;
}
const FILE = data as unknown as {
generatedOn: string;
sources: {
onet: { name: string; url: string; license: string };
esco: { name: string; url: string };
};
onet: Record<string, OnetRecord>;
esco: Record<string, EscoRecord>;
};
export const OCCUPATION_SOURCES = { ...FILE.sources, generatedOn: FILE.generatedOn };
export interface FamilyOccupation {
onet: OnetRecord | null;
esco: EscoRecord | null;
}
export function occupationsOf(family: RoleFamilyId): FamilyOccupation[] {
return (FAMILY_BY_ID.get(family)?.occupations ?? []).map((o) => ({
onet: o.onet ? (FILE.onet[o.onet] ?? null) : null,
esco: o.esco ? (FILE.esco[o.esco] ?? null) : null,
}));
}