---
phase: 10-multi-question-schema
plan: 03
type: execute
wave: 2
depends_on: ["10-01"]
files_modified:
  - src/test/harness.ts
  - src/agent/manager.test.ts
  - src/agent/mock-manager.test.ts
  - src/test/harness.test.ts
  - src/dispatch/manager.test.ts
autonomous: true
---

<objective>
Update TestHarness and all tests to use questions array schema.

Purpose: Tests must exercise the new multi-question flow.
Output: All tests pass with updated schema, TestHarness provides multi-question helpers.
</objective>

<execution_context>
@~/.claude/get-shit-done/workflows/execute-plan.md
@~/.claude/get-shit-done/templates/summary.md
</execution_context>

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

@src/test/harness.ts
@src/agent/mock-manager.ts
</context>

<tasks>

<task type="auto">
  <name>Task 1: Update TestHarness convenience methods</name>
  <files>src/test/harness.ts</files>
  <action>
1. Update setAgentQuestion to setAgentQuestions (or keep name but accept array):
```typescript
setAgentQuestions(
  agentName: string,
  questions: Array<{
    id: string;
    question: string;
    options?: Array<{ label: string; description?: string }>;
    multiSelect?: boolean;
  }>,
  delay?: number
): void {
  this.agentManager.setScenario(agentName, {
    status: 'questions',
    questions,
    delay,
  });
}
```

2. For single-question convenience, add helper that wraps:
```typescript
setAgentQuestion(
  agentName: string,
  questionId: string,
  question: string,
  options?: Array<{ label: string; description?: string }>,
  delay?: number
): void {
  this.setAgentQuestions(agentName, [{
    id: questionId,
    question,
    options,
  }], delay);
}
```

3. Rename getPendingQuestion to getPendingQuestions, return PendingQuestions | null
  </action>
  <verify>npm run typecheck passes</verify>
  <done>TestHarness supports questions array with convenience helpers</done>
</task>

<task type="auto">
  <name>Task 2: Update all tests for questions array</name>
  <files>src/agent/manager.test.ts, src/agent/mock-manager.test.ts, src/test/harness.test.ts, src/dispatch/manager.test.ts</files>
  <action>
Update all test files that use question scenarios:

1. manager.test.ts:
   - Update mock CLI output to use 'questions' status with array
   - Update assertions for getPendingQuestions

2. mock-manager.test.ts:
   - Update all scenarios from { status: 'question', question: '...' }
     to { status: 'questions', questions: [{ id: 'q1', question: '...' }] }
   - Update assertions for pendingQuestions array
   - Add test for multi-question scenario

3. harness.test.ts:
   - Update setAgentQuestion calls to new signature
   - Update getPendingQuestions assertions

4. dispatch/manager.test.ts:
   - Update any question scenario mocks

Search pattern to find affected code:
- `status: 'question'` → `status: 'questions'`
- `question:` (in scenarios) → `questions: [{ id: '...', question: ... }]`
- `getPendingQuestion` → `getPendingQuestions`
- `.question` assertions → `.questions[0].question`
  </action>
  <verify>npm run test passes</verify>
  <done>All tests updated and passing with questions array</done>
</task>

</tasks>

<verification>
Before declaring plan complete:
- [ ] `npm run typecheck` passes
- [ ] `npm run test` passes (all tests green)
- [ ] No references to old 'question' singular status remain
</verification>

<success_criteria>

- All tasks completed
- TestHarness provides setAgentQuestions and setAgentQuestion helpers
- All existing tests updated to questions array format
- New test for multi-question scenario exists
- All tests pass
</success_criteria>

<output>
After completion, create `.planning/phases/10-multi-question-schema/10-03-SUMMARY.md`
</output>
