feat: 経歴書ドラフトのフォーム流し込みと注入機構の汎用化(ADR-0025 / #525・#524) - #553
Conversation
ADR-0018 のドラフト生成が PDF しか返さず「手で転記」だった問題を解消。生成 payload を JSON で公開し、#524 の注入機構でキャリアフォームへ流し込む。生成設計(0018/0020)は不変・ DB 非更新(ADR-0010)。 backend: - GET /api/agent/resume-draft/result を追加(resume_draft_cache.result を JSON 返却)。 ResumeDraftResultResponse は保存契約と分離した緩い schema(Experience/Qualification 再利用) - 統合テスト追加(成功で深い構造保持 / 未生成 409 / GitHub 未連携 403) web: - api: getResumeDraftResult / paths 追加 - #524 汎用化: mapCareerResumeToForm の引数を ResumeFormSource(ResumeResponse | ResumeDraftResultResponse)に緩め、保存済み経歴書とドラフト payload を共通経路で注入 - GitHubLinkDashboard: PDF プレビューのヘッダーに「この内容をフォームに反映」を追加し、 payload 取得 → navigate("/career", {state}) で流し込む - CareerResumeForm: router state のドラフト payload を loadLatest 完了後に一度だけ注入。 入力途中データは上書き確認(#528 と同じ論点で !loading ゲート) - PdfPreviewModal に任意の headerAction を追加 テスト: formMappers(ResumeResponse/ドラフト payload 両対応)+ E2E(生成→反映→/career 反映)。 make ci green・E2E serial pass。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Warning Review limit reached
Next review available in:18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (18)
✨ Finishing Touches🧪 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. Comment |
CodeRabbit 指摘(Major)。ドラフト注入が mapCareerResumeToForm の素の全置換で、payload が 提供しない email を空で上書きしユーザーの入力を消す恐れがあった。PDF インポート(#524)と 挙動が非対称だった。 - utils/resumeImport に applyResumeDraftToForm を追加: mapCareerResumeToForm で写した上で email / 資格が payload 側で空・未提供なら現フォーム値を保持する(career_summary / self_pr / experiences / full_name / github_url は生成が提供するため上書き) - CareerResumeForm の draft 注入を applyResumeDraftToForm に切り替え - 単体テスト追加(上書き / email 保持 / 資格保持) これで PDF インポートとドラフトの注入セマンティクスが「欠落は既存値保持」で一致する。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CodeRabbit 追加指摘(Major)。line 40 の全体規則に対し具体例が email/資格のみ保持で、 career_summary 等が空だと既存値を消しうる、と読めた。特定フィールドの無条件上書きを やめ、全フィールドに一様の「値が非空なら上書き・空/未提供なら現フォーム保持」を適用する ことを明記(スカラーは非空判定、配列は中身の有無で判定)。ドラフトが実際には full_name/career_summary/self_pr/experiences/github_url を常に提供する点は補足に留め、 上書き/保持はフィールド名固定分岐ではなく値の非空判定で決まると明確化。実装 #553 も追従する。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CodeRabbit 追加指摘(Major)。applyResumeDraftToForm が email/github_url/資格のみ保持で、 career_summary 等は mapped から無条件に取っていた。生成が想定外に空を返すと既存入力を 消す穴が残るため、全フィールドに一様の「値が非空なら上書き・空/未提供なら現フォーム保持」 を適用(スカラーは非空判定、配列は中身の有無で判定)。フィールド名の固定分岐を排除。 career_summary/self_pr の保持を検証する単体テストを追加。ADR-0025 の規則明確化に追従。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(adr): 経歴書ドラフトのフォーム流し込み ADR を起票(ADR-0025 / #525) ADR-0018 のドラフト生成は PDF しか返さず「手で転記」が残っていた。生成 payload は 既に resume_draft_cache.result に永続化されているため、それを JSON で公開して #524 の 注入機構でフォームへ流し込む設計判断を記録。生成設計(0018/0020)は変えない。 決定: - GET /api/agent/resume-draft/result で payload を JSON 公開(/pdf とは別エンドポイント) - web の「フォームに反映」→ router state → CareerResumeForm が #524 で注入(上書き確認) - DB 非更新を維持。#524 は mapCareerResumeToForm 再利用で「Resume 互換 payload → form」を満たす docs/adr/README.md 索引・系統図も更新(make lint-adr-index green)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(adr): ADR-0025 のエンドポイントパス統一とマージ規則の明記(#552 レビュー対応) CodeRabbit 指摘(Major 2 件)。 - README 索引のパスを正式ルート /api/agent/resume-draft/result に統一(ADR 本文と一致) - 注入のマージ規則を明記: #524 共通ルール(payload の非空で上書き・欠落/空は現フォーム値 保持)に統一。ドラフトは email/資格を提供しないため素の全置換だとユーザーの email を 空で消すため、それらは現フォーム値を保持するオーバーレイを掛ける(実装は #525 で追従) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(adr): ADR-0025 のマージ規則を全フィールド一様な preserve-if-empty に明確化(#552 レビュー対応) CodeRabbit 追加指摘(Major)。line 40 の全体規則に対し具体例が email/資格のみ保持で、 career_summary 等が空だと既存値を消しうる、と読めた。特定フィールドの無条件上書きを やめ、全フィールドに一様の「値が非空なら上書き・空/未提供なら現フォーム保持」を適用する ことを明記(スカラーは非空判定、配列は中身の有無で判定)。ドラフトが実際には full_name/career_summary/self_pr/experiences/github_url を常に提供する点は補足に留め、 上書き/保持はフィールド名固定分岐ではなく値の非空判定で決まると明確化。実装 #553 も追従する。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
概要
ADR-0025 の実装(#525 + #524 汎用化)。経歴書ドラフトの「手で転記」を解消する。生成 payload を JSON で公開し、#524 の注入機構でキャリアフォームへ流し込む。生成設計(ADR-0018/0020)は変えず・DB 非更新(ADR-0010)。
変更内容
backend
GET /api/agent/resume-draft/resultを追加(resume_draft_cache.resultを JSON 返却)。ResumeDraftResultResponseは保存契約(strict な ResumeBase)と分離した緩い schema で、Experience/ResumeQualificationItemを再利用web
getResumeDraftResult/ paths 追加mapCareerResumeToFormの引数をResumeFormSource(ResumeResponse | ResumeDraftResultResponse)に緩め、保存済み経歴書とドラフト payload を共通経路で注入GitHubLinkDashboard: PDF プレビューのヘッダーに「この内容をフォームに反映」を追加 → payload 取得 →navigate("/career", {state})CareerResumeForm: router state のドラフト payload を loadLatest 完了後に一度だけ注入(!loadingゲートで既存経歴書との競合防止)。入力途中データは上書き確認PdfPreviewModalに任意のheaderActionを追加テスト
resume-draft-apply.spec.ts: 生成 → 「フォームに反映」→ /career にドラフト内容が反映make cigreen(backend + web lint/test/build + lint-tdd)、E2E は serial(CI 相当)で pass依存
ADR #552 が前提。マージで #525(+ #524 の汎用化)が完了し、issue #517 ロードマップの残タスクが解消する。
🤖 Generated with Claude Code