Python AI bot for Schuberg Philis Slack workspace, automating parts of Leo Simons' work.
Slack AI Assistant - Interactive chat via Slack's Assistant API, powered by LLM through LiteLLM proxy. Maintains thread context, shows thinking status, suggests follow-up prompts.
Blog Automation - Monitors GitHub activity, generates blog posts summarizing significant commits, publishes to WordPress.com. Runs as scheduled CLI command.
lsimons_bot/
├── app/ # Bootstrap (main.py, config.py)
├── bot/ # Bot abstraction with system prompt
├── llm/ # AsyncOpenAI client for LiteLLM proxy
├── slack/ # Slack integration layer
│ ├── assistant/ # AI Assistant API handlers
│ ├── home/ # Home tab handlers
│ └── messages/ # Message event handlers
└── blog/ # Blog automation module
├── github.py # GitHub commit fetching
├── wordpress.py # WordPress.com API client
├── content.py # LLM-based content generation
└── publish.py # Orchestration logic
uv python install
uv venv
source .venv/bin/activate
uv sync --all-groupscp .env.example .env
# Edit .env with your credentialsSlack Assistant requires:
SLACK_BOT_TOKEN- Bot OAuth tokenSLACK_APP_TOKEN- App-level token for socket modeLITELLM_API_BASE- LiteLLM proxy URLLITELLM_API_KEY- LiteLLM API keyASSISTANT_MODEL- Model name (e.g.,gpt-4)
Blog Module requires:
WORDPRESS_USERNAME,WORDPRESS_APPLICATION_PASSWORD- WordPress.com credentialsWORDPRESS_CLIENT_ID,WORDPRESS_CLIENT_SECRET- OAuth app credentialsWORDPRESS_SITE_ID- Target site IDGITHUB_TOKEN- GitHub personal access token- LLM configuration via lsimons-llm environment variables
slack help
slack app settings # Opens web settingsThe manifest.json contains initial config; ongoing changes via web settings.
uv run --env-file .env ./app.py# Dry run (no publishing)
python -m lsimons_bot.blog --dry-run --verbose
# Publish if significant activity
python -m lsimons_bot.blogBlog publishes when: >24 hours since last post AND (>5 commits OR any commit >200 lines changed).
See AGENTS.md for development guidelines.
# Format
uv run ruff format .
# Lint
uv run ruff check .
uv run pyright
# Test
uv run pytest
# Test with coverage
uv run pytest --cov=lsimons_bot- 000-shared-patterns.md - Spec template
- 001-spec-based-development.md - How to write specs
- 002-slack-client.md - Slack integration architecture
- 003-blog-module.md - Blog automation design
- 004-bot-llm-layer.md - Bot and LLM abstraction
- 005-application-bootstrap.md - Application startup
MIT. See LICENSE.md.
