Skip to content

Set every code block in Leaf's prompts apart with a blank line before it - #6537

Merged
max-sixty merged 1 commit into
mainfrom
prompt-block-spacing
Nov 19, 2026
Merged

max-sixty merged 1 commit into
mainfrom
prompt-block-spacing

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Every fenced block Leaf writes into a model's context now sits under a blank line rather than straight under the sentence that introduces it: the thread or delivery in the line, work, resume and summary forks' prompts, the answer schema in a system prompt, the inline delivery a hook hands a turn, and the pointer blocks of pointer deliveries and reminders. Max asked for it after #6497 fenced the JSON.

The text that holds a block writes the blank line, as it does between its other paragraphs, and json_block still returns the block alone, since Codex's hook context is the block with nothing before it; json_block.py's header records that. inline_delivery now reads the blank line and returns the delivery with the lines after its block, so leaf-dev logs timeline reads the clerk's lines through it instead of its own copy of the format. Six eval cases that paste a delivery under a sentence gain the blank line. The shipped Markdown references already had one before every fence.

Tests: the model tests for hooks, forks, delivery, the stop guard, the layer contract, titles, activity, clerk, session lifecycle and the Codex adapter, the timeline, journey and How it works prompt tests, and the llm, Pi and Claude Code module process tests. Three snapshots gained the blank line.

This was written by Claude Code on behalf of max-sixty

Every fenced block Leaf writes into a model's context now sits under a blank
line instead of straight under the sentence that introduces it: the thread or
delivery in the line, work, resume and summary forks' prompts, the answer
schema in a system prompt (`inference.answering`), the inline delivery a hook
hands a turn, and the pointer blocks of a pointer delivery and of the
unanswered-update reminders. Max asked for it after #6497 fenced the JSON.

The text that holds a block writes the blank line, as it does between its
other paragraphs; `json_block` still returns the block alone, since Codex's
hook context is the block with nothing before it. `json_block.py`'s header
records the decision.

`hook_transport.inline_delivery` now returns the delivery and the lines after
its block, so `leaf-dev logs timeline` reads what the clerk queued through it
instead of re-parsing the context's shape. Six eval cases that introduce a
pasted delivery with a sentence gain the blank line; the shipped Markdown
references already had one before every fence.

Tests: the model tests for hooks, forks, delivery, the stop guard, the layer
contract, titles, activity, clerk, session lifecycle and the Codex adapter,
the timeline, journey and How it works prompt tests, and the llm, Pi and
Claude Code module process tests. Three snapshots gained the blank line:
the recovery walkthrough's reminder, the stop guard's two pointers and the
title request's system prompt.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty merged commit acaeabe into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the prompt-block-spacing branch November 19, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants