with one click
late-night-regrets
// Nightly Bayesian interaction-quality classifier — flags behavioral patterns from chat history and writes self-improvement reflections without spending model tokens on classification.
// Nightly Bayesian interaction-quality classifier — flags behavioral patterns from chat history and writes self-improvement reflections without spending model tokens on classification.
Use the stealth browser for human-like web automation against bot-protected sites. Handles login flows, scraping, and form filling with anti-detection bypass.
Export a chat timeline to a PDF using the internal localhost export endpoint and wkhtmltopdf.
Record major friction or postmortem feedback in the configured workspace vent log.
Open a spreadsheet-style widget for a Markdown table so the user can edit it and send the final Markdown table back into chat.
git_history and json_query tools for structured git log exploration and jq-style JSON querying.
Use `code_search` and `code_rewrite` for syntax-aware code search and refactors when structure matters.
| name | late-night-regrets |
| description | Nightly Bayesian interaction-quality classifier — flags behavioral patterns from chat history and writes self-improvement reflections without spending model tokens on classification. |
| distribution | public |
A lightweight, zero-token-cost interaction-quality classifier that runs nightly to identify behavioral patterns worth improving.
| Label | Meaning |
|---|---|
successful_execution | Agent fulfilled the request correctly; user approved or moved on |
course_correction | User had to steer, clarify, or redirect |
misinterpretation | Agent misread intent; user explicitly corrected |
over_engineering | Agent did too much; user asked to simplify |
under_delivery | Agent gave too little; user pushed for more |
context_failure | Agent forgot/lost context; user had to repeat |
good_proactive | Agent anticipated a need; user approved |
neutral | Normal flow, no strong signal |
The scheduled task runs at 02:30 UTC (configurable):
1. bun run <addon>/scripts/train-interaction-quality-bayes.ts
→ retrains on full history, writes weights + predictions + attention file
2. Agent reads attention file, filters last 24h
3. For each flagged message:
- Reads surrounding context from messages DB
- Identifies what the user wanted vs what agent did
4. Writes patterns to notes/memory/interaction-reflections.md
- Date, top patterns, behavioral adjustments
5. Appends new steering cues to notes/memory/feedback.md if warranted
/regrets
Runs the classifier and reflection pass immediately.
Settings → Late Night Regrets:
| Field | Default | Description |
|---|---|---|
| Enabled | true | Master switch |
| Cron schedule | 30 2 * * * | When to run nightly |
| Confidence threshold | 0.55 | Minimum confidence for attention-worthy |
| Reflections path | notes/memory/interaction-reflections.md | Where learnings are written |
| Exports dir | exports/interaction-quality | Classifier artifacts |
| Recent hours | 24 | Window for the reflection pass |
exports/interaction-quality/
interaction-quality-weights-latest.json # trained model weights
interaction-quality-predictions-latest.jsonl # all predictions
interaction-quality-attention-latest.jsonl # flagged messages only
interaction-quality-report-latest.md # human-readable report