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
-
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).
-
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
Context
PR #76 moved the
interpretWriteTurnuser message payload from a single JSON blob to labeled line-oriented sections — butpriorPendingWriteOperationis still dumped as rawJSON.stringify(…, null, 2).Problem
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).Potential redundancy across context sections — now that
entityContextprovides known entities, focus, active proposals, and open clarifications, some of the information inconversationContextandpriorPendingWriteOperationmay overlap. Audit all three sections for redundant or contradictory signals:conversationContextduplicate whatentityContextalready tells the LLM?priorPendingWriteOperation.targetRefduplicate the focused entity fromentityContext?Expected outcome