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.9 KiB
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 |
|
|
true |
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>
@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:-
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
-
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
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');
});
<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>