Add local AI fix/generate, engine-aware Test Lab, and source-format preservation - #3
Merged
Merged
Conversation
…reservation New features (intended for local work machines only): - AI Fix/Generate: agentic edit loop via @anthropic-ai/claude-agent-sdk; uses machine's Claude subscription login (no API key); PostToolUse re-validation feedback loop; structured JSON output with required uncertainties[]; PDF/docx attachment extraction (mammoth); AiFixModal + SmartFormGenerator AI tab - Test Lab: git-panel auto-loads changed E-Bar forms (EBAR_REPO_PATH), shows branch-vs-edit diff, round-trip + validation on working version; DiffView - Engine model: single source of truth (engineModel.ts, distilled from Java engine); validation rewritten data-driven; engineRulesPrompt renders it into AI system prompt to prevent drift - Source-format preservation: detect CRLF/tab vs LF/space at parse, apply at build; eliminates 97% corpus round-trip noise (textDiff, gitStyleDiff) - ValidationStatus: clickable rows call formStore.revealNode; FormTree scrolls - Toolbar: AI Fix button; Save/Save-As hardening - New tests: aiFixAgent (live AI gated behind RUN_LIVE_AI_FIX_TESTS=1), sourceFormat round-trip; validation suite extended; corpus tests pass (560 forms) - New script: scan-corpus.ts (triage CLI, exit 0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
@anthropic-ai/claude-agent-sdkusing machine's Claude subscription login (no API key required). PostToolUse re-validation feedback loop; structured JSON output with requireduncertainties[]; PDF/docx attachment extraction via mammoth.AiFixModal+SmartFormGeneratorAI tab (mode=generate).engineModel.tsas single source of truth for the E-Bar XML engine (distilled from Java).validation.tsrewritten data-driven against it;engineRulesPrompt.tsrenders it into the AI system prompt to prevent prompt/code drift.EBAR_REPO_PATHenv var, shows branch-vs-edit diff, round-trip + validation on working version. NewDiffViewcomponent._sourceFormat), apply at build; eliminates round-trip noise on the 97% CRLF/tab E-Bar corpus.formStore.revealNode;FormTreescrolls to selected node.aiFixAgent.test.ts(live AI gated behindRUN_LIVE_AI_FIX_TESTS=1),sourceFormat.test.ts, extendedvalidation.test.ts. 85 non-live tests pass; 560-file real corpus round-trip passes.scripts/scan-corpus.ts(triage CLI).Expected production limitations
The AI Fix/Generate routes (
/api/ai/fix) and repo-comparison routes (/api/repo/*) depend on local machine resources:EBAR_REPO_PATHpointing to a local E-Bar git checkout — not present on Vercel, so those routes return a benign "repo not found" message.Test plan
npm ci— exact install from lockfile, exit 0tsc --noEmit— exit 0vitest run— 85 passed / 4 skipped (live AI tests gated), exit 0next build— exit 0, 28 files, 6 routes compiled🤖 Generated with Claude Code