LegalContracts

Vibe Legal Batch Redliner

Use when you need to batch redline multiple contracts against a negotiation playbook, apply tracked changes to Word documents programmatically, or run contract review workflows with AI assistance.

LLegalQuants·Legal·Apache-2.0

Library skill — the default version is maintained in GitHub; edits you make live in your own clone.

Use this skillDownload .zip
How does this work?
  • ChatGPT opens a new chat with the skill loaded. If it's too long for a link, it's copied to your clipboard — just paste.
  • Claude works the same way. To install it permanently, download the .zip and upload it under Claude → Settings → Capabilities → Skills (Pro/Team/Enterprise).
  • Copy prompt copies the skill so you can paste it into any assistant, including Grok.

Vibe Legal Server — Batch Contract Redlining

CRITICAL — Data flow warning. This skill sends the full text of every uploaded contract to Google Gemini for AI-driven redlining. The "bring your own key" model means traffic is keyed to your account, but the document body still leaves your environment and is processed on Google infrastructure. Do not invoke on privileged client material unless your firm has approved sending legal documents to Google Gemini under the relevant DPA / firm AI policy. If your firm has not approved Gemini for client work, configure the server to point at an on-prem model (e.g., a local Llama / Mistral deployment) or an alternative provider covered by your firm's policy (e.g., Azure OpenAI under your tenant's data-processing terms) before running the skill on real matters.

Audience and Work Shape

Audience: UK-qualified commercial lawyers (or supervised paralegals under a qualified lawyer's sign-off) who are comfortable reading tracked changes line-by-line and willing to reject AI-applied edits. Not for non-lawyer end-users, self-service contract-acceptance workflows, or unsupervised paralegal review.

Work shape: Bounded Transactional at batch scale. Each redlined DOCX is a draft proposal, not a recommendation, and the operator must accept or reject every tracked change individually. The work shape note matters because batch volume (up to 5 documents in one run) creates exactly the pressure that produces skim-acceptance — at scale, escalation matters more, not less. If you cannot honestly commit to per-change review for every document in the batch, do not run the batch.

Scope and Legal Use

This skill provides legal support (a first-pass redline against a playbook), not legal advice. Three legal failure modes the operator must own:

  1. Advice vs. support. The redlines are positional drafts; the responsible lawyer owns every position taken in the output. A tracked change in the DOCX is not a recommendation by the skill, by LegalQuants, or by the original author.
  2. Privilege and confidentiality. Uploading a client contract to Google Gemini (via your BYOK API key) routes the document text through a third-party AI processor and, depending on Gemini configuration and region, may involve cross-border processing. This can impair privilege and breach engagement-letter / client-confidentiality obligations absent client consent and firm AI-policy coverage. Treat every invocation as an outbound disclosure and confirm coverage before upload.
  3. Accountability. A named reviewing lawyer must sign off on the final redline. The skill produces no audit trail of which AI operations were accepted or rejected; the reviewing lawyer is responsible for capturing that record outside the tool.

When to Use

What It Is

Part 2 of the Vibe Legal project — a batch processing server for contract redlining.

How It Works

Architecture

Upload DOCX → Extract structure → Send to AI with playbook → 
AI returns operations (AMEND/INSERT/DELETE) → 
Apply as tracked changes → Download redlined document

Key Design Decisions

Example Playbooks

# NDA Review (Recipient)
## Priority Issues
1. Term length — push for 2-3 years, not perpetual
2. Carve-outs — ensure public info exclusion
3. Residuals — delete or narrow heavily

## Watch For
- Perpetual confidentiality obligations
- Broad injunctive relief language
- Unilateral fee provisions

Usage

Single Document Review

  1. Upload contract (DOCX)
  2. Select playbook
  3. Process → download redlined document

Batch Mode

  1. Upload up to 5 documents
  2. Select playbook
  3. Process sequentially
  4. Download individually or as ZIP

Playbook Creation

Write negotiation positions in Markdown:

# SELLER'S PLAYBOOK
## Priority Issues
1. Payment terms — require payment on delivery
2. Liability cap — maintain full purchase price cap

## Watch For
- Unlimited liability language
- Buyer-friendly termination rights

Confidence Bands (per contract)

Each AI-applied tracked change should be reviewed with its confidence band in mind. The skill should be configured to tag each operation in the output (e.g., via a sidecar summary memo per DOCX) so the lawyer can triage rather than read every change blind:

A redlined DOCX without confidence bands attached is unreviewed output. Treat it as Low across the board.

Out of Scope

This skill does not handle:

Escalation

Stop the batch (or stop the individual document) and route to a named reviewing lawyer when any of the following triggers fire. At batch scale, escalation matters more, not less — the volume of the batch is not an excuse to lower the escalation threshold; it is the reason to raise it.

In any of these cases the skill should produce an escalation memo, not just a redlined file, identifying the trigger and the document(s) affected.

Known Limitations

Critical: Always review every change. Work on copies. This is research software, not production-ready.

Tech Stack

Setup

git clone https://github.com/sarturko-maker/vibe-legal-server
cd VibeLegalPython

# Backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py

# Frontend (new terminal)
cd vibelegal-frontend
npm install
npm run dev

Limitations

QA Remediation (LegalQuants, 2026-05)

Original author: Artur Serov. Remediation by LegalQuants under the Legal Skill Design Framework, 2026-05. No technical content changed.

This pass added the following to the skill body:

Out of scope for this remediation pass: vendoring the external vibe-legal-server repo into the skill directory, adding a LICENSE, adding eval data, or pinning a commit hash for the external repo. Those remain open items for the original author and are noted in the QA report.