consolidate-full: autonomous consolidation pipeline
New commands: - `digest auto`: detect and generate missing daily/weekly/monthly digests bottom-up. Validates date format to skip non-date journal keys. Skips today (incomplete) and current week/month. - `consolidate-full`: full autonomous pipeline: 1. Plan (metrics → agent allocation) 2. Execute agents (batched Sonnet calls, 5 nodes per batch) 3. Apply consolidation actions 4. Generate missing digests 5. Apply digest links Logs everything to agent-results/consolidate-full.log Fix: separator agent prompt was including all interference pairs (1114 pairs = 1.3M chars) instead of truncating to batch size. First successful run: 862s, 6/8 agents, +100 relations, 91 digest links applied.
This commit is contained in:
parent
c7e7cfb7af
commit
6bc11e5fb6
3 changed files with 400 additions and 3 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -86,6 +86,7 @@ fn main() {
|
|||
"link-add" => cmd_link_add(&args[2..]),
|
||||
"link-impact" => cmd_link_impact(&args[2..]),
|
||||
"consolidate-session" => cmd_consolidate_session(),
|
||||
"consolidate-full" => cmd_consolidate_full(),
|
||||
"daily-check" => cmd_daily_check(),
|
||||
"apply-agent" => cmd_apply_agent(&args[2..]),
|
||||
"digest" => cmd_digest(&args[2..]),
|
||||
|
|
@ -147,11 +148,13 @@ Commands:
|
|||
Add a link between two nodes
|
||||
link-impact SOURCE TARGET Simulate adding an edge, report topology impact
|
||||
consolidate-session Analyze metrics, plan agent allocation
|
||||
consolidate-full Autonomous: plan → agents → apply → digests → links
|
||||
daily-check Brief metrics check (for cron/notifications)
|
||||
apply-agent [--all] Import pending agent results into the graph
|
||||
digest daily [DATE] Generate daily episodic digest (default: today)
|
||||
digest weekly [DATE] Generate weekly digest (any date in target week)
|
||||
digest monthly [YYYY-MM] Generate monthly digest (default: current month)
|
||||
digest auto Generate all missing digests (daily→weekly→monthly)
|
||||
digest-links [--apply] Parse and apply links from digest files
|
||||
journal-enrich JSONL TEXT [LINE]
|
||||
Enrich journal entry with conversation links
|
||||
|
|
@ -429,6 +432,11 @@ fn cmd_consolidate_session() -> Result<(), String> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn cmd_consolidate_full() -> Result<(), String> {
|
||||
let mut store = capnp_store::Store::load()?;
|
||||
digest::consolidate_full(&mut store)
|
||||
}
|
||||
|
||||
fn cmd_daily_check() -> Result<(), String> {
|
||||
let store = capnp_store::Store::load()?;
|
||||
let report = neuro::daily_check(&store);
|
||||
|
|
@ -644,7 +652,7 @@ fn cmd_apply_agent(args: &[String]) -> Result<(), String> {
|
|||
|
||||
fn cmd_digest(args: &[String]) -> Result<(), String> {
|
||||
if args.is_empty() {
|
||||
return Err("Usage: poc-memory digest daily|weekly|monthly [DATE]".into());
|
||||
return Err("Usage: poc-memory digest daily|weekly|monthly|auto [DATE]".into());
|
||||
}
|
||||
|
||||
let mut store = capnp_store::Store::load()?;
|
||||
|
|
@ -671,7 +679,8 @@ fn cmd_digest(args: &[String]) -> Result<(), String> {
|
|||
let month = if date_arg.is_empty() { "" } else { date_arg };
|
||||
digest::generate_monthly(&mut store, month)
|
||||
}
|
||||
_ => Err(format!("Unknown digest type: {}. Use: daily, weekly, monthly", args[0])),
|
||||
"auto" => digest::digest_auto(&mut store),
|
||||
_ => Err(format!("Unknown digest type: {}. Use: daily, weekly, monthly, auto", args[0])),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue