You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 770ec2a
Browse filesBrowse the repository at this point in the historyBrowse files
<p>The system is redundant by design. Two independent collectors watch the same channels. As long as one of them sees the message, it makes it into the database.</p>
769
+
770
+
<h3>1. Intake (redundant)</h3>
771
+
<p>A dedicated Observer WhatsApp account sits in all 70 channels. On the Mac running the monitoring stack, two collectors watch it simultaneously:</p>
772
+
<divclass="rules">
773
+
<divclass="rule">
774
+
<spanclass="rule-n">A</span>
775
+
<divclass="rule-body">
776
+
<strong>Native notifications</strong>
777
+
<span>macOS desktop notifications from WhatsApp. Fast wake-up signal. Can truncate long messages.</span>
778
+
</div>
779
+
</div>
780
+
<divclass="rule">
781
+
<spanclass="rule-n">B</span>
782
+
<divclass="rule-body">
783
+
<strong>Baileys (linked device)</strong>
784
+
<span>Direct WhatsApp protocol connection. Richer data — full message text, sender identity, group metadata. Stronger evidence.</span>
785
+
</div>
786
+
</div>
787
+
</div>
788
+
<p>Both feed into the same local SQLite database. The merge layer reconciles them — if one catches something the other missed, it backfills. If both catch it, it confirms.</p>
789
+
790
+
<h3>2. Classify</h3>
791
+
<p>Every message gets checked against your three rules. The AI reads the message, evaluates it, and if there's a violation, drafts a custom moderation response appropriate to the tone and context of the conversation.</p>
792
+
793
+
<h3>3. Route & Alert</h3>
794
+
<p>This version is set up on a Mac, so it uses iMessage to send the alert. When a violation is flagged, the system looks at who's supposed to be on coverage at that time — based on schedule, time of day, whatever routing rules you set — and sends them a text with the flagged message plus the suggested response.</p>
795
+
<p>If the person doesn't acknowledge it within a set window, it can re-send or escalate to a second person. The routing logic is configurable.</p>
796
+
797
+
<divclass="aside">
798
+
<p><strong>It never posts back into WhatsApp automatically.</strong> That's what breaks. The system watches, classifies, drafts, and alerts. A human reviews and posts the response themselves. The only time anyone should touch the Observer account directly is once a week or so — just open WhatsApp on the phone briefly to keep the session alive. It won't log out often, but it's good hygiene.</p>
799
+
</div>
800
+
801
+
<h3>4. The Pipeline</h3>
768
802
<divclass="pipeline">
769
803
<divclass="pipeline-step">
770
804
<divclass="pipeline-icon">📥</div>
771
-
<divclass="pipeline-label">Extract</div>
772
-
<divclass="pipeline-desc">All 70 channels pulled into a local database, every message searchable</div>
773
-
</div>
774
-
<divclass="pipeline-step">
775
-
<divclass="pipeline-icon">⚡</div>
776
-
<divclass="pipeline-label">Trigger</div>
777
-
<divclass="pipeline-desc">Webhook fires in real-time on every new message</div>
805
+
<divclass="pipeline-label">Intake</div>
806
+
<divclass="pipeline-desc">Notifications + Baileys capture every message into a local database</div>
778
807
</div>
779
808
<divclass="pipeline-step">
780
809
<divclass="pipeline-icon">🧠</div>
781
810
<divclass="pipeline-label">Classify</div>
782
-
<divclass="pipeline-desc">AI checks against your three rules, drafts a moderation response</div>
811
+
<divclass="pipeline-desc">AI checks against your 3 rules, drafts a response if needed</div>
812
+
</div>
813
+
<divclass="pipeline-step">
814
+
<divclass="pipeline-icon">💬</div>
815
+
<divclass="pipeline-label">Route</div>
816
+
<divclass="pipeline-desc">Sends alert via iMessage to whoever is on coverage at that time</div>
783
817
</div>
784
818
<divclass="pipeline-step">
785
819
<divclass="pipeline-icon">📱</div>
786
-
<divclass="pipeline-label">Alert</div>
787
-
<divclass="pipeline-desc">You get a text with the flagged message and suggested reply. You decide.</div>
820
+
<divclass="pipeline-label">Respond</div>
821
+
<divclass="pipeline-desc">Human reviews the alert, posts the response into WhatsApp themselves</div>
788
822
</div>
789
823
<divclass="pipeline-flow"></div>
790
824
</div>
791
825
792
826
<divclass="aside">
793
-
<p><strong>Key point:</strong>The AI watches and drafts. A human reviews the flagged message and the suggested response, then posts it themselves. Nothing gets sent automatically into WhatsApp -- that's what breaks.</p>
827
+
<p><strong>Mac-first, PC-portable:</strong>I happen to have this running on a Mac, which is why it uses iMessage for alerts and macOS notifications as one of the intake paths. It would work on a PC but needs some retooling on the notification and alert sides. We can talk through what makes sense for your setup on Friday.</p>
0 commit comments