docs(adr): 経歴書ドラフトのフォーム流し込み ADR を起票(ADR-0025 / #525) - #552
Conversation
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>
Warning Review limit reached
Next review available in:17 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 (1)
📝 WalkthroughWalkthroughDocuments ADR-0025 for resume-draft JSON retrieval and career-form injection, then adds the decision to the ADR index and lineage diagram. ChangesResume draft form injection
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/adr/0025-resume-draft-form-injection.md`:
- Around line 24-26: Standardize the resume-draft result endpoint path across
both documents: retain the canonical /api/agent/resume-draft/result route in
docs/adr/0025-resume-draft-form-injection.md and update the corresponding index
entry in docs/adr/README.md to exactly match it.
- Around line 27-36: 明記されたドラフト payload のマージ規則を ADR に追加し、未指定の
email、github_url、qualifications などは既存フォーム値を保持し、payload
に明示された値だけを適用する方針を定義してください。mapCareerResumeToForm
を再利用する場合も、この保存動作を満たす現在フォームとのマージ処理を前提にし、既存の resumeImport の挙動と整合させてください。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a363231-edba-4347-930f-28560de506a1
📒 Files selected for processing (2)
docs/adr/0025-resume-draft-form-injection.mddocs/adr/README.md
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yusuke0610
commented
Jul 25, 2026
CodeRabbit 指摘 2 件に対応しました。
実装(#553)も同ルールに追従済みです(856775a): |
yusuke0610
commented
Jul 28, 2026
@coderabbitai review 前回の指摘 2 件(エンドポイントパス不一致・マージ挙動未規定)は commit 262f781 で対応済みです(README を |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/adr/0025-resume-draft-form-injection.md (1)
24-27: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winDocument ownership enforcement for the payload result endpoint.
GET /api/agent/resume-draft/resultreturns a specific user’s cached resume payload. Add the access contract here: authenticated draft-owner access only, with401/403for unauthorized access or another explicit reference to the governing security middleware.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/adr/0025-resume-draft-form-injection.md` around lines 24 - 27, Update the ADR entry for GET /api/agent/resume-draft/result to specify that only an authenticated owner of the draft may access the cached payload. Document the governing authentication and ownership middleware or contract, including 401 for unauthenticated requests and 403 for requests targeting another user’s draft.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/adr/0025-resume-draft-form-injection.md`:
- Around line 40-44: Update the draft injection guidance around
mapCareerResumeToForm and applyResumeImportToForm to apply
presence/emptiness-aware preservation to every form field, not only email and
qualifications. Require existing form values to remain when payload fields are
omitted or empty, while non-empty payload values overwrite them; if specific
fields are intentional exceptions, explicitly document those exceptions.
---
Outside diff comments:
In `@docs/adr/0025-resume-draft-form-injection.md`:
- Around line 24-27: Update the ADR entry for GET /api/agent/resume-draft/result
to specify that only an authenticated owner of the draft may access the cached
payload. Document the governing authentication and ownership middleware or
contract, including 401 for unauthenticated requests and 403 for requests
targeting another user’s draft.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: df31a40a-8b36-4b39-b7db-ac86396d6bec
📒 Files selected for processing (2)
docs/adr/0025-resume-draft-form-injection.mddocs/adr/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/adr/README.md
Uh oh!
There was an error while loading. Please reload this page.
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>
yusuke0610
commented
Jul 28, 2026
@coderabbitai review 新規指摘(全フィールドへの保持ルール適用 / line 44)に対応しました。
前回の 2 件(パス・マージ)は既に取り下げ済みです。再レビューをお願いします。 |
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! ✅ Action performedReview finished.
|
概要
経歴書ドラフトの「手で転記」を解消する設計判断を ADR-0025 として起票する(#525 / ADR のみ)。生成 payload(
resume_draft_cache.result)を JSON で公開し、#524 の注入機構でキャリアフォームへ流し込む。生成設計(ADR-0018/0020)は変えず、出力の返し方だけ拡張。決定内容
GET /api/agent/resume-draft/resultを追加し payload を JSON 公開(既存/pdfは据え置き。用途が違うため別エンドポイントに分離)navigate("/career", { state })→ CareerResumeForm が [フォーム注入 1/2] Resume payload → フォーム state 注入機構(共有部品) #524 で注入(入力途中は上書き確認)。DB 非更新(ADR-0010)mapCareerResumeToFormを再利用し「Resume 互換 payload → CareerFormState」の共有経路を満たす代替案(却下)
/pdfにフォーマットパラメータ: Content-Type/型が条件分岐し複雑化テスト
make lint-adr-indexgreen(索引・系統図の drift なし)。docs のみ。後続で backend + web を実装する。🤖 Generated with Claude Code
Summary by CodeRabbit