You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Critical path: Track 1 (2d) → Track 2 (0.5d) → Track 3 (1d) = 3.5d. Parallelizable: Track 4 (1d) + Track 5 (0.5d) 는 Track 1 과 병렬 가능 → 1인 작업 기준 총 5d 유지, 2인이면 ~3.5d.
Chat agent: Gemini function calling, 7 tools, in-memory mutation (packages/ai-server/src/editorial_article_chat/)
Publish to operation: assets → operation snapshot UPSERT (packages/api-server/src/domains/admin/editorial_articles.rs:327, ON CONFLICT DO UPDATE 라 재-publish 안전)
Public read endpoint: /api/v1/editorial-articles/{id_or_slug} (packages/api-server/src/domains/editorial_articles_published/)
Admin renderer: 4종 section type 지원 (intro / curation_card / spotlight / closing)
한계
단일 LLM 호출이 angle 해석 / 톤 / 섹션 순서 / 카피 를 동시 처리 — 품질 제어 어렵고 부분 재생성 불가
Section type 4종 고정 — 매거진 톤이 한 가지뿐
Chat tool 이 텍스트 편집 위주 — 솔루션 교체 / post 추가 같은 구조적 변경 불가
Public reader 페이지 부재 — 백엔드 endpoint 만 존재
Published 매거진 재편집 흐름이 UI 에 없음 — 백엔드 UPSERT 는 안전하나 운영자 가드 부재
Cross-cutting decisions
Feature flag (Track 1 에서 도입)
ENV 4개를 packages/ai-server/src/post_editorial/config.py 에 추가:
PR #446 (#429) 머지 후 follow-up. 매거진 파이프라인의 다음 단계 고도화.
이 issue 는 umbrella — 5개 sub-issue (#547–#551) 로 분리되어 개별 추적된다.
Estimation (총 5일)
quote_pull,mood_board)/magazine/[slug]Critical path: Track 1 (2d) → Track 2 (0.5d) → Track 3 (1d) = 3.5d.
Parallelizable: Track 4 (1d) + Track 5 (0.5d) 는 Track 1 과 병렬 가능 → 1인 작업 기준 총 5d 유지, 2인이면 ~3.5d.
현재 상태 (이미 구현됨)
fetch_sources → compose_layout (단일 Gemini Pro 호출) → generate_thumbnail → publish (draft 저장)(packages/ai-server/src/editorial_article/graph.py:22)packages/ai-server/src/editorial_article_chat/)packages/api-server/src/domains/admin/editorial_articles.rs:327,ON CONFLICT DO UPDATE라 재-publish 안전)/api/v1/editorial-articles/{id_or_slug}(packages/api-server/src/domains/editorial_articles_published/)intro / curation_card / spotlight / closing)한계
Cross-cutting decisions
Feature flag (Track 1 에서 도입)
ENV 4개를
packages/ai-server/src/post_editorial/config.py에 추가:MAGAZINE_PIPELINE_MODE:single_call(default) |multi_stageMAGAZINE_POLISH_ENABLED: false (default)MAGAZINE_POLISH_TEMPERATURE: 0.4MAGAZINE_MAX_PARALLEL_SECTION_WRITERS: 3ENV 토글 → 즉시 rollback 가능. percent rollout (
editorial_discovery_settings.pipeline_mode_override컬럼) 은 후속.Telemetry
editorial_article_events에 INSERT (step컬럼 text 라 DDL 변경 X)classify_template,plan_outline,write_section,validate_sections,polish_layout,assemble,republishnotejsonb 에{model, input_tokens, output_tokens}누적 (/admin/gemini-cost페이지가 읽음)Type sync (수동, 4곳 동시 수정)
신규 section type 추가 시:
packages/ai-server/src/editorial_article/models.py(Field description union)packages/web/lib/hooks/admin/useEditorialArticles.ts:49(TS union literal)packages/web/lib/components/admin/editorial/magazine/MagazineRenderer.tsx:59(switch case)packages/ai-server/src/editorial_article/prompts/sections/*.py(section writer prompt)자동 생성 (pydantic → JSON schema → TS) 은 별도 후속 PR.
Proto SOT (Track 3)
양쪽 동시 수정:
packages/api-server/proto/ai.proto:259packages/ai-server/src/grpc/proto/inbound/inbound.proto:261각 패키지의 codegen 재실행.
PR 시퀀스 (의존성 기반)
각 트랙 내부도 sub-PR 로 쪼개 main 항상 green.
Verification (전체 로컬 풀 사이클)
just devMAGAZINE_PIPELINE_MODE=multi_stageENV 로 ai-server 재시작/admin/editorial/magazine/settingsdiscovery enable/admin/editorial/magazine/drafts/{id}→ MagazineRenderer 표시, 신규 section type 분기 확인swap_solution→ 재렌더/magazine/{id}→ public reader, OG meta view-source 확인change_tone→ 재렌더step='republish'확인비용 모니터링: 같은 recommendation 을
single_call↔multi_stage두 번 돌려/admin/gemini-cost에서 비교.Out of scope (별도 추후 검토)
affiliate_url파이프라인,solutions.price_amount정규화, brand metadata 강화comparison,timeline,interviewpublish_to_operation에title → slug채움Related: #429, #446