/** * Feature-shaped bootstrap removal: a project is built one feature at a * time, so it is emptied the same way, in reverse. Removing a feature * means removing the vertical slice that exists ONLY for it — from its * .feature file down through acceptance test, protocol driver, client * screen, BFF route, contract entry, use case, domain, and SQL. * * Why this replaces directory-shaped rules: directory boundaries do not * match feature boundaries. `src/app/` holds the example app's routes * AND the router shell; `queries/` holds its SQL AND the outbox's. Any * rule aimed at a directory either eats infrastructure or misses app * code — both happened. A feature is the unit the app was actually * built in, and the acceptance test of every KEPT feature is a real * check that the removal took the right things. * * The split of labour: paths that follow the naming convention are * derived here and deleted deterministically; everything else (screens * named differently, DSL methods, selector constants, fake operations, * contract entries, domain code, SQL) is a judgment the model makes, * bounded by the compiler and the kept features' suites. */ import type { RepoLayout } from "./repo-layout.js"; /** One feature to remove, named by its .feature file's basename. */ export interface FeatureToRemove { /** kebab-case name, e.g. "deposit-money" — the naming-convention key. */ name: string; /** Repo-relative path of the .feature file itself. */ featureFile: string; } /** * The paths a feature owns BY CONVENTION — every one derived from its * name, so deleting them needs no judgment. Paths that do not exist in * a given project are simply absent (a feature has an acceptance test * only for the clients it targets). */ export declare function conventionalPathsOf(layout: RepoLayout, feature: FeatureToRemove): string[]; /** * Split the template's feature files into the ones a bootstrap KEEPS and * the ones it removes. `keepFeatures` holds repo-relative paths or * directories: a directory keeps every feature under it. */ export declare function planFeatureRemoval(featureFiles: readonly string[], keepFeatures: readonly string[]): { kept: string[]; removed: FeatureToRemove[]; };