Skip to content

[MN4][P1] Cross-link mind-map nodes, highlights, notes, and source documents #6

Description

@evan188199-tech

Tracked by #10. Local plan: docs/roadmap/marginnote-4.md.

Goal (中文): 把脑图节点、高亮、笔记和源文档连起来。优先用导出里的显式 ID;没有 ID 时做规范化标题/内容匹配并记录置信度。低置信度关联不得当确定事实。

Do you need to file a feature request?

  • I have searched the existing feature requests and this feature request is not already filed.
  • I believe this is a legitimate feature request, not just a question or bug.

Feature Request Description

Give MarginNote tools a reliable graph between mind-map nodes, highlights, notes, and source documents.

The current models already have optional highlight_id, note_id, and document_id fields, but the export parser does not systematically recover those links. Teaching answers therefore miss "this highlight sits under this mind-map node on page 42".

Rules:

  • Prefer explicit IDs from the export
  • If IDs are missing, match normalized titles/content and record a confidence score
  • mn_read_note returns the mind-map path for the item
  • mn_mindmap returns linked highlights and source documents
  • Low-confidence links must not be injected into teaching answers as certain facts

Related Module

Chat

Use Case

When a learner asks about a concept, DeepTutor can read the surrounding highlight, the mind-map branch it belongs to, and the source document/page. If the link is only a guess, the answer says so instead of inventing a location.

Additional Context

Priority: P1
Phase: M2
Status: Planned
Depends on: parser hardening
Blocks: higher-quality Chat and Deep Research citations

Key files

  • deeptutor/capabilities/marginnote/data/base.py
  • deeptutor/capabilities/marginnote/data/export_adapter.py
  • deeptutor/capabilities/marginnote/tools.py

Acceptance criteria

  • Explicit export IDs are preferred and preserved.
  • Missing IDs fall back to normalized title/content matching with a recorded confidence.
  • mn_read_note includes the mind-map path when known.
  • mn_mindmap includes linked highlights and documents.
  • Low-confidence associations are labeled and never treated as certain facts in prompts or answers.

Success metric
Teachers and research reports can trace a note to its mind-map location and source page, or clearly say the link is uncertain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions