Status, 11 October 2026: the argument behind a decision now taken. Module JSON 1.0 was Dmitriy's evolution proposal of 8 October; the resource × verb shape is decision 004 with decision 005, designed with Yevhen the same day. On 11 October 2026 Dmitriy Zhuk and Yevhen Kariakin accepted 004 and 005, and the parts of Module JSON 1.0 worth keeping went into the contract's rules. This page keeps the comparison for the record; nothing on it is implemented.
Why resource × verb, and not Module JSON 1.0
The two proposals agree on most things and differ on five, and on each of the five the resource × verb shape is the one that still works when the shop is Shopify, the agent has eight tool rounds, and the tables are MyISAM. This page lays the five out with evidence, shows the same scenarios as request and response pairs in both shapes, and says what the resource × verb shape takes from Module JSON 1.0 and where it is still weaker.
What both proposals agree on
Both are one HTTPS endpoint per shop with the operation in the body, typed JSON with strict schemas, string ids, money as decimal strings, a platform-neutral model with platform data under extensions, no SQL or PHP over the wire, approval by the owner on the Store Deputy site and never by the model, capabilities declared by the shop, bounded reads, and conformance fixtures before a platform is called supported. The scenario matrix, the approval page and the security findings in the JSON proposal (a nonce store, binding the response to its request) are kept as they are. This is not a disagreement about direction.
The five differences
1. Where the operation ledger lives
| Module JSON 1.0 | Resource × verb |
|---|---|
The module keeps a durable journal: operationId, a hash of the normalized params, receipts for 30 days, tombstones for the life of the connection, and operations.get to read them back (JSON contract, operation rules) | The module keeps nothing. It does one conditional write per item and reports before and after. Idempotency, the ledger, retries and reconciliation are in the Store Deputy API, as in Protocol 1 (writes) |
Why the API. Three reasons, in order of weight:
- Shopify has nowhere to keep a journal. A hosted platform is reached through its Admin API; there is no module, no table in the merchant's store, no
operations.getto call. A design whose write safety depends on a module-side journal has no Shopify story. One ledger in the API serves every platform the same way (decision 005). - The proposal stops its own pilot on OpenCart 3. Its module brief says: where atomic compare, update and receipt cannot be guaranteed on non-transactional tables, "advertise reads only and return a compatibility warning" (module brief, step 3). OpenCart 3's default tables are MyISAM and have no transactions (Protocol 1, writes). Under the proposal's own rule the pilot price write on the two test shops is forbidden. A conditional
UPDATE … WHERE price = :expectedneeds no transaction, and reconciliation after an unclear answer is done by reading back, which needs no journal. - An installable module stays small. No migrations, no journal table, no retention job in the merchant's database, nothing to reconcile after the merchant restores a backup. The proposal itself lists "journal loss or backup restoration" as a case where writes must halt (JSON contract, standards). With the ledger in the API that case does not exist.
2. What the write condition is
| Module JSON 1.0 | Resource × verb |
|---|---|
expectedRevision, "a deterministic opaque fingerprint of the current canonical base price, currency and sorted storefront assignments", which "must change after relevant manual admin edits; a counter updated only by this module is insufficient" (module brief) | expected, the values of the fields being written, as the API read them before the owner approved (operation shape) |
Why the value. A value condition is one statement on every SQL platform, including MyISAM: UPDATE product SET price = :set WHERE product_id = :id AND price = :expected. A fingerprint over three things cannot be compared inside one UPDATE without a version column the platform does not have, so on OpenCart it becomes read, compare, write, which is exactly the race it was meant to close. On Shopify and WooCommerce REST neither form is native and both are emulated, so the fingerprint buys nothing there either. The value condition is also what the owner approved: "set 19.00 if it is still 20.00" is the approval card. Storefront assignment changes, which the fingerprint was protecting, are a separate writable field with its own expected (operation shape, resources).
3. Where queries run
| Module JSON 1.0 | Resource × verb |
|---|---|
products.search with a filter tree (all/any, 3 levels, 20 predicates), sort, projection, a cursor signed by the module and valid 15 minutes, case-sensitive binary text matching that "adapters must explicitly implement rather than inherit a database collation", and a 10-second query deadline (JSON contract, query semantics) | search by identifiers, get by ids, list by cursor with updatedSince. Filtering, sorting and counting happen in the API, in catalog_query_products, over data the API holds (operation shape, reads) |
Why the API. An Agentfy turn allows at most 8 model round-trips (decision 004, numbers), so a complex request must be one call either way; the question is only who executes it. If the module does, every platform must implement the same filter tree, the same binary case-sensitive matching, the same signed cursor and the same deadline. Shopify's search syntax and WooCommerce's REST filters cannot reproduce those semantics, so results would differ by platform, and shared PHP hosting cannot promise a 10-second bound. If the API does, every platform implements three cheap reads, and the query semantics are the same for every shop because one piece of code runs them. The honest cost is on the resource × verb side: the API has to scan live product.list pages to query over, which is the choice of decision 007 (proposed; the earlier copy of decision 006 was withdrawn). Dmitriy's query returns fresh data by construction.
4. How many operations a platform implements
| Module JSON 1.0 | Resource × verb |
|---|---|
| Five pilot methods; every further scenario is a new named method (the matrix names 97) with its own schema, fixtures and adapter code on each platform (scenarios, rules) | Four verbs per resource. Seven resources give 25 operations today, and a new intent for the agent is a new tool in the API, not a new module operation (operation shape) |
Why verbs. Disabling a product and changing its price are the same operation with a different field; so are moving a category and disabling a coupon. With named methods, each is a schema, a conformance case and an adapter change on OpenCart 3, OpenCart 4, WooCommerce and PrestaShop. With apply, the module implements one conditional write per resource and declares which fields it can write; the API decides what an intent means. 97 methods times four platforms is the cost the matrix would otherwise carry.
5. Envelope, HTTP statuses and signing
| Module JSON 1.0 | Resource × verb |
|---|---|
sd-module-json/1.0, method, result/error; semantic HTTP statuses (200, 202, 4xx, 5xx); RFC 9421 message signatures with RFC 9530 digests and independent direction keys, explicitly "not implemented" and behind a "jointly reviewed security profile" release gate (JSON design, connection) | Protocol 1's envelope (protocol: "1.0", op, ok); every answer from the module is HTTP 200; X-SD-* HMAC in both directions with test vectors verified against the module's PHP on 7.3 and 8.1 on 6 October 2026 (Protocol 1, signing) |
Why keep Protocol 1's. The "always 200" rule is a diagnostic: any other status, or a 200 without a valid signature, means something other than the module answered (a CDN challenge, a maintenance page, a PHP fatal), and the API reports the shop as unreachable instead of misreading a firewall's 403 as a module refusal. The HMAC scheme exists in PHP and is verified; RFC 9421 does not exist in the module and the proposal itself gates the live connection on it. The two known gaps (no nonce store, response not bound to its request) are real in both proposals and stay on the to-do list. Nothing stops a later protocol version from adopting RFC 9421; nothing in the pilot needs it.
The same scenarios in both shapes
All examples are synthetic: nothing below is output of a real shop. The Module JSON 1.0 examples are from its contract page and contracts/module-json/examples.json; the resource × verb examples are from contracts/module/operations.json.
Change one price (PRICES-01)
Module JSON 1.0 sends the approval into the shop and the module journals it:
{
"protocol": "sd-module-json/1.0",
"id": "req-demo",
"method": "products.price.set",
"params": {
"operationId": "op-demo",
"productId": "42",
"expectedRevision": "rev-before",
"amount": "19.00",
"currency": "USD",
"affectedStoreIds": ["0"],
"approval": { "id": "approval-demo", "planHash": "aaaa…", "expiresAt": "2026-10-09T12:00:00Z" }
}
}{
"protocol": "sd-module-json/1.0",
"id": "req-demo",
"method": "products.price.set",
"result": {
"operationId": "op-demo",
"state": "succeeded",
"before": { "productId": "42", "amount": "20.00", "currency": "USD", "revision": "rev-before", "affectedStoreIds": ["0"] },
"after": { "productId": "42", "amount": "19.00", "currency": "USD", "revision": "rev-after", "affectedStoreIds": ["0"] },
"completedAt": "2026-10-09T11:59:00Z"
}
}Resource × verb sends only the condition and the new value; the approval, the operation id and the receipt stay in the API, and one request can carry several independent items, here a price and a status:
{
"protocol": "1.0",
"id": "0f8e2d6c-4b1a-4c3e-9d7f-1a2b3c4d5e6f",
"op": "product.apply",
"params": {
"items": [
{ "id": "42", "expected": { "price": "19.9900" }, "set": { "price": "21.5000" } },
{ "id": "57", "expected": { "price": "18.0000" }, "set": { "price": "19.0000" } },
{ "id": "61", "expected": { "status": "enabled" }, "set": { "status": "disabled" } }
]
}
}{
"protocol": "1.0",
"id": "0f8e2d6c-4b1a-4c3e-9d7f-1a2b3c4d5e6f",
"ok": true,
"result": {
"items": [
{ "id": "42", "outcome": "applied", "before": { "price": "19.9900" }, "after": { "price": "21.5000" }, "event": "fired" },
{ "id": "57", "outcome": "conflict", "current": { "price": "18.5000" } },
{ "id": "61", "outcome": "applied", "before": { "status": "enabled" }, "after": { "status": "disabled" }, "event": "fired" }
]
}
}The second item shows the condition doing its job: the price was no longer 18.0000, nothing was written, and the owner sees the current value and may approve again. In Module JSON 1.0 the same case is an HTTP 409 with REVISION_CONFLICT and no current value in the error body.
Find a product (PRODUCTS-01)
Module JSON 1.0 searches with text, a filter tree, a projection and a sort, executed by the module:
{
"protocol": "sd-module-json/1.0",
"id": "req-demo",
"method": "products.search",
"params": {
"language": "en-gb",
"search": { "text": "Mug", "fields": ["name"], "mode": "contains" },
"filter": { "all": [ { "field": "enabled", "op": "eq", "value": true }, { "field": "basePrice", "op": "lt", "value": "100.00" } ] },
"fields": ["id", "name", "basePrice", "revision"],
"sort": [ { "field": "basePrice", "direction": "asc" } ],
"page": { "limit": 50 }
}
}Resource × verb searches by identifier and returns every match, including a variant, so an ambiguous SKU is the owner's decision and not the module's:
{
"protocol": "1.0",
"id": "0f8e2d6c-4b1a-4c3e-9d7f-1a2b3c4d5e6f",
"op": "product.search",
"params": { "identifiers": [ { "type": "sku", "value": "SD-DUP" }, { "type": "gtin", "value": "4006381333931" }, { "type": "sku", "value": "TEE-RED-L" } ] }
}{
"protocol": "1.0",
"id": "0f8e2d6c-4b1a-4c3e-9d7f-1a2b3c4d5e6f",
"ok": true,
"result": {
"results": [
{ "input": { "type": "sku", "value": "SD-DUP" }, "matches": [ { "resource": "product", "id": "42", "parentId": null }, { "resource": "product", "id": "57", "parentId": null } ] },
{ "input": { "type": "gtin", "value": "4006381333931" }, "matches": [] },
{ "input": { "type": "sku", "value": "TEE-RED-L" }, "matches": [ { "resource": "variant", "id": "312", "parentId": "310" } ] }
]
}
}The "disabled mugs under 100" question of PRODUCTS-02 is answered in resource × verb by the agent's catalog_query_products tool in the API, over live product.list pages; the module is asked only for pages:
{
"protocol": "1.0",
"id": "0f8e2d6c-4b1a-4c3e-9d7f-1a2b3c4d5e6f",
"op": "product.list",
"params": { "limit": 1, "updatedSince": "2026-09-01T00:00:00Z" }
}{
"protocol": "1.0",
"id": "0f8e2d6c-4b1a-4c3e-9d7f-1a2b3c4d5e6f",
"ok": true,
"result": {
"items": [ { "id": "42", "code": "AB-100", "sku": "AB-100", "gtin": "4006381333931", "gtins": ["4006381333931"], "mpn": null, "name": "Example kettle", "status": "enabled", "stock": { "quantity": 12, "tracked": true }, "price": { "amount": "19.9900", "currency": "EUR", "includesTax": false }, "priceRules": [], "variantPricing": "none", "storefrontIds": ["0"], "updatedAt": "2026-09-30T11:12:00Z" } ],
"nextCursor": "42"
}
}Disable products (PRODUCTS-07)
In Module JSON 1.0 this is outside the pilot schema and needs a new method; the matrix proposes catalog.product.status.set with its own schema and fixtures on every platform. In resource × verb it is the same product.apply as above with status in expected and set, and the module needs only to declare product.write.status. No new operation, no new conformance case beyond one fixture.
What the shop can do
Module JSON 1.0, capabilities.get:
{
"connectionId": "conn-demo",
"storeId": "0",
"platform": { "name": "opencart", "version": "3.0.3.5" },
"paused": false,
"methods": ["capabilities.get", "products.get", "products.search", "products.price.set", "operations.get"],
"limits": { "maxBodyBytes": 262144, "maxPageSize": 100, "maxFilterDepth": 3, "maxPredicates": 20, "maxExecutionMs": 10000 },
"price": { "currency": "USD", "scale": 4, "taxIncluded": false, "scope": "sharedProduct" }
}Resource × verb, the capabilities part of Protocol 1's store.describe, per resource and per writable field, and saying whether the condition is atomic:
[
{ "name": "product.read", "version": 1 },
{ "name": "product.list", "version": 1 },
{ "name": "product.write.price", "version": 1, "conditional": "atomic" },
{ "name": "product.write.status", "version": 1, "conditional": "atomic" }
]A driver that cannot make the write atomic says so, and the owner's approval card says so too:
[
{ "name": "product.read", "version": 1 },
{ "name": "variant.read", "version": 1 },
{ "name": "variant.write.price", "version": 1, "conditional": "emulated" },
{ "name": "order.read", "version": 1 }
]Was my change applied?
Module JSON 1.0 asks the shop: operations.get { "operationId": "op-demo" }, which the module answers from its journal, and NOT_FOUND for an id of another connection. Resource × verb asks nobody: the agent's change_status tool reads the plan and its receipt from the API's ledger, and after an unclear answer the API reads the product back with product.get and classifies the item as applied, not applied or conflict (reconciliation). The shop is contacted for a read, never for a replay.
What resource × verb takes from Module JSON 1.0
- The 125-scenario matrix as the requirements catalog, and the rule that a scenario id maps to work, not to a shipped method.
- The approval workflow page: an immutable plan, an approval on the site with the user's session, expiry, a new plan for any change.
- Strict params: unknown fields and bad values refuse the request; no silent rounding, no silent locale fallback;
limit_exceededwith the limit indetails. - The security findings: a persistent nonce store, binding the response to its request id and timestamp, SSRF-safe outbound transport, no URL from a tool argument.
- Bounded reads with a declared page limit, and a cursor that is opaque to the API.
- Receipts retained and reconciled; only the place changes, from the module to the API.
- Since 9 October 2026, as binding
rulesin the contract (operation shape): the strict envelope with a 256 KB body limit,maxBodyBytesandmaxPageSizein the manifest, the transactional-table check behindconditional, explicit identifier matching with literal wildcards, and the conformance evidence list.
Where resource × verb is still weaker, or open
- The reading strategy is decision 007 (proposed 15 October 2026, pending the founder; it proposes to withdraw the mirror of decision 006): the API keeps no copy and scans
product.listlive, with a bound of 25 pages. Module JSON 1.0 answers a filtered query from the live database in one call; the scan answers it by reading pages, which costs the shop more per question and cannot filter a catalog above the bound untilproduct.listtakes filters. - Order, customer and coupon shapes are minimal and not yet reviewed against OpenCart and WooCommerce by Artem.
- Status writes depend on platform semantics (an order status change fires the platform's notifications); the contract says "through the platform's own status change" and the first adapter must prove it.
- Both proposals leave the module without a nonce store and without response binding. Neither is safe to connect live until that is done.
- Nothing is implemented on either side. Every claim above about what works is about the local test shops and the contract checks, not about a real store.