Livi improvements - #103
Merged
Merged
Conversation
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:2, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
- Create LawBook sections for interpret rules (schema, sql, data-quality, chart-rules, count)
- Create PromptBook template (prompts/interpret.md) with {{ref:}} directives
- Embed chart_types.json for user message (matching Python script format)
- System prompt: self-contained with {{org_id}}/{{org_name}} variables
- User message: query + org context + dbctx schema + chart types
- Add VegaLiteSpec + Name fields to Interpretation struct
- Use LLM's vega_lite_spec with DATA_PLACEHOLDER replacement
- Fix classify test mocks to use 'response' field
- Fix ChatDebugPage Unicode escape + InteractiveChart prop names
- Add /chat-debug route and mega menu entry
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
Explains the why (a safety net for changes that skip commit/push/PR checks) and the mechanism (per-repo toggle, cron schedule, last/next run tracking), with both the schedule list and schedule-edit screenshots. LiveReview Pre-Commit Check: skipped (iter:2, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…ction Keeps the Org-Wide Harness table and screenshot as they were, and links to the fuller Scheduled Reviews explanation now living alongside the other Features entries, without reordering the existing ones. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:2, coverage:22%)
Adds a stable #scheduled-reviews anchor, bolds each capability's lead phrase, and splits the "why" into short bullet points instead of a run-on paragraph. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
…into livi-improvements
The #scheduled-reviews anchor sat inside a collapsed <details> block, so jumping to it landed on invisible content. Move the id onto the <details> element itself so the link scrolls to the visible summary line instead. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: ran (iter:2, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
Explains that repos don't all need the same checkpoints: Commit Only, Commit + Scheduled, Commit + Before Push + MR/PR, and the Full Harness each trade shipping speed for review depth differently. Chart is a Vega-Lite spec rendered to PNG via vl-convert. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
Replaces em dashes with colons in the checkpoint-combination bullets, and re-exports the quadrant chart with a solid white background instead of transparent so it renders correctly on GitHub. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
Swaps the gray/navy monochrome ramp for the violet/blue/amber/emerald accent colors already used elsewhere on the page, so the chart fits the site's visual language. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
The screenshot duplicated the one already shown later in the Scheduled Reviews feature section, and added nothing between the harness table and the review-depth quadrant. LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…into livi-improvements
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LinceMathew
marked this pull request as ready for review
August 30, 2026 15:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces v2 of the Livi AI Assistant, featuring an upgraded multi-branch architecture for Product Guidance, Actions (triggering code reviews and inspecting review details), and Historical Analytics with dynamic Vega-Lite chart visualizations.
Key Highlights
dbctx: Introduces a high-performance database context indexing tool that generates localized, schema-aware query contexts and sample SQL patterns to enable highly accurate text-to-SQL synthesis.alaws: System prompts are now dynamically assembled from versioned, numberedalawsLawBooks (internal/mcpagent/alaws_livi/) with{{ref:}}templates, guaranteeing strict policy enforcement and preventing prompt drift.InteractiveChartcontainer sizing to guarantee instant, responsive SVG chart mounting and seamless scaling on dark-mode card surfaces.Various Fixes
1. Intent Classification & Multi-Branch Routing
Every incoming user prompt is classified before token allocation into one of three dedicated execution branches:
product_guidance: Answers product navigation, feature, and workflow questions from embedded documentation without tool/SQL overhead.action: Executes operational commands such as triggering code reviews or pulling PR details.analytics: Performs multi-interpretation SQL queries againstdbctxand generates Vega-Lite chart specifications.2. LawBook Governance (
alaws)internal/mcpagent/alaws_livi/{{ref:livi.<section>.<id>}}to compose prompt headers without inline rule duplication.Verification & Testing
go test -v ./internal/mcpagent/... -run TestLawbookCompilesnpx tsc --noEmit(inui/)