---
title: 'ARC0002: Missing [Command] attribute on command-like type'
description: Mark a command-shaped type for model-bound discovery or remove the command-shaped method.
---


<a id="severity"></a>

## Rule

The analyzer uses a heuristic: a type with a public property and an instance `Handle` method looks like a command. If it lacks `[Command]`, it reports a warning. This does not mean every method named `Handle` belongs to Arc; rename the method if the type is not intended to be a command.

**Default severity: Warning.**

<a id="example"></a>
<a id="violation"></a>

## Diagnostic example

Compile these alternatives separately with `Cratis.Arc.Core`. The first deliberately produces ARC0002; these are declaration examples, not runnable hosts.

```csharp
public record NormalizeName(string Name)
{
    public string Handle() => Name.Trim();
}
```

<a id="fix"></a>

Add the model-bound attribute:

```csharp
using Cratis.Arc.Commands.ModelBound;

[Command]
public record NormalizeName(string Name)
{
    public string Handle() => Name.Trim();
}
```

<a id="why-this-rule-exists"></a>

The handler returns an ordinary string response. No event-sourcing integration is needed. If the attribute is absent, Arc does not discover this as a model-bound command.

## Related rules

- [ARC0001: Query return type](/arc/backend/csharp/code-analysis/arc0001/)
- [ARC0004: Public instance Handle method](/arc/backend/csharp/code-analysis/arc0004/)
