# QualityScorer

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-10-generation/quality-scorer.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-10-generation/quality-scorer.ts#L63)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `scoreAll` | `scoreAll(documents: GeneratedDocument[], plans: DocumentPlan[], entities: Entity[], moduleAreas: string[])` | `QualityScore[]` |
| `scoreDocument` | `scoreDocument(doc: GeneratedDocument, plan: DocumentPlan, entities: Entity[], moduleAreas: string[])` | `QualityScore` |

## Where it refuses work

- `QualityScorer` stops the work with an early return when `words < 50`.
- `QualityScorer` stops the work with an early return when `!plan`.
- `QualityScorer` stops the work with an early return when `plannedCount === 0`.
- `QualityScorer` stops the work with an early return when `!plan || !entities || entities.length === 0`.
- `QualityScorer` stops the work with an early return when `requiredIds.size === 0`.
- `QualityScorer` stops the work with an early return when `relevantEntities.length === 0`.
