[Refactor] 로드맵 생성에서 사용자 notes 반영 우선순위 강화#104
Merged
Merged
Conversation
요약최종 로드맵 요약 프롬프트 생성에 정규화된 "최우선 사용자 메모" 필드를 통합하고, 스켈레톤 세그먼트 생성 프롬프트를 업데이트하여 사용자 우선순위 메모가 다른 선호도를 우선시하도록 수정했습니다. 변경 사항
예상 코드 리뷰 난이도🎯 3 (보통) | ⏱️ ~20분 관련 이슈
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/graph/roadmap/nodes/finalize.py (1)
256-259: ⚡ Quick win우선 메모 정규화 로직은 공용 유틸로 통합하는 편이 안전합니다.
동일한
_format_priority_notes가app/graph/roadmap/nodes/skeleton.py에도 있어 정책 변경 시 드리프트 가능성이 있습니다. 한 곳으로 모아 재사용하면 후속 변경 리스크를 줄일 수 있습니다.예시 리팩터링 방향
+# app/graph/roadmap/prompt_notes.py +def format_priority_notes(notes: str | None) -> str: + normalized = str(notes or "").strip() + return normalized if normalized else "없음"-# app/graph/roadmap/nodes/finalize.py -def _format_priority_notes(notes: str | None) -> str: - normalized = str(notes or "").strip() - return normalized if normalized else "없음" +from app.graph.roadmap.prompt_notes import format_priority_notes ... - priority_notes = _format_priority_notes(course_request.notes) + priority_notes = format_priority_notes(course_request.notes)-# app/graph/roadmap/nodes/skeleton.py -def _format_priority_notes(notes: Any) -> str: - normalized = _normalize_text(notes) - return normalized if normalized else "없음" +from app.graph.roadmap.prompt_notes import format_priority_notes ... - priority_notes = _format_priority_notes(request.notes) + priority_notes = format_priority_notes(request.notes)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/graph/roadmap/nodes/finalize.py` around lines 256 - 259, The _format_priority_notes function in finalize.py is duplicated in skeleton.py and should be extracted to a shared utility to avoid drift; create a single helper (e.g., format_priority_notes) in a common module (for example a new or existing utils/formatting module), move the normalization logic (str(notes or "").strip() -> return "없음" when empty) into that helper, update both finalize.py and skeleton.py to import and call the new helper name (replace references to _format_priority_notes), and ensure function signature and return type remain the same so callers need no further changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/graph/roadmap/nodes/finalize.py`:
- Around line 256-259: The _format_priority_notes function in finalize.py is
duplicated in skeleton.py and should be extracted to a shared utility to avoid
drift; create a single helper (e.g., format_priority_notes) in a common module
(for example a new or existing utils/formatting module), move the normalization
logic (str(notes or "").strip() -> return "없음" when empty) into that helper,
update both finalize.py and skeleton.py to import and call the new helper name
(replace references to _format_priority_notes), and ensure function signature
and return type remain the same so callers need no further changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3e5a857c-a09b-49c8-8e1d-ea0b79afae30
📒 Files selected for processing (3)
app/graph/roadmap/nodes/finalize.pyapp/graph/roadmap/nodes/skeleton.pytests/test_roadmap_generation_simplified_pipeline.py
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. 개요
2. 작업 내용
otes를 최우선 사용자 메모 섹션으로 분리하고 일반 선호보다 우선 반영하도록 규칙을 강화했습니다.
otes를 title/summary/tags/commentary 생성의 핵심 제약으로 명시하고, 관련 프롬프트 검증 테스트를 추가했습니다.
3. AI 활용 및 검증
AI가 생성한 코드 포함
100% 직접 작성
검증 방법:
4. 스크린샷 (선택)
5. 체크리스트
Summary by CodeRabbit
릴리스 노트
새로운 기능
테스트