foolish-bandit/gary: /explain shell completes the guided-workflow trio

Commit `b3287856` adds a 159-line `/explain` page -- the third and last of foolish-bandit's guided workflow shells. Paste legal text, optionally provide context and goal, and the page assembles a structured prompt and routes to the chat.

chat-uicontract-review

The page is simpler than /review and /draft. There's no stepper, no document type selection. A single textarea takes the legal text; three optional fields accept context/document type, goal, and preferred tone. The assembled prompt has a fixed structure line: "Use this structure: What it says, Why it matters, What could go wrong, Possible revision."

Implementation follows the same pattern as the other shells: useAssistantChat.handleNewChat builds the chat, router.push redirects to /assistant/chat/{id}. The error path now surfaces BACKEND_UNAVAILABLE_MESSAGE -- "This will be available once GaryOSS is connected to the backend." -- which this commit also backfills into the draft and review error paths (replacing the earlier "Could not start..." strings).

The /explain route gets wired into InitialView.tsx as a fourth action card. Across the same diff, a merge commit from PR #13 also folds in UI/UX fixes from a broader polish PR.

All three shells (/review, /draft, /explain) are independently importable. None requires the others, and none requires backend changes. The prompt structure is the only opinionated piece -- each is defined as a constant in the page file and is easy to replace.

So what Worth a look if you want a quick on-ramp for legal clause explanation. The page is small (159 lines) and the four-part response structure ("What it says, Why it matters, What could go wrong, Possible revision") is a reasonable default to adapt. It pairs with the `/review` and `/draft` shells but stands on its own.

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
b3287856 Add Explain This workflow shell Zack Brenner 2026-05-07 ↗ GitHub
35d1f06a Merge pull request #13 from foolish-bandit/codex/create-pr-#10-frontend-polish-and-bugfix-e39g9q Zack Brenner 2026-05-07 ↗ GitHub
Add 'Explain This' page, surface backend-unavailable messages, and UI/UX fixes

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

⬇ Download capture-thread-165.md