Skip to content

[refactor] accounts tech debt: structured stance, sectioned briefing generation, speaker↔person binding UI #142

Description

@Lanznx

Three pieces of tech debt in accounts (the mini-CRM). All of them are the "the mechanism is there, but the quality ceiling is low" kind.

Scope

  1. Structured stance output (replacing the keyword heuristic): stanceValueFromText in store.ts is a zh/en keyword regex with a poor hit rate → a person's stance dot is grey most of the time. The extraction schema (extract.ts) should have the LLM emit a structured {value: support|neutral|oppose, confidence} directly for stance-type claims, and the projection cache should read that structured field instead.
  2. Sectioned briefing generation: once the claim library gets large, generating in a single pass blows the context budget (briefing.ts feeds in every claim at once). Generate per category/thread and then merge.
  3. Live speaker↔person binding UI: the HistoryEntry.attendees[].speakerKey field exists, but there's no UI for binding a transcript speaker to a person. Wiring up "Speaker 2 = Director Wang" during the meeting is what gives the subjects from post-meeting extraction a reliable anchor.

Also of note

  • The red-line guard (auto-injecting a critical eval when a meeting is linked to a company) is implemented but has never been tested on a real call. Report back on this issue once it has been verified.
  • Conflict detection currently rests entirely on the LLM prompt; we're still watching how well it holds up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions