// Section builder functions for platform-specific agent idioms and session optimization
function buildAiderIdioms() {
    return {
        title: 'Aider Idioms',
        rules: [
            {
                rule: 'Use /add to stage only the relevant files before asking for changes',
                enforcement: 'recommended',
            },
            {
                rule: 'Run /diff before committing to review what the AI changed',
                enforcement: 'recommended',
            },
            {
                rule: 'Use --no-auto-commits in projects with CI pipelines to keep commit history clean',
                enforcement: 'recommended',
            },
            {
                rule: 'Use --yes for unattended batch operations; review logs after completion',
                enforcement: 'recommended',
            },
        ],
    };
}
function buildClineIdioms() {
    return {
        title: 'Cline Idioms',
        rules: [
            {
                rule: 'Use the Task tool for long-running operations to avoid context window pressure',
                enforcement: 'recommended',
            },
            {
                rule: 'Set preferred_languages in Cline settings to match the project language',
                enforcement: 'recommended',
            },
            {
                rule: 'Access available MCP servers through the context menu for extended capabilities',
                enforcement: 'recommended',
            },
        ],
    };
}
function buildCodexIdioms() {
    return {
        title: 'Codex CLI Idioms',
        rules: [
            {
                rule: 'Use --approval-mode to control which actions execute automatically vs. require confirmation',
                enforcement: 'recommended',
            },
            {
                rule: 'Use --model gpt-4o for complex multi-file tasks requiring deeper reasoning',
                enforcement: 'recommended',
            },
            {
                rule: 'Reserve full-auto mode for isolated feature branches only; never on main/develop',
                enforcement: 'strict',
            },
        ],
    };
}
function buildGeminiIdioms() {
    return {
        title: 'Gemini CLI Idioms',
        rules: [
            {
                rule: 'Leverage the large context window: pass the full repo without pre-filtering files',
                enforcement: 'recommended',
            },
            {
                rule: 'Use @codebase to provide total context for cross-cutting refactors and analysis',
                enforcement: 'recommended',
            },
        ],
    };
}
function buildAmazonQIdioms() {
    return {
        title: 'Amazon Q Developer Idioms',
        rules: [
            {
                rule: 'Use /dev for AI-assisted code generation within the IDE',
                enforcement: 'recommended',
            },
            {
                rule: 'Use /review to get an AI-powered PR review before opening the pull request',
                enforcement: 'recommended',
            },
            {
                rule: 'Use /test to auto-generate unit tests for the current file or selection',
                enforcement: 'recommended',
            },
            {
                rule: 'Prefer Amazon Q for AWS-native integrations (IAM, Lambda, CDK) for context-aware suggestions',
                enforcement: 'recommended',
            },
        ],
    };
}
function buildClaudeCodeSessionSection() {
    return {
        title: 'Session Optimization',
        rules: [
            {
                rule: 'At session start: detect irrelevant MCP servers and suggest disabling with /mcp',
                enforcement: 'recommended',
            },
            {
                rule: 'Suggest /model sonnet for implementation tasks, /model opus for architecture',
                enforcement: 'recommended',
            },
            {
                rule: 'Say nothing if all tools look optimal — avoid wasting tokens reporting "all good"',
                enforcement: 'strict',
            },
        ],
    };
}
function buildCursorSessionSection() {
    return {
        title: 'Context Window Management',
        rules: [
            {
                rule: 'Keep context minimal: use @file references instead of pasting code blocks',
                enforcement: 'recommended',
            },
            {
                rule: 'Use .cursorrules/.windsurfrules as the single source of truth for project rules',
                enforcement: 'strict',
            },
            {
                rule: 'Close irrelevant files before starting a task to reduce noise in context',
                enforcement: 'recommended',
            },
        ],
    };
}
function buildCopilotScopeSection() {
    return {
        title: 'Scope Instructions',
        rules: [
            {
                rule: 'Focus suggestions on the current file and its direct dependencies only',
                enforcement: 'recommended',
            },
            {
                rule: 'Use workspace context only when explicitly asked or for cross-file refactors',
                enforcement: 'recommended',
            },
        ],
    };
}
const SESSION_SECTION_BUILDERS = {
    'claude-code': buildClaudeCodeSessionSection,
    cursor: buildCursorSessionSection,
    windsurf: buildCursorSessionSection,
    copilot: buildCopilotScopeSection,
    aider: buildAiderIdioms,
    cline: buildClineIdioms,
    codex: buildCodexIdioms,
    gemini: buildGeminiIdioms,
    'amazon-q': buildAmazonQIdioms,
};
/**
 * Build a platform-specific session optimization section for generate_rules.
 * Returns null for platforms that have no equivalent concept.
 */
export function buildSessionOptimizationSection(platform) {
    const builder = SESSION_SECTION_BUILDERS[platform];
    return builder ? builder() : null;
}
//# sourceMappingURL=sections-platform.js.map