# Start with one shared behavior

Choose a small operation, understand its boundaries, and decide what to adopt next.

Source context: Source-guided
Source: https://github.com/lssm-tech/contractspec/blob/d58fa5b7de53a947811e5cc68346be028ce18528/packages/foundation/contracts-spec/README.md

## Choose a behavior that already matters

Start with an action or query that more than one part of your product needs: submitting a request from a form, fetching the same account data through an API, or letting an agent request a reviewed export. A useful first operation has a clear input, an observable result and an existing owner.

The first milestone is modest: one definition that you can inspect, one implementation you understand, and one boundary you can test. You can keep your application, database and deployment process while evaluating that seam.

- Pick an operation small enough to explain in a few sentences.
- Write down one successful request and one request that must fail.
- Identify the existing business handler and the source of identity.
- Choose one interface first; add a second when the first is understood.

## Choose your learning path

These docs separate learning the model from operating a complete system. You do not need to learn every package or install a managed application before understanding an operation.

| Your goal | Read next | What you should leave with |
| --- | --- | --- |
| Understand the model | First operation | The ability to identify a contract, handler and runtime boundary |
| Adopt incrementally | Existing codebase | A plan for wrapping one existing implementation |
| Expose an agent tool | API and MCP | A shared registry with transport-specific context |
| Review consequential actions | Approval and policy | An explicit decision and receipt boundary |
| Look up a symbol | Reference map | The declaration and version behind an API |

## Understand what is shared

A contract describes an operation's identity, data and requirements. A handler performs the business work. A registry binds them, and adapters expose that registered operation to particular interfaces. The host provides identity, policy decisions, provider clients and persistence.

Sharing the definition reduces the number of places that describe the same behavior. It does not remove the need to implement the behavior or decide who may invoke it. Keep that separation visible as you add a second interface.

## Finish the first pass

You are ready to expand when you can point to the contract used by both callers, explain where the implementation lives, and demonstrate that an invalid or unapproved request does not reach the effect you intended to protect.

The source-guided pages in this preview are tied to an inspected integration snapshot. Use Installation and release channels before copying package commands into a new project; a source example and an externally verified install are different forms of evidence.

## Related examples

- [Write your first contract](https://lssm.co/examples/minimal-user-contract/): Follow user.create from an email schema to a typed handler. Start with the smallest maintained example.

