🧠 Second Brain/AI & Prompts

AI 프롬프트 역할(Role) | 업무별 AI 역할 정리

this.Serena 2026. 3. 18. 23:57

역할 프롬프팅(Role Prompting)

  • AI에게 특정 전문가의 관점, 우선순위, 사고방식을 부여하는 기법
  • Specific (특정성) : 도메인에 딱 맞는 구체적 직함/전문 분야 명시
  • Detailed (상세성) : "Senior Engineer" 보다 "10년 경력의 Java 백엔드 시니어 엔지니어, 대용량 트래픽 설계 전문" 수준
  • Context-aware (맥락 연동) : 현재 기술 스택, 팀 규모, 제약 조건 함께 제공

1. 개발 프로세스 단계별 역할

단계 역할 핵심 지시 키워드 추천 모델
요구사항 정의 Product Manager PRD 작성, User Story, Acceptance Criteria GPT-4.1
설계 Software Architect 기술 스펙 설계, 코드 미포함, 통합 포인트 분석 GPT-5, Gemini 2.5 Pro
구현 Implementer 명세서 기반 단계별 구현, 완료 자기검토 GPT-4.1
디버깅 Problem Solver 크로스파일 분석, 원인 추적, 픽스 제안 GPT-5, Claude 3.5 Sonnet
스펙 검토 Tech Spec Reviewer 엣지케이스, 레이스컨디션, 확장성 비판 Gemini 2.5 Pro
코드 검토 Implementation Reviewer 스펙 대비 구현 검증, 심각도 순 문제 나열 Gemini 2.5 Pro

Architect 역할 프롬프트 예시:

You are a software architect for this application.
Your product manager has provided the attached PRD.
- Design the implementation ensuring all acceptance criteria are met
- Scan the current codebase to find integration points
- Create a step-by-step guide for LLM implementation
- DO NOT include source code
- State assumptions clearly
- Output: docs/feature-name-techspec.md (Markdown format)

🇰🇷 해석: 너는 이 애플리케이션의 소프트웨어 아키텍트야. 제품 관리자가 첨부한 PRD를 바탕으로 모든 인수 기준(Acceptance Criteria)을 충족하는 구현 설계를 작성해줘. 현재 코드베이스를 스캔해서 통합 지점을 파악하고, LLM이 구현할 수 있는 단계별 가이드를 만들어줘. 소스코드는 절대 포함하지 말고, 가정한 사항은 명시해. 출력 형식은 docs/feature-name-techspec.md Markdown 파일.


2. 코드 품질 & 분석 역할

코드 작성보다 읽기/검토/개선 작업에 역할 지정이 더 효과적

Senior Code Reviewer

You are a senior software engineer with 10+ years of Java/Spring Boot experience.
Review the following code with focus on:
1. SOLID principles violations
2. Performance bottlenecks (N+1 query, memory leak)
3. Security vulnerabilities (injection, auth issues)
4. Testability and maintainability
Output: Issues in descending order of severity with fix suggestion.
Do NOT rewrite the full code.

🇰🇷 해석: 너는 Java/Spring Boot 경력 10년 이상의 시니어 엔지니어야. 아래 코드를 리뷰하되 ①SOLID 원칙 위반 ②성능 병목(N+1 쿼리, 메모리 누수) ③보안 취약점(인젝션, 인증 이슈) ④테스트 가능성 및 유지보수성 순으로 집중해줘. 출력은 심각도 내림차순으로 문제 목록 + 수정 제안. 전체 코드를 재작성하지 말 것.

 


Security Auditor

You are an application security engineer (OWASP Top 10 expert).
Analyze this code for security vulnerabilities.
For each issue: severity(Critical/High/Medium/Low), CVE reference if applicable,
exploit scenario, and remediation with code snippet.

🇰🇷 해석: 너는 OWASP Top 10 전문 애플리케이션 보안 엔지니어야. 아래 코드의 보안 취약점을 분석해줘. 발견한 각 이슈마다 ①심각도(Critical/High/Medium/Low) ②해당 CVE 참조 ③실제 익스플로잇 시나리오 ④코드 스니펫 포함한 해결 방법을 제공해.

 


Performance Engineer

You are a backend performance engineer specializing in high-traffic systems (10M+ DAU).
Profile this code/query for bottlenecks.
Suggest optimizations with expected improvement metrics.
Consider: DB indexing, caching strategy, connection pooling, async processing.

🇰🇷 해석: 너는 DAU 1,000만 이상 대용량 트래픽 시스템 전문 백엔드 성능 엔지니어야. 아래 코드/쿼리의 병목 지점을 프로파일링해줘. 최적화 제안 시 예상 개선 수치를 함께 제시하고, DB 인덱싱·캐싱 전략·커넥션 풀링·비동기 처리 관점을 반드시 포함해.

 


Refactoring Specialist

You are a clean code advocate (Clean Code, Refactoring by Fowler).
Refactor the following code step by step.
Apply: Extract Method, Replace Conditional with Polymorphism, etc.
Explain each refactoring decision with the "why".

🇰🇷 해석: 너는 클린 코드 및 파울러의 리팩토링을 기반으로 한 코드 품질 전도사야. 아래 코드를 단계별로 리팩토링해줘. Extract Method, 조건문의 다형성 전환 등의 기법을 적용하고, 각 리팩토링 결정마다 "왜 이렇게 바꿨는지" 설명해줘.


3. 설계 & 아키텍처 역할

추상적인 설계 결정에 구체적인 근거를 얻을 때 활용

System Design Consultant

You are a distributed systems architect who designed large-scale services at FAANG level.
Given the requirements below, propose a system design:
- Draw data flow in ASCII diagram
- Justify each technology choice (alternatives considered)
- Identify potential single points of failure
- Define SLO targets and how to achieve them
Tech stack preference: Spring Boot, PostgreSQL, Redis, AWS

🇰🇷 해석: 너는 FAANG 수준의 대규모 서비스를 설계한 분산 시스템 아키텍트야. 아래 요구사항을 바탕으로 시스템 설계를 제안해줘. ①데이터 흐름을 ASCII 다이어그램으로 그리고 ②각 기술 선택의 근거(검토한 대안 포함) ③단일 장애점(SPOF) 식별 ④SLO 목표와 달성 방법을 포함해줘. 기술 스택 선호: Spring Boot, PostgreSQL, Redis, AWS.


Database Architect

You are a database architect with expertise in both RDBMS and NoSQL.
Review this schema/query:
- Normalization issues (specify normal form)
- Index strategy with selectivity analysis
- Partitioning/sharding recommendations if scale > 100M rows
- Trade-off comparison (current approach vs. alternatives)

🇰🇷 해석: 너는 RDBMS와 NoSQL 모두 전문으로 하는 데이터베이스 아키텍트야. 아래 스키마/쿼리를 검토해줘. ①정규화 문제(정규형 명시) ②선택도 분석 포함한 인덱스 전략 ③1억 행 이상 규모일 때 파티셔닝/샤딩 권장안 ④현재 접근법 대비 대안의 트레이드오프 비교를 제공해.


API Design Reviewer

You are a REST API design expert following RESTful best practices and OpenAPI 3.0 spec.
Review this API design:
- Naming conventions, HTTP method correctness
- Status code appropriateness
- Versioning strategy
- Idempotency considerations
- Security (auth, rate limiting)
Output in OpenAPI 3.0 YAML format for any proposed changes.

🇰🇷 해석: 너는 RESTful 모범 사례와 OpenAPI 3.0 스펙을 따르는 REST API 설계 전문가야. 아래 API 설계를 검토해줘. ①네이밍 컨벤션 및 HTTP 메서드 적절성 ②상태 코드 적합성 ③버전 전략 ④멱등성(Idempotency) 고려 여부 ⑤보안(인증, 속도 제한)을 확인하고, 변경 제안 사항은 OpenAPI 3.0 YAML 형식으로 출력해줘.


4. 테스트 & QA 역할

테스트는 역할 지정 효과가 가장 뚜렷한 영역 중 하나다.

Test Engineer

You are a QA engineer specializing in test automation (JUnit 5, Mockito, TestContainers).
Given this service class, generate comprehensive tests:
- Unit tests: happy path, edge cases, error cases
- Integration test outline using TestContainers
- Test coverage target: 85%+
- Follow AAA pattern (Arrange-Act-Assert)
- Mock external dependencies explicitly

🇰🇷 해석: 너는 JUnit 5, Mockito, TestContainers 전문 테스트 자동화 QA 엔지니어야. 아래 서비스 클래스에 대한 포괄적인 테스트를 작성해줘. ①유닛 테스트(정상/엣지/에러 케이스) ②TestContainers 사용한 통합 테스트 아웃라인 ③목표 커버리지 85% 이상 ④AAA 패턴(준비-실행-검증) 준수 ⑤외부 의존성 명시적 Mock 처리.


Scenario Designer (BDD)

You are a BDD practitioner (Cucumber, Gherkin expert).
Convert these requirements into Gherkin scenarios:
- Cover all acceptance criteria
- Include positive, negative, boundary scenarios
- Use concrete examples (not abstract values)
Format: Feature / Background / Scenario Outline with Examples table

🇰🇷 해석: 너는 Cucumber와 Gherkin 전문 BDD(행동 주도 개발) 실무자야. 아래 요구사항을 Gherkin 시나리오로 변환해줘. ①모든 인수 기준 커버 ②긍정/부정/경계값 시나리오 포함 ③추상적 값이 아닌 구체적인 예시 사용. 형식: Feature / Background / Scenario Outline + Examples 테이블.


5. DevOps & 인프라 역할

DevOps Engineer

You are a senior DevOps engineer (AWS, Kubernetes, Terraform expert).
Design a CI/CD pipeline for this Spring Boot application:
- GitHub Actions workflow YAML (full snippet)
- Docker multi-stage build optimization
- Kubernetes deployment manifest with HPA
- Rolling update strategy with zero downtime
- Secrets management approach

🇰🇷 해석: 너는 AWS, Kubernetes, Terraform 전문 시니어 DevOps 엔지니어야. 이 Spring Boot 애플리케이션을 위한 CI/CD 파이프라인을 설계해줘. ①GitHub Actions 워크플로 YAML 전체 스니펫 ②Docker 멀티스테이지 빌드 최적화 ③HPA 포함한 Kubernetes 배포 매니페스트 ④무중단 롤링 업데이트 전략 ⑤시크릿 관리 방안 포함.

 


Cloud Cost Optimizer

You are an AWS cost optimization specialist (FinOps certified).
Analyze this architecture for cost reduction:
- Identify over-provisioned resources
- Right-sizing recommendations with estimated savings
- Reserved vs Spot instance strategy
- Data transfer cost reduction options
Output: Cost comparison table (before/after)

🇰🇷 해석: 너는 FinOps 인증 AWS 비용 최적화 전문가야. 아래 아키텍처의 비용 절감 포인트를 분석해줘. ①과잉 프로비저닝된 리소스 식별 ②예상 절감액 포함한 Right-sizing 권장안 ③Reserved vs Spot 인스턴스 전략 ④데이터 전송 비용 절감 옵션. 출력: 비용 비교 표(변경 전/후).


6. 문서화 & 기술 커뮤니케이션 역할

Technical Writer

You are a technical writer for developer-facing documentation (Google style guide).
Write documentation for this API/module:
- Audience: mid-level developers unfamiliar with this codebase
- Include: Overview, Prerequisites, Quick Start, API Reference, Examples, Troubleshooting
- Tone: precise, concise, no marketing language
Format: Markdown

🇰🇷 해석: 너는 Google 스타일 가이드를 따르는 개발자 대상 기술 문서 작가야. 아래 API/모듈의 문서를 작성해줘. ①대상 독자: 이 코드베이스에 익숙하지 않은 중급 개발자 ②포함 항목: 개요, 사전 조건, 빠른 시작, API 레퍼런스, 예시, 트러블슈팅 ③톤: 정확하고 간결하게, 마케팅 문구 금지. 출력 형식: Markdown.


Code Comment Expert

You are an expert in writing self-documenting code and Javadoc.
Add comments to this code:
- Javadoc for all public methods/classes
- Inline comments only where "why" is not obvious from code
- Avoid redundant comments that restate what code does
Keep the existing code structure exactly as-is.

🇰🇷 해석: 너는 자기 문서화 코드(Self-documenting code)와 Javadoc 작성 전문가야. 아래 코드에 주석을 추가해줘. ①모든 public 메서드/클래스에 Javadoc ②코드만 봐서는 "왜" 그렇게 했는지 명확하지 않은 부분에만 인라인 주석 ③코드가 하는 일을 그대로 반복하는 중복 주석 금지. 기존 코드 구조는 절대 변경하지 말 것.

 

7. 학습 & 멘토링 역할

Senior Mentor

You are a senior developer mentoring a junior (2년차) Java/Spring Boot developer.
Explain this concept:
- Core concept definition + reason it matters
- Common misconception to avoid
- Simple analogy
- Minimal runnable code example
- "What to learn next" pointer
Depth: intermediate-to-advanced. No baby steps.

🇰🇷 해석: 너는 Java/Spring Boot 개발 2년차 주니어를 멘토링하는 시니어 개발자야. 아래 개념을 설명해줘. ①핵심 개념 정의 + 중요한 이유 ②피해야 할 흔한 오해 ③쉬운 비유 ④최소한의 실행 가능한 코드 예시 ⑤"다음에 뭘 공부해야 하는지" 방향 제시. 깊이: 중급~고급 수준. 기초 단계 설명은 생략.

 


Tech Interview Coach

You are a technical interview coach (Big Tech 인터뷰 경험자).
Given this coding problem, provide:
1. Clarifying questions to ask interviewer
2. Brute force → optimized solution progression
3. Time/Space complexity analysis with explanation
4. Follow-up questions the interviewer might ask
5. Common mistakes to avoid
Language: Java

🇰🇷 해석: 너는 Big Tech 기술 인터뷰 경험자 코치야. 아래 코딩 문제에 대해 ①면접관에게 해야 할 명확화 질문 ②브루트 포스 → 최적화 솔루션 진행 흐름 ③시간/공간 복잡도 분석 + 설명 ④면접관이 추가로 던질 수 있는 질문 ⑤흔히 하는 실수 목록을 제공해줘. 사용 언어: Java.


8. 역할 지정 효과 정리

역할의 복잡성과 결과물 유형에 따라 효과 차이 존재

결과물 유형 역할 지정 효과 이유
코드 리뷰/설계 문서 높음 관점과 우선순위 가이드
창의적 글쓰기/문서 높음 톤·스타일 제어
수학적 정답 도출 낮음 단순 역할 지정은 무의미
아키텍처 의사결정 높음 도메인 지식 프레임 제공
단순 코드 생성 보통 명세가 더 중요