feat(agents): answer planning questions without unnecessary plan edits#479
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 22, 2026
Merged
Conversation
…ithout plan edits
The planning comment agent previously assumed every comment required plan
modifications, wasting iterations on unnecessary UpdateWorkItem calls when
users just asked questions like "Why this approach?" or "Can you explain
step 3?". Mirror the pattern from respond-to-pr-comment: classify the
comment as a question (PostComment only), a plan update (existing behavior),
or both, and act accordingly.
- Add Comment Classification section (Category A/B/C) to the prompt template
- Soften CRITICAL rules: "ONLY job" → "primary role", remove unconditional
UpdateWorkItem mandate
- Add branching task flow: questions get PostComment-only, updates get plan
edits + summary, mixed gets both
- Add question-only response format ("Re: [topic]") alongside existing
"Plan Updated" format
- Update taskPrompts.ts buildCommentResponsePrompt with classification
instruction matching buildPRCommentResponsePrompt pattern
- Add tests for new classification behavior and template rendering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
respond-to-planning-commentagent to classify comments as questions, plan updates, or both — and act accordinglyPostCommentreply only, without wastefulUpdateWorkItemcallsrespond-to-pr-comment/buildPRCommentResponsePromptChanges
src/agents/prompts/templates/respond-to-planning-comment.eta— Add Comment Classification section (Category A/B/C), branching task flow, dual response format, updated rulessrc/agents/shared/taskPrompts.ts— UpdatebuildCommentResponsePromptwith classification instructiontests/unit/agents/prompts.test.ts— Add 5 tests for template rendering of new classification sectionstests/unit/agents/shared/taskPrompts.test.ts— Add 3 tests for new classification, question-only, and ambiguous-default behaviorTest plan
npm run typecheckpassesnpm run lintpasses🤖 Generated with Claude Code