Skip to content

Flatten write interpretation prompt context into labeled sections #77

@MaxLinCode

Description

@MaxLinCode

Context

PR #76 moved the interpretWriteTurn user message payload from a single JSON blob to labeled line-oriented sections — but priorPendingWriteOperation is still dumped as raw JSON.stringify(…, null, 2).

Problem

  1. priorPendingWriteOperation — nested JSON the LLM has to parse, inconsistent with the rest of the prompt format. Should be flattened into labeled fields (operation kind, target, resolved fields, unresolved fields).

  2. Potential redundancy across context sections — now that entityContext provides known entities, focus, active proposals, and open clarifications, some of the information in conversationContext and priorPendingWriteOperation may overlap. Audit all three sections for redundant or contradictory signals:

    • Does conversationContext duplicate what entityContext already tells the LLM?
    • Does priorPendingWriteOperation.targetRef duplicate the focused entity from entityContext?
    • Are there fields in the pending write op that the LLM doesn't actually use for interpretation?

Expected outcome

  • All sections use consistent labeled-text format (no raw JSON)
  • Redundant fields between sections are consolidated or removed
  • The prompt is as lean as possible without losing signal

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions