* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
* chore: enable Grafana Assistant Cursor plugin
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
* add staging ios app build script
* feat(api): add OpenTelemetry LGTM stack for local observability
Wire OTel traces, metrics, and logs through a collector to Tempo,
Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay,
Grafana provisioning, env templates, and development.sh auto-start.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: expand observability, harden dev tooling, and fix expo staging UX
Add business and LLM Prometheus metrics with Grafana dashboards, alerting,
and a metrics verification script. Wire telemetry through adapters and core
LLM paths, and document the local LGTM workflow.
Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome,
and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge
internal-eval into the main dev script with improved compose handling.
Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs,
show memoir empty state instead of load errors when no chapters exist, and
add jest env setup plus chapter list response normalization.
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: enable Grafana Assistant Cursor plugin
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp
Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Kevin <kevin@brighteng.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Extract maybe_send_topic_chips_ws for WS connect + pipeline reuse
- Default memoir stage to childhood when empty for chip bank lookup
- Resend suggestions after normal assistant reply (English/Chinese)
Co-authored-by: Cursor <cursoragent@cursor.com>
- Pipeline: skip _send_tts_audio only for non-manual when ENABLE_TTS=false;
remove enable_tts early return from handle_tts_request_on_demand.
- Tencent TTS: PrimaryLanguage/chunking follow user language preference only.
- Expo: let manual tts_audio bypass late-segment playback gate after interrupt.
- Docs: clarify ENABLE_TTS vs tts_request in api/.env.example and TTSProvider port.
- Tests: add manual bypass cases; adjust pipeline language tests for en+Chinese text.
Co-authored-by: Cursor <cursoragent@cursor.com>
Two complementary changes to reduce conversation cold-start friction:
A. Returning-user re-greeting (backend)
- When WS reconnects to a non-empty conversation and last_message_at is older
than chat_re_greeting_idle_hours (default 6h), the agent emits a warm
continuation message that references prior history instead of staying silent.
- Self-debouncing: the AI message updates last_message_at, so reconnects
within the window will not re-trigger.
- Skipped while profile collection is still pending.
D. Topic suggestion chips (backend + Expo)
- New WS message type topic_suggestions carries 3-4 quick-start chips derived
from the current memoir stage's empty slots (deterministic, no extra LLM
cost). Sent alongside opening / re-greeting / resume.
- Expo chat screen renders a horizontally-scrollable chip row above the input
bar; tapping a chip sends the chip's text as a user message and clears the
row. Sending any text/voice also clears the chips.
Interview/chat prompt layers, reply planner, style profiles, memory
injection, interview meta store, and related tests. Work not finished.
Made-with: Cursor
- Add plan_interview_turn: emotion_first / memoir_push / follow_user_only
- Inject hard directive block at top of guided system prompt
- Pass stage_switched_this_turn from ChatOrchestrator after stage detection
- Log interview_turn_plan for observability; add unit tests
- Add strip_parenthetical_asides_for_chat in reply pipeline before [SPLIT]
- Expand output_rules bans (performance parens) and voice as warm host
- Refocus opening/guided prompts on pulling conversation toward memoir oral history
- Align interview opening fallbacks with memoir-first tone
- Add unit tests for parenthetical stripping
- Replay and memoir-submit responses include started/finished UTC and elapsed_ms;
Phase1 poll exposes Redis-backed submit time and elapsed_ms_since_submit.
- Phase1 batch LLM splits segments by memoir_phase1_batch_llm_chunk_size with
bisect fallback per chunk; Playground shows server timings.
Made-with: Cursor
- Drop interview_reply_length and utterance_substance; always run stage LLM
and memory retrieval when enabled; trim Settings fields and .env.example.
- Replace guided/opening prompts with compact fact blocks plus unified
behavior guidance; slim background_voice and persona to tone hints.
- InterviewAgent uses fixed chat_interview max_tokens/chars/segments.
Also includes stacked work: profile followup/extract path, evaluation rubric
and judge schema updates, transcript SPLIT handling in execution service,
user export markdown split tests, and golden case fixture.