Skip to main content

Module gates

Module gates 

Source
Expand description

Gate file protocol — the handoff between DevFlow and a human (via Hermes).

A gate is a pause point where DevFlow writes a request to .devflow/gates/ and waits for a human (or the Hermes cron poller) to drop a response file. The protocol is three files per gated stage:

  • NN-{stage}.json — the gate request DevFlow writes (a GateFile).
  • NN-{stage}.response.json — the human’s answer (a GateResponse).
  • NN-{stage}.ack.json — DevFlow’s receipt (a GateAck) so the poller can clean up.

Writes are atomic (write-to-temp + rename) so a reader never sees a partial file. Polling uses exponential backoff so a long human wait costs little.

Structs§

GateAck
DevFlow’s receipt that it has read a GateResponse.
GateFile
The gate request DevFlow writes when it pauses for a human decision.
GateResponse
The human’s response to a gate.
Gates
The gate-file protocol, scoped to a project’s .devflow/gates/ directory.
OpenGate
An open gate: a request the workflow wrote that has no response yet.

Enums§

GateAction
What DevFlow should do after reading a GateResponse.
GateError
Errors produced by the gate protocol.

Functions§

fire_gate_notify
Fire the operator-configured gate notify hook, if any.