Files
Codewalkers/.planning/phases/10-multi-question-schema/10-04-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.9 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous
phase plan type wave depends_on files_modified autonomous
10-multi-question-schema 04 execute 3
10-02
10-03
src/test/e2e/edge-cases.test.ts
src/test/e2e/recovery-scenarios.test.ts
true
Update E2E tests to use questions array schema and add multi-question E2E scenario.

Purpose: Prove multi-question flow works end-to-end through dispatch/coordination. Output: E2E tests pass with new schema, multi-question scenario validated.

<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-02-SUMMARY.md @.planning/phases/10-multi-question-schema/10-03-SUMMARY.md

@src/test/e2e/edge-cases.test.ts @src/test/e2e/recovery-scenarios.test.ts

Task 1: Update existing E2E tests for questions array src/test/e2e/edge-cases.test.ts, src/test/e2e/recovery-scenarios.test.ts Update all E2E tests that use question scenarios:
  1. edge-cases.test.ts:

    • Find all setAgentQuestion calls, update to new signature with id
    • Update any direct scenario setting to use questions array
    • Update assertions checking question data
  2. recovery-scenarios.test.ts:

    • Update Q&A flow tests to use questions array format
    • Update resume calls to pass answers as Record<string, string>
    • Update assertions for getPendingQuestions

Replace patterns:

  • harness.setAgentQuestion(name, question)harness.setAgentQuestion(name, 'q1', question)
  • agentManager.resume(id, answer)agentManager.resume(id, { q1: answer }) npm run test:e2e passes Existing E2E tests pass with questions array schema
Task 2: Add multi-question E2E test src/test/e2e/recovery-scenarios.test.ts Add new test in "Agent Q&A extended scenarios" describe block:
it('should handle agent asking multiple questions at once', async () => {
  // Setup: agent asks two questions
  harness.setAgentQuestions('worker', [
    { id: 'q1', question: 'Which database?', options: [{ label: 'SQLite' }, { label: 'Postgres' }] },
    { id: 'q2', question: 'Include tests?', options: [{ label: 'Yes' }, { label: 'No' }] },
  ]);

  // Dispatch task
  await harness.dispatchManager.queueTask({ ... });
  await harness.dispatchManager.processQueue();
  await harness.waitForEvent('agent:waiting');

  // Verify both questions present
  const pending = await harness.getPendingQuestions('worker');
  expect(pending?.questions).toHaveLength(2);
  expect(pending?.questions[0].id).toBe('q1');
  expect(pending?.questions[1].id).toBe('q2');

  // Resume with answers for both questions
  harness.setAgentDone('worker');
  const agent = await harness.agentManager.getByName('worker');
  await harness.agentManager.resume(agent!.id, {
    q1: 'SQLite',
    q2: 'Yes',
  });

  // Wait for completion
  await harness.waitForEvent('agent:stopped');

  // Verify task completed
  const task = await harness.taskRepository.findById(...);
  expect(task?.status).toBe('completed');
});
npm run test:e2e passes including new multi-question test Multi-question E2E test validates full flow Before declaring plan complete: - [ ] `npm run test` passes (all unit + E2E tests) - [ ] Multi-question scenario test exists and passes - [ ] No references to old single-question format in E2E tests

<success_criteria>

  • All tasks completed
  • All E2E tests updated to questions array format
  • New multi-question E2E test validates batched answers
  • All tests pass </success_criteria>
After completion, create `.planning/phases/10-multi-question-schema/10-04-SUMMARY.md`