A worked example · Fictional product

PawPilot.
Goals, agents and boundaries.

Explore a fictional agentic pet-supply business, then follow one reorder capability through the contracts a software factory must implement and verify.

The customer’s request
“Reorder Milo’s usual food.
Show me the total before buying.”

The product boundary

Known food, explicit confirmation and scoped customer data. No veterinary diagnosis, no unapproved substitutions and no automatic purchase permission.

This is an educational design, not a running store or a completed factory build.

The broader agentic concept

A coordinated business.
Distinct responsibilities.

Nine conceptual roles work across customer experience and operations. The detailed walkthrough below teaches one introductory reorder slice.

Pet concierge

Maintain approved household needs and coordinate customer requests.

Authority boundary

No diagnosis or inferred product suitability.

Shopping assistant

Prepare exact-product baskets and explain options.

Authority boundary

Read-only proposals in the introductory slice. Separate deterministic checkout owns pricing, confirmation and order creation.

Subscription agent

Detect upcoming-delivery risks and propose schedule changes.

Authority boundary

Honor recorded consent and make material changes explicit.

Inventory agent

Read authoritative stock, detect shortages and manage reservation requests.

Authority boundary

Only deterministic inventory services change stock.

Procurement agent

Compare approved suppliers and prepare replenishment proposals.

Authority boundary

Supplier choice and spending follow policy and approval limits.

Fulfilment agent

Coordinate authorized orders and investigate delivery exceptions.

Authority boundary

Physical completion requires trusted operational evidence.

Customer-resolution agent

Investigate missing, damaged and incorrect orders and coordinate remedies.

Authority boundary

Eligibility and approval policy govern refunds and replacements.

Finance agent

Reconcile payments, refunds and invoices and investigate discrepancies.

Authority boundary

Provider evidence and deterministic accounting establish financial outcomes.

Operations coordinator

Track shared task state, delegate and escalate stalled missions.

Authority boundary

Delegation cannot expand another agent’s authority.

These roles describe the fictional reference concept; they are not installed agents or a complete conforming product package. Download the mission guide

Product → persona → capability

Understand the need

Inspect these contracts

The pet parent wants the exact familiar food without accidental duplicates. CAP-REORDER captures the outcome; the product record captures exclusions.

What the factory gains

The factory knows the actor, the purpose and the scope it must preserve.

Illustrative excerpt · not a complete contract
{
  "capability": "CAP-REORDER",
  "actor": "Authenticated customer",
  "non_goal": "Unapproved substitutions"
}

Requirement → acceptance → trace

Make “one order” precise

Inspect these contracts

REQ-REORDER requires customer-scoped idempotency. AT-REPLAY sends the same confirmation twice and expects one order and one reservation.

What the factory gains

A repeated network request becomes a defined behavior with a measurable assertion.

Illustrative excerpt · not a complete contract
{
  "request_count": 2,
  "same_customer_and_key": true,
  "expected_order_count": 1,
  "execution_status": "not_run_application"
}

Use case → screen → operation → data

Specify the whole interaction

Inspect these contracts

The review screen shows the exact SKU and quoted total. The operation checks ownership, confirmation, stock and quote freshness. The data contract makes the customer/key pair unique.

What the factory gains

The frontend, API and database can be built independently without inventing incompatible rules.

Illustrative excerpt · not a complete contract
{
  "operation": "POST /orders/reorder",
  "allowed_role": "customer",
  "errors": [
    "STALE_QUOTE",
    "OUT_OF_STOCK",
    "KEY_CONFLICT"
  ],
  "unique_key": [
    "customer_id",
    "idempotency_key"
  ]
}

Agent → skill → context → brain → policy → tools

Assemble a bounded agent

Inspect these contracts

The application supplies a customer-scoped SKU; the shopping skill reads fresh inventory and prepares a proposal. The brain coordinates; a deterministic service verifies confirmation before any order write.

What the factory gains

The agent can help without gaining authority from a prompt, retrieved text or memory.

Illustrative excerpt · not a complete contract
{
  "skill": "SKILL-REORDER",
  "context": "Fresh stock for selected SKU",
  "brain": "Structured proposal within a call budget",
  "policy": "Customer confirmation required"
}

Scenarios → integrations → risks

Design for the uncomfortable cases

Inspect these contracts

Stock may disappear, the quote may change, a customer may send another customer’s order ID, or the provider may time out after acceptance. Every case needs an explicit outcome.

What the factory gains

The factory builds controlled failure behavior instead of improvising after launch.

Illustrative excerpt · not a complete contract
{
  "provider_timeout": "Mark outcome uncertain; reconcile before retry",
  "wrong_customer": "Refuse without leaking order data",
  "changed_price": "Require a new confirmation"
}

Release → environment → dependencies

Separate building from going live

Inspect these contracts

A sandbox can support implementation and integration tests. Live payment requires separate provider-readiness evidence and externally provisioned credentials.

What the factory gains

A completed sandbox build does not silently become permission to charge real customers.

Illustrative excerpt · not a complete contract
{
  "build_mode": "sandbox",
  "live_gate": "Verified provider readiness",
  "secret_location": "Outside the package"
}

Pilot → build results → independent review

Return inspectable proof

Inspect these contracts

Freeze the input. Run the reorder slice, then the full declared scope. Record the actual implementation, test outputs and database assertions. Log defects and obtain independent review.

What the factory gains

The delivery claim is scoped to a specific package and execution rather than an unverifiable “done.”

Illustrative excerpt · not a complete contract
{
  "package": "Frozen manifest digest",
  "application_tests": "Actual execution evidence required",
  "reviewer": "Distinct from builder",
  "current_example_status": "not_run_application"
}

Stress the promise

What should the builder do?

Choose a fault to inspect its required behavior. These are prescribed outcomes, not executed test results.

Inspect the worked example

Inspect the pieces.
See how they connect.

Explore every element

Optional design input

Business meaning.
Clear responsibilities.

Supply what you know. Ontology and the intended agent operating model may be omitted or partially described. Selected executable profiles still require their declared contracts.

LayerPawPilot meaningFactory use
OntologyPreference is not confirmation. Confirmation refers to one exact quote.Keep quote, confirmation, order and reservation distinct in implementation and tests.
ResponsibilitiesAssistant proposes; customer confirms; order service enforces policy.Implement role scope, approval gates and handoffs.
Factory brainPlan quote storage, confirmation UI, inventory mapping and replay tests.Coordinate build work with separately authorized repository tools.
SkillsPrepare an availability proposal; checkout separately prices it and requests confirmation.Reuse or implement a verified procedure. Declaring it does not install it.
ToolsAssistant reads stock; separate checkout creates an order after current policy checks.Bind real adapters and enforce permissions at execution.
ContextCustomer identity, quote, expiry, fresh stock and current policy.Retrieve scoped inputs with provenance and freshness.

When the information is incomplete

Known: the assistant prepares an availability proposal. Unknown: the warehouse-to-SKU mapping or purchase approver. Continue independent work; resolve those gaps before dependent actions. An omitted description leaves core validity unchanged and grants no authority.

The factory brain builds the software. A product agent’s brain operates inside the delivered product with separate tools and permissions.