No description
  • Rust 79.7%
  • TypeScript 18%
  • Python 0.8%
  • Shell 0.7%
  • PLpgSQL 0.4%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Till Wegmüller b4ab5f6acd
All checks were successful
CI / conflict-check (push) Successful in 5m35s
CI / test (push) Successful in 4m34s
Resolve latest provider CLIs in runner images (#794)
2026-10-15 17:04:26 +00:00
.anima The AI gate ships no review instructions: WI-221's stub / unbuildable / concurrency checks were orphaned by the anima-ai retirement 2026-08-01 23:18:26 +00:00
.claude babysit skill: runner recycle uses the real k0s namespace and lane names 2026-09-14 23:38:39 +02:00
.design-sync chore: design-sync setup — anima-pwa Violet Void → claude.ai/design 2026-07-11 11:41:45 +02:00
.forgejo deploy: remove Docker Compose — the fleet is k0s/k8s everywhere 2026-09-14 23:37:55 +02:00
.solstice Merge pull request 'Complete native operator recovery capture and publication' (#782) from codex/plan14-recovery-publication-20261006 into main 2026-10-06 23:45:53 +00:00
anima-pwa fix: harden capture contracts and recover rejected batches 2026-10-06 21:21:04 +02:00
crates Merge pull request 'Bound transient stream recovery so completed reviews can retire' (#786) from codex/plan14-stream-recovery-20261007 into main 2026-10-12 16:54:04 +00:00
deploy Resolve latest provider CLIs in runner images (#794) 2026-10-15 17:04:26 +00:00
docs Merge pull request 'Complete native operator recovery capture and publication' (#782) from codex/plan14-recovery-publication-20261006 into main 2026-10-06 23:45:53 +00:00
images/anima-runner-vm deploy: remove Docker Compose — the fleet is k0s/k8s everywhere 2026-09-14 23:37:55 +02:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 Quick-reply dedup — options render as bullets AND chips 2026-08-01 16:39:15 +00:00
proto/anima/v1 Merge pull request #783: Use enrolled OpenBao for Anima PAT issuance and delivery 2026-10-06 21:51:52 +00:00
scripts fix(auth): require an expected owner and reject deleted Vault destinations 2026-10-06 22:36:33 +02:00
.dockerignore feat: add multi-stage Dockerfile and docker-compose for all services 2026-04-12 18:06:47 +02:00
.gitignore deploy: remove Docker Compose — the fleet is k0s/k8s everywhere 2026-09-14 23:37:55 +02:00
Cargo.lock Install the OTLP meter provider used by production fleet instruments (WI-934) 2026-10-12 17:09:47 +02:00
Cargo.toml feat: add durable Akh session compatibility outbox and dispatch fence 2026-09-12 02:52:28 +02:00
clippy.toml clippy: raise large-error-threshold above tonic::Status 2026-09-14 08:34:01 +02:00
CONTEXT.md Split the AI review gate into parallel dimension passes — correctness, type expression, error handling, and dataflow wiring — because one general pass keeps missing unwired code 2026-09-09 09:14:51 +02:00
DEPLOY_NOTES.md fix: address Claude review for WI-525 2026-08-27 22:51:54 +02:00
Dockerfile ci: wire sccache into the docker image builds 2026-09-13 18:25:38 +02:00
Dockerfile.runner Resolve latest provider CLIs in runner images (#794) 2026-10-15 17:04:26 +00:00
HANDOFF-2026-08-23-codex-code.md docs: code handoff for the codex implementation session (WI-594/593/586 + lane queue) 2026-08-24 08:13:33 +02:00
HANDOFF-2026-08-23-lane-flow.md docs: archive the 2026-08-23 akh-medu→Anima lane-flow handoff 2026-08-23 14:07:06 +02:00
IMPLEMENTATION_SUMMARY.md A fully-cleared exit bar does not advance the work item: the scheduler keeps re-dispatching implementation sessions until the item parks 2026-08-09 14:58:02 +00:00
LICENSE Initial commit 2026-04-11 20:17:06 +00:00
main.pen Update design and claude files 2026-06-27 11:18:03 +02:00
projectbrief.txt Create initial screens and brief 2026-04-11 22:17:42 +02:00
rca-d1-d2-agent-diff-pollution.md feat: Investigate: how did diagnostic-dump-only patches end up in WI.agent_diff for D1/D2? (019dd3b5) 2026-04-30 23:15:59 +00:00
README.md Merge main into PR #713 and reconcile ptah tests 2026-09-22 03:03:41 +02:00

Anima

Anima is a command centre for AI-driven software development. A human defines a unit of work precisely; AI coding agents implement it as tightly-scoped vertical slices. The quality comes from the plan, not from the implementer's exploration.

It is not a chat wrapper and not an autonomous "do my project" agent. It is the scheduling, review and bookkeeping layer around agent sessions: what gets dispatched, to which agent, with what prompt, under what budget, and what has to be true before the work moves on.

  • Licence: MPL-2.0
  • Canonical repository: https://code.aopc.cloud/toasterson/Anima
  • Status: v0.1.1, pre-release and self-hosted. First commit 11 April 2026; ~1300 commits since. Anima runs its own development — most merges in the log are agent sessions dispatched by the system on its own repository.

The model

Six nouns carry the whole system. They are defined once, in CONTEXT.md, and the code uses no synonyms for them.

Term Meaning
Plan The human-defined intent and its decomposition. The Define-side anchor.
Slice The 1:1 execution wrapper for a Plan; the operator's monitoring surface.
Work Item One small vertical slice of implementation — a thin path through the layers. Carries its own forcing prompt.
Workflow A reusable ordered set of Phases, attached to the Define side, the Implement side, or both.
Phase One step in a Workflow, carrying the prompt that drives it.
Phase kind Who acts: Agent (an ACP session, consumes a slot), Human (opens a thread message and waits), Machine (triggers CI).

Three design decisions are worth calling out, because they are what make the loop safe to leave running:

Forcing prompts. A Work Item is not handed to an agent as a title. It carries a prompt assembled from the Plan plus the Phase's own prompt, so the agent's context is constructed rather than discovered. anima-ai is the assembler.

Graph versioning. A Work Item is pinned on entry to an immutable revision of the phase graph. Rewiring a workflow never moves in-flight items — they finish on their version, new items start on the current one. This is what lets an operator edit the flow while work is running, and what lets per-(item, phase) counters survive the rewire.

Bounded redispatch. Phases have exit bars and a loop guard, so an item that cannot pass its own gate strands visibly instead of burning tokens in a cycle. Agent lanes carry quotas; a lane that is failing is backed off rather than probed.

The reasoning behind these is recorded as 37 ADRs in docs/adr/, starting at 0001 — plan/slice one-to-one.

Agents are pluggable — Anima is not tied to a vendor

Agent sessions are hosted over the Agent Client Protocol (ACP) on stdio, one subprocess per slot. The executors are configuration, not code: claude-code, gemini-cli, codex, opencode and ollama-cloud lanes are all driven through the same path, and the runner never spawns containers of its own — the server assigns work to advertised slots.

The separate anima-ai service, used for prompt assembly and summarisation rather than for coding, addresses three configurable tiers (MINIMAL, STANDARD, REASONING), each with its own base URL, key and model name. Pointing a tier at a local or self-hosted endpoint is an environment variable, not a patch.

Architecture

A Rust workspace of twelve crates, a gRPC/Protobuf API, PostgreSQL, and a React PWA speaking Connect-Web to the same schema.

Crate Role
anima-core Domain types, auth, RBAC, the diff gate
anima-proto Generated types for 27 .proto service and message files
anima-db SQLx repositories and 100 ordered migrations
anima-server The gRPC service surface, plus an MCP endpoint exposing Anima's own tool catalogue
anima-ai Forcing-prompt assembly and the tiered model client
anima-runner Static stateful ACP runner; advertises slots, hosts agent subprocesses over stdio
anima-forgejo Forgejo REST client — pull requests and repository metadata
anima-git A VcsClient trait with a shell-out git implementation
anima-solstice Dispatch and log retrieval against the Solstice CI system
anima-mq RabbitMQ topology for the execution and streaming fabrics
anima-bridge Diagnostic CLI for inspecting work item state
anima-anthropic Thin Messages API client. Not a workspace member — present in-tree, unwired.

Cross-cutting: tokio, tonic 0.13 for gRPC and gRPC-Web, sqlx 0.8 against PostgreSQL 18, lapin for AMQP, axum, and OpenTelemetry 0.31 for OTLP traces and metrics. The PWA is React 19 with @connectrpc/connect-query, TanStack Query, Tailwind and Vite, tested with Vitest and Testing Library.

Running Anima

Anima runs on Kubernetes everywhere. The services come from the Helm chart in deploy/helm/anima (anima-server, the streaming edge, optional anima-ai and mail workers), applied by Flux from the homelab GitOps repo, which also owns PostgreSQL, RabbitMQ, the grpc-web proxy and the PWA. The runner fleet is not in the chart: it runs as k0s pods on archibald (with a dind sidecar for in-container builds) and as native launchd services on the operator's Mac, both deployed from the same GitOps repo. There is no Docker Compose stack any more; a docker compose file or command anywhere in this repo is a regression.

For local development run PostgreSQL 18 and RabbitMQ however you like and start the server from source; migrations run on server start:

DATABASE_URL=postgres://anima:anima@localhost/anima \
ANIMA_LIVE_BUS_URL=amqp://guest:guest@localhost:5672/%2f \
LISTEN_ADDR=0.0.0.0:50051 MCP_LISTEN_ADDR=0.0.0.0:50054 \
BOOTSTRAP_ADMIN_PASSWORD=admin \
cargo run -p anima-server

The model tiers need MINIMAL_API_URL / MINIMAL_API_KEY and their STANDARD_ and REASONING_ counterparts in the environment. To develop against the cluster instead, port-forward the service: kubectl -n anima port-forward svc/anima-server 50051:50051 50054:50054.

The runner is a long-lived process that dials out to the server's RunnerService and needs the agent CLIs on its own PATH. Dockerfile.runner is the pod image CI publishes, and deploy/runner/ holds the per-executor harness wrappers the image and the launchd fleet share. The PWA in anima-pwa/ is a normal Vite app (npm install && npm run dev).

The Ptah opportunistic lane runbook documents its opt-in outage policy and prepared hephaistos gateway configuration.

Licensing, dependencies and IP boundaries

  • Anima itself is MPL-2.0 (LICENSE) — file-level copyleft. You can link it into a larger work under other terms; modifications to Anima's own files stay MPL.
  • All dependencies are third-party upstream packages pulled from crates.io and npm at their published versions, under their own licences (predominantly MIT/Apache-2.0). None are vendored-and-modified; Cargo.lock and package-lock.json pin the exact set.
  • No proprietary code, datasets or model weights are included, and none are required to build. Anima trains nothing and ships no weights.
  • Model providers are external services reached over their public APIs. Anima holds no provider credentials of its own; keys are supplied by the operator through the environment. ACP agents (claude-code, gemini-cli, codex, opencode) are separately installed third-party programs under their own licences and terms — Anima executes them, does not redistribute them, and does not depend on any single one.
  • Anima's own outputs — plans, prompts, work items, generated diffs — belong to the operator. Nothing is transmitted to the project's authors; there is no telemetry callback, and the OpenTelemetry exporter points wherever the operator configures it.