/** * (PRD G1 + G2 + G4b / AC1-AC10 / R1-R4). * * Owns the "first time a project enters Peaks-Loop" bootstrap flow: * - 0-1 detection (no package.json OR no source files) * - writes `.peaks/project-scan/project-scan.md` with empty placeholders * for 0-1 projects, or with archetype + libraryVersions for existing * projects (calling `scanArchetype` + `scanLibraries` directly, not * forking a CLI process) * - boots the 4 audit/business templates (bundled in repo at * `src/services/workspace/templates/project-scan/`) into * `.peaks/project-scan/` (AC9) * - idempotent: skips re-writes when the existing file is at * schemaVersion:1 (AC3); --force / --force-templates override * * Called by: * - `peaks project context` (via `generateProjectContext`) * - `peaks workspace init` (main path) * * The "5 templates" count: 4 bundled audit/business files + the * dynamically-generated `project-scan.md` produced by this service. * `templatesBooted` reflects the count of files actually written; * `templatesSkipped` reflects files already present (sediment-protected). */ export type BootstrapProjectScanOptions = { readonly projectRoot: string; /** Override the existing-file skip and rewrite project-scan.md. */ readonly force?: boolean; /** Override the bundled-template skip and overwrite audit/business files. */ readonly forceTemplates?: boolean; }; export type BootstrapProjectScanEnvelope = { /** True iff project-scan.md was written by this call. */ readonly created: boolean; /** True iff project-scan.md existed and was skipped (idempotent). */ readonly skipped: boolean; /** Count of files written to .peaks/project-scan/ (1 project-scan.md + N templates). */ readonly templatesBooted: number; /** Count of files already present and skipped (sediment-preserved). */ readonly templatesSkipped: number; /** Absolute path to the project-scan.md file (whether written or pre-existing). */ readonly projectScanPath: string; /** Resolved archetype (when existing-project path was taken). */ readonly archetype?: string; /** Total wall-time of the bootstrap call. */ readonly durationMs: number; }; /** * Public entry point. See the file header for the full contract. */ export declare function bootstrapProjectScan(options: BootstrapProjectScanOptions): Promise;