Engineering Case Study

I built an AI system to tend my repositories. Then I rebuilt it.

I built Artemis as a desktop AI operations layer for the software projects I was working across. Rather than treating Claude as a chat interface, I wanted to see what happened when it became part of a persistent system that could understand multiple repositories, monitor their state, dispatch engineering work into isolated worktrees, and return gated pull requests for me to review.

It worked. But building and using it exposed a more interesting engineering problem: giving a model capabilities was relatively straightforward. Controlling the context, state, side effects and recovery around those capabilities was harder.

Artemis Lite is my attempt to rebuild the same idea around that problem.

Artemis v1 desktop window showing the central 3D orb, operations panels including PR Review, Tickets and Tasks on the left rail, chat interface on the right, and project switcher in the title bar.

Artemis: a persistent desktop AI operations layer sitting above multiple repositories.

A.R.T.E.M.I.S. stands for Autonomous Repository-Tending Engineering, Monitoring & Intelligence System. It is an Electron desktop application built on Claude that sits above an ecosystem of repositories rather than inside a single project.

It can register and switch between projects, produce cross-repository morning reviews combining git activity with live Google Analytics data, maintain restart-survivable conversation and memory, and give the model application-owned tools for operating across the whole environment.

The most useful capability is delegated engineering. Artemis can dispatch a worker agent into an isolated git worktree, let it implement and test a change on a new branch, then open a pull request. The worker never pushes directly to main. Completed work returns to a PR Review Queue for human review.

It also has voice input and output, a reactive Three.js presence, persistent markdown memory, swappable model providers, and a permission gate around every write and shell command. It is ambitious. It works. And building it taught me something I had not expected.

Multi-repo
Project ecosystem oversight
Monitoring
Git + live analytics
Engineering
Isolated worker agents
Safety
Gated pull requests
Persistence
SQLite + memory + recovery
artemis-04-pr-review-queue.png

Workers returned gated pull requests to a review queue, allowing several tasks to run without granting them direct authority over main.

Electron TypeScript React Three.js SQLite Anthropic GitHub Google Analytics

Capability was not the difficult part. Control was.

Giving a model more tools quickly made Artemis more capable. It also made the engineering around those tools more important.

The original agent loop assembled broad project, memory and conversation context, exposed a large capability surface, and allowed the model to move through tool calls until the turn completed. That worked, but it made several questions increasingly difficult to answer precisely:

What context did this step actually need? What state must survive a process restart? When is a failed action safe to retry? How do you know whether an external side effect already happened? Which decisions belong to the model, and which belong to deterministic application logic? How do you measure whether a more selective architecture is actually better?

Original Artemis
Context Broad prompt assembly, including full memory
Tools 35 tools in the main agent layer
Lifecycle Open-ended model/tool loop
Recovery Turn-level checkpoint/recovery
Usage Per-call estimation, not persistent
Evaluation Smoke/unit tests, no workflow eval harness

Use less agentic architecture, but keep the useful capability.

Use the minimum amount of agentic behaviour required to reliably complete the task.

Artemis Lite started with a different division of responsibility. The application would own workflow lifecycle, persistence, approvals, retries, timeouts, recovery, context budgets and tracing. The model would own the decisions that genuinely required reasoning.

I wanted to test whether the repository-tending mission of Artemis could survive that constraint: not by reducing the final task to a toy example, but by rebuilding toward the same meaningful workflows.

Deterministic shell. Probabilistic core.

The model can decide what evidence matters or how to approach a bug. It should not be responsible for remembering whether a side effect was already committed after the process restarts.

The workflow becomes the primary object.

In Lite, a user goal becomes a persisted workflow with explicit steps and valid transitions. Every consequential operation sits behind typed boundaries. Approvals are records, not transient UI state. Usage is persisted. Trace events are append-only. Recovery starts from durable state rather than trying to recreate an in-memory conversation loop.

Lite architecture diagram
01
Explicit workflow state
Workflow transitions are application-owned and persisted.
02
Typed capabilities
Inputs and outputs are validated at the boundary.
03
Approval as state
Consequential writes pause on a persisted approval record.
04
Durable recovery
Restarting the Electron process does not mean restarting the job.
05
Tool-specific reconciliation
Ambiguous side effects are reconciled against external reality where possible rather than blindly retried.
06
Observable model usage
Model calls, token usage, duration and cost estimates are persisted against the workflow.
07
Selective context
Each step receives relevant evidence instead of automatically inheriting the whole application state.

Lite is smaller architecture, not a smaller ambition.

The target is still the original Artemis mission: oversee repositories, investigate engineering work, delegate implementation and return reviewable changes. The difference is that each stage now has an explicit contract and can be inspected independently.

Artemis
Assistant-centred workspace
Broad context
Large tool surface
Implicit turn lifecycle
Worker → PR
Persistent conversation
Artemis Lite
Workflow-centred control plane
Step-specific context
Selected capabilities
Explicit lifecycle
Worker → verification → gated PR
Persistent workflow evidence

From issue to Ready for Review.

The finished Lite workflow should demonstrate the architecture on a real engineering task rather than a synthetic agent loop.

01 Retrieve issue
02 Retrieve relevant repository evidence
03 Build explicit plan
04 Create isolated worktree
05 Dispatch bounded worker
06 Run repository checks
07 Inspect diff
08 Verify result
09 Request publication approval
10 Create pull request
11 Add to Ready for Review

The worker is deliberately not the authority. It receives a bounded task and environment, returns an implementation result, and the parent workflow resumes control for checks and verification.

Publication is another boundary. Artemis can do substantial work autonomously, but creating the external review artifact remains an explicit, persisted side effect.

artemis-lite-04-approval.png

Substantial work can proceed automatically while publication remains an explicit persisted approval boundary.

What did the model actually see?

One of the main experiments in Lite is treating context as a measurable input rather than invisible prompt plumbing.

For each reasoning step, the Context Builder can assemble the goal, current workflow state, selected repository evidence, GitHub evidence, prior tool results and relevant memory within an explicit budget. The inspector exposes that composition to the engineer.

artemis-lite-02-context.png

Context becomes an inspectable input: which evidence was selected, what was excluded, and how much of the model budget each source consumed.

The interesting test is what happens halfway through.

A successful happy-path agent demo proves very little about a long-running workflow. Lite includes deterministic fault injection so the same workflow can be exercised under model timeouts, provider failures, tool failures and process interruption.

Recovery is based on persisted workflow state. Completed steps can be skipped, pending approvals can be reconstructed, and known side effects can be reused. Where the external outcome is ambiguous, the tool can reconcile against reality before deciding whether another execution is safe.

tool side effect completed
process interrupted before ledger completion
application restarts
workflow discovered from persisted state
external artifact reconciled
completed step reused
verification resumes
Ready for Review

This is not a claim of generic exactly-once execution. Reconciliation is capability-specific. The point is to make ambiguity explicit instead of hiding it behind a retry loop.

artemis-lite-06-recovery.png

Workflow state survives the Electron process. Recovery resumes from persisted evidence rather than restarting the agent conversation.

The system is designed for an ecosystem, not a single repo.

Original Artemis could review several projects at once, combining repository activity with connected operational data. Lite retains that direction, but the briefing is built from explicit evidence sources and context selection.

A morning review should be able to surface changed repositories, failing checks, new issues, requested reviews, work already prepared by Artemis and workflows that need approval or recovery.

artemis-lite-08-morning-review.png

Lite retains Artemis's multi-project oversight while building the briefing from explicit evidence sources.

Measure the architecture, not the demo.

The purpose of Lite is not to claim that smaller prompts or explicit workflows are automatically better. The architecture is instrumented so those assumptions can be tested.

Evaluation dimensions
Context Completion, tokens, latency and cost by strategy
Capability selection Tool-definition tokens and incorrect selections
Recovery Completion rate, retries, duplicate side effects by injected fault
Human control Approval behaviour across workflow types

Quantitative results will be published from real evaluation runs. No placeholder metrics are presented as measurements.

The model is only one component of an agentic product.

Building Artemis changed how I think about AI product engineering. The first challenge was capability: connecting a model to repositories, tools, memory, monitoring and workers. The harder challenge appeared once those capabilities started doing real work.

Long-running agentic systems need ordinary software-engineering properties around the model: explicit state, durable persistence, narrow interfaces, permission boundaries, recovery semantics, observability and tests. They also need a clear answer to a less obvious question: what should the model not be responsible for?

Artemis Lite is my attempt to make that boundary visible. The model reasons. The application remembers what happened.

Giving a model tools is relatively easy. Engineering a reliable system around those tools is the harder problem.