Add digest command to email processor
Read-only summary of recent decisions, grouped by action with [auto]/[user] markers. Supports --recent N for multi-day lookback.
This commit is contained in:
@@ -60,6 +60,7 @@ The system separates **classification** (what the LLM does) from **confidence**
|
||||
- **Repeat senders** with consistent tag signatures reach 85%+ confidence and get auto-acted during `scan`. They never touch the pending queue.
|
||||
- **New or ambiguous senders** start at 50% and get queued.
|
||||
- **You occasionally run `review list`** to handle stragglers — each decision further builds history.
|
||||
- **`digest` gives a quick glance** at what was processed recently — subject lines grouped by action, with `[auto]`/`[user]` markers.
|
||||
- **`stats` shows your automation rate** climbing over time.
|
||||
|
||||
### Confidence Computation
|
||||
@@ -96,6 +97,10 @@ chmod +x email-processor.sh
|
||||
./email-processor.sh review all delete # delete all pending
|
||||
./email-processor.sh review accept # accept all suggestions
|
||||
|
||||
# --- Digest ---
|
||||
./email-processor.sh digest # today's processed emails
|
||||
./email-processor.sh digest --recent 3 # last 3 days
|
||||
|
||||
# --- Other ---
|
||||
./email-processor.sh stats # show decision history
|
||||
```
|
||||
@@ -244,13 +249,16 @@ ollama list # should show kamekichi128/qwen3-4b-instruct-2507:latest
|
||||
|
||||
# 7. Check that the decision was recorded
|
||||
./email-processor.sh stats
|
||||
|
||||
# 8. Quick glance at what was processed today
|
||||
./email-processor.sh digest
|
||||
```
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
email_processor/
|
||||
main.py # Entry point — scan/review/stats subcommands
|
||||
main.py # Entry point — scan/review/stats/digest subcommands
|
||||
classifier.py # LLM prompt builder + response parser, tag taxonomy
|
||||
decision_store.py # Decision history, confidence computation, few-shot retrieval
|
||||
config.json # Ollama + automation settings
|
||||
|
||||
Reference in New Issue
Block a user