learntodriveai.dev/Data Engineering/Designing a Governance and Quality Architecture Before Any Code
Data EngineeringProject 186 units

Designing a Governance and Quality Architecture Before Any Code

Grace BandaDirector · National blood service · Blantyre, Malawi
Email · from Grace
Staff who need to check inventory levels can see donor names and their infectious disease test results. This is unacceptable. … But privacy must be the first design constraint, not something we add later.
Chat with Grace

What you hand back

  • A PII taxonomy under the Malawi Data Protection Act
  • A masking strategy and six-role access model
  • A retention policy that keeps donor-to-unit traceability
  • Audit-trail, quality, and observability designs
  • A working warehouse built to those designs
  • A regulator-facing compliance package with a coverage map

6 units

  1. Unit 1: Grace's Email and the Design-First Decomposition

    Read Grace's email, reply to her, study the Data Protection Act extract, and decompose the design-first principle into artifacts.

    Open unit 1
  2. Unit 2: The PII Taxonomy

    Write the PII taxonomy before any code, classifying every data element on the Act's categories and the donor's consent tier.

    Open unit 2
  3. Unit 3: Masking Strategy and Access Model

    Draft the masking strategy and the access model, and take the masking strategy to Priya Venkatesh for review.

    Open unit 3
  4. Unit 4: Retention, Audit, Quality, and Observability

    Write the retention policy, audit-trail design, quality architecture, and observability architecture, keeping donor-to-unit traceability intact.

    Open unit 4
  5. Unit 5: Implementation Against the Design Contracts

    Load the seed data and build the dbt project, ingestion, and checks against the signed-off design contracts.

    Open unit 5
  6. Unit 6: Verification Coverage and the Compliance Handoff

    Compose the verification coverage map and the compliance package for the Data Protection Authority and the Ministry of Health.

    Open unit 6
Read the full brief

Grace Banda at the Malawi National Blood Service emails you with one sentence of scope: privacy must come first, not as an afterthought but as the first design constraint. There is no inherited system, no template, no pipeline code on day one.

The discipline skills: a PII taxonomy written before any model, using the Malawi Data Protection Act's vocabulary alongside the donor-consent axis it does not name; a masking strategy, access model, retention policy, and audit-trail design each derived from the artifact above it; a quality architecture written for the Data Protection Authority with the engineering detail in an appendix; transformation, ingestion, and observability shaped to honor the design package already on paper; an implementation the design has already constrained; a coverage map at the close.

The AI-direction lesson: agents reorganise again — by design surface this time, one agent per artifact, each reading only the upstream artefacts it depends on and writing only on the artifact it authors. The decomposition is the architecture's coherence guarantee. Without it, AI's per-component coherence drifts into per-component contradiction — a masking strategy that refers to categories the taxonomy dropped, an access model that ignores the retention rule. The regulatory-interpretation calls — which Data Protection Act category applies where, what donor consent actually covers, why cold-chain "real-time" is really a 5-minute batch — stay with you.

Your Role

You are the governance architect for the blood service's first design pass. You reply to Grace in her register, open a discovery thread, decompose the design-first frame into a sequence of artefacts, write each in the order the constraints demand, bring the taxonomy and the masking strategy to Priya Venkatesh for review, implement against contracts you have already signed off, and deliver Grace a working system plus a regulator-facing compliance package the Data Protection Authority can read.

The scaffolding is thin. No taxonomy template, no masking template, no access-model template, no quality-architecture template. Grace names a principle; you decompose it.

The AI relationship sits at autonomous. You design the decomposition before any agent is asked to draft anything, scope each agent tightly to what it needs to read and what it is allowed to write, and hold the constraint flow yourself — the upstream artifact is signed off before the downstream agent is even configured.

What's New

Last project you audited SurBauxiet's inherited warehouse against a ministry memorandum — forensic work on a system that already ran, agents organized by work role, no senior colleague.

This project nothing runs on day one. Genuinely new: the PII taxonomy as the first artifact written; a constraint-flow sequence where each artifact carries forward as named constraints into the next; per-design-surface agents in place of per-work-role; Priya Venkatesh back to review the taxonomy and the masking strategy where her calibration shapes everything downstream; a quality architecture written in regulator vocabulary before any dbt model exists; a coverage map tying every taxonomy category, access role, retention rule, and audit invariant to a verification surface.

The hard part: holding the design-first discipline when AI is fluent and the implementation tools are familiar. Asked to "set up the dbt project," AI will scaffold one, write a staging model, and apply a generic hash to anything that looks like PII. You refuse until the taxonomy is reviewed and the masking strategy is named.

Tools

  • dbt, Soda Core, BigQuery, Dagster, GitHub Actions, Claude Code, Codex CLI, MCP, path-scoped CLAUDE.md — all carry-forward. No new tools.
  • The distinctive practice is the per-design-surface agent organization: one agent per artifact — taxonomy, masking, access, retention, audit, quality, observability — each with read scope only on its upstream dependencies and write scope only on its own artifact. The third agent-organization axis after P16 (per-consumer-domain) and P17 (per-work-role).
  • Codex CLI (optional, carried forward from earlier projects) is a second-tool reading you can point at the taxonomy and the masking strategy to catch cross-document drift. No unit requires it; the cross-check this project depends on is the one you do yourself in Unit 4.

Materials

You'll receive:

  • A project governance file (CLAUDE.md) — design-first context: client, the design-first principle, the constraint-flow sequence, the per-design-surface agent organization, verification targets, commit convention.
  • Blood-service operational picture (blood-service-context.md) — what the service does layer by layer: collection at centres and mobile teams, infectious-disease testing, processing into components, cold-chain storage, distribution to 50+ hospitals, donor-to-unit-to-patient traceability.
  • Malawi Data Protection Act extract (malawi-dpa-extract.md) — the Act's relevant sections in its own language. The taxonomy designer reads this directly.
  • Discovery prompt sheet (discovery-prompts.md) — starter targeted questions for the thread with Grace. The hidden constraints surface only on questions that ask after them.
  • Source seed data (data/mbts_raw/) — seven CSVs of representative source data across donors, donations, test results, processing, cold-chain readings, distribution, and transfusions. Held in reserve through Units 1-4; not loaded until the design package is signed off.

Deliberately not provided: any template for the taxonomy, masking strategy, access model, retention policy, audit-trail design, quality architecture, or compliance package. The SurBauxiet workspace does not carry forward — fresh project root.

Materials · 11 files
Start Project 18

You work at a computer with a terminal. Signed in, your place is saved.