--- kind: task slug: agent-builder-editor-drafts title: Edit and persist AI-generated private agent drafts plan_slug: workspace-communications epic_slug: agent-participation status: ready priority: P1 tenant_id: global owner: unassigned cursor_todo_id: null updated_at: "2026-10-22" --- # Task summary Consume builder clarification/draft-patch events in the Agents tab and let members refine, save, resume, and discard their own private drafts. ## Description Build the transcript plus structured editor on top of the builder service and private-draft registry API. Conversational patches and direct field edits share one revision history with optimistic concurrency. Requested tools/access remain visibly unapproved and inert. This task does not sandbox, publish, install, or activate agents. ## Subtasks - [ ] Build builder transcript, clarification, streaming, retry, and typed-error UI. - [ ] Build structured draft editor and normalized revision/diff state. - [ ] Consume `Task-agent-registry-api.md` create/save/resume/discard procedures and present optimistic-concurrency conflicts; do not create a second draft API. - [ ] Add accessibility, stale-revision, private-draft isolation, and malformed-event tests. ## Owner or assignee `unassigned` ## Status `ready` ## Estimation `M` ## Acceptance criteria - [ ] Users can alternate between builder refinements and direct edits without silently losing changes. - [ ] Members can access only their own private drafts; `admin`/`owner` do not implicitly see them before publication. - [ ] Requested tools/access are clearly unapproved and cannot execute from the editor. - [ ] Saving creates immutable versions with actor and base-revision audit metadata. - [ ] `pnpm lint && pnpm type-check && pnpm test` pass. ## Dependencies `Task-ai-assisted-agent-builder.md` and `Task-agent-registry-api.md`. This task consumes, not implements, canonical private-draft persistence. ## Links to related Epic / Plan - Epic: `./Epic-agent-participation.md` - Plan: `../Plan-workspace-communications.md`