Repository navigation
Set every code block in Leaf's prompts apart with a blank line before it - #6537
Merged
Merged
Conversation
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_
leaf-agent
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_blockstill returns the block alone, since Codex's hook context is the block with nothing before it;json_block.py's header records that.inline_deliverynow reads the blank line and returns the delivery with the lines after its block, soleaf-dev logs timelinereads 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.