How it's built

← Ask the cow

AI assistants sometimes make things up, and say them with great confidence. This one is built so it can't make up my experience. Here's how, in plain words.

What it does

A cow that only knows what I've checked

This site has an assistant: a Highland cow you can ask about my experience. It doesn't search the internet. It can only read a list of facts about me that I've written and checked one by one, like a CV with my signature next to every line.

It always shows where it got it from

Under an answer you can open its sources: the exact facts it used, and the day I confirmed each one. If it tries to cite a fact it didn't look up for that answer, the site doesn't accept it, and no source is shown for it.

It takes an exam before every change

I keep a set of questions, some of them tricky, like "so he was the engineering manager?" when I was the technical lead. Whenever I change how it answers, the cow takes the exam, and another AI marks its answers sentence by sentence. A few questions are ones it must always get right: if it gets one of those wrong, I don't accept the change.

With limits, and with respect

Each visitor can ask 30 questions a day, and the whole site has a daily spending cap, so costs can't run away. To count your questions, the site doesn't keep your IP address, only a code made from it that changes every day. The visit counts don't use even that. Questions are kept anonymously for 90 days to improve the assistant.

A real valley

The landscape at the top is live. The season follows the calendar, the sun sits at the height it really has over Glasgow right now, and the weather is Glasgow's, from the last half hour. If it's raining there, it's raining here.

How I built it

The drawing shows the flow: a plan becomes small tasks; each task goes to its own programming session; two AI reviewers read the change; a mailbox wakes the supervisor, who reviews it; and I decide whether it goes in.
  1. Made with AI's help, but with rules

    I built this site with the help of Claude, an AI made by the company Anthropic, and Claude Code, its assistant for writing code. I gave it written rules: it can propose changes, but only I accept them, and only I can approve a line about my experience.

  2. A plan first

    Before any code, I worked out the plan with Claude: phases (the facts, the assistant, its exam, the design…), and in each phase small tasks, each written as a clear request on GitHub, the website where the code lives.

  3. One programming assistant per task

    Several Claude Code sessions work at the same time on my computer, each on its own task and in its own copy of the code, so they never step on each other.

  4. Two reviewers on every change

    Before a change reaches me, two AI reviewers read it: one checks that the project's rules are kept, the other that the documentation still tells the truth.

  5. A supervisor who sees the whole picture

    Conversations with Claude in the Claude app supervise the work. They keep notes on the whole project, its decisions and how I like things done, so they review each plan and each change with more context than the session that wrote it.

  6. Mailboxes between them

    They talk through mailboxes: special requests on GitHub that are never accepted, where a programming session leaves a short note, like "plan ready" or "change ready", that wakes its supervisor.

  7. I decide

    Nothing is built until its plan is approved, only I can confirm a fact about me, and only I accept a change into the site.

For developers

The technical side, with links to the repository's own documents.

How a question is answered
  1. The question reaches the server, at POST /api/chat.
  2. Today's limits are checked in Cloudflare D1, per visitor and for the whole site.
  3. Claude answers, with read-only tools that return only confirmed claims.
  4. The citation check keeps a citation only if a tool returned that claim for this answer.
  5. The answer streams back with numbered citations and its sources.