Skip to content

CAP-COM-CAT-005Organize product shelves

Markdown

CAP-COM-CAT-005

Organize product shelves

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Shelves organize items around shopper browsing needs.A shelf a store depends on is does not deleted from under it.
Surfaces
consoleapi
Intent sources
services-commerce:docs/milestones/plans/COMM-M1-plan.md#2. Scope (item 3)services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D-REC-2 (to confirm)

Controls

22 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-CRY-001 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.product-categories.readapitenant
commerce.product-categories.createapitenant
commerce.product-categories.updateapitenant
commerce.product-categories.deleteapitenant
commerce.product-categories.bulkapitenant

Business Rules

10 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01
Proposed
A category retains its supplied or name-derived identity, and another category cannot take that identity.
validationservicetest
02must prove
Proposed
Categories form a flat collection, with parent relationships reserved and refused.
validationapi, databasetest
services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#answers 400 to a parent_id: the hierarchy is reserved
03must prove
Proposed
A category accepts only a supported catalog sort as its default.
validationapi, databasetest
services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#answers 400 to a default sort outside the catalog sorts, naming the property
04must prove
Proposed
Category membership replacement preserves the supplied order without duplicate products; assigning a product’s categories appends new memberships and removes omitted ones.
policyservicetest
services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#refuses a list naming one product twice (400) and an unknown category (404)
05must prove
Proposed
A store’s home or assortment reference prevents category deletion, with the refusal reporting the number of dependent stores and up to five names.
lifecycleservicetest
services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#is refused while stores name it in their assortment, naming five of them and the count
06
Proposed
Category deletion removes its memberships and detaches its image while retaining the products.
lifecycleservice, databasetest
services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#deletes the category with its memberships and detaches its picture; a second delete is 404
07must prove
Proposed
The shared asset pipeline must read a category image as a file and retain it in the category’s permanent storage location.
origin: COMM-M1 D11 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
validationservicetest
services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#answers 400 to a picture the pipeline cannot read as a file, creating nothing
08must prove
Proposed
A complete category replacement uses the read version and refuses an intervening version change.
invariantapi, servicetest
services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#replaces at the version read and refuses the stale version 409
09must prove
Proposed
Category reads require read permission and all category writes require the matching administrator permissions.
permissionapi, consoletest
services-commerce:modules/catalog/tests/e2e/catalog-security.e2e.spec.js#refuses a read-only principal every write, 403 permission_missing
10must prove
Proposed
A full lock prevents replacing a category, and either full or deletion-only locking prevents removing it.
policyserviceobserved

Scenarios

IdGivenWhenThenProvenance
01Bookstore includes Books in its assortmentDelete Books before and after moving the store’s referenceThe dependency refusal identifies Bookstore; deletion succeeds after the reference is removedtest
services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#is refused 409 category_in_use while a store has it as its home category, naming the store, and deleted once the store moves

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.