feat: dbt_project_health tool — reuse altimate-core dbt health checks

Closed
MD
2mo ago
+212-1

Summary

Wires the new Rust dbt health checks (altimate_core::dbt::health, added in AltimateAI/altimate-core-internal#762) into altimate-code, so dbt governance / modelling / documentation / test checks run directly against a dbt project's files — no compiled manifest.json required — through the @altimateai/altimate-core napi binding.

Changes

  • Bridge + dispatcher: new altimate_core.dbt_project_health bridge-method type and a Dispatcher.register handler calling core.dbtProjectHealth(projectDir, configJson?, catalogPath?).
  • Tool: DbtProjectHealthTool (dbt_project_health) — takes a project_dir (+ optional config_path, catalog_path), runs the checks, and formats findings grouped by severity. Registered in the tool registry and the altimate barrel export.
  • Dep: bumps @altimateai/altimate-core 0.5.1 → 0.8.0 (the version that exports dbtProjectHealth).

Dependency

Requires @altimateai/altimate-core 0.8.0, published from AltimateAI/altimate-core-internal#762 (stacked on #761). Merge/release that first.

Verification

TypeScript typecheck is clean on all changed files against the 0.8.0 core types (verified by overlaying the freshly-built core index.d.ts). End-to-end, the underlying core returns findings for a sample project (25 findings across 13 check codes on the fixture).

🤖 Generated with Claude Code


Summary by cubic

Adds dbt project health checks that run directly on project files and a deterministic config inference flow, powered by @altimateai/altimate-core 0.8.0. You can now generate a per-project .altimate/dbt-health.yml and have the health tool pick it up automatically.

  • New Features

    • Bridge + dispatcher for altimate_core.dbt_project_health and altimate_core.dbt_health_infer_config.
    • dbt_project_health tool: runs checks on files; accepts project_dir with optional config_path/catalog_path; auto-discovers .altimate/dbt-health.{yml,yaml,json}; outputs findings with severity counts.
    • dbt_health_config tool: infers and writes .altimate/dbt-health.yml per project; adds /dbt-health-config command to infer then run health; tools registered and exported.
  • Dependencies

    • Bumps @altimateai/altimate-core from 0.5.1 to 0.8.0.
    • Requires @altimateai/altimate-core 0.8.0 to be published first.

Summary by CodeRabbit

  • New Features
    • Added dbt project health tooling to analyze projects and report findings, with support for optional configuration and catalog inputs.
    • Findings are normalized, sorted by severity and code, and summarized with per-severity counts; each finding includes messages and recommendations when available (including file/identifier context when present).
    • Added a dbt health-config capability and command to infer and write .altimate/dbt-health.yml, returning the written path(s) and resulting severity counts.