assemblyline.sh

Stations pull work

A station writes only to its own bins. It never puts anything into another station's input/. Work moves on when the next station pulls it: its conveyor moves each workpiece from the previous station's output/ into its own input/, as soon as the workpiece is finished.

IN1/output/inv-1001/   ──  IN2 pulls  ──▶   IN2/input/inv-1001/

So the route of a line is set by each consumer, which names the bin it takes from ("conveyor": { "from": "IN1/output" }). Producers don't name what comes after them.

Why pull, not push

  • One writer per bin. Only IN2's conveyor writes to IN2/input/, so the folder always shows the truth. No second writer can add to it halfway through.
  • A station never knows what comes after it. IN1 doesn't name IN2, so you can reorder or add stations without touching IN1.
  • Rerouting is one change. To send IN1's output somewhere else, change the source of the station that pulls it.
  • Lines stay apart. One line hands work to another through an inbox or a shared system, never through a conveyor between lines: see How lines meet.

What it rules out

Who writes the next input/The route lives in
Pull (Assembly Line)the next stationeach consumer's config
Push into the next input/the previous stationeach producer's code
A central dispatcherthe orchestratorruntime state you can't list

Pushing puts two writers on one bin. A dispatcher moves the route out of files you can read into the dispatcher's runtime state.

The line head

The first station on a line has nothing to pull from. It brings work in from outside, such as a folder, a mailbox or an API, and creates each workpiece straight in its own output/. It keeps a registry of what it has taken in, so a re-run doesn't take the same work twice: see The line head's registry. Every later station pulls.