/**
 * Auto-generated Rule IDs
 *
 * DO NOT EDIT MANUALLY
 *
 * This file is auto-generated by scripts/generate-rule-types.ts
 * Run 'npm run generate:types' to regenerate
 *
 * @generated
 * Rule count: 114
 */

/**
 * Union of all rule IDs
 *
 * This type is automatically generated from discovered rule files.
 * Each rule file in src/rules/**\/*.ts becomes a valid RuleId.
 *
 * NOTE: Some rules (cross-file validation) have their validation logic
 * implemented in validators rather than in their validate() function,
 * as they require stateful context across multiple files.
 */
export type RuleId =
  | 'agent-body-too-short'
  | 'agent-description'
  | 'agent-disallowed-tools'
  | 'agent-events'
  | 'agent-hooks'
  | 'agent-hooks-invalid-schema'
  | 'agent-model'
  | 'agent-name'
  | 'agent-name-filename-mismatch'
  | 'agent-skills'
  | 'agent-skills-not-found'
  | 'agent-tools'
  | 'claude-md-content-too-many-sections'
  | 'claude-md-file-not-found'
  | 'claude-md-file-reference-invalid'
  | 'claude-md-filename-case-sensitive'
  | 'claude-md-glob-pattern-backslash'
  | 'claude-md-glob-pattern-too-broad'
  | 'claude-md-import-circular'
  | 'claude-md-import-depth-exceeded'
  | 'claude-md-import-in-code-block'
  | 'claude-md-import-missing'
  | 'claude-md-import-read-failed'
  | 'claude-md-npm-script-not-found'
  | 'claude-md-paths'
  | 'claude-md-rules-circular-symlink'
  | 'claude-md-size'
  | 'commands-deprecated-directory'
  | 'hooks-invalid-config'
  | 'hooks-invalid-event'
  | 'hooks-missing-script'
  | 'lsp-command-bare-name'
  | 'lsp-extension-missing-dot'
  | 'lsp-invalid-transport'
  | 'lsp-language-id-empty'
  | 'lsp-language-id-not-lowercase'
  | 'lsp-server-name-too-short'
  | 'mcp-http-empty-url'
  | 'mcp-http-invalid-url'
  | 'mcp-invalid-env-var'
  | 'mcp-invalid-transport'
  | 'mcp-sse-empty-url'
  | 'mcp-sse-invalid-url'
  | 'mcp-sse-transport-deprecated'
  | 'mcp-stdio-empty-command'
  | 'mcp-websocket-empty-url'
  | 'mcp-websocket-invalid-protocol'
  | 'mcp-websocket-invalid-url'
  | 'output-style-body-too-short'
  | 'output-style-description'
  | 'output-style-examples'
  | 'output-style-missing-guidelines'
  | 'output-style-name'
  | 'output-style-name-directory-mismatch'
  | 'plugin-commands-deprecated'
  | 'plugin-components-wrong-location'
  | 'plugin-description-required'
  | 'plugin-hook-missing-plugin-root'
  | 'plugin-invalid-marketplace-manifest'
  | 'plugin-invalid-version'
  | 'plugin-json-wrong-location'
  | 'plugin-marketplace-files-not-found'
  | 'plugin-missing-component-paths'
  | 'plugin-missing-file'
  | 'plugin-name-required'
  | 'plugin-version-required'
  | 'settings-file-path-not-found'
  | 'settings-invalid-env-var'
  | 'settings-invalid-permission'
  | 'settings-permission-empty-pattern'
  | 'settings-permission-invalid-rule'
  | 'skill-agent'
  | 'skill-allowed-tools'
  | 'skill-allowed-tools-not-used'
  | 'skill-arguments-without-hint'
  | 'skill-body-long-code-block'
  | 'skill-body-missing-usage-section'
  | 'skill-body-too-long'
  | 'skill-body-word-count'
  | 'skill-context'
  | 'skill-cross-reference-invalid'
  | 'skill-dangerous-command'
  | 'skill-deep-nesting'
  | 'skill-description'
  | 'skill-description-max-length'
  | 'skill-description-missing-trigger'
  | 'skill-description-quality'
  | 'skill-eval-usage'
  | 'skill-frontmatter-unknown-keys'
  | 'skill-hardcoded-secrets'
  | 'skill-mcp-tool-qualified-name'
  | 'skill-missing-changelog'
  | 'skill-missing-comments'
  | 'skill-missing-examples'
  | 'skill-missing-shebang'
  | 'skill-missing-version'
  | 'skill-model'
  | 'skill-name'
  | 'skill-name-directory-mismatch'
  | 'skill-naming-inconsistent'
  | 'skill-overly-generic-name'
  | 'skill-path-traversal'
  | 'skill-readme-forbidden'
  | 'skill-reference-not-linked'
  | 'skill-referenced-file-not-found'
  | 'skill-shell-script-hardcoded-paths'
  | 'skill-shell-script-no-error-handling'
  | 'skill-side-effects-without-disable-model'
  | 'skill-tags'
  | 'skill-time-sensitive-content'
  | 'skill-too-many-files'
  | 'skill-unknown-string-substitution'
  | 'skill-version'
  | 'skill-xml-tags-anywhere';

/**
 * All valid rule IDs as a readonly array
 *
 * Useful for runtime validation and iteration.
 */
export const ALL_RULE_IDS: readonly RuleId[] = [
  'agent-body-too-short',
  'agent-description',
  'agent-disallowed-tools',
  'agent-events',
  'agent-hooks',
  'agent-hooks-invalid-schema',
  'agent-model',
  'agent-name',
  'agent-name-filename-mismatch',
  'agent-skills',
  'agent-skills-not-found',
  'agent-tools',
  'claude-md-content-too-many-sections',
  'claude-md-file-not-found',
  'claude-md-file-reference-invalid',
  'claude-md-filename-case-sensitive',
  'claude-md-glob-pattern-backslash',
  'claude-md-glob-pattern-too-broad',
  'claude-md-import-circular',
  'claude-md-import-depth-exceeded',
  'claude-md-import-in-code-block',
  'claude-md-import-missing',
  'claude-md-import-read-failed',
  'claude-md-npm-script-not-found',
  'claude-md-paths',
  'claude-md-rules-circular-symlink',
  'claude-md-size',
  'commands-deprecated-directory',
  'hooks-invalid-config',
  'hooks-invalid-event',
  'hooks-missing-script',
  'lsp-command-bare-name',
  'lsp-extension-missing-dot',
  'lsp-invalid-transport',
  'lsp-language-id-empty',
  'lsp-language-id-not-lowercase',
  'lsp-server-name-too-short',
  'mcp-http-empty-url',
  'mcp-http-invalid-url',
  'mcp-invalid-env-var',
  'mcp-invalid-transport',
  'mcp-sse-empty-url',
  'mcp-sse-invalid-url',
  'mcp-sse-transport-deprecated',
  'mcp-stdio-empty-command',
  'mcp-websocket-empty-url',
  'mcp-websocket-invalid-protocol',
  'mcp-websocket-invalid-url',
  'output-style-body-too-short',
  'output-style-description',
  'output-style-examples',
  'output-style-missing-guidelines',
  'output-style-name',
  'output-style-name-directory-mismatch',
  'plugin-commands-deprecated',
  'plugin-components-wrong-location',
  'plugin-description-required',
  'plugin-hook-missing-plugin-root',
  'plugin-invalid-marketplace-manifest',
  'plugin-invalid-version',
  'plugin-json-wrong-location',
  'plugin-marketplace-files-not-found',
  'plugin-missing-component-paths',
  'plugin-missing-file',
  'plugin-name-required',
  'plugin-version-required',
  'settings-file-path-not-found',
  'settings-invalid-env-var',
  'settings-invalid-permission',
  'settings-permission-empty-pattern',
  'settings-permission-invalid-rule',
  'skill-agent',
  'skill-allowed-tools',
  'skill-allowed-tools-not-used',
  'skill-arguments-without-hint',
  'skill-body-long-code-block',
  'skill-body-missing-usage-section',
  'skill-body-too-long',
  'skill-body-word-count',
  'skill-context',
  'skill-cross-reference-invalid',
  'skill-dangerous-command',
  'skill-deep-nesting',
  'skill-description',
  'skill-description-max-length',
  'skill-description-missing-trigger',
  'skill-description-quality',
  'skill-eval-usage',
  'skill-frontmatter-unknown-keys',
  'skill-hardcoded-secrets',
  'skill-mcp-tool-qualified-name',
  'skill-missing-changelog',
  'skill-missing-comments',
  'skill-missing-examples',
  'skill-missing-shebang',
  'skill-missing-version',
  'skill-model',
  'skill-name',
  'skill-name-directory-mismatch',
  'skill-naming-inconsistent',
  'skill-overly-generic-name',
  'skill-path-traversal',
  'skill-readme-forbidden',
  'skill-reference-not-linked',
  'skill-referenced-file-not-found',
  'skill-shell-script-hardcoded-paths',
  'skill-shell-script-no-error-handling',
  'skill-side-effects-without-disable-model',
  'skill-tags',
  'skill-time-sensitive-content',
  'skill-too-many-files',
  'skill-unknown-string-substitution',
  'skill-version',
  'skill-xml-tags-anywhere',
] as const;

/**
 * Type guard to check if a string is a valid RuleId
 *
 * @param value - String to check
 * @returns True if value is a valid RuleId
 *
 * @example
 * if (isRuleId(userInput)) {
 *   // TypeScript knows userInput is RuleId
 *   const rule = await ruleLoader.getRule(userInput);
 * }
 */
export function isRuleId(value: string): value is RuleId {
  return (ALL_RULE_IDS as readonly string[]).includes(value);
}
