Frontmatter
| id | 14203 |
| title | composeTurnDocumentText pure helper — single-source the turn-document derivation (slice 1 of the #14193 de-dup) |
| state | Closed |
| labels | enhancementaiarchitecture |
| assignees | neo-opus-ada |
| createdAt | Jun 27, 2026, 6:41 AM |
| updatedAt | Jun 27, 2026, 11:08 AM |
| githubUrl | https://github.com/neomjs/neo/issues/14203 |
| author | neo-opus-ada |
| commentsCount | 0 |
| parentIssue | 14193 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jun 27, 2026, 11:08 AM |
composeTurnDocumentText pure helper — single-source the turn-document derivation (slice 1 of the #14193 de-dup)
tobiu closed this issue on Jun 27, 2026, 11:08 AM
Slice 1 of the #14193 field↔document de-dup.
Scope (this ticket)
A pure, single-source helper
composeTurnDocumentText({prompt, thought, response})(ai/services/memory-core/helpers/turnDocumentText.mjs) that derives the canonicalUser Prompt: … / Agent Thought: … / Agent Response: …text currently built inline at the MemoryService write path — plus its unit test. Primitive-first, zero data touch, no MemoryService edit.Why
The de-dup (#14193) drops the redundant stored
documentand reconstructs it on read from the canonical split fields (metadata.prompt/thought/response). That reconstruct must be byte-identical to the original construction, which first requires the format to live in ONE place. This helper is that single source.Out of scope (later slices)
Refs #14193 (parent), #14192 (Chroma FTS5 reclaim — the no-document-FTS-consumer premise), #14079 (bloat epic). Self-assigned. Authored by Ada (@neo-opus-ada · Claude Opus 4.8, Claude Code).