Phase 10: Multi-Question Schema - 4 plans in 3 waves - Wave 1: Schema & types (01) - Wave 2: Manager implementations + unit tests (02, 03 parallel) - Wave 3: E2E tests (04) - Ready for execution
3.7 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous
| phase | plan | type | wave | depends_on | files_modified | autonomous | |||
|---|---|---|---|---|---|---|---|---|---|
| 10-multi-question-schema | 02 | execute | 2 |
|
|
true |
Purpose: Implementations must match the updated schema and types from Plan 01. Output: Both managers handle multi-question flow with batched resume answers.
<execution_context>
@/.claude/get-shit-done/workflows/execute-plan.md
@/.claude/get-shit-done/templates/summary.md
</execution_context>
@src/agent/schema.ts @src/agent/types.ts @src/agent/manager.ts @src/agent/mock-manager.ts
Task 1: Update ClaudeAgentManager for questions array src/agent/manager.ts Update handleAgentCompletion to handle 'questions' status (was 'question'):- In switch statement, rename case 'question' to case 'questions'
- Store pendingQuestions (plural) with the full questions array:
case 'questions': {
if (active) {
active.pendingQuestions = {
questions: agentOutput.questions,
};
}
// ... emit event with questions array
}
- Update ActiveAgent interface:
interface ActiveAgent {
subprocess: ResultPromise;
result?: AgentResult;
pendingQuestions?: PendingQuestions; // was pendingQuestion
}
-
Rename getPendingQuestion to getPendingQuestions, return pendingQuestions
-
Update resume() signature to accept answers map:
async resume(agentId: string, answers: Record<string, string>): Promise<void>
The answers map keys are question IDs, values are the user's answers. Format answers as structured prompt for Claude: one line per answer. npm run typecheck passes ClaudeAgentManager handles questions array and batched answers
Task 2: Update MockAgentManager for questions array src/agent/mock-manager.ts 1. Update MockAgentScenario type: ```typescript | { status: 'questions'; // was 'question' questions: Array<{ id: string; question: string; options?: Array<{ label: string; description?: string }>; multiSelect?: boolean; }>; delay?: number; } ```- Update MockAgentRecord interface:
pendingQuestions?: PendingQuestions; // was pendingQuestion
- Update completeAgent() switch case from 'question' to 'questions':
case 'questions':
record.info.status = 'waiting_for_input';
record.pendingQuestions = {
questions: scenario.questions,
};
// emit event with questions array
-
Rename getPendingQuestion to getPendingQuestions
-
Update resume() signature:
async resume(agentId: string, answers: Record<string, string>): Promise<void>
Clear pendingQuestions on resume. npm run typecheck passes MockAgentManager handles questions array and batched answers
Before declaring plan complete: - [ ] `npm run typecheck` passes - [ ] `npm run build` succeeds - [ ] Both managers use questions array consistently - [ ] resume() accepts answers map on both managers<success_criteria>
- All tasks completed
- ClaudeAgentManager handles 'questions' status
- MockAgentManager handles 'questions' status
- Both resume() methods accept Record<string, string> answers
- getPendingQuestions returns array-based type </success_criteria>