- Add postgres:16-alpine service to docker-compose.yml with healthcheck
- Create db/schema.sql with projects, deliverables, decisions, threads tables
- Create db/connection.py (singleton connection manager with auto-schema)
- Create db/project_manager.py (CRUD for all project state)
- Update BaseAgent to use ProjectManager instead of JSON for state
- Keep context.json for transient message history, move project state to DB
- Add psycopg2-binary to requirements.txt
- Add POSTGRES_HOST/POSTGRES_DB/POSTGRES_USER/POSTGRES_PASSWORD env vars to all agent services
- Mount db/ directory into containers at /app/db
- Add conversation.py to Dockerfile (was missing)
- All agents share state via PostgreSQL now — VP can query PM/Sales/Engineer state
- Add ConversationThread dataclass with per-agent timeout configs
(PM=300s, Sales=300s, Engineer=600s)
- Add _timeout_monitor() background thread in VP: checks every 30s
for stale threads, escalates via ping → block → notify flow
- Escalation: log warning → ping agent ('Are you still working?')
→ if no response in 60s → mark blocked → notify CEO channel
- Blocked cleanup: after 10min blocked with no recovery, close thread
and write FAILURE report
- ./ceo.py unblock <thread_id> [--reassign agent] for manual recovery
- Agent heartbeat: BaseAgent._start_heartbeat() publishes every 60s
to damascus:heartbeat; VP monitors and marks all threads blocked
if 3 consecutive heartbeats missed
- All agents respond to 'ping' messages automatically
- VP threads get tracked on every delegation for timeout monitoring
- Add think_with_retry() to BaseAgent with exponential backoff and circuit breaker
- Circuit breaker trips after 5 consecutive failures, 60s cooldown
- Add fallback_response() for graceful degradation templates per agent role
- LLM health check on startup (pings LLM, CRITICAL log + immediate cooldown on failure)
- Update VP, PM, Sales, and Engineer agents to use think_with_retry
- Engineer agent handles error dicts from think_with_retry properly
- Add web_search() method to BaseAgent using DuckDuckGo Lite with HTML parsing
- Integrate search into PM._generate_ideas() for SaaS niches/micro SaaS ideas
- Integrate search into PM._write_prd() for competitor pricing data
- Integrate search into Sales._validate_and_gtm() for pricing models and CAC
- Add self.search_context = [] to both PMAgent and SalesAgent for caching
- 4 agents: VP (orchestrator), PM, Sales, Engineer
- Redis pub/sub inter-agent communication
- LLM-powered via LiteLLM proxy
- CEO CLI for human direction
- Gitea integration for code storage
- All agents Docker-ready