Skip to content

feat(terraphim_dsm): refactor to knowledge graph semantic grouping tool#859

Merged
AlexMikhalev merged 3 commits intomainfrom
task/dsm-refactor
May 2, 2026
Merged

feat(terraphim_dsm): refactor to knowledge graph semantic grouping tool#859
AlexMikhalev merged 3 commits intomainfrom
task/dsm-refactor

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

Refactors terraphim_dsm from a duplicate DSM analyzer into a sentrux companion tool focused on knowledge graph-based semantic module grouping.

Changes

  • Deleted duplicate functionality: scanner.rs, metrics.rs, extractor.rs, output.rs
  • Rewrote main.rs to accept module paths via stdin/file and group by KG concepts
  • Simplified models.rs to semantic grouping types only
  • Updated Cargo.toml: removed unnecessary deps, updated description
  • Kept unique KG integration for domain concept matching and synonym support

Quality Gate

  • sentrux score: 5243 (baseline: 5242) ✓
  • All pre-commit checks pass ✓
  • Tests: 3/3 pass ✓

Usage

# Group modules by KG concepts
cat modules.txt | terraphim_dsm

# Output JSON
cat modules.txt | terraphim_dsm --format json

# Filter by concept
cat modules.txt | terraphim_dsm --concept Authentication

Refs #1143 (Gitea)

Test User added 3 commits May 1, 2026 23:20
Add terraphim_dsm as a sentrux companion tool for knowledge Graph-based
Graph module grouping.

Features:
- Load Terraphim knowledge Graphs from ~/.config/terraphim/Graph/
- Group module paths by domain concept using synonym matching
- Output formats: text, JSON, CSV
- Filter by specific Thesaurus
- Show uncategorized modules

Dependencies: clap, serde, walkdir, tracing, anyhow, dirs

Refs #quality-gate
…tings

Prevents settings.toml from being created in arbitrary working directories.
Default now uses DeviceSettings::default_config_path() (~/.config/terraphim/).

For local dev Bug Reporting, override with:
  TERRAPHIM_SETTINGS_PATH=crates/terraphim_settings/default cargo test
@AlexMikhalev AlexMikhalev merged commit 8b3778f into main May 2, 2026
4 of 8 checks passed
@AlexMikhalev AlexMikhalev deleted the task/dsm-refactor branch May 2, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant