/** * The bootstrap algorithm (see bootstrap.md): create a NEW project from * the template — the full architecture (bounded contexts with the CQRS * split, the clients, the acceptance harness, the toolchain and CI) with * none of the example app in it, and the KEPT features still working. * * The strip is FEATURE-SHAPED, the inverse of how the app was built: * copy, then remove each non-kept feature's vertical slice one at a * time, rewrite the identity, reconcile the wiring until the compiler is * satisfied, sweep for leftovers, and prove the result green — including * the kept features' own suites, which is what makes "did the removal * take the right things?" a question the algorithm can actually answer. * * Deterministic wherever possible: the copy, the conventional paths of * each removed feature (derived from its name), and the out-of-grain * strip are pure rule execution. The model is spent only where judgment * is needed — the part of a slice that does not follow the naming * convention, the identity rewrite, the dangling references the * typecheck names, and the leftovers fresh eyes catch. * * During a bootstrap run, catalog commands execute in the TARGET * project's root (there is no other repository in play). */ import { type ModelTier } from "./model-roster.js"; import { type ImplementFeatureDeps } from "./shared.js"; export interface BootstrapOptions { /** The template checkout to bootstrap from (absolute, must exist). */ examplePath: string; /** kebab-case name of the new project — becomes its identity. */ projectName: string; } /** The work kinds bootstrap's AI steps run under (identity, sweep, and * the compiler-driven reconciliation fixes). */ export declare const BOOTSTRAP_WORK_KINDS: readonly ["feature-removal", "project-identity", "bootstrap-sweep", "defect-repair"]; /** * Re-tier every bootstrap AI step for one run, for a caller driving * bootstrapProject as a library (the CLI's `bootstrap` command starts * from a stack skeleton and runs no model at all — see * stack-bootstrap.ts). Wins over the project's farketari.ts policy, like * every other caller-supplied layer. Only the bootstrap kinds move; the * rest of the policy is untouched. */ export declare function withBootstrapTier(deps: ImplementFeatureDeps, tier: ModelTier): ImplementFeatureDeps; export declare function bootstrapProject(deps: ImplementFeatureDeps, targetDir: string, options: BootstrapOptions): Promise; /** * The target must be an absolute path that either does not exist yet or * is an empty directory — bootstrapping never writes into existing work. */ export declare function validatedTargetDir(targetDir: string): string; /** kebab-case, so the name can serve as package name and identifier. */ export declare function validatedProjectName(projectName: string): string;