Case study
Agentic Financial Analytics
A private, secure financial-analytics application for tracking real portfolios and modeling hypothetical ones. Research that used to take twenty minutes across a dozen browser tabs comes back in under thirty seconds, grounded in the application’s own numbers and cited to its sources. Fifty-five releases in six months, on a delivery pipeline where AI does most of the work and a person still decides at every gate.
Context
Investors need an enterprise-grade, private, secure way to track portfolio performance in real time. Most financial solutions are public cloud services that take custody of customers' financial data, tools locked to a single brokerage, or even manual spreadsheets. I built a new tool: a Python-based server application (portfolios, watchlists, dividends, tax reporting, alerts, and reporting) where all data stays private and secure. Keeping the system private isn't a hosting limitation: it's the product security model. No public URL, no telemetry. It has been in production since early 2026, informing real financial decisions, and I continue to ship new releases.
Tracking real holdings is only one purpose. The second is modeling hypothetical ones. A portfolio in the application doesn't have to mirror a real account: the multi-portfolio design exists so a user can build “what-if” portfolios and compare scenarios side by side, returns against each portfolio's own baseline and benchmarks, dividend income across portfolios, allocation against targets.
And a third purpose runs underneath both: financial literacy. The application teaches while it informs. Every curated metric carries a one-click definition with its formula and a multi-quarter trend, and the research output always shows its reasoning and sources rather than a bare signal. What-if portfolios are how a user practices; definitions and cited research are how a user learns.
The unsolved question beneath all of it is the one that actually drives decisions: given what I know right now, should I buy more, hold, or sell? Answering it means leaving the app for several finance sites, analyst summaries, news, and filings. Ten to twenty minutes per stock, per decision, captured nowhere.
That is an agentic-AI-shaped problem. The numbers already live in the application; the missing work is synthesis across sources, weighed against those grounded numbers, returned in a structure a user can act on. Retrieval plus judgment plus structured output is an agent's job description.
It is also close to the hardest domain to do it in. Financial analysis is a high-risk category for LLM output: an invented PE ratio or a confident, uncited claim isn't a rough edge, it's disqualifying. The feature is only viable if hallucination is engineered out and framing is engineered in, and the privacy posture doubles the constraint: the AI has to work without ever seeing the user's positions.
This build had a second purpose from the start. It is the deliberate proving ground for my AI-augmented delivery method, an answer to how far spec-driven agentic development scales when agents carry the implementation and the process has to hold the line. Both stories run through this page, and they finish each other.
The method
Nothing reaches an agent until a person has answered every open question about it. That is what spec-driven means here: the specification, not the code, is the thing held under control, and the pipeline is how that control is enforced. Every stage has a defined process, and each stage has to hand the next one something complete enough to act on: PRD → design → tech plan → preflight → backlog load → plan → build → release → close-out.
Structured PRDs carry numbered, prioritized requirements with acceptance criteria. The PRD markdown file is a critical tool for planning features and is synced to Confluence for reference. A design manifest is then created to map each requirement to its design frame and the UI implementation. The design seam is bidirectional: shipped code changes sync back into the design prototype, so design and code can't silently drift. Close-out reports reconcile every requirement against Jira, git history, and the cut release before a project is archived. The published Delivery Loop artifact is the twelve-stage public summary of this machinery.
The pipeline is designed as a control bridge for organizations moving toward full agentic coding without abandoning processes and tools that facilitate transparency, stakeholder participation, decision-making, and ultimately governance. Transparency is central: everything is tracked, from numbered requirement to work item to commit to cut release, so the trail of what an agent did and why is always reconstructable. And the roles that carry accountability stay where a delivery organization already expects them — PM owns the specification and the decisions that clear its gates, DEV owns the implementation, QA owns the verification that lets work merge. AI supports these roles; it doesn't dissolve them.
The gate that makes agentic development safe is the unglamorous one: preflight. The backlog loader refuses to generate Jira stories from a PRD whose open questions carry no recorded decision; a recommendation is not a decision. Under-specification is where agentic coding goes wrong, so the pipeline makes it structurally impossible to hand ambiguous work to an agent at scale.
The build loop is where the deeper agentic story lives, and it is deterministic and adversarial. Story dispatch runs as a coded workflow, not prose an agent interprets: each ready story is implemented by a worker agent in its own isolated copy of the codebase, and its output has to match a required structure before it counts.
Then the claim “this story is complete” goes in front of a panel of three independent refuter agents: separate reviewers whose only job is to prove the work is not finished. The branch merges only if the claim survives a majority; a refuted story is blocked and never merges.
That gate exists because of a lesson this program paid for: for a while, the only check on a worker's output was its own self-reported tests, and self-reporting is the dominant failure mode of agentic coding at scale.
Around the loop runs continuous assurance most delivery programs never build: ten codified audit procedures (architecture, security, dependencies, configuration, data strategy, test strategy, performance, risk, process hygiene) synthesized into a consolidated report that checks its own sub-audits for contradictions, then feeds a hardening-PRD entry point into the same pipeline as feature work. Sixteen of the 38 completed PRD projects are hardening or audit remediation.
The conventions are enforced in tooling rather than intention: a commit-message hook blocks AI-authored commits that lack attribution or a work-item reference, a version gate fails fast on stale dependencies, and a stop hook surfaces the next ready story at the end of every working session.
Model routing is task-aware: cheaper models for mechanical workers, stronger models for planning, synthesis, and verification. AI assists nearly every stage; a person decides at the gates. Two loops deliberately run without one, because the refuter panel and the deterministic dispatcher are more reliable than vigilance.
The system that improves itself
The strongest evidence that the method is real is that it was applied to itself. In June 2026 I wrote a self-assessment of how this system actually operated, and it named three weaknesses plainly: output quality was eyeballed rather than measured; orchestration was prose an agent interprets, non-deterministic where it could be deterministic; and a worker's success was self-reported.
Each finding then became a specified project through the normal pipeline: requirements, backlog, verification, close-out. An evaluation harness now grades the PRD-to-backlog loader against curated golden sets, with a deterministic scorer that hard-fails on regression and an LLM-as-judge advisory layer, so changes to the pipeline's own machinery are provably non-regressive. The deterministic workflow replaced the prose build loop. The adversarial verification gate replaced self-reported success.
This is the delivery loop's Measure stage pointed at the loop itself, and the pattern transfers whole to any AI engineering organization: assess honestly, convert findings into specified work, and ship the fixes through the same gates as everything else.
The application
What the method produced is a full analytics platform, not a demo: authentication and session security, multiple portfolios (real ones and hypothetical “what-if” portfolios for comparing scenarios side by side), dividend tracking, tax reporting, CSV import and export, alerts, reports and dashboards including rebalancing against target allocations, theming, an audit log, encrypted backup and restore, full internationalization in English, French, Spanish, and Portuguese, and native multi-time-zone support with fifteen configurable zones and local-time rendering throughout.
Roughly 38 feature areas and a 324-requirement catalog, running locally, with every file write made all-or-nothing so a crash cannot leave half a record behind, and data upgrades that never break what earlier versions wrote. The privacy principle set early (data never leaves the machine) is the same principle that later bounds what the AI is allowed to see.
Part of that surface exists deliberately as a stress test of the method. Internationalization and multi-time-zone support are classic cross-cutting requirements, touching every screen, every string, and every timestamp. Cross-cutting concerns are exactly where under-specified development processes break down. I implemented them specifically to test the limits of spec-driven agentic development at the kind of requirement that resists it most; the locale subtrees and timezone behaviors are catalogued requirements with tests.
Beneath the analytics sits a multi-provider market-data layer that is a resilience story in its own right: prices and fundamentals from Twelve Data, company details and analyst consensus from Finnhub, and filings from SEC EDGAR, all normalized into one shared cache that respects each provider’s rate limits, with a backup price provider and provider-health monitoring, so a vendor outage degrades to last-known prices with staleness indicators instead of failing.
It is also the AI's grounding layer, and the division of labor is the anti-hallucination architecture in one sentence: the AI never fetches the numbers it reasons over. Numerical facts arrive through the application's own import layer and are injected verbatim; the model's web-search tool is for qualitative context (news, strategic developments), never for quantitative facts.
On top of that sits the agentic research surface. One click on a stock produces, in under thirty seconds, a structured research summary: a disposition (buy, hold, sell, or inconclusive below a confidence threshold) with its thesis, strengths, risks, grounded facts, cited sources, the cost of the call, and an always-visible disclaimer. Every capability claim in that sentence maps to a shipped control:
| Control | What it does |
|---|---|
| Grounded prompt | Verbatim values injected into a versioned system prompt; the model is instructed to use only the numbers provided |
| Mandatory citations | Every qualitative claim links a source URL; the target is 100% citation coverage |
| Structured output | A typed result schema, with parse failures tracked as a quality metric |
| Cost governance | A 24-hour per-symbol cache, a daily call cap, and cumulative spend shown to the user, who controls when credits are spent |
| Framing | “Research summary,” never advice; a first-use consent step; the disposition renders only alongside its thesis, deliberately not inline on the watchlist |
| Data boundary | Tickers and public fundamentals go to the API; position sizes, cost basis, and portfolio value never leave the machine |
Two of those are worth a second look. The disposition never appears as a standalone badge on the watchlist, a small choice that keeps the signal from being consumed without its reasoning. And in a privacy-first product, the data boundary is the AI feature's license to exist at all.
The research surface has since grown along the same rails: a second-generation research iteration, a redesigned per-symbol company research screen, a portfolio-level thesis that synthesizes one view across an entire portfolio, and export. And the security posture holds throughout: API keys encrypted at rest with restrictive file permissions, atomic writes on all caches and state, an activity audit log, encrypted backups, and local token-usage logging that records counts but never response content. Security hardening arrives through the same audit-to-PRD cadence as every other kind of work: maintained, not installed.
Outcomes
What the application achieves
A working answer to the research problem it was built for: the ten-to-twenty-minute, many-tab research ritual became a sub-thirty-second, structured, cited result inside the app, grounded in numbers the model never fetched, capped in cost, and framed as decision support. By design there are no performance claims to make about the dispositions: the application doesn't back-test its own output, and its measurable claims are groundedness, citation coverage, latency, and cost, each enforced by a shipped control rather than asserted. The platform around it runs daily in production: multi-provider data with automatic failover, four languages, encrypted state.
What the method demonstrated
Fifty-five released versions in roughly six months, on a program carrying a product organization's paper trail: twenty documented processes, ten audit procedures, and 38 completed, closed-out PRD projects. The discipline held throughout, not because it got cheaper to skip, but because AI assistance made it affordable to keep.
That is the claim of this case study: spec-driven structure is what makes agentic development safe to run fast, and the pipeline that built this application is itself evaluated, deterministic, and adversarially verified. The application was built as consulting R&D; the method and its controls are the part that transfers.
And the cadence didn't hold steady; it compounded. Across the release history, the final third of the program's releases shipped about 29% faster than the first: a 2.7-day average interval against 3.8, with monthly releases climbing from around eight in the spring to twelve in July. Over those same months, branch coverage rose from under 80% to 83.1% and the test suite kept growing. The speed increase arrived with more rigor, not less. The acceleration coincides with the pipeline's self-improvement wave: the deterministic build loop, the refuter gate, and the eval harness all landed in June and July, and each one raised the speed the next cycle could safely run.
What transfers
- Spec-driven development is the control plane for agentic coding. The more code agents write, the more the leverage moves to the spec, the acceptance criteria, and the close-out reconciliation. Preflight-as-gate is the concrete form: no backlog is generated from a PRD with unresolved questions.
- Never let an agent grade its own work. Worker-reported success was this system's weakest gate until independent refuters replaced it, a lesson paid for rather than theorized.
- Orchestrate in code, not prose, once the pattern stabilizes. Written process definitions are how the pipeline was discovered; the deterministic workflow is how it became reliable. Prose for exploration, code for operation.
- Measure the pipeline like a product. Golden sets and regression scoring for the PRD-to-backlog loader turned tuning from vibes into engineering. Evals aren't just for model outputs.
- In high-stakes domains, the guardrails are the feature. Grounding, citations, budget caps, and framing aren't overhead on the research capability; they are why it can exist.
- Separate what the model retrieves from what it may assert. Numbers come from systems of record, context comes from search, and never the reverse.
- Route models by task, not by loyalty. Quality, speed, and cost is a per-task decision, in the product and in the pipeline that builds it.
The transferable lesson, in one sentence: spec-driven structure, an AI-augmented delivery pipeline, and a pipeline that improves itself through its own gates are not three practices. They are one system, and the system compounds. Every improvement that ships through the gates raises the speed the next cycle can safely run, which is how the program ended six months shipping 29% faster than it started, with more tests, higher coverage, and stronger gates.
Figures are drawn from the application's repository (release history, test suite, and commit record) as of v1.54 (August 2026); traceability counts as of a June 2026 written assessment; release-cadence figures computed from the changelog's dated entries, August 2026.