Skip to content

Back to Roadmap Index

Phase 1: Foundation ✅ COMPLETED

Goal: Set up project structure, dependencies, and database schema.

Status: ✅ Completed on 2026-01-19 (Commit: ece5e41)

Tasks

  1. Project Structure
  2. Create directory structure as per Project Structure
  3. Initialize src/reeve/ package with __init__.py files

  4. Dependencies

  5. Update pyproject.toml with required packages:
    [project]
    name = "reeve-bot"
    version = "0.1.0"
    requires-python = ">=3.11"
    dependencies = [
        "sqlalchemy>=2.0",
        "aiosqlite>=0.19.0",
        "alembic>=1.13.0",
        "fastapi>=0.109.0",
        "uvicorn>=0.27.0",
        "pydantic>=2.5.0",
        "requests>=2.32.0",
        "mcp>=0.9.0",  # MCP SDK
        "python-dotenv>=1.0.0",
    ]
    
  6. Run: uv sync

  7. Enums ✅ (src/reeve/pulse/enums.py)

  8. Implement PulsePriority(str, Enum) with 5 levels
  9. Implement PulseStatus(str, Enum) with 5 states
  10. See Pulse Queue Design for full definitions

  11. Database Models ✅ (src/reeve/pulse/models.py)

  12. Implement Pulse SQLAlchemy model
  13. Define all columns as specified in design doc
  14. Add composite indexes
  15. Test model creation:

    from reeve.pulse.models import Base, Pulse
    from sqlalchemy import create_engine
    engine = create_engine("sqlite:///test.db")
    Base.metadata.create_all(engine)
    

  16. Alembic Setup

  17. Initialize: uv run alembic init alembic
  18. Configure alembic.ini with sqlalchemy.url
  19. Configure alembic/env.py with model auto-discovery
  20. Create initial migration:
    uv run alembic revision --autogenerate -m "Create pulses table"
    uv run alembic upgrade head
    
  21. Verify: sqlite3 ~/.reeve/pulse_queue.db .schema

Deliverables

  • ✅ Clean project structure
  • ✅ Working database with pulses table (Migration: 07ce7ae63b4a)
  • ✅ Type-safe enums
  • ✅ Alembic migrations working
  • ✅ Validation tests passing

Validation

# Test script
from reeve.pulse.models import Pulse
from reeve.pulse.enums import PulsePriority, PulseStatus
from datetime import datetime, timezone

pulse = Pulse(
    scheduled_at=datetime.now(timezone.utc),
    prompt="Test pulse",
    priority=PulsePriority.NORMAL,
    status=PulseStatus.PENDING
)
print(f"Created: {pulse}")

Demo

Database Schema:

# Run the demo script
uv run python demos/phase1_database_demo.py

# Expected output:
# ✓ Database initialized at ~/.reeve/pulse_queue.db
# ✓ Created pulse with ID: 1
# ✓ Verified pulse in database:
#   - Scheduled at: 2026-01-19 10:30:00+00:00
#   - Priority: NORMAL
#   - Status: PENDING
# ✓ Phase 1 Demo Complete!

Next: Phase 2: Queue Management