The authoring path
Keep these files together while authoring:1. Establish the public evidence
Write down the evidence available to an integration developer before choosing syntax:- operations, methods, paths, and stable operation IDs;
- request parameters, bodies, content types, and validation rules;
- success and error responses;
- authentication schemes and operation permissions;
- relationships within a payload and from request to response;
- state changes, delayed work, and emitted webhooks;
- deterministic test outcomes and environmental faults; and
- examples that the provider promises to keep valid.
2. Choose one contract source
Choose the source that the provider can maintain as the complete public HTTP contract:
This guide uses OpenAPI and stores the contract in
orders.yaml. The same workflow applies to a
Smithy or semantic TypeScript source.
Before adding HCL, prove that the contract compiles:
3. Exercise one baseline operation
Choose an operation that represents the service’s main path. Createrequests/create-order.json:
x-simile-constraints for relationships inside one payload and
x-simile-from-request for request-to-response construction.
4. Compose the runnable service
CreateSimfile:
simile setup, each user decides whether a
profile may report automatically and supplies their own contact address. The Simfile cannot grant
that consent. See Issue reporting for the user flow and
Build a reporting endpoint for the receiver protocol.
For Smithy or TypeScript, replace the openapi block with one smithy or typescript block. The
Configuration reference covers local paths, URLs, listener precedence,
and remote configurations.
5. Add the smallest useful module layer
Beginmodules/orders.hcl with only the public service semantics the contract leaves unresolved. For a
stateful resource API, declaring one database can enable conservative create, read, list, and
delete inference:
POST, PUT, or PATCH response contains
one identifiable entity and the service declares one database. Add an explicit
effect when the operation uses a custom identity, writes several
entities, or has another provider-defined consequence.
Extend the module layer only when the service requires it:
Every declaration should describe behavior visible to an integrator. Opaque scenario names cover
public outcomes whose production decision rules remain private.
6. Prove the assembled definition
Describe the transient configuration before changing the local registry:--strict as the acceptance gate for the chosen baseline.
Run representative success and error operations after each material change. Capture important
cases as reproduction bundles and group them into a
conformance suite.
7. Register, set up, and start
Install the validated definition in the local registry:principal_setup workflows, create the caller profile before
starting:
~/.simile. Starting by name loads that
revision and restores compatible durable service state.
8. Verify the HTTP boundary
Keep Simile running and call it from another terminal:Definition of done
A service definition is ready for other integrators when:- the selected contract independently describes every supported HTTP operation;
- every operation has a stable
operationId; - representative valid and invalid requests select the expected public outcomes;
- important responses preserve request values and satisfy cross-field relationships;
- authentication, state changes, delayed work, and webhooks match published behavior;
- deterministic scenarios cover the exceptional paths integrators must test;
- environmental faults stay bounded and opt-in through declared profiles;
simile describe servicegives a useful public account of the service;- the fidelity audit has no unexplained findings; and
- a real client can complete its main flow against
simile start.