feat: add learn export-kg and NormalizedTerm action metadata (Refs #759, #735)#834
Open
AlexMikhalev wants to merge 3 commits intomainfrom
Open
feat: add learn export-kg and NormalizedTerm action metadata (Refs #759, #735)#834AlexMikhalev wants to merge 3 commits intomainfrom
AlexMikhalev wants to merge 3 commits intomainfrom
Conversation
added 3 commits
April 22, 2026 17:46
…759 - Add export_kg.rs module with export_corrections_as_kg() function - Add ExportKg variant to LearnSub CLI enum - Corrections are grouped by corrected value, exported as Logseq-style KG markdown - Supports --type tool-preference (default) or --type all filter - 7 unit tests covering empty dir, single export, merging, filtering, filenames - clippy clean
…759 - Add export_kg.rs module with export_corrections_as_kg() function - Add ExportKg variant to LearnSub CLI enum - Corrections are grouped by corrected value, exported as Logseq-style KG markdown - Supports --type tool-preference (default) or --type all filter - 7 unit tests covering empty dir, single export, merging, filtering, filenames - clippy clean
…raphim/terraphim-ai into task/759-export-corrections-markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two features in one PR:
feat(agent): learn export-kg command (Issue #759)
learn export-kgCLI subcommand that reads capturedCorrectionEventmarkdown filescorrectedvalue--outputflag and--correction-typefilterfeat(types): add action metadata to NormalizedTerm (Issue #735)
action,priority,trigger,pinnedfields toNormalizedTermAutocompleteMetadatafor alignment#[serde(default)]for backward-compatible JSONNotable Fix
#[serde(skip_serializing_if)]on optional fields in HashMap values causesUnexpectedEofon deserialization when fields areNone. Removedskip_serializing_iffromAutocompleteMetadatafields.Files Changed
crates/terraphim_agent/src/learnings/export_kg.rs(new)crates/terraphim_agent/src/main.rs(ExportKg variant + handler)crates/terraphim_agent/src/learnings/mod.rs(exports)crates/terraphim_types/src/lib.rs(NormalizedTerm fields + methods)crates/terraphim_automata/src/autocomplete.rs(AutocompleteMetadata fields)Testing
cargo test --workspacepassescargo clippy --workspace --all-targetsclean