Your TurnLoop GitHub

Handoff protocol

Specification · version 1.0

A four-line block at the end of an agent's answer that says what came out of the turn and whether anything waits on you. People read it at a glance. Tools such as the Your Turn inbox parse it without a model call.

The key words must, should and may describe what a conforming writer (the agent) or reader (a tool) does.

The block

**Outcome:** The importer skips malformed rows instead of aborting the file.

**Next step:** review: confirm the skipped-row log format in importer.py

**Recap:** Goal: tolerate bad rows. Settled: skip and log to keep valid rows. Open: your log-format review.

**Decision:** Skip or abort on a malformed row? -> skip and log (over abort, silent skip). One bad row should not lose a whole import.

Use it without installing anything

Paste this into AGENTS.md, CLAUDE.md or your agent's custom instructions. The your-turn-handoff skill does the same with more guidance and examples.

## Handoff

End every final answer with a short handoff block, so the user can see at a glance what happened and whether anything waits on them. Tools such as the Your Turn inbox parse it, so keep the exact format: each field on its own line, a blank line between fields, plain Markdown outside code blocks, at the very end of the reply. Questions and pauses for review get the block too; progress updates do not.

**Outcome:** The importer skips malformed rows instead of aborting the file.

**Next step:** review: confirm the skipped-row log format in importer.py

- Outcome: one sentence under 160 characters with the concrete result, finding or blocker. Include a limit when it changes the meaning.
- Next step: `none` when nothing waits on the user. Otherwise one of `answer:`, `decide:`, `review:`, `approve:` or `run:`, then the single action they must take, under 120 characters. Finish the work you are allowed to do first. Optional suggestions go in the body, not here.
- From the second turn on, add `**Recap:**` with one or two sentences about the whole chat: the goal, what is settled, what is open.
- When you settle a trade-off this turn, add `**Decision:** <question> -> <chosen> (over <alternatives>). <reason>`.
- Keep labels and prefixes in English and write the rest in the reply's language. Do not use these labels anywhere else in the answer.

Format: Handoff protocol 1.0, https://martin-gomola.github.io/your-turn-loop/spec.html

Fields

Outcome required

One sentence under 160 characters: the concrete result, recommendation, finding or blocker. A limit that changes the meaning of the result belongs here, for example “phone layout is unverified”. A reader may cut it at 200 characters.

Next step required

Exactly one action under 120 characters, or none. It starts with one of the prefixes below and names what the user must do and where. A reader may cut it at 200 characters.

Recap from the second turn

One or two sentences under 400 characters covering the whole chat, not just this turn: the goal, what is settled and why, and what is still open.

Decision zero or more

A consequential choice actually made this turn, one per line:

**Decision:** <question> -> <chosen> (over <alternatives>). <reason>

Separate alternatives with commas. (over …) is optional. A choice still waiting on the user belongs in Next step as decide:, never here.

Next step

Any value other than none means the chat needs the user. A writer must finish the authorized work it can do first, then pick the value by the real human dependency:

ValueUse when
noneNothing required waits on the user. Delivered advice and findings with a stated limit fit here too. Optional suggestions go in the body.
answer: …Required information is missing and only the user can supply it.
decide: …A choice belongs to the user. Name at least two options; put the recommendation in the body.
review: …A prepared artifact waits for the user's judgment. A finished result or uncertainty alone is not a review.
approve: …A necessary action needs permission the user has not already given.
run: …The next command belongs to the user. Give the exact command, not just “deploy”.

Layout

Reading the block

Writers emit the canonical form above. Readers should also accept the variants agents produce in practice:

Readers must ignore lines inside fenced code blocks, so an example in the body never overrides the real handoff. An answer without an Outcome line is unformatted; a reader may fall back to its own summary, but should mark it as inferred.

Examples

Done, nothing waits

Fixed the off-by-one in the pager.

**Outcome:** The last page now shows its final row.

**Next step:** none

The user reserved a command

**Outcome:** Initial release 0.1.0 is committed and tagged locally; checks passed.

**Next step:** run: git push --force-with-lease origin main && git push origin v0.1.0

**Recap:** Release prepared. Original history is backed up locally; publishing remains yours.

A choice is still open

**Outcome:** Both caches cut dashboard latency below 200 ms; they differ in how stale data can get.

**Next step:** decide: Redis with a 60 s TTL, or an in-process LRU per worker?

**Recap:** Goal: faster dashboard. Settled: queries are the bottleneck. Open: which cache.

Implementations

Version 1.0 describes the format used by your-turn-handoff 0.7.0 and later. A change that breaks existing readers or writers raises the major version.