Skip to content

feat: add automatic Altimate data workflow as an isolated pilot - #9

Draft
anandgupta42 wants to merge 23 commits into
mainfrom
feat/data-workspace-mod
Draft

anandgupta42 wants to merge 23 commits into
mainfrom
feat/data-workspace-mod

Conversation

@anandgupta42

@anandgupta42 anandgupta42 commented Oct 22, 2026 •

Copy link
Copy Markdown

This draft adds a separate automatic Altimate data workflow for Claude Code. It targets main directly and preserves plugins/altimate-code plus the original marketplace entry/metadata byte-for-byte from main 7c9b1da8d2014d786a152bf6dbb43f8237d1588a. It no longer depends on merging the default-plugin toolkit experiment. Requires core AltimateAI/altimate-code#1576, stacked on #1543. No merge, default release or public pilot publication requested.

Behavior and impact

Users install the experimental pilot and ask a data question. The semantic data skill routes to native Altimate MCP tools; no mode activation, pane-opening or workspace command is needed in ordinary use. Claude retains reasoning; this listing does not delegate to altimate run or launch another reasoning agent.

Trigger Before After
Install Prototype changed the default listing and required a compatible CLI on PATH Separate experimental listing; platform-specific pilot embeds a verified CLI
Relevant data question User enabled data mode Automatic semantic routing; no prompt rewriting or per-prompt context hook
Workspace setup needed Manual commands and MCP reconnect Explicit sign-in/link/engine-install buttons; stable core gateway works in the same session
SQL result User opened the pane Automatic non-focused pane; narrow terminals get a clickable results/setup button
Workspace conventions Legacy delegation could start another agent Bounded native context, named skills and knowledge operations
Save a decision Explicit command after inspection Explicit inspected form or user-only shortcut; receipt-bound single-block save

Local data requires no workspace sign-in. Context loads on demand and caches for 30 seconds with identity checks. Setup links without uploading existing memory and cannot silently replace a link. Approved setup continues only the same user turn; cancelled/cleared/changed conversations cannot revive old previews or continuation. SQL middleware executes the underlying call once and preserves permissions, results and errors. Previews are bounded and cleared on conversation lifecycle changes.

Claude intentionally leaves unrequested panes undrawn below 144 terminal columns. A button above the prompt opens results/setup without a slash command or automatic focus takeover, yields to surveys and preserves existing band content. Desktop/VS Code keep their pane handlers.

No automatic memory publication or model-callable memory writer. Explicit saves use stdin and a displayed account/workspace/project receipt, report local persistence separately from cloud confirmation, and do not retry uncertain publication. Workspace engine operations share one host permission surface, workspace_execute; server allowlist, identity, input-schema and SQL checks remain authoritative. This does not preserve per-operation host approval rules. Use read-only warehouse credentials.

Spec/design and full behavior delta: docs/workspace-data-mode.md. Impact is limited to users explicitly installing the separate experimental listing. Enabling both Altimate listings simultaneously is unsupported; the experimental observer detects both namespaces and refuses ambiguous operations. Disable the original listing in Claude's plugin UI once when switching. Existing default users remain unchanged.

Validation

  • 32 mod event/render/action tests pass. They cover terminal/Desktop/VS Code callbacks, explicit setup/resume, stale turns, cancellation, memory destination, query permissions/errors, automatic panes, narrow-terminal buttons and coexistence detection.
  • Removing the late-context/discovery guards makes both new stale-conversation regressions fail; restored guards pass.
  • Marketplace and both plugin directories pass strict validation; the original resolver check passes. Default plugin and original marketplace entry/metadata equal current main.
  • Real Claude Code 2.1.307 terminal loads the mod, executes native SQLite SQL, paints the result/pane, opens it through the band control and clears prior results. Workspace setup paints with actionable recovery. Captures were viewed locally; no private captures were publicly hosted.
  • The clean macOS Apple Silicon package installs through Claude's plugin manager. Zip-extracted and installed-cache copies execute unchanged .mcp.json registration with no compatible CLI on PATH: missing-auth status, correct SQLite total and source-write refusal; data remains unchanged.
  • Real Claude direct-command smoke: correct paid-order totals, write refusal and missing-server recovery, all with zero model turns and $0 model cost. This verifies the optional shortcut/runtime, not natural-prompt adoption or a performance improvement.
  • Core verification: 1,398 workspace/memory/MCP tests plus typecheck; read-only production probe lists 17 workspaces and loads matching context, with zero skill names/memory blocks returned. No production link or memory publication.

Updated live evidence: the 117-second narrated automatic-workflow demo is recorded and verified. Natural prompts execute through Altimate, SQL/results open from the automatic control, live workspace context is read, DELETE is refused, and a fresh question works after clear without reactivation. A separate real Claude natural prompt through the installed package's unchanged MCP registration returns 40|12000, with native MCP tool-call parts and no Bash/Agent. The connected-session video uses a process-local deployment/workspace override; it does not prove fresh browser sign-in/link continuation.

The refreshed six-run synthetic comparison (two tasks, one trial per arm) is 2/2 correct for each arm. Altimate adoption is 1/2 tasks in both MCP-only and automatic-mod arms; another task uses the available non-Altimate path, so universal routing is not established. Plain/MCP/mod mean list-price cost is $0.02659/$0.02396/$0.01560; mean input including cache is 30,701.5/41,295.5/41,287.5; mean host-reported turns 2/2.5/2.5; median wall time 6.181/7.6325/7.871 seconds. The tiny sample is cache/order-sensitive and does not prove savings or workspace value.

Fresh browser sign-in/link setup continuation, real workspace warehouse SQL, non-empty memory publication and Desktop/VS Code painting remain rollout checks. The native profile's development deployment is unavailable; the recorded live workspace reads preserve that profile and production bindings through a session-only override. The new demo and captures were delivered locally to the owner, not publicly hosted.

Local Codex reviewed exact head a85dfb3c25733c064f7422ea64a1fdff4bf5b81e against main: no P0/P1 findings. It verified default tree/marketplace preservation and the late-context fix. Prior independent review remains recorded. Core retains a disclosed P2: explicit engine refresh can interrupt a concurrent workspace call.

Cost side effects and rollout

No extra reasoning loop or per-row model call. Local SQL uses no separate model. Explicit workspace knowledge/memory can invoke backend models; warehouse SQL retains warehouse costs. Context is bounded and lazy. Optional engine installation invokes the existing native npm installer only after a user action.

This is not a self-contained public release. scripts/package-experimental.py verifies source hashes/new inputs and CLI capabilities, embeds a local compatible binary, records clean source commits/hash/target, and produces an isolated local marketplace zip. No latest runtime download or global CLI install. The Git source experimental entry alone lacks its runtime. Only macOS Apple Silicon has a locally built/verified pilot; Windows packaging is explicitly unsupported.

After compatible core capabilities land, prepare reviewed platform artifacts, regain model capacity, verify fresh natural-prompt/sign-in/setup/warehouse journeys, then publish only to pilot users under a separate decision. Promoting this listing to default is a later decision. Keep draft; merging is not public distribution or proof of rollout success.

anandgupta42 and others added 17 commits October 17, 2026 13:11
…mode routing

- `.mcp.json` starts `altimate-code mcp serve`, so Claude Code calls
  altimate-code's read-only data tools (warehouse_list, schema_inspect,
  sql_execute, sql_check, sql_materialize) directly; Claude's own model does
  the reasoning and no second LLM runs.
- New lean `data-question` skill: inspect value profiles before choosing
  columns or keys, compute in the database, materialize the small side for
  cross-database joins, check keys/fan-out when they matter.
- The `altimate-code` routing skill now answers data questions with the tools
  and keeps `altimate-code run` delegation for long multi-step jobs; the
  SessionStart hook and `/altimate` text match.
- Version 1.1.0-experimental; README and CHANGELOG note it needs an
  altimate-code build with `mcp serve` and describe the read-only limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… triggers

- Data questions prefer the altimate-code MCP tools and fall back to
  `altimate-code run` (analyst) when the server is missing or fails to start,
  telling the user which path was used.
- Restore delegation triggers for lineage, impact, schema diff, parity, PII,
  cost attribution, optimization, SCD2/incremental checks, docs and diffs.
- PRIVACY.md describes the local MCP server and that tool results reach the
  model provider; `sql_check` engines and materialize-first noted.
- Delegation here-docs use a per-call delimiter checked against the task text.
- CONTRIBUTING.md covers `.mcp.json` and the `data-question` skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… skill triggers

- SessionStart output now carries compact routing (MCP tools for data
  questions, analyst/fast-edit/builder delegation otherwise).
- Skill descriptions trigger on ordinary data questions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The MCP server's default toolset is now `warehouse_list`, `warehouse_add`, `sql_execute` (with `tables` for schemas and value profiles), `sql_materialize` and `answer_commit`; `schema_inspect` and `sql_check` need `mcp serve --all-tools`. The analyst agent, skills, READMEs and changelog no longer tell the model to call the hidden tools, and a missing connection is added with `warehouse_add`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…instructions carry its method

The skill duplicated the analyst agent and the MCP server instructions, and its listing was sent with every request (no session loaded it). The routing skill, /altimate and README now point at the server instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skill descriptions are listed in every request; the bodies load only on use. review 1,278 -> 268 chars, altimate-code 440 -> 214 chars. Bodies unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent prompt is re-read on every request. Keep: warehouse_add for a missing connection, value check via `tables`, every condition must filter, two readings into `readings`, policy conditions against the row, and the answer_commit finish (one field per requested item, entity and related item separate, FINAL ANSWER reply, recommit on rejection). Method steps already in the server instructions are no longer repeated. Body 3,798 -> 988 chars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hook runs once per session, but its text stays in the context and is re-read on every request. One sentence (537 -> 215 chars) keeps the routing: MCP tools for data questions, `altimate-code run` delegation otherwise, /review for dbt/SQL PRs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…call

The MCP server now lets a later batch step use an earlier step's rows (`{{label.column}}`, `{{label}}`); one line in the agent points at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server now expands `{{label.column}}` to bare comma-separated values, so the example reads `IN ({{label.column}})`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ional

The analyst now ends with one `FINAL ANSWER:` line giving every requested item in order (an entity and its related item both), which saves the commit round trip. `answer_commit` stays available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…artup

The MCP server now lists connections (and small local catalogs) in its instructions, so the analyst starts without a `warehouse_list` call; `warehouse_list` refreshes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show recent MCP query results in a session-only pane and run explicit SQL commands without a model request. Preserve tool permissions and backend checks. Add event tests, a real SQLite smoke runner and a measured comparison report.
Handle session.end for resume and logout. Add core error-shape and rejected/aborted-call regressions, and update contributor guidance.
@anandgupta42 anandgupta42 changed the title feat: add experimental SQL workspace mod feat: add workspace-aware Claude data mode Oct 22, 2026
@anandgupta42 anandgupta42 changed the title feat: add workspace-aware Claude data mode feat: add automatic Altimate data workflow as an isolated pilot Oct 23, 2026
@anandgupta42
anandgupta42 changed the base branch from feat/toolkit-mode to main October 23, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant