Skip to content

[feat] Add evidence-linked multi-level context answers #26

Description

@ThreeLight2000

Motivation

The current daily-summary flow returns one generated summary, but users cannot see which saved records support the answer or choose an explanation depth that matches their needs. We should provide faster, level-appropriate answers while preserving one shared evidence basis across variants.

Scope

  • Extend the existing daily-summary action as the first implementation target.
  • In server-brain:
    • preserve source record IDs while resolving Context records;
    • generate quick, standard, and deep answer variants from the same resolved context/evidence set;
    • return claim/source metadata for the answer, including record ID, preview, recorded time, and support status;
    • validate the structured response and mark unsupported or conflicting claims instead of inventing sources.
  • In client-chrome:
    • render the default concise answer and allow switching to standard/deep views;
    • show source-record chips with hover/focus previews and click-through to the existing record view;
    • show understandable statuses such as direct support, partial support, unverified, or conflict.
  • Preserve compatibility with the existing daily-summary response while the new fields are introduced.

Out of scope for this MVP:

  • server-context schema or API changes;
  • persisting answer graphs, claims, or evidence links;
  • numeric trust scores;
  • external web search or new retrieval infrastructure;
  • a full visual graph of record relationships.

Acceptance criteria

  • Existing daily-summary behavior continues to work when the new fields are absent.
  • Quick, standard, and deep variants use the same source record set and claims; only presentation depth and wording differ.
  • Each displayed source can be traced to an existing Context record by record ID.
  • Source previews are available on hover and through keyboard/click interaction.
  • Claims without direct support are visibly marked as partial, unverified, or conflicting.
  • The response contains no invented record IDs, citations, or support relationships.
  • No new persistent storage or server-context migration is required.
  • Server-brain validation, client tests, and production builds pass.

Verification plan

  • Add server-brain tests for the extended action input/output schema, source ID preservation, variant consistency, unsupported claims, and conflicting records.
  • Add client-chrome tests for variant switching, source preview/click-through, missing-source handling, and backward-compatible responses.
  • Run pnpm --filter server-brain verify.
  • Run the relevant client-chrome typecheck/test/build commands and the repository verification command pnpm verify.
  • Manually verify the flow with saved records containing direct support, partial support, and conflicting content.

Project metadata limitation

This issue could not be added to the repository's configured Project or assigned a Project Priority field through the available GitHub integration. The local GitHub CLI token also lacks the read:project scope. Add this issue to the configured Project and set its Priority field before implementation starts.

Implementation status

Implemented and verified in PR #27. The PR is open as a draft and includes the package and repository verification results.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions