> For the complete documentation index, see [llms.txt](https://infosys.selmotech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infosys.selmotech.com/selmo-solution/selmo-solution-en/selmo-documentation/8-diagnosis-hmi-and-documentation/documentation-from-the-model.md).

# Documentation from the model

### Evidence & Audit

This chapter describes, **how documentation is created in Selmo**\
and why it **does not have to be created or maintained manually**.

Documentation in Selmo is:

* no additional effort
* not a separate document
* not a subsequent result

But:

> **A structured view of the formal model.**

***

### The fundamental problem of classic documentation

In classic automation projects, documentation is often:

* temporally downstream
* decoupled from the code
* incomplete or out of date
* hard to trace

Typical situations:

* the code works, the docs are outdated
* changes are not applied consistently
* behavior cannot be conclusively proven
* audit questions must be interpreted

The problem is **not a lack of diligence**,\
but the lack of a **common source of truth**.

***

### The model as the single source

In Selmo the model is that source.

The model already contains:

* process (sequences, states)
* Structure (plant, hardware zones, zones)
* behavior (Bit-Control)
* Monitoring (interlocks, CMZ, checks)
* reactions (stop, release, diagnosis)

That provides everything that is necessary for documentation.

> **What is described in the model,**\
> **can be documented.**\
> **What is not modeled,**\
> **cannot be documented.**

***

### Which documentation is generated from the model

From the model the following can be automatically derived:

* Process descriptions\
  → states, transitions, sequences
* Structure overviews\
  → plant, hardware zones, sequences, zones
* Safety arguments\
  → interlocks, CMZ, plausibility checks
* Diagnostic descriptions\
  → zones, expectations, deviations
* Operating concepts\
  → manual and automatic operation, HMI semantics

This documentation is:

* consistent
* up-to-date
* unambiguously
* fully traceable

***

### Traceability and audit

Through the formal model it is always traceable:

* which state is active
* which conditions apply
* which monitoring applies
* why a reaction occurs

For audits this means:

* no interpretation of code
* no assumptions about behavior
* no detached descriptions

Instead:

> **An explicit, verifiable behavior model.**

***

### Documentation and changes

Changes are made in Selmo:

* to the model
* not to individual documents

This means:

* every change is central
* all derivations remain consistent
* no diverging document versions

> **Change in the model =**\
> **change in code, diagnostics and documentation.**

***

### Distinction from classic documents

To clarify:

* Documentation ≠ PDF
* Documentation ≠ textual description
* Documentation ≠ collection of comments

Documentation is:

> **a formal representation of the model**\
> **from different perspectives.**

***

### Benefits of model-based documentation

Through model-based documentation the following becomes:

* engineering more transparent
* operation safer
* commissioning more efficient
* auditing easier
* responsibility provable

> **Documentation becomes from a mandatory document**\
> **an integral part of the system.**

***

### Summary

Documentation in Selmo:

* is generated automatically from the model
* is always up to date
* is clearly traceable
* supports evidence and audit

> **Whoever understands the model,**\
> **also understands the documentation.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://infosys.selmotech.com/selmo-solution/selmo-solution-en/selmo-documentation/8-diagnosis-hmi-and-documentation/documentation-from-the-model.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
