Diagnostic Error Code Index
The table below catalogs all compiler diagnostic codes produced by the Scapius parser and semantic analysis suite.
| Error Code | Category | Cause | Remediation |
|---|---|---|---|
NEA1001 | Syntax | Parsing syntax error, missing token, unclosed string, or invalid grammar structure | Check DSL syntax against language specification and close any unclosed braces/quotes. |
NEA2001 | Semantic (AST) | Duplicate entity identifier within workspace | Ensure all entity IDs across all files in the workspace are globally unique snake_case identifiers. |
NEA2002 | Semantic (AST) | Duplicate view identifier within workspace | Ensure all view IDs across all view blocks are globally unique. |
NEA2003 | Semantic (AST) | Invalid property path depth in predicate expression | Limit nested property path traversal to supported entity attributes. |
NEA2004 | Semantic (AST) | Invalid comparison operator for field type | Use string operators (contains, starts_with) for strings and numeric operators (>, <, etc.) for numbers. |
NEA2005 | Semantic (AST) | Ambiguous predicate literal value | Ensure predicate comparison values clearly match the target field type. |
NEA2006 | Semantic (AST) | Invalid predicate comparison value | Ensure comparison values match expected formats and enums. |
NEA2007 | Semantic (AST) | Type mismatch between compared operands | Ensure operands on both sides of the comparison operator have compatible types. |
NEA2008 | Semantic (AST) | Duplicate text annotation identifier in view | Ensure all text <id> statements inside a view have unique IDs. |
NEA2009 | Semantic (AST) | Text annotation anchor target entity not found in workspace | Ensure the anchor <target> points to a valid, existing entity identifier. |
NEA2010 | Semantic (AST) | Text annotation anchored to another text annotation | Anchor annotations to domain entities or views, not other text annotations. |
NEA2011 | Semantic (AST) | Empty text annotation content | Provide non-empty markdown text content inside the triple-quoted block. |
NEA2012 | Semantic (AST) | Text annotation declared in a DOM-rendered view | Text annotations are supported only in canvas-rendered diagram views (e.g. landscape, container, threat_model, integration, data_flow, attack_surface). |
NEA3001 | Semantic Linking | Orphaned relationship target reference (target ID does not exist) | Check spelling of destination entity ID or ensure the target .ea file is included in workspace. |
NEA3002 | Semantic Linking | Ambiguous reference to multiple symbol candidates | Disambiguate entity reference by qualifying with namespace or fixing duplicate definitions. |
NEA3003 | Semantic Linking | Duplicate relationship between source and destination with identical verb | Remove the duplicate relationship declaration. |
NEA3004 | Semantic Linking | Relationship constraint violation (verb disallowed between source/target entity types or multiple composition parents) | Consult the Master Relationship Matrix for allowed source/destination combinations. |
NEA3005 | Semantic Linking | Cyclic composed_of composition loop detected | Remove cyclic containment loops (an entity cannot be composed of itself). |
NEA4001 | Domain Validation | Property value is not in the allowed enum value set | Check allowed enum values for the field (e.g. time, risk, criticality, mitigation_status). |
NEA4002 | Domain Validation | Duplicate lifecycle phase declared on entity | Declare each lifecycle phase (Idea, Plan, Build, Run, Retire) at most once per entity. |
NEA4003 | Domain Validation | Invalid date format in lifecycle phase | Use ISO-8601 "YYYY-MM-DD" date string format. |
NEA4004 | Domain Validation | Lifecycle end date occurs before start date | Ensure end date is chronologically greater than or equal to start date. |
NEA4005 | Domain Validation | Invalid capability hierarchical numbering format | Use standard dotted capability numbering (e.g. "1.2", "2.4.1"). |
NEA4006 | Domain Validation | Capability numbering sequence gap detected | Ensure hierarchical capability numbers follow a contiguous sequence without numbering gaps. |