Skip to main content

Module worker

Module worker 

Source
Expand description

Everything an agent process is told, in one place.

A worker’s assignment arrives over two channels, and they answer different questions. The prompt is how: the standing rules the worker operates under, delivered as argv when the process is spawned. The brief is what: this ticket, this branch, this stage, served over the worker socket and re-readable at any time, which is what makes it the recovery path for an agent that has compacted its prompt away. prompt holds the first, brief the second.

The dependency rule is one-way. This module composes text from facts handed to it and from committed files in the repository; it reads no database, takes no clock, and spawns no process. The daemon edge resolves the facts and calls in, never the reverse.

Structs§

FailureContext
The failure a backward edge jumped on, recovered from the run’s persisted evidence.

Enums§

WorkerRole
Which worker is reading the brief.

Constants§

BACKWARD_CONTEXT_LINES
How many lines of a failed stage’s output a re-entered stage is shown. Long enough for a test failure’s tail, short enough that the block cannot crowd the ticket out of the prompt.
PANEL_REVIEWER_INSTRUCTION
The bootstrap prepended to a panel reviewer’s prompt. A reviewer is not the ticket’s worker: it reads, it does not write, and its one job is the report.
REVIEW_PROMPT_PATH

Functions§

check_label
How a stage’s result_check is named in the brief’s stage block.
compose_worker_prompt
definition_of_done
What the executing stage turns on, as the brief states it.
panel_prompt
The prompt every seat is handed, read from the committed file the panel names. One prompt for the whole panel: reviewers who were asked different questions do not produce comparable answers, so a quorum over them would count nothing in particular.
previous_attempt_block
The “previous attempt failed” block appended to a re-entered agent’s prompt. Delimited on both sides because everything inside it is untrusted process output that must not read as further instructions.