Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ef50c07
fix: hands-on findings — real reach in the task band, hardcoded refs,…
hkaltai Nov 20, 2026
2f0ac68
fix: review round 1 — relations kept in large-manifest slices, model …
hkaltai Nov 20, 2026
a8d0fc1
fix: review round 2 — the model's own output list, gap bookkeeping by…
hkaltai Nov 20, 2026
6ab8041
fix: review round 3 — star sources, the runner lists the package for …
hkaltai Nov 20, 2026
8c451f8
fix: review round 4 — select * chains and joins, UNION branch names, …
hkaltai Nov 20, 2026
0d142ff
fix: review round 5 — a * the SQL cannot resolve is fingerprinted wit…
hkaltai Nov 20, 2026
298e866
fix: review round 6 — star modifiers stay unresolved, only rendered s…
hkaltai Nov 20, 2026
c07e77a
fix: review round 7 and bot threads — CTE-rendered Jinja lists, decla…
hkaltai Nov 20, 2026
26d745f
fix: review round 8 — one conservative rule for columns no list names…
hkaltai Nov 20, 2026
c89d73d
fix: review round 9 — Jinja changes keep columns the edit's, one-item…
hkaltai Nov 20, 2026
89b2516
fix: review round 10 — conditional Jinja names are no evidence, order…
hkaltai Nov 20, 2026
30c0594
fix: review round 11 — Jinja control flow read as unknown, column-les…
hkaltai Nov 20, 2026
6318470
fix: final review round — reassigned set variables unknown, quoted al…
hkaltai Nov 20, 2026
2f8b29b
fix: confirmation round — no zero-reach value candidates, exact quote…
hkaltai Nov 20, 2026
7829b4f
fix: confirmation round 2 — exact cached column names, macro and set …
hkaltai Nov 20, 2026
05c8d9a
fix: confirmation round 3 — value changes name outputs only, nested b…
hkaltai Nov 20, 2026
d2a4fbc
fix: final confirmation — function arguments are not outputs, bare re…
hkaltai Nov 20, 2026
7b0e93d
fix: confirmation follow-up — lists end at set operations, named outp…
hkaltai Nov 20, 2026
bc4c339
fix: confirmation follow-up — CASE lines are not items, FROM-less lis…
hkaltai Nov 20, 2026
37a75b8
fix: confirmation follow-up — only whole item lines name a changed ou…
hkaltai Nov 20, 2026
09f3adc
refactor: drop the hand-written SQL/Jinja parser — gaps from the ware…
hkaltai Nov 20, 2026
68f2434
fix: redesign review — upstream nodes count as dependencies, no basel…
hkaltai Nov 20, 2026
c1e4f57
fix: only refs (and ephemeral parents' refs) exempt from hardcoded re…
hkaltai Nov 20, 2026
acd60dd
fix: older gaps are columns undocumented before too; a failing shell …
hkaltai Nov 20, 2026
031a5c1
fix: bot review threads — left(…) is a value, no-tool path tested, sl…
hkaltai Nov 20, 2026
c35608c
fix: only join words take the function exemption; parenthesised predi…
hkaltai Nov 20, 2026
4506c4f
fix: the band says tracing until a value change is traced; CTE own ti…
hkaltai Nov 20, 2026
8c10f01
feat: info_toasts setting turns off the dbt helpers' toasts that repe…
hkaltai Nov 20, 2026
5b7f45e
fix: the schema.yml warning on the large-manifest path, and an exact …
hkaltai Nov 20, 2026
7dcc787
test: info_toasts off keeps a failing doctor's and a failed check's t…
hkaltai Nov 20, 2026
11e4c4e
refactor: one readsKnown decides both the CTE own-time rule and its n…
hkaltai Nov 20, 2026
2a2a8aa
fix: lineage key hints wrap; the doctor rereads the manifest after ed…
hkaltai Nov 20, 2026
67fdd5e
fix: the doctor's manifest line takes the newest read, rereads after …
hkaltai Nov 20, 2026
6fd3be6
fix: the doctor's manifest update checks it is still the newest insid…
hkaltai Nov 20, 2026
173c9bc
fix: a change marks the doctor for a reread before reading its state;…
hkaltai Nov 20, 2026
9389f2d
fix: the doctor's manifest update counts only the attempt that is wri…
hkaltai Nov 20, 2026
56aebf3
refactor: the doctor pane reads its manifest line from the files when…
hkaltai Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/altimate-code/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
"title": "Show edit impact notes",
"description": "When on, the note on what a model edit reaches downstream (read by N models, dashboards) is also shown in the transcript; off sends it to Claude and the debug log only. Optional; default: off.",
"default": false
},
"info_toasts": {
"type": "boolean",
"title": "Toasts that repeat the transcript",
"description": "When on, a toast also says what the transcript or the band above the prompt already shows: model context added for Claude, a model compiled and validated, the dbt doctor passing. Off leaves those to the transcript and the band; failures still toast. Optional; default: on.",
"default": true
}
}
}
21 changes: 21 additions & 0 deletions plugins/altimate-code/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this plugin will be documented in this file.

## [Unreleased]

### Added
- `info_toasts` (on by default): off, the dbt helpers raise no toast for what the transcript or the band already shows (model context added for Claude, a model compiled and validated, the dbt doctor passing); failures still toast.

### Fixed
- After `/clear`, the new conversation loads the team comments again (the band, and the threads Claude gets when it reads a commented model) instead of waiting for `/comments` or the next poll, and project health keeps its baseline, the changes not yet checked and the issues found (`/health` no longer says the session has no project; a check the `/clear` cut short runs again). The status line keeps the integrations and altimate-code parts; health draws its own again.
- The dbt runs the plugin starts by itself (compile and validate's `dbt show` and `dbt ls`, `/dbt-show` and Re-run, and the project health check's parse) write their artifacts to `target/.altimate-plugin/` instead of `target/`, so they no longer replace the project's `manifest.json` (with every model's compiled SQL) or `run_results.json`. The health check runs its CLI call in its own process for that, with the project's `catalog.json` copied beside its manifest. The doctor's **Run dbt parse** still refreshes the project's own manifest.
Expand All @@ -12,6 +15,24 @@ All notable changes to this plugin will be documented in this file.
- When the Query results or lineage pane sits above the prompt (a terminal under 110 columns, or not fullscreen), Claude Code gives it the same height whatever size it asks for, so the Min / Default / Max row, which did nothing there, is replaced by a line saying so.
- `--defer --state …`, `--favor-state` and `--target …` that `/defer` and `/target` add to Claude's dbt commands are no longer invisible: Claude's result says what the command ran as, and a line above the prompt shows it until the next prompt.
- **Resolve** on a thread the lagging comment list still shows after it was resolved elsewhere is done (the thread is hidden) instead of answering "not an open thread"; a reply to such a thread says it is no longer open and reads the list again.
- The end-of-task band no longer says a changed column "reaches 0 columns in 0 models" on a compiled project when its readers `select *` from it (jaffle_shop's `stg_payments.amount`, read by `orders` and `customers`). The task's copy of the manifest sat one folder below `target/`, and altimate-code reads a seed's CSV header from the folder above the manifest's, so nothing was traced through a `select *` from a seed. The copies now sit in `target/` itself (`.altimate-manifest-before.<session>.json`, `.altimate-task-manifest.<session>.json`), and the band and `/lineage-report` trace what the per-edit note traces (6 columns in 2 models there). A reach of 0 beside downstream models that may pass the column on without naming it (`select *`, `NATURAL JOIN`, columns named at run time) is now "not traced: N downstream models may read it without naming it (select *)", with a lower-bound footer instead of "✓ Every downstream model was read".
- When no output column changed but values may have (a column computed in a Jinja `{% set %}` block the select reads, as in Tuva's `core__medical_claim`), the band says "values may change in paid_amount → reaches N columns in M models": the names on the lines the change added that the manifest has as the model's columns and that reach a downstream column (impact_analysis decides both). When none qualifies it says "values may change downstream; the model-level count stands", never a count of 0.
- Compile and validate flags a model, seed, snapshot or source that the model's compiled SQL reads by its table but that dbt does not list among the model's dependencies (a `ref()` replaced by `main.stg_orders`): "hardcoded main.stg_orders: use {{ ref('stg_orders') }} — lineage can't follow it", in the band, the dbt check pane and Claude's note, which asks Claude to put the `ref()` back unless the person asked for the table. The tables come from altimate-code's `dbt_map_relations` on the SQL dbt compiled; only a table matched to a single node counts. With an altimate-code that lacks the tool, nothing is flagged.
- Compile and validate warns only about the columns an edit left undocumented. What the model returned before is read from the warehouse, not from its SQL: the last check's columns, or, on a model's first check with an undocumented column, `dbt show` of the model's built relation (`select * from {{ ref('…') }}`, one row). A column it returned before is said once a conversation, quietly ("2 undocumented before this edit"), and does not make the check a warning.
- A package repo tested from a project below it (Tuva: `integration_tests/` installs the package with `local: ../`): when the package's own packages are not installed, compile and validate runs dbt from that project (selecting the model by package and name), says "ran from integration_tests", and the doctor counts the packages installed there. A project whose packages are not installed and that nothing installs gets a one-line "not checked: dbt's packages are not installed…" note instead of a failure.
- With `show_edit_impact` on, a model Claude changes through a shell command (`python3 …`, `sed -i`, `cat > …`) gets the same per-edit impact note as an Edit: the model files under the project's model folders modified since the command started are found after it ends, and their change from the last commit is traced. The note goes to Claude's context too.
- The lineage pane moves to the model Claude is editing as the edit starts (before its impact lookup and the edit itself), and to the model a writing shell command names as it starts, instead of after the edit lands.
- At its default size the lineage pane draws a graph wider than the pane as its ends only (which fit, dashboards included), saying so; `v` shows the whole graph. Dashboards (exposures) downstream that the drawing leaves out are named under it.
- While the end-of-task band traces a change that names no output column, it says "tracing…" instead of "values may change downstream; the model-level count stands", which read as the answer before the trace of `paid_amount` came back.
- `/profile-ctes` times a CTE that reads none of the CTEs before it (a sibling) on its own, instead of as its time less the slower CTE before it (which showed `payments +0 ms` after `order_items` in `customer_revenue`): with an altimate-code that lists the CTEs each one reads, a CTE's own part is its count's time less the own parts of the CTEs it reads, directly or through another. An older altimate-code keeps the previous rule.
- The lineage pane says when the model's schema.yml changed after the manifest was written ("run `dbt parse`, then r"): its test count comes from there, and removing a model's tests left it counting them with no warning. For a manifest over 4 MiB, whose graph altimate-code builds, this needs an altimate-code whose graph names each node's schema.yml.
- The model-context toast says "N columns in schema.yml" (those listed there, not the columns the model returns) and "1 column", "1 test"; Claude's note says the same. The lineage pane's log line says "read by 1 model".
- The lineage pane's key hints (u, d, c, v, r, a) wrap to a second line in a narrow pane instead of running down its right edge a letter a line.
- The doctor pane reads its manifest line from the files whenever it is drawn (the manifest's age against the project's files, kept until a tool call or a new manifest), so a pane open since before Claude's edits no longer says "Manifest current" once a project file is newer. "dbt parse finished" is an `info_toasts` toast: the doctor shows it.
- After Apply, `/propagate` says how many downstream columns it sent to Claude this session, instead of "No column description has been written yet".
- The end-of-task band traces the first three changed columns of a model and now says how many more changed ("+ 1 more changed column, not traced here (/lineage-report <model>.<column> traces one)"), instead of listing three as if they were all.
- Claude's `dbt show` text table and **Re-run** show numbers the same way: a column of numbers in dbt's text table (`21,109.09`, `20,476.10`) is read as numbers, as dbt's JSON output gives them (`21109.09`, `20476.1`). A number with more digits than a double holds keeps its digits as text.
- `/profile-ctes`: a CTE whose count took less than the CTEs it reads took on their own (the warehouse shares their work inside the count) shows "≈0 ms (the CTEs it reads cost less inside this query)" instead of "+0 ms".

## [1.8.3] — 2026-11-19

Expand Down
3 changes: 2 additions & 1 deletion plugins/altimate-code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ When Claude mentions `altimate-dbt`, it is the dbt command line that comes with

## Settings

The plugin has seven settings, shown when you enable it (`userConfig` in `.claude-plugin/plugin.json`). All are optional: Claude Code may report them as "not set", and each then takes the default below. `dbt_mods` is used by the dbt helpers, `maxScanBytes` by the scan check (BigQuery, Snowflake, Databricks), `healthBlocksPush` and `healthConfigPath` by the project health check, the two comments settings by team comments, and `show_edit_impact` by the per-edit impact note.
The plugin has eight settings, shown when you enable it (`userConfig` in `.claude-plugin/plugin.json`). All are optional: Claude Code may report them as "not set", and each then takes the default below. `dbt_mods` is used by the dbt helpers, `maxScanBytes` by the scan check (BigQuery, Snowflake, Databricks), `healthBlocksPush` and `healthConfigPath` by the project health check, the two comments settings by team comments, `show_edit_impact` by the per-edit impact note, and `info_toasts` by the dbt helpers' toasts.

| Setting | Default | What it controls |
| --- | --- | --- |
Expand All @@ -169,6 +169,7 @@ The plugin has seven settings, shown when you enable it (`userConfig` in `.claud
| `commentsPollSeconds` | 900 | How often, in seconds, the team's comments on shared docs are fetched again in an interactive session (30 to 86400). |
| `commentsInContext` | on | Whether the open comments on a model Claude reads or edits are added to its context. |
| `show_edit_impact` | off | When on, the note on what a model edit reaches downstream is also shown in the transcript; off sends it to Claude and the debug log only. |
| `info_toasts` | on | When on, a toast also says what the transcript or the band above the prompt already shows (model context added for Claude, a model compiled and validated, the dbt doctor passing). Off leaves those to the transcript and the band; failures still toast. |

## Example prompts

Expand Down
56 changes: 49 additions & 7 deletions plugins/altimate-code/hooks/dbt-mods-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,40 @@ export function logErrors(stdout: string): string[] {

/** The node names `dbt ls --output json --output-keys name` printed: one JSON object per line, among dbt's own log lines. */
export function listedNames(stdout: string): string[] {
const names: string[] = []
// Only a model: a test selected with it by dbt's indirect selection is not the file's node.
return jsonLines(stdout)
.filter(one => typeof one?.name === 'string' && one.name && (one.resource_type === undefined || one.resource_type === 'model'))
.map(one => one.name as string)
}

/** The models `dbt ls --output json --output-keys "name version original_file_path"` lists, each with its file and version. */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: A second copy of the dbt ls JSON-line parser

listedFiles repeats listedNames' loop (strip ANSI, one line at a time, skip non-{, guarded JSON.parse) with only the field test changed, and it was inserted between listedNames' doc comment and listedNames, so that comment now sits above the wrong function. One helper that parses each JSON line once and returns the node, with listedNames and listedFiles reading the fields they need, removes the duplicate and the misplaced JSDoc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: listedNames and listedFiles now share one JSON-line parser, jsonLines (plugins/altimate-code/hooks/dbt-mods-core.ts:175).

export function listedFiles(stdout: string): { name: string; version: unknown; file: string }[] {
return jsonLines(stdout)
.filter(one => typeof one?.name === 'string' && typeof one?.original_file_path === 'string')
.map(one => ({ name: one.name as string, version: one.version ?? null, file: one.original_file_path as string }))
}

/** The JSON objects of `dbt ls --output json`, one a line; other lines (logs) are skipped. */
function jsonLines(stdout: string): any[] {
const out: any[] = []
for (const line of stripAnsi(stdout).split('\n')) {
const text = line.trim()
if (!text.startsWith('{')) continue
try {
const one = JSON.parse(text)
// Only a model: a test selected with it by dbt's indirect selection is not the file's node.
if (typeof one?.name === 'string' && one.name && (one.resource_type === undefined || one.resource_type === 'model')) names.push(one.name)
out.push(JSON.parse(text))
} catch {}
}
return names
return out
}

// A number as dbt's text table writes it: grouped by commas or not, with an optional sign and decimals.
const TABLE_NUMBER = /^-?(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?$/

/** A number from the text table as a number, unless that would round it (more digits than a double holds): then its digits as text. */
function tableNumber(cell: string): number | string {
const plain = cell.replace(/,/g, '')
const value = Number(plain)
return Number.isFinite(value) && plain.replace(/^-|\.|^0+/g, '').length <= 15 ? value : plain

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: A numeric-looking text column loses its leading zeros

TABLE_NUMBER matches any run of digits, so a string column whose values look numeric is converted too. A zip_code/account_id/customer_code column of 00501 or 000123 comes back as 501/123: the leading-zero strip in plain.replace(/^-|\.|^0+/g, '') turns a value dbt's JSON output returns as the string "00501" into a number, so the preview, Re-run and the saved history show a different value than the query returned. dbt's text table carries no type, so a cell that starts with 0 followed by a digit (/^-?0\d/) should stay text; only cells without a leading zero are safely numbers. A case with a zip_code column (00501, 02134) would pin it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: A digit-string column loses its leading zeros

TABLE_NUMBER matches any run of digits, and tableNumber returns Number('00501') → 501, so a text column of digit strings (zip_code, account_id, customer_code = 00501) is shown as 501 in the preview, Re-run and saved history, unlike the string dbt's JSON output returns. dbt's text table carries no type, so a cell that starts 0 followed by another digit (and holds no decimal point or sign) should stay text.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: A text column of digit strings is read as a number, so 00501 comes back as 501

The table has no types, and numeric[k] (line 233) only asks that every cell of a column match TABLE_NUMBER, which accepts any run of digits. A zip_code column holding '00501' therefore counts as numeric, and tableNumber returns 501 with the leading zero stripped. dbt's --output json path keeps the string, so the preview, Re-run and saved history disagree with the JSON preview of the same query. When any cell starts 0 followed by another digit, keep the whole column as text (or skip the coercion for that cell).

}

/**
Expand Down Expand Up @@ -204,7 +227,11 @@ export function textTable(stdout: string): { columns: string[]; rows: unknown[][
}
// dbt's text table elides the columns past its width as one `...` column.
const keep = columns.map((name, i) => (name === '...' ? -1 : i)).filter(i => i >= 0)
return { columns: keep.map(i => columns[i]!), rows: rows.map(row => keep.map(i => row[i] ?? null)) }
const kept = rows.map(row => keep.map(i => row[i] ?? null))
// A column of numbers is read as numbers, as dbt's JSON output gives them: the table's grouping commas and
// padded decimals (21,109.09, 20,476.10) would show apart from the same query run again through JSON.
const numeric = keep.map((_, k) => kept.length > 0 && kept.every(row => row[k] === null || row[k] === '' || TABLE_NUMBER.test(row[k]!)) && kept.some(row => !!row[k]))
return { columns: keep.map(i => columns[i]!), rows: kept.map(row => row.map((cell, k) => (numeric[k] && cell ? tableNumber(cell) : cell))) }
}
return null
}
Expand Down Expand Up @@ -754,7 +781,7 @@ export function modelContextNote(context: ModelContext, stale: boolean): string
]
if (context.description) lines.push(`- description: ${context.description.replace(/\s+/g, ' ')}`)
if (context.columns.length) {
lines.push(`- columns (${context.columns.length}):`)
lines.push(`- columns schema.yml lists (${context.columns.length}; the model may return more):`)
for (const column of context.columns.slice(0, 40)) {
const facts = [column.type, column.tests.length ? `tests: ${column.tests.join(', ')}` : null, column.description?.replace(/\s+/g, ' ')].filter(Boolean)
lines.push(` - ${column.name}${facts.length ? ` — ${facts.join(' · ')}` : ''}`)
Expand Down Expand Up @@ -814,6 +841,21 @@ export function columnDrift(documented: string[], returned: string[], quoted: st
}
}

/**
* Which undocumented columns an edit made, from what the warehouse returned, not from reading the SQL: one the model
* returned before the edit (`earlier`: the last check's columns, or, on a model's first check, what dbt showed of the
* model's relation as it was built) is from before; any other is the edit's, as is one an earlier edit in this
* conversation made and that is still undocumented (`ours`). Names match exactly (a case-sensitive `Amount` is not
* `amount`). With nothing to compare with, every column is the edit's.
*/
export function undocumentedByEdit(undocumented: string[], earlier: string[] | null, ours: string[] = []): { fresh: string[]; old: string[] } {
if (earlier === null) return { fresh: undocumented, old: [] }
const before = new Set(earlier)
const mine = new Set(ours)
const old = (name: string) => !mine.has(name) && before.has(name)
return { fresh: undocumented.filter(one => !old(one)), old: undocumented.filter(old) }
}

// What the history may keep: the plugin store takes 4 MiB of JSON in all, the history and bookmarks among
// other keys, so a cell, a query and the whole history are bounded, in UTF-8 bytes as the store counts them.
const SAVED_CELL = 200
Expand Down
Loading
Loading