Skip to main content

sloop/worker/
mod.rs

1//! Everything an agent process is told, in one place.
2//!
3//! A worker's assignment arrives over two channels, and they answer different
4//! questions. The *prompt* is **how**: the standing rules the worker operates
5//! under, delivered as argv when the process is spawned. The *brief* is
6//! **what**: this ticket, this branch, this stage, served over the worker
7//! socket and re-readable at any time, which is what makes it the recovery
8//! path for an agent that has compacted its prompt away. `prompt` holds the
9//! first, `brief` the second.
10//!
11//! The dependency rule is one-way. This module composes text from facts handed
12//! to it and from committed files in the repository; it reads no database,
13//! takes no clock, and spawns no process. The daemon edge resolves the facts
14//! and calls in, never the reverse.
15
16mod brief;
17mod prompt;
18
19pub use brief::{WorkerRole, check_label, definition_of_done};
20pub use prompt::{
21    BACKWARD_CONTEXT_LINES, FailureContext, PANEL_REVIEWER_INSTRUCTION, REVIEW_PROMPT_PATH,
22    compose_worker_prompt, panel_prompt, previous_attempt_block,
23};