Standing Order Agent / Workflow module
Workflow module

A stable commerce contract over an unstable retailer surface.

Stop & Shop integration contains all retailer-specific selectors, request shapes, CSRF behavior, capability versions, and visible postconditions. The rest of the product only sees commerce operations.

9gateway operations
2adapter strategies
1sanitized catalog
0raw HAR files in Git
Boundary

Retailer gateway and discovery loop

Stop & Shop integration module
Stop & Shop integration module
Order Orchestration calls a stable RetailerGateway. Reviewed web actions and authorized observed calls can coexist behind that contract.
Gateway

Commerce operations the workflow understands

Connection
validateConnection · getAccountSummary
Discovery
listPastPurchases · listSavedLists
Catalog
searchProducts · getProduct
Cart
reconcileCart · getCheckoutSnapshot
Delivery
listDeliverySlots · selectDeliverySlot
Future boundary
placeApprovedOrder · disabled in Phase 1
Discovery

Understand the website one action at a time

  1. 01

    Isolate

    Open the approved account in a dedicated visible browser session with tracing and network observation enabled.

  2. 02

    Act once

    Perform exactly one action: open Past Purchases, search, add one item, change quantity, or open delivery slots.

  3. 03

    Correlate

    Match the visible action to requests, responses, initiators, CSRF behavior, cookies, and visible result.

  4. 04

    Sanitize

    Remove authorization, cookies, addresses, identity, loyalty data, signed URLs, and payment fields.

  5. 05

    Catalog

    Record method, path template, parameters, required headers, schema, side effect, and observed version.

  6. 06

    Contract-test

    Create sanitized fixtures, response schemas, and drift alerts. Keep a browser fallback for unstable operations.

Tooling

Use the browser’s own evidence

ToolRoleUse
Playwright network eventsRequest, response, fetch/XHR, and WebSocket observationPrimary automated discovery
Chrome DevTools NetworkHuman inspection, sanitized HAR, copy as cURL/fetchPrimary manual baseline
Chrome DevTools ProtocolPost data, response bodies, initiators, and timingDeep capture when needed
HAR fixturesSanitized contract fixtures and replayTests only; not proof of live compatibility
BrowserbaseHosted Playwright sessions and debug linksOptional cloud runtime
RG
Discovery is authorized observation, not probing

Do not enumerate unlinked endpoints, replay another user’s traffic, evade limits, bypass security challenges, or treat undocumented calls as stable permission to integrate.