Files
FarmHouse-Holdings/adr/ADR-002-stack.md
T
fez5587andClaude Fable 5 fdf7a67db0 Add PRD, addendum, pre-implementation docs, ADRs, and capability-gate benchmarks
- PRD v1.0 plus addendum with environment reality checks (qwen3.5:9b pool, runaway protection, MVP trim)
- Pre-implementation checklist and GitHub integration plan
- ADR-001: build on Hermes Agent 0.19.0 as agent runtime; engine stays source of truth
- ADR-002: engine stack (FastAPI, Postgres, Redis, React)
- Benchmark suites + results: all five capability gates PASS, pool scaling 1.92x at 4 concurrent

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 22:58:52 -05:00

30 lines
1.6 KiB
Markdown

# ADR-002: Engine Technology Stack
**Status:** Accepted
**Date:** 2026-08-03
## Decision
FarmHouse company engine and supporting services:
- **Python 3.12+ / FastAPI** — engine API and workers. Matches Hermes ecosystem (uvicorn/FastAPI), Playwright and git tooling first-class.
- **PostgreSQL** — durable state, append-only event log, audit. Single DB, one schema per bounded area (`org`, `work`, `events`, `policy`).
- **Redis** — dispatch queue + pub/sub for live dashboard. (Postgres LISTEN/NOTIFY fallback if Redis proves unnecessary weight.)
- **httpx** client adapters: `hermes_client.py` (runtime), `ollama_client.py` (direct pool calls for engine-internal inference like scoring/routing).
- **React + Vite** dashboard (Slice 1: read-only). 2D engine choice deferred to Slice 3.
- **Docker Compose** for Postgres/Redis/engine; deployable to TrueNAS later.
- **Langfuse** self-hosted, deferred until after Slice 1 (Hermes has native Langfuse env hooks — free integration when enabled).
## Rejected
- **Node/NestJS** — second language for no gain; Playwright is the only draw and Python Playwright is fine.
- **LiteLLM now** — consultant phase only; Hermes providers + pool front cover local routing today.
- **Temporal/Celery** — Redis queue + engine dispatch loop is enough at 4-worker scale (`ponytail:` revisit if schedule complexity grows).
- **Microservices** — modular monolith per PRD §14.1.
## Versions pinned at adoption
- Hermes Agent 0.19.0 (TrueNAS, ports 30432/30433)
- Ollama pool front `192.168.1.5:4000` (workers 0.24.0 + 0.32.5)
- qwen3.5:9b Q4_K_M — capability-gated GO (benchmarks/RESULTS.md)