CRM Deprecated

Reads my messages and my mail: who is still waiting on a reply, and what the inbox files itself.

Deprecated. No longer developed or maintained. The code and its tests stay as they are.I've stopped working on it. The code stays as it is.

{
  "window_days": 7,
  "include_groups": false,
  "suppress": true,
  "show_suppressed": false,
  "category_counts": {
    "known_person": 4,
    "automated": 6,
    "likely_noise": 2,
    "unknown_person": 4
  },
  "suppressed_count": 8,
  "suppressed_by_reason": {
    "automated": 6,
    "likely_noise": 2
  },
  "suppressed_unnamed_handles": 8,
  "tag_filter": null,
  "suppression_guard": {
    "rule": "never suppress a thread where sender_known is true or lifetime_outbound > 0, all time, regardless of any content signal",
    "threads_protected": 4,
    "suppressions_blocked": 0
  },
  "suppressed_by_mute": 0,
  "ranked_by": "actionability score descending, ties on the newest unreplied message's date descending, then latest_message_rowid descending, then chat_guid",
  "rank_gate": {
    "rule": "has_question and direct_address contribute only when lifetime_outbound > 0",
    "penalty_rule": "otp, bulk_markers, shortlink and a shortcode handle are withheld from a thread the relationship guard protects (suppress.is_protected)",
    "threads_with_withheld_contributions": 2,
    "by_signal": {
      "direct_address": 0,
      "has_question": 2,
      "otp": 0,
      "bulk_markers": 0,
      "shortlink": 0,
      "shortcode_handle": 0
    }
  },
  "verdicts": {
    "current": 0,
    "stale": 0,
    "missing": 8
  },
  "chains": {
    "rule": "a thread's unreplied messages are one chain; no time gap splits it, because the measured intra-chain gaps are smooth across seven decades with no boundary in them. largest_gap_seconds is evidence for the reader, not a cut the tool made",
    "rank_rule": "no chain field reaches rank_score: longer inbound runs are historically replied to LESS (66.2% at 11+ against a 94.0% base rate), and every chain longer than 3 on the live list is already a protected thread",
    "single_message": 6,
    "multi_message": 2,
    "longest": 5
  },
  "summaries": {
    "current": 0,
    "missing": 8
  },
  "suppressed_by_verdict": 0,
  "threads": [
    {
      "chat_guid": "chat19",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "+15550000019",
        "source": "unknown"
      },
      "latest_message_rowid": 1901,
      "unreplied_messages": [
        {
          "rowid": 1902,
          "date": "2026-09-07T02:52:31.888788+00:00",
          "text": "sent you the draft, let me know what you think"
        },
        {
          "rowid": 1901,
          "date": "2026-09-10T02:52:31.888788+00:00",
          "text": "any chance you can look at it today?"
        }
      ],
      "chain": {
        "message_count": 2,
        "first_message_rowid": 1902,
        "last_message_rowid": 1901,
        "span_seconds": 259200,
        "waiting_seconds": 86400,
        "largest_gap_seconds": 259200,
        "largest_gap_after_rowid": 1902
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 1,
          "evidence": "1 message sent all time"
        },
        "handle_shape": {
          "value": "phone",
          "evidence": "10-digit handle +15550000019"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": true,
          "evidence": "any chance you can look at it today?"
        },
        "direct_address": {
          "value": 1,
          "evidence": "let me know"
        }
      },
      "category": "known_person",
      "category_reason": "lifetime_outbound: 1 message sent all time",
      "tags": [],
      "rank_score": 6.45,
      "rank_reason": "lifetime_outbound: 1 message sent all time (+4.00); direct_address: let me know (+2.00); has_question: any chance you can look at it today? (+0.50); thread_age: newest unreplied message is 1.0 days old (-0.05)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat9",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "+15550000009",
        "source": "unknown"
      },
      "latest_message_rowid": 902,
      "unreplied_messages": [
        {
          "rowid": 902,
          "date": "2026-09-09T02:52:31.888652+00:00",
          "text": "hey stranger, are you free next week? let me know"
        }
      ],
      "chain": {
        "message_count": 1,
        "first_message_rowid": 902,
        "last_message_rowid": 902,
        "span_seconds": 0,
        "waiting_seconds": 172800,
        "largest_gap_seconds": null,
        "largest_gap_after_rowid": null
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 1,
          "evidence": "1 message sent all time"
        },
        "handle_shape": {
          "value": "phone",
          "evidence": "10-digit handle +15550000009"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": true,
          "evidence": "hey stranger, are you free next week?"
        },
        "direct_address": {
          "value": 2,
          "evidence": "you free, let me know"
        }
      },
      "category": "known_person",
      "category_reason": "lifetime_outbound: 1 message sent all time",
      "tags": [],
      "rank_score": 6.4,
      "rank_reason": "lifetime_outbound: 1 message sent all time (+4.00); direct_address: you free, let me know (+2.00); has_question: hey stranger, are you free next week? (+0.50); thread_age: newest unreplied message is 2.0 days old (-0.10)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat10",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "Dana@Example.com",
        "source": "unknown"
      },
      "latest_message_rowid": 1002,
      "unreplied_messages": [
        {
          "rowid": 1002,
          "date": "2026-09-10T02:52:31.888670+00:00",
          "text": "can you send over the invoice when you get a sec"
        }
      ],
      "chain": {
        "message_count": 1,
        "first_message_rowid": 1002,
        "last_message_rowid": 1002,
        "span_seconds": 0,
        "waiting_seconds": 86400,
        "largest_gap_seconds": null,
        "largest_gap_after_rowid": null
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 1,
          "evidence": "1 message sent all time"
        },
        "handle_shape": {
          "value": "email",
          "evidence": "dana@example.com"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": false,
          "evidence": null
        },
        "direct_address": {
          "value": 1,
          "evidence": "can you"
        }
      },
      "category": "known_person",
      "category_reason": "lifetime_outbound: 1 message sent all time",
      "tags": [],
      "rank_score": 5.95,
      "rank_reason": "lifetime_outbound: 1 message sent all time (+4.00); direct_address: can you (+2.00); thread_age: newest unreplied message is 1.0 days old (-0.05)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat20",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "+15550000020",
        "source": "unknown"
      },
      "latest_message_rowid": 2003,
      "unreplied_messages": [
        {
          "rowid": 2005,
          "date": "2026-09-05T02:52:31.888804+00:00",
          "text": "hey, quick one about saturday"
        },
        {
          "rowid": 2001,
          "date": "2026-09-05T04:04:31.888804+00:00",
          "text": "are we still doing the 7pm thing"
        },
        {
          "rowid": 2004,
          "date": "2026-09-05T06:28:31.888804+00:00",
          "text": "or is it easier another night"
        },
        {
          "rowid": 2002,
          "date": "2026-09-09T02:52:31.888804+00:00",
          "text": "also i found that book you wanted"
        },
        {
          "rowid": 2003,
          "date": "2026-09-09T05:16:31.888804+00:00",
          "text": "let me know either way"
        }
      ],
      "chain": {
        "message_count": 5,
        "first_message_rowid": 2005,
        "last_message_rowid": 2003,
        "span_seconds": 354240,
        "waiting_seconds": 164160,
        "largest_gap_seconds": 332640,
        "largest_gap_after_rowid": 2004
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 1,
          "evidence": "1 message sent all time"
        },
        "handle_shape": {
          "value": "phone",
          "evidence": "10-digit handle +15550000020"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": false,
          "evidence": null
        },
        "direct_address": {
          "value": 1,
          "evidence": "let me know"
        }
      },
      "category": "known_person",
      "category_reason": "lifetime_outbound: 1 message sent all time",
      "tags": [],
      "rank_score": 5.905,
      "rank_reason": "lifetime_outbound: 1 message sent all time (+4.00); direct_address: let me know (+2.00); thread_age: newest unreplied message is 1.9 days old (-0.10)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat12",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "5550123",
        "source": "unknown"
      },
      "latest_message_rowid": 1201,
      "unreplied_messages": [
        {
          "rowid": 1201,
          "date": "2026-09-10T02:52:31.888695+00:00",
          "text": "your appointment is confirmed for thursday"
        }
      ],
      "chain": {
        "message_count": 1,
        "first_message_rowid": 1201,
        "last_message_rowid": 1201,
        "span_seconds": 0,
        "waiting_seconds": 86400,
        "largest_gap_seconds": null,
        "largest_gap_after_rowid": null
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 0,
          "evidence": null
        },
        "handle_shape": {
          "value": "short",
          "evidence": "7-digit handle 5550123"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": false,
          "evidence": null
        },
        "direct_address": {
          "value": 0,
          "evidence": null
        }
      },
      "category": "unknown_person",
      "category_reason": "no name, never replied, no automation markers",
      "tags": [],
      "rank_score": -0.05,
      "rank_reason": "thread_age: newest unreplied message is 1.0 days old (-0.05)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat6",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "+15550000007",
        "source": "unknown"
      },
      "latest_message_rowid": 601,
      "unreplied_messages": [
        {
          "rowid": 601,
          "date": "2026-09-10T02:52:31.888607+00:00",
          "text": "are we still on"
        }
      ],
      "chain": {
        "message_count": 1,
        "first_message_rowid": 601,
        "last_message_rowid": 601,
        "span_seconds": 0,
        "waiting_seconds": 86400,
        "largest_gap_seconds": null,
        "largest_gap_after_rowid": null
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 0,
          "evidence": null
        },
        "handle_shape": {
          "value": "phone",
          "evidence": "10-digit handle +15550000007"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": false,
          "evidence": null
        },
        "direct_address": {
          "value": 0,
          "evidence": null
        }
      },
      "category": "unknown_person",
      "category_reason": "no name, never replied, no automation markers",
      "tags": [],
      "rank_score": -0.05,
      "rank_reason": "thread_age: newest unreplied message is 1.0 days old (-0.05)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat2",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "+15550000002",
        "source": "unknown"
      },
      "latest_message_rowid": 201,
      "unreplied_messages": [
        {
          "rowid": 201,
          "date": "2026-09-09T02:52:31.888552+00:00",
          "text": "lol did you fall off the earth"
        }
      ],
      "chain": {
        "message_count": 1,
        "first_message_rowid": 201,
        "last_message_rowid": 201,
        "span_seconds": 0,
        "waiting_seconds": 172800,
        "largest_gap_seconds": null,
        "largest_gap_after_rowid": null
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 0,
          "evidence": null
        },
        "handle_shape": {
          "value": "phone",
          "evidence": "10-digit handle +15550000002"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": false,
          "evidence": null
        },
        "direct_address": {
          "value": 0,
          "evidence": null
        }
      },
      "category": "unknown_person",
      "category_reason": "no name, never replied, no automation markers",
      "tags": [],
      "rank_score": -0.1,
      "rank_reason": "thread_age: newest unreplied message is 2.0 days old (-0.10)",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    },
    {
      "chat_guid": "chat1",
      "is_group": false,
      "contact": {
        "id": null,
        "name": null,
        "handle": "+15550000001",
        "source": "unknown"
      },
      "latest_message_rowid": 101,
      "unreplied_messages": [
        {
          "rowid": 101,
          "date": "2026-09-08T02:52:31.888524+00:00",
          "text": "still on for saturday?"
        }
      ],
      "chain": {
        "message_count": 1,
        "first_message_rowid": 101,
        "last_message_rowid": 101,
        "span_seconds": 0,
        "waiting_seconds": 259200,
        "largest_gap_seconds": null,
        "largest_gap_after_rowid": null
      },
      "signals": {
        "sender_known": {
          "value": false,
          "evidence": null
        },
        "lifetime_outbound": {
          "value": 0,
          "evidence": null
        },
        "handle_shape": {
          "value": "phone",
          "evidence": "10-digit handle +15550000001"
        },
        "otp": {
          "value": false,
          "evidence": null
        },
        "bulk_markers": {
          "value": 0,
          "evidence": null
        },
        "shortlink": {
          "value": 0,
          "evidence": null
        },
        "has_question": {
          "value": true,
          "evidence": "still on for saturday?"
        },
        "direct_address": {
          "value": 0,
          "evidence": null
        }
      },
      "category": "unknown_person",
      "category_reason": "no name, never replied, no automation markers",
      "tags": [],
      "rank_score": -0.15,
      "rank_reason": "thread_age: newest unreplied message is 3.0 days old (-0.15); withheld by the scope rules: has_question",
      "suppressed": false,
      "suppressed_reason": null,
      "verdict": null,
      "needs_verdict": true,
      "needs_summary": true,
      "active_mutes": []
    }
  ],
  "unnamed_handles": [
    {
      "handle": "+15550000001",
      "service": "iMessage"
    },
    {
      "handle": "+15550000002",
      "service": "iMessage"
    },
    {
      "handle": "+15550000007",
      "service": "SMS"
    },
    {
      "handle": "+15550000009",
      "service": "iMessage"
    },
    {
      "handle": "Dana@Example.com",
      "service": "iMessage"
    },
    {
      "handle": "5550123",
      "service": "SMS"
    },
    {
      "handle": "+15550000019",
      "service": "iMessage"
    },
    {
      "handle": "+15550000020",
      "service": "iMessage"
    }
  ]
}
The check-in command's output against the test fixture: counts per category, how many threads were hidden and why, the ranking rule, then each waiting thread with its signals, score and the reason behind that score.What the tool prints when you run it on test data: a summary of what it found and hid, then each person waiting, with the reasoning behind where they came in the list.
Architecture diagram: CRM opened read-only, neverwritten only what arrived since themarker the text of only themessages the rules couldnot decide Messages history Message reader Contacts sync-contacts CRM state resolve-name list-unnamed Thread assembly Actionability signals Category Suppression filter Ranking check-in Reply-check conversation Mute Unmute Dismiss record-verdict list-mutes Tag Untag tags otp-codes Two-factor helper label-sample Labelled sample Eval Doctor init-db schema-dump Gmail mailbox Mail reader Mail state Mail rules Mail classifier Language model Mail plan Write rails Audit log Labeler Undo
Two archives are read and neither is trusted to the same degree: the message history is opened read-only and never written to, while the mailbox is written only through rails that log the change first.Two things are read: your messages, which are only ever looked at and never changed, and your mail, which can be filed, but only after the change has been written down.

How to use it

Permissions are granted once. After that there are three ways to ask, and a fourth way in for mail.

You grant permission once. After that there are three ways to ask, plus a separate one for email.

  1. First run only: grant the two permissions One to read the message history, one to read contacts. A built-in check says which is missing.It needs permission to read your messages and contacts. A check says which is missing.
  2. Ask at a terminal: the check-in Prints who is waiting, most worth answering first, with what they said.Shows who is waiting, most important first, with what they said.
  3. Or ask out loud: "Alexa, ask big brain who do I need to text" Speaks the first few names, or says you are caught up.It reads out a few names, or tells you there is nobody.
  4. Or ask in a chat, and rule on each one as it goes It reads the list back, and mutes, snoozes or files what you decide.It goes through the list with you and remembers what you decide about each person.
  5. Or hand it the mailbox Reads only what arrived since last time, files it, and writes each change down first.For email it picks up where it left off and notes each change before making it.

Nothing here is a reply. It never writes a message and never marks one read.

It never sends anything for you, and never marks a message as read.

Who Is Waiting

It reads the history already on the machine and finds the threads that end on somebody else's message, matching each number against the machine's own contacts and marking whether the name was matched or typed in. This half makes no network call at all: the archive is opened read-only, and nothing about it leaves the machine.

It looks for conversations where somebody said something and you never answered, then matches the numbers against your contacts so you get names rather than numbers. All of it happens on your own computer: your messages are read, never changed, and never uploaded.

Ranked, and Quiet About Junk

Eight mechanical facts per thread decide both the filter and the order. A separate guard runs first and cannot be outvoted: anyone in the contacts, or anyone ever replied to, is never hidden and never penalised, whatever the text says. Every run reports what it hid, and the rules are scored against threads a human labelled by hand.

It judges each conversation on a few simple things, and uses that both to hide junk and to sort the rest. Anyone you know, or have ever replied to, is never hidden, no matter what the message says. It always tells you how much it hid.

Mute, Snooze, Decide Once

Four needs, kept apart. A mute is topic-shaped and permanent. A snooze says only "not today". A verdict remembers what was decided, so an unchanged inbox costs no questions. A tag is none of those: a name you put on a person, so the list can be narrowed to them.

Some conversations you will never answer, some you cannot face today, some you have already thought about. You can also group people yourself (family, work) and ask about just that group. Four different things, kept separate.

The Mail Files Itself

It never rescans: it keeps a marker and reads forward, moving it only once a batch is handled, so a crash costs a repeat rather than a gap. Rules match first and a model is asked only about the rest, and it only suggests. Three agreements must line up before real mail is touched, and every change is logged first.

It picks up where it left off rather than reading everything again. Most mail is sorted by plain rules; only what they miss is shown to a model, which can suggest but never act. Three switches must all be on before any real email is changed, and every change is written down first, so anything can be put back.