Skip to content

Repository files navigation

AI Data Tasks

A simple 3-step workflow for doing data analysis with an AI agent — the ai-dev-tasks idea, adapted for data work with Excel/CSV files. For business users (finance, HR, audit) using any AI agent that can read files and run Python (Cursor, Claude Code, OpenCode, ...).

The three steps

  1. Brief — the AI asks what you need, examines your data, tells you what it sees, and you correct it. You approve a one-page brief. → create-analysis-brief.md
  2. Tasks — the AI turns the brief into a task list. You say "Go" to expand it, and approve it. → generate-analysis-tasks.md
  3. Do — the AI works through the tasks one at a time, showing you each result before moving on. → process-analysis-tasks.md

How to start

Use @ai-data-tasks/create-analysis-brief.md

Use case: claude_usage_july
I have this month's Claude Code usage export at ./usage-july.xlsx.
I want spend by business unit, top 20 users, and daily usage patterns.
Total spend should be roughly $48,000.

The use case line names the analysis folder and its files (claude_usage_july_analysis/, claude_usage_july_analysis_brief.md, ...), so several analyses can live in the same folder without colliding. Include the period or scope so repeat runs stay distinct (Budget_July, not Budget). If you leave it out, the AI proposes a name and asks you to confirm it.

Then:

Use @ai-data-tasks/generate-analysis-tasks.md with analysis-brief.md

Then "Go", approve the list, and:

Use @ai-data-tasks/process-analysis-tasks.md and start on task 1.1

Where everything goes

The AI creates one folder per analysis, named after the use case. Your original data files are never touched.

Budget_analysis/                  (example use-case name)
  Budget_analysis_brief.md        what we agreed to analyze, and how
  Budget_analysis_tasks.md        the task list, ticked off as work proceeds
  scripts/                     every script the AI wrote (any number can be re-checked)
  work/                        intermediate files — cleaned data, set-aside rows
  outputs/                     final deliverables only — findings, report files

What keeps the results trustworthy

Three rules run through all the files. They are the whole reason this workflow exists, so they're worth knowing as the user:

  • The AI examines your data with a script, not by glancing at it — so what it tells you about your data is measured, not guessed.
  • Every number it reports comes from a saved script — so any figure can be re-checked, and re-run next month.
  • Every step shows a check ("4,520 rows in, 4,508 used, total €1.24M — matches") — so nothing is silently lost, double-counted, or deleted.

A complete example

examples/HR_attrition/ is a real, unedited run of this workflow (in Cursor) against a public HR dataset — the approved brief with its confirmed assumptions, the ticked task list, one script per task, and findings where every breakdown reconciles to 1,470 employees / 237 leavers. Download the dataset (link in the example's README) and the scripts re-run from scratch, regenerating the committed results identically.

What keeps the results trustworthy

Three rules run through all the files. They are the whole reason this workflow exists, so they're worth knowing as the user:

  • The AI examines your data with a script, not by glancing at it — so what it tells you about your data is measured, not guessed.
  • Every number it reports comes from a saved script — so any figure can be re-checked, and re-run next month.
  • Every step shows a check ("4,520 rows in, 4,508 used, total €1.24M — matches") — so nothing is silently lost, double-counted, or deleted.

About

A guided, human-in-the-loop workflow for trustworthy data analysis with AI agents — brief → tasks → gated execution. Adapted from ai-dev-tasks for data work with Excel/CSV files. Works with Cursor, Claude Code, OpenCode, or any coding agent that can run Python.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors