An AI assistant can write a controller in seconds. What it can't do on its own is know why we chose one database per tenant, how a failed deploy was fixed last month, or what every API response in our house style looks like. Most "the AI wrote bad code" moments are really missing context. My workflow is built around closing that gap: an Obsidian vault as the assistant's memory, MCP servers as its reach into my systems, and Skills as its habits. Then one rule on top: nothing ships until it has been measured.

#1. The Problem: Speed Without Context

Assistants are fast and fluent, and that makes their gaps easy to miss. Left alone, they invent conventions, forget decisions made three weeks ago and declare a fix done because it compiles. Production-grade work needs three things a model doesn't bring with it:

  • Context: the decisions, trade-offs and incidents behind the code.
  • Conventions: how things are done here, applied every time rather than when remembered.
  • Proof: evidence that a change works, from a build, a test or a measurement.

#2. The Stack at a Glance

Diagram
Obsidian vault ─▶ Obsidian MCP server ──┐
 (ADRs, runbooks,                        │
  project notes, prompts)                │
                                         ├──▶ Claude · Claude Code · Antigravity
Code + SQL Server ─▶ code-intel MCP ─────┤            │
                                         │            ▼
Skills (house style, doc formats) ───────┘   branch ─▶ build ─▶ test ─▶ measure ─▶ PR
                                                                             │
                                  vault updated (ADR, runbook) ◀── merge ◀───┘

#3. The Vault: Memory

My Obsidian vault is where decisions live. It has four kinds of notes, and each one answers a different question an assistant would otherwise guess at:

  • Architecture notes and ADRs answer why is it built like this? One note per decision: the context, the options, what we chose and what it costs.
  • Runbooks and incidents answer what went wrong before? Deploy steps, production fixes and post-mortems.
  • Project and R&D notes answer what exists and how does it connect? One note per project or experiment, linked by the technologies they share.
  • Prompts and AI context answer how should the assistant work here? Reusable prompts, conventions and the context I hand to every session.

Short, consistently shaped notes matter more than long ones. A decision note in this shape is easy for a person to skim and easy for a model to use:

Markdown
# ADR: One database per workspace
Status: accepted
Context: tenants must never see each other's data; removing a tenant must be trivial
Decision: each workspace gets its own database, named after the workspace
Consequences: + isolation by construction, + delete = drop database
              - one provisioning step per new workspace
Links: [[MongoDB]] [[Multi-tenancy]] [[MCP server for code intelligence]]
Link notes by technology

Links are what turn a folder of notes into a map. The knowledge graph on this site is modelled on the vault's graph view: projects, experiments and posts connected through the technologies they share.

#4. MCP: Reach

The Model Context Protocol is how the assistant reaches that memory and my systems without me pasting anything. Three servers do most of the work:

  • Obsidian MCP server: the assistant searches and reads the vault directly. "Check the ADRs before changing tenant storage" becomes something it can actually do.
  • Code-intelligence MCP server: the server I built that maps C# solutions with Roslyn and SQL Server schemas through catalogue views, exposed as 40+ tools. It answers "who calls this stored procedure?" from facts instead of guesses. The full write-up is here.
  • This portfolio's own MCP endpoint: the same idea pointed outwards. Any MCP client can query my projects and posts.
Reach is not permission

An MCP server can read far more than a task needs. Scope each one to what it serves, keep secrets out of notes, and treat anything an assistant reads from outside as data, not instructions.

#5. Skills: Habits

A convention that lives only in a senior developer's head gets applied when someone remembers it. A Skill packages it so the assistant applies it every time it's relevant.

  • My .NET API skill encodes our house style for Web APIs: Controller, business layer, data layer and DTOs; convention-based dependency injection; structured logging; global exception handling; JWT authentication; and one uniform response envelope. "Add an endpoint" now produces code that matches the rest of the codebase instead of a generic tutorial.
  • Document skills for PDF, Word, Excel and PowerPoint handle the non-code side: specs, reports and client documents, in formats people actually open.
Next skills

The vault already holds the raw material for more: runbooks that can become deployment checklists, and incident notes that can become a review checklist for the mistakes we have already made once.

#6. The Tools

  • Claude, with MCP servers and Skills attached, for design, research and writing: reading the vault, querying the code map, drafting ADRs.
  • Claude Code for changes to a repository: it works on a branch, runs the build, the type checker and the tests, and opens a pull request.
  • Antigravity for agent-driven work inside the editor.

The tools matter less than what they are connected to. The same model is a different assistant with the vault, the code map and the house style behind it.

#7. Production-Grade Means Measured

A case study from this site. PageSpeed Insights scored the pages poorly on mobile. The workflow was: measure, find the cause, change one thing, measure again, and compare against main.

  • Measure: Lighthouse with mobile settings showed about 25 seconds of Total Blocking Time on every page.
  • Find the cause: a WebGL fluid background redrew every frame from page load. With it switched off, the home page went from 48 to 83.
  • Fix, then re-measure: start the effect on the first interaction, paint content without waiting for JavaScript, self-host fonts and remove a 100 KB inlined image. Blocking time dropped to a few hundred milliseconds across the site.
  • Check the claim: Lighthouse varies by about five points run to run, so every later feature was compared against main in alternating runs, and browser tests confirmed it behaved the same afterwards.
The first fix isn't always a fix

One "optimisation", putting an animated element on its own compositor layer, made the score worse on a phone without a GPU. Only a measurement caught it, and it was reverted. An assistant that says "this should be faster" has made a prediction, not a result.

#8. The Loop

  1. Write down the decision or the problem in the vault.
  2. The assistant reads the relevant notes through MCP, and the code map for the parts of the system involved.
  3. Skills shape the change so it matches the house style.
  4. The agent implements it on a branch and proves it: types, build, tests, and a measurement where performance is involved.
  5. Review and merge the pull request.
  6. Update the vault: a new ADR, a runbook step, or an incident note. The next session starts with more context than this one did.

#9. Takeaways

  • Most bad AI output is missing context. Give the assistant memory (a vault), reach (MCP) and habits (Skills).
  • Keep notes short, consistently shaped and linked. Structure is what makes them usable by a model.
  • Encode conventions once as a Skill instead of repeating them in every prompt.
  • Production-grade means measured: build, test, and compare against a baseline before claiming anything.
  • Close the loop. Every merged change should leave the vault a little smarter.