Official VS Code extension for DesignFix
DesignFix- Extension is a Java-focused development companion that keeps design constraints actionable inside VS Code. It streams project context in real time, coordinates rule verification, and provides AI-assisted fix review workflows with one-click apply or revert.
- Starts a WebSocket server on port
8887when the extension activates - Sends workspace project path and Java-focused project hierarchy to connected client services
- Converts Java files to XML and streams initial XML snapshots on connection
- Watches Java file create, delete, rename, and edit events
- Re-converts changed Java files to XML and sends update messages automatically
- Triggers per-file rule checks after XML updates
- Sends focused Java file updates when active editor changes
- Uses a debounce strategy (3 seconds) to reduce noisy update traffic during typing
- Loads
ruleTable.jsonandtagTable.jsonfrom workspace root - Creates missing rule/tag table files automatically
- Supports new rule and new tag creation
- Supports existing rule and tag updates
- Returns success/failure acknowledgements over WebSocket for rule/tag operations
- Receives full-file AI modifications and opens side-by-side comparison views
- Highlights added/removed diff regions in the editors
- Shows AI explanation in VS Code status bar
- Provides inline CodeLens actions:
Accept Change: writes reviewed content to target fileReject Change: restores full original file content
- Opens generated Java snippets in a split editor with explanation comments
- Locates and highlights converted Java snippet locations in target files
- Supports request/response flow to fetch file content for edit-fix pipelines
- Command-triggered mining entry point from editor context (
Mine Rules) - Sends selected element metadata (path, offsets, line, token) for mining
- Captures and sends DOI signals (recent files and caret activity)
- Receives mining datasets/features/helper files (including append mode for large payloads)
- Runs SPMF-based mining algorithms and sends mined results back to connected client services
- Converts incoming code snippets/expressions to XML on demand
- Returns XML responses with correlation message IDs for client-side matching
activedoc.mineRules: requests design rule mining for selected elementactivedoc.acceptChange: applies AI-reviewed diff content to fileactivedoc.rejectChange: reverts to original file contentactivedoc.helloWorld: basic extension command
Note: command IDs currently use the activedoc.* namespace for protocol and backward compatibility.
- VS Code
^1.86.0 - Node.js and npm (for development builds)
srcmlinstalled- Java runtime installed (required for mining execution)
spmf.jaravailable in workspace root (required for design rule mining runs)- A compatible DesignFix client/service connected over WebSocket (
ws://localhost:8887)
- Open this folder in VS Code.
- Run
npm install. - Run
npm run compile(ornpm run watch). - Press
F5to launch the extension host.
- Open VS Code.
- Go to Extensions (
Ctrl+Shift+X). - Select
...->Install from VSIX.... - Choose the
.vsixpackage file and install.
npm run compile: TypeScript buildnpm run watch: TypeScript watch modenpm run lint: ESLint checksnpm run test: extension test runner
This extension is actively developed by Mainul Hossain as part of the DesignFix toolchain.