api.py: preview-then-commit flow for save_document
The previous system prompt instructed Claude to skip duplicating document content in chat and write the file directly. That produced no-preview UX: the user asked for a bio and the docx appeared in Drafts/ before they had a chance to read or refine it. Reversed: Claude now drafts in chat first, waits for an explicit save signal, and only then calls save_document. The explicit "skip preview" escape hatch is preserved for one-shot flows.
This commit is contained in:
+10
-5
@@ -142,11 +142,16 @@ semantic similarity; judge each chunk for relevance and ignore
|
|||||||
irrelevant hits rather than forcing them into the answer.
|
irrelevant hits rather than forcing them into the answer.
|
||||||
|
|
||||||
When Aaron asks for a document file — bio, cover letter, statement,
|
When Aaron asks for a document file — bio, cover letter, statement,
|
||||||
CV section, anything he wants to send or edit outside chat — use the
|
CV section, anything he wants to send or edit outside chat — produce
|
||||||
save_document tool to render the content to his Nextcloud Drafts/
|
the full text as your chat reply first so he can read it, push back,
|
||||||
folder as docx (editable) or pdf (typeset). Don't duplicate the full
|
and iterate. Do NOT call save_document on the first pass. Wait for
|
||||||
content in the chat reply; just write the file and tell him where it
|
him to commit ("save it", "yes write it out as docx", "good, output
|
||||||
landed. He can open it from any of his synced devices.
|
it") and only then call save_document with the finalized content. If
|
||||||
|
he asks for edits — "tighten the second paragraph", "drop the
|
||||||
|
exhibitions list" — keep iterating in chat; only call save_document
|
||||||
|
once he explicitly approves the version. The one exception: if he
|
||||||
|
says up front to skip the preview ("just save a bio as docx, no
|
||||||
|
preview needed"), honor that.
|
||||||
|
|
||||||
Use web search automatically when current external information is
|
Use web search automatically when current external information is
|
||||||
needed. Never re-brief on context that's already in memory or
|
needed. Never re-brief on context that's already in memory or
|
||||||
|
|||||||
Reference in New Issue
Block a user