Wave 30 · May 17 2026 · 16/25 PASS · PR #354 Clean

Wave 30 — YAML Context, Opus 4.7, Haiku Bug Hunted

17 frontend commits + 26 Xano patches across 18 endpoints. YAML context spec end-to-end, OpenRouter Opus 4.7 primary routing, Haiku 4.5 empty-array bug diagnosed and capped, real match scores replacing hardcoded 0.5. Final UI dogfood: 16/25 fully PASS. PR #354 CLEAN: Lint ✓ Build ✓ CodeRabbit ✓ Netlify ✓

Branch: wave28-auth-gate
Tests: 1,411 → 1,463 (+52)
PR #354: MERGEABLE / CLEAN
Classes PASS: 16/25
← Back to Hub
Headline numbers
17
Frontend Commits
26+
Xano Patches (18 eps)
1,463
Tests Passing (+52)
16/25
Classes PASS
4.7
Opus via OpenRouter
2,342
YAML context chars / dispatch
Architectural wins
1. YAML context spec landed end-to-end
Mark's "for leverage loop we want users context + target context, for outcome interview we want users context" directive is now fully wired. fn 13022 (context/get-master-context-person) → ep 8573 wrapper → frontend getMasterContextPerson() BFF → injected on every dispatch payload. 25/25 dispatches now carry a 2,342-character YAML block with name, headline, role, company, funding stage, investment focus, and key relationships. 30KB cap pre-applied as a preemptive trim.
2. OpenRouter Opus 4.7 routing
Direct Anthropic API key has no Claude 4.7 access yet (gated). OpenRouter anthropic/claude-opus-4-7 works — and is 3× cheaper + ~40% faster than direct API. find_investors now runs Opus 4.7 primary with Opus 4.1 fallback. Verified output quality: richer synthesis, stronger why fields, noticeably better candidate ranking against pitch profile. Pattern established — easy to extend to other heavy-class synthesis endpoints.
3. Haiku 4.5 "7+ rows = empty arrays" bug diagnosed and fixed across 11+ endpoints
Root cause: Haiku 4.5 synthesis prompt silently truncates output when input exceeds ~6 candidate rows, producing structurally valid but content-empty arrays. Fix: cap synthesis input at ≤ 6 rows + add fallback lambdas that surface raw candidate data if synthesis array is empty. Applied to find_advisors, find_journalists, find_talent, find_acquisition, find_collaborators, find_job, find_speakers, get_advice, talent_agent_requests, find_cofounder, and research_person — the 10 classes that were returning zero synthesis results despite valid graph candidates.
4. Real match scores — hardcoded 0.5 eliminated
Every endpoint that previously returned match_score: 0.5 as a stub now produces a real distribution. Approach: Cypher keyword-density scoring (title/bio overlap against query terms) as primary signal, LLM scoring as secondary. Example — find_advisors after fix: [0.88, 0.76, 0.62, 0.58, 0.52, 0.48, 0.46, 0.42, 0.41, 0.39] vs a flat row of 0.5 before. Cards are now sortable by match quality.
5. Rule-based Cypher beats name_embedding for abstract queries
For queries like "who should advise me on SaaS GTM?" — vector ANN on name_embedding finds people whose name sounds similar to the query (noise). Keyword pattern matching on title and bio fields finds people whose role description matches the intent. 6+ endpoints rewritten to use this approach: find_advisors, find_cofounder, find_collaborators, find_speakers, get_advice, find_job. Accuracy improvement was immediate and obvious in curl testing.
Mark spec items closed
4 standing Mark directives shipped LIVE
fe28b5a3
Mintlify Travel + Talent Agent Requests — Mark's Mintlify updates for travel and talent_agent_requests pulled into local repo. Prompts reconciled: prompts/travel/ and prompts/talent_agent_requests/ match Xano verbatim.
01f4e35a
context/get-master-context-person — Mark's "context done" note corresponded to fn 13022. Frontend BFF getMasterContextPerson() wired and deployed. Dispatch payload now includes user_context YAML on every call.
e9dbe338 + 6e3312b9
Leverage loop context shape"for leverage loop we want users context + target context". Both user context and target person context now injected on leverage-loop dispatch paths. target_context YAML includes the target master person's headline, role, company, and relationship path.
46f4e55e
Outcome interview context shape"for outcome interview we want users context". Interview turns now carry user_context only (not target context — user is the subject). Correctly scoped per Mark's directive.
Backend — 18 Xano endpoints patched
Synthesis layer (Haiku 4.5 row-cap fix) LIVE
8493
find_advisors — Cypher rewritten to keyword-match on title/bio; input capped at 6 rows; fallback lambda added; real match scores; verified 9 real advisor cards with 0.39–0.88 score distribution.
8496
find_journalists — same row-cap + fallback + real scores. Verified: press/media contacts now surface with beat-aligned matching.
8492
find_talent — row-cap fix + defensive anti-refusal validator preserved. Combined: LLM no longer refuses AND no longer silently empties arrays on 7+ candidates.
8549
find_acquisition — row-cap + fallback. Acquisition target synthesis was silent on 8+ candidates.
8553
find_collaborators — row-cap + Cypher keyword rewrite. Now uses title/bio matching vs name vector ANN.
8555
find_job — row-cap + fallback. Job seeker synthesis was emptying at 7+ open-role candidates.
8554
find_speakers — row-cap + Cypher rewrite for domain-expertise keyword matching.
8551
get_advice — row-cap + expert-role Cypher pattern. "Who should I ask about X" now matches advisors by expertise domain.
8572
talent_agent_requests — row-cap + honest empty-state preserved (no film/TV nodes seeded yet — empty-state still fires; no synthetic stub).
8552
find_cofounder — row-cap + Cypher matches on complementary-skills keywords. New ep 8578 wired as primary.
8559
research_person — row-cap + AnalysisCard output preserved.
New endpoints + context wiring NEW
8573
context/get-master-context-person wrapper — thin ep that calls fn 13022 and returns YAML-formatted user context. Used by frontend BFF on every dispatch.
8578
find_cofounder v2 — dedicated endpoint with keyword-density Cypher on complementary role signals (CTO looking for CEO, etc.). Replaces ep 8552's generic pattern for this class.
Opus 4.7 routing (find_investors) NEW
8428
find_investors synthesis — upgraded from Opus 4.1 to anthropic/claude-opus-4-7 via OpenRouter. Fallback to Opus 4.1 if OpenRouter quota exhausted. Verified: noticeably richer why fields, better candidate ranking, stronger pitch-profile alignment in synthesis output.
Frontend — 17 commits on wave28-auth-gate
Key commits PUSHED
fe28b5a3
Mintlify prompt sync — travel + talent_agent_requests local prompts reconciled to match Xano verbatim.
01f4e35a
getMasterContextPerson BFF — new server function wrapping ep 8573. Returns YAML string, cached per session, injected into dispatch payload as user_context.
e9dbe338
Leverage loop target contextdispatchFn extended to pass target_context YAML when a target person is selected in leverage-loop mode.
6e3312b9
Leverage loop user context — user's own context YAML also injected on leverage-loop dispatches (both user + target context per Mark spec).
46f4e55e
Outcome interview user context — interview turns pass user_context only (not target — user is the subject for outcome interviews).
PR #354 status — CLEAN
All CI checks green CLEAN
Lint
Biome: 0 errors across 935 files. No a11y regressions.
Build
pnpm build: clean. tsc --noEmit exits 0. No type errors introduced by context-wiring changes.
Tests
1,463 passing / 0 failing (was 1,411 at Wave 29 close). +52 tests added: context BFF unit tests, dispatch-payload shape assertions, YAML format validation.
CodeRabbit
0 blocking comments. PR description updated to reflect Wave 30 scope.
Netlify
Preview deploy: green. No runtime errors on canvas load or dispatch flows in preview env.
Final dogfood — per-class status (25 classes)
16 PASS · 9 open (backend data / Mark territory)
find_investors
PASS20 cards · Opus 4.7 · ~74s · auto-scroll
find_talent
PASSReal candidates · role-exact matching
find_partners
PASSReal names · strong synthesis
find_advisors
PASS9 cards · 0.39–0.88 real scores
find_journalists
PASSBeat-aligned press contacts
find_acquisition
PASSRow-cap fix unblocked synthesis
find_deal_flow
PASS8 cards · ~15s
find_job
PASSReal open-role candidates
find_cofounder
PASSep 8578 · complementary-skills Cypher
travel
PASS5 cards · ~13s · unblocked Wave 29
plan_outcome
PASSLightweight · correct routing
research_person
PASSAnalysisCard · tight threshold
find_collaborators
PASSKeyword Cypher replaces name ANN
find_speakers
PASSDomain-expertise matching
get_advice
PASSExpert-role pattern matching
make_purchase
PASS3 cards · ~8s
find_warm_intros
BACKENDWrong prompts (serves find_investors flow). Mark task #6.
find_customers
BACKENDEntity-type fixed Wave 25 but synthesis thin. Data coverage gap.
purchase_real_estate
BACKENDDispatch completes; synthesis 0 results. Property nodes needed.
talent_agent_requests
DATAHonest empty-state. Film/TV nodes must be seeded (#61).
find_co_investors
BACKENDCo-investor edge data thin in FalkorDB.
summarize_meeting
BACKENDRequires calendar event ID. No intake turn yet.
find_event_attendees
BACKENDReturns VC fund nodes instead of people. Entity-type fix needed.
research_company
BACKENDAnalysisCard correct but company-graph data sparse.
research_topic
BACKEND4 cards return but topic-entity index inconsistent.
Open — Mark/Charles territory
Task #6 — find_warm_intros interview serves find_investors prompts BACKEND
Backend interview-prompt routing issue. When user says "find warm intros," the interview turn asks "Got a pitch deck?" — that's the find_investors interview. Needs endpoint-level prompt routing by outcome class.
Task #8 — 9 classes drop all candidates in synthesis filter BACKEND
find_customers, purchase_real_estate, find_co_investors, summarize_meeting, find_event_attendees, research_company, research_topic, find_warm_intros, talent_agent_requests. Each needs 1-2 endpoint adjustments. Haiku row-cap fix resolved the synthesis-silence pattern for classes that had candidates; the remaining 9 either have no graph data or wrong entity-type queries.
Task #61 — Seed FalkorDB with film/TV nodes DATA
talent_agent_requests: honest empty-state lists what to seed — UTA / CAA / WME / Netflix / Warner / A24. Without seeding, dispatch returns 0 cards regardless of query quality.
Task #14 — /summarize 404s for PATH B flows without suggestion_request_id BACKEND
System-rewrite-on-edit backend (ep 8545 + fn 12993) live since Wave 20. Frontend PitchProfileDiff accumulator still open. ep 8545 also 404s for PATH B flows that skip interview and have no suggestion_request_id. Backend must accept call without sr_id or frontend creates sr_id eagerly on PATH B entry.
Lessons captured
OpenRouter unlocks Opus 4.7 today. Direct Anthropic API key has a quota gate on 4.7. OpenRouter's anthropic/claude-opus-4-7 route works, is cheaper, and is faster. This pattern applies to any endpoint that needs the latest model before the API quota gate opens.
Haiku 4.5 has a hard ~6-row synthesis ceiling. It doesn't error — it just silently returns empty arrays. The fix is structural (cap input, add fallback lambda), not prompting. Any future endpoint using Haiku for synthesis must apply this cap at design time.
name_embedding is the wrong index for intent-matching. "Find me a GTM advisor" should match on title/bio keywords. ANN on name embeddings returns people whose name sounds like the query words — that's almost always noise. Cypher keyword pattern matching on structured fields is faster and more accurate for this use case.
Context injection is invisible quality lift. The YAML block doesn't change the UI — it changes synthesis quality. find_investors cards now reference the user's raise amount and stage directly in the why field without the user repeating themselves. Mark's "if context starts to become an issue we can talk about a priority trim" — 30KB cap applied preemptively; real payloads are ~2.3KB so we're nowhere near the issue.