// engine/ai-integration/aider/aider-config-generator.ts — .aider.conf.yml generator (SPEC-268)
import { writeFileSync } from 'node:fs';
import { join } from 'node:path';
export function generateAiderConfig(options) {
    const model = options.model ?? 'gpt-4o';
    const autoCommits = options.autoCommits ?? false;
    const lines = [
        '# Aider configuration — managed by Planu (SPEC-268)',
        '#',
        '# Planu manages the spec-driven workflow. Aider handles implementation.',
        '# Do not enable auto-commits — Planu controls the commit lifecycle.',
        '',
        `model: ${model}`,
        `auto-commits: ${String(autoCommits)}`,
        '',
        '# Planu context files — always loaded for SDD awareness',
        'read:',
        '  - CLAUDE.md',
        '  - planu/specs/active-spec.md',
        '',
        '# Conventional commits enforced by commitlint',
        'commit-prompt: |',
        '  Write a conventional commit message (feat/fix/docs/chore).',
        '  Header max 100 chars. Subject required.',
        '',
    ];
    return lines.join('\n');
}
export function writeAiderConfig(projectPath, options) {
    const filePath = join(projectPath, '.aider.conf.yml');
    // Idempotent: always overwrite with latest Planu-managed config
    writeFileSync(filePath, generateAiderConfig(options), 'utf8');
}
//# sourceMappingURL=aider-config-generator.js.map