Slice Implementer

An agent role for implementing a Cratis feature from the backend through the React user interface. It treats a vertical slice as one complete behavior, including code, tests, read models, and any needed page or dialog.

In plain words
What is it for?
For building new Cratis slices or making substantial changes that span C# backend code, behavior-driven tests, and React screens or command dialogs.
Why use it?
It keeps all parts of a feature aligned instead of leaving backend behavior, specifications, and the interface disconnected.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/cratis/ai/slice-implementer
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,007 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.01007
Opus 5 $0.00030 $0.00504
Sonnet 5 $0.00012 $0.00201
Haiku 4.5 $0.00006 $0.00101

Measured yesterday against content hash ae39a49311b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Slice Implementer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.ai/agents/slice-implementer.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Slice Implementer

You implement vertical slices end-to-end. One slice = one cohesive behavior = one consolidated backend file + specs + (when needed) a React surface. You do write code; you also know when to stop and ask.

When to use

A new vertical slice (State Change, State View, Automation, Translation), or a non-trivial change spanning backend and frontend. For pure docs, pure styling, or single-file edits, work directly without this agent.

Source of truth (read before starting; refer throughout)

  • .ai/rules/general.md — universal rules, layout, gates, authority model.
  • .ai/rules/vertical-slices.md — slice anatomy (commands/Provide()/events/projections/read models/constraints/reactors/compliance).
  • .ai/rules/csharp.md, .ai/rules/specs.md — C# style, spec patterns.
  • .ai/rules/typescript.md, .ai/rules/react.md, .ai/rules/components.md, .ai/rules/dialogs.md — frontend.
  • .ai/skills/event-modeling/SKILL.md — pre-code event vocabulary, flow, contracts, scenarios.

Workflow — phase gates; don't start the next until the current passes

Phase 1 — Plan

For new behavior, unclear event names/stream boundaries, or multi-slice flows, run the event-modeling skill first. Confirm Module/Feature/slice name + type, the behavior in one sentence, whether a UI surface is needed, and the event/read-model/scenario outline. Ask only when a real product/domain choice can't be answered from the repo.

Phase 2 — Backend

Write <Module>/<Feature>/<Slice>/<Slice>.cs with all backend artifacts (declaration order per general.md). Gate: build clean in Debug and Release (zero errors/warnings — Debug validates #if DEBUG spec code and regenerates the TypeScript proxies; build Release with -p:CratisProxiesOutputPath= to skip re-running proxy generation).

Phase 3 — Specs

Mandatory for every slice type. Use the scenario family: CommandScenario<T> (state change), EventScenario (constraints), ReadModelScenario<T> (projections/reducers), ReactorScenario<T> (reactors). Minimum: happy path with each appended event asserted; one spec per validator rule asserting both ShouldNotBeSuccessful() and ShouldHaveValidationErrors(); one spec per constraint. Gate: tests pass.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 54 lines · 59 tokens per session scan A ae39a49311b2

Subscribe to this mod's changes

Slice Implementer is an agent published in the GitHub repository Cratis/AI (2 stars, last pushed 4d ago), licensed MIT. It adds 59 tokens to every session and 1,007 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories