[T3] PostgreSQL database for shared state #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Replace per-agent JSON files with a shared PostgreSQL database so all agents see the same project state.
Implementation
db/schema.sqlprojectstable (id, name, status, created_at, ...)deliverablestable (id, project_id, agent, type, status, ...)decisionstable (id, project_id, decided_by, decision, ...)conversationstable (id, thread_id, participants, ...)db/connection.py— singleton connection manager, used by all agentsself._load_state()/self._save_state()in BaseAgent with DB callsProjectManagerclass that provides:create_project(name)get_project_status(project_id)update_project_phase(project_id, phase)list_active_projects()Files
docker-compose.yml— add postgres servicedb/schema.sql— newdb/connection.py— newdb/project_manager.py— newagents/base_agent.py— replace JSON state with DBAcceptance
project_manager.list_active_projects()and see all work