// packages/plugin-awf/src/constants/ide-install-specs.ts
// IDE Installation Specifications - Deep Audit v3 corrections applied
// version: 6.3.10 (Feb 22, 2026)
// Phase 4: Deep variant research — verified all 22 IDE paths against official docs
import { DISABLED_SPEC } from "../types/ide-install.js";
// ============================================================================
// TIER 1: Major IDEs (6)
// ============================================================================
const CURSOR_INSTALL_SPEC = {
    skills: {
        enabled: true,
        target: ".cursor/skills",
        globalTarget: "skills",
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".cursor/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".cursor/rules",
        globalTarget: "rules",
        ext: ".mdc",
        copyModules: true,
        copyStandalone: true,
    },
    core: {
        enabled: true,
        target: ".cursor/core",
        files: [], // Use default ESSENTIAL_CORE_FILES
    },
    memory: {
        enabled: true,
        target: ".cursor/memory",
    },
    personas: {
        enabled: true,
        target: ".cursor/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "cursor/root.cursorrules",
        target: ".cursorrules",
    },
    hooks: {
        enabled: true,
        target: ".claude", // Cursor reads .claude/settings.json format
        source: "hooks/claude", // configs/hooks/claude/hooks-settings.json (shared core)
    },
};
const CLAUDE_INSTALL_SPEC = {
    skills: {
        enabled: true,
        target: ".claude/skills",
        globalTarget: "skills",
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".claude/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true, // Official: docs.anthropic.com/en/docs/claude-code/memory — .claude/rules/*.md
        target: ".claude/rules",
        globalTarget: "rules",
        ext: ".md", // Supports YAML frontmatter with `paths` globs for path-specific rules
        copyModules: true,
        copyStandalone: true,
    },
    core: {
        enabled: true,
        target: ".claude/core",
        files: [], // Use default ESSENTIAL_CORE_FILES
    },
    memory: {
        enabled: true,
        target: ".claude/memory",
    },
    personas: {
        enabled: true,
        target: ".claude/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "claude/root.CLAUDE.md",
        target: "CLAUDE.md",
    },
    hooks: {
        enabled: true,
        target: ".claude", // Claude Code hooks in .claude/settings.json
        source: "hooks/claude", // configs/hooks/claude/hooks-settings.json (shared core)
    },
};
const GEMINI_INSTALL_SPEC = {
    skills: {
        enabled: true,
        target: ".gemini/skills",
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".gemini/commands",
        format: "toml",
        transform: true,
    },
    rules: {
        enabled: false, // Deep Audit v3: Gemini CLI reads GEMINI.md only, no rules directory
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into GEMINI.md
        target: ".gemini/personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "gemini/root.GEMINI.md",
        target: "GEMINI.md",
        globalTarget: ".gemini/GEMINI.md", // Global: ~/.gemini/GEMINI.md (not ~/GEMINI.md)
    },
};
const VSCODE_COPILOT_INSTALL_SPEC = {
    // VS Code supports .github/skills/ (v1.108+) and .github/prompts/*.prompt.md
    skills: {
        enabled: true,
        target: ".github/skills",
        globalTarget: "skills", // Global: ~/.copilot/skills/ (VS Code Insider agent skills)
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".github/prompts",
        globalTarget: "prompts", // Global: %APPDATA%/Code*/User/prompts/ (v6.4.12)
        format: "md",
        transform: true,
        transformExt: ".prompt.md", // Official: VS Code requires .prompt.md extension
    },
    rules: {
        enabled: true,
        target: ".github/instructions", // Official: .github/instructions/**/*.instructions.md
        ext: ".instructions.md", // Deep Audit v3: official ext is .instructions.md (YAML frontmatter with applyTo)
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false, // v6.4.12: Copilot ignores .github/personas/ — agents spec handles .github/agents/
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "vscode/root.copilot-instructions.md",
        target: ".github/copilot-instructions.md",
    },
    agents: {
        enabled: true,
        target: ".github/agents",
        source: "vscode/agents", // configs/vscode/agents/*.agent.md
    },
    hooks: {
        enabled: true,
        target: ".github/hooks",
        source: "hooks/vscode", // configs/hooks/vscode/*.json (shared core, modular)
    },
};
const WINDSURF_INSTALL_SPEC = {
    // Official: docs.windsurf.com/windsurf/cascade/skills
    skills: {
        enabled: true,
        target: ".windsurf/skills",
        globalTarget: "skills", // Global: ~/.codeium/windsurf/skills/
        flattenCategories: true, // Windsurf scans skills/{name}/SKILL.md (1 level)
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".windsurf/workflows",
        globalTarget: "global_workflows", // Global: ~/.codeium/windsurf/global_workflows/
        format: "yaml-frontmatter",
        transform: true,
    },
    rules: {
        enabled: true,
        target: ".windsurf/rules",
        globalTarget: "rules", // Global: ~/.codeium/windsurf/rules/
        ext: ".md",
        copyModules: true,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into .windsurfrules
        target: ".windsurf/personas",
        globalTarget: "personas", // Global: ~/.codeium/windsurf/personas/
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "windsurf/root.windsurfrules",
        target: ".windsurfrules",
        globalTarget: "memories/global_rules.md", // Global: ~/.codeium/windsurf/memories/global_rules.md
    },
};
const COPILOT_INSTALL_SPEC = VSCODE_COPILOT_INSTALL_SPEC; // Kept for backward compat
// ============================================================================
// TIER 2: Popular Agents (10)
// ============================================================================
const CLINE_INSTALL_SPEC = {
    skills: {
        enabled: true,
        target: ".cline/skills",
        globalTarget: "skills",
        flattenCategories: true, // Cline scans skills/{name}/SKILL.md (1 level)
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true, // Fixed: docs.cline.bot/customization/workflows — .clinerules/workflows/
        target: ".clinerules/workflows",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".clinerules", // Deep Audit v3: Cline reads .clinerules as file OR folder (.clinerules/*.md)
        ext: ".md",
        copyModules: false,
        copyStandalone: true, // Cline loads all .md files in .clinerules/ folder
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into .clinerules
        target: ".cline/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "cline/root.clinerules.md",
        target: ".clinerules",
    },
};
const CONTINUE_INSTALL_SPEC = {
    skills: {
        enabled: true, // Phase 3: Matrix 🔄 → transform to .continue rules format
        target: ".continue/rules/skills",
        globalTarget: "rules/skills",
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: true, // Phase 3: Matrix 🔄 → .continue/commands/
        target: ".continue/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".continue/rules",
        globalTarget: "rules",
        ext: ".md",
        copyModules: true,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into Continue rules
        target: ".continue/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "continue/root.continue.md",
        target: ".continue/rules/root.md", // Deep Audit v3: .continue/rules/ is official, not config.md
    },
};
const ROO_INSTALL_SPEC = {
    // Official: docs.roocode.com/features/skills — 4-level override
    // Roo scans skills/{name}/SKILL.md (1 level) — no category nesting
    skills: {
        enabled: true,
        target: ".roo/skills",
        globalTarget: "skills",
        flattenCategories: true,
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".roo/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".roo/rules",
        globalTarget: "rules",
        ext: ".md",
        copyModules: true,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Custom Modes via .roomodes (YAML/JSON)
        target: ".roo/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "roo/root.roorules.md",
        target: ".roorules",
    },
};
const JETBRAINS_INSTALL_SPEC = {
    // JetBrains Junie supports skills in .junie/skills/ (native SKILL.md)
    skills: {
        enabled: true,
        target: ".junie/skills",
        globalTarget: "skills",
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: true, // Phase 3: Matrix 🔄 → .junie/commands/
        target: ".junie/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".junie/guidelines",
        globalTarget: "guidelines",
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into guidelines.md
        target: ".junie/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "jetbrains/root.guidelines.md",
        target: ".junie/guidelines.md",
        globalTarget: "guidelines.md",
    },
};
const AMAZONQ_INSTALL_SPEC = {
    skills: {
        enabled: true, // Phase 3: Matrix 🔄 → .amazonq/skills/
        target: ".amazonq/skills",
        globalTarget: "skills",
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: true, // Phase 3: Matrix 🔄 → .amazonq/commands/
        target: ".amazonq/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".amazonq/rules",
        globalTarget: "rules",
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into AmazonQ rules
        target: ".amazonq/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "amazonq/root.amazonq.md",
        target: ".amazonq/rules/root.md",
        globalTarget: "rules/root.md",
    },
};
const CODEX_INSTALL_SPEC = {
    // Deep Audit v2: Codex uses .agents/skills/ not .codex/
    skills: {
        enabled: true,
        target: ".agents/skills",
        globalTarget: "skills", // Global: ~/.codex/skills/ (Codex CLI personal skills)
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true, // v6.5.x: Transform workflows → ~/.codex/prompts/ (custom slash commands)
        target: "prompts",
        globalTarget: "prompts", // Global: ~/.codex/prompts/
        format: "md",
        transform: false, // Keep .md — sanitize via target detection in copyWorkflows()
    },
    rules: {
        enabled: false, // Deep Audit v3: Codex uses AGENTS.md hierarchy, NOT a rules directory
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false, // Deep Research: Codex has NO .agents/personas/ — embedded in AGENTS.md + HSA MCP
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "codex/root.AGENTS.md",
        target: "AGENTS.md",
    },
};
const ZED_INSTALL_SPEC = {
    skills: {
        enabled: false,
        target: "",
        copySubdirs: false,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: false, // Deep Audit v3: Zed reads single .rules file, NOT a directory
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into .rules
        target: ".zed/personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "zed/root.settings.json",
        target: ".zed/settings.json",
    },
};
const AIDER_INSTALL_SPEC = {
    skills: {
        enabled: false,
        target: "",
        copySubdirs: false,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: false, // Deep Audit: Aider only reads CONVENTIONS.md rootConfig
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: true, // Phase 3: Matrix 🔄 → inject into CONVENTIONS.md
        target: ".aider/personas",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "aider/root.CONVENTIONS.md",
        target: "CONVENTIONS.md",
    },
};
const CODERABBIT_INSTALL_SPEC = {
    skills: {
        enabled: false,
        target: "",
        copySubdirs: false,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: false, // Deep Audit: CodeRabbit only reads .coderabbit.yaml rootConfig
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "coderabbit/root.coderabbit.yaml",
        target: ".coderabbit.yaml",
    },
};
const CODY_INSTALL_SPEC = {
    skills: {
        enabled: false,
        target: "",
        copySubdirs: false,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: false, // Uses JSON commands
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "cody/root.commands.json",
        target: ".cody/commands.json",
    },
};
// Deep Audit v2: Added Kiro install spec
const KIRO_INSTALL_SPEC = {
    skills: {
        enabled: true,
        target: ".kiro/skills",
        globalTarget: "skills",
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".kiro/steering",
        globalTarget: "steering",
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "kiro/root.kiro.md",
        target: ".kiro/steering/root.md",
        globalTarget: "steering/root.md",
    },
};
// ============================================================================
// TIER 3: Extended Agents (4)
// ============================================================================
const AMP_INSTALL_SPEC = {
    // Deep Audit v2: Amp migrated commands → skills (Jan 2026)
    skills: {
        enabled: true,
        target: ".agents/skills",
        globalTarget: "skills", // Global: ~/.config/agents/skills/ (AMP user-wide skills)
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true, // Amp supports .agents/commands/ (verified)
        target: ".agents/commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: false, // Deep Audit v3: Amp uses AGENTS.md for rules, NOT a rules directory
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "codex/root.AGENTS.md", // Shared AGENTS.md format with Codex
        target: "AGENTS.md",
    },
};
const ANTIGRAVITY_INSTALL_SPEC = {
    // Deep Audit v4: Antigravity has SEPARATE paths from Gemini CLI
    // Workspace: .agent/skills/, .agent/workflows/, .agent/rules/
    // Global: ~/.gemini/antigravity/skills/, ~/.gemini/antigravity/global_workflows/
    skills: {
        enabled: true,
        target: ".agent/skills", // Official: workspace skills at .agent/skills/
        globalTarget: "skills", // Global: ~/.gemini/antigravity/skills/
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true,
        target: ".agent/workflows", // Official: workspace workflows at .agent/workflows/
        globalTarget: "global_workflows", // Global: ~/.gemini/antigravity/global_workflows/
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".agent/rules", // Official: workspace rules at .agent/rules/
        globalTarget: "rules", // Global: ~/.gemini/antigravity/rules/
        ext: ".md",
        copyModules: true,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] },
    memory: { enabled: false, target: "" },
    personas: {
        enabled: true,
        target: ".agent/personas",
        globalTarget: "personas",
    },
    templates: {
        enabled: true,
        target: ".agent/templates",
        globalTarget: "templates",
    },
    rootConfig: {
        source: "gemini/root.GEMINI.md",
        target: "GEMINI.md", // Project: ./GEMINI.md
        globalTarget: "../GEMINI.md", // Global: ~/.gemini/GEMINI.md (up from antigravity/)
    },
};
const OPENCODE_INSTALL_SPEC = {
    // OpenCode (opencode.ai) — Official docs audit Mar 2026
    // Skills: .opencode/skills/<name>/SKILL.md (flat, 1-level glob)
    // Commands: .opencode/commands/*.md (slash commands)
    // Rules: AGENTS.md at project root (NOT .opencode/rules/)
    // Global: ~/.config/opencode/ (skills/, commands/, AGENTS.md)
    // MCP: opencode.json { mcp: { name: { type:"local", command:[], environment:{} } } }
    skills: {
        enabled: true,
        target: ".opencode/skills",
        globalTarget: "skills",
        flattenCategories: true, // Docs: discovery = skills/*/SKILL.md (1-level)
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: true,
        target: ".opencode/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        // OpenCode uses AGENTS.md at project root, NOT a rules/ directory
        // Rules are handled via rootConfig → AGENTS.md
        enabled: false,
        target: "",
        ext: ".md",
        copyModules: false,
        copyStandalone: false,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "opencode/AGENTS.md",
        target: "AGENTS.md", // Docs: "Place AGENTS.md in your project root"
        globalTarget: "AGENTS.md", // Global: ~/.config/opencode/AGENTS.md
    },
};
// Removed: BOLT_INSTALL_SPEC (web-only, no file system access)
const OPENCLAW_INSTALL_SPEC = {
    // OpenClaw — Autonomous AI agent (openclaw.ai)
    // Skills: .openclaw/skills/{name}/SKILL.md (flat, same as ClawHub)
    // No project-local rules (chat-based agent)
    // Global: ~/.openclaw/ (skills/, openclaw.json)
    skills: {
        enabled: true,
        target: ".openclaw/skills",
        globalTarget: "skills",
        flattenCategories: true, // ClawHub format: skills/{name}/SKILL.md
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: { enabled: false, target: "", format: "md", transform: false },
    rules: { enabled: false, target: "", ext: ".md", copyModules: false, copyStandalone: false },
    core: { enabled: false, target: "", files: [] },
    memory: { enabled: false, target: "" },
    personas: { enabled: false, target: "" },
    templates: { enabled: false, target: "" },
    rootConfig: { source: "", target: "" },
};
const TABNINE_INSTALL_SPEC = {
    // Tabnine uses guidelines/ for skills-like content
    skills: {
        enabled: true,
        target: ".tabnine/guidelines",
        copySubdirs: false, // Flat guidelines structure
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".tabnine/guidelines",
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "tabnine/root.guidelines.md",
        target: ".tabnine/guidelines/root.md",
    },
};
// Deep Verification: Augment supports skills at 3 locations:
// .augment/skills/, .claude/skills/, .agents/skills/
const AUGMENT_INSTALL_SPEC = {
    skills: {
        enabled: true,
        target: ".augment/skills",
        copySubdirs: true,
        copyOptionalFolders: true,
    },
    workflows: {
        enabled: true, // Phase 3: Matrix 🔄 → .augment/commands/
        target: ".augment/commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".augment/rules", // Deep Audit: prevent standalone spill into .augment/ root
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "augment/root.guidelines.md",
        target: ".augment/guidelines.md",
    },
};
// ============================================================================
// Removed: VOID_INSTALL_SPEC (development paused Jan 2026)
// Removed: SUPERMAVEN_INSTALL_SPEC (sunset, merged into Cursor mid-2025)
// ============================================================================
const TRAE_INSTALL_SPEC = {
    // Trae AI (ByteDance) — supports rules in .trae/, memories, and modes
    skills: {
        enabled: true, // Phase 3: Matrix 🔄 → .trae/skills/ (MCP-based)
        target: ".trae/skills",
        globalTarget: "skills",
        flattenCategories: true, // Trae scans 1-level deep: skills/{name}/SKILL.md
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: true, // Phase 3: Matrix 🔄 → .trae/commands/
        target: ".trae/commands",
        globalTarget: "commands",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".trae/rules", // Deep Audit: trae.ai official path is .trae/rules/
        globalTarget: "rules",
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "trae/root.trae.md",
        target: ".trae/rules/project_rules.md", // Deep Audit v3: official filename is project_rules.md
        globalTarget: "rules/project_rules.md",
    },
};
const BLACKBOX_INSTALL_SPEC = {
    // Blackbox AI — IDE + VS Code extension
    // Skills: .blackbox/skills/{name}/SKILL.md (flat, 1-level scan like Cline/Windsurf)
    skills: {
        enabled: true,
        target: ".blackbox/skills",
        globalTarget: "skills",
        flattenCategories: true, // Blackbox scans 1-level deep
        copySubdirs: true,
        copyOptionalFolders: false,
    },
    workflows: {
        enabled: false,
        target: "",
        format: "md",
        transform: false,
    },
    rules: {
        enabled: true,
        target: ".blackbox/rules",
        globalTarget: "rules",
        ext: ".md",
        copyModules: false,
        copyStandalone: true,
    },
    core: { enabled: false, target: "", files: [] }, memory: { enabled: false, target: "" }, personas: {
        enabled: false,
        target: "",
    },
    templates: {
        enabled: false,
        target: "",
    },
    rootConfig: {
        source: "blackbox/root.blackbox.md",
        target: ".blackbox/rules/blackbox_rules.md",
        globalTarget: "rules/blackbox_rules.md",
    },
};
// ============================================================================
// REGISTRY & LOOKUP
// ============================================================================
/**
 * IDE Install Specifications Registry
 */
export const IDE_INSTALL_SPECS = {
    // Tier 0
    codex: CODEX_INSTALL_SPEC,
    // Tier 1 (Deep Audit v2: merged copilot→vscode, promoted antigravity)
    cursor: CURSOR_INSTALL_SPEC,
    claude: CLAUDE_INSTALL_SPEC,
    gemini: GEMINI_INSTALL_SPEC,
    vscode: VSCODE_COPILOT_INSTALL_SPEC,
    windsurf: WINDSURF_INSTALL_SPEC,
    copilot: COPILOT_INSTALL_SPEC, // backward compat alias → vscode
    antigravity: ANTIGRAVITY_INSTALL_SPEC,
    // Tier 2
    cline: CLINE_INSTALL_SPEC,
    continue: CONTINUE_INSTALL_SPEC,
    roo: ROO_INSTALL_SPEC,
    jetbrains: JETBRAINS_INSTALL_SPEC,
    amazonq: AMAZONQ_INSTALL_SPEC,
    kiro: KIRO_INSTALL_SPEC,
    zed: ZED_INSTALL_SPEC,
    aider: AIDER_INSTALL_SPEC,
    coderabbit: CODERABBIT_INSTALL_SPEC,
    cody: CODY_INSTALL_SPEC,
    // Tier 3 (Removed: bolt, void, supermaven)
    amp: AMP_INSTALL_SPEC,
    opencode: OPENCODE_INSTALL_SPEC,
    openclaw: OPENCLAW_INSTALL_SPEC,
    tabnine: TABNINE_INSTALL_SPEC,
    augment: AUGMENT_INSTALL_SPEC,
    trae: TRAE_INSTALL_SPEC,
    blackbox: BLACKBOX_INSTALL_SPEC,
};
/**
 * Get install spec for an IDE
 */
export function getInstallSpec(ideValue) {
    return IDE_INSTALL_SPECS[ideValue] || DISABLED_SPEC;
}
/**
 * Check if IDE has skills support
 */
export function hasSkillsSupport(ideValue) {
    const spec = getInstallSpec(ideValue);
    return spec.skills.enabled;
}
/**
 * Check if IDE has workflows support
 */
export function hasWorkflowsSupport(ideValue) {
    const spec = getInstallSpec(ideValue);
    return spec.workflows.enabled;
}
/**
 * Check if IDE has rules support
 */
export function hasRulesSupport(ideValue) {
    const spec = getInstallSpec(ideValue);
    return spec.rules.enabled;
}
/**
 * Check if IDE has personas support
 */
export function hasPersonasSupport(ideValue) {
    const spec = getInstallSpec(ideValue);
    return spec.personas.enabled;
}
/**
 * Get summary of what components an IDE supports
 */
export function getIDEComponentSummary(ideValue) {
    const spec = getInstallSpec(ideValue);
    return {
        skills: spec.skills.enabled,
        workflows: spec.workflows.enabled,
        rules: spec.rules.enabled,
        personas: spec.personas.enabled,
        templates: spec.templates.enabled,
    };
}
