# LS2007: Reaction or Job Name Hides Its Kind

## Intent

LS2007 is a compiler check that reports a reaction or job, the type that answers a domain event or runs scheduled work, whose name does not say which trigger it answers, so the model builder cannot discover it by name. This page states what the rule reports, where the error sits, and how to name the reaction or job for its trigger.

## Reference

### What the Rule Enforces

LS2007 enforces [Use architectural suffixes](https://litespec.dev/4.0.0/workspace/naming.md#use-architectural-suffixes) (`litespec/workspace/naming#use-architectural-suffixes`). It runs in Application, Infrastructure, and Worker. Its category is `LiteSpec.Layers`. Severity and enablement follow the [Analyzers overview](https://litespec.dev/4.0.0/analyzers/README.md).

### What the Rule Reports

The rule reports a class that implements an interface named `IEventHandler` or `IDomainEventReaction` unless its name matches `{Action}On{Fact}Handler`, with an action before `On` and a fact between `On` and `Handler`. The rule reports a class that derives from `BackgroundService` unless its name ends in `Job` or `Worker`, or contains `Recurring`. The diagnostic sits on the type name, and its message names the kind and the accepted shape.

### Failing Example

```csharp
internal sealed class SubscriberNotifier : IEventHandler<LoanBorrowedEvent>
{
}

internal sealed class LoanBorrowedNotifier : IDomainEventReaction
{
}


internal sealed class ReminderLoop : BackgroundService
{
}
```

### Passing Example

```csharp
internal sealed class SendDueNoticeOnLoanBorrowedHandler : IEventHandler<LoanBorrowedEvent>
{
}

internal sealed class ReminderJob : BackgroundService
{
}
```

### How to Fix

Name a reaction `{Action}On{Fact}Handler`, and name a job to end in `Job` or `Worker`, or to contain `Recurring`.

## Notes

### What the Rule Ignores

The rule does not report a class that is neither a reaction nor a job, and it does not report interfaces. A class implementing bare `IHostedService` without deriving `BackgroundService` is host wiring, not a job. A class that is both a reaction and a job is checked against both shapes. It does not run in Domain or WebApi.
