Skip to main content

Architecture Views & Visual Projections

Architecture models often contain hundreds of interconnected entities spanning business, software, infrastructure, security, and governance domains. Views in the Scapius DSL allow architects to define declarative, repeatable visual projections tailored to specific stakeholder audiences and technical disciplines.

Views are authored inside a views { ... } block within the root workspace.

workspace enterprise_architecture "Corporate Architecture" {
# Architecture entities, layers, and groups...

views {
landscape v_core_landscape "Core Banking Landscape" {
include system
include capability
auto_layout TopToBottom
}
}
}

13 Specialized View Types​

Scapius provides 13 purpose-built projection types. Explore the dedicated reference guide for each:

View TypePrimary AudienceSupported Entity TypesKey Relationships
landscapeEnterprise Architects, ExecutivesAny explicitly selected entity kindcomposed_of, realizes, serves, hosts, depends_on, migrates_to, influences, triggers
containerSolution Architects, Tech Leadssystem, app, component, data_objectcomposed_of, reads, writes, flows_to, depends_on
integrationIntegration Engineers, API Designerssystem, app, actor, environment, agentreads, writes, flows_to, depends_on, triggers
capability_mapBusiness Architects, Product Leaderscapabilitycomposed_of
value_stream_mapBusiness Architects, Transformation Leadsvalue_stream, stage, capability, process, app, system, agent, data_object, kpirealizes, serves, flows_to, triggers, reads, writes, influences
lifecycle_roadmapEnterprise Architects, Portfolio ManagersAny entity with lifecycle phases (system, app, capability, etc.)migrates_to
portfolio_matrixIT Strategists, CIOs, Enterprise ArchitectsAny scored entity with business value and technical fit (app, system, capability)None
threat_modelSecurity Architects, AppSec Teamscapability, process, system, app, component, infrastructure, data_object, actor, agent, trust_boundary, threat, risk_scenario, vulnerability, controltargets, mitigates, protects, flows_to, reads, writes, depends_on, encloses
risk_heatmapRisk Officers, GRC Leadsthreat, risk_scenariotargets, mitigates, governed_by
compliance_matrixCompliance Officers, Auditorsstandard, policy, system, app, data_objectgoverned_by
data_flowData Architects, Privacy Officersdata_object, system, app, component, actor, agentreads, writes, flows_to, protects
attack_surfaceSecOps, Cloud Security Engineersapp, system, trust_boundary, control, threat, vulnerability, infrastructureencloses, protects, mitigates, targets
dashboardMetadata only in v1; use workspace_home for the functional dashboardRuntime metadata; does not scope dashboard metricsNone for dashboard rendering

Universal View Syntax & Capabilities​

Every view type shares the following declarative statements:

views {
<view_type> <view_id> "<View Title>" {
# 1. View Metadata
description "<text>"
owner "<team>"
tags ["tag1", "tag2"]
attr <key> <value>

# 2. Inclusion & Exclusion Filtering
include <target> (where <predicate>)?
exclude <target> (where <predicate>)?

# 3. Relationship Verb Filtering
include_verb <verb> (incoming | outgoing | both)?
exclude_verb <verb> (incoming | outgoing | both)?

# 4. Layout Direction
auto_layout TopToBottom | LeftToRight

# 5. View-Scoped Style Rules (entity kinds, verbs, or specialized data elements: phase.* in lifecycle_roadmap, time.* in portfolio_matrix)
style <selector> (where <predicate>)? { ... }

# 6. Text Annotations (Canvas-Rendered Views)
text <note_id> """
Markdown annotation content
""" {
anchor <target_entity_id>
}

# 7. View-Scoped Clusters (Canvas-Rendered Views)
cluster <cluster_id> "<Cluster Title>"? {
include <entity_id>
include <kind> (where <predicate>)?
fill "#eef"
stroke "#3b82f6"
stroke_style "dashed"
}
}
}

View-Scoped Clusters & Extraction Containers​

Clusters (cluster <cluster_id> ["<Cluster Title>"] { ... }) declare dedicated top-level grouping containers in canvas diagram views (landscape, container, integration, threat_model, data_flow, attack_surface):

  • Membership via include: Member entities are declared directly with include statements inside the cluster body (include <id>, include <kind>, include * where <predicate>, etc.). At least one include statement is required (NEA2048). Legacy standalone anchor and where clauses are not allowed inside clusters.
  • Extraction Rendering: The cluster is rendered as a distinct top-level container box. Its members are drawn inside it, extracted from their structural parent entities. If the structural parent entity remains admitted in the view, containment is visually depicted by a synthesized composed_of edge connecting the parent to the extracted child.
  • Single-Cluster Assignment: Each entity can belong to at most one cluster per view:
    • Explicit claims: An explicit ID inclusion (include <entity_id>) assigns the entity to that cluster. Explicitly claiming the same entity in more than one cluster in the same view produces compiler error NEA2050 (CLUSTER_ENTITY_MULTIPLE_CLAIMS).
    • Pattern claims: When an entity matches kind, wildcard, or where patterns across multiple clusters, it is assigned silently to the first matching cluster in declaration order.
  • Pull-In Boundary: Structural ancestor pull-in (ViewClosureDepth) never traverses across an extracted cluster member.
  • Custom Styling: Clusters accept inline style properties (fill, stroke, stroke_width, stroke_style, border_radius, color, opacity, css_class, custom_css) or global theme defaults defined via style cluster { ... }.

Theme-Aware Diagram Support​

All Scapius diagram projections support automated Light and Dark themes. Toggling the theme switch in the documentation header toggles the visual diagram renderers in real time.

Click to explore
landscape view visual diagramlandscape view visual diagram

Interactive theme-aware architectural projection


Reactive Living Projections & Auto-Updates​

Unlike static drawings or manually exported images, Scapius views are declarative projections of the underlying architecture AST:

  • Automatic Propagation: Modifying an entity's name, owner, properties, or relationships in any .ea file automatically propagates to every view referencing that entity.
  • Dynamic Inclusions: Views using selector queries (e.g. include where ... or include_verb ...) automatically detect and incorporate newly declared entities when the workspace is compiled.
  • Real-Time IDE & Web Sync: In both the Scapius Web Workspace and the VS Code extension, saving source changes immediately triggers incremental recompilation, hot-updating the visual canvas without requiring manual diagram edits or page reloads.