ComposeLint AI
Rebranded to ComposeLint AI. Repository has been moved to TechsOneAi/ComposeLintAI.
<div align="center">
# ComposeLintAI š
**Enterprise AI Governance, Architecture Diagnostics & AST Refactoring Platform for Jetpack Compose + MCP Server.**
*Govern AI coding agent technical debt, enforce design systems, diagnose architectural health, and execute surgical source code modifications with zero-rebuild live device inspection.*
<p>
<a href="https://kotlinlang.org"><img src="https://img.shields.io/badge/Kotlin-2.1.20+-purple.svg" alt="Kotlin" /></a>
<a href="https://developer.android.com/jetpack/compose"><img src="https://img.shields.io/badge/Jetpack%20Compose-1.7.3+-4285F4.svg" alt="Jetpack Compose" /></a>
<img src="https://img.shields.io/badge/Latency-%3C50ms-success.svg" alt="Latency" />
<img src="https://img.shields.io/badge/DevEx-Zero--Rebuild%20Tuning-brightgreen.svg" alt="DevEx" />
<a href="https://github.com/TechsOneAi/ComposeLintAI/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License" /></a>
</p>
<p>
<a href="https://plugins.jetbrains.com/plugin/35226-composebridge"><img src="https://img.shields.io/badge/JetBrains%20Marketplace-ComposeLintAI-blue.svg?logo=jetbrains&logoColor=white" alt="JetBrains Marketplace" /></a>
<a href="https://glama.ai/mcp/servers/TechsOneAi/ComposeLintAI"><img src="https://glama.ai/mcp/servers/TechsOneAi/ComposeLintAI/badges/score.svg" alt="Glama MCP" /></a>
<a href="https://m8ven.ai/badge/mcp/jalal591-compose-bridge-rapm1x?s=readme"><img src="https://m8ven.ai/badge/mcp/jalal591-compose-bridge-rapm1x" alt="M8ven Score" /></a>
<a href="https://mcpmarket.com/server/composebridge?utm_source=readme&utm_medium=badge"><img src="https://mcpmarket.com/badge/server/composebridge.svg?style=compact" alt="Listed on MCP Market" /></a>
</p>
<p>
<a href="https://devhunt.org/tool/compose-bridge" target="_blank"><img src="https://devhunt.org/badge/compose-bridge.svg" alt="compose-bridge on DevHunt" height="50" /></a>
<a href="https://www.producthunt.com/products/composebridge?launch=composelintai" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?product_id=1328294&theme=neutral" alt="ComposeLintAI on Product Hunt" height="50" /></a>
</p>
<p>
<a href="https://github.com/TechsOneAi/ComposeLintAI/releases/download/1.2.0/ComposeLintAI-Designer-v1.0.0.apk"><img src="https://img.shields.io/badge/Android_App-Download_Designer_v1.0.0_(1.26_MB)-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Download Designer APK" /></a>
</p>
### š° Featured In
<p>
<a href="https://androidweekly.net/issues/issue-746"><img src="https://img.shields.io/badge/Featured%20in-Android%20Weekly%20%23746-3DDC84?style=flat-square&logo=android&logoColor=white" alt="Featured in Android Weekly" /></a>
<a href="https://mailchi.mp/kotlinweekly/kotlin-weekly-537"><img src="https://img.shields.io/badge/Featured%20in-Kotlin%20Weekly%20%23537-7F52FF?style=flat-square&logo=kotlin&logoColor=white" alt="Featured in Kotlin Weekly" /></a>
<a href="https://jetc.dev/issues/336.html"><img src="https://img.shields.io/badge/Featured%20in-jetc.dev%20%23336%20%26%20%23340-4285F4?style=flat-square&logo=jetpackcompose&logoColor=white" alt="Featured in jetc.dev" /></a>
<a href="https://kmpweekly.com"><img src="https://img.shields.io/badge/Featured%20in-KMP%20Weekly%20%238-8A2BE2?style=flat-square&logo=kotlin&logoColor=white" alt="Featured in KMP Weekly" /></a>
</p>
<p>
<a href="https://droidheim.com/articles"><img src="https://img.shields.io/badge/Featured%20on-Droidheim-00C853?style=flat-square&logo=android&logoColor=white" alt="Featured on Droidheim" /></a>
<a href="https://transformation-tech-newsletter.vercel.app/newsletter/2026-11-17"><img src="https://img.shields.io/badge/Featured%20in-.monks%20Digest-FF6B6B?style=flat-square&logo=rss&logoColor=white" alt="Featured in .monks" /></a>
<a href="https://lissin.com/library/product-hunt-daily"><img src="https://img.shields.io/badge/Podcast-Product%20Hunt%20Daily%20%23233-FF6154?style=flat-square&logo=podcast&logoColor=white" alt="Product Hunt Daily Podcast" /></a>
</p>
<p>
<a href="README.md">English</a> | <a href="README_AR.md">Ų§ŁŲ¹Ų±ŲØŁŲ©</a> | <a href="PRIVACY.md">Community Privacy</a> | <a href="PRO_TERMS.md">Pro Terms</a>
</p>
</div>
---
## āļø Community vs. Pro Edition Comparison
| Feature / Capability | **ComposeLintAI Community** (Free / Open-Source) | **ComposeLintAI Pro** (Commercial) |
|---|---|---|
| **Runtime & Architecture** | Python-based MCP/WebSocket server + IDE Plugin | **100% Native Kotlin / JVM** inside JetBrains IDE (zero Python / external runtime) |
| **AST & Code Analysis** | Regex / Python-assisted scanning + IDE bridge | **Native Kotlin PSI AST Engine** (`PsiColorEditor`, `PsiDimensionEditor`, `PsiTextEditor`) |
| **AI Agent Governance** | Basic diff review & rollback | **5 Golden Hard Gates**, **Shadow PSI Validator** (pre-write AST & type guard), **Circuit Breaker** (auto-trip after 3 failures) |
| **Technical Debt & Receipts** | Basic pattern journal | **Agent Debt Scanner** (structural AST hashing) & **AER-1 Cryptographic Provenance Receipts** (`.composebridge-state/receipts/`) |
| **CI / Linter Enforcement** | Manual IDE checks | **Unified `.composelintai.json` Linter** across IDE and `--check` CLI (`warn` & `block` modes) |
| **MCP Tools & Integration** | 34+ Python MCP tools | **39 Native JVM MCP Tools** + one-click **MCP Setup** for Antigravity, Cursor, Claude Desktop, and Gemini |
| **Licensing & Support** | Apache 2.0 Open Source | Commercial via [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/36095-composelintai-pro) ([Pro Terms](PRO_TERMS.md)) |
### š ComposeLintAI Pro ā Official Marketplace & Product Hunt Launch Offers
Install **ComposeLintAI Pro** directly from the official JetBrains Marketplace:
š **[Install ComposeLintAI Pro (`36095-composelintai-pro`)](https://plugins.jetbrains.com/plugin/36095-composelintai-pro)**
**š Product Hunt Launch Offers** *(automatically applied at checkout ā no promo code required)*:
- **First 100 individual developers:** **100% FREE** for 1 full year (annual subscription).
- **Next 900 individual developers:** **50% OFF** for 1 full year.
- **First 30 companies & teams:** **50% OFF** for 1 full year.
---
### š„ Direct Downloads (v1.1.9)
| Package | Asset | Purpose |
|---|---|---|
| **IDE Plugin (Android Studio / IntelliJ)** | [š **Install from JetBrains Marketplace**](https://plugins.jetbrains.com/plugin/35226-composebridge)<br>or [š¦ **ComposeLintAI-1.1.9.zip**](https://github.com/TechsOneAi/ComposeLintAI/raw/main/dist/ComposeLintAI-1.1.9.zip) | Official Marketplace install (One-click) or manual install via `Settings` ā `Plugins` ā `āļø` ā `Install Plugin from Disk...` |
| **Compose Runtime Library (Release & Debug)** | [š¦ **composebridge-runtime-release.aar**](https://github.com/TechsOneAi/ComposeLintAI/raw/main/dist/composebridge-runtime-release.aar) | Core registries (~9KB). Required in `implementation` for production-safe APK builds |
| **Compose Agent Library (Debug Only)** | [š¦ **composebridge-agent-release.aar**](https://github.com/TechsOneAi/ComposeLintAI/raw/main/dist/composebridge-agent-release.aar) | Visual overlays, touch inspector, and WebSocket bridge. Put in `debugImplementation` |
---
## šØ ComposeLintAI Designer (Android App)
Design Jetpack Compose screens visually on your Android device and export clean, production-ready Kotlin/Compose projects (`.zip`) with SSOT tokens (`AppColors`, `AppDimens`, `AppStrings`) and reusable components.
<p align="left">
<a href="https://github.com/TechsOneAi/ComposeLintAI/releases/download/1.2.0/ComposeLintAI-Designer-v1.0.0.apk">
<img src="https://img.shields.io/badge/Download_APK-ComposeLintAI_Designer_v1.0.0-16A34A?style=for-the-badge&logo=android&logoColor=white" alt="Download ComposeLintAI Designer APK"/>
</a>
<a href="https://github.com/TechsOneAi/ComposeLintAI/releases/tag/1.2.0">
<img src="https://img.shields.io/badge/Release_Notes-v1.0.0_(1.26_MB)-0F172A?style=for-the-badge&logo=github&logoColor=white" alt="View Release Notes"/>
</a>
</p>
- **Visual Drag & Drop:** Live Dark/Light preview, Blueprints & Atomic components with visual mini-previews.
- **Clean Export (`.zip`):** On-Demand token injection, Smart Component Reuse, and full RTL/Arabic support.
- **Lightweight & Hardened:** ~1.26 MB R8-optimized release APK.
> **License Notice:** While the open-source codebase in this repository is licensed under Apache-2.0, the **ComposeLintAI Designer APK** is distributed free of charge as a proprietary binary (closed-source). All rights reserved.
>
---
## šø Visual Demo
Watch ComposeLintAI visually edit a running Jetpack Compose UI live:
## šø Visual Demos
| ā” Zero-Gradle AST Governance Demo | š± On-Device Live UI Tuning |
| :---: | :---: |
| [](https://www.youtube.com/watch?v=t7N5yfCB_RU) | [](https://www.youtube.com/watch?v=Hywyq7cBdDM) |
### Screenshots
| 1. Studio ToolWindow & Token Scanner | 2. Surgical Pattern Refactoring & Diff | 3. Live On-Device Preview & Inspector |
|:---:|:---:|:---:|
| [](docs/screenshots/1_composebridge_main_ui.jpg) | [](docs/screenshots/2_composebridge_patterns_diff.jpg) | [](docs/screenshots/3_composebridge_live_device_sync.jpg) |
---
## š Upgrading from v1.1.x to v1.1.9
Upgrading from ComposeLintAI v1.1.x to v1.1.9 is straightforward and involves **zero breaking changes** in your codebase or Gradle configurations:
1. **Update the IDE Plugin:** Install the latest `dist/ComposeLintAI-1.1.9.zip` in Android Studio (**Settings** ā **Plugins** ā **Install Plugin from Disk...**) and restart the IDE.
2. **Update Android AAR:** Replace `composebridge-agent-release.aar` in your app module's `libs/` folder with the updated build from `dist/composebridge-agent-release.aar`, then re-sync Gradle.
3. **Update Python Server:** If running standalone, re-run `pip install -r requirements.txt --upgrade` in `server/`.
4. **Breaking Changes:** **None.** All protocol messages, runtime registries, and MCP tool signatures remain 100% backward-compatible.
---
## ā” Quick Start in 60 Seconds
### Step 1: Install IDE Plugin
1. Download [ComposeLintAI-1.1.9.zip](dist/ComposeLintAI-1.1.9.zip).
2. In Android Studio, go to **Settings (Preferences)** ā **Plugins** ā Click the **āļø gear icon** ā **Install Plugin from Disk...**.
3. Select the zip file and restart Android Studio.
### Step 2: Add Dependencies to your Android App
Copy `composebridge-runtime-release.aar` and `composebridge-agent-release.aar` into your app module's `libs/` folder:
```kotlin
// app/build.gradle.kts
dependencies {
// 1. Runtime registries: compiles cleanly in both Debug & Release
implementation(files("libs/composebridge-runtime-release.aar"))
// 2. Interactive visual inspector: debug builds only
debugImplementation(files("libs/composebridge-agent-release.aar"))
}
```
#### ā ļø Kotlin Multiplatform (KMP) Projects
If your project targets both Android and Desktop (KMP) and you use ComposeLintAI registries inside `commonMain`, **DO NOT use the `.aar` files** (as the desktop compiler cannot read Android `.aar` binaries). Instead, use the source modules as follows:
1. Copy the `agent/runtime` folder into your project (e.g. `composebridge-agent/runtime`).
2. In `settings.gradle.kts` (or `settings.gradle`), include the runtime module:
```kotlin
include(":composebridge-runtime")
project(":composebridge-runtime").projectDir = file("composebridge-agent/runtime")
```
3. In `composebridge-agent/build.gradle.kts`, expose runtime as an API dependency:
```kotlin
kotlin {
sourceSets {
commonMain.dependencies {
api(project(":composebridge-runtime"))
}
}
}
```
4. In `composeApp/build.gradle.kts`, implement the agent module in `commonMain`:
```kotlin
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":composebridge-agent"))
}
}
}
```
### Step 3: Initialize in MainActivity (Debug)
```kotlin
// MainActivity.kt
import com.composebridge.agent.ComposeLintAIAgent
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Start bridge connection (automatically connects to local hub)
ComposeLintAIAgent.start(context = this, serverUrl = "ws://127.0.0.1:8711")
setContent {
// Wrap root content in ComposeLintAIAgent.Root
ComposeLintAIAgent.Root {
MyApplicationTheme {
MainScreen()
}
}
}
}
}
```
### Step 4: Start the Bridge & Tune Live
1. In Android Studio, open the **ComposeLintAI** tool window on the right sidebar and click **ā¶ Start Bridge** (this starts the local server and runs `adb reverse tcp:8711 tcp:8711` automatically).
2. Run your app on your device or emulator.
3. Tap the floating **š§ FAB** on screen to toggle Design Mode.
4. Tap any text, color, or dimension to adjust values in real-time!
### š Remote Connection (Experimental)
Tune your running Compose UI over the internet (cellular data, separate Wi-Fi networks, or remote testing) without a physical USB cable using **Tailscale Funnel**:
#### Prerequisites
- Install [Tailscale](https://tailscale.com/download) on your PC and mobile device.
- Sign up for a Tailscale account (free for personal use).
#### Step-by-Step Setup:
##### Step 1: Configure Tailscale ACLs (Crucial!)
By default, Tailscale disables Funnel unless granted by your Access Control Lists (ACL). Before running the funnel command:
1. Open the [Tailscale Admin Console - Access Controls](https://login.tailscale.com/admin/acls).
2. In the JSON policy editor, add the following `nodeAttrs` block inside the root `{ ... }`:
```json
"nodeAttrs": [
{
"target": ["*"],
"attr": ["funnel"]
}
]
```
3. Click **Save**.
> [!IMPORTANT]
> This step is required to grant your devices permission to expose Funnel ports. Skipping this step will cause `tailscale funnel 8711` to fail with: `funnel not allowed by ACLs`.
##### Step 2: Start Tailscale Funnel on your Computer
1. Launch Tailscale on your PC and sign in.
2. Open a Terminal or PowerShell prompt and run:
```bash
tailscale funnel 8711
```
*(Or: `tailscale serve https / http://127.0.0.1:8711`)*
3. **Leave this terminal open** (Tailscale Funnel must remain active).
##### Step 3: Get Connection Link in Android Studio / IntelliJ Plugin
1. Open the **ComposeLintAI** tool window on the right sidebar.
2. Click the **"Share Remote"** button.
3. A dialog will open displaying a **QR Code** and your secure connection URL (`wss://...`).
##### Step 4: Connect on your Mobile Device
1. Launch your app (with ComposeLintAI Agent enabled).
2. Tap the floating Design Mode button šØ -> **Connection Settings**.
3. Select **"Remote"**:
- Tap **"Scan QR"** and scan the code directly from your computer screen, **OR**
- Paste the URL via **"Paste from Clipboard"**.
4. Tap **"Connect Remote"** to establish the live bridge.
> [!WARNING]
> **Honest Notice:** Remote connections are **experimental**. The session may disconnect due to network changes (switching between Wi-Fi and mobile data), restrictive corporate firewalls, carrier NATs, or phone battery-saver/sleep modes. For maximum stability and guaranteed sub-50ms latency, a **physical USB connection** (`adb reverse tcp:8711 tcp:8711`) remains the gold standard. For technical boundaries, see [LIMITATIONS.md](LIMITATIONS.md).
---
## āļø How It Works (Under the Hood)
ComposeLintAI operates as a tri-part system coordinating an IDE extension, a surgical AST engine, and an on-device Compose observer:
- **Android Studio / IntelliJ Plugin:**
Manages background Python server processes, displays real-time connection status, generates Tailscale WireGuard QR codes for remote WAN tunnels, and provides visual tabs (`Changes`, `Tokens`, `Orphans`, `Patterns`, `Status`) with unified diff review.
- **Python Server & Tree-sitter AST Engine:**
Runs an asynchronous WebSocket hub on port `8711`. When an edit arrives, Tree-sitter parses the Kotlin syntax tree and performs **surgical code splicing** without disturbing un-targeted code, formatting, or comments. Employs atomic file locks (`_atomic_write_text`) with CRLF line-ending preservation.
- **Android Agent (`:composebridge-agent`):**
Renders a zero-overhead hit-testing overlay via `ComposeLintAIAgent.Root`. Evaluates touch gestures, maps coordinates to semantic node bounds using `CompositionRegistry`, and applies overrides locally (<50ms) through `BridgeThemeRegistry`, `BridgeDimensionRegistry`, and `BridgeTextRegistry` so the UI responds instantaneously.
- **PatternJournal & Rollback Engine:**
Before touching any source file, a pristine snapshot is verified with Tree-sitter and preserved as `.bridge.bak`. Rollbacks prioritize Git tracking (`git checkout -- <file>`), safely falling back to byte-level `.bridge.bak` restoration for untracked files.
- **Model Context Protocol (MCP Server):**
Exposes 36 structured tools over stdio/JSON-RPC, enabling autonomous AI coding assistants (Antigravity, Cursor, Claude) to discover design tokens, detect orphans, suggest splits, and validate builds independently without requiring a physical phone connected.
---
## š Architecture & Communication Flow
ComposeLintAI coordinates three interconnected components over a fast local loopback interface:
```text
+--------------------------+ +----------------------------+
| Android Phone / AVD | | Local WebSocket Hub |
| | | (Python 3.10+ Daemon) |
| [App UI in Compose] | | |
| | | WebSocket | server.py (:8711) |
| [:composebridge-agent] |<===============>| āāā Message Router |
| - Visual Touch Overlay| (Port 8711) | āāā AST Splicer |
| - Semantic Inspector | | āāā PatternJournal |
| | | +----------------------------+
| [:composebridge-runtime]| ||
| - TextRegistry | || JSON-RPC
| - ThemeRegistry | || (stdio / TCP)
| - DimensionRegistry | \/
+--------------------------+ +----------------------------+
| Developer Tools & AI |
| |
| [Android Studio Plugin] |
| - Live Changes Diff |
| - Token Split / Scanner |
| [Autonomous MCP Agents] |
| - Antigravity / Claude |
| - 36 Standard MCP Tools |
+----------------------------+
```
1. **On-Device Agent (`:composebridge-agent`):** Injected via `ComposeLintAIAgent.Root`. Renders non-intrusive hit-testing overlays, extracts semantic metadata, and transmits change requests over local WebSocket (`ws://127.0.0.1:8711`).
2. **Decoupled Runtime (`:composebridge-runtime`):** Standalone ~9KB runtime containing registry singletons (`BridgeTextRegistry`, `BridgeThemeRegistry`, `BridgeDimensionRegistry`). Ensures production Release builds compile with zero overhead without packaging debug overlays.
3. **Local Bridge Server (`server.py`):** Acts as the central event hub and Kotlin AST manipulation engine. Applies deterministic changes using file write-locks, atomic rewrites, and maintains a byte-level `.bridge.bak` rollback journal.
4. **Model Context Protocol (MCP Server):** Exposes 36 structured tools allowing AI pair programmers (Antigravity, Claude, Cursor) to autonomously analyze token usage, suggest token splits, and execute multi-file refactorings.
---
## š Core Capabilities
| Capability | Description |
|---|---|
| **ā” Instant Live Tuning** | Tweak colors, paddings, and string contents with **sub-50ms latency**. Changes update dynamically without waiting for Gradle rebuilds. |
| **š§ Semantic Token Intelligence** | Detects whether a modified color or dimension is shared globally. Offers **Split** (create an isolated token for this widget) or **Global** (update theme-wide). |
| **š Text Editing & Auto-Migration** | Tap any text element to edit wording directly on device. The AST engine automatically wraps raw strings into `BridgeTextRegistry` on first edit. |
| **š¾ Safe Rollbacks (PatternJournal)** | Every surgical edit is backed up byte-for-byte. The Studio **Changes** tab allows reviewing unified diffs and reverting individual files or all edits with one click. |
| **š¤ Full MCP Server for AI Agents** | 36 tools supporting token discovery, impact analysis, orphan detection, surgical pattern replacement, and safe Gradle compilation validation. |
---
## š¤ AI Agent Integration (MCP)
ComposeLintAI exposes 36 deep-inspection and code refactoring tools to any AI assistant supporting the **Model Context Protocol (MCP)**. **No physical phone is required to use MCP tools.**
> š” **Ultra-Lightweight Context Window:**
> ComposeLintAI uses Lazy Loading, so 36 MCP tools consume only ~176 tokens (<1% of context window).
### Compatible AI Clients:
- ā
**Google Antigravity IDE**
- ā
**Cursor**
- ā
**Claude Desktop**
- ā
**Windsurf / Continue**
### Integration Steps:
#### Step 1: Run the MCP Server
Make sure server dependencies are installed and the server is executable from your `server` directory:
```bash
cd server
pip install -r requirements.txt
```
#### Step 2: Configure `mcp_config.json`
Add the ComposeLintAI server configuration to your AI agent's config file (e.g. in `~/.gemini/config/mcp_config.json` or your IDE configuration):
```json
{
"mcpServers": {
"composebridge": {
"command": "python",
"args": ["-u", "/path/to/compose-bridge/server/mcp_server.py"],
"env": {
"COMPOSEBRIDGE_ROOT": "/absolute/path/to/your/android/project",
"PYTHONIOENCODING": "utf-8"
}
}
}
}
```
> ā ļø **Important:** Any changes made to `mcp_config.json` require starting a **New Chat** in your AI agent interface so that all 36 MCP tools are freshly discovered and initialized.
#### How to set it up in Android Studio / Antigravity:
1. Open Android Studio / IntelliJ IDEA.
2. Go to **Settings** (or Preferences on macOS) ā **Tools** ā **AI** ā **MCP Servers**.
3. Click on the **Installed** tab.
4. Click on the **"Import JSON file"** button (or **"...Add via JSON"** depending on your IDE version).
5. Paste the JSON configuration provided above.
6. Click **OK** or **Apply**.
7. ā ļø **Crucial:** Start a **New Chat** (or restart the agent) for the new 36 MCP tools to load and become visible.
### Overview of MCP Tools (36 Tools):
- **Token Discovery & Analysis:** `list_tokens`, `find_token_by_color`, `get_token_impact`, `get_token_siblings`, `get_all_token_groups`, `list_orphans`, `get_naming_convention`.
- **Surgical Code Editing:** `set_token`, `set_text`, `add_token`, `rollback_last`.
- **Pattern Refactoring:** `replace_pattern`, `list_applied_patterns`, `rollback_pattern`, `suggest_token_split`, `detect_conditional_variants`.
- **Change Management:** `list_modified_files`, `get_file_diff`, `approve_file_changes`, `reject_file_changes`, `approve_all_files`, `reject_all_files`, `reject_all_files_force`.
- **Build Verification & Sync:** `run_gradle_build`, `list_allowed_gradle_tasks`, `trigger_user_sync`, `get_sync_status`.
---
## ā ļø Honest Limitations & Operational Boundaries
> š **Full Technical Disclosure:** For an exhaustive, unvarnished disclosure of operational edge cases and architectural constraints, see **[LIMITATIONS.md](LIMITATIONS.md)**.
>
> ā ļø **Key Notice:** **Remote Connection is experimental.** The tool will **safely pause** (`NEEDS_MANUAL_MAPPING`) and refuse to modify code if it cannot find design files (Colors, Dimensions, Strings) until you map them in the **Discovery** tab, protecting your project from accidental code pollution.
- **Remote Tunnel Stability:** Remote access via Tailscale is experimental. Mobile cellular handoffs or network firewalls can interrupt socket connectivity. USB tethering (`127.0.0.1`) remains recommended for mission-critical zero-latency editing.
- **Design System Mapping Required:** If the tool cannot locate your design system files automatically, it safely stops and asks for configuration in the Discovery tab rather than writing to arbitrary files.
- **Live Preview Connection:** Edits applied when the device is disconnected are saved safely to disk, but the mobile screen requires an active connection to recompose.
- **AI Agent Review:** Always review AI refactorings in the IDE **Changes** tab before approving.
- **Concurrent External Edits:** Editing the same line in your IDE while an unapproved bridge edit is pending will trigger an external conflict warning dialog.
- **Rate Limiting:** High-frequency continuous slider movements are rate-limited (100 msgs/10s) to prevent thread congestion over slow Wi-Fi.
### General Platform Constraints
- **Platform Target:** Live on-device inspection currently supports **Android** (API 24+). Kotlin Multiplatform Desktop and iOS overlays are in active development.
- **Python Requirement:** The local bridge server requires **Python 3.10 or newer**.
- **USB Port Forwarding:** When testing on a physical device over USB, port forwarding is required (`adb reverse tcp:8711 tcp:8711`). The Studio plugin runs this automatically on startup.
- **Initial Rebuild on New Tokens:** When converting a hardcoded literal to an entirely new named token for the first time, one standard Gradle compile is required so the Kotlin compiler emits the new getter bytecode. Subsequent live tweaks to that token are instantaneous.
---
## š§ Troubleshooting & FAQ
### 1. The phone shows `[WS] Connection failed`
- Ensure the bridge server is running (`š¢ Bridge Running` in Studio or `python server.py` in terminal).
- If using USB, verify ADB reverse is active by running:
```bash
adb reverse tcp:8711 tcp:8711
```
- If using Wi-Fi without USB, specify your workstation's LAN IP when calling `ComposeLintAIAgent.start(serverUrl = "ws://192.168.1.X:8711")`.
### 2. Build error: `Duplicate class found in modules`
- Make sure `composebridge-runtime-release.aar` is added under `implementation(...)` and `composebridge-agent-release.aar` is added under `debugImplementation(...)`. Do not include the agent in release configurations.
### 3. Edits do not show in Android Studio
- Ensure you have the project root properly set in `composebridge.json` or pass `--project <path>` when launching `server.py`.
- Check the **Changes** tab in the ComposeLintAI tool window to review pending file diffs.
---
## š¤ Contributing & Community
We welcome contributions! Please review our:
- **[Contributing Guidelines](CONTRIBUTING.md)**: Development setup, coding standards, and PR process.
- **[Security Policy](SECURITY.md)**: Supported versions and vulnerability disclosure guidelines.
- **[Architectural Vision (RFC-001)](docs/architecture/RFC-001-vision.md)**: Technical roadmap and core invariants.
---
## š License
Distributed under the **[Apache License 2.0](LICENSE)**.
---
## š Remote Access via Tailscale (WireGuard Secure Tunnel)
ComposeLintAI v1.1.6 introduces zero-configuration remote access using **Tailscale Funnel**. You can now inspect, tweak, and live-preview Compose UI on physical Android devices over cellular data or remote Wi-Fi networks securely.
### 1. Prerequisites
- Install **Tailscale** on your workstation: [https://tailscale.com/download](https://tailscale.com/download)
- Log in and enable Tailscale: `tailscale up`
- Ensure [Tailscale Funnel](https://tailscale.com/kb/1223/funnel) is enabled for your tailnet node.
### 2. Share Remote from Android Studio
1. Open the **ComposeLintAI** tool window in Android Studio.
2. Click **ā¶ Start Bridge** to launch the local WebSocket hub with dynamic 64-character token authentication.
3. Click **š Share Remote** in the toolbar:
- The plugin initiates `tailscale funnel 8711 --bg`.
- A QR Code modal appears with your secure `wss://<node>.<tailnet>.ts.net` endpoint and session auth token.
4. (Optional) You can copy the URL or Token, or click **Stop Sharing** to turn off the funnel.
### 3. Connect from Android Device
1. Open your debug app with `ComposeLintAIAgent`.
2. Tap the floating **šØ** design button to open the toolbar, then tap the **š** remote button.
3. Tap **š· Scan QR** (or paste connection JSON from clipboard).
4. The agent immediately connects securely via TLS/WSS (`wss://...`), validates credentials, and begins live streaming UI edits.
5. To return to USB/local development, tap **Local (127.0.0.1)** in the remote dialog.
TDQS
Scored across 36 tools
Most analysis tools (list_orphans, get_token_impact, detect_conditional_variants, get_token_siblings) are clearly distinct, and the descriptions include explicit 'when NOT to use' cross-references. However, the undo/approval surface is crowded and genuinely confusable: approve_change/reject_change (hunk-level), approve_file_changes/reject_file_changes (file-level), approve_all_files/reject_all_files/reject_all_files_force (project-level), plus rollback_last and rollback_pattern. Similarly get_ide_diagnostics, scan_project_diagnostics and run_gradle_build all answer 'does this compile?' with no crisp default.
Names are uniformly snake_case with a leading verb (get_, list_, set_, add_, detect_, suggest_, replace_, approve_, reject_, rollback_), which is predictable and readable. Minor deviations exist: rollback_last has no noun object, and the verb choice between get_/list_/find_ isn't systematically applied, but nothing is chaotic.
36 tools is heavy for a design-token lint/refactor server and the count is inflated by parallel families: three rollback variants, four approval variants, three diagnostics/build tools, three sync/config tools. Several could collapse (e.g. scope parameter on approve/reject instead of six tools).
The lifecycle is broadly covered: discover (list_tokens, list_orphans, find_token_by_color, analyze_design_scatter), mutate (add_token, set_token, set_text), batch apply, undo/approve, build verification, and server sync. Notable gaps: no delete/remove_token and no rename_token, both core to a refactoring tool, leaving dead tokens orphaned once added.