Typed contracts for applications & agents

One product.
Many interfaces.
The same rules.

Define your product’s behavior in TypeScript. Connect it to your API, interfaces and agent tools, with explicit inputs, permissions and approval rules.

Start with one operation in the codebase you already own.

BEHAVIOR / 001Explicit by design
{ }report.publishv1.0
INPUTreportIdstring
EFFECTPublish reportwrite
APPROVALRequired before execution↳
RESULTPublication receipttyped
↗Your APIREST adapter
▤Your interfaceBound UI
⌘Your agentMCP tool
[ shared intent ]Your handlers still do the work.
TRY A SHARED RULE

Change the rule.
Watch every interface follow.

One equipment request, three entry points. Adjust the policy and see the app, API and agent reach the same decision.

Interactive illustration · Sample data · Runs locally
01

Set the request.

02

Shape the policy.

Changing the interface never grants a role or an approval. This local fixture evaluates only the inputs shown.

Allowed by this demo policy

The local request satisfies the supplied policy.

APP

Equipment request

Studio setup · Sample workspace

€2,400.00
RequesterNo review required

Try the action and inspect the result.

APIJSON
{
  "operation": "request.submit",
  "allowed": true,
  "reviewRequired": false,
  "reviewRecorded": false,
  "role": "requester",
  "amount": 2400,
  "threshold": 5000,
  "reason": "permitted"
}
Illustrative response shape
AGENT

The next permitted step.

  1. Read the same request and actor.
  2. Check the €5,000.00 review threshold and the requester role.
  3. Offer to submit the request.
Follow the tool boundary ↗
Inspect the shared demo definition
{
  "kind": "educational-fixture",
  "operation": "request.submit",
  "reviewFrom": 5000,
  "submitRoles": [
    "requester",
    "reviewer"
  ],
  "approvalIsIndependent": true,
  "interfaces": [
    "app",
    "api",
    "agent"
  ]
}

This is an educational JSON fixture, evaluated by this page. It is not an importable ContractSpec definition.

01 Explicit behavior02 Connected interfaces03 Reviewable effectsUnderstand the boundaries ↗

Every new interface
needs to agree
with your product.

A person clicks a button. An integration calls an API. An agent invokes a tool.

When those paths implement the same operation separately, a permission change or new input requirement has several places to go wrong.

ContractSpec gives that behavior an explicit definition, then connects supported adapters and your implementations to it.

WHAT IS A CONTRACT?

A typed description of what an operation accepts, what it returns and the rules it must follow. Your handler implements the work. The configured runtime checks the boundary.

01

Define the behavior.

Inputs, outputs, policy, effects and ownership live in an inspectable contract.

02

Connect the interfaces.

Bind your handler and expose the operation through the adapters your application needs.

03

Inspect what happens.

Make successful calls, denied calls and the required evidence visible at the execution boundary.

Change the entry point. Keep the meaning.Trace the mechanism · 3 ways to look closer

Follow a request to export a report through three interfaces. The useful common ground is the registered operation and its boundary.

Where does this request begin?
A CONCRETE SITUATION

A form helps someone make a valid request.

A person selects a report and gives a reason for the export.

01 / Form

Collect the report and reason, and explain errors in the person’s language.

What changes

Labels, validation messages and the way the result is presented.

What stays explicit

The report, required reason, business implementation and configured execution checks.

FOLLOW THE CONSEQUENCE

The form can make a requirement clear. The server still needs to reject a request that bypasses the form.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

Approval belongs
at execution.

The same operation can be reached in several ways.
The approval requirement should still hold.

Interactive illustration · local fixture, not a live runtime trace.

THE DECLARED RULETypeScript excerpt
// Part of an operation definition
execution: {
  effects: ['write'],
  approval: {
    required: true
  }
}
↳

An approval requirement is explicit metadata. Enforcement also needs a configured runtime and approval port.

HTTP REQUEST · ILLUSTRATIVE

POST /reports/demo-report/publish
Content-Type: application/json

{ "reportId": "demo-report" }
↳
READY TO TRY

What happens without approval?

Attempt the operation, then add a valid fixture receipt and try again.

Handler calls in this attempt —Awaiting attempt

The illustration explains the proposed experience. The inspected REST test asserts denial before handler invocation; this page does not execute ContractSpec packages.

Inspect the source basis ↗

A small starting point.
A composable system.

Reuse product behavior while changing the experience. Add adapted interfaces, reusable capabilities and change controls as your product grows.

A / CORE

Model behavior.

Describe operations, data and events with typed contracts. Bind implementations through a runtime built around explicit boundaries.

Contracts + Runtime
B / CHANGE

Make decisions inspectable.

Connect supports scoped decisions and receipts, with durable verification supplied by a configured host. Your host performs the actual merge, deployment or effect.

Connect
C / EXPERIENCE

Adapt the experience.

RoleMorph and presentation contracts support different interfaces for different roles, with authorization kept explicit.

RoleMorph + Surfaces
D / COMPOSITION

Compose capabilities.

Feature Hubs declare their needs and provide reusable functionality. Installation, readiness and starting effects remain distinct steps.

Feature Hubs

One workflow. Two useful views.

Presentation illustration
EDITOR / PREPARE

Quarterly report

Content, supporting sources and the next review step.

Draft readyReview needed →
REVIEWER / ASSESS

Publication review

Changed content, requested effect and approval evidence.

Evidence attachedReview publication →
Shared operation report.publishPresentation changes. Backend authority stays explicit.

Built at LSSM. CompanyOS is an application built on this shared foundation, bringing contracts, operations and interfaces into a business workflow.

A reusable piece comes with a set of relationships.Trace the mechanism · 3 ways to look closer

A communication capability might need an operation, a provider port and a policy binding. Explore what happens when one piece is missing.

What is ready in the composition?
A CONCRETE SITUATION

You can inspect the promise before enabling an effect.

The capability is described, but no active installation or provider has been selected.

01 / Declare

Name the operations, capabilities and required ports.

What changes

The product can discover the capability and its requirements.

What stays explicit

A declaration alone does not send a message or initialize a provider.

FOLLOW THE CONSEQUENCE

Use the dependency map to choose what to bind. Do not treat catalogue presence as runtime readiness.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

Bring one operation.
Keep your application.

Start where several interfaces already need to agree.

Choose a bounded action with clear inputs, one handler and a failure you want to catch. Add a contract, connect two entry points and test the failure directly.

  1. 01
    Choose the boundary

    A real operation with a repeated rule.

  2. 02
    Bind the implementation

    Your existing business logic stays yours.

  3. 03
    Demonstrate the rule

    Verify both success and a denied path.

Explore the documentation ↗Check availability ↓Check the supported package versions before you start.
Choose an evaluation that can teach you something.Explore a situation · 3 ways to look closer

Keep the existing application. Make one operation explicit, then decide what the next useful proof would be.

Which situation sounds closest?
A CONCRETE SITUATION

Start with behavior you can compare.

An existing account lookup already returns a useful result to an API consumer.

What changes

The operation gains an explicit input, result, errors and ownership boundary.

What stays explicit

Its business implementation can remain in place.

FOLLOW THE CONSEQUENCE

Compare the current route with the new binding using the same valid and invalid cases. Widen the scope only after the difference is understood.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

Understand the promise.
Inspect the limits.

What do I still implement?+

Your business logic, host authentication, infrastructure and provider integrations. Contracts describe behavior; adapters and configured runtime ports connect that description to execution.

Does declaring a policy enforce it?+

Enforcement requires the appropriate runtime path and configuration. In the inspected operation model, approval is explicitly enabled through execution metadata. Descriptive tags alone do not protect an operation.

Does ContractSpec regenerate and deploy everything?+

No. Supported artifact generation exists. The inspected integration CLI still restricts generation apply to a dry run. Review, merge, deployment and real effects remain separate responsibilities.

Do I need CompanyOS or Studio?+

The developer foundation has its own adoption path. Packaged applications are separate products built on top; they are not a prerequisite for using the foundation.

Find the point where the handler can begin.Trace the mechanism · 3 ways to look closer

Take an operation that explicitly requires approval. Change one condition and inspect the expected path from the captured runtime guide.

Which request are you inspecting?
A CONCRETE SITUATION

Input preparation stops the path early.

The request omits an input required by the operation schema.

01 / INPUT

Parse and validate the request against the declared schema.

What changes

The request cannot become a valid prepared input.

What stays explicit

No visible button or descriptive tag makes the missing value valid.

FOLLOW THE CONSEQUENCE

A denial test for approval should use otherwise valid input, so it actually reaches the approval boundary.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

The example has
a source basis.

The concept is grounded in inspected repository code. It is a design review, not a fresh runtime verification or a claim of production qualification.

Approval fixture at inspected release ↗

The repository link currently requires access.

Availability matters.

Observed

Several packages have public npm metadata. That metadata and the current source tree describe different dependency layouts.

To verify

A clean, anonymous installation of the exact starter and versions advertised on the new site.

This concept

A local illustration of an approval boundary. No provider calls, backend execution or production data.

WATCH THE IDEA TAKE SHAPE

From intent to an experience
you can make your own.

A short illustrated walkthrough of shared meaning, AI-assisted creation and reusable execution.

Then try it yourself ↗
Read the walkthrough

Intent. Start with a goal. ContractSpec gives the pieces shared meaning, data, behavior and policy.

Create and run. AI can help generate source or compose supported interfaces. Reusable components and ordinary runtimes execute defined work.

Adapt. The same work can be presented differently for a desktop workspace, a mobile view or an agent, with the applicable action boundaries.

Compose. Bring domain capabilities together around the outcome: communication, billing, growth, building and more.

Download the full transcript ↓
START WITH A RULE THAT MATTERS

Give your next interface
something explicit to follow.

Your view

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.