Skip to main content
Glama
README.md
# MD Reviser for Antigravity

> **Visual Markdown review & full-context AI revision studio — built natively for Antigravity.**

[English](./README.md) · [简体中文](./README.zh-CN.md)

*Looking for the cross-platform edition (Claude Code, Claude Desktop, OpenAI Codex, WorkBuddy, DeepSeek Harness)? See [ViviYE432/md-reviser](https://github.com/ViviYE432/md-reviser).*

![MD Reviser Demo](./docs/assets/demo.gif)

---

## Why This Dedicated Antigravity Edition?

- **Pure Native MCP App Side Pane**: Embeds directly inside Antigravity's side pane (`ui://md-reviser/app.html`) — no local HTTP server, no browser tabs, no clipboard workarounds. Clicking **"Send to AI"** wakes Antigravity's agent directly via MCP App messaging.
- **Zero-Dependency One-Command Install**: Both the MCP server (`server/dist/server.mjs`) and the single-file UI (`server/dist/app.html`) are prebuilt and bundled. Just `git clone` into `~/.gemini/config/plugins/md-reviser` — **no `npm install` required**.
- **Full-Context Single-Subagent Revision**: Dispatches one dedicated `md-reviser` subagent to read your entire document before proposing edits, preserving cross-section notation, terminology, and citations, while flagging conflicts or missing data with `[Needs Confirmation]`.
- **Two-Phase Diff Review**: Inspect AI feedback and inline red/green word-or-character diffs in the side pane. Click **Accept** (surgically writes to `.md`), **Reject**, or **Follow-up** for multi-turn refinement.
- **Academic-Ready Rendering & Bilingual UI**: Built-in KaTeX math (`$...$` / `$$...$$`), GFM tables, light/dark Antigravity theme sync, and `EN / 中文` UI toggle.
- **3 Input Channels**:
  1. **Visual Review Panel** (primary native side pane)
  2. **Inline Markdown Annotations** (`<!-- @fix: ... -->`, CriticMarkup `{>>...<<}`) or chat-listed comments
  3. **Optional Google Docs Integration** (automatically uses Antigravity's `gdocs` plugin if installed)

---

## Quick Install (1 Command, Zero Dependencies)

Requires **Node.js ≥ 18** (already present in Antigravity environments).

```bash
git clone https://github.com/ViviYE432/md-reviser-antigravity.git ~/.gemini/config/plugins/md-reviser
```

That's it! Antigravity auto-discovers the plugin on the next turn (or toggle it in **Customizations → Plugins → MD Reviser**).

### Updating

```bash
git -C ~/.gemini/config/plugins/md-reviser pull
```

### Uninstalling

Remove the directory (or uninstall from Antigravity's Customizations page):

```bash
rm -rf ~/.gemini/config/plugins/md-reviser
```

---

## Usage in Antigravity

1. **Open the Visual Review Panel**:
   - Ask Antigravity: *"Open the MD Reviser visual review panel for `path/to/paper.md`"* (or *"打开论文的可视化审阅面板"*).
   - Or invoke `/md-revise` directly.
2. **Highlight & Annotate**:
   - Select any text (including LaTeX math) in the side pane → click **+ Comment** → write your revision instruction.
3. **Send to AI**:
   - Click **✨ Send to AI** (or type `/md-revise` in chat).
   - The `md-reviser` subagent reads the entire document, analyzes all pending comments together, and fills in AI feedback + inline red/green diffs right back into the side pane.
4. **Accept, Reject, or Follow-up**:
   - Review each proposal card and click **Accept** to apply it cleanly to your `.md` file, **Reject** to skip, or **Follow-up** to continue the thread.

Sidecar annotations are stored cleanly in `.md-reviews/<filename>.review.json` next to your Markdown file so your `.md` stays clean.

---

## Project Structure

```text
md-reviser-antigravity/
├── plugin.json               # Antigravity plugin manifest
├── mcp_config.json           # Launches server/dist/server.mjs via node
├── assets/logo.svg           # Plugin icon (light/dark theme friendly)
├── skills/md-revise/SKILL.md # /md-revise orchestration workflow
├── agents/md-reviser.md      # Full-context revision specialist subagent
├── server/
│   ├── src/                  # Source code (core, MCP server, UI)
│   ├── dist/                 # Prebuilt zero-dependency server.mjs & app.html
│   └── build.mjs             # esbuild bundler for both server & UI
├── examples/sample-paper.md  # Sample paper for quick testing
└── test/md-reviser.test.mjs  # Automated lifecycle & isolated stdio tests
```

---

## Development

Only needed if you want to modify the source code and rebuild `server/dist/`:

```bash
npm install
npm run build
npm test
```

---

## License

[MIT](./LICENSE) © ViviYE432