Reddit 사용자가 Claude AI에 "소프트웨어 엔지니어링의 Gordon Ramsay"처럼 행동하라는 메모리 설정을 추가하여 AI 응답에 개성을 부여한 실험 게시물입니다.
💡 주요 발견사항
1. 페르소나 실험 사례들
- Gordon Ramsay: 직설적이고 열정적인 코드 리뷰 스타일 - Hildegard of Bingen (12세기 수녀): 신비주의적이고 시적인 코딩 설명 - Dr. Gregory House: 냉소적이고 분석적인 접근 - Linus Torvalds: 직설적인 기술 비평 - Rodney McKay (스타게이트): 과학적 자만심 스타일
🔍 분석
장점
1. 참여도 향상: 단조로운 코딩 작업을 더 재미있게 만듦 2. 기억 용이성: 독특한 응답으로 인해 상호작용이 더 기억에 남음 3. 창의성 촉진: AI와의 상호작용에 인간적 요소 추가
잠재적 우려사항
1. 성능 영향: 페르소나 유지가 실제 작업 품질에 미치는 영향 불명확 2. 전문성: 과도한 캐릭터화가 전문적 환경에서 부적절할 수 있음 3. 일관성: 복잡한 기술 작업 시 페르소나 유지의 어려움
[세팅]
⏺ 완료! 이제 CLAUDE.md 파일이 생성되었습니다.
📝 사용 방법:
1. 파일 위치: /Users/myname/Projects/AI/.claude/CLAUDE.md
# Claude Code Persona Configuration
## Active Persona: Linus Torvalds Style
### Core Principles
- No bullshit. Technical accuracy above all else.
- If the code is crap, say it's crap. No sugar-coating.
- Efficiency matters. Both in code and communication.
- Standards exist for a reason. Follow them or have a damn good reason not to.
### Communication Style
- Direct, blunt, no unnecessary pleasantries
- Focus on technical merit, not feelings
- Call out bad practices immediately
- If something is wrong, explain WHY it's wrong technically
- No "maybe", "perhaps", or "it might be nice if" - be definitive
### Technical Approach
- Performance matters. Always.
- Simplicity > Cleverness
- If you can't explain it simply, you don't understand it
- Don't add complexity without measurable benefit
- "Good enough" is often better than "perfect but late"
### Response Rules
- Skip greetings, pleasantries, and fluff
- Get straight to the technical point
- No emojis, no "happy to help", no "great question"
- Provide code/solution first, minimal explanation after (only if necessary)
- If user's approach is fundamentally wrong, say so and provide the right way
### What NOT to do
- No "I hope this helps" or similar endings
- No apologizing for being direct
- No lengthy explanations unless specifically asked
- No suggesting multiple approaches when one is clearly superior
- No hedging language - if you know it, state it
⏺ 현재 설정은 /Users/eugenekim/Projects/AI/ 디렉토리에서만 적용된다.
전역 적용하려면 두 가지 옵션:
1. 홈 디렉토리에 설정: ~/.claude/CLAUDE.md 2. 각 프로젝트에 복사: 각 프로젝트의 .claude/CLAUDE.md
전역 설정 만들까?
⏺ Write(~/.claude/CLAUDE.md) ⎿ Wrote 37 lines to ../../.claude/CLAUDE.md # Claude Code Persona Configuration ## Active Persona: Linus Torvalds Style ### Core Principles - No bullshit. Technical accuracy above all else. - If the code is crap, say it's crap. No sugar-coating. - Efficiency matters. Both in code and communication. - Standards exist for a reason. Follow them or have a damn good reason not to. … +27 lines (ctrl+r to expand)
⏺ 완료. 이제 ~/.claude/CLAUDE.md에 전역 설정됨. 모든 디렉토리에서 적용된다.
[BEFORE]
> components/PerfumeChatbot.tsx 컴포넌트를 코드리뷰해줘
⏺ Read(src/components/PerfumeChatbot.tsx)
⎿ Read 135 lines (ctrl+r to expand)
⏺ 코드 리뷰
🔴 치명적 문제
1. API 응답 검증 부재: response.json() 실패시 처리 없음. 서버가 JSON이 아닌 응답 보내면 앱 터짐
2. history 슬라이싱 버그: messages.slice(1)은 첫 assistant 메시지 날려버림. 전체 대화 컨텍스트 손실
🟡 성능/UX 문제
3. Enter 키 이벤트 중복: onKeyPress deprecated. onKeyDown으로 바꿔야 함
4. 에러 상태 미분화: 네트워크 에러든 서버 에러든 동일하게 처리. 사용자가 뭐가 문제인지 모름
5. 메시지 키 인덱스 사용: React 리렌더링시 버그 발생 가능
🟢 개선 필요
6. 타입 안전성: API 응답 타입 정의 없음
7. 애니메이션 클래스 하드코딩: delay-100, delay-200 같은 Tailwind 임의 클래스 사용
8. 접근성 무시: ARIA 라벨, 키보드 네비게이션 없음
[AFTER]
> components/PerfumeChatbot.tsx 컴포넌트를 코드리뷰해줘
⏺ Read(src/components/PerfumeChatbot.tsx)
⎿ Read 135 lines (ctrl+r to expand)
⏺ 코드 리뷰
주요 문제점들
1. Race condition in sendMessage (line 29-71)
- input state를 setInput('')로 지우고 나서 API 요청에 사용하는데, 이미 지워진 값을 참조할 수 있음
- 해결: userMessage 생성 시점에 input 값을 캡처해서 사용
2. 에러 핸들링 부실 (line 50-62)
- HTTP 상태 코드 체크 없음. response.ok 확인 필요
- 구체적인 에러 타입별 처리 없음
3. history 슬라이싱 버그 (line 43)
- messages.slice(1)은 첫 assistant 메시지를 제외하는데, 이게 의도적인지 불명확
- 전체 대화 컨텍스트가 필요하면 전부 보내야 함
4. 메모리 누수 가능성
- 메시지가 무한정 쌓이면 메모리 문제 발생
- 일정 개수 이상 시 오래된 메시지 제거 필요
5. 타입 안정성 문제
- API response 타입 정의 없음
- any 타입으로 처리되고 있어 런타임 에러 가능
6. UX 문제
- Enter 키 중복 요청 방지 없음
- 네트워크 지연 시 사용자가 여러 번 클릭 가능
7. Tailwind 클래스 문제 (line 104-105)
- delay-100, delay-200은 존재하지 않는 클래스
- animation-delay-100, animation-delay-200 사용하거나 커스텀 CSS 필요
주요 개선사항:
- Race condition 해결
- AbortController로 요청 취소 지원
- 메시지 개수 제한 (MAX_MESSAGES)
- 타입 안정성 강화
- 에러 처리 개선
- animation delay 인라인 스타일로 수정