Built stage by stage rather than all at once, with each stage getting its own research, design, and implementation pass before the next one starts. Stage 1 built the foundation: an Onion Architecture .NET solution (Domain → Application → Infrastructure → Api), self-issued JWT authentication, and multi-tenancy enforced through an EF Core global query filter with exactly one deliberate, documented exception — the login lookup, which has to run before a user's tenant is even known. Every non-trivial decision is written down in a running log with the reasoning and, wherever possible, a measured number behind it, rather than just "we chose X." Development itself runs through a spec-driven, agent-assisted workflow: each stage gets a written design and a task-by-task plan, an AI agent implements each task, a separate review pass checks it against the spec and code quality, and nothing moves forward until it's verified with a real build and test run — the architecture and the decisions behind it stay under direct control throughout, not delegated along with the code.
Stages 2 and 3 built on that foundation: a document pipeline that turns real SEC filings (HTML and PDF) into typed elements — headings, paragraphs, tables — and chunks them by token budget, then embeddings stored in PostgreSQL with pgvector and a tenant-scoped similarity search over them.