Concept relationship layer: wikilink edges in rolegraph
还没有人认领这个 Issue。
评估
调研方向
Start with MarkdownDirectivesParseResult and build_thesaurus_from_haystack(), then inspect RoleGraph::new() and the affected terraphim_rolegraph, terraphim_automata, terraphim_types, and terraphim_service crates. Confirm how related_concepts from #604 should become ConceptEdge values, then verify that graph traversal, autocomplete, and configurable search ranking support the new relationships.
由索引模型根据 Issue 内容生成。
描述
Summary
Add concept-to-concept edges to the rolegraph, derived from [[wikilinks]] extracted by the Obsidian parser (#604). Currently the thesaurus is flat (synonym -> concept). Wikilinks enable a second layer: concept -> related concept.
Current State
Thesaurus (flat):
"context management" -> concept("context engineering")
"semantic scope" -> concept("context engineering")
Proposed State
Thesaurus (flat, unchanged):
"context management" -> concept("context engineering")
Relationships (new):
concept("context engineering") --Related--> concept("knowledge graph")
concept("context engineering") --Related--> concept("ontology")
concept("knowledge graph") --ParentChild--> concept("context engineering") // from folder hierarchy
Edge Types
pub enum EdgeType {
Related, // from [[wikilinks]]
ParentChild, // from folder hierarchy (subfolder = child)
SeeAlso, // future: explicit "see also::" directive
}
pub struct ConceptEdge {
pub from: NormalizedTermValue,
pub to: NormalizedTermValue,
pub edge_type: EdgeType,
pub weight: f64, // default 1.0, can be boosted by frequency
}
Integration with RoleGraph
terraphim_rolegraph already supports node/edge relationships. Feed ConceptEdge data into the existing graph structure so that:
- Search ranking: when searching for "context engineering", results mentioning related concepts ("knowledge graph", "ontology") get a relevance boost
- Graph traversal:
terraphim_agentASCII graph visualization shows concept neighborhoods - Autocomplete: typing "context" could suggest both synonyms AND related concepts
Implementation
- Extend
MarkdownDirectivesParseResultto includeVec<ConceptEdge>(#604 providesrelated_concepts) - In
build_thesaurus_from_haystack(), after building the flat thesaurus, construct edges fromrelated_concepts - Feed edges into
RoleGraph::new()alongside the thesaurus - Boost search results that match related concepts (configurable weight, default 0.3x of direct match)
Affected Crates
terraphim_rolegraph(primary -- accept and store concept edges)terraphim_automata(pass edges from parser output)terraphim_types(ConceptEdge, EdgeType types)terraphim_service(use edges for search ranking boost)
Dependencies
- #604 Obsidian format parser (provides related_concepts extraction)
Estimated Effort
~1 day
Part of
Epic #603
- 主要语言
- Rust
- 星标
- 65
- 派生
- 5
- 平均合并
- 1 小时 17 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
terraphim/terraphim-ai 的其他 Issue
-
terraphim_rlm: require a per-sub-result verification plan (recheck / control / independent route)未关闭
难度 4/5 3-5 天 新手友好度 48/100
terraphim/terraphim-ai#969 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
terraphim/terraphim-ai#968 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
terraphim/terraphim-ai#967 ·
-
难度 4/5 3-5 天 新手友好度 48/100
terraphim/terraphim-ai#966 ·
-
难度 5/5 一周以上 新手友好度 30/100
terraphim/terraphim-ai#965 · 2 条评论 ·
查看 terraphim/terraphim-ai 的全部 Issue
相似的 Issue
-
awaiting-response bug needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/sodg.rs#301 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
HakanSeven12/OpenCADStudio#1706 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] Completion info popup (.cm-completionInfo) ignores the configured editor font可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug user-priority/P2
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
rescript-lang/rescript#8765 ·
维护者通常 1 天内回复