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
feat(resume-builder): Slice 1B — full conversation history + proactive_offer chip
The two user complaints behind this slice:
1. "Is each new question going to a fresh gpt instance?" — agent was
forgetting mid-session because build_resume_builder_prompt hard-
sliced history at [-12:].
2. "I want it to suggest things — like draft a summary based on what
I've shared" — agent never volunteered, only answered.
Slice 1B addresses both end-to-end (backend + UI):
- Dropped the [-12:] truncation. New _slice_history_for_budget helper
takes the most recent suffix that fits under 30k chars (~7.5k
tokens); always keeps at least the newest entry. In-memory cap
bumped 48 → 200 entries (the per-prompt char budget defends the
token budget; the entry cap is a long-session memory safety valve).
- Added proactive_offer: str | None as a 5th key to the resume_builder
LLM contract. Prompt teaches the model when to fire (enough signal
to draft something) and HOW to phrase it (first-person imperative
CTA, not a question or vague offer). Concrete good/bad examples in
the prompt; cap of 200 chars at the backend boundary.
- _run_llm_turn returns (assistant_message, proactive_offer); threaded
through _serialize_session into the response payload.
- Frontend: ResumeBuilderSessionResponse gets proactive_offer field.
ResumeIntake renders it as a "✨ ..." pill below the assistant
message when present. handleResumeBuilderAnswer now accepts an
optional overrideText so the chip submits the offer directly
without round-tripping through the textarea state.
- 4 new tests for the budget-aware history slicer (under/over budget,
single-entry-over-budget kept, empty input).
Verification: 172 tests across affected suites all green (168 → 172).
Frontend tsc + eslint exit 0.
What's still parked (report.md Phase 2/3): pending_followups[] promise
tracking, web_search tool, full conversational eval (15-20 rubric-
scored fixtures), ADR-031.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments