Skip to content

All case studies

Working with AI agents: rules, checks, memory

How I work with AI agents: operating rules, a pre-stage for checks, a knowledge graph and build-and-critique loops.

Result

  • One memory Chat, desktop, phone and Claude Code use the same knowledge graph
  • Checks before “done” A pre-stage checks risk, sources and proof before work moves on
  • Fresh-eyed critique Critics with a fresh context check each part before the next one starts

The result is a fixed framework for my work with Claude: operating rules for an agent company, a pre-stage with checks at the critical points, a shared knowledge graph, loops of building and independent critique, and a memory of lessons learned. Whether the pre-stage saves cost is something I measure rather than assume. I will only state a result once there is one.

Starting point

Working with AI agents means deciding all the time: which model, how much risk, and whether “done” is really done.

I work with AI agents every day, and the same questions keep coming up: does this task really need the large model? Is the command risky? Is “done” actually proven, and does the research support the claim? On top of that, my knowledge about projects and decisions should be available on every device, and the same mistake should not happen twice.

What was built

This way of working is a project of my own. It gives my work with Claude a fixed framework.

Operating rules for agents. In Paperclip, agents work in roles as in a small company, and the same rules file is attached to each of them: use large models sparingly, report briefly, escalate to me at three levels, from immediately to the daily report. New agents, new services and platform updates remain my decision.

Sketch of the agent company: I am at the top and decide on new agents, services and platform updates. Below are a CEO agent and worker agents, each with the same operating rules attached. Escalations reach me at three levels: immediately, as a decision request or in the daily report.

A pre-stage with checks. Before the actual work sits a fast decision model, Jev by TypeSafe, connected through a custom MCP server. It does not write text; it gives short verdicts: how big is the task, is the action risky, is “done” proven, do the sources hold up? It only advises. If it fails, that is said and work carries on normally; a verdict is never made up.

Sketch of the pre-stage: on the left, the flow from the request through risky actions and researched facts to “done”; on the right, a pre-stage check at each of these points: triage, risk, research and completion check. It answers with short verdicts and only advises.

A shared knowledge graph. Lasting facts live in one place and are available on every device. Feedback on the pre-stage’s verdicts helps to readjust its thresholds.

Sketch of the knowledge graph: chat, desktop, phone and Claude Code share one graph with projects, devices, decisions and preferences. Feedback on pre-stage verdicts is logged, and a threshold is adjusted as a result. Passwords and keys are never stored there.

Build, then critique. A builder builds a small part, then three critics with a fresh context check it: against the brief, against the design rules and in comparison with a reference. Only when all of them agree does work move on. For AI films, every round costs money, so a budget limit applies there, and I judge the sound myself, because the critics cannot hear.

Sketch of the build-and-critique loop: a builder builds one small part, three critics with fresh context judge only the result, against the brief, the design rules and a reference. If all three pass, the next part follows; otherwise the biggest gap goes back. For films, a budget ceiling and approval are added, and I judge the audio.

Lessons learned as memory. Claude Code records feedback from projects as a short note: what happened, why, and how it will be done from now on. One example: a music bed that sits very quietly under the voice, as briefed, comes across as missing. From now on, this is said up front and an audible second mix is delivered as well.

Sketch of a lesson learned: my feedback from a project becomes a note by Claude Code in three parts: what happened (music bed, as briefed, barely audible), why (gap to the voice larger than usual) and what to do next time (say so up front, deliver a second mix).

How it came about

See all 4 steps
  1. An agent company with operating rules

    PaperclipClaude Code

    In Paperclip, agents work in roles as in a company. The same rules apply to all of them: large models only for tasks that need a long line of reasoning, short reports, no new services or access without my approval. Facts and assumptions are labelled separately.

  2. A pre-stage, triggered automatically

    Jev (TypeSafe)MCPCloudflare WorkersClaude Code hooks

    A fast decision model triages tasks and checks before risky actions, before “done” and before researched facts. Hooks call the checks in Claude Code automatically. If the pre-stage is unreachable, nothing is blocked.

  3. Knowledge across devices

    Knowledge graphCloudflare D1

    Chat, desktop, phone and Claude Code share one knowledge graph. Passwords and keys never go into it. Feedback on the pre-stage’s verdicts has already adjusted a threshold that triggered too many follow-up questions.

  4. Build, then critique

    Claude CodeSkills

    Websites and films have their own loops: a builder builds, independent critics judge only the result, with pass or fail. For films, a budget limit and an approval before every paid generation are added.

Planning something similar?

Let me help you.

Request an intro call

Next case studyFilling in documentation automatically