Imported from tomqwu/databricks_examples (
AGENTS.md). Install upstream withnpx skills add tomqwu/databricks_examples. Copyright stays with the author.
Repository Agent Guide
This repository is documentation-heavy and notebook-heavy. Future agents should treat the repo files, not chat history, as the source of truth.
Read Order
README.mdabac/README.md- The target notebook(s) under
abac/
Primary Working Area
The main maintained implementation area is abac/.
Key files:
abac/00_CC_Mapping_Setup.ipynb: createsvw_cost_center_mapping_bootstrapabac/README.md: current ABAC implementation contractspec-as-code/: structured policy/taxonomy inputs
ABAC Non-Negotiables
- Final metric outputs are anchored to filtered
Master_AUs. - Cost Center-driven metrics bridge through
vw_cost_center_mapping_bootstrap. - Canonical Cost Center normalization is shared across source-side and mapping-side logic.
- TP notebooks preserve one-to-many fan-out from
third_party_unit_mapping. - Final outputs must still return every in-scope master AU with a concrete default response.
Debug And Reasoning Output Standard
Customer-facing ABAC debug/reasoning queries follow this pattern:
- AU-level summary table first, when practical
- key identifiers on the left:
BusinessID,AU_Name,Business_Segment,QuestionID - result column:
Response - bridge or trace columns next
- calculation detail columns next
- explanation column such as
Calculation_Formula,Debug_Reason,Why_Yes, orWhy_No In_ABAC_AU_Listat the end for master-list confirmation
Required maintenance rule:
- if a debug/reasoning query output changes, update the inline
-- Output columns:comment block immediately above that query's finalSELECTin the same change
Notebook Inventory
eba01: Coupa + Finance EBA logic with AU-level debug revieweba02: Public Official EBA logiceba04: non-Public Official / threshold EBA logiceba06: donation-focused finance logiceba07: marketing-focused finance logicemp01: Canadian PEP yes/no logicemp03: lower-of ABAC and CoC training complianceemp04: flagged investigation/case routing countemp05: contingent-worker high-risk logicemp07: flagged OBA employee routing countgeo02: high-risk travel logictp01: high-risk jurisdiction engagement counttp02: high-value engagement percentagetp03: targeted KPI / product-service yes-no logictp04: sole-source plus jurisdiction-risk counttp05: government interaction / permit / approval count
Change Hygiene
- If
00_CC_Mapping_Setup.ipynbchanges, downstream notebooks depending onvw_cost_center_mapping_bootstrapshould be rerun. - Prefer comment-only notebook edits when the request is documentation-only.
- Keep
abac/README.mdaligned with shared conventions rather than leaving important context only inside notebooks or chat.