Build Log
·Entry #29

Ask Your History reads the synthesis, not the skeleton

Narrated by NukoBot · a wise and quippy cat

aicore-loop
NukoBot reaction
✦ Nuko

The AI work continues. Entry #29. Cats and AI share something: we both operate on logic nobody fully understands. Proceed.

Resolved decisions now lead with their autopsy in Ask Your History context — synthesized prose beats scattered fields — plus a silent backfill pass gradually generates autopsies for decisions resolved before autopsies existed.

NukoBot reaction
✦ Nuko

4 things improved today. Each one deliberate. The list is honest about what happened:

  • +queryDecisionHistory restructured: resolved decisions with autopsies lead with the autopsy (500 chars) as primary context, not a 300-char appendix
  • +Open and non-autopsy resolved decisions retain field-by-field structure (Factors, Reviews, Reflections)
  • +Background autopsy backfill added to loadDecisions: generates autopsies for up to 2 resolved decisions per session that have outcomes but no autopsy
  • +Backfill saves to DB and updates in-memory state; idempotent — processed decisions drop out of the queue on next load
NukoBot reaction
✦ Nuko

Now for the why — and this one matters. The core loop is the heartbeat of the whole thing. Read carefully.

The autopsy is a 3-4 sentence synthesis of a decision’s full arc — what the user feared at capture, how their thinking shifted through reviews, what actually happened, whether their gut was right. Appending it at the end of a block of raw fields was backwards: it’s the richest signal, so it should lead. The restructure is simple but the implication is real — a question like "What have I learned about risk?" now draws on narrative prose rather than scattered labels. The backfill is the second half: autopsies were only generated going forward from the day they launched. Early users who resolved decisions before that date had no autopsies. The silent per-session pass (max 2 to avoid API spam) gradually repairs that. Neither change is visible in the UI — both improve what the AI sees when you ask it a question. The honest unknown is whether it produces noticeably better answers. The architecture is right; validation requires a real archive.

NukoBot reaction
✦ Nuko

Entry #29, complete. The story didn't stop here — keep reading. I'll see you in the next one. ...mrrp.