/** * profile-generate — scaffold compact PROF-P profiles for unprofiled hub authors (#1502). * * Port of profiles/build_tier1_profiles.py: ranks REFs by corpus in-degree * (derived from citation outgoing-edges), takes each top REF's primary author, * skips institutional/group "authors" and already-profiled people, and stamps a * compact 5-section PROF-P sidecar. Reuses the #1497 parser (loadCorpus gives * authors + edges + titles; loadProfileSlugs gives existing profiles) rather * than re-parsing citation sidecars. Dry-run unless `write`; skips existing. * * `corpus-refs` is written as a list of REF-id strings (matching the corpus * convention + build_tier1); the #1497 parser tolerates both that and the * list-of-dicts shape. * * @source historical: profiles/build_tier1_profiles.py */ import { type RefRecord } from '../corpus-views/ref-parser.js'; export interface ProfileGenOptions { today?: string; write?: boolean; /** Max profiles to generate (build_tier1 default: 25). */ limit?: number; /** How many top-in-degree REFs to scan for candidates (build_tier1 default: 60). */ scan?: number; } export interface ProfileGenResult { slug: string; name: string; status: 'wrote' | 'skip' | 'dry-run'; message: string; outPath: string; content?: string; } /** Port of build_tier1_profiles.slugify: "Last, First" / "First Last" → "last-first". */ export declare function slugifyAuthor(name: string): string; /** Shared corpus-generation context (reused by tier-1 and FM profile generators). */ export interface GenContext { records: RefRecord[]; byId: Map; inDeg: Map; /** author display-name → set of REF ids they appear on. */ authorRefs: Map>; /** existing PROF-P slugs (so generation is idempotent). */ existing: Set; } /** Build the generation context once from the corpus (loadCorpus + in-degree + author index). */ export declare function loadGenContext(corpusRoot: string): GenContext; /** Build the compact 5-section PROF-P markdown body. Mirrors generate_profile(). */ export declare function buildProfileBody(name: string, slug: string, refs: string[], byId: Map, inDeg: Map, today: string): string; /** Generate Tier-1 PROF-P profiles for unprofiled hub primary authors. */ export declare function generateTier1Profiles(corpusRoot: string, opts?: ProfileGenOptions): ProfileGenResult[]; //# sourceMappingURL=profile-generate.d.ts.map