Skip to content

Project Model

truST project tree, config-file ownership, and build/run lifecycle.

This specification owns the truST project tree, config-file roles, and the build/run lifecycle that turns source files into a runnable project.

1. Canonical Files

project/
  src/
  trust-lsp.toml
  runtime.toml
  io.toml
  simulation.toml
  hmi/
  program.stbc

2. File Ownership

Path Owns
src/ project-owned Structured Text sources
trust-lsp.toml editor/LSP config, dependencies, vendor profile
runtime.toml execution, control, discovery, mesh, runtime-cloud policy
io.toml driver selection and safe-state I/O behavior
simulation.toml deterministic virtual coupling and fault injection
hmi/ declarative HMI/operator pages
program.stbc compiled bytecode artifact

3. Separation of Concerns

  • trust-lsp.toml defines authoring and semantic context
  • runtime.toml defines execution and exposed control surfaces
  • io.toml defines physical or simulated I/O backends
  • simulation.toml defines deterministic plant simulation behavior
  • hmi/ defines operator-facing presentation

3.1 Simulation coupling thresholds

For file-backed simulation.toml, each optional [[couplings]].threshold must be finite. The loader rejects NaN and positive or negative infinity before returning a configuration; it does not normalize, clamp, or substitute a value. This requirement covers TOML loading only and does not define programmatic SignalCouplingRule construction or source-value admission.

4. Lifecycle

  1. Author/edit source files in src/
  2. Build to program.stbc
  3. Validate configuration and bundle contents
  4. Run or reload the runtime
  5. Drive HMI, tests, harness scenarios, or agent workflows against the same project

4.1 HMI scaffold source set

trust-runtime hmi init|update|reset compiles the same recursive project source set as the bundle builder, including resolved local package dependencies. Source directory and file names are literal filesystem names; spaces, Unicode, and glob metacharacters do not alter discovery. Supported .st and .pou extensions are matched with ASCII case-insensitivity and returned in deterministic path order. Unreadable or invalid source paths fail the scaffold operation instead of being treated as an empty project.

  • 12-bytecode.md for program.stbc
  • 20-agent-api-v1.md for runtime agent orchestration
  • 21-harness-protocol.md for deterministic harness execution