turn: keep turn headings structural in memory

Turn bodies were embedded verbatim, so a body's own ## headings looked like
sibling turns and could even duplicate the system's "Files added to public/"
line. Body headings are now demoted two levels (capped at H6) outside fences;
fenced code is untouched.
This commit is contained in:
2026-10-19 23:35:18 +01:00
parent 0219173327
commit 00252da8f8
3 changed files with 76 additions and 10 deletions
+3 -1
View File
@@ -19,7 +19,9 @@ directories idempotently; it never deletes or rewrites existing files.
body (without the outcome section) under a `# Previous turn output` heading
afterwards. `memory.md` is plain
markdown: one `## <stage> · visit <n>` section per completed turn, with that
turn's body followed by a system-written list of files it added to `public/`.
turn's body — its own ATX headings demoted two levels, so the turn heading stays
the structural one — followed by a system-written list of files it added to
`public/`.
List entries are relative to the run directory, sorted, and unique.
The server writes `input.md` and `memory.md` before the model runs. The model