Repository navigation
feat: /sql-graph — a model's CTEs, joins and filters as a list in a pane - #29
Conversation
Each feature gets its own file under hooks/features/, called by name from features/index.ts in a fixed order: its own hooks, the session and turn events, its band line and its tool-call phases. One tool.call hook (tool-chain.ts) runs Bash and file handling in fixed phases: bashRewrite, bashGate, the call, bashAfter, editAfter, readOrEditAfter. The status line is built from parts (status-line.ts). runTool moves to altimate-cli.ts with a `write` option that goes through the CLI with --allow-write. dbt-command.ts finds the dbt invocations in a shell command line. New userConfig fields: maxScanBytes, healthBlocksPush, healthConfigPath, commentsPollSeconds, commentsInContext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subshells after keywords, case patterns, process substitution, arrays, arithmetic and function definitions parse again; quotes in a heredoc inside a substitution are text; a function or case pattern named dbt is not an invocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… newer ask is not replaced by an older answer, output is plain text Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… stay two Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…xt, a size limit on a node's SQL, model folders inside a model path, a package's models are not the project's Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review round (Claude + Codex, independent CLI runs) — findings and repliesFixes are in the latest commits on this branch.
Attack-the-fix gate (fresh Codex and Claude processes): PASS. |
readable() also returns null rather than false when a line cannot be read, matching its declared type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
review-loop: APPROVED at 423558d Confirm gate (fresh Claude + Codex, read-only): both APPROVED, no findings. |
Code Review SummaryStatus: 8 Issues Found | Recommendation: Address before merge Overview
This pass reviewed One correction carried forward: the reply "Fixed in 967dc08: removed Two of the three warnings were declined by the author as documented limits of the heuristic parser and the tool-chain fail-open policy; those files are unchanged ( Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (4 files)
Carried findings re-verified only by targeted read (unchanged by this commit): Fix these issues in Kilo Cloud Previous Review Summaries (4 snapshots, latest commit 967dc08)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 967dc08)Status: 9 Issues Found | Recommendation: Address before merge Overview
This pass reviewed One correction: the reply "Fixed in 967dc08: removed Three findings are new in this pass (inline comments posted). The three warnings below were re-verified at HEAD; two were declined by the author as documented limits of the heuristic parser, and the code is unchanged. Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (11 files)
Fix these issues in Kilo Cloud Previous review (commit c21f1f7)Status: 13 Issues Found | Recommendation: Address before merge Overview
This pass reviewed only All 13 findings below were re-verified against the current lines at HEAD Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (13 files)
Fix these issues in Kilo Cloud Previous review (commit 4d0ac76)Status: 13 Issues Found | Recommendation: Address before merge Overview
This pass reviewed One new finding comes from those commits: the launcher option tables are now a closed world ( Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (13 files)
Fix these issues in Kilo Cloud Previous review (commit 8311d7b)Status: 13 Issues Found | Recommendation: Address before merge Overview
This pass reviewed the commits after The 13 findings below are the earlier ones, re-verified against HEAD Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (15 files)
[Snapshot truncated.] Additional previous summary content was truncated to keep this comment within platform limits. Reviewed by deepseek-v4.1-flash-1017 · Input: 52.6K · Output: 7K · Cached: 527.1K |
Skip a here-string's <<< as one operator instead of refusing any << after a <, so \<<<EOF still opens a heredoc whose body is read as text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r any install path are not models, tests that prove the cut, the order, the replaced reply and the escaping Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sion, chain wiring tested - parseDbtCommand's start leaves out the shell keywords and prefix commands in front of dbt (if, then, !, time, nohup, env and its options) and keeps the assignments right before it, so a rewrite spliced between start and end keeps the line valid shell. - The status parts are cleared at session start, so an earlier session's part is not drawn again. - runTool's write option documents that the caller must have the user's yes first. - A test asserts the plugin registers the tool chain's hook and that it runs the call it is given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mands come in the order written, install paths are compared as paths from the project, outer projects are still asked Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ect: anchored prefix, absolute paths outside the project match nothing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e is not read as inside it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… is compared Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
review-loop: APPROVED at b8ab823 Verify-only gate over the review-fix commits ( |
… a substitution in a leading assignment comes first Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
parseDbtCommand: prefix options (command -v, env options, a NAME=value after a wrapper), quoted words, expansions (new dynamic field), and interleaved redirections no longer give an invocation or a literal value they cannot back; dbt's global value options and the first known subcommand are found past an unknown word. Feature phases catch a synchronous throw like a rejection, the tool chain bounds each phase with a deadline and passes the call through on timeout, and clearing the status line at session start no longer skips the rest of the start. Settings that do nothing yet say so, with lower bounds, and the README lists them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The setting descriptions and the README section describe the shipped behaviour, so a feature that implements a setting does not inherit a note saying it is inactive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te of runTool A backslash in double quotes is dropped only before $, a backtick, a quote, a backslash or a newline, and a $'...' word holding an escape is dynamic instead of reported undecoded. runTool's write route (CLI only, --allow-write) now has a test, the subcommand comment says what the parser does, and the gate stubs say what the phase deadline means for a gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thing An unquoted tilde, brace list or pathname pattern, and $- , make a word dynamic; $"..." is a quoted string; a launcher asked for its help or version reports no dbt call. The runTool write test can now fail, and the parser comments say what the code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The note moves out of the nine feature stubs, which return to their earlier content, so the packages that replace them do not each conflict on a comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
review-loop at de7025a (merged the updated foundation; 378/378 plugin tests, all Declined here:
Open follow-ups (not regressions):
|
…amic; a throwing deadline or logger drops only its phase Also tighten two tests so they reach the paths they describe: the chain registration test now runs every phase to its stub, and the MCP no-answer fallback is taken instead of a missing clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
review-loop: APPROVED at 8311d7b (reviewers: gpt-6-astra high, gpt-6.1-sol high) |
saravmajestic
left a comment
There was a problem hiding this comment.
Approving (reviewed as the delta over #30). The pane keys rows, edges and selection by node id, orders nodes topologically with a safe fallback, strips control and escape characters from everything drawn, caps SQL at 20k, and drops older requests' answers. The tool contract matches altimate-code#1735's metadata. Two non-blocking notes inline.
| if (token.kind === 'word' && /^[<>]\(/.test(line.slice(token.start, token.end))) { | ||
| const shift = token.start + 2 | ||
| for (const inner of scan(line.slice(shift, token.end - 1))) found.push(moved(inner, shift)) | ||
| } else if (token.kind === 'word') { |
There was a problem hiding this comment.
Non-blocking, merge sequencing: this branch changes the shared dbt command parser to find dbt calls inside $(…) and backticks. /sql-graph doesn't use the parser, and the change isn't in #30 or the other feature branches. Once merged, it changes what the cost gate (#24), defer (#28) and runs (#27) see; for example, x=$(dbt build) becomes held, deferred and recorded. That's arguably a fix, and the logic looks right, but it belongs in the foundation (or should at least be called out on those PRs), and it will likely conflict with #28 and #32, which also edit this file.
| const kept: string[] = [] | ||
| for (const part of relative === null ? [] : relative.split('/')) { | ||
| if (part === '..') kept.pop() | ||
| else if (part && part !== '.') kept.push(part) |
There was a problem hiding this comment.
Nit: the reply to Kilo says b8ab823 treats a path that climbs above the project root as outside it, but if (part === '..') kept.pop() on line 54 silently does nothing on an empty list, so packages-install-path: ../vendor still reads as vendor. A nested project under /repo/vendor/… is then treated as a package (no default model, no CTE line). It's rare, and /sql-graph <name> still works. Returning "outside" when there's nothing left to pop would match the reply.
There was a problem hiding this comment.
Fixed in 967dc08: a packages-install-path that climbs above the project root (../vendor) is now treated as outside the project instead of silently dropping the ..; test added. Leaving this thread open for you.
…d settings The dbt command parser now reads only the options each prefix word has (command -p, exec -c/-l/-a NAME, time -p, and -- after command, exec, nohup and env) and only known launcher options; anything else gives no invocation, since what runs is not known. A launcher's -- ends its options, a keyword after a prefix command or an assignment is a program name, and a trailing backslash makes the line unreadable, so no offset passes its end. Each case has a regression test. within() handles the work's rejection before setting the deadline, so a throwing clock leaves no unhandled rejection. The five settings now say they are not used yet, since no feature reads them in this version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r option tables `DBT_TARGET=prod exec -c dbt run` reported target prod, though exec -c clears the environment dbt starts with; exec -c now gives no invocation. Each launcher's run now reads only its own options, so an option one launcher has and another rejects (uv run --ansi) gives no invocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # plugins/altimate-code/hooks/integrations.tsx
|
review-loop: APPROVED at 4d0ac76 (reviewers: gpt-6-astra high, gpt-6.1-sol high) |
|
review-loop: APPROVED at c21f1f7 (reviewers: gpt-6-astra high, gpt-6.1-sol high) |
…ed nodes; isolate a failing feature register; drop the tsconfig that extends a missing file Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review pass at 967dc08: every thread has a reply. Fixed: Windows absolute install path, |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What this does
/sql-graph [model]opens a pane listing the model's CTEs, joins and filters from the altimate-codedbt_sql_graphtool (AltimateAI/altimate-code#1735, which merges first). With no name it uses the model Claude last read or edited.id, so two nodes with one name stay two). Pressing a row shows that node's SQL. No picture on the terminal; the list is the surface.N CTEs · /sql-graph, counted from the file. No backend call on edit.--allow-write(the plugin's MCP server stays read-only). A failure (no dbt project, no Altimate key, read-only) is shown in the pane and as the command's reply.This branch contains the Power User foundation commits; this PR's own change is
hooks/features/sql-graph.tsx, its test andSqlGraphStateintypes/index.d.ts.Verification
claude plugin test ./plugins/altimate-code(228 pass, including thesql-graphtests: ordering, command, pane, row press, same-named nodes, failure, escapes, SQL limit, model folders, edit line) andbash tests/*.sh(all pass).claude plugin validate --strictreports the same warnings as the foundation branch before this change.Cost
One backend call and one warehouse metadata read per
/sql-graph, never per edit.Demo
Review
Independent Claude and Codex reviews ran on this PR; every finding has a reply in the PR comments. Open follow-ups, not changed here: a nested monorepo project is not selected for the CLI run (plugin-wide
runToolbehaviour), docs, a second project lookup per edit, parallel asks not merged.Demo video (hosted)
P-01.mp4 — watch on Notion (Altimate workspace; recorded from the approved head of this PR).
🤖 Generated with Claude Code