Skip to content
ContractSpec
Start here

Core guide · Guides · 3 min read

Compose features with explicit dependencies

Connect capabilities, operations and provider ports without hiding what a feature needs to execute.

Source context

Source-guided · d58fa5b7

Repository links may require access. Source inspection is separate from a clean public-package installation.

AN INTERACTIVE READING MAP

Get the shape of this guide.

Move through the ideas, inspect their relationships, or make a focused reading path. The complete guide stays below.

READING SEQUENCE

Understand how the ideas connect

01 / READING POINT

Treat a feature as a set of declared dependencies

A larger feature often combines operations, policy decisions, UI surfaces and external services. Feature Hubs provide a way to make those relationships inspectable rather than burying them in application startup code.

Begin with the capability you need and list its operation references and required ports. Choose only the composition your product uses; a catalogue entry is not a reason to install the entire ecosystem.

1 / 4

0 points in your packet

Treat a feature as a set of declared dependencies

A larger feature often combines operations, policy decisions, UI surfaces and external services. Feature Hubs provide a way to make those relationships inspectable rather than burying them in application startup code.

Begin with the capability you need and list its operation references and required ports. Choose only the composition your product uses; a catalogue entry is not a reason to install the entire ecosystem.

Follow the effect gate

The inspected effect invoker first requires an active installation. It checks that the capability declares the operation and port, that a policy is bound to that operation, and that the actor has the required capability.

It then resolves the port and evaluates the policy. Where policy obligations exist, the host must fulfill them and provide evidence before the effect callback runs.

Missing conditionExpected boundaryWhat to inspect
Declared capability or operationInvocation is rejectedInstalled manifest and versioned refs
Provider portInvocation cannot proceedHost port bindings
Allowed policy decisionEffect remains deniedPolicy input and evaluator
Obligation evidenceEffect remains deniedHost fulfillment and durable evidence

Bind providers at the host

A port is the place where your concrete implementation enters the composition. It might represent storage, a queue, a provider client or another application service. Keep its lifecycle and credentials in the host.

Provider replacement is therefore an integration task: the new implementation must satisfy the expected behavior, not merely share a method name. Test the failure and recovery paths that the feature depends on.

Qualify the composition you actually deploy

Start with deterministic fixture ports and verify the declared dependencies and denial behavior. Then qualify the selected providers in the intended environment. Record what was fixture-backed and what was exercised against a real service.

A local all-in-one example demonstrates composition. It does not by itself establish that every provider, tenant configuration or production deployment has been verified.

A reusable piece comes with a set of relationships.

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.

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