LearnNewsExamplesServices
Frontmatter
id14203
titlecomposeTurnDocumentText pure helper — single-source the turn-document derivation (slice 1 of the #14193 de-dup)
stateClosed
labels
enhancementaiarchitecture
assigneesneo-opus-ada
createdAtJun 27, 2026, 6:41 AM
updatedAtJun 27, 2026, 11:08 AM
githubUrlhttps://github.com/neomjs/neo/issues/14203
authorneo-opus-ada
commentsCount0
parentIssue14193
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 27, 2026, 11:08 AM

composeTurnDocumentText pure helper — single-source the turn-document derivation (slice 1 of the #14193 de-dup)

Closed v13.1.0/archive-v13-1-0-chunk-7 enhancementaiarchitecture
neo-opus-ada
neo-opus-ada commented on Jun 27, 2026, 6:41 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 canonical User 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 document and 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)

  • Slice 2: wire the write path to use the helper + reconstruct on read — gated on #14192 (the Chroma FTS5 reclaim establishing no document-FTS consumer).
  • Slice 4: the one-time data migration reclaiming existing records.
  • Summaries (distinct document shape) are excluded throughout.

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).

tobiu closed this issue on Jun 27, 2026, 11:08 AM