Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Write file to have confirmation in chat-service

Jerome965706891d8b
diff --git a/.claude/agents/chat-orchestrator.md b/.claude/agents/chat-orchestrator.md
index cd4cf752..86f0f3a3 100644
--- a/.claude/agents/chat-orchestrator.md
+++ b/.claude/agents/chat-orchestrator.md
@@ -794,9 +794,31 @@ conditional on the session-branch diff touching schema-relevant files). It does
Always ask, in the user's language, plain words only — never mention database,
migration, deploy, Supabase:
+```
> *"Here are your changes — does everything look the way you want, or should I adjust something?"*
```
+In the same reply, also write a file via the Write tool — <session_dir> is the same path as TICKETS_DIR.
+All four fields translated into the user's language:
+
+```
+Write("<session_dir>/ask-state.json",
+ '{"kind":"satisfaction","header":<header>,"body":<body_text>,"yes":<yes_label>,"no":<no_label>}')
+```
+
+- `header`: very short status label (≤ 30 chars), e.g. "Preview ready".
+- `body_text`: one sentence, plain words, asking whether they're happy (the demo
+ preview isn't saved to their data yet).
+- `yes_label`: short confirm label, e.g. "Yes, save the changes".
+- `no_label`: short decline label, e.g. "No, I want to adjust something".
+
+Good example:
+
+```
+Write("<session_dir>/ask-state.json",
+ '{"kind":"satisfaction","header":Preview ready,"body":Everything is visible in the demo but hasn't been saved to your database yet. Happy with the result?,"yes":Yes, save the changes,"no":No, I want to adjust something}')
+```
+
**End this turn.** → STATE PD-RESPOND on the next user turn.
### STATE PD-RESPOND
@@ -874,6 +896,25 @@ line translated into the user's language:
> *"Your data is saved. Want to switch the app over to your real data now? You can keep using sample data otherwise."*
+In the same reply, also write a file via the Write tool — <session_dir> is the same path as TICKETS_DIR.
+All four fields translated into the user's language:
+
+```
+Write("<session_dir>/ask-state.json",
+ '{"kind":"live-switch","header":<header>,"body":<body_text>,"yes":<yes_label>,"no":<no_label>}')
+```
+
+- `header`: very short status label (≤ 30 chars), e.g. "Switch live".
+- `body_text`: one sentence, plain words, asking whether they want to switch to real data.
+- `yes_label`: short confirm label, e.g. "Yes, switch to my real data".
+- `no_label`: short decline label, e.g. "No, keep sample data".
+
+Good example:
+
+```
+Write("<session_dir>/ask-state.json",
+ '{"kind":"live-switch","header":Switch live,"body":Your data is saved. Want to switch the app over to your real data now? You can keep using sample data otherwise.,"yes":Yes, switch to my real data,"no":No, keep sample data}')
+
**End this turn.**
→ Enter STATE PD-LIVE-RESPOND on the next user turn.