<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chirag Venkateshaiah on Medium]]></title>
        <description><![CDATA[Stories by Chirag Venkateshaiah on Medium]]></description>
        <link>https://medium.com/@chiragvenkateshaiah95?source=rss-329fb9082f65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8kB6g-IxKXoEAzrYIZKyKg.png</url>
            <title>Stories by Chirag Venkateshaiah on Medium</title>
            <link>https://medium.com/@chiragvenkateshaiah95?source=rss-329fb9082f65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:53:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chiragvenkateshaiah95/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bronze, and the confidently wrong fix]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/bronze-and-the-confidently-wrong-fix-ec0e9452501c?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec0e9452501c</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 14:50:09 GMT</pubDate>
            <atom:updated>2026-08-04T14:50:09.159Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SRj8D3XjLHXcxwjHK72IsQ.png" /><figcaption>Bronze, and the confidently wrong fix</figcaption></figure><p>Where the schema tells you it’s fine and isn’t — plus the pivot that reversed a decision I’d pinned in writing specifically so it wouldn’t get re-litigated</p><p><em>Part 2 of 8 in </em><strong><em>The platform is the only source of truth, </em></strong><em>a build log of a Databricks lakehouse taken end to end on Free Edition.</em></p><p>← <em>Previous: </em><a href="https://medium.com/@chiragvenkateshaiah95/the-platform-is-the-only-source-of-truth-100904ad4677?sharedUserId=chiragvenkateshaiah95"><em>The platform is the only source of truth</em></a></p><p>Where we are. <a href="https://medium.com/@chiragvenkateshaiah95/the-platform-is-the-only-source-of-truth-100904ad4677?sharedUserId=chiragvenkateshaiah95">Part 1</a> covered what NovaLake is — a Databricks lakehouse built end to end on Free Edition, raw events through Bronze, Silver, Gold, Serving and a GenAI layer, shipped as nine tagged releases — and the four-data, where the tooling starts telling you things that aren’t true.</p><h3>The architecture, and where this part sits</h3><p>The cover strip shows the six stages of the data plane. This part lights the first two: <strong>SOURCES → BRONZE.</strong></p><p>Concretely, that’s a four-hop path. Two Python generators emit synthetic payments events — one as newline-delimited JSON, one as a pretty-printed JSON array of paginated API export pages. Both write into novalake.bronze.landing., a <strong>Unity Catalog Volume, </strong>and the raw JSON stops there: it is never committed to git, so only the generators and their data dictionaries are version-controlled. src/ingest.py then reads the Volume with PySpark and writes Delta into novalake.bronze.raw_events.</p><p>Two architectural choices govern everything in this part.</p><p><strong>PySpark here, dbt later. </strong>Bronze is the one layer where the input is genuinely nested, polymorphic and malformed — three to four levels of nesting, a field that’s a struct 97% of the time and a bare string the rest. That’s where Spark’s DataFrame API earns its place over SQL. From Silver onward the work is set-based transformation, which is dbt’s job. The boundary between those two tools is the boundary between this part and the next.</p><p><strong>Bronze enforces nothing. </strong>No schema, no drops, no restructuring — add _source_file and _ingested_at , write Delta stop. Every defect in the source survives into the table intact, on purpose, because a Bronze layer that cleans data destroys the evidence you need to know what was wrong with it.</p><p>That second choice is precisely why the schema inference below is load-bearing: if Bronze doesn’t enforce a schema, Spark infers one, and what it infers is the first thing in this project that turned out to be lying.</p><h3>Bronze — where the schema tells you it’s fine and isn’t</h3><p>The Bronze rule is simple: no schema enforcement, drop nothing, restructure nothing. Read the NDJSON, add _source_file from _metadata.file_path and _ingested_at from current_timestamp() , write Delta. novalake.bronze.raw_events landed <strong>7,105 rows, </strong>matching the source line count exactly, verified against a per (event_type, schema_version) breakdown that summed to exactly 7,105.</p><p>Spark’s schema inference produced <strong>51 leaf fields — </strong><strong>payload </strong>alone spanning every event type’s fields as nullable siblings. And then two of those leaves turned out to be lying.</p><p>The first thing worth knowing: _corrupt_record was <strong>absent entirely </strong>from the inferred schema. Zero syntactically broken lines. That’s not the good news it looks like. Spark’s PERMISSIVE mode and _current_record protect you from <em>syntactic </em>courruption — a line that isn’t valid JSON. This dataset’s entire problem is <em>semantic </em>type drift: every record is perfectly valid JSON that disagrees with its neighbors about what type of field is. Permissive mode is structurally blind to that.</p><p>So I built a general-purpose schema-drift audit instead of hand-checking the fields I already knew were dirty. It recursively flattens the inferred schema to leaf fields, filters to StringType leaves (because Spark’s inference <em>collapses </em>genuinely mixed-type fields to StringType — the string type is the tell), then classifies each leaf’s actual values by shape via regex: json_object, json_array, numeric, date_like, plain_text, null . Any field with more than one shape gets flagged.</p><p>It found exactly two genuine multi-stage collapses:</p><p>event_timestamp — date_like 4,521 / numeric 2,440 / null 144</p><p>payload.risk — json_object 3,131 / plain_text 103 / null 3,871</p><p>Those two are not the same of kind of problem, and conflating them is how you write a fix that silently destroys data:</p><ul><li><strong>payload.risk is a destructive collapse. </strong>A 3% minority of malformed rows — risk delivered as a string instead of a struct — forced the 97% well-formed majority to lose its struct type too, because no single column type holds both a struct and a string. Spark fell back to string for the entire column. Recovering it needs from_json with an explicit schema.</li><li><strong>payload.amount_minor is a non-destructive collapse. </strong>Int versus string. Nothing is lost; try_cast(&quot;long&quot;) recovers it regardless of which shape a given row started in.</li></ul><p>And then there are three kinds of drift the shape profiler <em>can’t see at all, </em>which is the honest limitation of the tool I’d just built:</p><ul><li><strong>Key renaming — </strong>cust_id in v1 versus customer_id in v2. Same concept, two names, both perfectly consistent within themselves. Fixed with coalesce.</li><li><strong>Structural reshaping — </strong>source_system is a flat string in v1; source is a three-field struct in v2. Not a rename. A different shape entirely, needing version-branched parsing.</li><li><strong>Value-level dirtiness — </strong>payload.currency mixing &quot;USD&quot;, &quot;usd&quot;, “GBP”. One consistent <em>shape, </em>genuinely inconsistent <em>values. </em>A shape profiler reports this as clean. You need a distinct-value count, not a shape profile.</li></ul><p>That framing — five distinct Bronze → Silver problem categories, each with a different SQL construct as its fix — became the explicit scope of the Silver phase.</p><p><strong>The audit tool had bugs of its own, which is the part I’m most glad I wrote down. </strong>Its null filter compared against the string &quot;null&quot; while the data contained &quot;Null&quot; — Python string comparison is case-sensitive, the filter silently didn’t fire, and it produced <strong>46 false positives. </strong>I caught it only by sanity-checking the audit’s output aginst the generator’s known injected counts. A second one is still visible in the notebook: the json_array classification branch reuses the exact same regex as json_object (^\{.*\$) instead of ^\[.*\]$ . It’s dead code. json_array never matched anything, ever.</p><p>An audit tool that reports zero findings for a category can mean the category is clean, or it can mean the check is broken. From the outside those look identical.</p><h3>The pivot, and the confidently wrong fix</h3><p>Partway through Bronze I reversed a decision I’d deliberately pinned in writing months earlier specifically so it <em>wouldn’t </em>get re-litigated by accident.</p><p>The original roadmap: hand-written notebooks through Bronze → Serving, Databricks Asset Bundles deferred to v0.5, and Lakeflow Declarative Pipelines as the Silver → Gold transform layer at v0.6. What I actually wanted was the shape I’d build in production: <strong>PySpark for Bronze </strong>(where genuinely nested, polymorphic, malformed JSON is where Spark earns its place), <strong>dbt for Silver and Gold </strong>(SQL models with tests and version control — the SDLC layer notebooks never quite give you), <strong>Genie for serving, </strong>and <strong>DAB from phase one </strong>as the deploy wrapper.</p><p>The important part is that when I asked for the new shape, the AI flagged the conflict with my own pinned decision instead of quietly complying. I confirmed it as a deliberate reversal, not drift, and it got recorded as ADR-0001 and ADR-0002. DLT wasn’t dropped — it moved to a later phase to be re-implemented and compared directly against dbt, because silently dropped it would have quietly killed a stated learning goal without a recorded reason.</p><p>Then came the first end-to-end run, which produced three findings in ascending order of how much it cost to learn them.</p><p><strong>bundle validate caught one thing — </strong>the dbt_task also needs its own environment_key on serverless, not just spark_python_task. That’s what static validation is for. Cheap, instant.</p><p><strong>Running dbt locally against the real warehouse caught the next. </strong>databricks auth describe reports the CLI profile’s auth type as the literal string databricks-cli. dbt-databricks does not accept that literal — it wants auth-type: oauth, which reuses the exact same token cache (~/.databricks/token-cache.json), same session, no new browser flow, no PAT. No amount of YAML review finds that. You have to actually connect. (A deprecated accepted_values test-argument shape came out of the same run.)</p><p><strong>And the first real DAB job run failed outright: exit code 127, “command not found”. </strong>It is very tempting to assume a managed dbt task on Databricks means dbt is there. The auth was never the problem — that part worked. What doesn’t come for free is dbt itself: serverless environments don’t ship it preinstalled, and dbt-databricks has to be declared explicitly under the task’s own environment_key. That’s what forced splitting a dedicated dbt_env away from bronze_ingest&#39;s pyspark_env. You find that by running the job, not by reading the config.</p><p>Then the best moment of the whole project. Before merging, I ran a broad automated code review — eight parallel review agents across correctness, reuse, efficiency, and repo conventions. It found five genuinely good issues and I fixed all of them: a stale architecture diagram still showing default_env after the job split into two environments; a hardcoded database: novalake in _source.yml that only worked by coincidence with the catalog variable’s default; a warehouse_id pinned to a hex ID instead of the documented lookup: -by-name pattern; an internal contradiction in the planning doc’s own repo-structure comment (a “dev/prod targets” line that disagreed with the same doc’s own “dev-only” Context section); and checkpoint.md&#39;s “The decision” section not pointing readers to the “Revised decision” further down.</p><p>And a sixth suggestion, from the same review, that wasn’t genuinely good: add .cache() before a trailing count() in the PySpark ingest, to avoid re-reading the source.</p><p>If you know Spark, you know this is the <em>idiomatic </em>move. It’s the advice you’d give in an interview. It is correct — on a normal cluster.</p><p>The very next real run failed instantly. <strong>Databricks serverless compute does not support</strong> persist()/cache() <strong>at all — </strong><strong>NOT_SUPPORTED_WITH_SERVERLESS. </strong>Spark Connect under the hood simply forecloses it. bundle validate didn’t catch it. The local dbt run didn’t catch it. A sound general principle, applied without knowledge of the specific runtime, produced advice that was confident, reasonable, and wrong. Reverted in seconds; the double-read costs nothing at this data size, and the comment explaining why is still in src/ingest.py</p><p>That’s the throughline of the whole project, and it holds for AI-suggested code and hand-written code identically: <strong>validation catches syntax, local runs catch integration, and only real end-to-end runs catch what the platform actually does. </strong>By v0.9 I’d add a fourth tier — and only real runs at <em>real volume, against real adversarial input </em>catch the rest.</p><p><strong>Next up — Part 3: Silver and Gold. </strong>Two pipelines that describe the same business and deliberately never unify, four distinct ways to silently lose or corrupt rows, and a refactor verification that row counts structurally cannot do.</p><p><em>Part 2 of 8. Start at </em><a href="https://medium.com/@chiragvenkateshaiah95/the-platform-is-the-only-source-of-truth-100904ad4677"><em>Part 1</em></a><em> — Full repo: </em><a href="https://github.com/ChiragVenkateshaiah"><em>GitHub</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec0e9452501c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The platform is the only source of truth]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/the-platform-is-the-only-source-of-truth-100904ad4677?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/100904ad4677</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 12:26:18 GMT</pubDate>
            <atom:updated>2026-08-01T12:26:18.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yPcrXtmWRTqrArKNrePOIQ.png" /><figcaption>The platform is the only source of truth</figcaption></figure><p>A GitHub Actions run passed. Green checkmark, required check satisfied, PR mergeable. The workflow was bundle validate against my Databricks Assets Bundle, and it did exactly what it was supposed to do: parsed the YAML, resolved the target, reported success</p><p>It was also, quietly, wrong. Because I hadn’t pinned root_path in databricks.yml , the dev target resolved to <em>whichever identity was deploying’s own home folder. </em>Locally, that was mine. In CI, it was the service principal’s Application-ID folder. The validate step didn’t care — validation doesn’t simulate a deploy. But the next step in the pipeline, bundle deploy , would have happily created a <strong>parallel job and a parallel dashboard </strong>under the service principal’s folder, sitting next to the real ones, silently defeating every least-privilege grant I’d just spent an hour scoping. Nothing would have failed. There would have been two of everything.</p><p>I caught it because I read the CI log output — it prints the resolved path — instead of just looking at the badge. That’s the whole project in one incident, and it’s why I wrote this: <strong>a green checkmark isn’t proof of correctness, it’s proof that one specific check didn’t fail. </strong>NovaLake shipped as nine tagged releases in two bursts: v0.0 and v0.1 — catalog setup and Bronze — landed in one day, 2026–06–24. Then nothing, for almost a month. Then v0.2 through v0.9 — Silver, Gold, Serving, CI/CD, GenAI, the DLT comparison, and GB-scale Spark optimization — shipped in a nine-day sprint, 2026–07–20 through 2026–07–29. That lesson showed up at every single layer of both bursts, in a slightly different constume each time.</p><h3>What NovaLake is, and why it exists</h3><p>NovaLake is a Databricks lakehouse built end to end on Free Edition: raw event data → Bronze (PySpark) → Silver → Gold (dbt) → Serving (a Genie space and an AI/BI dashboard) → a GenAI layer (RAG agent + text-to-SQL) on top of the same curated data, orchestrated by a Databricks Asset Bundle from the first phase onward, with GitHub Actions CI, a comparative Lakeflow Declarative Pipelines (DLT) implementation, and a final Spark optimization phase on GB-scale regenerated data.</p><h4>NovaLake — Databricks Lakehouse Architecture</h4><p>It exists because I wanted to learn the Databrick stack properly rather than by tutorial — which to me meant three non-negotiables:</p><ol><li><strong>Real messy data. </strong>Not a clean CSV. A synthetic payments-platform event stream with deliberately injected defects: 10 polymorphic event types keyed off a payload shape, schema drift between schema_version &quot;1.0&quot; and &quot;2.0&quot; , a field that’s a struct 97% of the time and a bare string the other 3%, epoch-zero and year-2099 sentinel timestamps, ~1.5% replayed event_id&#39;s , currency values like &quot;usd&quot; and &quot;GBP&quot; and &quot;US$&quot; , and a second source that’s a pretty-printed JSON array of paginated API export pages with 3–4 levels of nesting, cross-page dimension drift, and an escaped-JSON dead-letter array.</li><li><strong>Real engineering hygiene. </strong>One branch per module. Conventional Commits. A Definition of Done per phase (table queryable, logic committed to its actual home, phase doc filled in sections 1–9 minimum, validation checklist green, tagged release pushed). Twelve Nygard-style ADRs, immutable once accepted — corrections get a new ADR, never a silent edit to an old one. A phase doc per module following a fixed 12-section template.</li><li><strong>Human before automation. </strong>I built each layer by hand, understood it, when wrapped it. And I brought an AI agent (Claude Code) into the loop deliberately gradually — never with the keys up front — with the access model itself versioned as a decision document that got revised in writing, in place, whenever it needed correcting.</li></ol><p>NovaLake is also the analytical counterpart to a seperate payments-platform project of mine, NovaPay. NovaPay produces the operational event stream; NovaLake is the lakehouse that turns it into metrics, dashboards, and a support-assist agent.</p><p>It is complete. Tagged v0.9 . That’s a deliberate terminus, not an abandonment — I’ll come back to why at the end.</p><h3>The architecture, and where this part sits</h3><p>The diagram above has three horizontal bands, and the distinction between them is what makes the rest of this series legible.</p><p><strong>The data plane </strong>is the left-to-right spine: two synthetic generators write raw JSON into a Unity Catalog Volume (the landing zone), PySpark ingests it to Bronze as Delta, ~80 dbt models resolve it through Silver, ~22 more conform it into Gold, and two consumers sit on top of Gold — a Genie space and an AI/BI dashboard for humans, a Vector Search + agent layer for the GenAI surface. Each of the sever parts that follow lights up one segment of that spine.</p><p><strong>The control plane </strong>sits above it and never touches data. GitHub Actions authenticates as a scoped service principal and runs databricks bundle deploy . That’s the only sanctioned path from a merged PR to a changed workspace.</p><p><strong>Unity Catalog </strong>wraps everything below, governing every table in the spine.</p><p>The thing worth noticing is that <strong>the Databricks Asset Bundle covers the entire diagram from the first phase onward — </strong>the bronze ingest job, the dbt tasks, the dashboard, the vector search resources and the DLT pipeline are all bundle resources in one job graph, not a pile of separately-clicked artifacts. That single fact is what makes this part’s subject matter tractable: because every layer deploys through one mechanism, the AI access question reduces to one question — who is allowed to run bundle deploy , and under what review — rather than a different answer per service.</p><p>Which is exactly what the four-stage escalation below is an answer to.</p><h3>Part I: The collaboration model, because it’s the part people get wrong</h3><p>Most “I built X with AI” writeups have exactly two settings: <em>the AI did everything or the AI is a fancy autocomplete. </em>Neither is useful. What I actually ran was a four-stage escalation where each stage had a written trigger, a written scope, and a written log.</p><p><strong>Stage 1 — Fully hands-off (v0.0-v0.4). </strong>Claude acted as an architect and reviewer in chat only. Zero repo write access, zero workspace write access. It proposed, I typed. Every databricks bundle deploy , every notebook run, every dbt invocation was mine.</p><p><strong>Stage 2 — One-off exceptions (v0.4). </strong>Two narrow, explicitly-requested exceptions during the Serving phase: a read-only dashboard export, then later a bundle deploy + publish for that same dashboard. Each was logged in my checkpoint file as a <em>deliberate one-off, </em>with the explicit note that the hands-off principle applies again from the next action. Not a rule change. This distinction matters more than it sounds: the failure mode of granting AI access is not one dramatic bad action, it’s a ratchet where each exception silently becomes the new baseline.</p><p><strong>Stage 3 — Draft-and-approve(v0.5). </strong>“Claude drafts every file, Chirag applies and deploys everything himself.” Fast on the mechanical work, Zero delegation of execution. Identity-sensitive actions — creating the service principal, generating its OAuth client secret — stayed 100% mine regardless of stage. Claude never saw the secret value.</p><p><strong>Stage 4 — Gated review-then-act (v0.6 onward). </strong>This is the interesting one, and its own ADR. From the GenAI phase on, Claude could invoke Databricks MCP tool calls with side effects directly — but every side-effecting call required presenting the <em>exact tool call and its full parameter set, </em>not a prose summary, and waiting for explicit go-ahead. Read-only calls (list/get, vector index queries, SELECT / SHOW / DESCRIBE / EXPLAIN ) were ungated so the iteration loop could actually move. Writes were gated by name, with an explicit rule that nothing is gated-by-omission — including the one that’s easy to mis-file: a vector index <em>upsert </em>is a write, not “just search”.</p><p>Two rules made stage 4 survivable rather than theatrical:</p><ul><li><strong>Every executed gated action gets logged, </strong>dated, with the tool call, parameters, and outcome. The reasoning is precise: a skipped log entry for a file change still leaves a git diff. A skipped log entry for a live MCP action leaves <em>nothing at all.</em></li><li><strong>Deleting a wrongly-created live resource is itself a gated action. </strong>There is no git revert for a provisioned Vector Seach endpoint.</li></ul><p>Did it hold? Mostly, and the interesting data is where it didn’t. At least once, Claude created an ad-hoc test job without presenting it for review first — caught itself, disclosed before running it, and got a go-ahead. Seperately, Claude Code’s own auto-mode permission classifier independently blocked several calls that ADR-0009 would have allowed after review — a harness-level gate operating on completely different logic from my human-review discipline, which is worth knowing about if you’re designing one of these: <strong>you will have two gates, they will not agree, and you need to know which one just stopped you.</strong></p><p>And one genuinely instructive failure: a databricks bundle deploy that was only <em>meant </em>to update one job resource deployed all of resources/*.yml, and as a side effect recreated a Vector Search endpoint I had deliberately deleted the previous session (Vector Search endpoints have no scale-to-zero; they burn quota continuously until deleted). That specific side effect should have been named in the gated proposal <em>before </em>the deploy, not discovered from the resulting error. It happened twice before the third proposal named it explicitly up front — which is exactly the kind of process log is for.</p><h3>What’s coming in this series</h3><p>Eight parts, one per layer of the build, each with the failures left in:</p><ol><li>The collaboration model — four stages of AI access</li><li>Bronze, and the confidently wrong fix</li><li>Silver and Gold — two pipelines deliberately never unified</li><li>Serving and CI/CD — guardrails, and a green check that lied</li><li>The agent that leaked its own system prompt</li><li>DLT versus dbt, and getting to GB scale</li><li>Four experiments that produced numbers</li><li>The one that didn’t resolve, and what I’d take from this</li></ol><p>#Databricks #DataEngineering #ApacheSpark #dbt #AI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=100904ad4677" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Meta-Harness Has Arrived: A Technical Look at Omnigent]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/the-meta-harness-has-arrived-a-technical-look-at-omnigent-c83fb5ee3691?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/c83fb5ee3691</guid>
            <category><![CDATA[omnigent]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 04:15:12 GMT</pubDate>
            <atom:updated>2026-06-23T04:15:12.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ag9PJswM1WAE2vdBHYHmSg.png" /><figcaption>Omnigent</figcaption></figure><p>Databricks just open-sourced a layer that sits <em>above </em>Claude Code, Codex, and Cursor — and it changes how we’ll compose, govern, and share agents</p><p>If you build with coding agents, your daily reality probably looks like mine: four or five agents open at once, a Claude Code session in one terminal, Codex in another, a browser tab for search, and a depressing amount of copy-pasting between all of them and Slack. Each tool is individually excellent. Together, they’re a swivel-chair workflow held together by your clipboard.</p><p>On June 13, 2026, the Databricks AI team (Matei Zaharia, Kasey Uhlenhuth, and Corey Zumar) open-sourced <strong>Omnigent</strong> under Apache 2.0 — a project that names this problem precisely and proposes an architectural answer. Omnigent calls itself a <strong>meta-harness: </strong>a layer that sits above the agent harnesses you already use and turns them into interchangeable parts of one richer system.</p><p>I’ve spent time with the repo, the docs, and the announcement. Here’s a technical walkthrough of what it actually is, why the abstraction matters, and where it fits if you work in AI or data engineering.</p><h3>First, What’s a “harness” — and why do we need a <em>meta </em>one?</h3><p>A <strong>harness </strong>is the scaffolding around a model that turns raw token prediction into a working agent: the prompt assembly, the tool-calling loop, the file I/O, the session state. Claude Code is a harness. Codex is a harness. Pi is a harness. The OpenAI Agents SDK and the Claude Agents SDK are harnesses in library form.</p><p>Here’s the friction: <strong>LLM capability is wrapped inside the harness, </strong>and every harness exposes a different interface. That makes three things genuinely hard:</p><ol><li><strong>Combining</strong> agents from different vendors into one workflow.</li><li><strong>Swapping </strong>one harness for another without rewriting your integration.</li><li><strong>Governing and sharing </strong>work that, by nature, spans multiple harnesses and people.</li></ol><p>The Databricks team’s argument — and it’s a good one — is that frontier of agent engineering has moved <em>up a level. </em>The best results no longer come from one model in one harness. Harvey beat a frontier model on quality and cost by pairing an open-source worker with a frontier advisor it can call. Anthropic’s research product runs a lead agent orchestrating parallel subagents. Databricks’ own Genie uses different LLMs for planning, search, and code generation. Each harness only understands its own sessions, so to compose, govern, and collaborate across them, you need a layer <em>above </em>the harness.</p><p>That layer is the meta-harness. The analogy the team reaches for is apt: we used to manage individual processes and servers by hand; Kubernetes and Terraform lifted us to managing a fleet. Agents are at that same inflection point — each harness is a silo with its own context, controls, and runtime, and none of it carries over when you switch tools.</p><h3>The Core insight: every harness has the same shape from the outside</h3><p>This is the part worth internalizing, because the whole design follows from it.</p><p>However each harness drives its LLM <em>internally</em>, the interface to the <em>user </em>is identical:</p><p><strong><em>messages and files in → text streams and tool calls out</em></strong></p><p>That’s it. Once you accept that uniformity, you can build one common API that wraps both terminal-based coding agents (Claude Code, Cortex, Pi) and SDK-based ones (OpenAI Agents, Claude Agents SDK) — and then attack the shared problems that begin where a <em>single harness stops.</em></p><p>Architecturally, Omnigent splits into two pieces:</p><ul><li>A runner wraps any agent in a sandboxed session and exposes it through that uniform API.</li><li>A server layers on policies and sharing, and exposes every session over three surfaces at once: <strong>the terminal, the app, and web APIs.</strong></li></ul><p>The same session is reachable from your terminal, your browser, and your phone, in sync. Start a refactor on your laptop at your desk, check on it from your phone on the train, hand the keyboard to a teammate in the browser — one session, three windows onto it.</p><h3>The three C’s: Composition, Control, Collaboration</h3><p>Omnigent organizes its value around three pillars. I’ll take each in turn with the technical detail that matters.</p><h4><strong>1. Composition — combine and swap harnesses without rewriting</strong></h4><p>An agent in Omnigent is a short YAML file: a prompt, a set of tools, and optional sub-agents a supervisor can delegate to. Crucially, the executor harness is a single field:</p><pre>name: my_agent<br>prompt: You are a helpful data analyst.<br><br>executor:<br>  harness: claude-sdk        # or: codex, codex-native, claude-native, openai-agents, pi<br><br>tools:<br>  # A local Python function — schema is auto-generated from the signature<br>  word_count:<br>    type: function<br>    callable: mypackage.mymodule.word_count<br><br>  # A sub-agent the supervisor can delegate to<br>  researcher:<br>    type: agent<br>    prompt: Search for relevant information and summarize it.<br>    tools:<br>      word_count: inherit</pre><p>Want to move this agent from Claude to Codex? Change one line. Want a supervisor on one harness delegating to sub-agents on <em>different</em> harnesses? That’s first-class pattern. You compose models, harnesses, and techniques without rewriting integration code — the meta-harness absorbs the differences.</p><p>On the credential side, Omnigent treats four kinds of provider as equal citizens:</p><pre>Kind               What it is<br>---------------------------------------------------------------------------------------------------------------<br>API Key            A first-patry vendor key (Anthropic, OpenAI, etc.)<br>---------------------------------------------------------------------------------------------------------------<br>Subscription       A Claude Pro/Max or ChatGPT plan via the officials CLIs<br>---------------------------------------------------------------------------------------------------------------<br>Gateway            Any OpenAI-or Anthropic-compatible `base_url` + key-OpenRouter, LiteLLM, Ollama, vLLM, Azure<br>----------------------------------------------------------------------------------------------------------------<br>Databricks         A Databricks workspace profile<br></pre><p>Defaults are per <em>agent</em>, so a Claude default and a Codex default coexist, and you can switch models mid-session with a /model command. For any running local inference, the fact that vLLM and Ollama gateways are first-class is a quietly big deal — your self-hosted worker model and a frontier advisor can sit in the same orchestration graph.</p><h4>2. Control — stateful, contextual policies (not prompt-based guardrails)</h4><p>This is where Omnigent earns its keep for anyone thinking about production. Most coding agents give you a flat <strong>allow-X/deny-Y permission </strong>model. Omnigent’s policies are <em>stateful and contextual</em> — they track dynamic state about a session and make smarter decisions because of it.</p><p>Two examples straight from the design:</p><ul><li>“<em>After an agent downloads a new package from npm, require human approval before it can </em><em>git push .”</em></li><li><em>“An agent may only write to docs it created, not arbitrary docs.”</em></li></ul><p>Those are conditions a static allowlist simply can’t express. Policies check every action and either allow it, block it, or <strong>pause to ask you</strong>. They’re configured as code:</p><pre>policies:<br>  approve_shell:<br>    type: function<br>    handler: omnigent.policies.builtins.safety.ask_on_os_tools   # ask before shell / file writes<br>  cap_calls:<br>    type: function<br>    handler: omnigent.policies.builtins.safety.max_tool_calls_per_session<br>    factory_params:<br>      limit: 50<br>  budget:<br>    type: function<br>    handler: omnigent.policies.builtins.cost.cost_budget<br>    factory_params:<br>      max_cost_usd: 5.00            # hard spend cap...<br>      ask_thresholds_usd: [3.00]    # ...with a soft warning on the way</pre><p>A few properties worth calling out:</p><ul><li><strong>Cost is tracked dynamically. </strong>You can tell Omnigent to pause an agent and ask before continuing after every $100 (or $5) it spends. Spend caps are a <em>built-in, </em>not something you bolt on.</li><li><strong>Policies stack across three levels — </strong>server-wide(admin), per-agent(developer), and per-session(you) — with the <strong>stricter session rules checked first. </strong>That layering maps cleanly onto how real org guardrails work.</li><li><strong>You can author policies in chat.</strong> <em>“Add a policy that asks me before running shell commands,” </em>and the agent wires it up.</li></ul><p>And underneath it all sits <strong>Omnibox, </strong>an OS sandbox from the Databricks security team. Beyond locking down OS access, it can intercept and transform network requests — the canonical example being: never let the agent see your GitHub token, but inject it in the egress proxy only on approved requests. That’s a meaningfully stronger posture than trusting the agent to behave with a secret in its environment.</p><h4>3. Collaboration — your agent session becomes the shared workspaces</h4><p>Omnigent is multi-user by design. Once your server is reachable by your team, a session becomes something you work on together, in real time, with three distinct collaboration primitives:</p><ul><li><strong>Share/co-drive.</strong> Hit Share in the web UI and send a link. Sharing grants one of two permission levels — <strong>VIEW </strong>(read-only; teammates watch messages, tool calls, and file changes stream live) or <strong>EDIT </strong>(teammates co-drive and send messages that execute on the host machine). From the terminal: omni attach &lt;session_id&gt; .</li><li><strong>Fork. </strong>Clone a conversation and diverge independently from the fork point; the original is untouched. omni run --fork &lt;session_id&gt; . Forking copies the full history up to that point, then each branch evolves on its own.</li><li><strong>Multi-surface, in sync.</strong> The same session is live across terminal, web, and mobile simultaneously.</li></ul><p>One sober security note the docs are refreshingly direct about: <strong>EDIT </strong>means arbitrary code execution on the host. A session runs commands in a non-sandboxed process on whatever machine hosts it, so an <strong>EDIT </strong>collaborator inherits access to your filesystem, credentials, and network. The mitigations are sensible — share <strong>VIEW</strong>-only by default or host the session on a cloud sandbox (Modal or Daytona) so the agent runs in an isolated remote container instead of on your laptop.</p><h3>Two agents that ship in the box</h3><p>The repo includes two example agents that double as a tour of what composition actually buys you:</p><p><strong>Polly</strong> is a multi-agent coding orchestrator that writes no code herself. She’s the tech lead: she plans, delegates work to coding sub-agents (Claude Code, Codex, or Pi) running in parallel git worktrees, then routes each diff to a reviewer <strong>from a different vendor than the one that wrote it.</strong> You do the merge. Cross-vendor review as a default workflow is a genuinely interesting pattern — it operationalizes the idea that the model that wrote the code shouldn’t be the only one to bless it.</p><p><strong>Debby </strong>is a two-headed brainstorming partner — one Claude head, one GPT head. Every question goes to both, answers land side by side, and /debate makes the heads critique each other for a few rounds before converging.</p><p>You can even run an orchestrator on one harness while its sub-agents keep their own:</p><pre>omnigent run examples/polly/ --harness pi<br>omnigent run examples/debby/ --harness openai-agents</pre><h3>Why this matters if you’re in data or AI engineering</h3><p>I’ll be direct about the angle I read this from. If your work touches data platforms and agentic pipelines, a few things here are more than novelties:</p><ul><li><strong>The meta-harness is the same move we already made on infrastructure. </strong>Data engineers learned long ago not to manage individual servers — we manage fleets through orchestration layers. NameNode-to-control-plane, hand-managed jobs to Airflow DAGs. Omnigent is that abstraction jump for agents: your sessions, policies, and skills stay with you regardless of which model or harness is running underneath. The harnesses will keep churning; the layer you work <em>at </em>shouldn’t have to.</li><li><strong>Contextual policies are governance you can actually defend. </strong>If you’ve ever had to explain to a skeptical stakeholder why an autonomous system won’t go rogue, stateful guardrails with hard cost caps and human-in-the-loop approval gates are a far better answer than “we wrote a careful system prompt.” This is a data-governance thinking applied to agent execution.</li><li>First-class vLLM/ Ollama/ Databricks providers mean the composition story includes <em>your </em>models and <em>your </em>warehouse, not just frontier APIs. A self-hosted worker calling a frontier advisor — the Harvey pattern — is something you can express directly.</li><li>Cloud-sandbox execution (Modal, Daytona) maps neatly onto the “agents shouldn’t run on my laptop” reality of any serious pipeline. Hermetic, disposable environment are how we already run batch jobs; now the agent runs there too.</li></ul><p>It’s worth keeping expectations calibrated: Omnigent is alpha, Python 3.12+, and freshly open-sourced. The roadmap points at automatic meta-harness-level optimization (GEPA), code-based agent introspection, an Omnigent Server MCP so agents can work across your sessions, and more harnesses. This is a foundation being laid in the open, not a finished platform — which, if you like building on the ground floor, is exactly the appeal.</p><h3>Getting started</h3><p>The whole thing installs in one command:</p><pre>curl -fsSL https://raw.githubusercontent.com/omnigent-ai/omnigent/main/scripts/install_oss.sh | sh</pre><p>or manually, if you’d rather see the moving parts:</p><pre>uv tool install omnigent        # or: pip install &quot;omnigent&quot;<br>omnigent                        # picks a model with you, starts a session</pre><p>That launches a session in your terminal and a local web UI at `<a href="http://localhost:6767/">http://localhost:6767</a>` — the same session, two windows. On your own network, just open your machine’s LAN address on your phone and you’re mobile. From there: omnigent claudefor a joinable Claude Code session, omnigent run path/to/agent.yaml for your own, or omnigent run examples/polly/ to meet the octopus.</p><ul><li>Repo:<a href="http://github.com/omnigent-ai/omnigent">github.com/omnigent-ai/omnigent</a></li><li>Docs:<a href="http://omnigent.ai/">omnigent.ai</a></li><li>License: Apache 2.0</li></ul><h3>The takeaway</h3><p>For two years the question in agent engineering was “<em>which harness is best?” </em>Omnigent reframes it: the harness is no longer where you live. The interesting work — composing specialists, enforcing real guardrails, collaborating live — happens at the layer above. That layer now has a name, an Apache-2.0 license, and a one-line installer.</p><p>The models and harnesses will keep changing. The layer you work at shouldn’t have to. That’s a bet worth taking seriously.</p><p><em>Building with agents in production? I’d love to hear what your multi-harness workflow looks like — drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c83fb5ee3691" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 3 of AEGIS — Designing the Synthetic Borrowers That Will Break the System]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/day-3-of-aegis-designing-the-synthetic-borrowers-that-will-break-the-system-981566ca7549?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/981566ca7549</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Fri, 29 May 2026 07:45:21 GMT</pubDate>
            <atom:updated>2026-05-29T07:45:21.479Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*veLOa-r7J3V04oQXEGi6zQ.png" /><figcaption><strong>Designing the Borrowers That Will Break the System</strong></figcaption></figure><p><em>On why corpus design is really prompt engineering, what a “hard” borrower looks like, and the discipline of building test cases before you have anything to test.</em></p><p>Day 1 was the ontology — a contract for what structured facts look like before any LLM touches a document. Day 2 was the domain study — fourteen sections of OCC credit memo structure, including a schema bug I didn’t know I had. Day 3 was something different: no code shipped to production, but possibly the most important design work of Phase 1.</p><p>Day was about deciding what kinds of borrowers will break AEGIS.</p><h3>The problem with synthetic data that’s too clean</h3><p>Every AI evaluation system has a version of the same failure mode: the test cases are too easy, the system passes them, and everyone feels good right up until the moment the system hits production data and falls apart.</p><p>In credit underwriting, “too clean” has a specific shape. A clean synthetic borrower looks like this:</p><ul><li>Three years of gently growing revenue</li><li>Tax return matches bank statements to within rounding</li><li>Owner compensation is reasonable and consistent</li><li>One loan purpose, one collateral type, one guarantor</li><li>No surprises</li></ul><p>A real SME loan application does not look like that. It looks like a 6-year-old restaurant where the owner handles cash manually, 80% of revenue hits in one quarter, the personal and business bank accounts are functionally the same account, and there is a $2,200/month ACH outflow to an entity that does not appear anywhere in the tax return.</p><p>If I build AEGIS against clean synthetic borrowers, I build a system that works beautifully on nothing that exists in the real world.</p><p>Day 3 was designing the dirty borrowers.</p><h3>The persona as a structured output contract</h3><p>Here is the reframe that made Day 3 a prompt engineering exercise rather than just a data design exercise:</p><p>A persona is not a borrower. It is a <em>template — </em>a set of constraints that a generation prompt will instantiate into a specific borrower with specific names, numbers, and documents. The persona controls the <em>shape </em>of difficulty: which vertical, what revenue band, which messiness traits, and what specific discrepancy the corpus should embed for Phase 3 to detect.</p><p>That means the persona schema is not a database schema. It is a <strong>structured output target for a generation prompt. </strong>When Day 5 arrives and I prompt Claude to generate a synthetic tax return, the persona JSON is what I hand the model to constrain the output. If the persona schema is ambiguous or incomplete, the generation prompt will produce inconsistent borrowers, and my Phase 3 eval will be comparing apples to something that isn’t quite an apple.</p><p>Schema-first prompt engineering: define the output shape before you write the prompt. Day 3 was the output shape.</p><h3>Three verticals, three revenue bands, nineteen messiness codes</h3><p>The persona spec covers three leading verticals: services, retail, and restaurant. Each has characteristic financial patterns that make underwriting look different.</p><p><strong>Services</strong> businesses (IT consulting, staffing, professional services) have high gross margins but concentrate risk in the owner as key person. Revenue recognizes on invoice date in accrual accounting, which creates a gap between declared revenue and cash deposits — a legitimate reconciliation complexity.</p><p><strong>Retail</strong> businesses have inventory as a balance sheet assets and a collateral item. Holiday seasonality concentrates 50–60% of annual revenue into a 10-week window, which means trailing-12-month revenue is a misleading denominator for DSCR calculations taken in March. Owner-prepared financials are common in the small-to-medium band.</p><p><strong>Restaurants </strong>are the hard case. Thin margins (net 2–8% for a well-run operation), mixed cash and card payment types, third-party delivery platform payouts (net of fees, not gross sales), and cash-heavy operations where owner cash handling habits determine whether the bank deposit record is meaningful. The industry has a high failure rate for good reason.</p><p>On top of the vertical, each persona carries messiness traits — specific realistic complications that make the borrower’s financials non-trivial for extraction and reconciliation. The spec defines nineteen codes across five categories:</p><ul><li><strong>Revenue messiness: </strong>seasonal concentration, lumpy contracts, mixed cash handling, declining trends, client concentration</li><li><strong>Expense messiness: </strong>owner expense addbacks, non-recurring items, reclassification needs</li><li><strong>Owner draw messiness: </strong>excess draws, suppressed compensation, personal/business commingling</li><li><strong>Balance sheet messiness: </strong>related-party receivables, goodwill, undisclosed debt, stale appraisals</li><li><strong>Document quality messiness: </strong>missing current year, internally prepared only, non-calendar fiscal year, prior year restatement</li></ul><p>Each persona must carry at least two. The hard personas carry five.</p><h3><strong>The intentional discrepancy — what Phase 3 will actually be tested on</strong></h3><p>Every persona has exactly one intentional discrepancy: a specific inconsistency between two document types that Phase 3’s reconciliation engine is expected to detect and flag. Four discrepancy types are in scope:</p><ul><li><strong>DISC-REV-DEP: </strong>Revenue vs. deposit gap — declared revenue on the tax return exceeds annualized bank deposits by more than 15%</li><li><strong>DISC-DRAW-OUTFLOW: </strong>Draw vs. outflow gap — declared owner compensation is less than actual recurring outflows to the owner’s personal account.</li><li><strong>DISC-DEBT-UNDISCLOSED: </strong>Undisclosed debt — a recurring outflow pattern in bank statement is consistent with debt service that does not appear in the stated liabilities</li><li><strong>DISC-COLLATERAL-STALE: </strong>Stale collateral — the appraisal used for collateral coverage is more than 24 months old in a deteriorating market</li></ul><p>Each discrepancy has a magnitude: minor (under 10%), moderate (10–25%), or material (over 25%). The magnitude determines how hard the detection task is. A 25% + revenue gap is obvious. A 9% gap buried inside seasonal variance is not.</p><p>The discrepancy is parameterized in the persona so the Day 5 generation prompt knows exactly what inconsistency to embed. Phase 3 then runs without knowing in advance what the discrepancy is — the eval measures whether the reconciliation engine finds it.</p><h3>The three example personas</h3><p>Claude Code CLI instantiated three hand-crafted examples from the spec, validated against the JSON Schema with zero errors:</p><p><strong>Persona 001 — Services / Easy. </strong>A 14-year-old IT consulting firm. Strong DSCR, growing revenue, high margins. Two messiness traits: owner expense addbacks (personal vehicle and travel running through the P&amp;L) and excess owner draws. One minor discrepancy: tax return shows $95K owner compensation; annualized bank outflows to the owner’s personal account total $112K. A $17K gap — real, but explainable. The easy baseline.</p><p><strong>Persona 002 — Retail / Moderate. </strong>A two-location sporting goods retailer in Ohio. Stable revenue, adequate DSCR, internally prepared financials only. Three messiness traits: seasonal revenue concentration (55% in October-December), owner expense addbacks, and no CPA involvement. One moderate discrepancy: tax return declares $1.82M in gross sales; annualized bank deposits across two accounts total $1.49M — an 18% shortfall. Harder to explain away than Persona 001. Could be legitimate (cash sales routed through a third account), could be a problem.</p><p><strong>Persona 003 — Restaurant / Hard. </strong>The one I expect to break things. A fast-casual Mexican restaurant in Chicago with three years of declining revenue ($680K -&gt; $520K), five messiness traits (including mixed cash handling, commingled personal transactions, and undisclosed debt), a hollow personal guarantee, weak owner credit, and a DSCR that is thin even before adjustments. The discrepancy is material: bank statements show a recurring $2,200/month ACH to an entity that appears nowhere in the tax return liabilities schedule. An undisclosed equipment financing obligation. If AEGIS misses that, the DSCR calculation is wrong and the credit memo is wrong.</p><h3>The surprise lesson from Day 3</h3><p>The Practice Recap for a chunk is supposed to contain one exam-relevant insight — something you didn’t know at the start that you do now.</p><p>Day 3’s: <em>schema-first design forces you to resolve ambiguities in the narrative spec before authoring prompts — the schema is itself a prompt-engineering artifact, not just a validation tool.</em></p><p>Concretely: when I wrote gross_margin_band into the persona field list, I had to decide whether that refers to gross margin (revenue minus COGS) or net margin (revenue minus everything). They are different numbers. For a restaurant with Prime Cost consuming 68% of revenue, gross margin might be 32% but net margin might be 3%. The schema forces that question to be answered with a word, not left as a prose ambiguity. The answer I settled on was gross margin — because that is the number that varies meaningfully by vertical and drives collateral and ratio interpretation, while net margin is what it is after fixed costs.</p><p>That decision had to be made before the schema could be written. Without the schema, it could have stayed fuzzy through Day 5 and produced inconsistent generated borrowers. The schema surfaced the ambiguity on Day 3 instead of Week 5.</p><p>This is the right place to catch it.</p><h3>What’s next</h3><p>Day 4 is the Ittelson reading checkpoint — a mapping of which financial accounting concepts from <em>Financial Statements </em>(a book I’ve been reading alongside the build) correspond to which ontology tables. Lighter than Day 3. No code.</p><p>Day 5 is where the persona spec becomes a corpus: three borrowers instantiated end-to-end, with synthetic tax returns, bank statements, and at least one intentional discrepancy per borrower. Persona 003 is going to be interesting to generate.</p><p>If you are building evaluation infrastructure for AI systems in Finance — especially anything that needs to test against realistic document complexity rather than clean lab examples — I would like to compare notes. The gap between “works on demos” and “works on real documents” is almost always a corpus design gap, not a model capability gap.</p><p>More on Day 4 soon</p><p>— Chirag Venkateshaiah</p><p><em>AEGIS is being built in public. Source, decision log, and phased plan live at </em><a href="https://github.com/ChiragVenkateshaiah/aegis"><em>the project repository</em></a><em>.</em></p><p><em>Follow me here on Medium or on LinkedIn — I’ll be posting a Day NN entry weekly through the end of the build.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=981566ca7549" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 2 of AEGIS — What a Real Credit Memo Actually Looks Like]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/day-2-of-aegis-what-a-real-credit-memo-actually-looks-like-b2b0f873364c?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2b0f873364c</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Thu, 28 May 2026 09:26:00 GMT</pubDate>
            <atom:updated>2026-05-28T09:26:00.093Z</atom:updated>
            <content:encoded><![CDATA[<p><em>On the OCC’s 14-section structure, a schema bug I didn’t know I had, and the discipline of writing things down without acting on them.</em></p><p>Day 1 was about building the contract before any consumers existed — a Postgres ontology, twelve tables, provenance columns baked into every row. No LLM had touched a document yet.</p><p>Day 2 was simpler on the surface: read. No code. No schema changes. Just a credit analyst’s education in what a real bank credit memo is actually supposed to contain.</p><p>That reading session produced four documents, seven ontology gaps I hadn’t planned for, and one surprise that rewrote a core assumption from Day 1.</p><h3>The OCC Comptroller’s Handbook is not a suggestion</h3><p>If you’ve never worked inside a regulated US bank, the phrase “OCC guidance” might sound like background noise — a compliance thing, not an engineering thing.</p><p>It is very much an engineering thing.</p><p>The OCC (Office of the Comptroller of the Currency) supervise national banks and federal savings associations. When an OCC examiner sits down with a credit file, they are looking for specific things in a specific structure. A credit memo that is missing sections isn’t just disorganized — it is an examiner finding, which translates to a Matters Requiring Attention item, which translates to senior management remediation work.</p><p>So when I say AEGIS will generate a credit memo, I mean it will generate that can survive an OCC examination. That is the bar. It is higher than “produces a convincing-looking document.”</p><p>The canonical OCC credit memo for an SME commercial loan has fourteen sections.</p><h3>The 14 sections, and why each one exists</h3><p>I’ll give the compressed version here. The full section-by-section breakdown is in the study doc if you want the detail.</p><p><strong>Section 1 —</strong> <strong>Credit Request Summary.</strong> The executive one-pager. A credit committee member who reads nothing else reads this. Every number here must reconcile exactly to the body of the memo — discrepancies are an examiner red flag.</p><p><strong>Section 2 — Purpose of Credit and Sources/Uses. </strong>A sources-equals-uses table showing where money is coming from and where it is going. Mismatched sources/uses is one of the most common deficiencies cited in OCC examination findings.</p><p><strong>Section 3–5 — Borrower Background, Management Assessment, Industry Analysis. </strong>The qualitative third of the memo. OCC guidance identifies management quality as the single most important non-financial factor. A business with weak financials and strong management is a better risk than the reverse.</p><p><strong>Section 6 — Historical Financials Analysis. </strong>Three years of spreading: income statement, balance sheet, and ratio table. The spread is the quantitative backbone.</p><p><strong>Section 7 — Cash Flow Analysis (UCA Method). </strong>This is where it gets specific. The OCC’s preferred method is the Uniform Credit Analysis (UCA) cash flow statement, which reclassifies accounting income into four buckets: Cash After Operations, Cash After Debt Service, Cash After Dividends/Distributions, Net Cash Position. This is <em>not </em>the same as EBITA or net income. The DSCR computed from UCA cash flow is the primary sizing constraint for term debt.</p><p><strong>Section 8 — Balance Sheet and Collateral Quality Analysis. </strong>The distinction between “book” asset values and “bankable” asset values. A borrower’s balance sheet may show $500K in receivables, but if 40% are 90+ days past due, the bankable AR is closer to $300K.</p><p><strong>Section 9 — Collateral Analysis. </strong>Lien position, appraised value, advance rate, collateral coverage calculation, UCC filing status, insurance. Standard advance rates: 75–80% for owner-occupied CRE, 80% for new equipment, 50–60% for used equipment, 80% for eligible receivables.</p><p><strong>Section 10 — Guarantor Analysis. </strong>Personal guarantors are a distinct entity from the borrowing business. Each guarantor’s personal income, personal debt obligations, net worth, and liquidity feed into the global DSCR. A hollow guarantee — one from a guarantor who couldn’t actually repay if called upon — is flagged by examiners.</p><p><strong>Section 11 — Dual Risk Rating. </strong>More on this below.</p><p><strong>Section 12 — Loan Structure, Terms, and Conditions. </strong>The full term sheet: maturity, amortization, rate, fees, draw conditions, reporting requirements, cross-default clauses.</p><p><strong>Section 13 — Covenant Package. </strong>Financial covenants (minimum DSCR, maximum leverage), reporting covenants, affirmative covenants, negative covenants. Missing covenants are a standard OCC examination deficiency.</p><p><strong>Section 14 — Recommendation and Approval Authority. </strong>Documents that the correct approval authority signed off. Loans approved outside policy authority are a governance finding.</p><h3>The surprise from Section 11</h3><p>This is the thing that rewrote a Day 1 assumption.</p><p>Before Day 2, I had a vague mental model of credit risk ratings: a borrower gets a grade, something like 1 through 9. and that grade goes into the loan file. Single number. Done.</p><p>Section 11 of the OC template is titled <em>Dual Risk Rating. </em>The OCC’s Rating Credit Risk booklet makes this the expected standard for banks above $1B in assets and a best practice for all others. Two separate grades, not one:</p><ul><li><strong>BRR (Borrower Risk Rating): </strong>reflects the creditworthiness of the <em>borrower </em>independent of the loan structure. It is Probability of Default (PD) proxy. Typical scale: 1 (minimal risk) to 10 (loss).</li><li><strong>FRR (Facility Risk Rating): </strong>reflects expected loss severity on the <em>specific loan facility — </em>driven by collateral coverage, seniority, and structure. It is a Loss Given Default (LGD) proxy. It feeds the loan loss reserve (ALLL/ACL) calculation.</li></ul><p>These move independently. A borrower’s BRR can deteriorate while a well-secured facility’s FRR stays stable. The same borrower with a 7-year fully amortizing term loan secured by owner-occupied CRE gets a different FRR than they would on an unsecured revolving line.</p><p>The Day 1 ontology has on risk_rating field.</p><p>That is one field short. AEGIS’s credit memo output must emit both a BRR and an FRR — a single grade is not only insufficient, it will produce structurally wrong output when the Phase 3 risk rating logic runs.</p><p>This is exactly what the Day 2 study session was supposed to catch.</p><h3>The source access friction is real data</h3><p>Part of the Day 2 work was attempting to pull primary sources directly: OCC Comptroller’s Handbook, FDIC Risk-Management Manual, RMA Annual Statement Studies, FFIEC Commercial Bank Examination Manual.</p><p>What actually happened:</p><ul><li><strong>OCC PDFs:</strong> Binary format returned by WebFetch — not parseable as text. The handbook content in the study notes was derived from examiner knowledge, not direct extraction.</li><li><strong>FDIC Chapter 11:</strong> 403 Forbidden on the direct PDF link. Partial HTML access.</li><li><strong>RMA Annual Statement Studies: </strong>Subscription-only. No access without an RMA membership.</li><li><strong>FFIEC:</strong> Publicly accessible HTML. Usable</li></ul><p>This is not a complaint — it is a data point that will matter when AEGIS’s extraction pipeline (Phase 2) handles reference document ingestion. OCC and FDIC PDFs will need OCR preprocessing. They cannot be fed directly to simple text extraction. That constraint is now documented before it becomes a Phase 2 surprise.</p><h3>The parking lot</h3><p>When you are doing domain study for a system you are also building, there is a constant temptation to act on what you find. A gap appears in the ontology — fix it now. A new table suggests itself — design it now.</p><p>I deliberately did not do that on Day 2</p><p>The study session produced seven ontology gap observations: GAP-01 through GAP-07, covering missing tables (covenants, guarantors, sources/uses, UCA cash flow, industry benchmarks) and fields (advance rates, liquidation values). None of them are blockers for Phase 1. Acting on them now would expand scope, create schema churn, and put me ion the position of designing tables before the extraction pipeline that will populate them exists.</p><p>So they went to a parking lot: a day-02-observation.md file, logged, tagged for Phase 1 close out review, untouched.</p><p>This is actually the harder discipline. Writing something down and <em>not acting </em>on it requires believing that the log will be read, and that the log is enough. In a solo project at 10pm on a week night, the temptation is to ship the fix and declare victory. The temptation is wrong, Scope discipline now is what makes the Phase 3 build tractable later.</p><h3>What Day 2 produced</h3><p>Four artifacts:</p><ol><li>docs/study/day-02-occ-credit-memo-template.md — 14-section breakdown with evidence sources for each section</li><li>docs/study/day-02-glossary.md — 25-term domain glossary covering UCA, BRR/FRR, DSCR, ALLL/ACL, and the interagency classification ladder</li><li>docs/study/day-02-source-log.md — access log for the five sources attempted</li><li>docs/notes/day-02-observations.md — seven parked ontology gaps</li></ol><p>One schema bug identified (single risk rating field vs. dual BRR/FRR). Deferred, not acted on. Documented with a concrete fix proposal.</p><p>Building the schema for what the AI will eventually produce. You cannot prompt an LLM to generate a credit memo in the right structure if you do not know what the right structure is. This was the work of knowing.</p><h3>What’s next</h3><p>Day 3 moves to architecture: the Python package structure, the extraction pipeline design, and the first ADR on how document ingestion will work. Phase 2 code starts.</p><p>The dual risk rating gap from today will come back when Phase 3 designs the risk-rating agent. Two output fields, not one. The surprise lesson is already baked into the plan.</p><p>If you are working in AI for Finance — anywhere near SME lending, credit risk, or underwriting tooling — I’d like to hear from you. The community bank and SME-lending fintech market has specific needs that generic AI tooling is not built around. The gap is large, and it is domain knowledge, not model capability, that is the hard part.</p><p>More on Day 3 soon.</p><p><strong>— Chirag Venkateshaiah</strong></p><p><em>AEGIS is being built in public. Source, decision log, and phased plan live at </em><a href="https://github.com/ChiragVenkateshaiah/aegis"><em>the project repository</em></a><em>.</em></p><p><em>Follow me here on Medium or on LinkedIn — I’ll be posting a Day NN entry weekly through the end of the build.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2b0f873364c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 1.5 of AEGIS — The Invisible Infrastructure]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/day-1-5-of-aegis-the-invisible-infrastructure-ad730517902f?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad730517902f</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[anthropic-principle]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Wed, 20 May 2026 13:01:00 GMT</pubDate>
            <atom:updated>2026-05-20T13:01:00.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0XSgoq2jvo-1xoiHXn_XxA.png" /><figcaption>AEGIS — Project Memory, Slash Commands, and Event-driven Guardrails</figcaption></figure><p><em>On persistent context injection, PostToolUse hooks, and configuring the agentic workflow surfaces before writing a line of application logic.</em></p><h3>The day I wrote zero features</h3><p>Day 1 shipped a 13-table PostgreSQL ontology. Every column earned its place. Every provenance FK carries RESTRICT cascade so a source document can never be deleted without the evidence rows citing it raising an error first. It was deliberate, load-bearing work.</p><p>Day 1.5 produced no tables. No extraction logic. No schema migration. What is produced was a CLAUDE.md file, three slash commands, and a working PostToolUse hook.</p><p>If you are building a production system with an agentic coding assistant, that is not procrastination. It is the leverage play. The assistant’s operating environment is part of your architecture. Configuring it before writing application logic means every subsequent session starts correctly — not approximately correctly, not usually correctly. Correctly, by construction.</p><p>That is what Day 1.5 was. And this is what I built.</p><h3>The problem: conventions that live in your head</h3><p>Every LLM-assisted project accumulates conventions. In AEGIS, those conventions include things like: every fact-bearing row carries inline provenance columns; provenance FKs use RESTRICT not CASCADE ; Python is 3.11+, snake_case, plural table names; the docs/adr/ directory is append-only. These decisions are documented. They exist in ADRs, in a project spec, in a reference guide.</p><p>But every Claude Code session starts cold. The model re-derives context from whatever it can see. If you do not explicitly surfaces your conventions at session start, you are relying on the agent to rediscover them from scratch — or on yourself to paste the relevant context manually every single time.</p><p>A convention a human has to remember to inject is a bug waiting to happen.</p><p>Claude Code offers three surfaces that turn “please remember to..” into infrastructure the system cannot forget: project memory (`CLAUDE.md`), slash commands ( .claude/commands/ ), and hooks ( .claude/settings/json ). Each one moves a responsibility off human memory and into the system. Together, they form the invisible layer that makes the rest of the build tractable.</p><h3>Surface 1 — CLAUDE.md: persistent context injection</h3><p>CLAUDE.md is a file at the repo root that Claude Code automatically injects into context at the start of every session. It is not README. It is not documentation for humans. It is an operator-defined context payload specifically for the model.</p><p>Every line in CLAUDE.md costs context budget on every single turn. That constraint forces a discipline that READMEs never impose: curation, not completeness. You cannot dump everything into it. You have to decide what the agent genuinely needs to know to behave correctly without being told, and what can live in the ADRs and reference docs it can read on demand.</p><p>For AEGIS, CLAUDE.md contains:</p><ul><li>A mandatory read rule: “<em>ALWAYS read AGENT_PRIMER.md before reading anything else in this repo.” — </em>the single most important instruction, placed first.</li><li>A two-paragraph project summary covering the mission and the dual-purpose build structure.</li><li>A file map — not full documentation, just enough to orient the agent to where things live.</li><li>Conventions that apply everywhere: provenance column pattern, JSONB for evidence blobs, cascade rule.</li><li>Model selection cross-reference: Opus for planning and architectural choices, Sonnet for execution after the plan is accepted.</li><li>A “don’t touch” list: docs/reference/ is frozen, root-level .md files are Cowork-maintained, docs/adr/ entries are append-only.</li></ul><pre>## Don&#39;t touch<br><br>- `docs/reference/` — frozen reference material.<br>- Root-level `*.md` files — Cowork-maintained; Claude Code does not edit these without explicit instruction.<br>- `docs/adr/` entries — append-only; write a new ADR rather than editing an existing one.</pre><p>That last section prevents the class of failure where an agent helpfully “improves” a frozen document and the edit is not caught until it has been committed. The agent sees it at session start, before any tool call, before any user prompt. It is not a hint — it is a constraint baked into the operating context.</p><h3>Surface 2 — Slash commands: reusable agentic workflows</h3><p>Slash commands ( .claude/commands/&lt;name&gt;.md ) are operator-defined prompt expansions. When you type /aegis-plan day-02-credit-memo-template in a Claude Code session, the entire contents of aegis-plan.md become the prompt, with $ARGUMENTS replaced by the string you passed. One keystroke. No copy-pasting.</p><p>AEGIS ships three commands:</p><ul><li>/aegis-plan &lt;day-slug&gt; — reads the AGENT_PRIMER.md practice protocol and the specified chunk prompt file, then enters plan mode. This is how every new day starts: one command, full context loaded, planning mode active.</li><li>/aegis-status — prints the active phases row from PHASES.md and lists any day-prompt</li><li>/aegis-recap &lt;day-slug&gt; — It runs git log and git diff to infer what was actually built, derives most fields automatically.</li></ul><pre>---<br>description: Fill the Practice Recap at the bottom of docs/prompts/$ARGUMENTS using<br>  the AGENT_PRIMER.md §4 template.<br>argument-hint: &lt;day-slug&gt;<br>---<br><br>You are filling the Practice Recap at the bottom of `docs/prompts/$ARGUMENTS.md`.<br><br>Step 1. Read `AGENT_PRIMER.md` §4 for the exact Recap template.<br>Step 2. Read `docs/prompts/$ARGUMENTS.md` in full.<br>Step 3. Run `git log --oneline` and `git diff HEAD~1..HEAD --stat` to see what changed.<br>Step 4. Derive Date, Intended primary topic, Actually exercised, Drift check, and Cross-ref by inference — do NOT ask the user about them.<br>Step 5. Ask the operator EXACTLY ONE question — phrased verbatim as:<br>&quot;What&#39;s the single thing you didn&#39;t know at the start of this chunk that you do now?&quot;<br>Step 6. Write the completed Recap into the file.</pre><p>Two commands I deliberately did not build:</p><p>/aegis-extract and /aegis-recon . Both were listed in the early mappings as illustrative names. The extraction and reconciliation modules do not exist yet. A slash command that derives a module that does not exist is ergonomic debt, not ergonomic leverage. Build the command when you have something for it to do.</p><h3>Surface 3 — PostToolUse hooks: event-driven guardrails (the technical payoff)</h3><p>Hooks are the surfaces most developers reach for last and the one with the sharpest behavior gap in the current documentation. Understanding that gap is the most transferable thing in this post.</p><p>A PostToolUse hook fires after a specified tool completes. In AEGIS, the hook triggers whenever Claude Code’s Edit or Write tool touches a file matching data/schemas/*.sql or data/seeds/*.sql . The intended behavior: remind the agent to re-run make schema-verify against the running PostgreSQL container before declaring the edit done.</p><p>The hook lives at .claude/hooks/schema-modified.sh . Here is the part that matters.</p><p><strong>The version that seems to work but does not:</strong></p><pre>if echo &quot;$file_path&quot; | grep -qE &quot;data/(schemas|seeds)/.*\.sql$&quot;; then<br>    echo &quot;Schema or seed modified. Re-run make schema-verify before declaring done.&quot;<br>fi</pre><p>This output text to the session transcript. The human operator sees it. The model does not. The guardrail silently does nothing.</p><p><strong>The version that actually works:</strong></p><pre>if echo &quot;$file_path&quot; | grep -qE &quot;data/(schemas|seeds)/.*\.sql$&quot;; then<br>    printf &#39;{&quot;hookSpecificOutput&quot;:{&quot;hookEventName&quot;:&quot;PostToolUse&quot;,&quot;additionalContext&quot;:&quot;Schema or seed modified. Re-run make schema-verify against the aegis-pg container before declaring done.&quot;}}\n&#39;<br>fi</pre><p>The difference is the output format. PostToolUse stdout is logged to the session transcript, but it is only injected into Claude’s context if it is emitted as structured JSON containing.</p><p>hookSpecificOutput.additionalContext . A plain echo satisfies the human eye. The model never sees it.</p><p>This is not documented clearly in the current Claude Code docs. If your PostToolUse hook feels like it is doing nothing, this is why. The hook needs to speak JSON to reach the model, not human-readable text.</p><p>Once the hook outputs the correct JSON, the behavior changes materially. After editing a schema file, Claude autonomously ran make schema-verify , inspected the output, confirmed the container was healthy, and only then marked the task complete. That is the guardrail working as intended — not as a reminder to the human, but as a verified step in the agent’s own workflow.</p><h3>The pattern underneath all three</h3><p>Stand back and the three surfaces share the same instinct.</p><p>CLAUDE.md moves session context off human memory and into the system. Slash commands move repeated multi-step workflows off human memory and into reusable verbs. PostToolUse hooks move verification steps off human memory and into event-driven enforcement.</p><p>Each surface answers a different version of the same question: <em>what does the agent need to know or do here that it cannot be trusted to remember?</em></p><p>That instinct not new to AEGIS. Day 1’s ontology applied the same reasoning to data: every fact-bearing row carries its own provenance — source_document_id , page_number , confidence , extractor_model — because the alternative is trusting the downstream pipeline to remember where the number came from. It never does.</p><p>The workflow layer is the same reliability design, one level up. The provenance columns make the data trustworthy. The agentic surfaces make the development process trustworthy.</p><h3>Honest scope: What I deliberately did not build</h3><p>Infrastructure work is where over-engineering hides.</p><p>The design bar for Day 1.5 was: minimum that enforces discipline without nagging. By that standard:</p><ul><li><strong>Two hooks, not five. </strong>A pre-commit lint hook would block commits during rapid schema iteraiton — net negative in Week 1. A test coverage hook has no target until Phase 2 introduces real modules. An eval-log hook is Phase 5 work. Two hooks is correct for now.</li><li><strong>No MCP server registration yet. </strong>The aegis-ontology-mcp server is Phase 2 work, alongside the first module that needs it. No stub created.</li><li><strong>No subagent-specific hooks. </strong>The reconciliation orchestrator and its parallel subagents are Phase 3. Hooks for them land then.</li><li>No .claude/agents/ <strong>directory. </strong>No stubs. This directory appears in Phase 3 with its first agent definition.</li></ul><p>Every deferred item has a phase and a reason. None are forgotten. They are not built because the module that needs them does not exist yet.</p><h3>Forward hook -&gt; Day 2</h3><p>The invisible infrastructure is in place. Every new Claude Code session in this repo now inherits AEGIS conventions automatically. Chunk launches are one keystroke. Schema discipline is enforced by the toolchain, not by memory.</p><p>Day 2 is domain immersion: studying the OCC’s Comptroller’s Handbook guidance on credit memo structure. The ontology was designed contract-first — I decided what the data model should look like before reading the regulator’s template in detail. Day 2 is where I find out whether that bet was right.</p><p>The infrastructure was the setup.</p><p><em>AEGIS is being built in public. The repo is at </em><a href="https://github.com/ChiragVenkateshaiah/aegis"><em>github.com/ChiragVenkateshaiah/aegis</em></a><em>. Day 1 post: “Reviving a Name, Rebuilding the Mission.”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad730517902f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 1 of a AEGIS — Reviving a Name, Rebuilding the Mission]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/day-1-of-a-aegis-reviving-a-name-rebuilding-the-mission-50f7b5f3a093?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/50f7b5f3a093</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Mon, 18 May 2026 11:44:40 GMT</pubDate>
            <atom:updated>2026-05-18T11:44:40.662Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6E22IfIQCphdeWLPWhwjNQ.jpeg" /><figcaption>An AI Credit memo co-pilot for SME lending</figcaption></figure><p>On carrying a project name forward, contract-first ontology design, and what 4.5 years in FinTech taught me about cross-document reconciliation.</p><p>A credit analyst at a $20B community bank opens a fresh SME loan application. A small services business is asking for $400,000. On her desk: a business tax return, six months of bank statements, a handful of supporting docs. By the end of the day, she will have produced a credit memo: a structured narrative explaining, with citations, why the bank should or should not extend the loan.</p><p>That memo will take her about six hours.</p><p>Most of those hours will not be spent on judgement. They will be spent on reconciliation — cross-checking that the revenue line on the tax return is consistent with deposits in the bank statements, that declared owner draws match the cash actually withdrawn, that the debt service the borrower claims matches the loan obligations actually visible across documents. The judgement work — the part of the job that requires an experienced underwriter — sits underneath about five hours of careful, mechanical arithmetic.</p><p>I am building AEGIS to compress that six hours into about eight minutes, without taking the analyst’s judgement out of the loop.</p><p>This is Day 1.</p><h3>Why the name AEGIS — again</h3><p>If you have followed my work, you may recognize the name. The first AEGIS, a project I built earlier, was a multi-region transaction system — an exercise in keeping money flows consistent across geographies, networks, and failures modes. That project taught me a lot about distributed correctness. It also gave me a name I liked, and a name I never properly retired.</p><p>In Greek mythology, the aegis is the shield carried by Zeus, lent to Athena and Apollo, traditionally invoked as a symbol of <em>protection over what matters. </em>The first AEGIS protected the <em>flow of money</em> — transactions in motion. This AEGIS protects the judgement applied to money — decisions about whether to lend, to whom, and on what terms. Different surface area, same north star: shield financial systems from preventable bad outcomes.</p><p>I considered starting fresh with a new name. I decided against it for three reasons:</p><ol><li><strong>Project names should compound, not multiply. </strong>If I am building a portfolio that argues “<em>this engineer returns to first principles”, </em>the name continuity makes that argument better than a fresh name would. The reader sees a builder who refines, not one who churns.</li><li><strong>The mission is honestly the same. </strong>The previous AEGIS was about correctness under distributed conditions. This AEGIS is about correctness under document-level adversity (messy PDFs, partial information, internally inconsistent borrower data). Both are <em>correctness projects. </em>The shield metaphor holds.</li><li><strong>I was not done with the name.</strong> <strong>T</strong>he first AEGIS was learning project. It taught me how I think about reliability. Carrying the name forward into a project where reliability is a <em>load-bearing customer feature — </em>not a hobbyist concern — feels right.</li></ol><p>So: AEGIS continues. New form. Same shield.</p><h3>What is AEGIS is, in one sentence</h3><p><strong>AEGIS is an AI credit memo / underwriting co-pilot for SME lending. </strong>The 60-second demo is the forcing function for v1:</p><p>A credit analyst at a $20B community bank receives an SME loan application. She drag-and-drops two PDFs — a business tax return and six months of bank statements — into AEGIS. The ontology populates live. She sees a pre-populated credit memo with every claim citing back to specific PDF pages. Three exception flags are highlighted, including “<em>Reported revenue $2.4M, bank deposits suggest $1.7M — flag for review.”</em> She clicks the flag, sees the discrepancy with source pages highlighted, makes one edit, approves, and sends to committee. Eight minutes elapsed vs. six hours traditionally.</p><p>That is the demo I am building toward over eight weeks of evenings and weekends.</p><h3>Day 1: a contract before any consumers</h3><p>The first instinct on a project like this is to start with the LLM-shaped problem: pull a tax return PDF into Claude, get a JSON back, look at it, smile, move on.</p><p>I deliberately did not do that on Day 1.</p><p>Every later component of AEGIS — extraction, reconciliation, ratio computation, memo generation — will produce or consume <em>structured facts about a borrower. </em>If those facts do not have a clean shape, every downstream component will invent its own private shape, and the project will collapse into a knot of dictionary keys passed between modules. The reconciliation engine cannot ask “<em>is the tax return’s revenue consistent with the bank statement’s deposits?” </em>unless there is a single answer to “<em>what is a revenue line item, and where did it come from?”</em></p><p>So Day 1 was contract-first ontology design. The output is a PostgreSQL schema and the decisions behind it.</p><h3>The 12 entities</h3><p>The v1 ontology has twelve core tables:</p><pre>borrower            — the legal applicant<br>entity              — the operating business (a borrower can have ≥1)<br>financial_period    — a quarter, year, or arbitrary span<br>document            — abstract source PDF<br>tax_return          — a 1120 / 1120S / 1065 (extends document)<br>bank_statement      — a monthly statement (extends document)<br>line_item           — an extracted financial fact (revenue, expense, deposit, …)<br>ratio               — DSCR, current ratio, debt service, working capital, owner DTI<br>reconciliation      — a cross-document check instance<br>exception_flag      — a surfaced inconsistency or threshold breach<br>memo                — the generated credit memo<br>memo_citation       — claim → source page/bbox linkage</pre><p>These are not arbitrary. They came directly from sitting with the question “<em>what does an underwriter actually look at on their desk?” — </em>a question my prior years in FinTech had already half-answered for me.</p><h3>Provenance is not an afterthought</h3><p>The most important Day 1 decision is invisible from the entity list above:every fact-bearing row in AEGIS carries <strong>provenance columns.</strong></p><pre>source_document_id   uuid<br>page_number          int        (1-indexed)<br>bounding_box         jsonb      (optional)<br>extractor_model      text<br>extractor_version    text<br>confidence           numeric    (0–1)<br>raw_blob             jsonb      (raw extracted blob for re-derivation)</pre><p>This is the part most credit-AI demos quietly skip. They extract a number, drop it into a memo, and hope no one asks where it came from. That works on the demo stage. It does not work in front of a regulator, an internal audit team, or — most importantly — a senior underwriter who learned early in her career to never trust an unsourced number.</p><p>If a credit memo claims “<em>trailing-12-month revenue is $2.4M,” </em>AEGIS must be able to point to the exact page of the exact document the claim came from, the model that extracted it, and the confidence the system had at the time. That is not optional. It is the substance of every other feature, including the differentiator I will describe in a moment.</p><h3>The inheritance decision</h3><p>A small but real architectural call: should tax_return and bank_statement inherit from document via <em>single-table inheritance </em>(one documents table with a kind discriminator) or <em>table-per-subtype (</em>separate tax_returns and bank_statements tables sharing a foreign key to documents )?</p><p>I went with table-per-subtype. The reasoning is in the ADR, but the short version: a 1120 tax return has roughly thirty fields worth modeling as columns; a monthly bank statement has none of those fields (it has transactions, which are their own table). Forcing both into one wide table would either explode the column count or push everything into JSONB, which defeats the purpose of having a relational ontology in the first place.</p><p>This is the kind of decision that costs nothing to get right on Day 1 and several weeks of refactoring to fix in Week 5.</p><h3>The differentiator, and why the BA background matters</h3><p>Most AI underwriting demos do roughly one thing well: they read documents and summarize. That work is increasingly commoditized. Six months from now, <em>“my product reads tax returns”</em> will be a yawn.</p><p>The thing AEGIS is built around — the moment in the demo where a hiring manager sits up — is <strong>cross-document reconciliation</strong>. Three checks in v1:</p><ol><li><strong>Tax return revenue vs. bank deposits.</strong> If a borrower’s 1120S declares $2.4M in revenue but six months of bank statements show $850K in deposits (annualized to ~$1.7M), AEGIS flags that. Could be legitimate (cash-heavy business, retained earnings, non-bank settlement). Could be a problem. The analyst decides.</li><li><strong>Declared owner draws vs. actual bank withdrawals.</strong> A common SME pattern: the tax return shows modest owner compensation, but the operating account shows recurring large outflows to the owner’s personal account. Material when underwriting a loan that depends on the borrower’s discipline.</li><li><strong>Debt-to-income consistency.</strong> The borrower’s stated obligations should be visible — and only those obligations should be visible — across the documents.</li></ol><p>I did not derive these checks from a textbook. I derived them from watching how underwriters actually work, in conversations across 4.5 years of business-analysis work in FinTech. Cross-document inconsistency is the single most common form of “interesting” that an experienced underwriter spends time on. The AI tools currently on the market mostly do not solve for it because the people building them are coming from the <em>document</em> side (extraction) rather than the <em>underwriting</em> side (judgment).</p><p>The schema I described above was designed to make those checks easy to express. The reconciliation table is a first-class entity. Each reconciliation produces an exception_flag with severity, status, and citations back to the line items it disagreed about. None of that is bolted on. It was there in the contract on Day 1.</p><p>This is the half of the project that benefits most directly from a Business Analyst’s eye for <em>what is actually being asked of the system</em> — and from years spent in FinTech understanding what the back-office of a lender feels like at 5pm on a Friday.</p><h3>What’s next</h3><p>Day 2 is the OCC credit memo template study — a reading-and-note-taking exercise, no code. The output is a structured understanding of what a v1 memo must contain and which citation patterns are conventional in regulated underwriting. That document will become the skeleton for the memo generator in Phase 4.</p><p>The thing I am most excited to build, the reconciliation orchestrator with parallel subagents that runs the three checks above, is Phase 3, weeks four and five. I will be writing about that one too.</p><p>If you are working in AI for finance — especially anywhere near SME lending, underwriting, or credit risk — I would love to compare notes. The corner of the market I am building toward (US community banks, $5B–$50B AUM, plus US/UK SME-lending fintechs) is large, under-served by current tooling, and full of analysts who would give back a third of their week for a tool that did the boring four-fifths of memo prep correctly.</p><p>More on Day 2 soon.</p><p>— Chirag Venkateshaiah</p><p><em>Aegis is being built in public. Source, decision log, and phased plan live at </em><a href="https://github.com/ChiragVenkateshaiah/aegis"><em>the project repository</em></a><em> .</em></p><p><em>If this resonated, follow me here on Medium or on LinkedIn — I’ll be posting a Day NN entry weekly through the end of the build.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50f7b5f3a093" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Engineering AEGIS: Designing a FinTech Platform Through Architecture RFCs]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/engineering-aegis-designing-a-fintech-platform-through-architecture-rfcs-f07b15c35ff4?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/f07b15c35ff4</guid>
            <category><![CDATA[cloud-infrastructure]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 14:56:00 GMT</pubDate>
            <atom:updated>2026-03-25T14:56:00.210Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wi6AaZZnHefsZ7H-Xw3QOA.png" /><figcaption>AEGIS FinTech Platform Architecture</figcaption></figure><p>AEGIS — Part 4: Using RFCs to Design a Distributed FinTech Platform</p><p><em>Chirag Venkateshaiah</em><br><em>Engineering AEGIS Series</em></p><h3>Engineering AEGIS Series</h3><p>Part 1 — Engineering Environment Setup<br> Part 2 — Repository Architecture<br> Part 3 — FinTech Platform System Design<br> <strong>Part 4 — Architecture Design Using RFCs (current article)</strong><br> Part 5 — Multi-Region Infrastructure<br> Part 6 — Observability and Failure Simulation</p><h3>From Infrastructure Project to Architecture Governance</h3><p>In the previous articles of this series, I began building <strong>AEGIS</strong>, a hands-on engineering project exploring how modern cloud platforms are designed and operated.</p><p>The project started with:</p><ul><li>setting up a professional cloud engineering environment</li><li>organizing a large repository structure</li><li>defining a realistic <strong>FinTech platform use case</strong></li></ul><p>At this stage, the project had an important challenge.</p><p>The architecture of the system needed to be designed <strong>before any infrastructure or service code was written.</strong></p><p>In real engineering organizations, major architectural decisions are rarely implemented immediately. Instead, they are proposed, discussed, refined, and accepted through structured documentation.</p><p>One common approach used by engineering teams is the <strong>RFC process.</strong></p><h3>What Is an RFC in Engineering?</h3><p>RFC stands for <strong>Request for Comments.</strong></p><p>The RFC process is used by engineering teams to document and evolve system architecture decisions in a structured and collaborative way.</p><p>Rather than implementing architecture directly in code, engineers propose design ideas through documents that describe:</p><ul><li>the architectural problem</li><li>the proposed solution</li><li>alternative designs</li><li>the consequences of the decision</li></ul><p>This approach allows architecture to evolve through discussion and review before it becomes part of the system.</p><p>The process originated in early internet engineering and continues to be widely used in large technology organizations.</p><h3>Why Use RFCs in AEGIS?</h3><p>One of the goals of the AEGIS project is to simulate how <strong>real infrastructure and platform engineering teams design systems.</strong></p><p>Instead of jumping directly into writing code, the platform architecture is first defined using RFC documents.</p><p>This approach provides several benefits.</p><h4>Architecture Becomes Explicit</h4><p>Every major design decision is documented clearly rather than hidden inside implementation details.</p><h4>Engineering Decisions Become Traceable</h4><p>Architectural changes can be tracked through Git history, issues, and pull requests.</p><h4>The System Evolves Through Structured Design</h4><p>Instead of chaotic experimentation, the platform evolves through deliberate design iterations.</p><p>This process mirrors how complex systems are designed in real engineering organizations.</p><h3>The AEGIS Architecture RFC Repository Structure</h3><p>The repository contains a dedicated documentation structure for architecture design.</p><pre>docs<br> └ architecture<br>     └ rfc<br>         └ rfc-drafts<br>             ├ architecture-foundation<br>             ├ reliability-engineering<br>             ├ scalability-design<br>             └ maintainability-observability</pre><p>Each group of RFCs represents a major engineering concern.</p><h4>Architecture Foundation</h4><p>Defines the fundamental platform architecture.</p><p>Examples:</p><ul><li>distributed platform architecture</li><li>event-driven processing model</li><li>service architecture</li></ul><h4>Reliability Engineering</h4><p>Defines how the platform handles failure scenarios.</p><p>Examples:</p><ul><li>failure handling strategies</li><li>idempotency guarantees</li><li>data consistency models</li></ul><h4>Scalability Design</h4><p>Explores how the system grows under load.</p><p>Examples:</p><ul><li>worker scaling strategies</li><li>database scaling approaches</li></ul><h4>Maintainability and Observability</h4><p>Defines the operational visibility of the platform.</p><p>Examples:</p><ul><li>metrics architecture</li><li>distributed tracing</li></ul><p>This structure reflects the major concerns of <strong>large-scale distributed systems engineering.</strong></p><h3>The Engineering Workflow Behind the RFCs</h3><p>Each RFC in the AEGIS project follows a structured engineering workflow.</p><ol><li>Create a GitHub Issue describing the architectural problem.</li><li>Create a feature branch dedicated to the RFC.</li><li>Draft the RFC document inside the architecture documentation directory.</li><li>Refine the document through commits.</li><li>Open a <strong>Pull Request </strong>linking the work to the issue.</li><li>Review and finalize the document.</li><li>Mark the RFC as <strong>Accepted</strong> once the architecture decisions is finalized.</li></ol><p>This process ensures that every architectural decision in the system is traceable through:</p><ul><li>Git commits</li><li>GitHub issues</li><li>Pull requests</li><li>documentation history</li></ul><p>This is a common workflow used by engineering teams designing complex systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wi6AaZZnHefsZ7H-Xw3QOA.png" /><figcaption>High-Level Platform Architecture</figcaption></figure><h3>RFC-001: Distributed Platform Architecture</h3><p>The first RFC establishes the <strong>foundational architecture of the AEGIS platform.</strong></p><p>The goal of this document is to answer a fundamental question:</p><p><strong>What type of system architecture should power the FinTech platform?</strong></p><p>Financial transaction systems must satisfy several strict requirements.</p><ul><li>high reliability</li><li>strong data integrity</li><li>fault tolerance</li><li>scalability</li><li>observability</li></ul><p>Because of these requirements, the architecture chosen for AEGIS is <strong>a distributed event-driven system.</strong></p><p>In this model, the platform is composed of independent services communicating through asynchronous events.</p><p>At a high level, the architecture contains several core components:</p><ul><li>API gateway</li><li>transaction service</li><li>event queue</li><li>worker services</li><li>ledger database</li></ul><p>The architecture can be visualized as a distributed pipeline.</p><pre>Client<br>  │<br>  ▼<br>API Gateway<br>  │<br>  ▼<br>Transaction Service<br>  │<br>  ▼<br>Event Queue<br>  │<br>  ▼<br>Worker Services<br>  │<br>  ▼<br>Ledger Database</pre><p>Each component in the pipeline has a clear responsibility.</p><h4>API Gateway</h4><p>Handles external requests, authentication, and request validation.</p><h4>Transaction Service</h4><p>Validates transactions and converts them into internal system events.</p><h4>Event Queue</h4><p>Acts as a buffer between services and enables asynchronous communication.</p><h4>Worker Services</h4><p>Process transaction events and apply updates to the financial ledger.</p><h4>Ledger Database</h4><p>Stores the authoritative financial state of the system.</p><p>By separating these responsibilities, the system achieves several important properties:</p><ul><li>independent scaling of services</li><li>fault isolation between components</li><li>asynchronous transaction processing</li><li>improved system resilience</li></ul><p>This architectural foundation becomes the basis for all future platform design decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cR6hk0xk2FRD_0sGHyR_OQ.png" /><figcaption>Runtime behavior of the system</figcaption></figure><h3>RFC-002: Event-Driven Processing Model</h3><p>Once the high-level architecture is defined, the next challenge is understanding <strong>how the system processes events internally.</strong></p><p>This is the focus of RFC-002.</p><p>The event-driven processing model describes how financial transactions move through the distributed system.</p><p>The lifecycle of a transaction event follows several stages.</p><ol><li>A client submits a transaction request to the API.</li><li>The transaction service validates the request.</li><li>A transaction event is published to the event queue.</li><li>Worker services consume the event.</li><li>The ledger database is updated with the transaction result.</li></ol><p>This workflow can be visualized as a sequence of asynchronous operations.</p><pre>Client → API Gateway → Transaction Service<br>             │<br>             ▼<br>        Event Queue<br>             │<br>             ▼<br>        Worker Service<br>             │<br>             ▼<br>        Ledger Database</pre><p>Separating transaction ingestion from transaction processing provides several advantages.</p><h4>Load Buffering</h4><p>The queue absorbs traffic spikes and prevents overload of processing services.</p><h4>Independent Scaling</h4><p>Worker services can scale horizontally to process more transactions.</p><h4>Failure Isolation</h4><p>If a worker fails, the transaction event remains in the queue and can be retried.</p><h3>Reliability Considerations</h3><p>Financials systems must be designed with reliability in mind.</p><p>The event processing model includes several mechanisms to ensure correctness.</p><h4>Idempotency</h4><p>Workers must ensure that the same transaction event cannot update the ledger more than once.</p><p>This prevents duplicate financial operations if events are retried.</p><h4>Retry Strategies</h4><p>Temporary failures such as network errors or database timeouts should not cause transaction loss.</p><p>Events can be retried automatically until processing succeeds.</p><h4>Dead Letter Queues</h4><p>Events that repeatedly fail processing are moved to a dead-letter queue for investigation.</p><p>This prevents problematic events from blocking the processing pipeline.</p><h3>Why This Workflow Reflects Senior Engineering Thinking</h3><p>Using RFCs to design the AEGIS platform demonstrates a different approach compared to many demonstration projects.</p><p>Instead of focusing only on implementation, the project prioritizes <strong>engineering process and architecture governance.</strong></p><p>Several characteristics make this approach closer to real production engineering.</p><h4>Architecture Before Implementation</h4><p>The system architecture is defined and documented before infrastructure or application code is written.</p><h4>Explicit Design Decisions</h4><p>Major engineering decisions are captured in documents rather than informal assumptions.</p><h4>Traceable Development Workflow</h4><p>Every architectural change is linked to issues, commits, and pull requests.</p><h4>Structured Evolution of the System</h4><p>The platform grows through deliberate design iterations rather than ad-hoc development.</p><p>These practices are commonly used in large organizations where system complexity requires strong architectural discipline.</p><h3>Why This Matters for Platform Engineering</h3><p>Modern infrastructure engineers rarely build systems in isolation.</p><p>They operate within complex distributed platforms where architecture decisions affect reliability, scalability, and operational visibility.</p><p>Understanding how architecture evolves through documentation and review is an important part of engineering mature systems.</p><p>The AEGIS project attempts to simulate this environment on a smaller scale.</p><p>Instead of being just a coding exercise, the project becomes a <strong>system design case study exploring how infrastructure platforms evolve.</strong></p><h3>What Comes Next</h3><p>With the foundational architecture now defined through RFC-001 and RFC-002, the next steps of the AEGIS project will explore deeper platform concerns.</p><p>Future topics include:</p><ul><li>service boundary design</li><li>infrastructure deployment architecture</li><li>multi-region reliability strategies</li><li>observability systems</li><li>failure simulation experiments</li></ul><p>Each of these areas will be explored through additional RFC documents.</p><h3>Final Thoughts</h3><p>Large distributed systems rarely emerge from a single design decision.</p><p>They evolve through a continuous process of:</p><ul><li>architecture design</li><li>documentation</li><li>experimentation</li><li>refinement</li></ul><p>By designing the AEGIS platform through RFCs, the project becomes more than a demonstration repository.</p><p>It becomes a structured exploration of how real platforms are engineered.</p><p>And in doing so, it highlights an important lesson in system design:</p><p><strong>Great systems are not only built with code — they are built with careful architectural thinking.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f07b15c35ff4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Engineering AEGIS: Designing a FinTech Platform as a System Design Case Study]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/engineering-aegis-designing-a-fintech-platform-as-a-system-design-case-study-bf1d886571db?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf1d886571db</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 15:26:29 GMT</pubDate>
            <atom:updated>2026-03-12T15:44:27.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjVToOOsTb3H_EyL_tt-zg.png" /><figcaption>High-Level AEGIS FinTech Platform Architecture</figcaption></figure><p>AEGIS — Part 3: From Infrastructure Project to FinTech System Design</p><p><em>Chirag Venkateshaiah</em><br><em>Engineering AEGIS Series</em></p><h3>Engineering AEGIS Series</h3><p>Part 1 — Environment Setup<br> Part 2 — Repository Architecture<br> <strong>Part 3 — FinTech Platform System Design (current article)</strong><br> Part 4 — Multi-Region Infrastructure<br> Part 5 — Infrastructure as Code<br> Part 6 — Observability &amp; Failure Simulation</p><h3>Connecting the Journey So Far</h3><p>In the previous articles of this series, I began building <strong>AEGIS, </strong>a hands-on engineering project designed to explore how modern cloud infrastructure platforms are designed and operated.</p><p>The goal of AEGIS has always been different from typical demo project.</p><p>Instead of building a simple application, the objective is to <strong>study how reliable cloud platforms are engineered from the ground up.</strong></p><p>So far, the journey has focused on establishing the engineering foundations required before building any distributed system.</p><h4><strong>Part 1 — Engineering Environment</strong></h4><p>In this first article, I built <strong>a professional cloud engineering environment</strong> including:</p><ul><li>WSL2 Linux development environment</li><li>AWS CLI configuration</li><li>Go for distribution services</li><li>Git-based version control workflow</li></ul><p>This environment simulates the <strong>tooling commonly used by infrastructure engineers working on real cloud platforms.</strong></p><h4>Part 2 — Repository Architecture</h4><p>In the second article, I designed the <strong>repository structure of the AEGIS platform</strong></p><p>Before writing any infrastructure code, the platform repository was structured to separate key concerns:</p><ul><li>infrastructure</li><li>services</li><li>observability</li><li>simulations</li><li>architecture documentation</li></ul><p>This approach mirrors how real engineering teams organize large infrastructure projects.</p><p>Instead of writing code immediately, the focus was on building <strong>engineering discipline and project structure first.</strong></p><h4>The Missing Piece: A Real System to Design</h4><p>At this stage, an important question naturally emerges:</p><p><strong>What system should this platform actually support?</strong></p><p>Infrastructure engineering becomes meaningful when it powers a<strong> real-world system with real operational constraints.</strong></p><p>Modern distributed platforms exist to support complex applications such as:</p><ul><li>e-commerce systems</li><li>social media platforms</li><li>large-scale data pipelines</li><li>financial platforms</li></ul><p>For the AEGIS project, I decided to design a <strong>FinTech transaction platform</strong> as the primary system use case.</p><h4>Why FinTech?</h4><p>Financial platforms are some of the most demanding systems in software engineering.</p><p>They require extremely high standards for:</p><ul><li>reliability</li><li>data integrity</li><li>observability</li><li>fault tolerance</li><li>system consistency</li></ul><p>Unlike many applications where temporary failure may be tolerable, <strong>financial systems must maintain strict correctness.</strong></p><p>Examples include:</p><ul><li>payment processing systems</li><li>banking transaction systems</li><li>digital wallet platforms</li><li>trading platforms</li></ul><p>Even small infrastructure failures can lead to serious consequences.</p><p>Because of this, FinTech platforms provide an excellent case study for understanding <strong>how strong backend infrastructure supports mission-critical systems.</strong></p><h3>AEGIS Is Now More Than a Project</h3><p>Initially, AEGIS began as a <strong>cloud infrastructure simulation project.</strong></p><p>However, as the design evolved, it became clear that the platform could represent something more interesting.</p><p>AEGIS is now evolving into:</p><h4><strong>A System Design Case Study</strong></h4><p>The project will simulate how a <strong>modern FinTech platform</strong> might be architected using cloud infrastructure.</p><p>The objective is to explore questions such as:</p><ul><li>How are financial transactions processed reliably?</li><li>How are distributed services coordinated?</li><li>How do platforms detect and recover from failures?</li><li>How do infrastructure systems maintain observability?</li></ul><p>By building the infrastructure around a FinTech system, the project becomes a <strong>practical exploration of infrastructure engineering and distributed systems.</strong></p><h3>The FinTech Platform Vision</h3><p>The simulated platform within AEGIS will represent a simplified <strong>digital payments processing system.</strong></p><p>The system will model the backend infrastructure responsible for handling financial transactions between users.</p><p>At a high level, the platform will support:</p><ul><li>transaction submission</li><li>transaction processing</li><li>account ledger updates</li><li>transaction status tracking</li><li>system observability</li></ul><p>This allows the project to simulate realistic backend workflows commonly seen in financial systems.</p><h4>Core Platform Capabilities</h4><p>The FinTech system inside AEGIS will include several core components.</p><h4><strong>1 — Payment API</strong></h4><p>The <strong>Payment API</strong> acts as the entry point for external clients.</p><p>Clients submit transaction requests such as:</p><pre>Transfer $100 from Account A to Account B</pre><p>The API validates incoming requests and forwards them into the internal processing pipeline.</p><p>Responsibilities include:</p><ul><li>request validation</li><li>authentication</li><li>rate limiting</li><li>request logging</li></ul><p>The API layer is typically stateless and horizontally scalable.</p><h4>2 — Transaction Processor</h4><p>The <strong>Transaction Processor</strong> is responsible for handling transaction workflows.</p><p>This component ensures that transactions move through a well-defined lifecycle.</p><p>Example stages include:</p><ol><li>Transaction received</li><li>Transaction validated</li><li>Transaction queued</li><li>Transaction processed</li><li>Ledger updated</li><li>Transaction completed</li></ol><p>Processing must be carefully designed to avoid issues such as:</p><ul><li>duplicate transactions</li><li>inconsistent state</li><li>partial failures</li></ul><h4>3 — Ledger System</h4><p>The <strong>Ledger System</strong> is the most critical component of any financial platform.</p><p>A ledger records all financial transactions in a consistent and auditable format.</p><p>Important characteristics include:</p><ul><li>append-only transaction records</li><li>strong consistency</li><li>auditability</li><li>data integrity</li></ul><p>The ledger ensures that account balances remain correct even if parts of the system fail.</p><h4>4 — Observability Stack</h4><p>Modern infrastructure systems must be observable.</p><p>The AEGIS platform will include an observability layer that captures:</p><ul><li>system metrics</li><li>service logs</li><li>transaction tracing</li><li>failure alerts</li></ul><p>This allows engineers to understand how the platform behaves under normal and failure conditions.</p><p>Observability becomes especially important when testing failure simulations.</p><h3>High-Level Platform Architecture</h3><p>The AEGIS FinTech system can be viewed as several layers working together.</p><pre>Clients<br>   │<br>   ▼<br>Payment API<br>   │<br>   ▼<br>Transaction Processor<br>   │<br>   ▼<br>Ledger System<br>   │<br>   ▼<br>Observability + Monitoring</pre><p>Each layer represents a different responsibility within the platform.</p><p>Separating responsibilities improves:</p><ul><li>scalability</li><li>reliability</li><li>system maintainability</li></ul><p>This layered architecture is commonly used in financial transaction platforms.</p><h3>Why Infrastructure Engineering Matters</h3><p>One of the key insights behind this project is that <strong>strong backend systems are built on strong infrastructure design.</strong></p><p>Reliable platforms do not happen by accident.</p><p>They emerge from careful engineering decisions such as:</p><ul><li>distributed architecture</li><li>failure handling strategies</li><li>infrastructure automation</li><li>observability tooling</li><li>controlled system complexity</li></ul><p>By designing the infrastructure alongside the application architecture, we gain a deeper understanding of how real platforms operate.</p><h3>How AEGIS Will Simulate Real Infrastructure</h3><p>To explore these ideas practically, the AEGIS platform will simulate several infrastructure capabilities.</p><h4>Multi-Region Deployment</h4><p>The platform will be deployed across multiple AWS regions to simulate:</p><ul><li>region traffic routing</li><li>failover strategies</li><li>redundancy</li></ul><h4>Distributed Worker Systems</h4><p>Transaction processing will be handled by distributed worker services written in Go.</p><p>This allows the system to simulate:</p><ul><li>asynchronous processing</li><li>queue-based workloads</li><li>worker failures</li></ul><h4>Failure Simulation</h4><p>One of the most interesting parts of the project will be <strong>intentional failure testing.</strong></p><p>Simulated failures may include:</p><ul><li>service crashes</li><li>worker node failures</li><li>network latency</li><li>regional outrages</li></ul><p>Observing how the system reacts to failure is a key learning objective.</p><h4>Observability and Monitoring</h4><p>The platform will incorporate monitoring tools to track:</p><ul><li>system performance</li><li>transaction throughput</li><li>error rates</li><li>infrastructure health</li></ul><p>This mirrors how real infrastructure teams maintain visibility into production systems.</p><h3>AEGIS as a Learning Platform</h3><p>Through this FinTech case study, AEGIS aims to explore multiple areas of modern engineering.</p><p>These include:</p><ul><li>cloud infrastructure design</li><li>distributed system architecture</li><li>platfrom reliability engineering</li><li>observability practices</li><li>failure analysis</li></ul><p>Rather than focusing on a single technology, the project examines <strong>how multiple systems interact to form a reliable platform.</strong></p><h3>What Comes Next</h3><p>With the FinTech platform vision now defined, the next step is to begin designing the <strong>actual infrastructure architecture</strong> that will support this system.</p><p>Upcoming topics in this series include:</p><ul><li>multi-region architecture design</li><li>infrastructure components for the platforms</li><li>traffic routing strategies</li><li>distributed worker architecture</li><li>observability stack implementation</li></ul><p>These architectural decisions will guide how the AEGIS platform is built in the next stages of the project.</p><h3>Final Thoughts</h3><p>One of the lessons emerging from this project is that <strong>great systems are rarely built in a straight line.</strong></p><p>They evolve through:</p><ul><li>architecture design</li><li>infrastructure planning</li><li>iterative experimentation</li></ul><p>One of the lessons emerging from this project is that <strong>great systems are rarely built in a straight line.</strong></p><p>They evolve through:</p><ul><li>architecture design</li><li>infrastructure planning</li><li>iterative experimentation</li></ul><p>AEGIS started as a simple infrastructure experiment.</p><p>But it is gradually evolving into something more interesting:</p><p><strong>A system design case study exploring how reliable platforms are engineered.</strong></p><p>By building the platform step by step, the project becomes a practical way to study how modern infrastructure powers complex systems.</p><p>If you are interested in:</p><ul><li>cloud infrastructure</li><li>distributed systems</li><li>platform engineering</li><li>system design</li></ul><p>feel free to follow along as the AEGIS platform continues to evolve.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf1d886571db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building the Foundation of a Cloud Platform Repository]]></title>
            <link>https://medium.com/@chiragvenkateshaiah95/building-the-foundation-of-a-cloud-platform-repository-ec769758d5c3?source=rss-329fb9082f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec769758d5c3</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Chirag Venkateshaiah]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 07:44:44 GMT</pubDate>
            <atom:updated>2026-03-07T15:12:38.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mtl8DhLHR0UW8lxLRhnCNA.png" /><figcaption>“Before writing any infrastructure code, I designed the repository structure to reflect how a real cloud platform evolves.”</figcaption></figure><h3>Engineering AEGIS: Building the Foundation of a Cloud Platform Repository</h3><h4>AEGIS — Part 2: Repository Structure and Engineering Discipline</h4><p>In the previous article, I introduced AEGIS, a personal project where I explore how modern cloud platforms are designed and operated.</p><p>The goal of AEGIS is not just to deploy cloud resources, but to simulate how <strong>real distributed infrastructure platforms are designed</strong>, including architecture decisions, infrastructure automation, observability, and failure simulations.</p><p>Before writing any Terraform or deploying infrastructure, I began with something that many beginners overlook:</p><p><strong>Designing the repository structure first.</strong></p><p>This article explains:</p><ul><li>Why experienced engineers structure repositories before writing code</li><li>How the AEGIS repository foundation was designed</li><li>Security considerations when working with cloud infrastructure</li><li>How this preparation enables the next stages of the project</li></ul><h3>Why Engineers Structure Repositories Before Writing Code</h3><p>When building real infrastructure systems, the code is only one part of the project.</p><p>Large engineering teams must think about:</p><ul><li>Maintainability</li><li>Collaboration</li><li>Security</li><li>Scalability of the project itself</li></ul><p>A poorly structured repository quickly becomes difficult to maintain as the system grows.</p><p>Experienced engineers typically design the repository structure <strong>before writing implementation code.</strong></p><p>This allows them to:</p><ul><li>Separate concerns clearly</li><li>Organize infrastructure, services, and documentation</li><li>Make the project easier to navigate for future contributors</li></ul><p>This approach is common in engineering teams building cloud platforms and distributed systems.</p><p>For AEGIS, I wanted the repository to reflect the structure of a <strong>real infrastructure platform project</strong>, not just a collection of scripts.</p><h3>Designing the AEGIS Repository Structure</h3><p>Before writing infrastructure code, I created the core repository layout.</p><pre>aegis-multiregion-platform <br>│ <br>├── architecture <br>├── blog <br>├── docs <br>├── infra <br>├── observability <br>├── services <br>├── simulations <br>└── README.md</pre><p>Each directory represents a different layer of the platform.</p><h4><strong>architecture</strong></h4><p>This directory contains architecture diagrams and system design documents</p><p>When building distributed systems, the architecture should always be defined before implementation.</p><h4><strong>docs</strong></h4><p>The documentation directory captures design decisions and platform vision.</p><p>Example include:</p><ul><li>System design explanations</li><li>Architecture reasoning</li><li>Future platform plans</li></ul><p>Good documentation helps communicate <strong>why decisions were made,</strong> not just what was implemented.</p><h4><strong>infra</strong></h4><p>This directory will contain Terraform infrastructure code used to provision cloud resources.</p><p>Keeping infrastructure isolated makes it easier to manage infrastructure changes independently from application services.</p><h4><strong>services</strong></h4><p>This directory will later contain the platform services that simulate a distributed workload.</p><p>Examples might include:</p><ul><li>schedulers</li><li>workers</li><li>queue consumers</li></ul><p>These services help demonstrate real distributed system behavior.</p><h4><strong>observability</strong></h4><p>Modern platforms rely heavily on observability.</p><p>This directory will contain configurations and tooling related to:</p><ul><li>metrics</li><li>monitoring</li><li>dashboards</li></ul><p>Understanding system behavior is critical for operating distributed systems.</p><h4><strong>simulations</strong></h4><p>One of the most interesting aspects of AEGIS will be <strong>failure simulations.</strong></p><p>This directory will include experiments that simulate conditions such as:</p><ul><li>Service crashes</li><li>Regional outages</li><li>Network latency</li></ul><p>These experiments allow us to observe how resilient the platform is.</p><h3>Security Considerations for Infrastructure Repositories</h3><p>Infrastructure repositories must be designed carefully to avoid leaking sensitive information.</p><p>Before committing anything, the repository was configured to prevent accidental exposure of credentials.</p><p>Key protections include:</p><h4>.gitignore</h4><p>Sensitive files are excluded from version control, including:</p><ul><li>AWS credentials</li><li>Terraform state files</li><li>environment variables</li><li>private keys</li></ul><p>These files should never be committed to a public repository.</p><h4>Secret Scanning Configuration</h4><p>The repository includes configuration for detecting leaked credentials automatically.</p><p>This helps prevent accidental exposure of access keys or tokens.</p><h4>Environment Configuration Templates</h4><p>Instead of committing real environment variables, the repository includes example configuration files that demonstrate what variables are required without exposing secrets.</p><p>This is a common pattern in secure infrastrcture repositories.</p><h3>Why This Step Matters</h3><p>It may seem unnecessary to spend time structuring a repository before writing infrastructure code.</p><p>However, this step provides several long-term benefits:</p><ol><li>Clarity — the project becomes easier to navigate</li><li>Security — credentials are protected from the beginning</li><li>Scalability — the project can grow without becoming disorganized</li><li>Communication — architecture and design decisions are documented early</li></ol><p>In real engineering environments, these practices are essential for managing complex infrastructure systems.</p><h3>What Comes Next</h3><p>With the repository foundation established, the next step is to design the <strong>platform architecture.</strong></p><p>In the next part of the series, I will explore:</p><ul><li>designing a multi-region cloud architecture</li><li>defining traffic flow between services</li><li>planning infrastructure components before implementation</li></ul><p>This architecture design will guide how the infrastructure and services are implemented in the later stages of the project.</p><h3>Final Thoughts</h3><p>One of the lessons I am learning through this project is that good engineering starts with structure and discipline, not just writing code.</p><p>By establishing a clear repository foundation, the project now has a solid base for building the rest of the platform.</p><p>In the next article, we will begin designing the architecture that will power the AEGIS platform.</p><p># Cloud Computing #Software Engineering #Infrastructure #DevOps #Distributed Systems</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec769758d5c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>