Remove the blanket .agent/ gitignore so the phase roadmap, user stories, reports, and PLAN.md are versioned with the code. Only runtime artifacts (.agent/phase-sessions/, .agent/pipeline.log) remain ignored. Update AGENTS.md git protocol rule to match.
3.6 KiB
3.6 KiB
Phase 01 — Infrastructure Foundation
Story: — (foundation; no user story)
Context: .agent/PLAN.md §2–§5, §8–§10 · AGENTS.md
Goal
A verified, reproducible foundation: environment installs, Postgres 17 +
pgvector running via podman compose up -d db, migrations applied, app
booting with /api/health, lint/types clean, and the smoke E2E green.
The scaffolding already exists in the repo — this phase verifies and
completes it (fix gaps rather than rewrite).
Implementation steps
uv sync— confirm all deps resolve fromuv.lock.podman compose up -d db— build thedb/image (postgres:17 + pgvector) and start the container;podman compose psmust showhealthy.uv run alembic upgrade head— schema applied (documents,chunks,query_log,vectorextension). Verify withpsql -h localhost -U reese -d brain_of_reese -c '\d chunks'(embedding columnvector(768)).uv run python -m scripts.llm_probe— live aipi check:turbo+embedpresent, dim 768. (If the endpoint is unreachable, record it and continue; E2E uses the mock.)DEBUGPY=0 uv run uvicorn app.main:appboots and serves/,/api/health,/api/suggestions(Ctrl-C to stop). Also verifyDEBUGPY=1prints the debugpy listen warning and the app stays responsive.- Fix anything broken in scaffold files (keep PLAN-conformant).
Testing & Quality
- Unit + integration:
uv run pytest— green. - Coverage:
uv run pytest --cov=app --cov-report=term-missing— record the number; the >90% gate is enforced from the first feature phase onward (skeleton coverage should already be high). - Lint/types:
uv run ruff check .anduv run pyright— zero errors.
Playwright Execution Phase
Run ONLY the smoke suite (verify the browser is installed first —
uv run playwright install chromium if missing):
uv run pytest tests/e2e/test_smoke.py -v --no-cov
Expected: 3 passed (health, index page, placeholder round-trip).
Success criteria
podman compose up -d db→ healthyalembic upgrade headclean;vector(768)column present- app boots;
/api/healthdb: up - unit + integration green; ruff + pyright clean
- smoke E2E green in isolation
- committed (see below)
Commit
git add -A && git commit --no-gpg-sign -m "chore(infra): verify foundation — pg17+pgvector, migrations, debugpy gating, smoke E2E"
✅ Completion record (2026-08-21)
uv sync— env created (CPython 3.13), deps locked inuv.lockpodman compose up -d db— imagebrain-of-reese/db:pg17-vectorbuilt (fixed: base image neededpostgresql-server-dev-17before compiling pgvector), container healthyalembic upgrade head— clean;\d chunksshowsembedding vector(768), FKON DELETE CASCADE,vectorextension installedscripts/llm_probe(live) — models: turbo, embed, lite, juggernaut, uncensored, openai/image; dims(embed): [768] — A6 confirmed- App boot:
/api/health→{"status":"ok","db":"up"}; static frontend served locally;DEBUGPY=1logs the listener and keeps serving, default run has no debugpy import - Placeholder
/api/chatadded (round-trip exercised end-to-end; replaced by SSE RAG in phase 03) - Quality: 24 unit+integration passed, 99�overage on app/,
ruff check .clean,pyright0 errors - E2E:
uv run playwright install chromiumdone;test_smoke.py3 passed in isolation - Commit:
feat: scaffold Brain of Reese — FastAPI RAG chat over Postgres 17 + pgvector(--no-gpg-sign)