/** * Project-context scaffolding: detects project type and writes * project-context.json. */ import type { ScaffoldResult } from '@cleocode/contracts/scaffold-diagnostics'; import type { UpgradeFileJournal } from './upgrade-file-journal.js'; /** * Detect and write project-context.json. * Idempotent: skips if file exists and is less than staleDays old (default: 30). * * @param projectRoot - Absolute path to the project root directory * @param opts - Optional configuration * @param opts.force - When true, regenerate even if the file is fresh * @param opts.staleDays - Age threshold in days before regeneration (default: 30) * @param opts.journal - Backs the file up before it changes and lists it (upgrade, T13409) * @returns Scaffold result indicating the action taken * * @remarks * Regenerating an existing file keeps every key it has, in its order: detected * values are updated in place, keys detection does not produce are kept, and * new keys are appended (T13409: a refresh once dropped `build.outputDir` and * reordered the tracked file). When nothing but `detectedAt` would change, the * file is left byte-identical. */ export declare function ensureProjectContext(projectRoot: string, opts?: { force?: boolean; staleDays?: number; journal?: UpgradeFileJournal; }): Promise; //# sourceMappingURL=ensure-skills.d.ts.map