diff --git a/.claude/agents/onboarding.md b/.claude/agents/onboarding.md index 1e6f74794..d030d723f 100644 --- a/.claude/agents/onboarding.md +++ b/.claude/agents/onboarding.md @@ -3,7 +3,7 @@ name: onboarding description: Orchestrates the full dataset onboarding workflow for Data Basis — from raw data → clean data → BigQuery → metadata in the backend. Spawn this agent when the user asks to onboard a dataset. --- -# Data Basis Pipeline Agent +# Data Basis Onboarding Agent This agent orchestrates the full dataset onboarding workflow for Data Basis: from raw data → clean data → BigQuery → metadata in the backend. @@ -51,9 +51,14 @@ After step 8 succeeds, output a verification checklist and wait for explicit app ✓ Cloud tables: OK ✓ Verify at: https://development.basedosdados.org/dataset/ +Table order set: +OL order set per table: + Reply "approved" to promote to prod, or describe what needs fixing. ``` +Note: ordering steps are handled inside `onboarding-metadata` (steps 7–8 of that command). If the human did not specify an order during step 8, you may ask here whether they want to adjust ordering before promoting to prod. + Do not proceed to step 9 or step 10 without the user replying "approved" (or equivalent). ## Environment diff --git a/.claude/commands/onboarding-metadata.md b/.claude/commands/onboarding-metadata.md index 8baaf1231..6ee61dc10 100644 --- a/.claude/commands/onboarding-metadata.md +++ b/.claude/commands/onboarding-metadata.md @@ -68,6 +68,15 @@ For each entity in the table's observation level list (from architecture design Track returned OL IDs — needed for column updates. +**Ordering checkpoint:** After all OLs for this table are created, ask the human: + +```text +OLs created for : , , ... +Should I set a specific display order for these observation levels? If yes, reply with the desired order (e.g. "year, municipality, financing_account"). Otherwise reply "default" to skip. +``` + +Wait for the reply before proceeding. If the human specifies an order, call `reorder_observation_levels` with the corresponding OL IDs in the requested order. + ### 3. Upload columns from architecture table Call `upload_columns_from_sheet` with: @@ -141,6 +150,17 @@ Call `create_update_table` again with the same `id` and `slug`, passing only: All other fields must be re-passed as well (the API requires them). This deferred call ensures the table record is fully persisted before the relationship is written. +## Table ordering checkpoint + +After all tables are created/updated, ask the human: + +```text +All tables registered for : , , ... +Should I set a specific display order for these tables? If yes, reply with the desired order (one slug per line or comma-separated). Otherwise reply "default" to skip. +``` + +Wait for the reply. If the human specifies an order, call `reorder_tables` with the requested slug order. + ## Summary output After processing all tables, output: