zgbrenner turns document-review rows into one-click legal tasks

A new matter-review template doesn't just summarise documents - it hands you the next move on each one.

discoveryworkflow

zgbrenner adds a ready-made template for reviewing the documents in a matter. Point it at a set of files and it builds a table: document name and type, dates, parties, a short summary, key issues, and - crucially - a flag that defaults to "needs an attorney's eyes" whenever the assistant is unsure.

The sharper move is what happens next. One column suggests a follow-up legal task for each document, and now that suggestion is clickable. Hit it and the assistant opens with the right task selected, the document attached, and a prompt already filled in from the row. The team is candid in the setup notes that every extracted value is unverified draft text - the prefill is a starting point for the lawyer, not a substitute for reading the document. Rows where nothing useful was found stay deliberately inert, with no button to click.

So what Worth a look for any legal-ops lead who wants document triage to flow straight into action without losing the attorney sign-off step.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

4 commits from zgbrenner/gary, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
42ef29ea Merge pull request #2 from foolish-bandit/claude/gary-us-simplification-AjDDT Zack Brenner 2026-05-19 ↗ GitHub
Add Matter Document Review template and lawyer-friendly Review Table
a23d4303 Merge pull request #5 from foolish-bandit/claude/gary-us-simplification-AjDDT Zack Brenner 2026-05-19 ↗ GitHub
Run a Saved Legal Task from a Review Table row
06f80d85 feat: add Matter Document Review template and lawyer-friendly Review Table Claude 2026-05-19 ↗ GitHub
commit body
Lightweight improvements to make uploaded matter documents easier to
understand at a glance.

- Rebrand the user-visible "Tabular Review / Tabular Reviews" copy to
  "Review Table / Review Tables" across the sidebar, project tabs,
  modal headers, breadcrumbs, page titles, owner-only-action messages,
  and the workflow-builder helper text. Internal type names and routes
  are unchanged.
- Rewrite both empty states to match the lawyer-friendly direction:
  title "Start a Review Table", body about Gary organizing uploaded
  documents into a table with dates, document types, people,
  summaries, and follow-up issues, primary button "Create Review
  Table", and a secondary note "Review all extracted information
  before relying on it."
- Add a built-in tabular workflow "Matter Document Review" with eight
  default U.S. legal review columns: Document Name, Document Type,
  Date, People / Parties, Short Summary, Key Issues, Suggested Saved
  Legal Task, and Needs Attorney Review. Column prompts are cautious:
  use only the uploaded content, do not invent, write "Unknown" when
  missing, default "Needs Attorney Review" to Yes when uncertain or
  when the document touches legal rights / privilege / deadlines /
  filings / settlement / sensitive data. The Suggested Saved Legal
  Task column tags map to the eight built-in Saved Legal Tasks.
- Pre-select Matter Document Review when launching the create-review
  modal from inside a matter, and pin it to the top of the tabular
  template dropdown.
- Surface a plain-English failure on create ("Gary could not create
  the Review Table. Check your AI connection and try again.")
  via a dismissible inline banner in the project Review Tables tab.
- Add a persistent attorney-review reminder banner above every Review
  Table: "Draft for attorney review. Review all extracted information
  before relying on it. Do not treat any cell as verified fact, legal
  advice, or a definitive privilege call."
- Document the Review Table flow in the U.S. lawyer setup guide and
  add a terminology-map entry for Matter Document Review.
- Add focused tests covering the new workflow's columns, tags,
  cautious prompts, and the absence of legacy "Tabular Review" /
  "Workflow Template" copy in built-in workflows.

Row-to-Saved-Legal-Task launching from a row is intentionally deferred
to a follow-up PR; the Suggested Saved Legal Task column is purely
informational today and is documented as such in the setup guide.
b01092b7 feat: run a Saved Legal Task from a Review Table row Claude 2026-05-20 ↗ GitHub
commit body
Make the "Suggested Saved Legal Task" column actionable. When Gary
suggests a recognized task for a document, a lawyer can launch that
task in the assistant prefilled with the row's context.

- suggestedTask.ts: maps the eight recognized task names to built-in
  Saved Legal Task ids. Matching tolerates whitespace, case, tag
  brackets, and trailing punctuation but is never fuzzy - an
  unrecognized value resolves to null rather than guessing. Also
  builds the row-context prompt (task name, matter, document name,
  extracted fields, and attorney-review safety language).
- RunSuggestedTaskModal.tsx: a simple "Run Saved Legal Task?"
  confirmation with a prompt preview and Open in Assistant / Cancel.
- TRSidePanel: shows a "Run Suggested Task" action - only on the
  Suggested Saved Legal Task column's cell, and only when the value
  resolves to a recognized task and the cell has finished generating.
- TabularReviewView: resolves the row's suggested task, builds the
  row-context prompt from the row's other cells, and on confirm
  creates a chat, prefills an assistant draft, and opens it.
- Prefill, not auto-run: a new newChatDraft channel on
  ChatHistoryContext carries a draft (content + workflow + attached
  document) that ChatInput seeds its initial state from. The lawyer
  reviews and sends manually - nothing is auto-submitted. ChatView
  renders an empty-with-draft chat instead of the loading skeleton.
- The row's document is attached via the existing chat file
  mechanism; the document_id rides in the attachment, never in the
  visible prompt text. No raw internal ids appear in the prompt.
- Safety: the prompt instructs Gary to treat the row as draft and
  unverified, use the uploaded document, not invent facts / dates /
  legal authorities / deadlines / parties, and flag uncertainty.
- Docs: add "Running a Saved Legal Task from a Review Table" to the
  U.S. lawyer guide; add a terminology-map entry.
- Tests: suggestedTask.test.ts covers the eight-task mapping (and
  that each id is a real assistant built-in), match tolerance, the
  no-fuzzy-match guarantee, blank/Unknown/None handling, the prompt's
  attorney-review language, Unknown fallbacks, and the absence of raw
  internal ids and legacy terminology.

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-534.md from inside the repo you want the changes in.

⬇ Download capture-thread-534.md