Files
Codewalkers/.planning/phases/10-multi-question-schema/10-02-PLAN.md
Lukas May 9dd0e46060 docs(10): create phase plan
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
2026-01-31 17:51:18 +01:00

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
10-01
src/agent/manager.ts
src/agent/mock-manager.ts
true
Update ClaudeAgentManager and MockAgentManager to handle questions array and batched answers.

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>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/phases/10-multi-question-schema/10-01-SUMMARY.md

@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'):
  1. In switch statement, rename case 'question' to case 'questions'
  2. Store pendingQuestions (plural) with the full questions array:
case 'questions': {
  if (active) {
    active.pendingQuestions = {
      questions: agentOutput.questions,
    };
  }
  // ... emit event with questions array
}
  1. Update ActiveAgent interface:
interface ActiveAgent {
  subprocess: ResultPromise;
  result?: AgentResult;
  pendingQuestions?: PendingQuestions;  // was pendingQuestion
}
  1. Rename getPendingQuestion to getPendingQuestions, return pendingQuestions

  2. 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; } ```
  1. Update MockAgentRecord interface:
pendingQuestions?: PendingQuestions;  // was pendingQuestion
  1. 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
  1. Rename getPendingQuestion to getPendingQuestions

  2. 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>
After completion, create `.planning/phases/10-multi-question-schema/10-02-SUMMARY.md`