Add impact analysis, training import tools, and CI validation features

Merged
AN
7mo ago
+760-30

Summary

This PR adds three major features to enhance dbt DAG analysis, team knowledge management, and CI/CD integration:

  1. Impact Analysis Tool (impact-analysis.ts): New tool that analyzes downstream impact of model/column changes across the dbt DAG. Combines manifest parsing with column-level lineage to show affected models, tests, and exposures. Includes severity classification (SAFE/LOW/MEDIUM/HIGH) and actionable recommendations for different change types (remove, rename, retype, add, modify).

  2. Training Import Tool (training-import.ts): Bulk import training entries from markdown documents (style guides, naming conventions, glossaries, playbooks). Parses markdown sections and imports them into the training system with capacity management and dry-run preview mode.

  3. CI Check Template (ci-check.txt): New command template for pre-merge SQL validation that analyzes changed files, checks dbt project integrity, runs schema validation, and generates CI-friendly reports.

  4. Enhanced CLI Features:

    • Added --max-turns budget limit option to run command for CI/enterprise governance
    • Improved yolo mode to respect explicit deny rules from session config
    • Increased training limits: TRAINING_MAX_PATTERNS_PER_KIND from 20 to 50 entries and TRAINING_BUDGET from 16KB to 48KB for enterprise teams
  5. Improved Onboarding:

    • Updated quickstart guide with practical examples and command reference table
    • Enhanced TUI tips with prioritized beginner and data engineering tips
    • Added first-time user onboarding hint on home screen
    • Expanded /discover command to detect additional cloud warehouse credentials (Snowflake, BigQuery, PostgreSQL, Databricks, Redshift)
  6. Tool Registry: Registered new ImpactAnalysisTool and TrainingImportTool in the tool registry.

Test Plan

  • Impact analysis tool tested via manifest parsing and downstream traversal logic with sample dbt projects
  • Training import tool tested with markdown parsing and capacity management
  • CLI max-turns enforcement tested with session abort logic
  • Yolo mode deny rule checking tested with permission reply logic
  • Existing tests pass; new tools follow established Tool.define() patterns

Checklist

  • New tools follow established patterns (Tool.define with zod schemas)
  • Documentation updated (quickstart.md, command templates)
  • Tool registry updated with new tools
  • Error handling and user feedback included
  • Enterprise limits increased for team scalability

https://claude.ai/code/session_01M6rR2wXn4PfMoUASy1qghV

Summary by CodeRabbit

  • New Features

    • Impact analysis to assess downstream effects of model changes
    • Bulk training import to add team knowledge from markdown
    • CI check script template for pre-merge SQL/dbt validation
    • First-time onboarding hints and beginner tips in the TUI
  • Improvements

    • Quickstart updated with expanded data-engineering command references and next steps
    • Increased training capacity limits
    • CLI option to limit assistant turns and stricter permission blocking via deny rules