Runtime Harness

SimpleModeling Created: 2026-11-02

SimpleModeling layers harnesses across modeling, programming, and execution to restrain deviations by AI and guide appropriate implementation. The runtime harness applies models and component contracts during execution. Implementations that follow the normal Textus/CNCF (Cloud Native Component Framework) conventions benefit from shared mechanisms that support quality.

Article PDF Summary Slides PDF
Watch video
View infographic

What is a runtime harness?

In this series, a runtime harness is a mechanism through which the runtime manages available operations and their execution, keeping program behavior within defined rules.

We distinguish three roles of an AI harness: constraint limits unwanted behavior, guidance directs AI toward appropriate operations and implementations, and feedback returns validation results for correction. Together, they help AI converge toward results that meet its objectives.

Harness roles and their relationship to the runtime

Role Relationship to the runtime

Constraint

Limit operations that violate model rules, component contracts, or permissions.

Guidance

Model operations, APIs/SPIs, and UoW clarify the operations and connections used to implement business processing.

Feedback

Use execution results and records for verification and return problems for correction. Workflow conditions govern revalidation and stopping, bounding trial and error.

Authorization, update management, and state transition management in Textus/CNCF were originally introduced to support quality attributes such as security and reliability. SimpleModeling also uses these mechanisms as a harness for AI. Delegating control to shared mechanisms reduces the decisions and implementation work AI must handle individually, allowing it to concentrate on business-specific processing.

Position within the harness architecture

AI-assisted development layers harnesses across modeling, programming, and execution. Each harness covers conditions that another cannot constrain, reducing the risk that incorrect AI decisions or generated code will lead to inappropriate behavior.

Harnesses layered across modeling, programming, and execution

Stage and harness Scope of control

Modeling: model harness (Episodes 2–4)

Describe business structure, behavior, and rules in models; check grammar and consistency. Use the same definitions for generation and execution.

Programming: programming harness (Episode 6)

Types, composition rules, and APIs constrain supplementary code and available operations, guiding implementation toward model and runtime conventions.

Execution: runtime harness (Episode 7)

Run processing according to models and component contracts; manage runtime permissions, state, updates, and resource use.

Even code that conforms to types and contracts may request an operation that the caller’s permissions or the target’s current state do not allow. The runtime harness applies models and contracts to actual behavior and checks these runtime conditions. The programming harness guides implementations into structures managed by the runtime, so shared controls also apply to AI-written supplementary code.

The architecture harness discussed in Episode 5 defines these roles and their combination. The knowledge harness aligns the premises AI uses for decisions. Observation models and the verification harness provide the information and checks needed to compare actual behavior with requirements.

Runtime structure and constraint points

In Textus/CNCF, generated models and supplementary code reside inside components. Components connect through APIs describing the operations they provide and SPIs connecting the functionality they require. Shared execution management handles each component’s models and operations.

runtime structure en

Figure 1. Runtime structure and constraint points (component B is simplified). Boxes show component boundaries, solid arrows show contract connections and operation requests, and dashed arrows show model references. Numbers 1–4 correspond to the table below.

Why this structure acts as a harness

This structure acts as a harness because it limits the available interfaces and operations and places runtime checks and management on those paths. The numbered constraint points in the diagram have the following responsibilities.

Why structural constraints act as a harness

Constraint point How the constraint works

1. Models generated from CML

Code and runtime use the same model definitions, types, and operations, limiting separate data structures and progress rules in supplementary code.

2. External connections through API/SPI

Components connect through public contracts without exposing private implementations to consumers, discouraging direct calls to internal processing.

3. Internal effects through UoW

Persistence, queries, and external calls use runtime-provided operations, limiting the scope for individual code to bypass execution management.

4. Rules applied during execution

When executing operations, the runtime applies authorization, permitted transitions, commit rules, and resource controls. Requests that violate those rules are refused.

These constraints work together. When developers follow model and component conventions, shared authorization, resource management, and state and progress management also apply to AI-written supplementary code. Developers can concentrate on business models and processing with less need to implement quality measures individually.

Execute the rules defined by models

CML describes business data and its operations in structural models, and the progress of processing in dynamic models. Textus/CNCF uses those definitions during execution, reducing the scope for AI to recreate data and progress management separately from the models.

Use CML-generated models as runtime definitions

Entity, Aggregate, View, and Display models are generated from CML. Developers and AI use these generated models rather than implementing the same models separately. Textus/CNCF receives the generated definitions, types, operations, and connection information and executes according to them. Direct model execution means that the runtime handles the model’s meaning without requiring it to be manually rewritten as separate procedures.

Implementations use the structures and operations supplied by the model and supplement only business-specific calculations and integrations at designated extension points. This reduces places where models and supplementary code have separate structures, allowing model changes to be reflected in generated artifacts and execution definitions.

Build Aggregate and View models on Entity

In structural models, Entity provides the foundation for business data. Aggregate describes updates, while View describes queries. Aggregate handles business updates and invariants; View composes the information needed for queries. Display sits outside View and projects query results into a form suitable for presentation.

For example, an Aggregate business operation changes an order’s state, a View supplies information for an order list, and Display handles the presentation of its fields. Presentation needs do not require rewriting business state or duplicating update rules in list-display processing.

Separating updates, queries, and presentation on the Entity foundation helps AI determine where processing belongs. Corresponding model operations connect that processing to the runtime’s persistence, query, and presentation mechanisms. Following model roles therefore also brings implementations under runtime management.

Execute behavior and decisions from models

Textus/CNCF uses state machines as the foundation for managing behavior during execution. Models explicitly define states, events, and transition conditions, and the runtime performs permitted transitions. This reduces the state management and branching that AI must implement individually and helps prevent missed conditions and invalid state changes.

Workflows build on that foundation as dynamic models closer to applications. Developers and AI describe business sequences and branches, while the runtime manages the state associated with their progress. Processing can be expressed at a business-oriented level of abstraction while using standardized state-machine execution management, making stable behavior consistent with the model easier to obtain.

Each workflow step connects to a component’s public operation. Operations involving updates or queries use Aggregate or View model operations. Business progress and data operations therefore execute according to their respective models and component contracts.

When a rule engine evaluates business rules, the decision result is also separated from the operations to execute. The resulting ActionPlan connects to a component’s public Operation or to the execution of an Event or Job. This allows modeled decisions to be used while retaining component contracts and runtime execution management.

Manage component connections and internal operations

Components connect externally through APIs and SPIs. Internal data operations and external effects use the UoW vocabulary. Both are interfaces managed by the runtime, so AI-written supplementary code follows component contracts and shared controls.

Restrict external connections to APIs and SPIs

A component interacts with the outside through APIs and SPIs. An API defines the contract for operations a component provides; an SPI defines the contract connecting required functionality to its provider. Components communicate through defined inputs, outputs, and meanings, without calling another component’s private implementation or copying its processing into the consumer.

Business-specific external integrations are implemented at these interfaces as well. Communication methods and provider details are placed in SPI implementations, allowing business processing to use the same contract. AI’s changes are scoped to either the consumer using the contract or the provider implementing it.

Keep public contracts separate from internal implementation

A CAR packages a component’s model-related contracts, implementation, and dependencies. Consumers receive the public-contract API; the provider’s internal implementation is not made into a library for consumers. Contract API types are shared at runtime, while each component retains its implementation.

The runtime assembles components using declared dependencies and contracts. If a required API is missing or a contract does not fit, it does not search for a private implementation to connect instead. The usage boundaries established by types and component checks remain in effect when components are assembled at runtime.

Public operations let consumers reuse processing without depending on a component’s internal implementation. The runtime maintains these connections during execution, allowing shared controls to operate while preserving component independence.

Describe internal operations with the UoW vocabulary

Inside a component, runtime-managed operations such as persistence, queries, and external calls are described using the UoW vocabulary. The available operations are defined, and their execution is handed to the runtime. Pure business calculations are incorporated between their inputs and outputs.

When the runtime interprets operations described and composed with Free Monad, it applies authorization, commit and abort handling, and resource cleanup. UoW connects processing built from generated models and API/SPI contracts to effects managed by the runtime.

Unify input validation and error handling

Input validation and result delivery also follow a shared approach across components. CNCF properties handle inputs, Consequence represents success and failure, and Conclusion provides a consistent structure for failure details.

Handle inputs through properties and applicative composition

Parameters are handled through CNCF properties. Results of retrieving and validating required values are combined as Consequence values. When input fields are independent, applicative composition aggregates their results. For example, a missing order number and an invalid quantity can be collected as problems with the same input.

Composing retrieval and validation as Consequence values reduces the scope for AI to construct its own parameter parsing and error collection control. Validated inputs are passed to business processing, while input problems are returned through the shared result system. This provides a consistent connection between validation and processing.

Unify outcomes and failures with Consequence and Conclusion

Consequence handles success and failure in business processing, while Conclusion structures failure details. A shared result system covers input problems, unmet business conditions, authorization refusals, and runtime failures. This reduces the need to design separate exception and error-string conventions for each component.

The same information supports result delivery to callers, diagnosis, and runtime failure handling. AI-written processing is composed within this result system, allowing consistent error handling across the system when components are combined.

Support quality through harness-guided implementation

Standard model and component operations are connected to authorization, update management, resource management, observation, and failure handling. These controls operate as business processing runs, without requiring developers to select and implement each measure individually. Their contributions to quality attributes can be organized as follows.

Quality attributes supported by shared harness mechanisms

Quality attributes Relationship to the harness

Data consistency and correctness; reliability; predictability and reproducibility

Model rules, transitions, and shared update and result management align behavior.

Security; observability; auditability and traceability

Standard execution paths apply protection and records, identifying an operation’s actor, target, and result.

Performance and responsiveness; scalability and elasticity

Query and presentation models and shared execution management support processing and capacity control under varying load.

Availability and fault tolerance; recoverability

Component boundaries and state and progress management limit the impact of failures and support recovery.

Maintainability and modifiability; verifiability; reusability and composability; interoperability and replaceable integrations

Typed contracts and separation of business logic from execution control provide a shared structure for change, verification, reuse, and external connections.

Ease of deployment and operation; resource efficiency and operating cost

Standard settings and shared resource management allow the configuration and operational burden to be adjusted to the application.

One shared mechanism can contribute to several quality attributes, and several mechanisms can support the same attribute. Message-based separation of processing, combined with progress management, capacity control, and failure handling, also supports the four reactive characteristics: responsiveness, resilience, elasticity, and message-driven operation.

Deployment and configuration are adjusted to the throughput and availability levels required by the application.

Execute AI work under workflow control

The same structure can apply when AI participates in business or development execution. Its decisions and generation are treated as processing within a workflow. AI returns results and supporting evidence according to defined inputs, constraints, and completion conditions, while the runtime manages the overall order, continuation, and resumption.

The runtime provides structured Consequence/Conclusion results and execution records as inputs to verification. Comparing them with requirements and completion conditions and returning the location and reason for a problem helps AI narrow its corrections. The result-reporting mechanism is combined with verification that determines whether the result meets requirements.

To turn this feedback into progress toward a satisfactory result, the workflow defines correction and revalidation steps, retry limits, and conditions for stopping or requesting human review. Result types and execution management alone do not establish correctness. Verification and continuation decisions help prevent endless revisions and allow the approach to be reconsidered when necessary.

Conclusion

The runtime harness applies models and component contracts during execution, restraining deviations by AI and guiding appropriate operations. Connecting execution results and records to verification and correction also supports progress toward the intended result. Developers who describe business processing using the normal conventions benefit from stable behavior and the mechanisms that support quality.

Episode 8 will discuss the knowledge harness, which organizes the knowledge AI uses for decisions and generation.

infographic print en

Runtime harness overview: structure, controls, and feedback.

References

Glossary

Cloud Native Component Framework (CNCF)

Cloud Native Component Framework (CNCF) is a framework for executing cloud application components using a single, consistent execution model. Centered on the structure of Component, Service, and Operation, it enables the same Operation to be reused across different execution forms such as command, server (REST / OpenAPI), client, and script. By centralizing quality attributes required for cloud applications—such as logging, error handling, configuration, and deployment—within the framework, components can focus on implementing domain logic. CNCF is designed as an execution foundation for literate model-driven development and AI-assisted development, separating what is executed from how it is invoked.

Textus

Textus is the runtime foundation for operating software realized through SimpleModeling. It provides execution, operational, and integration mechanisms shared by applications.

SimpleModeling

SimpleModeling is a modeling-centered software development methodology and technology system for constructing a Domain Model from Knowledge, formalizing it in CML, realizing it as executable software through Cozy and AI, and running it on Textus.

deviation

The state in which a computed or observed value differs from a baseline or true value. Represents a measurable quantitative discrepancy.

Model

A Model is an abstraction that represents a subject according to a particular Purpose and Concern so that it can be understood, reasoned about, evaluated, or constructed. It is not the subject itself; it preserves the elements, relationships, and meanings required for its purpose.

Operation

In UML, an Operation is a Behavioral Feature of a Classifier that specifies the name, type, Parameters, and Constraints for invoking associated Behavior. The Operation specifies an invocation contract, while a Method or another Behavior realizes it.

Constraint

In UML, a Constraint is a condition or restriction expressed in natural language or a machine-readable language to declare part of the Semantics of one or more Model Elements. Its evaluation yields a Boolean value and has no side effects.

validation

Validation is the activity of confirming that a system or product fulfills its intended use and stakeholder requirements.

Relationship

Undefined

verification

Verification is the activity of confirming that an implementation conforms to its specified design or requirements.

error

A generic term used broadly in practice. In software engineering, it is ambiguous and may denote bugs or failures in general. In SimpleModeling, Error is treated as a broad label, with specifics clarified as Mistake, Defect, Fault, Failure, or Deviation.

Security

Security is the quality of protecting information and functions according to legitimate authority and preventing unauthorized disclosure, use, modification, destruction, or repudiation. It includes Concerns such as Confidentiality, Integrity, Authenticity, and Accountability.

Quality Attribute

A Quality Attribute is a characteristic that expresses the degree of quality with which software satisfies requirements in addition to performing its functions. Examples include Security, Performance, Availability, Reliability, Resilience, Observability, and Maintainability.

Reliability

Reliability is the quality by which a system consistently performs required functions under specified conditions for a specified period. It is evaluated through concerns including Availability, Fault Tolerance, and Recoverability.

State

In UML, a State models a situation during which an invariant condition holds. The current State of an Object may determine accepted Events and Operations, applicable Constraints, and possible next Transitions.

Type

Undefined

Behavior

In UML, Behavior is a specification of how its context Behaviored Classifier changes State over time. It may define possible executions, emergent Behavior, or a selected example of execution.

Component

A software construct that encapsulates well-defined responsibilities, contracts, and dependencies as a reusable and replaceable unit. In the logical model, it serves as an abstract structural unit; in the physical model, it corresponds to an implementation or deployment unit.

CML (Cozy Modeling Language)

CML (Cozy Modeling Language) is the SimpleModeling formal modeling language for describing the Executable Model portion of an Object Model that connects to program generation and execution.

Persistence

Undefined

View

A View is a representation that projects selected parts of a Model according to a particular Purpose and Concern so they can be understood, reasoned about, evaluated, or used. A View presents part of a Model and does not own meaning independently of the source Model.

Invariant

An Invariant is a Constraint that must hold at every observable stable point while a subject is valid. It may apply to an Object, a Type, or a structure composed of multiple elements.

Transition

In UML, a Transition is a directed Relationship from a source Vertex to a target Vertex in a StateMachine. Triggers, Guards, Effects, and related elements specify when the Transition occurs and what it performs.

StateMachine

In UML, a StateMachine is a Behavior that expresses the event-driven Behavior of a system element by traversing a graph of States through Transitions triggered by Event occurrences.

Event

In UML, an Event describes an occurrence that may arise during the execution of Behavior. Receiving an Event occurrence may trigger Behavior such as a Transition in a StateMachine.

Communication

Undefined

Dependency

In UML, a Dependency is a directed Relationship indicating that the specification or implementation of a client Model Element depends semantically or structurally on the definition of a supplier Model Element.

applicative (applicative functor)

An applicative is an abstraction that allows applying a function in a context to a value in a context. It provides a way to combine independent computations via operations like pure, ap, or mapN, enabling parallel or independent evaluation.

observation

A recorded result of perceiving/measuring a phenomenon.

observability

Observability represents the property of a system or domain whereby its internal state can be inferred and understood through external observations. It goes beyond simple monitoring: by consistently collecting and correlating phenomena and observations, and interpreting them as domain events, observability enables a comprehensive understanding of system behavior.

Performance

Performance is the quality by which a system satisfies timing requirements such as processing time, response time, Throughput, and capacity under specified conditions and resources.

fault

A manifestation of a defect within the system. A technical imperfection that, if encountered during execution, may cause a Failure. Defined in IEEE 610.12.

defect

An imperfection or deficiency in a work product (designs, specifications, code, etc.). It does not meet requirements or specifications and requires repair or replacement. Defined in ISO/IEC 24765.