CLI command
social ghostwrite
Posts in a founder's style: a style profile learned from their own published posts, drafts in it, and nothing queued until the founder approves.
Invocation#
echo-cli social ghostwrite profiles
echo-cli social ghostwrite profile --account <social-account-id> --founder <name> --posts <n> --by <who>
echo-cli social ghostwrite draft --profile <profile-id> --topic <text> --by <who>
echo-cli social ghostwrite drafts --profile <profile-id>
echo-cli social ghostwrite approve|reject --id <draft-id> --by <founder>Inputs and output#
profiles and profile write profiles: id, social_account_id, founder, post_ids (the posts it was written from), profile, route, created_by and created_at; profiles adds results — measured_posts, unmeasured_posts, and the views, interactions (likes, comments, shares and saves) and rate per view summed over the posts a scrape measured with every count, all null when none was. draft, drafts, approve and reject write drafts: id, profile_id, topic, text, status (pending, approved or rejected), requested_by, requested_at, decided_by, decided_at and content_post_id — the queued post once approved.
State effect#
The verbs call Echo Web's authenticated /api/analytics/ghostwrite with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Ghostwriting section of the blog admin and of Echo Desktop's GEO screen do the same, and echo-mcp runs them as echo_ghost_profiles, echo_ghost_profile, echo_ghost_draft, echo_ghost_drafts and echo_ghost_decide. profile reads the account's newest --posts published posts with text from content_posts and has the route ECHO_GHOSTWRITE_ROUTE declares describe the style through Brama; draft has the same route write the post from the profile. Profiles and drafts are kept in ghostwrite_profiles and ghostwrite_drafts. Approving queues the draft in content_posts for the profile's account as a draft whose metadata names the draft, the profile and the founder who approved it; it is posted only once scheduled.
Refusals#
- A wrong invocation is refused before anything is sent: "social ghostwrite takes profiles; profile …; draft …; drafts …; approve …; reject …; got <word>", "social ghostwrite <verb> does not take <flag>; it takes …", "<flag> needs a value" and "social ghostwrite <verb> needs <flag>".
- Echo Web answers a bad request with "social_account_id is required: the founder's social account whose posts show the style", "founder is required: the founder whose style it is and who alone approves its drafts", "posts must be a whole number above zero: how many of the newest published posts show the style; got <value>", "topic is required: what the post is about", "decision must be approved or rejected; got <value>" or "only <founder> decides on drafts in their style; <who> cannot"; not found with "social account <id> has no published post with text, so there is no style to learn", "no style profile has id <id>" or "no ghostwritten draft has id <id>"; a conflict with "draft <id> was already <status> by <who>"; and fails with "ECHO_GHOSTWRITE_ROUTE is required" when the route is not declared, or "the route <route> wrote an empty <profile|text>; nothing was stored". The command prints Echo Web's sentence and exits 1.
- draft for an account that speaks for a brand (echo-cli accounts brands) checks the text the route wrote against that product's banned phrases (echo-cli glossary): one holding any is refused as unprocessable with "the draft uses banned phrases of the account's brand, so it was not stored: \"<phrase>\" in text at line <n>, column <n>[; write \"<use instead>\" instead]", every occurrence named, with violations beside it; an account of no brand has no glossary to answer to.