Skip to content

AI-native development

The Cratis Stack

Build and operate with AI agents

Give your coding agent the same conventions, framework boundaries, and checks your team works to. Install the Cratis AI rules and skills into a repository with the Cratis CLI, or add the skills to one tool through its plugin. Then connect the agent to a running Chronicle store through the CLI and the Chronicle MCP server.

An assistant is only as good as what it knows about your framework and your system. Drop a general-purpose agent into a Cratis codebase and it guesses: it invents handler classes, misses the vertical-slice conventions, and hand-writes the API client that proxy generation already produces. Point it at a running event store and it has no idea how to read the log or find a failed partition.

Cratis addresses both halves. On the build side, Cratis AI gives the agent the conventions. On the operate side, the CLI and the Chronicle MCP server give it a documented way into the store.

Build with AI: skills that know the Cratis way

Section titled “Build with AI: skills that know the Cratis way”

Cratis AI is a shared corpus of rules, skills, prompts, and subagents that teaches an assistant the conventions: vertical slices, [Command] with Handle() on the record, model-bound projections, and ConceptAs<T> instead of raw primitives. It is authored in Cratis/AI and reaches you through one of three channels:

ChannelWhat you getVersioning
cratis ai installRules, skills, prompts, agents, and hooks for every selected coding tool, filtered by profile and committed to your repositoryTakes the current main; --source reads a checkout of a known commit
@cratis/pi on npmSkills, rules, prompts, agents, and hooks inside PiVersioned per release
cratis marketplace plugin for Claude Code, Codex, GitHub Copilot, or CursorSkills onlyFollows the default branch

A few of what you get, by name:

  • new-vertical-slice (prompt) scaffolds a whole feature end to end: command, events, projection, query, React, and specs.
  • cratis-arc-command, cratis-chronicle-read-model, cratis-chronicle-projection, cratis-chronicle-reactor, and cratis-fundamentals-concept (skills) build one artifact by convention. The add-projection, add-reactor, and add-concept prompts start the same work as a slash command.
  • scaffold-feature and write-specs (prompts) and cratis-code-review (skill) set up a feature folder, cover it with BDD specs, and review the result against the project’s standards.

Prompts come with the managed install and @cratis/pi; the marketplace plugin has the skills only. Because the skills encode the conventions, an agent that uses them produces slices that look like the rest of your codebase instead of a layered approximation of it.

Start with Start using Cratis AI. The agent harness guide has the command for each coding tool, profiles explains how to choose the guidance a repository needs, and the scenarios cover solo, team, and multi-tool setups. The code-analysis rules enforce the same framework contracts during the build, whether or not an agent wrote the code.

Operate with AI: teach your assistant your store

Section titled “Operate with AI: teach your assistant your store”

Building is half the loop. The other half is operating what you built. Cratis gives an assistant two ways into a running store.

Run it once inside your project:

Terminal window
cratis init

It writes a CHRONICLE.md describing every command the CLI can run, adds instruction files for the AI tools it detects (Claude Code, GitHub Copilot, Cursor, Windsurf, and Pi), and adds a chronicle-diagnose slash command. Detection looks at the project’s files and at environment variables each tool sets. If it detects none, it configures none; pass --tool <name> to target one.

From then on your assistant can browse events, watch observers, and diagnose a failed partition through the CLI, because the command catalog is in its context. After a CLI upgrade, refresh the catalog with cratis init --refresh. The CLI getting started guide covers it in full.

The Chronicle MCP server — an agent, connected to the store

Section titled “The Chronicle MCP server — an agent, connected to the store”

For tools that speak the Model Context Protocol, Cratis publishes the Chronicle MCP server as the cratis/chronicle-mcp container image. It connects straight to a running Chronicle server. The setup depends on your MCP host; Chronicle MCP getting started has a working configuration and configuration covers connection strings and credentials.

Once connected, your assistant can:

  • Explore: list event stores, namespaces, event types, projections, and read models; read events and the tail sequence number; look at read model instances.
  • Check observer health: list observers and failed partitions, get one observer’s state, and list the recommendations the store has raised.
  • Manage jobs: list jobs and their steps, and stop, resume, or delete a job.
  • Design against real data: describe the system and its event types, build an event catalog, find event types nothing consumes, trace why an event source ended up in its state, run an ad-hoc projection, suggest next event types, and scaffold a read model.

To replay an observer or recover a failed partition, use the CLI or the Workbench after the agent has helped you diagnose the cause.

Operate with AI

Build with AI

scaffold slices

run it

inspect, diagnose, replay

browse, check health, manage jobs

Cratis AI

rules · skills · prompts

cratis init

CLI command catalog

Chronicle MCP server

connected to the store

Your Cratis app

Running Chronicle store