feat(learn): add suggestion approval workflow Refs #85#833
Merged
AlexMikhalev merged 1 commit intomainfrom Apr 22, 2026
Merged
Conversation
…efs #85 - Add SuggestionStatus enum (Pending/Approved/Rejected) to terraphim_types - Add suggestion_status, rejection_reason, bm25_confidence fields to SharedLearning - Add list_pending(), list_by_status(), approve(), reject() to SharedLearningStore - Add learnings/suggest.rs with SuggestionMetrics (JSONL append/read/summary) - Add SuggestSub CLI enum with 8 subcommands: list, show, approve, reject, approve-all, reject-all, metrics, session-end - All gated behind shared-learning feature flag - 12 new tests, 0 regressions Part of Epic #81 (knowledge suggestion lifecycle)
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
SuggestionStatusenum (Pending/Approved/Rejected) as a field onSharedLearning, orthogonal toTrustLevellist_pending(),list_by_status(),approve(),reject()onSharedLearningStorelearnings/suggest.rswith JSONL-basedSuggestionMetrics(append/read/summary)learn suggest: list, show, approve, reject, approve-all, reject-all, metrics, session-endshared-learningfeature flagDesign
SuggestionStatusanswers "what did the human decide?" whileTrustLevelanswers "how well-validated is this knowledge?". They overlap at L3/Approved but diverge at Rejected -- a learning can be L2 (peer-validated) but still rejected by the human.Test plan
cargo test -p terraphim_types-- 76 passedcargo test -p terraphim_agent --features shared-learning-- 338 passedcargo test -p terraphim_agent --test cli_auto_route-- 2 passed (regression fix verified)cargo clippy -p terraphim_agent --features shared-learning -- -D warnings-- cleancargo fmt -- --check-- cleanshared-learningfeatureRefs #85 (Gitea)