Description docs/todo/20260119-rm000-overflow-autofix.md
パス: docs/todo/20260119-rm000-overflow-autofix.md
タスク
実装詳細
追加ファイル
src/pptx_generator/pipeline/mapping/llm_fit.py: LLM クライアント(OpenAI/Azure/Anthropic/AWS Claude/Mock)
tests/pipeline/mapping/test_llm_fit_client.py: LLM クライアントのユニットテスト
変更ファイル
src/pptx_generator/pipeline/mapping/processor.py: _apply_capacity_controls で LLM fit 実行
src/pptx_generator/pipeline/mapping/step.py: ai_patch_count のカウント追加
src/pptx_generator/pipeline/mapping/types.py: MappingTextFitRequest/Response 追加
tests/pipeline/mapping/test_mapping_step_layout_assignment.py: LLM fit のテストケース追加
動作フロー
MappingStep で text_hint (max_lines/max_chars) を超過検知
LLM に短縮依頼(最大3回リトライ)
成功時: ai_patch 記録+要素を更新
失敗時: 元内容維持+warning 記録
UAT結果詳細(aws-claude)
ai_patch_count : 9
修正例 :
two_column_detail-01: 4行 → 1行(「ブランドガイドラインを自動反映し...」)
one_column_detail-01-clone02: 5行 → 1行(「余白逸脱・フォントサイズ不足...」)
two_column_detail-01-clone01: 4行 → 2行(動的/静的モードの説明)
全スライドで capacity_warnings 記録
warnings : 「body が許容行数 X を超過しているため LLM で調整します」
リスク・制約
LLM の要約で内容が変質する可能性(要レビュー)
LLM 呼び出しコスト(大量スライド時)
LLM API 失敗時は元内容維持(フォールバック済み)
参照
Reactions are currently unavailable
You can’t perform that action at this time.
docs/todo/20260119-rm000-overflow-autofix.md
docs/todo/20260119-rm000-overflow-autofix.mdタスク
実装詳細
追加ファイル
src/pptx_generator/pipeline/mapping/llm_fit.py: LLM クライアント(OpenAI/Azure/Anthropic/AWS Claude/Mock)tests/pipeline/mapping/test_llm_fit_client.py: LLM クライアントのユニットテスト変更ファイル
src/pptx_generator/pipeline/mapping/processor.py:_apply_capacity_controlsで LLM fit 実行src/pptx_generator/pipeline/mapping/step.py: ai_patch_count のカウント追加src/pptx_generator/pipeline/mapping/types.py: MappingTextFitRequest/Response 追加tests/pipeline/mapping/test_mapping_step_layout_assignment.py: LLM fit のテストケース追加動作フロー
UAT結果詳細(aws-claude)
two_column_detail-01: 4行 → 1行(「ブランドガイドラインを自動反映し...」)one_column_detail-01-clone02: 5行 → 1行(「余白逸脱・フォントサイズ不足...」)two_column_detail-01-clone01: 4行 → 2行(動的/静的モードの説明)リスク・制約
参照