foolish-bandit/gary: frontend contract review shell at /review

Commit `16c7bffd` adds a 434-line `/review` page that gives lawyers a guided path to contract review -- pick or upload a document, confirm what the assistant will look for, then land in the chat with a pre-built prompt attached. No backend changes.

contract-reviewworkflow

The flow is two steps before the chat handoff. Step 1 uses the existing FileDirectory component in single-select mode alongside a file input for direct upload via uploadStandaloneDocument. Step 2 shows a confirmation screen listing the eleven review topics (parties, important dates, governing law, payment terms, termination, indemnity, confidentiality, assignment, dispute resolution, unusual or risky clauses, missing clauses), a note about citation expectations, and a disclaimer that answers aren't legal advice.

"Start Review" builds a MikeMessage with role: "user", the hardcoded REVIEW_PROMPT, and a files array with the selected document ID. It calls useAssistantChat.handleNewChat and then router.push("/assistant/chat/{id}"). The backend sees an ordinary document-attached chat message; it has no concept of a "review" flow type.

The only change outside review/page.tsx is one line in InitialView.tsx: the home "Review Contract" card now routes to /review instead of /tabular-reviews. Tabular reviews remain accessible from the sidebar.

This commit established the pattern foolish-bandit reused for /draft and /explain. The architecture -- frontend prompt construction, useAssistantChat handoff, router.push -- is identical across all three shells. If you're evaluating the full guided-mode direction, this is the canonical version to read.

So what Worth a look if you want a lawyer-friendly on-ramp to contract review. It's low risk (one new file, one route change) and the prompt is straightforward to customize. Skip it if your users are comfortable with the raw chat interface -- the shell adds no AI capability, only a more structured entry point.

View this fork on GitHub →

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

Commits in this thread

2 commits from foolish-bandit/gary, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
89346e8c Merge pull request #8 from foolish-bandit/claude/contract-review-shell Zack Brenner 2026-05-07 ↗ GitHub
Add /review contract review shell
16c7bffd Add /review contract review shell Claude 2026-05-07 ↗ GitHub
commit body
Builds a frontend-only Contract Review flow that reuses the existing
upload, document picker, and assistant chat plumbing - no new backend
routes.

- New route at /review with a 3-step lawyer-friendly UI:
    1. Choose contract (existing FileDirectory single-select +
       upload via uploadStandaloneDocument)
    2. Confirm review (selected doc, what Gary will look for,
       citation expectation, "answers are not legal advice")
    3. Review key terms (handed off to the assistant chat)
- Start Review builds a MikeMessage with a fixed review prompt and
  the chosen document, then reuses useAssistantChat.handleNewChat
  + router.push("/assistant/chat/{id}"), the same path used by
  the Gary-mode home InitialView. The new chat page auto-sends
  the prefilled message and streams the cited response.
- Updates the Gary-mode "Review Contract" card to point at /review
  instead of /tabular-reviews. /tabular-reviews is unchanged and
  still reachable from the sidebar.

No backend changes, no API contract changes, no auth/billing/teams,
no new providers. License unchanged.

https://claude.ai/code/session_019pRkhcGDRKQWHjzAnV5yCL

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-161.md from inside the repo you want the changes in.

⬇ Download capture-thread-161.md