The thesis.
Cohesive is a family of system-definition languages, initially embedded in C#, designed for agent-first authoring and human review. Its premise is that agents and people benefit from an explicit, shared representation of what a system means across application layers.
Its semantic domains include entities, relationships and queries, state transitions, multistep processes, APIs, presentation, and infrastructure requirements. These domains have distinct constructs and compilation boundaries, with typed references connecting their declarations.
Embedding preserves access to an established language, type system, tooling, and ecosystem. The resulting semantic models are independent of the C# authoring syntax: builders and source generators produce canonical IR, while validation, compilation, and interpretation consume the materialised model.
Define system semantics once, then attach multiple interpretations.
What it looks like.
Ordinary C# records supply data contracts. A domain declares an entity and its transition, a process invokes that transition, and an infrastructure model declares logical resources and readiness requirements. Namespace imports and runtime bindings are omitted.
public sealed record Order(string Id, bool Submitted);
public sealed record SubmitOrder(string OrderId);
public sealed class OrdersDomain : DomainModel
{
public DomainEntity<Order> Orders { get; }
public Transition<Order, Unit, bool> Submit { get; }
public OrdersDomain() : base(revision: "1")
{
Orders = Entity<Order>("orders");
Submit = Orders.Transition<bool>(
id: new("orders/submit"), revision: new("1"),
transition => transition
.Requires(order => !order.Submitted, order => false)
.Set(order => order.Submitted, true)
.Return(true));
}
}
[Process(id: "orders/submit-process", revision: "1")]
public sealed partial class SubmitOrderProcess(OrdersDomain domain)
: ProcessModel<SubmitOrder, bool>
{
protected override async ProcessTask<bool> Execute(
ProcessContext process, SubmitOrder input)
{
return await process.Transition(domain.Submit, input.OrderId);
}
}
public sealed class OrdersInfrastructure : InfrastructureModel
{
public OrdersInfrastructure()
{
Define(
id: new("orders"), revision: new("1"),
bindingProfileId: new("orders/bindings"),
infra =>
{
var state = infra.Resource(new("orders/state")).Persistent();
infra.Workload(new("orders/worker")).RequiresReady(state);
});
}
}
A guarded transition, a process referencing that exact transition, and logical infrastructure requirements. The process method is compiler input rather than an application callback. Storage and process-runtime bindings are supplied separately; the readiness edge alone does not establish them.
Transition expressions lower into canonical IR rather than surviving as arbitrary delegates. The Process source generator similarly translates supported asynchronous syntax into Process IR; it does not persist a CLR state machine.
Distinctive moves.
Embedded authoring, independent semantics. Typed C# builders and generated authoring projections produce portable semantic models. Direct IR construction and other producers can target the same representation.
System definition across layers. Domain operations, queries, processes, APIs, presentation, and infrastructure requirements are explicit declarations. Typed references and generated contracts connect these layers without requiring independently maintained descriptions of the same behaviour.
Capability-driven compilation. Semantic requirements are declared independently of infrastructure targets. Adapters describe capabilities, constraints, and guarantees; compilers determine whether a target can realise the requested semantics. Unsupported requirements should produce diagnostics rather than silently weaker behaviour.
Multiple interpretations. Canonical models support execution and artifact generation alongside validation, simulation, inspection, and other non-execution uses. Interpretation coverage varies by semantic domain and adapter.
Maturity.
Cohesive is an early R&D implementation with working semantic models, typed builders, validators, reference interpreters, source generators, code generators, and infrastructure integrations. Existing integrations include PostgreSQL, Cosmos DB, ASP.NET Core, Azure Durable Task, and TypeScript projections.
Its breadth creates a substantial coverage challenge. Authoring APIs are evolving, capabilities differ across adapters, and some integrations remain experimental or require further qualification. The existence of an adapter does not establish support for every semantic construct.
The Verification classification reflects explicit semantics, invariants, validation, and inspectable compilation boundaries. It does not imply comprehensive theorem proving or verified equivalence across all interpretations. Cohesive’s process language describes application workflows; agent coordination is not its primary organising principle.
Comparative claims about agent productivity remain an evaluation goal rather than an established result.
Agent tooling.
The repository includes AGENTS.md guidance covering semantic authority, deterministic lowering, capability preservation, and agentic authoring. Canonical execution documents retain identities, revisions, source maps, structured diagnostics, and semantic fingerprints.
These mechanisms support inspection of materialised semantics and attribution of diagnostics and derived artifacts to source declarations. Agents can author through typed C# surfaces while compiler and validation tooling operate on the resulting semantic models.
Agent-facing inspection and editing interfaces remain under development. Current authoring primarily uses typed C# declarations and repository documentation.
- AxissyntacticBoth provide first-class declarations spanning application concerns rather than only individual computations. Axis uses a standalone backend language shaped for small models; Cohesive embeds a family of semantic languages in C# and separates their portable models from infrastructure-specific interpretations.
- HaleverificationBoth make system structure and constraints explicit. Hale combines computation with communicating components, placement, and architectural claims in a standalone language; Cohesive models application domains and infrastructure requirements through embedded authoring surfaces and portable IR.
- SEMAPRAXverificationBoth expose explicit semantics, stable identities, revisions, and structured tooling for agent-driven evolution. SEMAPRAX derives a semantic program graph from its standalone source language; Cohesive materialises canonical system models from typed builders and generated authoring projections.