// packages/plugin-awf/src/constants/cursor-globs.ts
// Cursor .mdc rule → glob pattern mapping
// IMPORTANT: Cursor uses comma-separated globs, NOT array format
/**
 * Default glob patterns for Cursor .mdc rules
 * Format: comma-separated string (NO brackets, NO quotes)
 * Reference: Cursor documentation - "globs field is comma-separated"
 */
export const CURSOR_RULE_GLOBS = {
    // === TERMINAL & SHELL ===
    "terminal-safety": "**/*.sh, **/*.bash, **/*.zsh, **/Makefile, **/*.ps1",
    "terminal-antigravity": "*",
    // === CODE EDITING ===
    "edit-verification": "**/*.ts, **/*.tsx, **/*.js, **/*.jsx, **/*.py, **/*.go, **/*.rs, **/*.java, **/*.cs",
    "quality": "**/*.ts, **/*.tsx, **/*.js, **/*.jsx, **/*.py, **/*.go, **/*.rs",
    "yagni": "**/*.ts, **/*.tsx, **/*.js, **/*.jsx, **/*.py, **/*.go",
    // === GIT & VERSION CONTROL ===
    "git-workflow": "**/.git/*, **/*.md, **/CHANGELOG*, **/HISTORY*",
    // === SECURITY (Always Apply) ===
    "prompt-injection-guard": "*",
    "validation-framework": "*",
    // === CONTEXT & TOKEN ===
    "context-management": "*",
    "stop-conditions": "*",
    "evidence": "*",
    "reflection": "*",
    // === LANGUAGE-SPECIFIC ===
    language: "**/*.yaml, **/*.json, **/*.md",
    // === RESEARCH ===
    "online-research": "*",
    // === VERSIONING ===
    versioning: "**/VERSION*, **/*.yaml, **/package.json",
};
/**
 * Get glob pattern for a rule file
 * @param ruleName - Rule file name (without extension)
 * @returns Comma-separated glob pattern
 */
export function getGlobForRule(ruleName) {
    return CURSOR_RULE_GLOBS[ruleName] || "*";
}
/**
 * Check if rule should always apply (no file filtering)
 */
export function isAlwaysApply(ruleName) {
    const alwaysApplyRules = [
        "prompt-injection-guard",
        "validation-framework",
        "context-management",
        "stop-conditions",
        "evidence",
        "reflection",
        "online-research",
        "terminal-antigravity",
    ];
    return alwaysApplyRules.includes(ruleName);
}
