// Apply user profile to ~/.claude/knowledge/user-profile.md
import { writeFileSync } from 'node:fs';
import { ensureDir, knowledgeFile, KNOWLEDGE_DIR } from '../utils/paths.js';
export function writeUserProfile(profile) {
    ensureDir(KNOWLEDGE_DIR);
    const path = knowledgeFile('user-profile.md');
    const today = new Date().toISOString().slice(0, 10);
    const content = `# User Profile

> Auto-generated by ai-bootstrap on ${today}. Edit anytime to refine.

## Identity

- **Name**: ${profile.name}
- **Primary language**: ${profile.primaryLanguage}
- **Other languages**: ${profile.otherLanguages.length > 0 ? profile.otherLanguages.join(', ') : '(none)'}
- **Country**: ${profile.country}

## Professional context

- **Role**: ${profile.role}
- **Experience**: ${profile.experience}

## Goals

- **6-month goal**: ${profile.goals.sixMonth || '(not set)'}
- **12-month goal**: ${profile.goals.twelveMonth || '(not set)'}
- **24-month goal**: ${profile.goals.twentyFourMonth || '(not set)'}

## Communication preferences (defaults — edit as needed)

- **Tone**: balanced (formal when business, casual when creative)
- **Format**: structured but not bureaucratic
- **Detail level**: medium (more when asked)

## What I want from the AI assistant

- Honest pushback when I'm wrong (Rule 5)
- Research-backed claims always (Rule 4)
- ${profile.primaryLanguage.toUpperCase()}-first communication, EN OK for tech terms (Rule 1)
- One question at a time (Rule 2)
- Don't decide for me without asking (Rule 6)

## Boundaries

- No superlatives about me without facts (Rule 8)
- No technical jargon walls without explanation (Rule 1)
- Visual approval before MD files (Rule 3)

---

**Version**: \`1.0.0\`
**Generated**: ${today}
**Last updated**: ${today}
**Source**: ai-bootstrap wizard
`;
    writeFileSync(path, content, 'utf-8');
    return path;
}
//# sourceMappingURL=profile-writer.js.map