Commit Protocol
AYNIG chooses the command from the latest commit (HEAD) by reading trailers in the commit message.
Minimum required trailer:
dwp-state: <state>dwp-state must appear in the trailing trailer block. If multiple appear, last wins.
Optional trailers:
dwp-source: git:<remote-name>dwp-log-level: <debug|info|warn|error>Recommended structure:
<subject>
<prompt/body>
dwp-state: <state><key>: <value>Output protocol
The command declares the next state by writing a single-line JSON payload to stdout:
SET_STATE {"state":"review","subject":"review: ready","body":"Line 1\nLine 2"}Optional fields:
keep_trailers: truecopies existing non-reserveddwp-*trailers from the currentworkingcommit into the final state commit.trailers: [...]appends explicit trailers after any copied ones, so repeated keys can override by position.trailers: [...]must not include runner-managed keys such asdwp-state,dwp-source,dwp-origin-state,dwp-run-id,dwp-runner-id,dwp-lease-seconds, ordwp-stalled-run.
Rules:
- The runner only interprets stdout for this protocol.
- The prefix must be exactly
SET_STATEat the beginning of the line. - The payload must be valid JSON on a single line.
- If multiple valid
SET_STATElines are emitted, the last one wins. - The runner creates the final commit only if the command exits with code
0. - If the command exits non-zero, the runner ignores
SET_STATEand marks the branch asstalled. - If the command exits
0without any validSET_STATE, the runner emits a freshworkingcommit and keeps waiting.