Expand description
Workflow layer: stateful composite operations over toolkit primitives.
Each workflow step defines explicit typed IO contracts and composes toolkit functions with DB and LLM state. Steps are the building blocks for both MCP composite tools and autopilot cycles.
Layer rules (charter §5):
- Workflow MAY access DB (
SqlitePool) and LLM (LlmProvider). - Workflow MUST call X API operations through
toolkit::*, neverXApiClientdirectly. - Workflow MUST NOT import from
automation::.
Re-exports§
pub use discover::DiscoverInput;pub use discover::DiscoverOutput;pub use draft::DraftInput;pub use orchestrate::CycleInput;pub use orchestrate::CycleReport;pub use publish::PublishOutput;pub use queue::QueueInput;pub use thread_plan::ThreadPlanInput;pub use thread_plan::ThreadPlanOutput;
Modules§
- discover
- Discover step: search tweets via toolkit, score, persist to DB.
- draft
- Draft step: fetch discovered tweets, generate LLM reply drafts, run safety checks.
- orchestrate
- Deterministic orchestrator for autopilot discovery cycles.
- publish
- Publish step: execute a reply or tweet through the toolkit layer.
- queue
- Queue step: validate replies, safety-check, then route to approval queue or execute.
- thread_
plan - Thread plan step: generate and analyze a multi-tweet thread via LLM.
Structs§
- Queue
Item - Input item for the queue step.
- Score
Breakdown - Per-signal score breakdown.
- Scored
Candidate - A tweet candidate scored for reply-worthiness.
Enums§
- Draft
Result - Result of drafting a reply for a single candidate.
- Propose
Result - Result of proposing/queueing a single reply.
- Workflow
Error - Errors from workflow operations.
Functions§
- parse_
archetype - Parse an archetype string into a
ReplyArchetype.