agent-rtl-fix

agent
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 9 GitHub stars
Code Pass
  • Code scan — Scanned 5 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Universal BiDi (RTL/LTR) formatting standard & typography for AI Coding Agents (Antigravity, Cursor, Windsurf, Copilot, Claude)

README.md

🌐 Agent RTL Fix

Universal BiDi (RTL/LTR) Formatting Standard & Typography for AI Coding Agents
Zero-token bloat, native Markdown preservation, and isolated LTR code blocks for Persian, Arabic, Urdu, and Hebrew.

Release v2.0.0 Platforms Supported Agents License MIT


🇮🇷 معرفی به زبان فارسی

Agent RTL Fix یک استاندارد مدرن و سبک برای حل ریشه‌ای مشکلات راست‌چین‌سازی (RTL) و چندجهته (BiDi) در پاسخ‌های تمامی ایجنت‌های هوش مصنوعی کدنویسی مانند Google Antigravity، Cursor، Windsurf، GitHub Copilot، Claude Code و Cline است.

⚡ چرا نسخه جدید (v2.0.0) متفاوت است؟

  • حداقل مصرف توکن (Zero Token Overhead): برخلاف روش‌های قدیمی که صدها کاراکتر اینلاین‌استایل سنگین به هر پیام تحمیل می‌کردند، این ابزار با یک تگ بومی ساختار را مرتب می‌کند.
  • حفظ ساختار مارک‌داون: جداول، لیست‌ها و علائم نگارشی خراب نمی‌شوند و به کدهای طویل HTML تبدیل نمی‌گردند.
  • ایزوله‌سازی دقیق LTR: تمامی بلاک‌های کد، لاگ‌ها، مسیر فایل‌ها و دستورات ترمینال به صورت چپ‌چین دقیق حفظ می‌شوند تا پرانتزها و اسلش‌ها برعکس نشوند.
  • فونت فوق‌العاده سبک وزیرمتن (Vazirmatn): فقط ۴ وزن اصلی و ضروری برای ادیتور با کاهش ۹۶٪ حجم مخزن.
  • پشتیبانی Cross-Platform: نصب خودکار روی ویندوز، لینوکس و مک.

⚡ Key Highlights

  • Native BiDi Alignment: Completely eliminates inverted parentheses (), messed brackets [], and reversed paths (/ and \) when mixing English code with RTL languages.
  • Zero Token Overhead: Pure wrapper syntax that doesn't waste LLM output tokens on redundant inline CSS styling.
  • Non-Destructive: Doesn't overwrite your custom workspace configurations or force unwanted color themes.
  • Multi-Agent Ready: Drop-in rules formatted for every leading AI coding environment.

💬 1-Prompt In-Chat Activation (No Terminal Needed)

You can activate this directly in your AI assistant's chat (Antigravity, Cursor, Windsurf, Claude Code, Copilot) without touching a terminal. Just copy and paste either prompt:

English Prompt:

Please read the universal BiDi formatting standard from:
https://raw.githubusercontent.com/dalroot/agent-rtl-fix/main/rules/AGENTS.md
and save it as an always-on rule in this workspace/environment.

پرامپت فارسی (کپی مستقیم در چت با هوش مصنوعی):

لطفاً استاندارد راست‌چین‌سازی و فرمت‌بندی دوطرفه (BiDi/RTL) را از نشانی زیر بخوان و به عنوان قانون دائم (Always-on Rule) در این محیط/پروژه اعمال کن:
https://raw.githubusercontent.com/dalroot/agent-rtl-fix/main/rules/AGENTS.md

🚀 Quick Install via Terminal (1-Liner)

Running the installer script automatically installs Vazirmatn fonts, enables BiDi highlighting in your editor settings, and registers the global machine-wide rule for Antigravity (and project rules if run inside a repo):

Windows (PowerShell)

irm https://raw.githubusercontent.com/dalroot/agent-rtl-fix/main/install.ps1 | iex

Linux & macOS (Bash)

curl -fsSL https://raw.githubusercontent.com/dalroot/agent-rtl-fix/main/install.sh | bash

Offline / 1-Click

  1. Download the latest agent-rtl-fix-v2.0.0.zip from Releases.
  2. Extract and run install.bat (Windows) or bash install.sh (Linux/macOS).

🤖 Supported AI Agents Matrix

AI Coding Agent Config Location Rule File in this Repo Setup Action
Google Antigravity ~/.gemini/config/rules/ rules/antigravity.md Installed automatically system-wide (trigger: always_on)
Cursor IDE .cursor/rules/ or project root rules/cursor.mdc Copy to .cursor/rules/bidi.mdc or .cursorrules
Windsurf (Codeium) Project root rules/windsurf.rules Copy to .windsurfrules
GitHub Copilot .github/ rules/copilot-instructions.md Copy to .github/copilot-instructions.md
Claude Code Project root rules/claude.md Append to CLAUDE.md
Cline / Roo Code Project root rules/cline.md Copy to .clinerules
Universal Standard Any project root rules/AGENTS.md Place AGENTS.md in repository root

📁 Repository Structure

agent-rtl-fix/
├── .github/
│   └── workflows/
│       └── release.yml          # Automated release and zip packager
├── rules/                       # Modular rules for every agent
│   ├── antigravity.md           # Antigravity always_on global rule
│   ├── cursor.mdc               # Cursor IDE rule
│   ├── windsurf.rules           # Windsurf rules
│   ├── copilot-instructions.md  # GitHub Copilot instructions
│   ├── claude.md                # Claude Code instructions
│   ├── cline.md                 # Cline / Roo Code rules
│   └── AGENTS.md                # Universal AI Agent specification
├── fonts/                       # Core Vazirmatn typography (~500 KB)
│   └── Vazirmatn/
│       ├── Vazirmatn-Regular.ttf
│       ├── Vazirmatn-Medium.ttf
│       ├── Vazirmatn-SemiBold.ttf
│       └── Vazirmatn-Bold.ttf
├── scripts/
│   ├── install.ps1              # Modular Windows installer
│   ├── install.sh               # Modular Linux/macOS installer
│   ├── uninstall.ps1            # Windows cleanup script
│   └── uninstall.sh             # Linux/macOS cleanup script
├── install.bat                  # 1-Click Windows launcher
├── install.ps1                  # Root PowerShell installer
├── install.sh                   # Root Bash installer
├── LICENSE                      # MIT License
└── README.md

⚙️ The Core Formatting Rule

The standard universal instruction enforced across all agents:

- Whenever responding in RTL languages (Persian, Arabic, Urdu, Hebrew):
  1. Wrap the complete response inside <div dir="rtl">...</div>.
  2. Keep standard Markdown syntax for headings, bullet points, and tables.
  3. Keep all code blocks, logs, terminal outputs, and file paths strictly LTR.
  4. Never produce uncontained or left-aligned RTL text.

📜 License

This project is licensed under the MIT License. Free for open-source and commercial use.

Reviews (0)

No results found