# Overview

## Intent

This index lists the 20 analyzer rules, one reference page per rule, grouped by the projects each rule runs in. A developer who meets a warning opens the page with the same ID to see what the rule reports, where the warning sits, and how to fix the code. Each entry carries a 1-line summary of what the rule reports.

## Domain rules

Rules `LS1001` to `LS1012` run in Domain only.

- [LS1001: Domain References an Outer-Layer Concern](https://litespec.dev/2.0.0/analyzers/rules/ls1001.md): reports a Domain use of an outer-layer namespace.
- [LS1002: Domain Declares an Enum](https://litespec.dev/2.0.0/analyzers/rules/ls1002.md): reports an enum declared in Domain.
- [LS1003: Aggregate Has No State Record](https://litespec.dev/2.0.0/analyzers/rules/ls1003.md): reports an aggregate with no `State` record.
- [LS1004: State Case Is Not Sealed](https://litespec.dev/2.0.0/analyzers/rules/ls1004.md): reports a state case that is not sealed.
- [LS1005: Domain Throws a Non-Domain Exception](https://litespec.dev/2.0.0/analyzers/rules/ls1005.md): reports a throw of a non-`DomainException` type.
- [LS1006: Domain Exception Is Misnamed or Open](https://litespec.dev/2.0.0/analyzers/rules/ls1006.md): reports a `DomainException` subclass that is misnamed or open.
- [LS1007: Domain Event Is Not an Immutable Record](https://litespec.dev/2.0.0/analyzers/rules/ls1007.md): reports a domain event that is not an immutable record.
- [LS1008: Domain Uses Binary Floating Point](https://litespec.dev/2.0.0/analyzers/rules/ls1008.md): reports a `double` or `float` use.
- [LS1009: Domain Reads a Nondeterministic Value](https://litespec.dev/2.0.0/analyzers/rules/ls1009.md): reports a read of the clock, randomness, or a new identifier.
- [LS1010: Repository Exposes a Query Surface](https://litespec.dev/2.0.0/analyzers/rules/ls1010.md): reports a repository that exposes a query surface.
- [LS1011: Public Domain Contract Is Undocumented](https://litespec.dev/2.0.0/analyzers/rules/ls1011.md): reports a public contract without XML documentation.
- [LS1012: Identifier Is Not a Strongly Typed Value](https://litespec.dev/2.0.0/analyzers/rules/ls1012.md): reports an identifier that is not a strongly typed value.

## Outer-layer rules

Rules `LS2001` to `LS2004` run in Application, Infrastructure, or WebApi, as each page states.

- [LS2001: Implementation Type Is Not Internal Sealed](https://litespec.dev/2.0.0/analyzers/rules/ls2001.md): reports an implementation type that is not `internal sealed`.
- [LS2002: Command Handler Dispatches Another Command](https://litespec.dev/2.0.0/analyzers/rules/ls2002.md): reports a command handler that dispatches another command.
- [LS2003: WebApi Uses an MVC Controller](https://litespec.dev/2.0.0/analyzers/rules/ls2003.md): reports an MVC controller.
- [LS2004: Command Handler Writes Through a Document Session](https://litespec.dev/2.0.0/analyzers/rules/ls2004.md): reports a command handler that writes through a session.

## Naming and style rules

Rules `LS3001` to `LS3004` run in all five projects.

- [LS3001: Asynchronous Method Name Lacks Async](https://litespec.dev/2.0.0/analyzers/rules/ls3001.md): reports an async method name without `Async`.
- [LS3002: CancellationToken Is Not the Last Parameter](https://litespec.dev/2.0.0/analyzers/rules/ls3002.md): reports a `CancellationToken` that is misplaced or misnamed.
- [LS3003: File Does Not Match Its Primary Type](https://litespec.dev/2.0.0/analyzers/rules/ls3003.md): reports a file that does not match its primary type.
- [LS3004: Concrete Class Is Not Sealed](https://litespec.dev/2.0.0/analyzers/rules/ls3004.md): reports a concrete leaf class that is not sealed.
