Language Foundations

At the heart of SOP Lang Pipeline lies the command, its central construct. Each command is dedicated to defining a single variable. Conceptually, this variable (the subject) is brought into existence or modified by an essential verb, the command itself, which can accept multiple parameters.

Reactive Declarative Model

While one might draw parallels between a command and a traditional function call, SOP Lang Pipeline introduces a crucial distinction from imperative languages: the function embodied by the command can be invoked automatically whenever the value of the variable it defines requires recomputation. Consequently, should the values of any variables serving as parameters to the command change, the command re-executes autonomously. It is precisely this intrinsic, automatic re-evaluation that elegantly reveals the declarative and reactive nature of SOP Lang Pipeline.

In SOP Lang Pipeline, concurrency is implicit. In principle, variables that do not depend on each other can be computed in parallel. External side effects and external changes to variables can alter the effective scheduling, and these semantics are part of the broader runtime model still being refined.

Variable Markers and Literals

Syntactically, variable names in SOP Lang Pipeline adhere to common programming language conventions: a sequence of alphanumeric characters commencing with a letter. To maintain a lean syntax with minimal keywords, variable declarations are distinguished by prefixing the variable name with an @ symbol. Conversely, referencing or using a variable requires prefixing its name with a $ symbol.

This prefixing approach was deliberately chosen because SOP Lang Pipeline is engineered to facilitate user-friendly prompt engineering, a context where natural language text is anticipated to be statistically more prevalent than variable interpolations.

Within the parameters of a command, one can directly use literal string values (enclosed in single or double quotes) and numeric literals, in addition to variable references denoted by the $variable syntax.

Documents and Scope

Commands in SOP Lang Pipeline are invariably declared within documents, a concept that extends and enriches the traditional notion of a file by imbuing it with inherent structure. This framework facilitates the declaration of variables at various scopes: global (document-wide), chapter-level, or paragraph-level.

This hierarchical approach serves a dual purpose: on one hand, it allows structuring and prioritisation of variables based on pragmatic importance; on the other, it enables user interfaces that seamlessly blend paragraph content with commands. This is especially relevant for generative scenarios where natural language specifications and executable commands coexist.

Such commands can encompass generation and processing of text, images, videos, test data, test suites, scripts, and, in general, any artefact representable as a variable in SOP Lang Pipeline.

The organisation of variables, sometimes referred to as artefacts, at global, chapter, or paragraph scope affords both a top-down and a bottom-up mode of interaction: users can inspect a high-level map of artefacts and also traverse from local detail toward broader context through dependency links.

Accessing Structured Values

SOP Lang Pipeline supports dot-style member references such as $item.field in command parameters. At runtime, these references are normalised into internal chain-alias variables so that member access remains explicit in the dependency graph while preserving concise syntax in user code.

If a variable holds a JSON-like object, its properties can be accessed directly with dot notation (for example $result.age or $result.profile.name).

For custom type instances, dot notation has two roles: method invocation uses command-style member calls such as @changed folder.newer "./specs", while instance properties are read through variable references such as @absolutePath := $folder.path.

Ecosystem Context

SOP Lang Pipeline is designed as an independent yet integrable orchestration component. In current development practice, it is expected to interoperate with containerised Ploinky agents and to expose or consume orchestration surfaces through libraries such as AchillesAgentLib where agent execution layers require declarative coordination.

In practical terms, this means SOP-Lang Pipeline can be used where teams need a declarative and reactive artefact graph, while imperative orchestration layers from AchillesAgentLib or project-specific code can still coexist as complementary execution paths.