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). |
NEA2025 | Semantic (AST) | Invalid enum value in data element style selector | Ensure data element style selectors use valid enum values (e.g. phase.Plan, phase.Build, phase.Run, phase.Retire or time.Invest, time.Tolerate, time.Migrate, time.Eliminate). |
NEA2026 | Semantic (AST) | Unsupported data element selector prefix or segment count | Data element selectors support exactly two dotted segments with phase or time prefixes (e.g., phase.<value> or time.<value>). |
NEA2027 | Semantic (AST) | Inapplicable property declared on data element style rule | Data elements only support visual styling properties (fill, background, stroke, border, opacity, color, border_width, border_style). Layout properties like shape, icon, arrow, and curve_type are prohibited. |
NEA2028 | Semantic (AST) | Data element style selector declared in incompatible view type | Restrict view-scoped data element style rules to compatible view types (phase.* only in lifecycle_roadmap views; time.* only in portfolio_matrix views). |
NEA2030 | Semantic (AST) | Archived entity explicitly included in view by identifier without predicate | Use include <target> where archived or remove explicit inclusion. |
NEA2031 | Semantic (AST) | View is marked as archived | Archived views produce empty closures; remove archived true to activate view. |
NEA2035 | Semantic (AST) | Unknown attribute type in attr_type declaration | Supported types are "string", "number", "bool", and "enum". |
NEA2036 | Semantic (AST) | Enum attr_type declaration missing values list | Provide values ["val1", "val2"] inside the enum attr_type block. |
NEA2037 | Semantic (AST) | Non-enum attr_type declaration has values property | Remove values from non-enum type declarations. |
NEA2038 | Semantic (AST) | Duplicate attr_type declaration | Each attribute may only be declared once in types { ... }. |
NEA2039 | Semantic (AST) | Attribute value type mismatch (string expected) | Assign a quoted string value matching the declared attribute type. |
NEA2040 | Semantic (AST) | Attribute value type mismatch (number expected) | Assign a numeric value matching the declared attribute type. |
NEA2041 | Semantic (AST) | Attribute value type mismatch (boolean expected) | Assign true or false matching the declared attribute type. |
NEA2042 | Semantic (AST) | Attribute enum value not in declared values allowlist | Assign a value defined in the enum declaration's values list. |
NEA2043 | Semantic (AST) | Incompatible predicate operator for attribute type | Check operator matrix (e.g. comparison operators <, > require "number"). |
NEA2044 | Semantic (AST) | Predicate comparison value type mismatch | Ensure RHS comparison value matches the attribute's declared type. |
NEA2045 | Semantic (AST) | types block declared in nested scope | Place types { ... } blocks strictly at the workspace root. |
NEA2046 | Semantic (AST) | cluster view statement declared in DOM-rendered view type | Clusters are supported in canvas diagram views (landscape, container, integration, threat_model, data_flow, attack_surface). |
NEA2047 | Semantic (AST) | Duplicate annotation identifier between cluster and text annotation | Cluster IDs and text annotation IDs share a single namespace per view; use unique IDs. |
NEA2048 | Semantic (AST) | Cluster has no include statements | Add at least one include statement to define cluster members. |
NEA2050 | Semantic (AST) | Entity explicitly included by multiple clusters in same view | An entity may belong to at most one cluster per view; remove conflicting explicit include declarations. |
NEA2051 | Semantic (AST) | Cluster member extracted out of structural parent container | Informational diagnostic: entity is drawn inside the cluster container, outside its structural parent. |
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). |
NEA3007 | Semantic Linking | Live operational relier depends on an archived entity | Active relier entities cannot depend on, call, or read archived targets; either restore the target or archive the relier. |
NEA3008 | Semantic Linking | Archived parent entity contains active child entity | A parent entity (composed_of or lexical container) cannot be archived while retaining active children. |
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. |
NEA4007 | Domain Validation | Invalid monotonic restrictiveness ordering | Ensure security classification or restrictiveness levels follow monotonic hierarchy. |
NEA4008 | Domain Validation | Non-canonical restrictiveness warning | Ensure restrictiveness values map to canonical definitions. |
NEA4009 | Domain Validation | Score axis value out of bounds | Ensure score values (business_value, tech_fit) are within the configured score scale bounds ([0.0, 10.0]). |
NEA4010 | Domain Validation | Empty score block declared on entity | Provide at least one score axis (business_value or tech_fit) within the score { ... } block. |
NEA4011 | Domain Validation | Duplicate axis defined in score block | Declare each score axis at most once per score block. |
NEA4012 | Domain Validation | Score predicate literal out of range | Ensure predicate filter comparison values match scale bounds. |
NEA4013 | Domain Validation | Invalid portfolio quadrant threshold | Configure quadrant threshold values between the scale minimum and maximum. |
NEA4014 | Domain Validation | Unknown key in manifest portfolio configuration | Verify portfolio threshold keys in manifest.yaml. |
NEA4015 | Domain Validation | Declared time disposition contradicts quadrant evaluated from score | Align declared time with quadrant derived from tech_fit and business_value, adjust scores, or remove the manual time declaration. |
NEA4016 | Domain Validation | Negative number not allowed on non-negative field | Negative number literals are disallowed on non-negative domain fields (cost, probability, cvss_score, order). |