fix(data-science): restore chart/PNG output + sharper LLM handoff#10
Merged
Merged
Conversation
5 시나리오 (S-A~S-E) 검증 중 data_science_team의 시각화/다운로드가 일관되게
실패하던 회귀를 plan §DATA_SCIENCE_ANALYTICS_TEAM_PLAN.md 기반으로 복구.
Root cause:
1. supervisor가 data_engineer만 5회 반복 dispatch → data_analyst의
python_repl_data_tool 미도달 → PNG 생성 안 됨
2. LLM이 chat history의 stale absolute path를 read_csv에 사용해
FileNotFoundError
3. 다중 turn 누적 matplotlib figure state로 savefig silent fail
4. head supervisor가 data 첨부 + 시각화 요청을 coding_team으로 잘못 위임
(TEAM SELECTION HINTS의 `prefer`가 약함)
Fix (룰 베이스 금지, plan §4.0 P1 준수):
- DATA_ENGINEER_PROMPT: ONE-pass inspection + 차트는 data_analyst 책임 명시
- DATA_ANALYST_PROMPT: file_name으로만 read (absolute path 금지) + cwd 보장
+ artifact_path() 사용 강제 + retry policy
- TEAM_SUPERVISOR_PROMPT: DATA SCIENCE TEAM HANDOFF 블록 — engineer 다음은
항상 analyst, engineer 재dispatch 금지
- SYSTEM_SUPERVISOR_PROMPT: data 첨부 + 차트/시각화 요청은 MUST
data_science_team (coding_team 우회)
- REVIEWER_PROMPT: STOPPING RULES — artifact registered면 valid, 2번 fail
후 stop
- python_repl_data_tool: plt.close('all') prelude cleanup으로 cross-turn
figure state leak 차단 + docstring에 file_name/artifact_path 강조
- team_supervisor.py: dispatched workers 요약을 system prompt에 inject
(LLM이 history를 직접 본 후 결정 — 룰 아님, 데이터)
- CLAUDE.md: Supervisor → Sub-agent Handoff 정책 5원칙 추가 (P1~P5,
체크리스트 포함)
Verification (dong 계정, playwright MCP):
- S-A trend.csv 라인차트 → trend_revenue.png PASS
- S-B products.json 막대차트 → category_avg_price_bar.png PASS
- S-C multi_sheet.xlsx 시트 비교 → revenue_vs_cost_bar.png PASS
- S-D sales.csv + metrics.csv 2 서브플롯 → sales_region_revenue_and_monthly_mrr.png PASS
- S-E korean_sales.csv 한국어 라벨 — matplotlib silent savefig fail (한글 폰트
layout 이슈, separate follow-up)
pytest 316/316 PASS, 회귀 0.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 21, 2026
This was referenced May 22, 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.
Summary
plans/DATA_SCIENCE_ANALYTICS_TEAM_PLAN.md 기능(첨부 → data_science_team → PNG/다운로드)이 사용자 검증에서 일관되게 실패. 룰 베이스 추가 없이 prompt 강화 + 도구 docstring 정밀화 + matplotlib state leak 차단으로 4/5 시나리오 복구.
Root Cause
data_engineer만 5회 반복 dispatch →data_analyst미도달 →python_repl_data_tool미호출 → PNG 0건pd.read_csv()에 사용 → FileNotFoundErrorsavefigsilent no-opcoding_team으로 잘못 위임Fix (Plan §4.0 P1: LLM-Driven, 룰 베이스 금지)
artifact_path()사용, retry policyplt.close('all')prelude cleanup + file_name docstringVerification (dong account, playwright MCP)
trend_revenue.pngcategory_avg_price_bar.pngrevenue_vs_cost_bar.pngsales_region_revenue_and_monthly_mrr.png<img src=".../attachments/0">+<a href=...>다운로드 링크 정상 노출Test plan
🤖 Generated with Claude Code