Contract Playbook AI

Client-side, AI-powered contract review application for native Word redlining and playbook generation.

View on GitHub

Contract Playbook AI

Contract Playbook AI — client-side, AI-powered contract review and playbook generation with true Word .docx Track Changes. Fully browser-based, no HTML/Markdown wrappers, nothing like this open source today.

Watch the Demo


🚀 Key Features


📁 Why .docx Matters

Microsoft Word .docx is the de facto standard for contracts and legal documents. Lawyers, corporate legal teams, and courts rely on it for everything from clause numbering and cross-references to styles, footnotes, and Track Changes. Even small formatting or version errors can change the meaning of a contract, so preserving fidelity is critical.

Many tech solutions assume Markdown, HTML, or JSON is enough—but these formats break essential legal workflows. Without true .docx support, you lose Track Changes, precise paragraph structure, numbering, and metadata, making redlines unreliable and collaboration error-prone.

.docx also enables seamless collaboration across multiple parties, with consistent formatting and audit trails. Any tool that ignores it risks disrupting real-world legal workflows, which is why native .docx editing is indispensable.


🌟 Vision

This project is an experimental frontend proof-of-concept. Currently, it leverages Superdoc for client-side .docx parsing and editing, allowing rapid experimentation with AI-assisted contract review and playbook generation.

The long-term vision is to build a fully open-source library that enables programmatic, full-document editing and diff at the Word level, without relying on third-party parsing frameworks. This will start with a native Microsoft Word JavaScript API that performs word-level diffing and precise Track Changes management, bringing the capabilities of our AI-assisted playbook engine directly into Word itself.

I’ve already prototyped this approach—check out the proof-of-concept in this demo:
YouTube Demo: MS Word Add-In for Diff

The ultimate goal is to provide developers and organizations with a fully open, extensible, and secure solution for AI-assisted contract automation, workflow integration, and robust document diffing.

Contributions that advance either the frontend proof-of-concept, the AI playbook logic, or the eventual library are highly welcome.


🔗 Demo & Repo

You can test the full Contract Playbook AI workflow — playbook extraction, review, and Word-compatible redlining — directly in your browser using your own Google AI Studio free tier.

▶️ Try the Live Demo (Runs in Your Google AI Studio Account)

After clicking the link:

1. Allow access to Google Drive to load this prompt.

2. Agree to the Google AI Studio terms and conditions.

3. Click “Continue to the app” on the “This app is from another developer” screen.

4. Open Preview screen and run the app.

That’s it — runs fully client-side using your own Gemini API allowance. No installs or backend required. ⚠️ Google AI Studio’s free tier may change or disappear in the future, so make hay while the sun shines.
For best performance, use contracts under ~10 pages as sequential LLM calls are used.


⚡ Behind the Scenes: AI Playbook Engineering

The client-side contract playbook engine is designed for speed, reliability, and real-world contracts:

All of this is aimed at making AI-assisted contract review faster, more reliable, and developer-friendly—without sacrificing token efficiency or context fidelity.


📝 Native .docx Editing & Track Changes

This app works directly with Microsoft Word .docx files—no intermediate formats, no HTML wrappers, no lossy conversions. It currently leverages Superdoc for client-side parsing and editing, but the architecture, AI integration, and granular Track Changes mapping are custom.


🤝 Contributing

Want to help push this further? Check out CONTRIBUTING.md. We’re especially looking for developers interested in:

⚠️ Notes