Modeling Guide¶
GUIDE · OVERVIEW
This guide walks through building a Syscribe model from scratch — from a directory skeleton to a fully traced, validated system description.
Prerequisites¶
- Rust toolchain (stable, 1.75+)
cargoavailable on$PATH- A text editor with YAML syntax highlighting
Directory skeleton¶
model/
_index.md # root namespace (type: Namespace or Package)
Requirements/
_index.md # Requirements package
Verification/
_index.md
Decisions/
_index.md
MySystem/
_index.md
Each _index.md declares the package:
Running the validator¶
This prints a full Markdown report to stdout with all errors, warnings, and a traceability matrix. Pipe it to a file for review:
Running the web browser¶
The server watches the model directory for changes and reloads automatically.
Typical workflow¶
- Identify stakeholder goals — write parent
Requirementelements withREQ-SYS-000style IDs - Decompose requirements — create child requirements with
derivedFrom:andbreakdownAdr: - Write an ADR for each decomposition decision — the validator enforces this (E310)
- Build the architecture — create
PartDef,PortDef,InterfaceDefelements - Assign requirements — add
satisfies:anddomain:to architecture elements - Link implementation — add
implementedBy:onPart/PartDef/Interface/InterfaceDefto point at the source artifact that realises each element (§12.8); the validator flags missing paths withW023 - Write test cases — create
TestCaseelements withverifies:and Gherkin bodies - Draw diagrams — create
Diagramelements; addlayout:for SVG rendering - Validate — run the validator; fix all errors; review warnings
Going further: a product line¶
If the system ships in more than one configuration, model the whole family as one 150% model instead of copying it per product:
- Declare a feature model — add
FeatureDefelements underFeatures/(XOR/or/optional groups,requires:/excludes:, typedparameters:) - Condition the variants — add
appliesWhen:to the elements (parts, requirements, test cases) that belong only to some products - Name the products — add
Configurationelements (CONF-*) selecting one variant per group - Analyse and certify —
feature-check --deepproves the feature model is sound;validate --config <C>certifies one product;validate --all-configsgates the whole family in CI
See the Variability & Product Lines guide for the full treatment, and the worked example below.
Worked example — the UAV product line¶
The bundled model/ is a UAV product line you can run every command against:
syscribe -m model/ feature-check --deep # feature model is sound
syscribe -m model/ matrix # Requirement × Configuration grid
syscribe -m model/ validate --all-configs # certify every product
syscribe -m model/ diff --config CONF-UAV-SURVEY-001 \
--config CONF-UAV-DELIVERY-001 # what differs between products
syscribe -m model/ links UAV::Avionics::FlightController # see its implementedBy code link
syscribe -m model/ refs firmware/flight_control/ # which elements that code realises
Its shape:
- Feature model (
model/Features/) — three mandatory XOR groups (Propulsion= Quad ⊕ Hex,Payload= Survey ⊕ Mapping ⊕ Delivery,DataLink= LoRa ⊕ Cellular ⊕ Satcom), an optionalDualFlightController, cross-tree constraints (Delivery/DualFlightControllerrequiresHex), and a typed parameter (Delivery.payloadCapacityKg). - Configurations (
model/Configurations/) — three products:CONF-UAV-SURVEY-001,CONF-UAV-MAPPING-001,CONF-UAV-DELIVERY-001. - Conditioned elements — variant parts (
PropulsionChoices,PayloadChoices,DataLinkChoices,BackupFlightController) and variant requirements/tests (REQ-UAV-MAP-001,REQ-UAV-CARGO-001,REQ-UAV-REDUN-001) carryappliesWhen:, all derived underADR-SYS-PLE-001. - Implementation trace — architecture elements point at
repo:firmware/...viaimplementedBy:.
Further reading¶
- Requirements & Test Cases — stable IDs, lifecycle, Gherkin
- Traceability — the seven §12 rules, including
implementedBy:/W023, plus suspect-link detection (traceBaselines:/W090, thesuspectcommands) - Architecture Decisions — ADR lifecycle and breakdown rules
- State Machines —
StateDeftransitions, hierarchy/parallel regions, theW070–W079andW929completeness checks - System Composition — executing the parts of a composite together:
sendeffects, port connections with delay, bindings, part-qualified scenarios (E930–E934,W936) - FMU Plants (FMI) — co-simulating FMI 2.0/3.0 Co-Simulation FMUs with a state machine behind the
fmibuild feature (E888,E889,E966,I011) - In-process Plants —
PlantDefplants written in the expression language and standard library plants, run in a composite with no toolchain (E938,E939) - Action Flows — executable
ActionDefs: token semantics, scenarios, coverage, mutation - Variability & Product Lines — feature models,
appliesWhen,matrix,feature-check, the--configlens - Multi-Repository Composition —
[repos],repoImports:, cross-repo resolution, theE510–E515/W510–W512reproducibility gates, git-submodule integration - Native SysMLv2 Submodels —
sysmlSubmodel: true, in-process.sysml/.kermlparsing,satisfy/verify/@SyscribeFeaturecross-references, theW540–W542diagnostics - Foreign-Format Plugins (stdio) —
foreignFormat:,[plugins.<alias>], the JSON stdio envelope,E550/E551/W550–W553/E108 - MagicGrid — the B/W/S × 1-4 overlay (
mg_custom fields), MoEs/MoPs, logical/physical layers, themagicgrid/trade-studyreports - Annotated-Source Ingestion —
annotationFormat:packages, comment markers carrying frontmatter,implementedBy:auto-fill,E560/E561/W560–W563 - Link Types — project-declared relationships (
[linkTypes],links:),extends/relax/coverage, thefollowcommand,E630–E636 - Suspect links design note — why content baselines, what is hashed, and how
suspect acceptfits review workflows - Test Plans —
TestPlanscope, membership and configuration targeting - Custom Fields —
custom_fields:metadata and--wherequeries - Build System Integration —
build-config,buildExports, per-configuration build variables - Safety Analysis — HARA/TARA, fault trees, FMEA, attack trees, the safety case
- LLM Workflow — authoring models with an LLM and the validator in the loop