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
docs: ADR-031 + DEVLOG Day 59 — resume-builder agentic architecture
Documents the architecture across Slices 1A through 1F (commits 055fd60,
78184fe, ff2c93a, bcd64d5, 23ec230, 22a4e73, a2699d8, 674c994).
The ADR captures the non-obvious decisions worth preserving:
- Native Responses-API tool calling over LangGraph (zero clear value-add
at this scope for an enormous dependency cost; ChatGPT itself runs on
this loop)
- `run_tool_loop` lives on `OpenAIService` so the cross-cutting concerns
(budget enforcement, cost-trace, usage recording) stay in one place
- Iteration cap = 12, raised from 5 after the QA replay caught the
serial-fetch regression (6 sequential GitHub READMEs exhausted the
original cap → regex fallback → quality regression)
- Tool registry + JSON-error contract: errors are first-class outputs,
never raised across the tool boundary, so the loop can react to a
tool failure without crashing the turn
- **The function-wrap pattern for `web_search`** — the most non-obvious
decision. OpenAI's built-in `{"type": "web_search"}` is INCOMPATIBLE
with JSON mode (`400 - "Web Search cannot be used with JSON mode."`).
Our intake REQUIRES json_object. So we wrap web_search as a function
tool whose dispatcher fires a separate inner responses.create
without json_object. Main loop stays JSON-mode-safe; agent gets
research capability on-demand.
- **Schema-strictness pact-tests** as mandatory CI guard against the
`dict[K, V]` silent-400 trap (the structuring schema bug from Day 58)
- **Pair-registry pact-tests** as mandatory CI guard against the
silent-fallback drift class (the RESUME_THEMES vs SUPPORTED_THEMES
bug from Day 58)
- Character-budget history slicing (replaces the hard `[-12:]` cap)
- `proactive_offer` as a distinct JSON channel + click-to-accept chip
- `pending_followups` with the TRIGGER PRIORITY rule for open-ended
questions ("what else?" → surface oldest follow-up first)
Explicit non-decisions called out:
- LangGraph not added
- External web-search provider (Tavily/Brave/Exa) not integrated yet
- `pending_followups` has no UI panel in v1 (data flows through API)
- Eval at 10 fixtures, not the 15-20 the parked plan calls for
DEVLOG Day 59 covers Slices 1E and 1F in narrative form for future
session readers — what the bugs were, why the chosen fix was the right
one, what the verification shape looks like.
Added to docs/adr/README.md under the "AI workflow" section, right after
ADR-016 (the original conversational resume-builder ADR) since ADR-031
explicitly extends it from form-filler to tool-using agent.
Verification: 202 hermetic tests green across the affected suites. 10/10
LLM scenarios green on the live API in the agentic runner.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments