learntodriveai.dev/Analytics & BI/Encoding Analytical Judgment as Infrastructure
Analytics & BIProject 127 units

Encoding Analytical Judgment as Infrastructure

Natasha BrownOwner and Promoter · Live music venue and events company · Kingston, Jamaica
Slack · from Natasha
I need help understanding my numbers. I've been running on vibes and I think it's costing me money 😅
Chat with Natasha

What you hand back

  • A profiling skill for new datasets
  • A pre-commit hook guarding data quality
  • A scoped data quality auditor agent
  • Metric definitions recorded in project memory
  • A Metabase dashboard of event profitability

7 units

  1. Unit 1: Natasha's late-night Slack and the business discovery

    Read Natasha's late-night Slack thread, then question her about the venue, event mix, revenue and costs.

    Open unit 1
  2. Unit 2: Author the first skill -- data profiling as encoded workflow

    Write a profiling skill that checks any new dataset the same way every time it loads.

    Open unit 2
  3. Unit 3: Write the first pre-commit hook -- data quality as deterministic guard

    Add a pre-commit hook that blocks a commit when a dataset has no profile.

    Open unit 3
  4. Unit 4: Multiple MCP connections and permission design

    Restrict the DuckDB connection to read-only, vet a second server, and record each access decision.

    Open unit 4
  5. Unit 5: Configure the first delegated agent -- data quality auditor in Codex CLI

    Configure a read-only data quality auditor in Codex CLI and review the audit report it produces.

    Open unit 5
  6. Unit 6: Run the profitability analysis with the full infrastructure

    Clear stale entries from project memory, write the metric definitions, and run the profitability analysis.

    Open unit 6
  7. Unit 7: Deliver the reusable profitability profile and close

    Build a filterable Metabase dashboard Natasha can open before booking an event, and close out.

    Open unit 7
Read the full brief

You're analyzing event profitability for a live music venue owner in Kingston, Jamaica — and building the infrastructure that will keep the analytical judgment consistent across every dataset, session, and agent that follows.

The discipline skills: profitability analysis with messy revenue streams (door, bar, merch, sponsorship allocations), data profiling as a repeatable workflow, metric definitions that survive the life of a dataset, and a reusable deliverable an owner can run before booking a new event.

The AI-direction lesson: directing by design rather than in real time. Up to now, your judgment has lived in the session — you remembered to profile, you remembered to check the definition, you remembered to verify. In this project, that judgment moves into infrastructure. A skill file encodes the profiling workflow once and fires consistently every time it's invoked. A pre-commit hook blocks work that skips data quality. A delegated agent runs the quality audit with permissions you scoped — not you, a worker you configured. AI will execute a vague skill outside its intended trigger, treat a silently-passing hook as success, and use the broadest permissions available unless you design the boundary. The encoding is yours to design.

Your Role

You're the analyst, but you're also the architect of the environment the analysis runs in. The profitability question — which events actually make money — is the deliverable. The skills, hooks, permission scopes, and delegated agent are what make that deliverable reliable the next time Natasha asks, and the time after that.

The relationship with AI shifts. You'll direct AI to help draft skill files and hook configurations, but you own the scoping decisions — when the skill should fire, what the hook blocks, what a delegated agent can and cannot touch. AI will propose, broadly. You constrain, deliberately.

What's New

Last time, you evaluated a pricing change for a spice exporter — power analysis, practical significance, and an honest recommendation when the data might not be conclusive.

This time, the analytical work sits on territory you already know. What's new is everything around it. You'll write your first SKILL.md, configure your first pre-commit hook, design permission scopes for MCP connections, evaluate whether a third-party MCP server is trustworthy enough to grant access, and configure a delegated agent in a second AI coding tool you haven't used before. You'll also curate project memory across sessions rather than letting it accumulate on its own.

The hard part isn't the analysis. It's deciding which piece of your analytical judgment belongs in memory, which belongs in a skill, which belongs in a hook, and which belongs in an agent's scope — and getting the boundaries right the first time.

Tools

  • Claude Code (with DuckDB MCP active — established)
  • Codex CLI (second AI coding tool — introduced this project, the unit that uses it walks through setup)
  • DuckDB (local database, MCP-connected)
  • Python (pandas, matplotlib/seaborn)
  • Jupyter notebooks
  • Git and GitHub, with pre-commit hooks (new)
  • CLAUDE.md and AGENTS.md (project memory — established)
  • SKILL.md files (new)
  • A second MCP connection beyond DuckDB (new)
  • Metabase via Docker (for the final deliverable)

Materials

  • Event data — two years of event-level records covering date, type, artist lineup, ticket price, attendance, door and bar and merch revenue, sponsorship allocation, and the full cost breakdown. About 200 events.
  • Venue data — capacity, legal restrictions, partner venue rates.
  • Sponsorship contracts — which sponsors covered which months and events, and which allocations are event-specific versus annual.
  • CLAUDE.md — starter project memory with the business context and data sources filled in, and deliberate empty sections for metric definitions, skill triggers, and hook configuration. You populate those as the infrastructure is built.
  • Reference documentation — SKILL.md format, the pre-commit framework, Codex CLI agent configuration, and guidance for evaluating a third-party MCP server.
Materials · 16 files
Start Project 12

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