# TASK 3.1: Physically Create Source-Mirror KDS Curated Tables

## Summary

Physically create the KDS source-mirror `curated` tables as part of the phase-1 runtime surface.

Status: implemented as part of TASK 2.2 so the tenant bootstrap creates the full phase-1 curated surface in one pass.

The KDS Redshift object names must use the `kds_` prefix and mirror the source tables needed by the branch, including `curated.kds_orders`, `curated.kds_items`, and `curated.kds_item_bumps`.

## Dependencies

- TASK 2.2 (internal warehouse structures)

## Files to Create

### 1. Curated DDL/bootstrap artifacts for KDS objects

Create the physical KDS source-mirror `curated` tables.

The table definitions should live as explicit SQL artifacts in `Kds.Ai.Warehouse`.

## Files to Modify

### 2. Bootstrap workflow artifacts as needed

Extend bootstrap creation so KDS source-mirror `curated` objects are created for every tenant database.

## Required Contract

The KDS `curated` tables must mirror the source KDS tables used by the current branch bootstrap and synthetic feed.

Examples include:

- `curated.kds_orders`
- `curated.kds_items`
- `curated.kds_item_bumps`

Representative columns include:

- `guid`
- `order_guid`
- `store_guid`
- `create_time`
- `update_time`
- `is_deleted`
- `status`
- `last_status`

These tables should preserve source naming and source types closely enough to support the current source-mirror branch direction.

## Acceptance Criteria

- [x] `curated.kds_orders` is physically created as a table
- [x] `curated.kds_items` is physically created as a table
- [x] `curated.kds_item_bumps` is physically created as a table
- [x] Column names follow the KDS source-mirror contract
- [x] Redshift object names use the `kds_` prefix rather than `kdsdev_`
- [x] The table definitions exist as SQL artifacts in `Kds.Ai.Warehouse`
- [x] Solution builds without errors

## Notes

- This task should align with the branch's source-mirror curated model.
- The goal in this branch is source-table mirroring, not a canonical order projection.
