learntodriveai.dev/Analytics & BI/Encoding Analytical Judgment as Infrastructure
Analytics & BI·Project 12·7 units

Encoding Analytical Judgment as Infrastructure

**Track:** Analytics & BI

§ Brief

You're analysing 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.