#!/usr/bin/env node export interface PromptSurfaceInventory { path: string; lines: number; approximateTokens: number; absoluteDirectiveCount: number; markers: Record; } export interface DuplicateFragmentFamily { text: string; count: number; paths: string[]; } export type PromptInvariantRuleId = 'cancel-semantics' | 'state-ownership' | 'hook-boundaries' | 'team-protocol'; export interface PromptInvariantPhraseRule { id: PromptInvariantRuleId; phrase: string; pattern: RegExp; } export interface PromptInvariantDuplicate { ruleId: PromptInvariantRuleId; phrase: string; paths: string[]; } export interface PromptInvariantCheckReport { root: string; checkedPaths: string[]; duplicates: PromptInvariantDuplicate[]; ok: boolean; } export interface SizeTotals { files: number; physicalLines: number; bytes: number; } export interface RepositorySizeInventory { schemaVersion: 1; groups: Record<'nonTestSource' | 'testSource' | 'rustSourceIncludingTests' | 'skillCards' | 'agentPrompts' | 'agentTemplate', SizeTotals>; largestNonTestFiles: Array<{ path: string; physicalLines: number; bytes: number; }>; } export interface PromptInventoryReport { repositorySize: RepositorySizeInventory; generatedAt: string; root: string; totals: { files: number; lines: number; approximateTokens: number; absoluteDirectiveCount: number; }; surfaces: PromptSurfaceInventory[]; duplicateFragmentFamilies: DuplicateFragmentFamily[]; } /** * Durable invariant anchors owned by templates/AGENTS.md. * * These are intentionally specific phrases rather than generic words such as * "state", "cancel", or "team". A phrase is allowed in the SSOT and may be * referenced by any number of skills, but it must not be restated by multiple * skill cards. */ export declare const INVARIANT_PHRASE_RULES: readonly PromptInvariantPhraseRule[]; /** Filesystem snapshot: use a clean worktree when comparing Git revisions. */ export declare function buildRepositorySizeInventory(root?: string): RepositorySizeInventory; export declare function listPromptSurfacePaths(root?: string): string[]; /** List only workflow skill cards. Invariant lint intentionally excludes prompts, * docs, generated mirrors, and the AGENTS.md SSOT itself. */ export declare function listSkillPromptPaths(root?: string): string[]; /** * Find durable invariant rules restated by more than one skill card. * * The rule list is explicit by design: generic repeated words are inventory * data, not CI failures. `templates/AGENTS.md` is the authorized SSOT and is * deliberately not included in `checkedPaths`. */ export declare function checkPromptInvariantDuplicates(root?: string, rules?: readonly PromptInvariantPhraseRule[]): PromptInvariantCheckReport; export declare function renderPromptInvariantCheck(report: PromptInvariantCheckReport): string; export declare function buildPromptInventory(root?: string, generatedAt?: string): PromptInventoryReport; export declare function renderPromptInventoryMarkdown(report: PromptInventoryReport): string; export declare function runPromptInventoryCli(argv?: string[], defaultRoot?: string): number; //# sourceMappingURL=prompt-inventory.d.ts.map