Skip to content

Commit 7428845

Browse files
shane530claude
andcommitted
docs: update README and CHANGELOG for V2 release
Add What's New in V2 section highlighting bring-your-own-data, interactive onboarding, knowledge system, self-learning, brand theming, and 606 tests. Fix stale references to deleted scripts and setup docs. Update counts (18 agents, 39 skills, 20 commands). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ec96577 commit 7428845

2 files changed

Lines changed: 112 additions & 46 deletions

File tree

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.0.0] - 2026-02-23
6+
7+
### Added
8+
- Interactive onboarding: `/setup` interview learns role, data sources, business context
9+
- Knowledge infrastructure: corrections, learnings, query archaeology, organization knowledge
10+
- Self-learning loop: feedback capture, correction logging, proven SQL pattern retrieval
11+
- YAML-based brand theming with WCAG-compliant palettes (`themes/brands/`)
12+
- Pipeline run tracking: `/runs` to list, inspect, compare, and clean up runs
13+
- Comms drafter agent for Slack/email/exec summary output
14+
- Business context system: glossary, metrics, products, teams per organization
15+
- Notion ingest skill for importing business context from Notion workspaces
16+
- Entity resolver for cross-dataset disambiguation
17+
- 8 new slash commands: `/setup`, `/runs`, `/business`, `/log-correction`, `/architect`, `/notion-ingest`, `/setup-dev-context`, `/compare-datasets`
18+
- 9 new skills: archaeology, feedback-capture, log-correction, setup, setup-dev-context, runs, business, notion-ingest, architect
19+
- 606 tests with synthetic fixtures (no external data dependencies)
20+
- Health check system for data connectivity diagnostics
21+
- Schema migration helpers for knowledge file versioning
22+
23+
### Changed
24+
- Fully dataset-agnostic: agents resolve tables/columns from active manifest, not hardcoded names
25+
- Removed bundled NovaMart dataset — bring your own data with `/connect-data`
26+
- Removed legacy setup scripts (`download-data.sh`, `build-duckdb.sh`) and setup docs
27+
- Updated CLAUDE.md with V2 workflow, agent index, and skill table
28+
- Python requirement bumped to 3.10+
29+
30+
### Fixed
31+
- Pipeline resume reliability improved with persistent state management
32+
- Chart palette now validates WCAG contrast ratios
33+
534
## [1.0.0] - 2026-02-19
635

736
### Added

README.md

Lines changed: 83 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
# AI Analyst
1+
# AI Analyst v2
22

3-
> [!IMPORTANT]
4-
> **Note from Shane — February 22, 2026**
5-
>
6-
> This repo was last pushed to on February 20. Since then, the system has grown significantly through testing on more complex, real-world datasets. Everything below works, but the version we're running locally is substantially ahead of what's here. Major update coming in the next couple of days.
7-
8-
[![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
3+
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
94
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
105
[![Claude Code Required](https://img.shields.io/badge/requires-Claude%20Code-blueviolet.svg)](https://claude.ai/code)
6+
[![Tests](https://img.shields.io/badge/tests-606%20passing-brightgreen.svg)](#)
117

128
A complete AI analyst system powered by Claude Code. You ask a business question. Claude frames it, explores your data, finds the root cause, builds a story, and hands you a branded slide deck with speaker notes. The whole thing takes minutes, not days.
139

14-
Connect your own data with `/connect-data` or use the included example datasets.
10+
**Bring your own data.** No bundled datasets to configure — connect your CSVs, DuckDB, or warehouse with `/connect-data` and start analyzing immediately.
11+
12+
**18** specialized agents | **39** auto-applied skills | **20** slash commands | DAG-based parallel execution | PDF + HTML export
13+
14+
---
15+
16+
## What's New in V2
1517

16-
**17** specialized agents | **30** auto-applied skills | **14** slash commands | DAG-based parallel execution | PDF + HTML export
18+
V2 is a ground-up rebuild of the intelligence layer. The pipeline and agents from V1 still work the same way — you won't notice a difference in how you use it. What changed is everything underneath.
19+
20+
| Area | V1 | V2 |
21+
|------|----|----|
22+
| **Data** | Bundled NovaMart e-commerce dataset | Bring your own — CSV, DuckDB, Postgres, BigQuery, Snowflake |
23+
| **Onboarding** | Manual setup, read the docs | `/setup` interview learns your role, data, and business context |
24+
| **Memory** | Stateless across sessions | Knowledge system persists corrections, learnings, query patterns, business glossary |
25+
| **Self-learning** | None | Captures feedback, logs corrections, retrieves proven SQL patterns — never repeats the same mistake |
26+
| **Theming** | Hardcoded chart style | YAML-based theme system with brand colors, WCAG-compliant palettes |
27+
| **Business context** | None | Organization knowledge base — glossary, metrics, products, teams. Notion ingest. |
28+
| **Pipeline** | Single run, restart on failure | Run tracking (`/runs`), reliable resume, comms drafter for Slack/email output |
29+
| **Testing** | Minimal | 606 tests with synthetic fixtures, no external data dependencies |
30+
| **Dataset coupling** | NovaMart table names hardcoded in agents | Fully dataset-agnostic — agents resolve from active manifest and schema |
1731

1832
---
1933

@@ -46,8 +60,7 @@ npm install -g @anthropic-ai/claude-code
4660
```bash
4761
git clone https://github.com/ai-analyst-lab/ai-analyst.git
4862
cd ai-analyst
49-
bash scripts/setup.sh
50-
bash scripts/download-data.sh
63+
pip install -e ".[dev]"
5164
```
5265

5366
**3. Start Claude Code**
@@ -56,19 +69,19 @@ bash scripts/download-data.sh
5669
claude
5770
```
5871

59-
**4. Try it**
72+
**4. Connect your data and go**
6073

6174
```
62-
Why is our conversion rate declining?
75+
/connect-data
6376
```
6477

65-
Or go straight to the full pipeline:
78+
Or skip the wizard and just ask a question with your data in a directory:
6679

6780
```
68-
/run-pipeline data_path=data/your_dataset/ question="Why is conversion dropping?"
81+
/run-pipeline data_path=data/my_csvs/ question="Why is conversion dropping?"
6982
```
7083

71-
For full setup (MotherDuck, MCP connections, troubleshooting): [setup/prerequisites.md](setup/prerequisites.md)
84+
For full setup details: [docs/setup-guide.md](docs/setup-guide.md)
7285

7386
---
7487

@@ -88,7 +101,7 @@ Claude queries the data and returns an answer with a chart. Simple questions get
88101
/run-pipeline data_path=data/your_dataset/ question="What's driving the decline in conversion?"
89102
```
90103

91-
The pipeline runs 17 agents across 4 phases: Frame the question, Analyze the data, Build the story, Create the deck. You get a validated analysis, branded charts, a narrative, and a slide deck with speaker notes. Exports to PDF and HTML.
104+
The pipeline runs 18 agents across 4 phases: Frame the question, Analyze the data, Build the story, Create the deck. You get a validated analysis, branded charts, a narrative, and a slide deck with speaker notes. Exports to PDF and HTML.
92105

93106
### 3. Explore a dataset
94107

@@ -118,7 +131,7 @@ Claude generates a chart following Storytelling with Data methodology: warm off-
118131

119132
## How It Works: The Pipeline
120133

121-
When you run `/run-pipeline`, Claude orchestrates 17 agents across 4 phases:
134+
When you run `/run-pipeline`, Claude orchestrates 18 agents across 4 phases:
122135

123136
```
124137
1. FRAME 2. ANALYZE 3. STORY 4. DECK
@@ -144,7 +157,7 @@ You don't have to run the whole thing. Five execution plans let you run just the
144157

145158
| Plan | Use When | What Runs |
146159
|------|----------|-----------|
147-
| `full_presentation` | Complete analysis to slide deck | All 17 agents |
160+
| `full_presentation` | Complete analysis to slide deck | All 18 agents |
148161
| `deep_dive` | Analysis without presentation | Phases 1-2 only |
149162
| `quick_chart` | Just need one chart | Chart Maker + Design Critic |
150163
| `refresh_deck` | Re-do the presentation layer | Phases 3-4 (reuses analysis) |
@@ -206,11 +219,19 @@ Tier 6 (sequential) Storytelling --> Deck Creator --> Slide Review -->
206219
| `/datasets` | List all connected datasets | `/datasets` |
207220
| `/switch-dataset` | Change the active dataset | `/switch-dataset my_dataset` |
208221
| `/connect-data` | Add a new data source | `/connect-data` |
222+
| `/setup` | Interactive onboarding interview | `/setup` |
209223
| `/metrics` | Browse the metric dictionary | `/metrics conversion_rate` |
210224
| `/history` | View past analyses | `/history` |
211225
| `/patterns` | View recurring patterns | `/patterns --global` |
212226
| `/export` | Export results in various formats | `/export slides` or `/export email` or `/export slack` |
213227
| `/forecast` | Generate a time-series forecast | `/forecast` |
228+
| `/runs` | List, inspect, compare pipeline runs | `/runs` |
229+
| `/business` | Browse organization knowledge | `/business glossary` |
230+
| `/log-correction` | Log a data or methodology correction | `/log-correction` |
231+
| `/architect` | Multi-persona planning methodology | `/architect` |
232+
| `/notion-ingest` | Import business context from Notion | `/notion-ingest` |
233+
| `/compare-datasets` | Compare metrics across datasets | `/compare-datasets` |
234+
| `/setup-dev-context` | Add codebase context for dev teams | `/setup-dev-context` |
214235

215236
Or just ask in plain English. "Show me conversion by device" works as well as any command.
216237

@@ -241,32 +262,17 @@ Your Data --> chart_helpers.py --> Base Chart (150 DPI)
241262
- Collision detection checks for overlapping text with 3 auto-fix strategies: offset the label, reduce font size, or drop the least important label. Charts with unresolved collisions halt the pipeline.
242263
- The deck uses branded HTML components: KPI cards, finding cards, recommendation rows, so-what callouts, before/after panels, timelines, and more
243264
- A lint gate validates every deck before export: checks frontmatter completeness, HTML component usage (minimum 3 types), valid slide classes, slide count, and pacing
244-
245-
**Helper modules:**
246-
247-
| Module | What It Does |
248-
|--------|-------------|
249-
| `chart_helpers.py` | Core SWD functions: `swd_style()`, `highlight_bar()`, `highlight_line()`, `action_title()`, `annotate_point()`, `save_chart()`, `stacked_bar()`, `retention_heatmap()`, `funnel_waterfall()`, `check_label_collisions()` |
250-
| `stats_helpers.py` | Statistical tests: proportion tests, mean tests, Mann-Whitney, chi-squared, bootstrap CI, effect size interpretation |
251-
| `analytics_helpers.py` | Analytical utilities for segmentation, decomposition, and driver analysis |
252-
| `forecast_helpers.py` | Time-series forecasting with trend detection and seasonality |
253-
| `marp_linter.py` | Validates Marp decks: frontmatter, HTML components, slide classes, pacing rules |
254-
| `marp_export.py` | Exports decks to PDF and HTML via Marp CLI |
265+
- YAML-based theming with brand color overrides and WCAG-compliant palettes (see [docs/theming.md](docs/theming.md))
255266

256267
---
257268

258269
## Your Data
259270

260-
### What ships with the repo
261-
262-
| Dataset | Path | Description |
263-
|---------|------|-------------|
264-
| Hero | `data/hero/` | Guided exploration dataset |
265-
| Examples | `data/examples/` | Curated public datasets with README guides |
271+
This repo ships clean — no bundled datasets. Connect your own data and the system builds context around it.
266272

267273
### Connect your own
268274

269-
Run `/connect-data` for a guided setup wizard. Supported sources:
275+
Run `/connect-data` for a guided setup wizard, or `/setup` for a full onboarding interview. Supported sources:
270276

271277
- **CSV files** — drop them in a directory, point Claude at it
272278
- **DuckDB** — local or MotherDuck
@@ -276,6 +282,10 @@ Run `/connect-data` for a guided setup wizard. Supported sources:
276282

277283
The system auto-profiles your data, creates schema documentation, notes data quirks, and remembers context across sessions in `.knowledge/datasets/`.
278284

285+
### Example datasets
286+
287+
Curated public datasets with README guides are available in `data/examples/`.
288+
279289
### Fallback chain
280290

281291
If your primary connection fails, the system falls back automatically:
@@ -326,15 +336,15 @@ working/ # Intermediate files (safe to delete)
326336
| Change how Claude thinks | Edit `CLAUDE.md` (the AI's persona, rules, workflow) |
327337
| Add a new skill | Create `.claude/skills/my-skill/skill.md`, reference it in `CLAUDE.md` |
328338
| Add a new agent | Create `agents/my-agent.md` using `agents/CONTRACT_TEMPLATE.md` as a starting point |
329-
| Change the slide theme | Edit `themes/analytics-light.css` or create a new theme CSS |
339+
| Change the slide theme | Create a YAML theme in `themes/brands/` (see [docs/theming.md](docs/theming.md)) |
330340
| Add deck components | Edit `templates/marp_components.md` (snippet library) |
331341
| Modify the pipeline | Edit `.claude/skills/run-pipeline/skill.md` (rules, checkpoints, execution) |
332342
| Add to the agent DAG | Edit `agents/registry.yaml` (dependencies, execution order) |
333343

334344
---
335345

336346
<details>
337-
<summary><strong>All 17 Agents</strong> (click to expand)</summary>
347+
<summary><strong>All 18 Agents</strong> (click to expand)</summary>
338348

339349
Agents are markdown prompt templates in the `agents/` directory. Each defines a multi-step workflow with `{{VARIABLES}}` that get filled in at runtime. To invoke one, ask Claude to run it or use `/run-pipeline` to orchestrate all of them.
340350

@@ -378,6 +388,7 @@ Agents are markdown prompt templates in the `agents/` directory. Each defines a
378388
|-------|-------------|---------------|
379389
| storytelling | Converts findings into a stakeholder-ready narrative with executive summary, findings, insight, and recommendations | 15 |
380390
| deck-creator | Builds a branded Marp slide deck with HTML components, speaker notes, and correct theme styling | 16 |
391+
| comms-drafter | Generates stakeholder communications: Slack summary, email brief, exec summary | 19 |
381392

382393
### Standalone
383394

@@ -390,7 +401,7 @@ Agents are markdown prompt templates in the `agents/` directory. Each defines a
390401
---
391402

392403
<details>
393-
<summary><strong>All 30 Skills</strong> (click to expand)</summary>
404+
<summary><strong>All 39 Skills</strong> (click to expand)</summary>
394405

395406
Skills are instruction files in `.claude/skills/` that Claude follows automatically when a trigger condition matches. You don't invoke them manually. When you ask for a chart, the Visualization Patterns skill activates. When you start an analysis, the Data Quality Check skill runs.
396407

@@ -404,6 +415,7 @@ These skills shape every interaction:
404415
| close-the-loop | Every recommendation gets a decision owner, success metric, follow-up date, and fallback plan |
405416
| data-quality-check | Validates data completeness and consistency before analysis begins |
406417
| data-profiling | Deep-profiles schema, distributions, temporal patterns, and anomalies |
418+
| feedback-capture | Captures user corrections and methodology guidance to the learnings system |
407419
| first-run-welcome | Adaptive onboarding for new users based on available data |
408420
| guardrails | Pairs every success metric with a guardrail metric; checks positive findings for trade-offs |
409421
| knowledge-bootstrap | Loads active dataset context, schema, quirks, and user profile at session start |
@@ -415,6 +427,7 @@ These skills shape every interaction:
415427
| tracking-gaps | Identifies when required data doesn't exist and produces instrumentation requests |
416428
| triangulation | Cross-references findings against multiple sources before presenting |
417429
| visualization-patterns | Ensures every chart follows SWD design standards |
430+
| archaeology | Retrieves proven SQL patterns from query archaeology before writing new queries |
418431

419432
### On-Demand (Slash Commands)
420433

@@ -435,8 +448,15 @@ These activate when you use a command:
435448
| patterns | `/patterns` | View recurring patterns across analyses |
436449
| forecast | `/forecast` | Generate time-series forecasts |
437450
| compare-datasets | `/compare-datasets` | Compare metrics across two datasets |
451+
| setup | `/setup` | Interactive onboarding interview for profile, data, and business context |
452+
| setup-dev-context | `/setup-dev-context` | Add codebase context for dev teams |
453+
| runs | `/runs` | List, inspect, compare, and clean up pipeline runs |
454+
| business | `/business` | Browse organization knowledge (glossary, metrics, products, teams) |
455+
| log-correction | `/log-correction` | Deliberate correction logging for methodology fixes |
456+
| architect | `/architect` | Multi-persona planning methodology for new projects |
457+
| notion-ingest | `/notion-ingest` | Crawl Notion workspace to extract business context |
438458

439-
### Presentation
459+
### Presentation & Knowledge
440460

441461
| Skill | What It Does |
442462
|-------|-------------|
@@ -457,10 +477,12 @@ Python modules in `helpers/` that agents call during execution:
457477
| Module | What It Does |
458478
|--------|-------------|
459479
| `chart_helpers.py` | Core SWD charting: `swd_style()`, `highlight_bar()`, `highlight_line()`, `action_title()`, `annotate_point()`, `save_chart()`, `stacked_bar()`, `retention_heatmap()`, `sensitivity_table()`, `funnel_waterfall()`, `big_number_layout()`, `check_label_collisions()` |
480+
| `chart_palette.py` | WCAG-compliant color palettes with brand override support |
460481
| `chart_style_guide.md` | Full SWD reference: color palette, declutter checklist, chart decision tree, anti-patterns |
461482
| `analytics_chart_style.mplstyle` | Matplotlib style file: off-white background, no top/right spines, sans-serif, 150 DPI |
462483
| `marp_linter.py` | Validates Marp decks: frontmatter, HTML components, slide classes, pacing, title collisions |
463484
| `marp_export.py` | Exports Marp decks to PDF and HTML via Marp CLI with theme resolution |
485+
| `theme_loader.py` | YAML-based theme system with brand color loading and inheritance |
464486

465487
### Data and SQL
466488

@@ -489,23 +511,39 @@ Python modules in `helpers/` that agents call during execution:
489511
| `structural_validator.py` | Layer 1: schema, primary keys, completeness checks |
490512
| `logical_validator.py` | Layer 2: aggregation consistency, trend logic |
491513
| `business_rules.py` | Layer 3: plausibility checks against domain rules |
514+
| `business_validation.py` | Business rule validation against organization knowledge |
492515
| `simpsons_paradox.py` | Layer 4: Simpson's Paradox scanner |
493516
| `confidence_scoring.py` | Synthesizes all 4 layers into an A-F confidence grade |
494517

518+
### Knowledge & Context
519+
520+
| Module | What It Does |
521+
|--------|-------------|
522+
| `context_loader.py` | Loads active dataset context, schema, quirks at session start |
523+
| `archaeology_helpers.py` | Query archaeology: retrieve and match proven SQL patterns |
524+
| `business_context.py` | Organization knowledge: glossary, metrics, products, teams |
525+
| `entity_resolver.py` | Disambiguates entity references across datasets |
526+
| `metric_validator.py` | Validates metric definitions against schema |
527+
| `schema_migration.py` | Handles schema version migrations for knowledge files |
528+
| `miss_rate_logger.py` | Tracks knowledge system miss rates for improvement |
529+
495530
### System
496531

497532
| Module | What It Does |
498533
|--------|-------------|
499-
| `error_helpers.py` | Student-friendly error messages with suggestions |
534+
| `error_helpers.py` | Friendly error messages with suggestions |
535+
| `file_helpers.py` | Atomic file writes, content hashing, safe YAML I/O |
536+
| `health_check.py` | System health diagnostics for data connectivity and dependencies |
500537
| `lineage_tracker.py` | Tracks data lineage from source through transformations to findings |
538+
| `pipeline_state.py` | Pipeline state management for run tracking and resume |
501539

502540
</details>
503541

504542
---
505543

506544
## Requirements
507545

508-
- **Python 3.9+** (3.10+ recommended)
546+
- **Python 3.10+**
509547
- **Node.js 18+** (for Claude Code)
510548
- **Claude Code** with a [Claude Pro subscription](https://claude.ai/pro) ($20/month)
511549
- **Internet connection** (for Claude API and optional MotherDuck)
@@ -514,9 +552,8 @@ Python modules in `helpers/` that agents call during execution:
514552

515553
## Getting Help
516554

517-
- **Setup issues:** [setup/prerequisites.md](setup/prerequisites.md)
518-
- **MCP configuration:** [setup/mcp-config.md](setup/mcp-config.md)
519-
- **MotherDuck setup:** [setup/motherduck-setup.md](setup/motherduck-setup.md)
555+
- **Setup guide:** [docs/setup-guide.md](docs/setup-guide.md)
556+
- **Theming:** [docs/theming.md](docs/theming.md)
520557
- **Questions or bugs:** Open a [GitHub Issue](https://github.com/ai-analyst-lab/ai-analyst/issues)
521558

522559
---

0 commit comments

Comments
 (0)