Skip to content

Pass planning mode answers to Claude Code prompts in work mode - #25

Open
yanismydj wants to merge 1 commit into
mainfrom
task-agent/tas-78
Open

Pass planning mode answers to Claude Code prompts in work mode#25
yanismydj wants to merge 1 commit into
mainfrom
task-agent/tas-78

Conversation

@yanismydj

Copy link
Copy Markdown
Owner

Summary

Implements functionality to pass planning mode answers to Claude Code prompts during work mode execution. Previously, when users answered questions during planning mode, these answers were not being utilized when generating prompts for Claude Code during work mode.

Changes

  • Added planningQAndA field to PromptGeneratorInputSchema: Stores the planning conversation including questions and answers
  • Updated PromptGeneratorAgent.buildContext(): Includes planning discussion section in generated prompts with clear speaker attribution
  • Created collectPlanningQAndA() helper method: Extracts all planning questions (identified by emoji markers ❗, ❓, 💭) and user responses from ticket comments
  • Modified handleExecuteDirect(): Collects planning Q&A and passes it to the prompt generator

How It Works

  1. During planning mode, questions are posted with emoji markers (❗, ❓, 💭)
  2. Users answer via checkboxes or reply comments
  3. When work mode starts, collectPlanningQAndA() gathers all planning comments
  4. The prompt generator formats this Q&A chronologically with speaker labels
  5. Claude Code receives complete context including all planning decisions

Benefits

  • Claude Code now has full context of planning discussions and user decisions
  • No loss of information during mode transitions
  • Planning answers are clearly formatted in prompts for AI comprehension
  • Seamless integration without requiring changes between modes

Testing

  • ✅ TypeScript type checking passes
  • ✅ Build succeeds without errors
  • ✅ Edge cases handled (no planning Q&A, empty comments)

Related Linear Ticket

https://linear.app/task-agent/issue/TAS-78

This ensures the PR is properly linked to the Linear ticket.

Implements functionality to capture planning Q&A and include it in work mode prompts:

- Added planningQAndA field to PromptGeneratorInputSchema to store planning conversation
- Updated PromptGeneratorAgent to include planning discussion in generated prompts
- Created collectPlanningQAndA helper in QueueProcessor to extract Q&A from comments
- Modified handleExecuteDirect to collect and pass planning Q&A to prompt generator

This ensures Claude Code receives complete context from planning mode, including:
- All planning questions (identified by emoji markers: ❗, ❓, 💭)
- All user responses and answers
- Chronological conversation flow

The planning Q&A is now formatted clearly in prompts with speaker attribution
(TaskAgent vs User) so the AI has full context of user decisions made during planning.

Fixes TAS-78

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant