Skip to content

feat: add draft_task entity for multi-turn clarification workflows#86

Open
MaxLinCode wants to merge 9 commits intomainfrom
claude/draft-task-entity
Open

feat: add draft_task entity for multi-turn clarification workflows#86
MaxLinCode wants to merge 9 commits intomainfrom
claude/draft-task-entity

Conversation

@MaxLinCode
Copy link
Copy Markdown
Owner

Summary

  • Introduces a draft_task entity kind so new-task clarification workflows accumulate fields across turns instead of resetting
  • When operationKind === "plan" and targetRef === null, a draft_task is created in the entity registry; clarification entities point their parentTargetRef at it, and pending_write_operation.targetRef is patched to reference it
  • After mutation creates a real task, the draft is superseded
  • Improves deriveAmbiguityReason to surface missing-fields info instead of generic confidence messages

Test Plan

  • Schema tests: draft_task parses correctly, rejects invalid data
  • Entity context: active drafts appear in knownEntities, superseded ones excluded
  • Turn router: getParentEntityId returns undefined for drafts; ambiguity reason mentions missing fields
  • Conversation state: draft creation, update, parentTargetRef wiring, targetRef patching, negative cases (edit ops, non-null targetRef)
  • Mutation state: active drafts superseded after task creation
  • Integration: full 2-turn clarification workflow validates field accumulation end-to-end
  • All 299 tests pass across 29 test files
  • Typecheck clean (pre-existing error in interpret-write-turn.test.ts unrelated)

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
atlas-web Ignored Ignored Apr 16, 2026 11:33pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant