Add clarifying-question pass to the dispatch wizard - #65
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
The interactive dispatch wizard previously only checked that the task was non-empty before firing off an agent. This adds an LLM-assisted review step between task entry and the confirm/dispatch step that surfaces clarifying questions and flags shaky or contradictory instructions, letting the user refine the prompt (and re-review) before dispatching. The pass degrades gracefully: with no ANTHROPIC_API_KEY, or if the review call fails, the wizard continues to dispatch as before. Generated-By: PostHog Code Task-Id: 41693003-3f3a-4d77-9bb4-99c0e06d9c1b
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The interactive dispatch wizard (
src/commands/dispatch-interactive.ts) was a straight form-filling flow — its only check on the task was that it wasn't empty. This adds an LLM-assisted review step between task entry and the confirm/dispatch step that:The review uses a structured-output call (
src/commands/task-review.ts) and returns aready/needs_clarification/flawedverdict with concise questions and concerns. A clear, well-scoped task passes straight through.It never blocks a dispatch on its own: with no
ANTHROPIC_API_KEY, or if the review call fails, the wizard degrades gracefully and dispatches as before. Parsed model output goes through a defensivenormalize()(unit-tested) to tolerate drift.Why
Addresses the gap in Linear PK-283 ("Polyshell"): the wizard blindly took whatever prompt it was given. Catching bad or underspecified tasks at the wizard step means cleaner dispatches and fewer wasted agent runs downstream.
Test plan
npm run build(tsc) passes.npm test— 41 tests pass, including newtest/task-review.test.tscoveringnormalize()drift-tolerance.prettier --checkclean on the changed files.Created with PostHog Desktop from this inbox report.