# Diagnostic codes

> Page: https://docs.plotwork.dev/reference/language/diagnostics. Index of every page: https://docs.plotwork.dev/llms.txt

Every error and warning code with its severity and name, and how to read one.

## TL;DR

| Question | Answer |
|---|---|
| What does the first letter mean? | `E` is an error and stops rendering, `W` is a warning and never blocks it, `M` comes from the Mermaid converter, `I` from the importer, `R` from a team's style rules, and `S` from the repository settings. |
| What does a diagnostic carry? | A code, a line, a column, a message, and a hint. Every one is reported in a single pass, so fix them all and check again. |
| How many codes are there? | 64 errors, 40 warnings, 53 Mermaid conversion codes, 12 import codes, 10 style rule codes, and 9 settings codes. |
| Where do the Mermaid and import codes point? | Into the Mermaid or the file you gave, not into Plotwork source. |

## Reading a diagnostic

Codes starting with E are errors and stop rendering. Codes starting with W are warnings and never block it. Codes starting with M come from the Mermaid converter and point into the Mermaid, not into Plotwork source: M1xx codes are errors that stop a conversion, and M2xx codes are warnings about something dropped or changed. Each is explained in [Migrating from Mermaid](https://docs.plotwork.dev/migrating-from-mermaid.md).

## Errors

| Code | Severity | Name |
|---|---|---|
| `E100` | error | `syntax` |
| `E101` | error | `unterminatedString` |
| `E110` | error | `unknownStatement` |
| `E111` | error | `missingHeader` |
| `E120` | error | `unknownNodeType` |
| `E121` | error | `unknownTone` |
| `E122` | error | `unknownIcon` |
| `E123` | error | `unknownDirection` |
| `E124` | error | `unknownGroupType` |
| `E125` | error | `unknownProvider` |
| `E130` | error | `duplicateId` |
| `E131` | error | `unknownNode` |
| `E132` | error | `unknownGroup` |
| `E133` | error | `unclosedBlock` |
| `E134` | error | `unexpectedClose` |
| `E135` | error | `unknownOption` |
| `E136` | error | `badOptionValue` |
| `E137` | error | `unknownMember` |
| `E138` | error | `badOverlay` |
| `E139` | error | `overlayConflict` |
| `E140` | error | `tooComplex` |
| `E300` | error | `gitMergeIntoSelf` |
| `E301` | error | `gitNoCommitYet` |
| `E302` | error | `gitAlreadyPicked` |
| `E303` | error | `gitTooManyTags` |
| `E304` | error | `gitNoCommits` |
| `E340` | error | `unknownClassType` |
| `E341` | error | `badMember` |
| `E342` | error | `unknownRelation` |
| `E343` | error | `badCardinality` |
| `E344` | error | `unsupportedArrow` |
| `E345` | error | `packageTooDeep` |
| `E360` | error | `stateReservedId` |
| `E361` | error | `stateMarkerDirection` |
| `E362` | error | `stateMixedRegions` |
| `E363` | error | `stateRegionOutside` |
| `E364` | error | `statePseudoLoop` |
| `E365` | error | `stateContainedTransition` |
| `E366` | error | `stateHistoryOutside` |
| `E367` | error | `stateNoteOnMarker` |
| `E400` | error | `journeyNoScore` |
| `E401` | error | `journeyBadScore` |
| `E402` | error | `journeyEmpty` |
| `E403` | error | `journeyEmptyName` |
| `E420` | error | `mindmapMissingRoot` |
| `E421` | error | `mindmapDuplicateRoot` |
| `E422` | error | `mindmapTooDeep` |
| `E423` | error | `mindmapEmptyLabel` |
| `E424` | error | `mindmapRootBlock` |
| `E320` | error | `ganttBadDate` |
| `E321` | error | `ganttBadDuration` |
| `E322` | error | `ganttNoStart` |
| `E323` | error | `ganttNoLength` |
| `E324` | error | `ganttConflict` |
| `E325` | error | `ganttCycle` |
| `E326` | error | `ganttEndsBeforeStart` |
| `E327` | error | `ganttMilestoneSpan` |
| `E328` | error | `ganttEmpty` |
| `E329` | error | `ganttBadRange` |
| `E330` | error | `ganttNestedSection` |
| `E380` | error | `timelineEmpty` |
| `E381` | error | `timelineEventOutsidePeriod` |
| `E382` | error | `timelineMisplaced` |
| `E383` | error | `timelineEmptyLabel` |

## Warnings

| Code | Severity | Name |
|---|---|---|
| `W200` | warning | `tooDense` |
| `W201` | warning | `orphanNode` |
| `W202` | warning | `tooWide` |
| `W203` | warning | `textShortened` |
| `W204` | warning | `suggestIcon` |
| `W205` | warning | `suggestGroupType` |
| `W206` | warning | `overlayCovers` |
| `W207` | warning | `iconArtMissing` |
| `W500` | warning | `suggestLineRole` |
| `W300` | warning | `gitRedundantMerge` |
| `W301` | warning | `gitEmptyBranch` |
| `W302` | warning | `gitDuplicateTag` |
| `W303` | warning | `gitLongFork` |
| `W320` | warning | `bigClass` |
| `W321` | warning | `inheritanceCycle` |
| `W322` | warning | `implementsClass` |
| `W323` | warning | `duplicateRelation` |
| `W330` | warning | `stateUnreachable` |
| `W331` | warning | `stateDeadEnd` |
| `W332` | warning | `stateChoiceBranches` |
| `W333` | warning | `stateBarBranches` |
| `W334` | warning | `stateDeepNesting` |
| `W350` | warning | `journeyFlat` |
| `W351` | warning | `journeyActorTones` |
| `W352` | warning | `journeyUnusedActor` |
| `W353` | warning | `journeyLookalikeActors` |
| `W360` | warning | `mindmapBare` |
| `W361` | warning | `mindmapDeep` |
| `W362` | warning | `mindmapManyBranches` |
| `W363` | warning | `mindmapCrowdedFan` |
| `W364` | warning | `mindmapRepeatedLabel` |
| `W310` | warning | `ganttTodayOutside` |
| `W311` | warning | `ganttStartMoved` |
| `W312` | warning | `ganttOverdue` |
| `W313` | warning | `ganttDoneInFuture` |
| `W314` | warning | `ganttUngrouped` |
| `W340` | warning | `timelineEmptyPeriod` |
| `W341` | warning | `timelineOutOfOrder` |
| `W342` | warning | `timelineDuplicatePeriod` |
| `W343` | warning | `timelineEmptySection` |

## Mermaid conversion codes

| Code | Severity | Name |
|---|---|---|
| `M100` | error | `mermaidNotDiagram` |
| `M101` | error | `mermaidUnsupportedType` |
| `M102` | error | `mermaidTooLarge` |
| `M103` | error | `mermaidEmpty` |
| `M104` | error | `mermaidInvalidOutput` |
| `M110` | error | `mermaidUnreadable` |
| `M200` | warning | `mermaidDroppedStyling` |
| `M201` | warning | `mermaidDroppedInteraction` |
| `M202` | warning | `mermaidDroppedLayoutHint` |
| `M203` | warning | `mermaidDroppedMeaning` |
| `M204` | warning | `mermaidMappedToNearest` |
| `M205` | warning | `mermaidLabelChanged` |
| `M206` | warning | `mermaidIdRenamed` |
| `M207` | warning | `mermaidTypeFromHint` |
| `M208` | warning | `mermaidNeutralType` |
| `M209` | warning | `mermaidDuplicateDropped` |
| `M210` | warning | `mermaidSubgraphEdge` |
| `M211` | warning | `mermaidColumnAdded` |
| `M212` | warning | `mermaidJunctionAdded` |
| `M213` | warning | `mermaidNodeInManyGroups` |
| `M214` | warning | `mermaidNoTitle` |
| `M215` | warning | `mermaidIconToken` |
| `M216` | warning | `mermaidEmptyElement` |
| `M217` | warning | `mermaidRepairedBlock` |
| `M218` | warning | `mermaidSkippedStatement` |
| `M120` | error | `mermaidGitInconsistent` |
| `M220` | warning | `mermaidGitGeneratedIds` |
| `M221` | warning | `mermaidGitParentDropped` |
| `M222` | warning | `mermaidGitMessageDropped` |
| `M240` | warning | `mermaidClassMemberRewritten` |
| `M241` | warning | `mermaidClassRelationApproximated` |
| `M242` | warning | `mermaidClassStereotype` |
| `M250` | warning | `mermaidStateNoteInside` |
| `M251` | warning | `mermaidStateReservedId` |
| `M270` | warning | `mermaidJourneyScoreAdjusted` |
| `M271` | warning | `mermaidJourneyActorsChanged` |
| `M180` | error | `mermaidMindmapManyRoots` |
| `M280` | warning | `mermaidMindmapShape` |
| `M281` | warning | `mermaidMindmapIcon` |
| `M282` | warning | `mermaidMindmapIdText` |
| `M130` | error | `mermaidGanttTime` |
| `M131` | error | `mermaidGanttUnresolved` |
| `M132` | error | `mermaidGanttDateFormat` |
| `M230` | warning | `mermaidGanttAxisFormat` |
| `M231` | warning | `mermaidGanttExcludes` |
| `M232` | warning | `mermaidGanttTickInterval` |
| `M233` | warning | `mermaidGanttToday` |
| `M234` | warning | `mermaidGanttMilestone` |
| `M235` | warning | `mermaidGanttDuration` |
| `M236` | warning | `mermaidGanttTag` |
| `M237` | warning | `mermaidGanttEndDate` |
| `M238` | warning | `mermaidGanttSetting` |
| `M260` | warning | `mermaidTimelineComment` |

## Import codes

Codes starting with I come from `import_source` and point into the file you imported. I1xx codes are errors and nothing was imported; I2xx codes are warnings about something left out or changed, and the import went on. Each is explained in [Importing from code and data](https://docs.plotwork.dev/importing-from-code-and-data.md).

| Code | Severity | Name |
|---|---|---|
| `I100` | error | `importEmpty` |
| `I101` | error | `importUnreadable` |
| `I102` | error | `importTooLarge` |
| `I103` | error | `importInvalidOutput` |
| `I104` | error | `importNotFound` |
| `I105` | error | `importNoShape` |
| `I200` | warning | `importDropped` |
| `I201` | warning | `importSkipped` |
| `I202` | warning | `importUnresolved` |
| `I203` | warning | `importChanged` |
| `I204` | warning | `importSplit` |
| `I206` | warning | `importPartial` |

## Style rule codes

Codes starting with R come from a team's style rules, checked by `plotwork check` and the GitHub Action. R1xx codes point into the settings or an organisation's saved rules and stop the check; R2xx codes point into the diagram and are errors unless the rule says `"level": "warning"`. Each is explained in [Repository settings](https://docs.plotwork.dev/repository-settings.md).

| Code | Severity | Name |
|---|---|---|
| `R100` | error | `rulesInvalid` |
| `R101` | error | `rulesBadPattern` |
| `R200` | error | `ruleDescription` |
| `R201` | error | `ruleMaxNodes` |
| `R202` | error | `ruleKind` |
| `R203` | error | `ruleIdName` |
| `R204` | error | `ruleLabelName` |
| `R205` | error | `ruleIcon` |
| `R206` | error | `ruleTone` |
| `R207` | error | `ruleTitle` |

## Settings codes

Codes starting with S come from the repository settings (`plotwork.config.json`) and the diagrams `generate` makes from its sources. S100 points into the settings and stops the run; S200 is a warning that a default the header does not take was left out. S101 to S104 stop one generated diagram: a source the run cannot use, an overrides file that does not check, a source whose files match nothing, and a Markdown fence that is not there. S201 warns of an override whose target the import no longer draws, and S202 of one the diagram could not take.

| Code | Severity | Name |
|---|---|---|
| `S100` | error | `settingsInvalid` |
| `S200` | warning | `settingIgnored` |
| `S101` | error | `sourceInvalid` |
| `S102` | error | `overridesInvalid` |
| `S103` | error | `sourceNoFiles` |
| `S104` | error | `fenceMissing` |
| `S201` | warning | `overrideStale` |
| `S202` | warning | `overrideRefused` |
| `S203` | warning | `overridesMissing` |

## See also

| Doc | Why |
|---|---|
| [Language reference](https://docs.plotwork.dev/reference/language.md) | Every page of the reference and what each covers |
| [Limits and quality checks](https://docs.plotwork.dev/reference/language/limits.md) | The density warnings and the two suggestions |
| [Migrating from Mermaid](https://docs.plotwork.dev/migrating-from-mermaid.md) | What the M codes mean and what to do about each |
| [Importing from code and data](https://docs.plotwork.dev/importing-from-code-and-data.md) | What the I codes mean and what to do about each |
| [Repository settings](https://docs.plotwork.dev/repository-settings.md) | What the R and S codes mean, and how a team sets its defaults and rules |
| [Writing with an agent](https://docs.plotwork.dev/mcp/agent-loop.md) | The fix-and-check loop an agent runs on these codes |
