/** * CLI Commands: lex instructions init / generate / check * * Scaffolds, generates, and validates host-specific instruction projections from the canonical source file. * * Usage: * lex instructions init # Scaffold canonical source + lex.yaml + targets * lex instructions init --force # Overwrite existing files * lex instructions init --targets copilot # Only configure specific hosts * * lex instructions generate # Generate all projections * lex instructions generate --dry-run # Preview changes * lex instructions generate --json # Output as JSON * lex instructions generate --verbose # Show detailed progress * lex instructions generate --project-root . # Custom project root * * lex instructions check # Verify projections are in sync * lex instructions check --json # Output results as JSON */ /** * Supported host targets for instructions init */ export type InstructionsHostTarget = "copilot" | "cursor"; /** * Options for the instructions init command */ export interface InstructionsInitOptions { /** Project root directory (default: process.cwd()) */ projectRoot?: string; /** Overwrite existing files */ force?: boolean; /** Comma-separated host targets (default: "copilot,cursor") */ targets?: string; /** Output results as JSON */ json?: boolean; } /** * Result of initializing instructions (for JSON output) */ export interface InstructionsInitResult { success: boolean; created: string[]; skipped: string[]; errors: Array<{ path: string; error: string; }>; nextSteps: string[]; } /** * Options for the instructions generate command */ export interface InstructionsGenerateOptions { /** Project root directory (default: process.cwd()) */ projectRoot?: string; /** Path to lex.yaml config file */ config?: string; /** Preview changes without writing */ dryRun?: boolean; /** Show detailed output */ verbose?: boolean; /** Output results as JSON */ json?: boolean; } /** * Result of generating instructions (for JSON output) */ export interface InstructionsGenerateResult { generated: Array<{ path: string; action: "created" | "updated"; }>; skipped: Array<{ path: string; reason: string; }>; errors: Array<{ path: string; error: string; }>; summary: { generated: number; skipped: number; errors: number; }; } /** * Execute the 'lex instructions init' command * * Creates the canonical source file, lex.yaml configuration, and target files * with LEX markers for the specified hosts. * * @param options - Command options */ export declare function instructionsInit(options?: InstructionsInitOptions): Promise; /** * Execute the 'lex instructions generate' command * * @param options - Command options */ export declare function instructionsGenerate(options?: InstructionsGenerateOptions): Promise; /** * Options for the instructions check command */ export interface InstructionsCheckOptions { /** Project root directory (default: process.cwd()) */ projectRoot?: string; /** Path to lex.yaml config file */ config?: string; /** Output results as JSON */ json?: boolean; } /** * Result of checking instructions (for JSON output) */ export interface InstructionsCheckResult { inSync: Array<{ path: string; }>; outOfSync: Array<{ path: string; reason: string; }>; errors: Array<{ path: string; error: string; }>; summary: { inSync: number; outOfSync: number; errors: number; total: number; }; } /** * Execute the 'lex instructions check' command * * Validates that host-specific instruction files are in sync with the canonical source. * Exits with code 1 if any files are out of sync. * * @param options - Command options */ export declare function instructionsCheck(options?: InstructionsCheckOptions): Promise;