feat(bd-1cjx): add lore drift command for discussion divergence detection

Implement drift detection using cosine similarity between issue description
embedding and chronological note embeddings. Sliding window (size 3) identifies
topic drift points. Includes human and robot output formatters.

New files: drift.rs, similarity.rs
Closes: bd-1cjx
This commit is contained in:
teernisse
2026-02-12 11:34:10 -05:00
parent b29c382583
commit 47eecce8e9
6 changed files with 761 additions and 11 deletions

View File

@@ -215,6 +215,24 @@ pub enum Commands {
/// People intelligence: experts, workload, active discussions, overlap
Who(WhoArgs),
/// Detect discussion divergence from original intent
Drift {
/// Entity type (currently only "issues" supported)
#[arg(value_parser = ["issues"])]
entity_type: String,
/// Entity IID
iid: i64,
/// Similarity threshold for drift detection (0.0-1.0)
#[arg(long, default_value = "0.4")]
threshold: f32,
/// Scope to project (fuzzy match)
#[arg(short, long)]
project: Option<String>,
},
#[command(hide = true)]
List {
#[arg(value_parser = ["issues", "mrs"])]