Worker for the narrow catalog/product/SKU consolidation packet in the BigBright ERP.
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use for features in the Catalog Surface Consolidation packet that touch:
/api/v1/accounting/catalog/**, /api/v1/production/**, and duplicate /api/v1/catalog/** write pathsNone.
mission.mdAGENTS.mdvalidation-contract.mddocs/developer/catalog-consolidation/01-current-state-flow.md, 02-target-accounting-product-entry-flow.md, 03-definition-of-done-and-parallel-scope.md, and 04-update-hygiene.md..factory/services.yaml, .factory/library/architecture.md, .factory/library/environment.md, .factory/library/user-testing.md, and .factory/library/catalog-surface-consolidation.md if present./api/v1/catalog/** as the public catalog hostPOST /api/v1/catalog/brands creates brands; POST /api/v1/catalog/products consumes a pre-resolved active brandId-BULKerp-domain/src/main/resources/db/migration_v2.sizes / colorsopenapi.jsonerp-domain/docs/endpoint_inventory.tsv).factory/library/frontend-handoff.md when it exposes affected catalog routes/contracts04-update-hygiene.md exactly. Do not leave split truth behind.bash scripts/gate_fast.sh only when the feature explicitly requires broad-signal proof. If mission AGENTS.md documents unrelated pre-existing broad-gate failures, do not widen scope to repair them during an in-scope catalog feature; record them exactly if they are the only remaining broad-gate reds.git diff --check before handoff.401/403 as sufficient evidence of removal.Your handoff must make shortcuts obvious. Include:
{
"salientSummary": "Collapsed product creation onto the canonical `/api/v1/catalog/products` flow, removed the public `/api/v1/catalog/products/bulk` and `/api/v1/accounting/catalog/**` write surfaces, and added explicit variant-group persistence with downstream finished-good/raw-material readiness. Updated the OpenAPI snapshot, route inventory, and packet docs so the surviving public contract is `/api/v1/catalog/**` only.",
"whatWasImplemented": "Added a Flyway v2 migration and persistence changes for explicit variant-group linkage, rewired `CatalogController` product create/preview/search to the downstream-ready write path, removed legacy inline brand fallback fields from the canonical product DTO, and retired the stale accounting/production catalog public mappings. Replaced stale route-anchored tests with canonical-host tests, updated repo-root `openapi.json`, refreshed `erp-domain/docs/endpoint_inventory.tsv`, and rewrote the catalog-consolidation docs and `.factory/library/frontend-handoff.md` to match the surviving contract.",
"whatWasLeftUndone": "`docs/code-review/flows/manufacturing-inventory.md` still references the retired accounting bulk-variants route and should be cleaned in the next contract-alignment feature if it is not already covered there.",
"verification": {
"commandsRun": [
{
"command": "cd /home/realnigga/Desktop/Mission-control/erp-domain && MIGRATION_SET=v2 mvn -Djacoco.skip=true -Dtest='CatalogServiceProductCrudTest,ProductionCatalogServiceBulkVariantRaceTest,ProductionCatalogFinishedGoodInvariantIT,ProductionCatalogRawMaterialInvariantIT,OpenApiSnapshotIT' test",
"exitCode": 0,
"observation": "Targeted catalog/readiness/OpenAPI packet suite passed after replacing stale route expectations."
},
{
"command": "cd /home/realnigga/Desktop/Mission-control && bash scripts/gate_fast.sh",
"exitCode": 0,
"observation": "Repo fast gate passed with the catalog packet changes."
},
{
"command": "cd /home/realnigga/Desktop/Mission-control && git diff --check",
"exitCode": 0,
"observation": "No whitespace or conflict-marker issues remain in the packet diff."
}
],
"interactiveChecks": [
{
"action": "Posted a new brand to `/api/v1/catalog/brands`, used the returned `brandId` in `POST /api/v1/catalog/products`, and confirmed the created SKU family was discoverable on `/api/v1/catalog/products?brandId=...`.",
"observed": "Canonical brand-then-product flow succeeded without touching retired hosts."
},
{
"action": "Sent authenticated negative requests to `/api/v1/accounting/catalog/products`, `/api/v1/production/brands`, and `/api/v1/catalog/products/bulk`.",
"observed": "All retired routes returned unmapped/not-supported outcomes instead of legacy handler responses."
}
]
},
"tests": {
"added": [
{
"file": "src/test/java/com/bigbrightpaints/erp/modules/production/controller/CatalogControllerCanonicalProductIT.java",
"cases": [
{
"name": "createProduct_requiresResolvedActiveBrandId_andRejectsInlineBrandFallback",
"verifies": "Canonical product create uses only a resolved active brandId and rejects legacy inline brand fields."
},
{
"name": "previewAndCommit_shareCandidateSet_andPersistVariantGroupLinkage",
"verifies": "Preview is non-mutating, commit matches preview planning, and multi-member create persists explicit group linkage."
}
]
}
]
},
"discoveredIssues": [
{
"severity": "medium",
"description": "A stale review document under `docs/code-review/**` still names the retired accounting catalog route as current truth.",
"suggestedFix": "Clean the remaining route reference in the contract-alignment feature so docs and route inventories are fully consistent."
}
]
}
mission.md, AGENTS.md, or validation-contract.md.