docs: workflow Phase 1 정리 — 레거시 이동, n8n 제거, IP 하드코딩 제거

- 레거시 .md 2건(slack_basic_dialogue, service_health_check)을 _archive/로 이동
- n8n .json 파일 18건을 _archive/로 이동
- README.md 전면 재작성: n8n 전제 제거, 현행 아키텍처(APScheduler DB + SKILL.md) 반영
- 구 IP(192.168.219.52)를 localhost로 교체 (infrastructure-ssot-principle 준수)

Refs: DOCS#8

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
happybell80 2026-04-06 07:48:39 +09:00
parent 9c9de9ebae
commit 45847403fe
30 changed files with 64 additions and 92 deletions

View File

@ -19,7 +19,7 @@ Slack Trigger → Detect Action Intent → Action Request? → (true) Call skill
| Reply to Slack | 원래 스레드에 결과 회신 |
## 엔드포인트
- 아웃바운드: `POST http://192.168.219.52:8502/api/v1/extract-actions`
- 아웃바운드: `POST http://localhost:8502/api/v1/extract-actions`
- 아웃바운드: Slack `chat.postMessage` (스레드 회신)
## 관련 문서

View File

@ -19,7 +19,7 @@ Slack Trigger → Detect Summary Intent → Summary Request? → (true) Call ski
| Reply to Slack | 원래 스레드에 결과 회신 |
## 엔드포인트
- 아웃바운드: `POST http://192.168.219.52:8502/api/v1/summarize`
- 아웃바운드: `POST http://localhost:8502/api/v1/summarize`
- 아웃바운드: Slack `chat.postMessage` (스레드 회신)
## 관련 문서

View File

@ -21,7 +21,7 @@ Webhook In → Normalize Payload → Action Type → (create) Create Event → R
## 엔드포인트
- 인바운드: `POST /skills/calendar/request` (n8n webhook)
- 아웃바운드: `http://192.168.219.52:8512/api/events` (GET/POST)
- 아웃바운드: `http://localhost:8512/api/events` (GET/POST)
## 관련 문서
- [skill_email_send_request](./skill_email_send_request.md)

View File

@ -17,7 +17,7 @@ Webhook In → Call skill-email → Return Response
## 엔드포인트
- 인바운드: `POST /skills/email/send` (n8n webhook)
- 아웃바운드: `POST http://192.168.219.52:8501/api/v1/send`
- 아웃바운드: `POST http://localhost:8501/api/v1/send`
## 관련 문서
- [skill_calendar_request](./skill_calendar_request.md)

View File

@ -17,7 +17,7 @@ Webhook In → Call skill-news → Return Response
## 엔드포인트
- 인바운드: `POST /skills/news/briefing` (n8n webhook)
- 아웃바운드: `POST http://192.168.219.52:8505/api/v1/briefing`
- 아웃바운드: `POST http://localhost:8505/api/v1/briefing`
## 관련 문서
- [skill_calendar_request](./skill_calendar_request.md)

View File

@ -23,8 +23,8 @@
| Slack Delivery View | 최종 결과를 Slack 채널에 게시 |
## 엔드포인트
- 아웃바운드: `POST http://192.168.219.52:8505/api/news/naver/startup-headlines`
- 아웃바운드: `POST http://192.168.219.52:8505/api/news/sea/headlines`
- 아웃바운드: `POST http://localhost:8505/api/news/naver/startup-headlines`
- 아웃바운드: `POST http://localhost:8505/api/news/sea/headlines`
- 아웃바운드: Slack `chat.postMessage` (채널: C09C98KK2TT)
## 관련 문서

View File

@ -18,7 +18,7 @@ Schedule Trigger (*/10 * * * *) → Check rb8001 Health → Health Failed? → (
| Send Alert | Slack C_ALERTS 채널에 장애 알림 |
## 엔드포인트
- 아웃바운드: `GET http://192.168.219.52:8001/health`
- 아웃바운드: `GET http://localhost:8001/health`
- 아웃바운드: Slack `chat.postMessage` (채널: C_ALERTS)
## 관련 문서

View File

@ -17,7 +17,7 @@ Schedule Trigger (0 */6 * * *) → Load Retry Queue → Call Reindex API → Mar
| Mark Done | 성공 시 `status = 'done'`, `processed_at = NOW()` 업데이트 |
## 엔드포인트
- 아웃바운드: `POST http://192.168.219.52:8508/api/reindex`
- 아웃바운드: `POST http://localhost:8508/api/reindex`
- DB: PostgreSQL `rag_retry_queue` 테이블 (SELECT, UPDATE)
## 관련 문서

View File

@ -21,8 +21,8 @@ Manual Trigger ─┤→ Set Yesterday Date → Generate Diary (rb8001) → Get
## 엔드포인트
- 인바운드: `POST /admin/diary/trigger` (n8n webhook, 수동)
- 아웃바운드: `POST http://192.168.219.52:8001/api/diary/generate`
- 아웃바운드: `GET http://192.168.219.52:8001/api/diary/{date}`
- 아웃바운드: `POST http://localhost:8001/api/diary/generate`
- 아웃바운드: `GET http://localhost:8001/api/diary/{date}`
- 아웃바운드: Slack `chat.postMessage`
## 260319 변경 영향

View File

@ -1,100 +1,72 @@
# Robeing n8n Workflows
# Robeing 서비스 워크플로우
로빙의 분산 마이크로서비스 및 비즈니스 로직을 n8n으로 자동화하기 위한 템플릿 저장소입니다.
로빙이 사용자 요청을 처리하는 실행 흐름을 문서화한 저장소입니다.
## 현행 아키텍처
- **메시지 처리**: Slack 이벤트 → IntentClassifier → executor → LLM 해석 (message_service_v2)
- **스킬 실행**: SKILL.md frontmatter 기반 동적 라우팅 → executor 직접 호출
- **스케줄러**: APScheduler + DB 기반 (`scheduler_repository`에서 잡 관리)
- **서버 실행**: systemd 직접 실행 (Docker/n8n 미사용)
## 폴더 구조
- `01_conversation/`: Slack 진입점, 대화 정규화, 콜드메일 IR 알림 및 액션 추출
- `02_skills/`: `skill-*` 서비스 브리지 (Email, News, Calendar, Slack)
- `01_conversation/`: Slack 진입점, 메시지 흐름, 콜드메일 IR 알림, 액션 추출, 웹 검색
- `02_skills/`: 스킬 서비스 연동 (Email, News, Calendar, Slack, GitHub)
- `03_rag/`: 파일 업로드, 인덱싱, 임베딩, Company X 전용 Grounding 파이프라인
- `04_scheduler/`: 정기 브리핑, 상태 알림, 재시도 로직
- `05_admin/`: 서비스 헬스 체크, 일기(Reflection) 자동 생성 및 동기화
- `05_admin/`: 일기(Reflection) 자동 생성
- `_archive/`: 레거시 문서 및 n8n JSON 파일 보관
## 시스템 구성 및 엔드포인트
## 문서 목차
| 서버 | 역할 | IP | 주요 포트 |
|------|------|----|-----------|
| 51123 | 메인/인증/DB | 192.168.0.100 | Gateway(8100), Auth(9000), DB(5432) |
| 51124 | 로빙/스킬 | 192.168.219.52 | rb8001(8001), Email(8501), News(8505), RAG(8508), Calendar(8512) |
### 01_conversation/
## 주요 워크플로우 가이드
| 문서 | 설명 |
|------|------|
| [message_flow_v2.md](01_conversation/message_flow_v2.md) | v2 메시지 처리 흐름 (IntentClassifier → executor) |
| [coldmail_ir_notification_sync.md](01_conversation/coldmail_ir_notification_sync.md) | 콜드메일 IR 알림 동기화 |
| [slack_action_extractor_request.md](01_conversation/slack_action_extractor_request.md) | Slack 액션 추출 요청 |
| [slack_thread_summary_request.md](01_conversation/slack_thread_summary_request.md) | Slack 스레드 요약 요청 |
| [web_search_query_rewrite_workflow.md](01_conversation/web_search_query_rewrite_workflow.md) | 웹 검색 쿼리 재작성 규칙 |
### 1. 로빙 일기 시스템 (`05_admin/diary_reflection_pipeline.json`)
- 매일 오전 2시, `rb8001`의 하루 활동과 감정을 집계하여 일기를 생성합니다.
- 생성된 요약본을 Slack 관리자 채널로 전송합니다.
### 02_skills/
### 2. 콜드메일 IR 분석 (`01_conversation/coldmail_ir_notification_sync.json`)
- 네이버웍스 등을 통해 수신된 콜드메일을 감지하고, IR Deck(PDF) 존재 여부를 판별합니다.
- IR 자료가 있을 경우 Slack에 분석 버튼을 노출하여 원클릭으로 지표 추출을 실행합니다.
| 문서 | 설명 |
|------|------|
| [github_service_request.md](02_skills/github_service_request.md) | GitHub 서비스 요청 계약 |
| [skill_calendar_request.md](02_skills/skill_calendar_request.md) | 캘린더 스킬 요청 |
| [skill_email_send_request.md](02_skills/skill_email_send_request.md) | 이메일 전송 스킬 요청 |
| [skill_news_briefing_request.md](02_skills/skill_news_briefing_request.md) | 뉴스 브리핑 스킬 요청 |
| [skill_slack_send_message_bridge.md](02_skills/skill_slack_send_message_bridge.md) | Slack 메시지 전송 브리지 |
| [slack_direct_api_send.md](02_skills/slack_direct_api_send.md) | Slack 직접 API 전송 |
### 3. 서비스 헬스 모니터 (`05_admin/service_health_check.json`)
- 10분 간격으로 모든 마이크로서비스의 `/health` 또는 `/healthz`를 체크합니다.
- 장애 발생 시 Slack 알림을 통해 즉각적인 대응을 지원합니다.
### 03_rag/
### 4. 캘린더 스킬 브리지 (`02_skills/skill_calendar_request.json`)
- 구글 캘린더 연동을 위한 브리지 워크플로우입니다.
- 일정 조회, 등록, 삭제 요청을 `skill-calendar` 서비스로 전달합니다.
| 문서 | 설명 |
|------|------|
| [README.md](03_rag/README.md) | RAG 워크플로우 인덱스 |
| [companyx_grounding_pipeline.md](03_rag/companyx_grounding_pipeline.md) | Company X Grounding 파이프라인 |
| [companyx_incremental_indexing_workflow.md](03_rag/companyx_incremental_indexing_workflow.md) | Company X 증분 인덱싱 |
| [markdown_intermediate_ssot.md](03_rag/markdown_intermediate_ssot.md) | 마크다운 중간 표현 SSOT |
| [rag_search_grounding_request.md](03_rag/rag_search_grounding_request.md) | RAG 검색 Grounding 요청 |
| [rag_upload_indexing_pipeline.md](03_rag/rag_upload_indexing_pipeline.md) | RAG 업로드 인덱싱 파이프라인 |
| [skill_embedding_bridge.md](03_rag/skill_embedding_bridge.md) | 임베딩 브리지 공통 접점 |
### 5. GitHub 스킬 브리지 (`02_skills/github_service_request.json`)
- GitHub 분석/관리/git 실행 의도를 하나의 서비스 계약으로 정규화합니다.
- `github_analyze`, `github_manage`, `git_ops` intent와 `risk_level`, `requires_confirmation` 슬롯을 받아 안전 정책에 따라 실행 또는 확인 요청으로 분기합니다.
### 04_scheduler/
### 6. RAG 워크플로우 인덱스 (`03_rag/README.md`)
- Company X 내부 문서를 로빙이 읽고 답변하도록 만드는 RAG 흐름의 진입점입니다.
- 업로드, 검색, Grounding, 임베딩 브리지의 역할을 분리해서 봅니다.
- 세부 절차는 각 흐름 문서에서 확인합니다.
| 문서 | 설명 |
|------|------|
| [scheduled_daily_briefing.md](04_scheduler/scheduled_daily_briefing.md) | 일일 브리핑 스케줄러 잡 |
| [scheduled_healthcheck_alert.md](04_scheduler/scheduled_healthcheck_alert.md) | 헬스체크 알림 스케줄러 잡 |
| [scheduled_rag_reindex_retry.md](04_scheduler/scheduled_rag_reindex_retry.md) | RAG 재인덱싱 재시도 잡 |
## n8n import 후 수동 설정 가이드
### 05_admin/
JSON을 n8n에 import하면 **credential과 일부 파라미터가 비어있습니다.** n8n은 credential을 암호화 DB에 저장하므로 JSON export/import에 포함되지 않습니다.
### Slack Credential 설정 (9개 워크플로우 공통)
1. n8n UI → Settings → Credentials → **Slack API** 추가
2. 필요한 값:
- **Bot User OAuth Token**: `xoxb-...` (Slack App → OAuth & Permissions)
- **Signing Secret**: Slack App → Basic Information → Signing Secret
3. 각 Slack 노드(Trigger, Reply, Send)에서 이 credential 선택
### Slack App 설정 (Slack 관리자)
1. [api.slack.com/apps](https://api.slack.com/apps) → 앱 선택
2. **Event Subscriptions**: Request URL에 n8n webhook URL 입력
3. **Subscribe to bot events**: `app_mention`, `message.channels`, `message.im`
4. **OAuth & Permissions** → Bot Token Scopes: `chat:write`, `channels:history`, `app_mentions:read`, `im:history`
### IP 주소
- 현재 템플릿은 내부 IP(`192.168.219.*`)를 기본값으로 사용합니다. 환경이 다를 경우 일괄 변경이 필요합니다.
### 채널 ID
- Slack 노드에 설정된 `channelId`는 예시 값이므로, 실제 알림을 받을 채널 ID로 수정하십시오.
### 주의사항
- credential은 환경 이동 시 매번 재설정 필요
- webhook URL은 n8n 인스턴스마다 다르게 생성됨
- Slack Trigger의 `Trigger On` 이벤트 유형도 수동 선택 필요
| 문서 | 설명 |
|------|------|
| [diary_reflection_pipeline.md](05_admin/diary_reflection_pipeline.md) | 일기 생성 파이프라인 |
---
## 변경 이력
### 260319 — rb8001 대화 응답 경로 변경 (n8n JSON 변경 없음)
`01_conversation/slack_basic_dialogue.json`이 호출하는 rb8001 내부 동작이 변경됨.
| 변경 | 내용 | 영향 |
|------|------|------|
| 시스템 프롬프트 | DB에서 v3 활성화 (간결 응답 원칙) | 응답 톤 변화: 짧고 직접적 |
| 대화 이력 전달 | `recent_conversations``previous_messages` 변환 추가 | 직전 대화 맥락 유지 |
| 감정 constraints | neutral 감정에서 생략 | 불필요한 응답 늘림 방지 |
| 프롬프트 DB 폐루프 | DB 활성 프롬프트가 응답 생성 전 주입 | 코드 배포 없이 프롬프트 변경 가능 |
n8n 워크플로우 JSON 수정은 없음. rb8001 commit: `6123063`, `2bda17f`.
상세: [응답 품질 워크로그](journey/worklog/260319_rb8001_응답품질_톤과장_문맥유실_수정_및_검증완료.md), [프롬프트 DB 워크로그](journey/worklog/260319_프롬프트DB_폐루프_P1_구현_및_검증완료.md)
---
**최근 업데이트**: 2026-03-19
**상태**: 16개 워크플로우 반영 완료 (기존 12개 + 신규 4개)
**최근 업데이트**: 2026-04-06
**상태**: Phase 1 정리 완료 — 레거시 문서 및 n8n JSON은 `_archive/`로 이동