Milestone 0 — Codebase primed
Landed: 2026-06-30
The goal
Section titled “The goal”Before writing a single feature, set the codebase up properly so it reads as senior and so AI coding agents can work in it without drifting.
The story
Section titled “The story”- PlanPrime the repo before any feature: pinned toolchain, domain-first skeleton, CI, a real local stack.
- Builtuv project (pinned Python 3.12, src/app layout, committed uv.lock with 129 packages), a strict Ruff + mypy strict + pytest toolchain, a core/ package with typed Settings, structlog JSON logging, an AppError hierarchy with an RFC 9457 handler, and 7 empty wired domains.
- TestedA three-layer test tree (unit, integration, eval) with the eval layer isolated; fast pre-commit hooks; mypy and tests run in CI, not pre-commit.
- GreenGreen quick-gate on an empty repo: ruff check all passed, ruff format 29 files already formatted, mypy success on 25 source files, pytest tests/unit passed, pre-commit 12/12 hooks passed, docker compose config valid.
What actually shipped
Section titled “What actually shipped”- uv project, pinned Python 3.12,
src/applayout, committeduv.lock(129 packages). - Strict toolchain: Ruff as linter and formatter (including the async-blocking rules), mypy in strict mode with the Pydantic plugin, pytest with asyncio auto mode.
- Domain-first skeleton: a
core/package (typed Settings, structlog JSON logging, Logfire and Sentry stubs, an AppError hierarchy with an RFC 9457 error handler, and the single sharedget_current_tenantdependency) plus 7 empty wired domains (tenants, ingestion, agent, retrieval, guardrails, eval, mcp). The agent package already carries the Gemini-only provider interface and the typed honesty-verdict type. - Three-layer test tree (unit, integration, eval), with the eval layer isolated.
- Fast pre-commit hooks (Ruff, gitleaks, hygiene); mypy and tests run in CI, not pre-commit, to keep the commit gate fast.
- GitHub Actions CI: a quick-gate job first, then integration, then eval, every action pinned to a commit SHA,
uv sync --frozen. - Local stack up and healthy: Weaviate 1.38.2 and local Supabase, with a real gitignored
.env. - 64 tracked files, 13 Conventional Commits,
maingreen throughout.
Self-review: spec-review passed (only the locked stack, all owner overrides honored, no feature built ahead of plan), senior-pass passed (it found and fixed one DRY violation in db.py).
Deferred on purpose: the two frontends to Day 9/10 (precise stub READMEs for now), and cryptography capped below v49 because v49+ has no wheel for this Intel Mac.
Architecture snapshot
Section titled “Architecture snapshot”What Milestone 0 put in place
core/
Settings, logging, AppError → RFC 9457, get_current_tenant
7 empty domains
tenants, ingestion, agent, retrieval, guardrails, eval, mcp — wired, not implemented
CI pipeline
quick-gate → integration → eval, actions pinned to SHA
Local stack
Weaviate 1.38.2 + local Supabase, healthy
Real features (auth, retrieval, agent)
not yet built — this day is foundation only
ruff check: all checks passedruff format --check: 29 files already formattedmypy src: success, no issues in 25 source filespytest tests/unit: passedpre-commit: 12/12 hooks passeddocker compose config: valid64 tracked files, 13 Conventional Commits, main green throughout.