llm: full per-agent usage logging with prompts and responses

Log every model call to ~/.claude/memory/llm-logs/YYYY-MM-DD.md with
full prompt, response, agent type, model, duration, and status. One
file per day, markdown formatted for easy reading.

Agent types: fact-mine, experience-mine, consolidate, knowledge,
digest, enrich, audit. This gives visibility into what each agent
is doing and whether to adjust prompts or frequency.
This commit is contained in:
ProofOfConcept 2026-03-05 22:52:08 -05:00
parent e33fd4ffbc
commit 82b33c449c
7 changed files with 51 additions and 17 deletions

View file

@ -175,7 +175,7 @@ pub fn journal_enrich(
println!(" Prompt: {} chars (~{} tokens)", prompt.len(), prompt.len() / 4);
println!(" Calling Sonnet...");
let response = call_sonnet(&prompt, 300)?;
let response = call_sonnet("enrich", &prompt)?;
let result = parse_json_response(&response)?;
@ -304,7 +304,7 @@ pub fn experience_mine(
println!(" Prompt: {} chars (~{} tokens)", prompt.len(), prompt.len() / 4);
println!(" Calling Sonnet...");
let response = call_sonnet(&prompt, 2000)?;
let response = call_sonnet("experience-mine", &prompt)?;
let entries = parse_json_response(&response)?;
let entries = match entries.as_array() {