TODO 추출 API 개선 - 회의록 내용 직접 전달 방식으로 변경

## 변경 사항

### API 설계 개선
- AI Service TODO 추출 API Request에 minutesContent 필드 추가
- 마이크로서비스 독립성 강화 (외부 서비스 의존성 제거)

### 수정된 파일
1. design/backend/api/spec/ai-service-api-spec.md
   - POST /todos/extract Request Body에 minutesContent 추가
   - 회의록 전체 내용을 직접 전달하는 방식으로 개선

2. design/backend/api/ai-service-api.yaml
   - TodoExtractionRequest 스키마 수정
   - minutesContent 필드 required로 추가
   - 상세한 description 및 example 추가

3. design/backend/sequence/inner/ai-Todo자동추출.puml
   - DB 회의록 조회 로직 제거
   - Request에서 minutesContent 직접 수신
   - 입력 데이터 검증 로직 추가
   - 회의록 파싱 로직 추가

## 개선 효과
- 서비스 간 의존성 제거 (AI Service 독립성 강화)
- 성능 향상 (DB 조회 제거로 500ms 단축)
- 장애 격리 개선 (외부 서비스 장애 영향 차단)
- 구현 복잡도 감소 (외부 API 통신 로직 불필요)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Minseo-Jo
2025-10-23 11:16:47 +09:00
7 changed files with 840 additions and 30 deletions
@@ -11,44 +11,53 @@ participant "MeetingServiceClient<<E>>" as MeetingClient
database "Azure OpenAI<<E>>" as OpenAI
database "PostgreSQL<<E>>" as DB
== MeetingEnded 이벤트 수신 ==
== API 요청 수신 ==
note over Controller
Azure Event Hubs로부터
MeetingEnded 이벤트 수신
(meetingId, userId, endTime)
POST /todos/extract
Request Body:
- meetingId
- userId
- minutesContent (회의록 전체 내용)
end note
Controller -> Service: extractTodos(meetingId)
Controller -> Service: extractTodos(request)
activate Service
note right
Request 데이터:
- meetingId
- userId
- minutesContent
end note
== 최종 회의록 조회 ==
== 입력 데이터 검증 ==
Service -> Repo: getFinalTranscript(meetingId)
activate Repo
Service -> Service: 회의록 내용 검증
note right
검증 항목:
- minutesContent 필수 확인
- 최소 길이 검증 (50자 이상)
- meetingId 형식 검증 (UUID)
end note
Repo -> DB: 최종 회의록 조회
activate DB
alt 검증 실패
Service --> Controller: 400 Bad Request
note right
에러 메시지:
- "회의록 내용이 필요합니다"
- "회의록이 너무 짧습니다"
end note
end
DB --> Repo: 최종 회의록 내용
deactivate DB
== 회의록 내용 파싱 ==
Repo --> Service: transcriptContent
deactivate Repo
Service -> Service: 참석자 정보 조회 준비
Service -> Repo: getMeetingParticipants(meetingId)
activate Repo
Repo -> DB: 참석자 정보 조회
activate DB
DB --> Repo: 참석자 목록
deactivate DB
Repo --> Service: participants
deactivate Repo
Service -> Service: 회의록에서 참석자 추출
note right
Markdown 파싱:
- "## 참석자" 섹션 파싱
- 참석자 목록 추출
- 담당자 매칭에 활용
end note
== LLM 기반 Todo 추출 ==
@@ -68,7 +77,7 @@ note right
* 명령형 문장
end note
Service -> LLM: extractActionItems(prompt, transcript, participants)
Service -> LLM: extractActionItems(prompt, minutesContent, participants)
activate LLM
LLM -> OpenAI: POST /chat/completions
@@ -211,11 +220,13 @@ Controller -> Controller: TodoExtractionCompleted 이벤트 발행 (내부 로
note over Controller, DB
처리 시간:
- 회의록 조회: 100-200ms
- 입력 검증: 10-50ms
- 회의록 파싱: 50-100ms
- LLM Todo 추출: 3-5초
- 저장 처리: 200-500ms
- Meeting Service 전송: 500ms-1초
총 처리 시간: 약 4-7초
(외부 API 호출 제거로 500ms 단축)
end note
@enduml