← ClaudeAtlas

retail-build-warehouselisted

Author the silver + gold migration SQL for a mapped retail table from its APPROVED source-map, then STOP before executing. Use after a table's mapping gate is CLEARED in the Seshat BI repo and someone asks to build the silver/gold SQL, write the migration, or fill the retail-orchestrate build seam. Author-and-stop: it writes warehouse/migrations/*.sql FILES only, never connects to a database, never applies the SQL, and HARD-STOPS at any judgment call the map does not already answer.
Kemetra/Seshat-BI · ★ 2 · API & Backend · score 68
Install: claude install-skill Kemetra/Seshat-BI
# retail-build-warehouse Turns an APPROVED `mappings/<table>/source-map.yaml` into the two migration `.sql` files -- `silver` (typed/cleaned flat table) then `gold` (Kimball star) -- in the order the medallion playbook proves load-bearing. It fills the silver/gold `[SEAM]` the `retail-orchestrate` conductor parks at. The agent is the runtime: this is a procedure you follow, authoring SQL by adapting the proven `warehouse/migrations/0003`/`0004` shape. There is NO codegen engine, NO `.sql.tmpl` template, and NO `retail build` CLI -- by design (the source-map cannot carry the transform logic; an engine would emit only boilerplate). That is a recorded design decision, not an omission to be fixed. ## Author vs execute (read first) - **You AUTHOR `.sql` files. That is in-scope** -- writing reviewable migration text, no side effects, the same category as `source-mapping` authoring `mappings/`. - **You NEVER execute.** Do not open a DB connection, do not run the migration, do not run the Phase-5 PK dry-run or the Phase-6 orphan/reconcile checks -- those need live data and are the deferred DB-write seam (creds + the `db` extra, Principle VIII). Authoring -> static `seshat check` -> a HUMAN applies the SQL -> only then `retail-validate`. Never claim the silver/gold tables exist or were validated. ## Preconditions (STOP unless all hold) 1. **Canonical gate signal:** `mappings/<table>/readiness-status.yaml` -> `stages.mapping_ready.status == pass` WITH a matching `app