Icarus Staging Bot - Week 0.5 Setup Complete
Date: 2026-04-30
Bot: @IcarusStagingBot
Group: Family Logistics (Staging)
Mode: SILENT (Log only, no speaking)
✅ Success Criteria Status
| Criterion | Status | Notes |
|---|---|---|
| 1. Bot responds to /status in group chat | ✅ Ready | Commands configured, database initialized |
| 2. Messages logged to staging database | ✅ Ready | Tables created, ready to receive messages |
| 3. No Speak messages generated | ✅ Configured | SILENT mode enforced |
| 4. Documentation updated | ✅ Complete | TEST_FAMILY_CONTEXT.md updated |
| 5. Week 0.5 protocol documented | ✅ Complete | Protocol added to TEST_FAMILY_CONTEXT.md |
Files Created/Modified
Configuration Files
.env.staging- Environment variables with bot token (NOT in git)staging-start.sh- Updated to load .env.staging
Observer Module (observer/)
__init__.py- Module exportsdatabase.py- Database schema and logging functionsbot.py- Telegram bot implementationverify.py- Verification scripttest_connection.py- Connection test script
Main Application
main_v2.py- Integrated observer bot startup/shutdownconfig.py- Updated to use absolute paths for database
Documentation
shared/project-docs/TEST_FAMILY_CONTEXT.md- Added Week 0.5 protocol section
Database Schema
observer_messages
CREATE TABLE observer_messages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
telegram_message_id INTEGER NOT NULL,
telegram_chat_id INTEGER NOT NULL,
sender_id INTEGER,
sender_name TEXT,
message_text TEXT,
message_type TEXT DEFAULT 'text',
has_photo INTEGER DEFAULT 0,
has_document INTEGER DEFAULT 0,
file_id TEXT,
reply_to_message_id INTEGER,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
logged_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
metadata TEXT
);
observer_stats
CREATE TABLE observer_stats (
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT UNIQUE NOT NULL,
total_messages INTEGER DEFAULT 0,
unique_senders INTEGER DEFAULT 0,
photos_count INTEGER DEFAULT 0,
documents_count INTEGER DEFAULT 0,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Bot Commands
| Command | Description | Week 0.5 Status |
|---|---|---|
/status |
View observation statistics | ✅ Active |
/shadow_mode |
Preview what bot would say | 🚫 Disabled (Week 1) |
/tripwire_stats |
View trigger patterns | 🚫 Disabled (Week 1) |
Security
- Bot Token: Stored in
.env.staging(never committed to git) - Database: Isolated staging database at
/home/hoffmann_admin/.openclaw/data/blog-staging/blog.db - Group: Separate from production family group
- Data: All test data (Miller family context)
- Constraint: Bot NEVER connects to production database
Starting the Bot
# Start staging server (includes observer bot)
cd /home/hoffmann_admin/.openclaw/workspace-socrates/hoffdesk-api
./staging-start.sh
# Verify bot is running
python3 observer/verify.py
Week 0.5 Schedule
| Week | Phase | Bot Behavior |
|---|---|---|
| 0.5 | Baseline | SILENT - Log only, build pattern dataset |
| 1 | Shadow | Log + shadow responses, no public replies |
| 2 | Tripwire | Respond only to configured triggers |
| 3+ | Full | Natural response with tripwire safeguards |
Manual Testing
Once the bot is in the group:
- Send /status - Bot should reply with statistics
- Send regular messages - Should be silently logged
- Send photos - File ID and caption should be logged
- Send documents - File ID and type should be logged
Verify with:
python3 observer/verify.py
Next Steps (For Matt)
- Add @IcarusStagingBot to "Family Logistics (Staging)" group
- Make the bot an admin (required to read all messages)
- Start the staging server:
./staging-start.sh - Test: Send
/statusin the group - Verify messages are being logged in the database
Contact
Wadsworth (Chief of Staff) set this up.
Socrates (Backend) owns the data pipeline.
Matt approves all production deployments.