agents: neighborhood placeholder, organize prompt, weight-set command

Add {{neighborhood}} placeholder for agent prompts: full seed node
content + ranked neighbors (score = link_strength * node_weight) with
smooth cutoff, minimum 10, cap 25, plus cross-links between included
neighbors.

Rewrite organize.agent prompt to focus on structural graph work:
merging duplicates, superseding junk, calibrating weights, creating
concept hubs.

Add weight-set CLI command for direct node weight manipulation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-20 12:16:55 -04:00
parent 5ef9098deb
commit 34e74ca2c5
5 changed files with 106 additions and 49 deletions

View file

@ -83,6 +83,22 @@ pub fn cmd_not_useful(key: &str) -> Result<(), String> {
Ok(())
}
pub fn cmd_weight_set(key: &str, weight: f32) -> Result<(), String> {
super::check_dry_run();
let mut store = store::Store::load()?;
let resolved = store.resolve_key(key)?;
let weight = weight.clamp(0.01, 1.0);
if let Some(node) = store.nodes.get_mut(&resolved) {
let old = node.weight;
node.weight = weight;
println!("Weight: {} {:.2}{:.2}", resolved, old, weight);
store.save()?;
} else {
return Err(format!("Node not found: {}", resolved));
}
Ok(())
}
pub fn cmd_gap(description: &[String]) -> Result<(), String> {
if description.is_empty() {
return Err("gap requires a description".into());