Kyb/DocsBeta

Architecture Scenarios

Architects frequently need to evaluate alternative design choices: “Should we migrate to Google Cloud Spanner or CockroachDB?”, “What does our architecture look like with a centralised message bus vs point-to-point APIs?”. Kyb Scenarios let you model multiple options directly on your existing architecture graph without copying or duplicating data.

How Scenarios Work (RDF-star)

Traditional architecture tools require cloning entire models to represent future states, causing rapid drift and sync issues. Kyb leverages RDF-star reification to annotate individual statements directly in the graph:

  • Baseline: Entities and relationships without scenario annotations exist in the canonical production baseline.
  • Scenario Inclusion: New candidate entities or relationships carry a kyb:belongsToScenario annotation pointing to a specific scenario IRI.
  • Scenario Deletion: If a baseline entity or link is scheduled for retirement in a target state, it is annotated with kyb:deletedInScenario. The entity remains in the master model, but is visually struck out or hidden in that specific scenario view.

Creating & Managing Scenarios

  1. 1. Open View Configuration -- Click the settings gear or view menu in the Explorer.
  2. 2. Enable Scenarios-- Check “Enable Scenarios” for the view.
  3. 3. Add Scenarios-- Create named scenarios (e.g. “Option A: Cloud Spanner”, “Option B: Cloud SQL Postgres”).
  4. 4. Select Active Scenario -- Switch the active scenario dropdown in the top toolbar. A scenario indicator badge will appear above your workspace.

Working Inside an Active Scenario

When an active scenario is selected, your editing interactions are automatically scoped:

Creating Nodes & Relationships

Any new node or edge created while a scenario is active automatically receives a scenario badge and is tagged with that scenario. These elements will only be visible in views where that scenario is enabled.

Split Delete Actions

When deleting an element under an active scenario, the delete action offers two choices:
• Delete from Scenario: Marks the entity as retired specifically in this scenario (keeps baseline untouched).
• Delete from Project: Permanently removes the entity from the master graph entirely.

Show / Hide Deleted Elements

The graph controls bar provides a Toggle Scenario Deletions button. You can view proposed removals highlighted with a red strike-through border or hide them completely to preview the clean target state.

Scenario Deletion & Impact Analysis

When you discard or delete a scenario, Kyb performs automated impact analysis before executing the deletion:

  • Exclusive Entities: Elements that exist only within this scenario are safely deleted.
  • Shared Entities: Elements shared across other scenarios or the baseline are preserved, removing only the scenario link.
  • Restored Annotations: Any baseline elements previously marked as retired in this scenario are automatically restored.

Next: Tags & Metadata

Learn how to classify architecture with custom colored tags in Tags & Metadata.