foolish-bandit/gary: frontend drafting shell with 8 document types

Commit `7c520d4f` adds a `/draft` page that mirrors the `/review` shell: a guided two-step UI for drafting legal documents entirely on the frontend, with no backend changes. The home "Draft Something" card is rewired from `/workflows` to `/draft`.

draftingchat-ui

The flow presents eight document type cards -- Email, Letter, Memo, Clause, Summary, Demand letter, Client update, Custom draft -- each with a plain-English description and a type-specific opening line. Selecting one advances to a details step: a description textarea, optional Audience and Tone fields, and an optional document attachment via uploadStandaloneDocument. Clicking "Start Drafting" assembles a prompt and routes to /assistant/chat/{id}.

The assembled prompt follows a fixed structure: the type's opening line, then the user's description under "What I need:", then any audience/tone metadata, then a hardcoded tail instruction that tells the model to be practical, not invent facts, and flag missing information. That tail is defined as DEFAULT_INSTRUCTION in the page file -- it lives in the frontend, not in any backend config.

The page is 562 lines and the only other change is a single line in InitialView.tsx. No new backend routes, no new API surface, no changes to streaming or citations -- all of that falls out from the existing useAssistantChat hook. Each draft ends up as an ordinary chat thread in Assistant History.

One detail worth noting: the error path when handleNewChat returns no chat ID surfaces a generic "Could not start the draft. Try again." message (later swapped to a backend-unavailable string in the next PR). If you're adopting this without a connected backend you'll hit that path immediately.

So what Worth a look if you want a guided drafting entry point with minimal plumbing cost. The document type cards and two-step UI are clean and easy to extend. The main thing to evaluate before adopting is the hardcoded `DEFAULT_INSTRUCTION` -- foolish-bandit notes it's the kind of detail you'd want to own rather than copy verbatim.

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
61f1f719 Merge pull request #9 from foolish-bandit/claude/draft-something-shell Zack Brenner 2026-05-07 ↗ GitHub
Add /draft Draft Something workflow shell
7c520d4f Add /draft Draft Something workflow shell Claude 2026-05-07 ↗ GitHub
commit body
Adds a frontend-only drafting flow that mirrors the /review pattern
from PR #8. Reuses the existing assistant chat plumbing - no new
backend routes, no API contract changes.

- New route at /draft with a 3-step lawyer-friendly UI:
    1. Choose draft type (8 cards: Email, Letter, Memo, Clause,
       Summary, Demand letter, Client update, Custom draft, each
       with plain-English helper copy)
    2. Add details (description textarea with the suggested
       placeholder; optional Audience / Tone single-line fields;
       optional Attach a document via existing
       uploadStandaloneDocument; lawyer-facing caution box)
    3. Review draft (handed off to the assistant chat)
- Start Drafting builds a MikeMessage from the option's opening
  line + the user's description + optional metadata, appended with
  the default tail instruction:
    "Draft the requested legal document using the facts provided.
     Be clear, organized, and practical. Do not invent facts.
     Flag any missing information that would be needed before
     finalizing."
  Then reuses useAssistantChat.handleNewChat + router.push to the
  same /assistant/chat/{id} path used by /review and the home.
- Updates the Gary-mode "Draft Something" card to point at /draft
  instead of /workflows. /workflows is unchanged.

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

⬇ Download capture-thread-162.md