import { type HygieneCommonOptions } from "../shared.js"; export interface AuditHeavyTemplatesOptions extends HygieneCommonOptions { /** Field-count threshold to flag a template as "heavy". Default 50. */ threshold?: number; /** Template-tree root to scan. Default `/sitecore/templates`. */ root?: string; index?: string; limit?: number; includeSystem?: boolean; batchSize?: number; concurrency?: number; pageParallelism?: number; cache?: boolean; exclude?: string[]; since?: string; owner?: string; baseline?: boolean; output?: string; format?: "json" | "csv" | "markdown"; } export interface HeavyTemplateReport { templateId: string; name: string; fullName: string | null; fieldCount: number; } /** * Audit templates with field counts above a threshold. * * Heavy templates correlate with slow editor rendering, expensive * standard-values fan-out, and brittle test fixtures. Default * threshold is 50 fields — a soft "this template is doing too many * things" signal. * * Strategy: * 1. List templates via the search index (`_template: