/** * The sample features a project ships and may delete later: each owns its * folder under `src/features/` and `tests/features/`, the context it is the * only feature of, and possibly files and package scripts outside them. * * The template ships none: its reference sample and example screens were * deleted on 2026-11-07, when the manual and `create:feature` took over their * roles. A project that keeps a sample of its own lists it here. Then * `test:sample-removal` without `--feature` (FE-GATE-020) deletes each one * from a copy of the repository with these paths and scripts and runs the * gates, and verify:documentation lets the documents name its paths until * the sample is gone: a sample counts as deleted once its * `feature-module.ts` is. */ export type RemovableTemplateFeature = Readonly<{ /** Its FEATURE_MODULE_ID, also its folder under src/features and tests/features. */ featureId: string; /** The bounded context it is the only feature of; it goes with the feature. */ contextDirectory: string; /** Files outside those folders that only this feature uses. */ extraPaths: readonly string[]; /** Package scripts that only this feature uses. */ scripts: readonly string[]; }>; export const REMOVABLE_TEMPLATE_FEATURES: readonly RemovableTemplateFeature[] = Object.freeze([]); /** Every path removing `feature` deletes: its folders, its context and its extra files. */ export function removableTemplateFeaturePaths(feature: RemovableTemplateFeature): readonly string[] { return Object.freeze([ `src/features/${feature.featureId}`, `tests/features/${feature.featureId}`, feature.contextDirectory, ...feature.extraPaths, ]); }