# Thread Builder

> Turn an idea or rough notes into a thread ready to schedule.

Source: https://docs.xholic.ai/playbooks/thread-builder/

Read by connected AIs with `get_playbook` and id `thread-builder`.

Turn an idea or rough notes into a thread ready to schedule.

Use when they want a thread from an idea, notes or a draft. Not for a single post.

**The user might say:** "Turn this idea into a thread with a strong hook and put it on a card I can edit and schedule: [your idea]"

## Steps

1. Check what the user's Workers already wrote: ready-made drafts, free to use. Call `get_worker_drafts`.
2. Get material in the user's voice (proven posts, their winners, saves, recent posts to avoid repeating). Call `get_writing_kit` with `{"topic":"<the idea>"}`.
3. For each post, find proven posts on its idea near the account's size, ranked by how far they beat their author's usual. Add 1–4 keywords so it can search live X when the library is thin. Call `search_inspiration` with `{"query":"<the post's idea>","keywords":"<1-4 words>"}`.
4. Write each post yourself from one source post's shape (hook, structure, kind of ask): one idea each, the user's voice, no links, no facts that aren't in the user's data.
5. Check every draft before showing it, with the id of the post it was built from; fix what it flags. Call `check_draft` with `{"text":"<post>","sourcePostIds":"<source post id>"}`.
6. Check the whole thread. Keep every part within the account's xPostLimit (280 per part without an X subscription). Call `check_draft` with `{"text":"<part 1>","threadParts":["<part 1>","<part 2>"]}`.
7. Before scheduling, ask in one message, your recommendation first: number the posts (format, e.g. 1/5)? End with a thread finisher reply that links to the first post (10 post credits on top of 1 per part)? Which automations run: auto-repost reposts only the first post, which brings back the whole thread; auto-delete removes every post.
8. Only when asked: save or schedule every part as threadParts, with the options they chose. Call `schedule_post` with `{"text":"<part 1>","threadParts":["<part 1>","<part 2>"],"threadOptions":"{\"numbering\":true,\"numberingFormat\":\"fraction\",\"finisher\":true}","scheduledAt":"<time>","timezone":"<tz>"}`.
9. Read the result back: it must say it's a thread with every part. If it doesn't, say so; never tell the user the whole thread is scheduled.
